rezo 1.0.36 → 1.0.38
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/dist/adapters/curl.cjs +320 -9
- package/dist/adapters/curl.js +320 -9
- package/dist/adapters/entries/curl.d.ts +20 -2
- package/dist/adapters/entries/fetch.d.ts +20 -2
- package/dist/adapters/entries/http.d.ts +20 -2
- package/dist/adapters/entries/http2.d.ts +20 -2
- package/dist/adapters/entries/react-native.d.ts +20 -2
- package/dist/adapters/entries/xhr.d.ts +20 -2
- package/dist/adapters/fetch.cjs +10 -2
- package/dist/adapters/fetch.js +10 -2
- package/dist/adapters/http.cjs +206 -35
- package/dist/adapters/http.js +206 -35
- package/dist/adapters/http2.cjs +10 -2
- package/dist/adapters/http2.js +10 -2
- package/dist/adapters/index.cjs +6 -6
- package/dist/adapters/react-native.cjs +10 -2
- package/dist/adapters/react-native.js +10 -2
- package/dist/adapters/xhr.cjs +9 -1
- package/dist/adapters/xhr.js +9 -1
- package/dist/cache/index.cjs +13 -13
- package/dist/crawler.d.ts +20 -2
- package/dist/entries/crawler.cjs +5 -5
- package/dist/index.cjs +24 -24
- package/dist/index.d.ts +20 -2
- package/dist/platform/browser.d.ts +20 -2
- package/dist/platform/bun.d.ts +20 -2
- package/dist/platform/deno.d.ts +20 -2
- package/dist/platform/node.d.ts +20 -2
- package/dist/platform/react-native.d.ts +20 -2
- package/dist/platform/worker.d.ts +20 -2
- package/dist/plugin/index.cjs +36 -36
- package/dist/proxy/index.cjs +4 -4
- package/dist/queue/index.cjs +8 -8
- package/dist/responses/universal/index.cjs +11 -11
- package/dist/utils/agent-pool.cjs +204 -0
- package/dist/utils/agent-pool.js +201 -0
- package/dist/utils/http-config.cjs +24 -7
- package/dist/utils/http-config.js +24 -7
- package/dist/utils/index.cjs +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/staged-timeout.cjs +143 -0
- package/dist/utils/staged-timeout.js +139 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Rezo =
|
|
3
|
-
exports.createRezoInstance =
|
|
4
|
-
exports.createDefaultInstance =
|
|
5
|
-
const
|
|
6
|
-
exports.RezoError =
|
|
7
|
-
exports.RezoErrorCode =
|
|
8
|
-
const
|
|
9
|
-
exports.RezoHeaders =
|
|
10
|
-
const
|
|
11
|
-
exports.RezoFormData =
|
|
12
|
-
const
|
|
13
|
-
exports.RezoCookieJar =
|
|
14
|
-
exports.Cookie =
|
|
15
|
-
const
|
|
16
|
-
exports.createDefaultHooks =
|
|
17
|
-
exports.mergeHooks =
|
|
18
|
-
const
|
|
19
|
-
exports.ProxyManager =
|
|
20
|
-
const
|
|
21
|
-
exports.RezoQueue =
|
|
22
|
-
exports.HttpQueue =
|
|
23
|
-
exports.Priority =
|
|
24
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_8kh4v0 = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_8kh4v0.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_8kh4v0.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_8kh4v0.createDefaultInstance;;
|
|
5
|
+
const _mod_qre162 = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_qre162.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_qre162.RezoErrorCode;;
|
|
8
|
+
const _mod_ltk2zp = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_ltk2zp.RezoHeaders;;
|
|
10
|
+
const _mod_rpds6z = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_rpds6z.RezoFormData;;
|
|
12
|
+
const _mod_wn5amd = require('./utils/cookies.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_wn5amd.RezoCookieJar;
|
|
14
|
+
exports.Cookie = _mod_wn5amd.Cookie;;
|
|
15
|
+
const _mod_meh3fm = require('./core/hooks.cjs');
|
|
16
|
+
exports.createDefaultHooks = _mod_meh3fm.createDefaultHooks;
|
|
17
|
+
exports.mergeHooks = _mod_meh3fm.mergeHooks;;
|
|
18
|
+
const _mod_3bs2z2 = require('./proxy/manager.cjs');
|
|
19
|
+
exports.ProxyManager = _mod_3bs2z2.ProxyManager;;
|
|
20
|
+
const _mod_o8mlnk = require('./queue/index.cjs');
|
|
21
|
+
exports.RezoQueue = _mod_o8mlnk.RezoQueue;
|
|
22
|
+
exports.HttpQueue = _mod_o8mlnk.HttpQueue;
|
|
23
|
+
exports.Priority = _mod_o8mlnk.Priority;
|
|
24
|
+
exports.HttpMethodPriority = _mod_o8mlnk.HttpMethodPriority;;
|
|
25
25
|
const { RezoError } = require('./errors/rezo-error.cjs');
|
|
26
26
|
const isRezoError = exports.isRezoError = RezoError.isRezoError;
|
|
27
27
|
const Cancel = exports.Cancel = RezoError;
|
package/dist/index.d.ts
CHANGED
|
@@ -1561,7 +1561,14 @@ export interface RezoConfig {
|
|
|
1561
1561
|
/** @description Supported compression algorithms */
|
|
1562
1562
|
algorithms?: string[];
|
|
1563
1563
|
};
|
|
1564
|
-
/**
|
|
1564
|
+
/**
|
|
1565
|
+
* @description Disable cookie jar for session management.
|
|
1566
|
+
* When false (default), cookies are automatically managed.
|
|
1567
|
+
* Set to true to disable automatic cookie handling.
|
|
1568
|
+
* @default false
|
|
1569
|
+
*/
|
|
1570
|
+
disableCookieJar?: boolean;
|
|
1571
|
+
/** @deprecated Use `disableCookieJar` instead */
|
|
1565
1572
|
enableCookieJar?: boolean;
|
|
1566
1573
|
/** @description Send cookies with cross-origin requests (matches Axios withCredentials). Default: false */
|
|
1567
1574
|
withCredentials?: boolean;
|
|
@@ -1672,6 +1679,8 @@ export interface RezoConfig {
|
|
|
1672
1679
|
hooks: Partial<RezoHooks> | null;
|
|
1673
1680
|
/** @description Snapshot of the original request configuration */
|
|
1674
1681
|
originalRequest: RezoRequestConfig;
|
|
1682
|
+
/** @description Original request body, preserved for POST body retention during redirects */
|
|
1683
|
+
originalBody?: RezoRequestConfig["body"];
|
|
1675
1684
|
/** @description Final resolved URL after redirects and processing */
|
|
1676
1685
|
finalUrl: string;
|
|
1677
1686
|
/** @description HTTP adapter used for the request */
|
|
@@ -2828,6 +2837,8 @@ export interface OnRedirectOptions {
|
|
|
2828
2837
|
headers: RezoHeaders;
|
|
2829
2838
|
sameDomain: boolean;
|
|
2830
2839
|
method: string;
|
|
2840
|
+
/** The current request body (RezoFormData, string, object, etc.) - allows user to inspect/modify */
|
|
2841
|
+
body?: any;
|
|
2831
2842
|
}
|
|
2832
2843
|
export type OnRedirectResponse = boolean | ToRedirectOptions | undefined;
|
|
2833
2844
|
export type ToRedirectOptions = {
|
|
@@ -3197,7 +3208,14 @@ export interface RezoDefaultOptions {
|
|
|
3197
3208
|
baseURL?: string;
|
|
3198
3209
|
/** Hooks for request/response lifecycle */
|
|
3199
3210
|
hooks?: Partial<RezoHooks>;
|
|
3200
|
-
/**
|
|
3211
|
+
/**
|
|
3212
|
+
* Whether to disable automatic cookie handling.
|
|
3213
|
+
* When false (default), cookies are automatically managed via the jar.
|
|
3214
|
+
* Set to true to disable automatic cookie management.
|
|
3215
|
+
* @default false
|
|
3216
|
+
*/
|
|
3217
|
+
disableCookieJar?: boolean;
|
|
3218
|
+
/** @deprecated Use `disableCookieJar` instead. Will be removed in next major version. */
|
|
3201
3219
|
enableCookieJar?: boolean;
|
|
3202
3220
|
/**
|
|
3203
3221
|
* Custom cookie jar for managing cookies.
|
|
@@ -1561,7 +1561,14 @@ export interface RezoConfig {
|
|
|
1561
1561
|
/** @description Supported compression algorithms */
|
|
1562
1562
|
algorithms?: string[];
|
|
1563
1563
|
};
|
|
1564
|
-
/**
|
|
1564
|
+
/**
|
|
1565
|
+
* @description Disable cookie jar for session management.
|
|
1566
|
+
* When false (default), cookies are automatically managed.
|
|
1567
|
+
* Set to true to disable automatic cookie handling.
|
|
1568
|
+
* @default false
|
|
1569
|
+
*/
|
|
1570
|
+
disableCookieJar?: boolean;
|
|
1571
|
+
/** @deprecated Use `disableCookieJar` instead */
|
|
1565
1572
|
enableCookieJar?: boolean;
|
|
1566
1573
|
/** @description Send cookies with cross-origin requests (matches Axios withCredentials). Default: false */
|
|
1567
1574
|
withCredentials?: boolean;
|
|
@@ -1672,6 +1679,8 @@ export interface RezoConfig {
|
|
|
1672
1679
|
hooks: Partial<RezoHooks> | null;
|
|
1673
1680
|
/** @description Snapshot of the original request configuration */
|
|
1674
1681
|
originalRequest: RezoRequestConfig;
|
|
1682
|
+
/** @description Original request body, preserved for POST body retention during redirects */
|
|
1683
|
+
originalBody?: RezoRequestConfig["body"];
|
|
1675
1684
|
/** @description Final resolved URL after redirects and processing */
|
|
1676
1685
|
finalUrl: string;
|
|
1677
1686
|
/** @description HTTP adapter used for the request */
|
|
@@ -2702,6 +2711,8 @@ export interface OnRedirectOptions {
|
|
|
2702
2711
|
headers: RezoHeaders;
|
|
2703
2712
|
sameDomain: boolean;
|
|
2704
2713
|
method: string;
|
|
2714
|
+
/** The current request body (RezoFormData, string, object, etc.) - allows user to inspect/modify */
|
|
2715
|
+
body?: any;
|
|
2705
2716
|
}
|
|
2706
2717
|
export type OnRedirectResponse = boolean | ToRedirectOptions | undefined;
|
|
2707
2718
|
export type ToRedirectOptions = {
|
|
@@ -3052,7 +3063,14 @@ export interface RezoDefaultOptions {
|
|
|
3052
3063
|
baseURL?: string;
|
|
3053
3064
|
/** Hooks for request/response lifecycle */
|
|
3054
3065
|
hooks?: Partial<RezoHooks>;
|
|
3055
|
-
/**
|
|
3066
|
+
/**
|
|
3067
|
+
* Whether to disable automatic cookie handling.
|
|
3068
|
+
* When false (default), cookies are automatically managed via the jar.
|
|
3069
|
+
* Set to true to disable automatic cookie management.
|
|
3070
|
+
* @default false
|
|
3071
|
+
*/
|
|
3072
|
+
disableCookieJar?: boolean;
|
|
3073
|
+
/** @deprecated Use `disableCookieJar` instead. Will be removed in next major version. */
|
|
3056
3074
|
enableCookieJar?: boolean;
|
|
3057
3075
|
/**
|
|
3058
3076
|
* Custom cookie jar for managing cookies.
|
package/dist/platform/bun.d.ts
CHANGED
|
@@ -1561,7 +1561,14 @@ export interface RezoConfig {
|
|
|
1561
1561
|
/** @description Supported compression algorithms */
|
|
1562
1562
|
algorithms?: string[];
|
|
1563
1563
|
};
|
|
1564
|
-
/**
|
|
1564
|
+
/**
|
|
1565
|
+
* @description Disable cookie jar for session management.
|
|
1566
|
+
* When false (default), cookies are automatically managed.
|
|
1567
|
+
* Set to true to disable automatic cookie handling.
|
|
1568
|
+
* @default false
|
|
1569
|
+
*/
|
|
1570
|
+
disableCookieJar?: boolean;
|
|
1571
|
+
/** @deprecated Use `disableCookieJar` instead */
|
|
1565
1572
|
enableCookieJar?: boolean;
|
|
1566
1573
|
/** @description Send cookies with cross-origin requests (matches Axios withCredentials). Default: false */
|
|
1567
1574
|
withCredentials?: boolean;
|
|
@@ -1672,6 +1679,8 @@ export interface RezoConfig {
|
|
|
1672
1679
|
hooks: Partial<RezoHooks> | null;
|
|
1673
1680
|
/** @description Snapshot of the original request configuration */
|
|
1674
1681
|
originalRequest: RezoRequestConfig;
|
|
1682
|
+
/** @description Original request body, preserved for POST body retention during redirects */
|
|
1683
|
+
originalBody?: RezoRequestConfig["body"];
|
|
1675
1684
|
/** @description Final resolved URL after redirects and processing */
|
|
1676
1685
|
finalUrl: string;
|
|
1677
1686
|
/** @description HTTP adapter used for the request */
|
|
@@ -2702,6 +2711,8 @@ export interface OnRedirectOptions {
|
|
|
2702
2711
|
headers: RezoHeaders;
|
|
2703
2712
|
sameDomain: boolean;
|
|
2704
2713
|
method: string;
|
|
2714
|
+
/** The current request body (RezoFormData, string, object, etc.) - allows user to inspect/modify */
|
|
2715
|
+
body?: any;
|
|
2705
2716
|
}
|
|
2706
2717
|
export type OnRedirectResponse = boolean | ToRedirectOptions | undefined;
|
|
2707
2718
|
export type ToRedirectOptions = {
|
|
@@ -3052,7 +3063,14 @@ export interface RezoDefaultOptions {
|
|
|
3052
3063
|
baseURL?: string;
|
|
3053
3064
|
/** Hooks for request/response lifecycle */
|
|
3054
3065
|
hooks?: Partial<RezoHooks>;
|
|
3055
|
-
/**
|
|
3066
|
+
/**
|
|
3067
|
+
* Whether to disable automatic cookie handling.
|
|
3068
|
+
* When false (default), cookies are automatically managed via the jar.
|
|
3069
|
+
* Set to true to disable automatic cookie management.
|
|
3070
|
+
* @default false
|
|
3071
|
+
*/
|
|
3072
|
+
disableCookieJar?: boolean;
|
|
3073
|
+
/** @deprecated Use `disableCookieJar` instead. Will be removed in next major version. */
|
|
3056
3074
|
enableCookieJar?: boolean;
|
|
3057
3075
|
/**
|
|
3058
3076
|
* Custom cookie jar for managing cookies.
|
package/dist/platform/deno.d.ts
CHANGED
|
@@ -1561,7 +1561,14 @@ export interface RezoConfig {
|
|
|
1561
1561
|
/** @description Supported compression algorithms */
|
|
1562
1562
|
algorithms?: string[];
|
|
1563
1563
|
};
|
|
1564
|
-
/**
|
|
1564
|
+
/**
|
|
1565
|
+
* @description Disable cookie jar for session management.
|
|
1566
|
+
* When false (default), cookies are automatically managed.
|
|
1567
|
+
* Set to true to disable automatic cookie handling.
|
|
1568
|
+
* @default false
|
|
1569
|
+
*/
|
|
1570
|
+
disableCookieJar?: boolean;
|
|
1571
|
+
/** @deprecated Use `disableCookieJar` instead */
|
|
1565
1572
|
enableCookieJar?: boolean;
|
|
1566
1573
|
/** @description Send cookies with cross-origin requests (matches Axios withCredentials). Default: false */
|
|
1567
1574
|
withCredentials?: boolean;
|
|
@@ -1672,6 +1679,8 @@ export interface RezoConfig {
|
|
|
1672
1679
|
hooks: Partial<RezoHooks> | null;
|
|
1673
1680
|
/** @description Snapshot of the original request configuration */
|
|
1674
1681
|
originalRequest: RezoRequestConfig;
|
|
1682
|
+
/** @description Original request body, preserved for POST body retention during redirects */
|
|
1683
|
+
originalBody?: RezoRequestConfig["body"];
|
|
1675
1684
|
/** @description Final resolved URL after redirects and processing */
|
|
1676
1685
|
finalUrl: string;
|
|
1677
1686
|
/** @description HTTP adapter used for the request */
|
|
@@ -2702,6 +2711,8 @@ export interface OnRedirectOptions {
|
|
|
2702
2711
|
headers: RezoHeaders;
|
|
2703
2712
|
sameDomain: boolean;
|
|
2704
2713
|
method: string;
|
|
2714
|
+
/** The current request body (RezoFormData, string, object, etc.) - allows user to inspect/modify */
|
|
2715
|
+
body?: any;
|
|
2705
2716
|
}
|
|
2706
2717
|
export type OnRedirectResponse = boolean | ToRedirectOptions | undefined;
|
|
2707
2718
|
export type ToRedirectOptions = {
|
|
@@ -3052,7 +3063,14 @@ export interface RezoDefaultOptions {
|
|
|
3052
3063
|
baseURL?: string;
|
|
3053
3064
|
/** Hooks for request/response lifecycle */
|
|
3054
3065
|
hooks?: Partial<RezoHooks>;
|
|
3055
|
-
/**
|
|
3066
|
+
/**
|
|
3067
|
+
* Whether to disable automatic cookie handling.
|
|
3068
|
+
* When false (default), cookies are automatically managed via the jar.
|
|
3069
|
+
* Set to true to disable automatic cookie management.
|
|
3070
|
+
* @default false
|
|
3071
|
+
*/
|
|
3072
|
+
disableCookieJar?: boolean;
|
|
3073
|
+
/** @deprecated Use `disableCookieJar` instead. Will be removed in next major version. */
|
|
3056
3074
|
enableCookieJar?: boolean;
|
|
3057
3075
|
/**
|
|
3058
3076
|
* Custom cookie jar for managing cookies.
|
package/dist/platform/node.d.ts
CHANGED
|
@@ -1561,7 +1561,14 @@ export interface RezoConfig {
|
|
|
1561
1561
|
/** @description Supported compression algorithms */
|
|
1562
1562
|
algorithms?: string[];
|
|
1563
1563
|
};
|
|
1564
|
-
/**
|
|
1564
|
+
/**
|
|
1565
|
+
* @description Disable cookie jar for session management.
|
|
1566
|
+
* When false (default), cookies are automatically managed.
|
|
1567
|
+
* Set to true to disable automatic cookie handling.
|
|
1568
|
+
* @default false
|
|
1569
|
+
*/
|
|
1570
|
+
disableCookieJar?: boolean;
|
|
1571
|
+
/** @deprecated Use `disableCookieJar` instead */
|
|
1565
1572
|
enableCookieJar?: boolean;
|
|
1566
1573
|
/** @description Send cookies with cross-origin requests (matches Axios withCredentials). Default: false */
|
|
1567
1574
|
withCredentials?: boolean;
|
|
@@ -1672,6 +1679,8 @@ export interface RezoConfig {
|
|
|
1672
1679
|
hooks: Partial<RezoHooks> | null;
|
|
1673
1680
|
/** @description Snapshot of the original request configuration */
|
|
1674
1681
|
originalRequest: RezoRequestConfig;
|
|
1682
|
+
/** @description Original request body, preserved for POST body retention during redirects */
|
|
1683
|
+
originalBody?: RezoRequestConfig["body"];
|
|
1675
1684
|
/** @description Final resolved URL after redirects and processing */
|
|
1676
1685
|
finalUrl: string;
|
|
1677
1686
|
/** @description HTTP adapter used for the request */
|
|
@@ -2702,6 +2711,8 @@ export interface OnRedirectOptions {
|
|
|
2702
2711
|
headers: RezoHeaders;
|
|
2703
2712
|
sameDomain: boolean;
|
|
2704
2713
|
method: string;
|
|
2714
|
+
/** The current request body (RezoFormData, string, object, etc.) - allows user to inspect/modify */
|
|
2715
|
+
body?: any;
|
|
2705
2716
|
}
|
|
2706
2717
|
export type OnRedirectResponse = boolean | ToRedirectOptions | undefined;
|
|
2707
2718
|
export type ToRedirectOptions = {
|
|
@@ -3052,7 +3063,14 @@ export interface RezoDefaultOptions {
|
|
|
3052
3063
|
baseURL?: string;
|
|
3053
3064
|
/** Hooks for request/response lifecycle */
|
|
3054
3065
|
hooks?: Partial<RezoHooks>;
|
|
3055
|
-
/**
|
|
3066
|
+
/**
|
|
3067
|
+
* Whether to disable automatic cookie handling.
|
|
3068
|
+
* When false (default), cookies are automatically managed via the jar.
|
|
3069
|
+
* Set to true to disable automatic cookie management.
|
|
3070
|
+
* @default false
|
|
3071
|
+
*/
|
|
3072
|
+
disableCookieJar?: boolean;
|
|
3073
|
+
/** @deprecated Use `disableCookieJar` instead. Will be removed in next major version. */
|
|
3056
3074
|
enableCookieJar?: boolean;
|
|
3057
3075
|
/**
|
|
3058
3076
|
* Custom cookie jar for managing cookies.
|
|
@@ -1561,7 +1561,14 @@ export interface RezoConfig {
|
|
|
1561
1561
|
/** @description Supported compression algorithms */
|
|
1562
1562
|
algorithms?: string[];
|
|
1563
1563
|
};
|
|
1564
|
-
/**
|
|
1564
|
+
/**
|
|
1565
|
+
* @description Disable cookie jar for session management.
|
|
1566
|
+
* When false (default), cookies are automatically managed.
|
|
1567
|
+
* Set to true to disable automatic cookie handling.
|
|
1568
|
+
* @default false
|
|
1569
|
+
*/
|
|
1570
|
+
disableCookieJar?: boolean;
|
|
1571
|
+
/** @deprecated Use `disableCookieJar` instead */
|
|
1565
1572
|
enableCookieJar?: boolean;
|
|
1566
1573
|
/** @description Send cookies with cross-origin requests (matches Axios withCredentials). Default: false */
|
|
1567
1574
|
withCredentials?: boolean;
|
|
@@ -1672,6 +1679,8 @@ export interface RezoConfig {
|
|
|
1672
1679
|
hooks: Partial<RezoHooks> | null;
|
|
1673
1680
|
/** @description Snapshot of the original request configuration */
|
|
1674
1681
|
originalRequest: RezoRequestConfig;
|
|
1682
|
+
/** @description Original request body, preserved for POST body retention during redirects */
|
|
1683
|
+
originalBody?: RezoRequestConfig["body"];
|
|
1675
1684
|
/** @description Final resolved URL after redirects and processing */
|
|
1676
1685
|
finalUrl: string;
|
|
1677
1686
|
/** @description HTTP adapter used for the request */
|
|
@@ -2702,6 +2711,8 @@ export interface OnRedirectOptions {
|
|
|
2702
2711
|
headers: RezoHeaders;
|
|
2703
2712
|
sameDomain: boolean;
|
|
2704
2713
|
method: string;
|
|
2714
|
+
/** The current request body (RezoFormData, string, object, etc.) - allows user to inspect/modify */
|
|
2715
|
+
body?: any;
|
|
2705
2716
|
}
|
|
2706
2717
|
export type OnRedirectResponse = boolean | ToRedirectOptions | undefined;
|
|
2707
2718
|
export type ToRedirectOptions = {
|
|
@@ -3052,7 +3063,14 @@ export interface RezoDefaultOptions {
|
|
|
3052
3063
|
baseURL?: string;
|
|
3053
3064
|
/** Hooks for request/response lifecycle */
|
|
3054
3065
|
hooks?: Partial<RezoHooks>;
|
|
3055
|
-
/**
|
|
3066
|
+
/**
|
|
3067
|
+
* Whether to disable automatic cookie handling.
|
|
3068
|
+
* When false (default), cookies are automatically managed via the jar.
|
|
3069
|
+
* Set to true to disable automatic cookie management.
|
|
3070
|
+
* @default false
|
|
3071
|
+
*/
|
|
3072
|
+
disableCookieJar?: boolean;
|
|
3073
|
+
/** @deprecated Use `disableCookieJar` instead. Will be removed in next major version. */
|
|
3056
3074
|
enableCookieJar?: boolean;
|
|
3057
3075
|
/**
|
|
3058
3076
|
* Custom cookie jar for managing cookies.
|
|
@@ -1561,7 +1561,14 @@ export interface RezoConfig {
|
|
|
1561
1561
|
/** @description Supported compression algorithms */
|
|
1562
1562
|
algorithms?: string[];
|
|
1563
1563
|
};
|
|
1564
|
-
/**
|
|
1564
|
+
/**
|
|
1565
|
+
* @description Disable cookie jar for session management.
|
|
1566
|
+
* When false (default), cookies are automatically managed.
|
|
1567
|
+
* Set to true to disable automatic cookie handling.
|
|
1568
|
+
* @default false
|
|
1569
|
+
*/
|
|
1570
|
+
disableCookieJar?: boolean;
|
|
1571
|
+
/** @deprecated Use `disableCookieJar` instead */
|
|
1565
1572
|
enableCookieJar?: boolean;
|
|
1566
1573
|
/** @description Send cookies with cross-origin requests (matches Axios withCredentials). Default: false */
|
|
1567
1574
|
withCredentials?: boolean;
|
|
@@ -1672,6 +1679,8 @@ export interface RezoConfig {
|
|
|
1672
1679
|
hooks: Partial<RezoHooks> | null;
|
|
1673
1680
|
/** @description Snapshot of the original request configuration */
|
|
1674
1681
|
originalRequest: RezoRequestConfig;
|
|
1682
|
+
/** @description Original request body, preserved for POST body retention during redirects */
|
|
1683
|
+
originalBody?: RezoRequestConfig["body"];
|
|
1675
1684
|
/** @description Final resolved URL after redirects and processing */
|
|
1676
1685
|
finalUrl: string;
|
|
1677
1686
|
/** @description HTTP adapter used for the request */
|
|
@@ -2702,6 +2711,8 @@ export interface OnRedirectOptions {
|
|
|
2702
2711
|
headers: RezoHeaders;
|
|
2703
2712
|
sameDomain: boolean;
|
|
2704
2713
|
method: string;
|
|
2714
|
+
/** The current request body (RezoFormData, string, object, etc.) - allows user to inspect/modify */
|
|
2715
|
+
body?: any;
|
|
2705
2716
|
}
|
|
2706
2717
|
export type OnRedirectResponse = boolean | ToRedirectOptions | undefined;
|
|
2707
2718
|
export type ToRedirectOptions = {
|
|
@@ -3052,7 +3063,14 @@ export interface RezoDefaultOptions {
|
|
|
3052
3063
|
baseURL?: string;
|
|
3053
3064
|
/** Hooks for request/response lifecycle */
|
|
3054
3065
|
hooks?: Partial<RezoHooks>;
|
|
3055
|
-
/**
|
|
3066
|
+
/**
|
|
3067
|
+
* Whether to disable automatic cookie handling.
|
|
3068
|
+
* When false (default), cookies are automatically managed via the jar.
|
|
3069
|
+
* Set to true to disable automatic cookie management.
|
|
3070
|
+
* @default false
|
|
3071
|
+
*/
|
|
3072
|
+
disableCookieJar?: boolean;
|
|
3073
|
+
/** @deprecated Use `disableCookieJar` instead. Will be removed in next major version. */
|
|
3056
3074
|
enableCookieJar?: boolean;
|
|
3057
3075
|
/**
|
|
3058
3076
|
* Custom cookie jar for managing cookies.
|
package/dist/plugin/index.cjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
5
|
-
const
|
|
6
|
-
exports.FileCacher =
|
|
7
|
-
const
|
|
8
|
-
exports.UrlStore =
|
|
9
|
-
const
|
|
10
|
-
exports.Oxylabs =
|
|
11
|
-
const
|
|
12
|
-
exports.OXYLABS_BROWSER_TYPES =
|
|
13
|
-
exports.OXYLABS_COMMON_LOCALES =
|
|
14
|
-
exports.OXYLABS_COMMON_GEO_LOCATIONS =
|
|
15
|
-
exports.OXYLABS_US_STATES =
|
|
16
|
-
exports.OXYLABS_EUROPEAN_COUNTRIES =
|
|
17
|
-
exports.OXYLABS_ASIAN_COUNTRIES =
|
|
18
|
-
exports.getRandomOxylabsBrowserType =
|
|
19
|
-
exports.getRandomOxylabsLocale =
|
|
20
|
-
exports.getRandomOxylabsGeoLocation =
|
|
21
|
-
const
|
|
22
|
-
exports.Decodo =
|
|
23
|
-
const
|
|
24
|
-
exports.DECODO_DEVICE_TYPES =
|
|
25
|
-
exports.DECODO_HEADLESS_MODES =
|
|
26
|
-
exports.DECODO_COMMON_LOCALES =
|
|
27
|
-
exports.DECODO_COMMON_COUNTRIES =
|
|
28
|
-
exports.DECODO_EUROPEAN_COUNTRIES =
|
|
29
|
-
exports.DECODO_ASIAN_COUNTRIES =
|
|
30
|
-
exports.DECODO_US_STATES =
|
|
31
|
-
exports.DECODO_COMMON_CITIES =
|
|
32
|
-
exports.getRandomDecodoDeviceType =
|
|
33
|
-
exports.getRandomDecodoLocale =
|
|
34
|
-
exports.getRandomDecodoCountry =
|
|
35
|
-
exports.getRandomDecodoCity =
|
|
36
|
-
exports.generateDecodoSessionId =
|
|
1
|
+
const _mod_9lvpbi = require('./crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_9lvpbi.Crawler;;
|
|
3
|
+
const _mod_azmk6o = require('./crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_azmk6o.CrawlerOptions;;
|
|
5
|
+
const _mod_bpq7v8 = require('../cache/file-cacher.cjs');
|
|
6
|
+
exports.FileCacher = _mod_bpq7v8.FileCacher;;
|
|
7
|
+
const _mod_icima3 = require('../cache/url-store.cjs');
|
|
8
|
+
exports.UrlStore = _mod_icima3.UrlStore;;
|
|
9
|
+
const _mod_aj7atj = require('./addon/oxylabs/index.cjs');
|
|
10
|
+
exports.Oxylabs = _mod_aj7atj.Oxylabs;;
|
|
11
|
+
const _mod_uvrxq0 = require('./addon/oxylabs/options.cjs');
|
|
12
|
+
exports.OXYLABS_BROWSER_TYPES = _mod_uvrxq0.OXYLABS_BROWSER_TYPES;
|
|
13
|
+
exports.OXYLABS_COMMON_LOCALES = _mod_uvrxq0.OXYLABS_COMMON_LOCALES;
|
|
14
|
+
exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_uvrxq0.OXYLABS_COMMON_GEO_LOCATIONS;
|
|
15
|
+
exports.OXYLABS_US_STATES = _mod_uvrxq0.OXYLABS_US_STATES;
|
|
16
|
+
exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_uvrxq0.OXYLABS_EUROPEAN_COUNTRIES;
|
|
17
|
+
exports.OXYLABS_ASIAN_COUNTRIES = _mod_uvrxq0.OXYLABS_ASIAN_COUNTRIES;
|
|
18
|
+
exports.getRandomOxylabsBrowserType = _mod_uvrxq0.getRandomBrowserType;
|
|
19
|
+
exports.getRandomOxylabsLocale = _mod_uvrxq0.getRandomLocale;
|
|
20
|
+
exports.getRandomOxylabsGeoLocation = _mod_uvrxq0.getRandomGeoLocation;;
|
|
21
|
+
const _mod_xll40f = require('./addon/decodo/index.cjs');
|
|
22
|
+
exports.Decodo = _mod_xll40f.Decodo;;
|
|
23
|
+
const _mod_1dmbbz = require('./addon/decodo/options.cjs');
|
|
24
|
+
exports.DECODO_DEVICE_TYPES = _mod_1dmbbz.DECODO_DEVICE_TYPES;
|
|
25
|
+
exports.DECODO_HEADLESS_MODES = _mod_1dmbbz.DECODO_HEADLESS_MODES;
|
|
26
|
+
exports.DECODO_COMMON_LOCALES = _mod_1dmbbz.DECODO_COMMON_LOCALES;
|
|
27
|
+
exports.DECODO_COMMON_COUNTRIES = _mod_1dmbbz.DECODO_COMMON_COUNTRIES;
|
|
28
|
+
exports.DECODO_EUROPEAN_COUNTRIES = _mod_1dmbbz.DECODO_EUROPEAN_COUNTRIES;
|
|
29
|
+
exports.DECODO_ASIAN_COUNTRIES = _mod_1dmbbz.DECODO_ASIAN_COUNTRIES;
|
|
30
|
+
exports.DECODO_US_STATES = _mod_1dmbbz.DECODO_US_STATES;
|
|
31
|
+
exports.DECODO_COMMON_CITIES = _mod_1dmbbz.DECODO_COMMON_CITIES;
|
|
32
|
+
exports.getRandomDecodoDeviceType = _mod_1dmbbz.getRandomDeviceType;
|
|
33
|
+
exports.getRandomDecodoLocale = _mod_1dmbbz.getRandomLocale;
|
|
34
|
+
exports.getRandomDecodoCountry = _mod_1dmbbz.getRandomCountry;
|
|
35
|
+
exports.getRandomDecodoCity = _mod_1dmbbz.getRandomCity;
|
|
36
|
+
exports.generateDecodoSessionId = _mod_1dmbbz.generateSessionId;;
|
package/dist/proxy/index.cjs
CHANGED
|
@@ -2,10 +2,10 @@ const { SocksProxyAgent: RezoSocksProxy } = require("socks-proxy-agent");
|
|
|
2
2
|
const { HttpsProxyAgent: RezoHttpsSocks } = require("https-proxy-agent");
|
|
3
3
|
const { HttpProxyAgent: RezoHttpSocks } = require("http-proxy-agent");
|
|
4
4
|
const { parseProxyString } = require('./parse.cjs');
|
|
5
|
-
const
|
|
6
|
-
exports.ProxyManager =
|
|
7
|
-
const
|
|
8
|
-
exports.parseProxyString =
|
|
5
|
+
const _mod_11e7eb = require('./manager.cjs');
|
|
6
|
+
exports.ProxyManager = _mod_11e7eb.ProxyManager;;
|
|
7
|
+
const _mod_3hcd63 = require('./parse.cjs');
|
|
8
|
+
exports.parseProxyString = _mod_3hcd63.parseProxyString;;
|
|
9
9
|
function createOptions(uri, opts) {
|
|
10
10
|
if (uri instanceof URL || typeof uri === "string") {
|
|
11
11
|
return {
|
package/dist/queue/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.RezoQueue =
|
|
3
|
-
const
|
|
4
|
-
exports.HttpQueue =
|
|
5
|
-
exports.extractDomain =
|
|
6
|
-
const
|
|
7
|
-
exports.Priority =
|
|
8
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_r4j54k = require('./queue.cjs');
|
|
2
|
+
exports.RezoQueue = _mod_r4j54k.RezoQueue;;
|
|
3
|
+
const _mod_q6btxk = require('./http-queue.cjs');
|
|
4
|
+
exports.HttpQueue = _mod_q6btxk.HttpQueue;
|
|
5
|
+
exports.extractDomain = _mod_q6btxk.extractDomain;;
|
|
6
|
+
const _mod_jw3ukg = require('./types.cjs');
|
|
7
|
+
exports.Priority = _mod_jw3ukg.Priority;
|
|
8
|
+
exports.HttpMethodPriority = _mod_jw3ukg.HttpMethodPriority;;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.UniversalEventEmitter =
|
|
3
|
-
const
|
|
4
|
-
exports.UniversalStreamResponse =
|
|
5
|
-
exports.StreamResponse =
|
|
6
|
-
const
|
|
7
|
-
exports.UniversalDownloadResponse =
|
|
8
|
-
exports.DownloadResponse =
|
|
9
|
-
const
|
|
10
|
-
exports.UniversalUploadResponse =
|
|
11
|
-
exports.UploadResponse =
|
|
1
|
+
const _mod_xayj2h = require('./event-emitter.cjs');
|
|
2
|
+
exports.UniversalEventEmitter = _mod_xayj2h.UniversalEventEmitter;;
|
|
3
|
+
const _mod_x2topy = require('./stream.cjs');
|
|
4
|
+
exports.UniversalStreamResponse = _mod_x2topy.UniversalStreamResponse;
|
|
5
|
+
exports.StreamResponse = _mod_x2topy.StreamResponse;;
|
|
6
|
+
const _mod_kxypc7 = require('./download.cjs');
|
|
7
|
+
exports.UniversalDownloadResponse = _mod_kxypc7.UniversalDownloadResponse;
|
|
8
|
+
exports.DownloadResponse = _mod_kxypc7.DownloadResponse;;
|
|
9
|
+
const _mod_7guhvn = require('./upload.cjs');
|
|
10
|
+
exports.UniversalUploadResponse = _mod_7guhvn.UniversalUploadResponse;
|
|
11
|
+
exports.UploadResponse = _mod_7guhvn.UploadResponse;;
|