rezo 1.0.21 → 1.0.22
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/entries/curl.d.ts +9 -0
- package/dist/adapters/entries/fetch.d.ts +9 -0
- package/dist/adapters/entries/http.d.ts +9 -0
- package/dist/adapters/entries/http2.d.ts +9 -0
- package/dist/adapters/entries/react-native.d.ts +9 -0
- package/dist/adapters/entries/xhr.d.ts +9 -0
- package/dist/adapters/fetch.cjs +2 -1
- package/dist/adapters/fetch.js +2 -1
- package/dist/adapters/http.cjs +2 -1
- package/dist/adapters/http.js +2 -1
- package/dist/adapters/http2.cjs +2 -1
- package/dist/adapters/http2.js +2 -1
- package/dist/adapters/index.cjs +6 -6
- package/dist/cache/index.cjs +13 -13
- package/dist/crawler.d.ts +9 -0
- package/dist/entries/crawler.cjs +5 -5
- package/dist/errors/rezo-error.cjs +2 -2
- package/dist/errors/rezo-error.js +2 -2
- package/dist/index.cjs +24 -24
- package/dist/index.d.ts +9 -0
- package/dist/platform/browser.d.ts +9 -0
- package/dist/platform/bun.d.ts +9 -0
- package/dist/platform/deno.d.ts +9 -0
- package/dist/platform/node.d.ts +9 -0
- package/dist/platform/react-native.d.ts +9 -0
- package/dist/platform/worker.d.ts +9 -0
- package/dist/plugin/index.cjs +36 -36
- package/dist/proxy/index.cjs +2 -2
- package/dist/queue/index.cjs +8 -8
- package/dist/utils/http-config.cjs +3 -0
- package/dist/utils/http-config.js +3 -0
- package/package.json +1 -1
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
package/dist/adapters/fetch.cjs
CHANGED
|
@@ -435,7 +435,8 @@ async function executeFetchRequest(fetchOptions, config, options, perform, strea
|
|
|
435
435
|
visitedUrls.add(normalizedRedirectUrl);
|
|
436
436
|
}
|
|
437
437
|
const redirectCode = response.status;
|
|
438
|
-
const
|
|
438
|
+
const redirectCallback = config.beforeRedirect || config.onRedirect;
|
|
439
|
+
const onRedirect = redirectCallback ? redirectCallback({
|
|
439
440
|
url: new URL(location),
|
|
440
441
|
status: response.status,
|
|
441
442
|
headers: response.headers,
|
package/dist/adapters/fetch.js
CHANGED
|
@@ -435,7 +435,8 @@ async function executeFetchRequest(fetchOptions, config, options, perform, strea
|
|
|
435
435
|
visitedUrls.add(normalizedRedirectUrl);
|
|
436
436
|
}
|
|
437
437
|
const redirectCode = response.status;
|
|
438
|
-
const
|
|
438
|
+
const redirectCallback = config.beforeRedirect || config.onRedirect;
|
|
439
|
+
const onRedirect = redirectCallback ? redirectCallback({
|
|
439
440
|
url: new URL(location),
|
|
440
441
|
status: response.status,
|
|
441
442
|
headers: response.headers,
|
package/dist/adapters/http.cjs
CHANGED
|
@@ -427,7 +427,8 @@ async function executeHttp1Request(fetchOptions, config, options, perform, fs, s
|
|
|
427
427
|
}
|
|
428
428
|
const redirectCode = response.status;
|
|
429
429
|
const customHeaders = undefined;
|
|
430
|
-
const
|
|
430
|
+
const redirectCallback = config.beforeRedirect || config.onRedirect;
|
|
431
|
+
const onRedirect = redirectCallback ? redirectCallback({
|
|
431
432
|
url: new URL(_stats.redirectUrl),
|
|
432
433
|
status: response.status,
|
|
433
434
|
headers: response.headers,
|
package/dist/adapters/http.js
CHANGED
|
@@ -427,7 +427,8 @@ async function executeHttp1Request(fetchOptions, config, options, perform, fs, s
|
|
|
427
427
|
}
|
|
428
428
|
const redirectCode = response.status;
|
|
429
429
|
const customHeaders = undefined;
|
|
430
|
-
const
|
|
430
|
+
const redirectCallback = config.beforeRedirect || config.onRedirect;
|
|
431
|
+
const onRedirect = redirectCallback ? redirectCallback({
|
|
431
432
|
url: new URL(_stats.redirectUrl),
|
|
432
433
|
status: response.status,
|
|
433
434
|
headers: response.headers,
|
package/dist/adapters/http2.cjs
CHANGED
|
@@ -626,7 +626,8 @@ async function executeHttp2Request(fetchOptions, config, options, perform, fs, s
|
|
|
626
626
|
visitedUrls.add(normalizedRedirectUrl);
|
|
627
627
|
}
|
|
628
628
|
const redirectCode = response.status;
|
|
629
|
-
const
|
|
629
|
+
const redirectCallback = config.beforeRedirect || config.onRedirect;
|
|
630
|
+
const onRedirect = redirectCallback ? redirectCallback({
|
|
630
631
|
url: new URL(location),
|
|
631
632
|
status: response.status,
|
|
632
633
|
headers: response.headers,
|
package/dist/adapters/http2.js
CHANGED
|
@@ -626,7 +626,8 @@ async function executeHttp2Request(fetchOptions, config, options, perform, fs, s
|
|
|
626
626
|
visitedUrls.add(normalizedRedirectUrl);
|
|
627
627
|
}
|
|
628
628
|
const redirectCode = response.status;
|
|
629
|
-
const
|
|
629
|
+
const redirectCallback = config.beforeRedirect || config.onRedirect;
|
|
630
|
+
const onRedirect = redirectCallback ? redirectCallback({
|
|
630
631
|
url: new URL(location),
|
|
631
632
|
status: response.status,
|
|
632
633
|
headers: response.headers,
|
package/dist/adapters/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.detectRuntime =
|
|
3
|
-
exports.getAdapterCapabilities =
|
|
4
|
-
exports.buildAdapterContext =
|
|
5
|
-
exports.getAvailableAdapters =
|
|
6
|
-
exports.selectAdapter =
|
|
1
|
+
const _mod_bvuup4 = require('./picker.cjs');
|
|
2
|
+
exports.detectRuntime = _mod_bvuup4.detectRuntime;
|
|
3
|
+
exports.getAdapterCapabilities = _mod_bvuup4.getAdapterCapabilities;
|
|
4
|
+
exports.buildAdapterContext = _mod_bvuup4.buildAdapterContext;
|
|
5
|
+
exports.getAvailableAdapters = _mod_bvuup4.getAvailableAdapters;
|
|
6
|
+
exports.selectAdapter = _mod_bvuup4.selectAdapter;;
|
package/dist/cache/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.LRUCache =
|
|
3
|
-
const
|
|
4
|
-
exports.DNSCache =
|
|
5
|
-
exports.getGlobalDNSCache =
|
|
6
|
-
exports.resetGlobalDNSCache =
|
|
7
|
-
const
|
|
8
|
-
exports.ResponseCache =
|
|
9
|
-
exports.normalizeResponseCacheConfig =
|
|
10
|
-
const
|
|
11
|
-
exports.FileCacher =
|
|
12
|
-
const
|
|
13
|
-
exports.UrlStore =
|
|
1
|
+
const _mod_sqwaw0 = require('./lru-cache.cjs');
|
|
2
|
+
exports.LRUCache = _mod_sqwaw0.LRUCache;;
|
|
3
|
+
const _mod_wv7mbf = require('./dns-cache.cjs');
|
|
4
|
+
exports.DNSCache = _mod_wv7mbf.DNSCache;
|
|
5
|
+
exports.getGlobalDNSCache = _mod_wv7mbf.getGlobalDNSCache;
|
|
6
|
+
exports.resetGlobalDNSCache = _mod_wv7mbf.resetGlobalDNSCache;;
|
|
7
|
+
const _mod_v9gfkh = require('./response-cache.cjs');
|
|
8
|
+
exports.ResponseCache = _mod_v9gfkh.ResponseCache;
|
|
9
|
+
exports.normalizeResponseCacheConfig = _mod_v9gfkh.normalizeResponseCacheConfig;;
|
|
10
|
+
const _mod_17mnwt = require('./file-cacher.cjs');
|
|
11
|
+
exports.FileCacher = _mod_17mnwt.FileCacher;;
|
|
12
|
+
const _mod_qtim1g = require('./url-store.cjs');
|
|
13
|
+
exports.UrlStore = _mod_qtim1g.UrlStore;;
|
package/dist/crawler.d.ts
CHANGED
|
@@ -2148,6 +2148,8 @@ export interface RezoConfig {
|
|
|
2148
2148
|
* ```
|
|
2149
2149
|
*/
|
|
2150
2150
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
2151
|
+
/** Alias for beforeRedirect */
|
|
2152
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
2151
2153
|
/** Character encoding for request body and response data */
|
|
2152
2154
|
encoding?: BufferEncoding;
|
|
2153
2155
|
/**
|
|
@@ -2802,6 +2804,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2802
2804
|
* ```
|
|
2803
2805
|
*/
|
|
2804
2806
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2807
|
+
/**
|
|
2808
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2809
|
+
* @see beforeRedirect
|
|
2810
|
+
*/
|
|
2811
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2805
2812
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2806
2813
|
withCredentials?: boolean;
|
|
2807
2814
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3351,6 +3358,8 @@ export interface RezoDefaultOptions {
|
|
|
3351
3358
|
* ```
|
|
3352
3359
|
*/
|
|
3353
3360
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3361
|
+
/** Alias for beforeRedirect */
|
|
3362
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3354
3363
|
/** Array of functions to transform request data */
|
|
3355
3364
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3356
3365
|
/** Array of functions to transform response data */
|
package/dist/entries/crawler.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
5
|
-
exports.Domain =
|
|
1
|
+
const _mod_svsktw = require('../plugin/crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_svsktw.Crawler;;
|
|
3
|
+
const _mod_hcjbxq = require('../plugin/crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_hcjbxq.CrawlerOptions;
|
|
5
|
+
exports.Domain = _mod_hcjbxq.Domain;;
|
|
@@ -585,8 +585,8 @@ class RezoError extends Error {
|
|
|
585
585
|
Object.defineProperty(this, "suggestion", { value: "Check the error for more information.", enumerable: false });
|
|
586
586
|
}
|
|
587
587
|
if (response) {
|
|
588
|
-
Object.defineProperty(this, "status", { value: response.status, enumerable: false });
|
|
589
|
-
Object.defineProperty(this, "statusText", { value: response.statusText, enumerable: false });
|
|
588
|
+
Object.defineProperty(this, "status", { value: response.status, enumerable: false, configurable: true });
|
|
589
|
+
Object.defineProperty(this, "statusText", { value: response.statusText, enumerable: false, configurable: true });
|
|
590
590
|
}
|
|
591
591
|
this.name = this.constructor.name;
|
|
592
592
|
Object.setPrototypeOf(this, RezoError.prototype);
|
|
@@ -585,8 +585,8 @@ export class RezoError extends Error {
|
|
|
585
585
|
Object.defineProperty(this, "suggestion", { value: "Check the error for more information.", enumerable: false });
|
|
586
586
|
}
|
|
587
587
|
if (response) {
|
|
588
|
-
Object.defineProperty(this, "status", { value: response.status, enumerable: false });
|
|
589
|
-
Object.defineProperty(this, "statusText", { value: response.statusText, enumerable: false });
|
|
588
|
+
Object.defineProperty(this, "status", { value: response.status, enumerable: false, configurable: true });
|
|
589
|
+
Object.defineProperty(this, "statusText", { value: response.statusText, enumerable: false, configurable: true });
|
|
590
590
|
}
|
|
591
591
|
this.name = this.constructor.name;
|
|
592
592
|
Object.setPrototypeOf(this, RezoError.prototype);
|
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_hre6ec = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_hre6ec.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_hre6ec.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_hre6ec.createDefaultInstance;;
|
|
5
|
+
const _mod_wwq78e = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_wwq78e.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_wwq78e.RezoErrorCode;;
|
|
8
|
+
const _mod_5wpolq = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_5wpolq.RezoHeaders;;
|
|
10
|
+
const _mod_yody95 = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_yody95.RezoFormData;;
|
|
12
|
+
const _mod_f843yl = require('./utils/cookies.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_f843yl.RezoCookieJar;
|
|
14
|
+
exports.Cookie = _mod_f843yl.Cookie;;
|
|
15
|
+
const _mod_8zpp5z = require('./core/hooks.cjs');
|
|
16
|
+
exports.createDefaultHooks = _mod_8zpp5z.createDefaultHooks;
|
|
17
|
+
exports.mergeHooks = _mod_8zpp5z.mergeHooks;;
|
|
18
|
+
const _mod_60gu5s = require('./proxy/manager.cjs');
|
|
19
|
+
exports.ProxyManager = _mod_60gu5s.ProxyManager;;
|
|
20
|
+
const _mod_zuny9f = require('./queue/index.cjs');
|
|
21
|
+
exports.RezoQueue = _mod_zuny9f.RezoQueue;
|
|
22
|
+
exports.HttpQueue = _mod_zuny9f.HttpQueue;
|
|
23
|
+
exports.Priority = _mod_zuny9f.Priority;
|
|
24
|
+
exports.HttpMethodPriority = _mod_zuny9f.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
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2810,6 +2812,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2810
2812
|
* ```
|
|
2811
2813
|
*/
|
|
2812
2814
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2815
|
+
/**
|
|
2816
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2817
|
+
* @see beforeRedirect
|
|
2818
|
+
*/
|
|
2819
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2813
2820
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2814
2821
|
withCredentials?: boolean;
|
|
2815
2822
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3378,6 +3385,8 @@ export interface RezoDefaultOptions {
|
|
|
3378
3385
|
* ```
|
|
3379
3386
|
*/
|
|
3380
3387
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3388
|
+
/** Alias for beforeRedirect */
|
|
3389
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3381
3390
|
/** Array of functions to transform request data */
|
|
3382
3391
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3383
3392
|
/** Array of functions to transform response data */
|
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
package/dist/platform/bun.d.ts
CHANGED
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
package/dist/platform/deno.d.ts
CHANGED
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
package/dist/platform/node.d.ts
CHANGED
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
|
@@ -1934,6 +1934,8 @@ export interface RezoConfig {
|
|
|
1934
1934
|
* ```
|
|
1935
1935
|
*/
|
|
1936
1936
|
beforeRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
|
+
/** Alias for beforeRedirect */
|
|
1938
|
+
onRedirect?: RezoRequestConfig["beforeRedirect"];
|
|
1937
1939
|
/** Character encoding for request body and response data */
|
|
1938
1940
|
encoding?: BufferEncoding;
|
|
1939
1941
|
/**
|
|
@@ -2684,6 +2686,11 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2684
2686
|
* ```
|
|
2685
2687
|
*/
|
|
2686
2688
|
beforeRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2689
|
+
/**
|
|
2690
|
+
* Alias for beforeRedirect - callback invoked when a redirect response is received.
|
|
2691
|
+
* @see beforeRedirect
|
|
2692
|
+
*/
|
|
2693
|
+
onRedirect?: (options: OnRedirectOptions) => OnRedirectResponse;
|
|
2687
2694
|
/** Whether to send cookies and authorization headers with cross-origin requests */
|
|
2688
2695
|
withCredentials?: boolean;
|
|
2689
2696
|
/** Proxy configuration (URL string or detailed options) */
|
|
@@ -3233,6 +3240,8 @@ export interface RezoDefaultOptions {
|
|
|
3233
3240
|
* ```
|
|
3234
3241
|
*/
|
|
3235
3242
|
beforeRedirect?: RezoHttpRequest["beforeRedirect"];
|
|
3243
|
+
/** Alias for beforeRedirect */
|
|
3244
|
+
onRedirect?: RezoHttpRequest["onRedirect"];
|
|
3236
3245
|
/** Array of functions to transform request data */
|
|
3237
3246
|
transformRequest?: RezoHttpRequest["transformRequest"];
|
|
3238
3247
|
/** Array of functions to transform response data */
|
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_yuwab2 = require('./crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_yuwab2.Crawler;;
|
|
3
|
+
const _mod_ke9y75 = require('./crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_ke9y75.CrawlerOptions;;
|
|
5
|
+
const _mod_rmkqk2 = require('../cache/file-cacher.cjs');
|
|
6
|
+
exports.FileCacher = _mod_rmkqk2.FileCacher;;
|
|
7
|
+
const _mod_qvrjfw = require('../cache/url-store.cjs');
|
|
8
|
+
exports.UrlStore = _mod_qvrjfw.UrlStore;;
|
|
9
|
+
const _mod_6wo293 = require('./addon/oxylabs/index.cjs');
|
|
10
|
+
exports.Oxylabs = _mod_6wo293.Oxylabs;;
|
|
11
|
+
const _mod_5jzs00 = require('./addon/oxylabs/options.cjs');
|
|
12
|
+
exports.OXYLABS_BROWSER_TYPES = _mod_5jzs00.OXYLABS_BROWSER_TYPES;
|
|
13
|
+
exports.OXYLABS_COMMON_LOCALES = _mod_5jzs00.OXYLABS_COMMON_LOCALES;
|
|
14
|
+
exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_5jzs00.OXYLABS_COMMON_GEO_LOCATIONS;
|
|
15
|
+
exports.OXYLABS_US_STATES = _mod_5jzs00.OXYLABS_US_STATES;
|
|
16
|
+
exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_5jzs00.OXYLABS_EUROPEAN_COUNTRIES;
|
|
17
|
+
exports.OXYLABS_ASIAN_COUNTRIES = _mod_5jzs00.OXYLABS_ASIAN_COUNTRIES;
|
|
18
|
+
exports.getRandomOxylabsBrowserType = _mod_5jzs00.getRandomBrowserType;
|
|
19
|
+
exports.getRandomOxylabsLocale = _mod_5jzs00.getRandomLocale;
|
|
20
|
+
exports.getRandomOxylabsGeoLocation = _mod_5jzs00.getRandomGeoLocation;;
|
|
21
|
+
const _mod_xzulah = require('./addon/decodo/index.cjs');
|
|
22
|
+
exports.Decodo = _mod_xzulah.Decodo;;
|
|
23
|
+
const _mod_96s3w3 = require('./addon/decodo/options.cjs');
|
|
24
|
+
exports.DECODO_DEVICE_TYPES = _mod_96s3w3.DECODO_DEVICE_TYPES;
|
|
25
|
+
exports.DECODO_HEADLESS_MODES = _mod_96s3w3.DECODO_HEADLESS_MODES;
|
|
26
|
+
exports.DECODO_COMMON_LOCALES = _mod_96s3w3.DECODO_COMMON_LOCALES;
|
|
27
|
+
exports.DECODO_COMMON_COUNTRIES = _mod_96s3w3.DECODO_COMMON_COUNTRIES;
|
|
28
|
+
exports.DECODO_EUROPEAN_COUNTRIES = _mod_96s3w3.DECODO_EUROPEAN_COUNTRIES;
|
|
29
|
+
exports.DECODO_ASIAN_COUNTRIES = _mod_96s3w3.DECODO_ASIAN_COUNTRIES;
|
|
30
|
+
exports.DECODO_US_STATES = _mod_96s3w3.DECODO_US_STATES;
|
|
31
|
+
exports.DECODO_COMMON_CITIES = _mod_96s3w3.DECODO_COMMON_CITIES;
|
|
32
|
+
exports.getRandomDecodoDeviceType = _mod_96s3w3.getRandomDeviceType;
|
|
33
|
+
exports.getRandomDecodoLocale = _mod_96s3w3.getRandomLocale;
|
|
34
|
+
exports.getRandomDecodoCountry = _mod_96s3w3.getRandomCountry;
|
|
35
|
+
exports.getRandomDecodoCity = _mod_96s3w3.getRandomCity;
|
|
36
|
+
exports.generateDecodoSessionId = _mod_96s3w3.generateSessionId;;
|
package/dist/proxy/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
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
|
-
const
|
|
5
|
-
exports.ProxyManager =
|
|
4
|
+
const _mod_1jfmwa = require('./manager.cjs');
|
|
5
|
+
exports.ProxyManager = _mod_1jfmwa.ProxyManager;;
|
|
6
6
|
function createOptions(uri, opts) {
|
|
7
7
|
if (uri instanceof URL || typeof uri === "string") {
|
|
8
8
|
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_1rrd9x = require('./queue.cjs');
|
|
2
|
+
exports.RezoQueue = _mod_1rrd9x.RezoQueue;;
|
|
3
|
+
const _mod_2zy0yg = require('./http-queue.cjs');
|
|
4
|
+
exports.HttpQueue = _mod_2zy0yg.HttpQueue;
|
|
5
|
+
exports.extractDomain = _mod_2zy0yg.extractDomain;;
|
|
6
|
+
const _mod_5lfu3b = require('./types.cjs');
|
|
7
|
+
exports.Priority = _mod_5lfu3b.Priority;
|
|
8
|
+
exports.HttpMethodPriority = _mod_5lfu3b.HttpMethodPriority;;
|
|
@@ -596,6 +596,9 @@ As a workaround, process.env.NODE_TLS_REJECT_UNAUTHORIZED is being set to '0'.
|
|
|
596
596
|
if (requestOptions.beforeRedirect || defaultOptions.beforeRedirect) {
|
|
597
597
|
config.beforeRedirect = requestOptions.beforeRedirect || defaultOptions.beforeRedirect;
|
|
598
598
|
}
|
|
599
|
+
if (requestOptions.onRedirect || defaultOptions.onRedirect) {
|
|
600
|
+
config.onRedirect = requestOptions.onRedirect || defaultOptions.onRedirect;
|
|
601
|
+
}
|
|
599
602
|
config.requestCookies = [];
|
|
600
603
|
config.responseCookies = {
|
|
601
604
|
array: [],
|
|
@@ -596,6 +596,9 @@ As a workaround, process.env.NODE_TLS_REJECT_UNAUTHORIZED is being set to '0'.
|
|
|
596
596
|
if (requestOptions.beforeRedirect || defaultOptions.beforeRedirect) {
|
|
597
597
|
config.beforeRedirect = requestOptions.beforeRedirect || defaultOptions.beforeRedirect;
|
|
598
598
|
}
|
|
599
|
+
if (requestOptions.onRedirect || defaultOptions.onRedirect) {
|
|
600
|
+
config.onRedirect = requestOptions.onRedirect || defaultOptions.onRedirect;
|
|
601
|
+
}
|
|
599
602
|
config.requestCookies = [];
|
|
600
603
|
config.responseCookies = {
|
|
601
604
|
array: [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rezo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
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",
|