rezo 1.0.36 → 1.0.37
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 +204 -35
- package/dist/adapters/http.js +204 -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_7mlnwk = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_7mlnwk.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_7mlnwk.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_7mlnwk.createDefaultInstance;;
|
|
5
|
+
const _mod_dpezn2 = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_dpezn2.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_dpezn2.RezoErrorCode;;
|
|
8
|
+
const _mod_cx8q1t = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_cx8q1t.RezoHeaders;;
|
|
10
|
+
const _mod_zcjprx = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_zcjprx.RezoFormData;;
|
|
12
|
+
const _mod_ldhf9q = require('./utils/cookies.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_ldhf9q.RezoCookieJar;
|
|
14
|
+
exports.Cookie = _mod_ldhf9q.Cookie;;
|
|
15
|
+
const _mod_tv2jg3 = require('./core/hooks.cjs');
|
|
16
|
+
exports.createDefaultHooks = _mod_tv2jg3.createDefaultHooks;
|
|
17
|
+
exports.mergeHooks = _mod_tv2jg3.mergeHooks;;
|
|
18
|
+
const _mod_46xpko = require('./proxy/manager.cjs');
|
|
19
|
+
exports.ProxyManager = _mod_46xpko.ProxyManager;;
|
|
20
|
+
const _mod_mdz88c = require('./queue/index.cjs');
|
|
21
|
+
exports.RezoQueue = _mod_mdz88c.RezoQueue;
|
|
22
|
+
exports.HttpQueue = _mod_mdz88c.HttpQueue;
|
|
23
|
+
exports.Priority = _mod_mdz88c.Priority;
|
|
24
|
+
exports.HttpMethodPriority = _mod_mdz88c.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_82a2rb = require('./crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_82a2rb.Crawler;;
|
|
3
|
+
const _mod_3qq2q5 = require('./crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_3qq2q5.CrawlerOptions;;
|
|
5
|
+
const _mod_4j8yxb = require('../cache/file-cacher.cjs');
|
|
6
|
+
exports.FileCacher = _mod_4j8yxb.FileCacher;;
|
|
7
|
+
const _mod_zz95gk = require('../cache/url-store.cjs');
|
|
8
|
+
exports.UrlStore = _mod_zz95gk.UrlStore;;
|
|
9
|
+
const _mod_d926nc = require('./addon/oxylabs/index.cjs');
|
|
10
|
+
exports.Oxylabs = _mod_d926nc.Oxylabs;;
|
|
11
|
+
const _mod_43m3h2 = require('./addon/oxylabs/options.cjs');
|
|
12
|
+
exports.OXYLABS_BROWSER_TYPES = _mod_43m3h2.OXYLABS_BROWSER_TYPES;
|
|
13
|
+
exports.OXYLABS_COMMON_LOCALES = _mod_43m3h2.OXYLABS_COMMON_LOCALES;
|
|
14
|
+
exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_43m3h2.OXYLABS_COMMON_GEO_LOCATIONS;
|
|
15
|
+
exports.OXYLABS_US_STATES = _mod_43m3h2.OXYLABS_US_STATES;
|
|
16
|
+
exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_43m3h2.OXYLABS_EUROPEAN_COUNTRIES;
|
|
17
|
+
exports.OXYLABS_ASIAN_COUNTRIES = _mod_43m3h2.OXYLABS_ASIAN_COUNTRIES;
|
|
18
|
+
exports.getRandomOxylabsBrowserType = _mod_43m3h2.getRandomBrowserType;
|
|
19
|
+
exports.getRandomOxylabsLocale = _mod_43m3h2.getRandomLocale;
|
|
20
|
+
exports.getRandomOxylabsGeoLocation = _mod_43m3h2.getRandomGeoLocation;;
|
|
21
|
+
const _mod_0wt6of = require('./addon/decodo/index.cjs');
|
|
22
|
+
exports.Decodo = _mod_0wt6of.Decodo;;
|
|
23
|
+
const _mod_dvwehx = require('./addon/decodo/options.cjs');
|
|
24
|
+
exports.DECODO_DEVICE_TYPES = _mod_dvwehx.DECODO_DEVICE_TYPES;
|
|
25
|
+
exports.DECODO_HEADLESS_MODES = _mod_dvwehx.DECODO_HEADLESS_MODES;
|
|
26
|
+
exports.DECODO_COMMON_LOCALES = _mod_dvwehx.DECODO_COMMON_LOCALES;
|
|
27
|
+
exports.DECODO_COMMON_COUNTRIES = _mod_dvwehx.DECODO_COMMON_COUNTRIES;
|
|
28
|
+
exports.DECODO_EUROPEAN_COUNTRIES = _mod_dvwehx.DECODO_EUROPEAN_COUNTRIES;
|
|
29
|
+
exports.DECODO_ASIAN_COUNTRIES = _mod_dvwehx.DECODO_ASIAN_COUNTRIES;
|
|
30
|
+
exports.DECODO_US_STATES = _mod_dvwehx.DECODO_US_STATES;
|
|
31
|
+
exports.DECODO_COMMON_CITIES = _mod_dvwehx.DECODO_COMMON_CITIES;
|
|
32
|
+
exports.getRandomDecodoDeviceType = _mod_dvwehx.getRandomDeviceType;
|
|
33
|
+
exports.getRandomDecodoLocale = _mod_dvwehx.getRandomLocale;
|
|
34
|
+
exports.getRandomDecodoCountry = _mod_dvwehx.getRandomCountry;
|
|
35
|
+
exports.getRandomDecodoCity = _mod_dvwehx.getRandomCity;
|
|
36
|
+
exports.generateDecodoSessionId = _mod_dvwehx.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_mfb6oo = require('./manager.cjs');
|
|
6
|
+
exports.ProxyManager = _mod_mfb6oo.ProxyManager;;
|
|
7
|
+
const _mod_msp7ha = require('./parse.cjs');
|
|
8
|
+
exports.parseProxyString = _mod_msp7ha.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_hl4yb7 = require('./queue.cjs');
|
|
2
|
+
exports.RezoQueue = _mod_hl4yb7.RezoQueue;;
|
|
3
|
+
const _mod_asidmy = require('./http-queue.cjs');
|
|
4
|
+
exports.HttpQueue = _mod_asidmy.HttpQueue;
|
|
5
|
+
exports.extractDomain = _mod_asidmy.extractDomain;;
|
|
6
|
+
const _mod_l187x4 = require('./types.cjs');
|
|
7
|
+
exports.Priority = _mod_l187x4.Priority;
|
|
8
|
+
exports.HttpMethodPriority = _mod_l187x4.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_54ovg5 = require('./event-emitter.cjs');
|
|
2
|
+
exports.UniversalEventEmitter = _mod_54ovg5.UniversalEventEmitter;;
|
|
3
|
+
const _mod_o1khjx = require('./stream.cjs');
|
|
4
|
+
exports.UniversalStreamResponse = _mod_o1khjx.UniversalStreamResponse;
|
|
5
|
+
exports.StreamResponse = _mod_o1khjx.StreamResponse;;
|
|
6
|
+
const _mod_4dhbe0 = require('./download.cjs');
|
|
7
|
+
exports.UniversalDownloadResponse = _mod_4dhbe0.UniversalDownloadResponse;
|
|
8
|
+
exports.DownloadResponse = _mod_4dhbe0.DownloadResponse;;
|
|
9
|
+
const _mod_bycysi = require('./upload.cjs');
|
|
10
|
+
exports.UniversalUploadResponse = _mod_bycysi.UniversalUploadResponse;
|
|
11
|
+
exports.UploadResponse = _mod_bycysi.UploadResponse;;
|