rezo 1.0.40 → 1.0.42

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.
@@ -1,6 +1,6 @@
1
- const _mod_61c6au = require('./picker.cjs');
2
- exports.detectRuntime = _mod_61c6au.detectRuntime;
3
- exports.getAdapterCapabilities = _mod_61c6au.getAdapterCapabilities;
4
- exports.buildAdapterContext = _mod_61c6au.buildAdapterContext;
5
- exports.getAvailableAdapters = _mod_61c6au.getAvailableAdapters;
6
- exports.selectAdapter = _mod_61c6au.selectAdapter;;
1
+ const _mod_8y5us8 = require('./picker.cjs');
2
+ exports.detectRuntime = _mod_8y5us8.detectRuntime;
3
+ exports.getAdapterCapabilities = _mod_8y5us8.getAdapterCapabilities;
4
+ exports.buildAdapterContext = _mod_8y5us8.buildAdapterContext;
5
+ exports.getAvailableAdapters = _mod_8y5us8.getAvailableAdapters;
6
+ exports.selectAdapter = _mod_8y5us8.selectAdapter;;
@@ -16,6 +16,85 @@ const Environment = {
16
16
  hasFormData: typeof FormData !== "undefined",
17
17
  hasBlob: typeof Blob !== "undefined"
18
18
  };
19
+ const debugLog = {
20
+ requestStart: (config, url, method) => {
21
+ if (config.debug) {
22
+ console.log(`
23
+ [Rezo Debug] ─────────────────────────────────────`);
24
+ console.log(`[Rezo Debug] ${method} ${url}`);
25
+ console.log(`[Rezo Debug] Request ID: ${config.requestId}`);
26
+ console.log(`[Rezo Debug] Adapter: xhr`);
27
+ if (config.originalRequest?.headers) {
28
+ const headers = config.originalRequest.headers instanceof RezoHeaders ? config.originalRequest.headers.toObject() : config.originalRequest.headers;
29
+ console.log(`[Rezo Debug] Request Headers:`, JSON.stringify(headers, null, 2));
30
+ }
31
+ }
32
+ if (config.trackUrl) {
33
+ console.log(`[Rezo Track] → ${method} ${url}`);
34
+ }
35
+ },
36
+ retry: (config, attempt, maxRetries, statusCode, delay) => {
37
+ if (config.debug) {
38
+ console.log(`[Rezo Debug] Retry ${attempt}/${maxRetries} after status ${statusCode}${delay > 0 ? ` (waiting ${delay}ms)` : ""}`);
39
+ }
40
+ if (config.trackUrl) {
41
+ console.log(`[Rezo Track] ⟳ Retry ${attempt}/${maxRetries} (status ${statusCode})`);
42
+ }
43
+ },
44
+ maxRetries: (config, maxRetries) => {
45
+ if (config.debug) {
46
+ console.log(`[Rezo Debug] Max retries (${maxRetries}) reached, throwing error`);
47
+ }
48
+ if (config.trackUrl) {
49
+ console.log(`[Rezo Track] ✗ Max retries reached`);
50
+ }
51
+ },
52
+ response: (config, status, statusText, duration) => {
53
+ if (config.debug) {
54
+ console.log(`[Rezo Debug] Response: ${status} ${statusText} (${duration.toFixed(2)}ms)`);
55
+ }
56
+ if (config.trackUrl) {
57
+ console.log(`[Rezo Track] ✓ ${status} ${statusText}`);
58
+ }
59
+ },
60
+ responseHeaders: (config, headers) => {
61
+ if (config.debug) {
62
+ console.log(`[Rezo Debug] Response Headers:`, JSON.stringify(headers, null, 2));
63
+ }
64
+ },
65
+ cookies: (config, cookieCount) => {
66
+ if (config.debug && cookieCount > 0) {
67
+ console.log(`[Rezo Debug] Cookies received: ${cookieCount}`);
68
+ }
69
+ },
70
+ timing: (config, timing) => {
71
+ if (config.debug) {
72
+ const parts = [];
73
+ if (timing.ttfb)
74
+ parts.push(`TTFB: ${timing.ttfb.toFixed(2)}ms`);
75
+ if (timing.total)
76
+ parts.push(`Total: ${timing.total.toFixed(2)}ms`);
77
+ if (parts.length > 0) {
78
+ console.log(`[Rezo Debug] Timing: ${parts.join(" | ")}`);
79
+ }
80
+ }
81
+ },
82
+ complete: (config, url) => {
83
+ if (config.debug) {
84
+ console.log(`[Rezo Debug] Request complete: ${url}`);
85
+ console.log(`[Rezo Debug] ─────────────────────────────────────
86
+ `);
87
+ }
88
+ },
89
+ error: (config, error) => {
90
+ if (config.debug) {
91
+ console.log(`[Rezo Debug] Error: ${error instanceof Error ? error.message : error}`);
92
+ }
93
+ if (config.trackUrl) {
94
+ console.log(`[Rezo Track] ✗ Error: ${error instanceof Error ? error.message : error}`);
95
+ }
96
+ }
97
+ };
19
98
  function updateTiming(config, timing, bodySize) {
20
99
  const now = performance.now();
21
100
  config.timing.domainLookupStart = config.timing.startTime;
@@ -330,11 +409,14 @@ async function executeXHRRequest(fetchOptions, config, options, perform, streamR
330
409
  throw response;
331
410
  }
332
411
  if (maxRetries <= retries) {
412
+ debugLog.maxRetries(config, maxRetries);
333
413
  throw response;
334
414
  }
335
415
  retries++;
336
- if (retryDelay > 0) {
337
- await new Promise((resolve) => setTimeout(resolve, incrementDelay ? retryDelay * retries : retryDelay));
416
+ const currentDelay = incrementDelay ? retryDelay * retries : retryDelay;
417
+ debugLog.retry(config, retries, maxRetries, response.status || 0, currentDelay);
418
+ if (currentDelay > 0) {
419
+ await new Promise((resolve) => setTimeout(resolve, currentDelay));
338
420
  }
339
421
  }
340
422
  config.retryAttempts++;
@@ -359,6 +441,7 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
359
441
  config.isSecure = isSecure;
360
442
  config.finalUrl = url;
361
443
  config.network.protocol = isSecure ? "https" : "http";
444
+ debugLog.requestStart(config, url, fetchOptions.method?.toUpperCase() || "GET");
362
445
  const xhr = new XMLHttpRequest;
363
446
  xhr.open(fetchOptions.method.toUpperCase(), url, true);
364
447
  const headers = toXHRHeaders(fetchOptions.headers);
@@ -513,6 +596,15 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
513
596
  resolve(error);
514
597
  return;
515
598
  }
599
+ const duration = performance.now() - timing.startTime;
600
+ debugLog.response(config, status, statusText, duration);
601
+ debugLog.responseHeaders(config, responseHeaders.toObject());
602
+ debugLog.cookies(config, cookies.array.length);
603
+ debugLog.timing(config, {
604
+ ttfb: config.timing.responseStart - config.timing.startTime,
605
+ total: duration
606
+ });
607
+ debugLog.complete(config, xhr.responseURL || url);
516
608
  const finalResponse = {
517
609
  data: responseData,
518
610
  status,
@@ -16,6 +16,85 @@ const Environment = {
16
16
  hasFormData: typeof FormData !== "undefined",
17
17
  hasBlob: typeof Blob !== "undefined"
18
18
  };
19
+ const debugLog = {
20
+ requestStart: (config, url, method) => {
21
+ if (config.debug) {
22
+ console.log(`
23
+ [Rezo Debug] ─────────────────────────────────────`);
24
+ console.log(`[Rezo Debug] ${method} ${url}`);
25
+ console.log(`[Rezo Debug] Request ID: ${config.requestId}`);
26
+ console.log(`[Rezo Debug] Adapter: xhr`);
27
+ if (config.originalRequest?.headers) {
28
+ const headers = config.originalRequest.headers instanceof RezoHeaders ? config.originalRequest.headers.toObject() : config.originalRequest.headers;
29
+ console.log(`[Rezo Debug] Request Headers:`, JSON.stringify(headers, null, 2));
30
+ }
31
+ }
32
+ if (config.trackUrl) {
33
+ console.log(`[Rezo Track] → ${method} ${url}`);
34
+ }
35
+ },
36
+ retry: (config, attempt, maxRetries, statusCode, delay) => {
37
+ if (config.debug) {
38
+ console.log(`[Rezo Debug] Retry ${attempt}/${maxRetries} after status ${statusCode}${delay > 0 ? ` (waiting ${delay}ms)` : ""}`);
39
+ }
40
+ if (config.trackUrl) {
41
+ console.log(`[Rezo Track] ⟳ Retry ${attempt}/${maxRetries} (status ${statusCode})`);
42
+ }
43
+ },
44
+ maxRetries: (config, maxRetries) => {
45
+ if (config.debug) {
46
+ console.log(`[Rezo Debug] Max retries (${maxRetries}) reached, throwing error`);
47
+ }
48
+ if (config.trackUrl) {
49
+ console.log(`[Rezo Track] ✗ Max retries reached`);
50
+ }
51
+ },
52
+ response: (config, status, statusText, duration) => {
53
+ if (config.debug) {
54
+ console.log(`[Rezo Debug] Response: ${status} ${statusText} (${duration.toFixed(2)}ms)`);
55
+ }
56
+ if (config.trackUrl) {
57
+ console.log(`[Rezo Track] ✓ ${status} ${statusText}`);
58
+ }
59
+ },
60
+ responseHeaders: (config, headers) => {
61
+ if (config.debug) {
62
+ console.log(`[Rezo Debug] Response Headers:`, JSON.stringify(headers, null, 2));
63
+ }
64
+ },
65
+ cookies: (config, cookieCount) => {
66
+ if (config.debug && cookieCount > 0) {
67
+ console.log(`[Rezo Debug] Cookies received: ${cookieCount}`);
68
+ }
69
+ },
70
+ timing: (config, timing) => {
71
+ if (config.debug) {
72
+ const parts = [];
73
+ if (timing.ttfb)
74
+ parts.push(`TTFB: ${timing.ttfb.toFixed(2)}ms`);
75
+ if (timing.total)
76
+ parts.push(`Total: ${timing.total.toFixed(2)}ms`);
77
+ if (parts.length > 0) {
78
+ console.log(`[Rezo Debug] Timing: ${parts.join(" | ")}`);
79
+ }
80
+ }
81
+ },
82
+ complete: (config, url) => {
83
+ if (config.debug) {
84
+ console.log(`[Rezo Debug] Request complete: ${url}`);
85
+ console.log(`[Rezo Debug] ─────────────────────────────────────
86
+ `);
87
+ }
88
+ },
89
+ error: (config, error) => {
90
+ if (config.debug) {
91
+ console.log(`[Rezo Debug] Error: ${error instanceof Error ? error.message : error}`);
92
+ }
93
+ if (config.trackUrl) {
94
+ console.log(`[Rezo Track] ✗ Error: ${error instanceof Error ? error.message : error}`);
95
+ }
96
+ }
97
+ };
19
98
  function updateTiming(config, timing, bodySize) {
20
99
  const now = performance.now();
21
100
  config.timing.domainLookupStart = config.timing.startTime;
@@ -330,11 +409,14 @@ async function executeXHRRequest(fetchOptions, config, options, perform, streamR
330
409
  throw response;
331
410
  }
332
411
  if (maxRetries <= retries) {
412
+ debugLog.maxRetries(config, maxRetries);
333
413
  throw response;
334
414
  }
335
415
  retries++;
336
- if (retryDelay > 0) {
337
- await new Promise((resolve) => setTimeout(resolve, incrementDelay ? retryDelay * retries : retryDelay));
416
+ const currentDelay = incrementDelay ? retryDelay * retries : retryDelay;
417
+ debugLog.retry(config, retries, maxRetries, response.status || 0, currentDelay);
418
+ if (currentDelay > 0) {
419
+ await new Promise((resolve) => setTimeout(resolve, currentDelay));
338
420
  }
339
421
  }
340
422
  config.retryAttempts++;
@@ -359,6 +441,7 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
359
441
  config.isSecure = isSecure;
360
442
  config.finalUrl = url;
361
443
  config.network.protocol = isSecure ? "https" : "http";
444
+ debugLog.requestStart(config, url, fetchOptions.method?.toUpperCase() || "GET");
362
445
  const xhr = new XMLHttpRequest;
363
446
  xhr.open(fetchOptions.method.toUpperCase(), url, true);
364
447
  const headers = toXHRHeaders(fetchOptions.headers);
@@ -513,6 +596,15 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
513
596
  resolve(error);
514
597
  return;
515
598
  }
599
+ const duration = performance.now() - timing.startTime;
600
+ debugLog.response(config, status, statusText, duration);
601
+ debugLog.responseHeaders(config, responseHeaders.toObject());
602
+ debugLog.cookies(config, cookies.array.length);
603
+ debugLog.timing(config, {
604
+ ttfb: config.timing.responseStart - config.timing.startTime,
605
+ total: duration
606
+ });
607
+ debugLog.complete(config, xhr.responseURL || url);
516
608
  const finalResponse = {
517
609
  data: responseData,
518
610
  status,
@@ -1,5 +1,5 @@
1
1
  const { LRUCache } = require('./lru-cache.cjs');
2
- const dns = require("dns");
2
+ const dns = require("node:dns");
3
3
  const DEFAULT_DNS_TTL = 60000;
4
4
  const DEFAULT_DNS_MAX_ENTRIES = 1000;
5
5
 
@@ -24,10 +24,12 @@ class DNSCache {
24
24
  const cached = this.cache.get(key);
25
25
  if (cached && cached.addresses.length > 0) {
26
26
  const address = cached.addresses[Math.floor(Math.random() * cached.addresses.length)];
27
- return { address, family: cached.family };
27
+ if (address && typeof address === "string") {
28
+ return { address, family: cached.family };
29
+ }
28
30
  }
29
31
  const result = await this.resolveDNS(hostname, family);
30
- if (result) {
32
+ if (result && result.address && typeof result.address === "string") {
31
33
  this.cache.set(key, {
32
34
  addresses: [result.address],
33
35
  family: result.family,
@@ -1,5 +1,5 @@
1
1
  import { LRUCache } from './lru-cache.js';
2
- import dns from "dns";
2
+ import dns from "node:dns";
3
3
  const DEFAULT_DNS_TTL = 60000;
4
4
  const DEFAULT_DNS_MAX_ENTRIES = 1000;
5
5
 
@@ -24,10 +24,12 @@ export class DNSCache {
24
24
  const cached = this.cache.get(key);
25
25
  if (cached && cached.addresses.length > 0) {
26
26
  const address = cached.addresses[Math.floor(Math.random() * cached.addresses.length)];
27
- return { address, family: cached.family };
27
+ if (address && typeof address === "string") {
28
+ return { address, family: cached.family };
29
+ }
28
30
  }
29
31
  const result = await this.resolveDNS(hostname, family);
30
- if (result) {
32
+ if (result && result.address && typeof result.address === "string") {
31
33
  this.cache.set(key, {
32
34
  addresses: [result.address],
33
35
  family: result.family,
@@ -1,13 +1,13 @@
1
- const _mod_rmof1y = require('./lru-cache.cjs');
2
- exports.LRUCache = _mod_rmof1y.LRUCache;;
3
- const _mod_1xf8vw = require('./dns-cache.cjs');
4
- exports.DNSCache = _mod_1xf8vw.DNSCache;
5
- exports.getGlobalDNSCache = _mod_1xf8vw.getGlobalDNSCache;
6
- exports.resetGlobalDNSCache = _mod_1xf8vw.resetGlobalDNSCache;;
7
- const _mod_20fa63 = require('./response-cache.cjs');
8
- exports.ResponseCache = _mod_20fa63.ResponseCache;
9
- exports.normalizeResponseCacheConfig = _mod_20fa63.normalizeResponseCacheConfig;;
10
- const _mod_2no9i3 = require('./file-cacher.cjs');
11
- exports.FileCacher = _mod_2no9i3.FileCacher;;
12
- const _mod_bdsohd = require('./url-store.cjs');
13
- exports.UrlStore = _mod_bdsohd.UrlStore;;
1
+ const _mod_q88avp = require('./lru-cache.cjs');
2
+ exports.LRUCache = _mod_q88avp.LRUCache;;
3
+ const _mod_ycn5kr = require('./dns-cache.cjs');
4
+ exports.DNSCache = _mod_ycn5kr.DNSCache;
5
+ exports.getGlobalDNSCache = _mod_ycn5kr.getGlobalDNSCache;
6
+ exports.resetGlobalDNSCache = _mod_ycn5kr.resetGlobalDNSCache;;
7
+ const _mod_ca0ngi = require('./response-cache.cjs');
8
+ exports.ResponseCache = _mod_ca0ngi.ResponseCache;
9
+ exports.normalizeResponseCacheConfig = _mod_ca0ngi.normalizeResponseCacheConfig;;
10
+ const _mod_pmo9e4 = require('./file-cacher.cjs');
11
+ exports.FileCacher = _mod_pmo9e4.FileCacher;;
12
+ const _mod_h6jprd = require('./url-store.cjs');
13
+ exports.UrlStore = _mod_h6jprd.UrlStore;;
@@ -1,5 +1,5 @@
1
- const _mod_jqgdp4 = require('../plugin/crawler.cjs');
2
- exports.Crawler = _mod_jqgdp4.Crawler;;
3
- const _mod_rmav2w = require('../plugin/crawler-options.cjs');
4
- exports.CrawlerOptions = _mod_rmav2w.CrawlerOptions;
5
- exports.Domain = _mod_rmav2w.Domain;;
1
+ const _mod_oeicap = require('../plugin/crawler.cjs');
2
+ exports.Crawler = _mod_oeicap.Crawler;;
3
+ const _mod_m779ll = require('../plugin/crawler-options.cjs');
4
+ exports.CrawlerOptions = _mod_m779ll.CrawlerOptions;
5
+ exports.Domain = _mod_m779ll.Domain;;
package/dist/index.cjs CHANGED
@@ -1,27 +1,27 @@
1
- const _mod_ndxkmq = require('./core/rezo.cjs');
2
- exports.Rezo = _mod_ndxkmq.Rezo;
3
- exports.createRezoInstance = _mod_ndxkmq.createRezoInstance;
4
- exports.createDefaultInstance = _mod_ndxkmq.createDefaultInstance;;
5
- const _mod_14uis0 = require('./errors/rezo-error.cjs');
6
- exports.RezoError = _mod_14uis0.RezoError;
7
- exports.RezoErrorCode = _mod_14uis0.RezoErrorCode;;
8
- const _mod_bqk8xv = require('./utils/headers.cjs');
9
- exports.RezoHeaders = _mod_bqk8xv.RezoHeaders;;
10
- const _mod_ncd73y = require('./utils/form-data.cjs');
11
- exports.RezoFormData = _mod_ncd73y.RezoFormData;;
12
- const _mod_o8ndwc = require('./utils/cookies.cjs');
13
- exports.RezoCookieJar = _mod_o8ndwc.RezoCookieJar;
14
- exports.Cookie = _mod_o8ndwc.Cookie;;
15
- const _mod_2b780q = require('./core/hooks.cjs');
16
- exports.createDefaultHooks = _mod_2b780q.createDefaultHooks;
17
- exports.mergeHooks = _mod_2b780q.mergeHooks;;
18
- const _mod_fdvrv6 = require('./proxy/manager.cjs');
19
- exports.ProxyManager = _mod_fdvrv6.ProxyManager;;
20
- const _mod_1zn5e7 = require('./queue/index.cjs');
21
- exports.RezoQueue = _mod_1zn5e7.RezoQueue;
22
- exports.HttpQueue = _mod_1zn5e7.HttpQueue;
23
- exports.Priority = _mod_1zn5e7.Priority;
24
- exports.HttpMethodPriority = _mod_1zn5e7.HttpMethodPriority;;
1
+ const _mod_0yc999 = require('./core/rezo.cjs');
2
+ exports.Rezo = _mod_0yc999.Rezo;
3
+ exports.createRezoInstance = _mod_0yc999.createRezoInstance;
4
+ exports.createDefaultInstance = _mod_0yc999.createDefaultInstance;;
5
+ const _mod_mgwmh3 = require('./errors/rezo-error.cjs');
6
+ exports.RezoError = _mod_mgwmh3.RezoError;
7
+ exports.RezoErrorCode = _mod_mgwmh3.RezoErrorCode;;
8
+ const _mod_sms50x = require('./utils/headers.cjs');
9
+ exports.RezoHeaders = _mod_sms50x.RezoHeaders;;
10
+ const _mod_ak9q56 = require('./utils/form-data.cjs');
11
+ exports.RezoFormData = _mod_ak9q56.RezoFormData;;
12
+ const _mod_q6v2w1 = require('./utils/cookies.cjs');
13
+ exports.RezoCookieJar = _mod_q6v2w1.RezoCookieJar;
14
+ exports.Cookie = _mod_q6v2w1.Cookie;;
15
+ const _mod_rlboga = require('./core/hooks.cjs');
16
+ exports.createDefaultHooks = _mod_rlboga.createDefaultHooks;
17
+ exports.mergeHooks = _mod_rlboga.mergeHooks;;
18
+ const _mod_5cnq33 = require('./proxy/manager.cjs');
19
+ exports.ProxyManager = _mod_5cnq33.ProxyManager;;
20
+ const _mod_03guke = require('./queue/index.cjs');
21
+ exports.RezoQueue = _mod_03guke.RezoQueue;
22
+ exports.HttpQueue = _mod_03guke.HttpQueue;
23
+ exports.Priority = _mod_03guke.Priority;
24
+ exports.HttpMethodPriority = _mod_03guke.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;
@@ -1,36 +1,36 @@
1
- const _mod_7o4hj8 = require('./crawler.cjs');
2
- exports.Crawler = _mod_7o4hj8.Crawler;;
3
- const _mod_8skgjk = require('./crawler-options.cjs');
4
- exports.CrawlerOptions = _mod_8skgjk.CrawlerOptions;;
5
- const _mod_xzhhtv = require('../cache/file-cacher.cjs');
6
- exports.FileCacher = _mod_xzhhtv.FileCacher;;
7
- const _mod_q0ba3u = require('../cache/url-store.cjs');
8
- exports.UrlStore = _mod_q0ba3u.UrlStore;;
9
- const _mod_5jfuqk = require('./addon/oxylabs/index.cjs');
10
- exports.Oxylabs = _mod_5jfuqk.Oxylabs;;
11
- const _mod_9ggjyx = require('./addon/oxylabs/options.cjs');
12
- exports.OXYLABS_BROWSER_TYPES = _mod_9ggjyx.OXYLABS_BROWSER_TYPES;
13
- exports.OXYLABS_COMMON_LOCALES = _mod_9ggjyx.OXYLABS_COMMON_LOCALES;
14
- exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_9ggjyx.OXYLABS_COMMON_GEO_LOCATIONS;
15
- exports.OXYLABS_US_STATES = _mod_9ggjyx.OXYLABS_US_STATES;
16
- exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_9ggjyx.OXYLABS_EUROPEAN_COUNTRIES;
17
- exports.OXYLABS_ASIAN_COUNTRIES = _mod_9ggjyx.OXYLABS_ASIAN_COUNTRIES;
18
- exports.getRandomOxylabsBrowserType = _mod_9ggjyx.getRandomBrowserType;
19
- exports.getRandomOxylabsLocale = _mod_9ggjyx.getRandomLocale;
20
- exports.getRandomOxylabsGeoLocation = _mod_9ggjyx.getRandomGeoLocation;;
21
- const _mod_j5hnyr = require('./addon/decodo/index.cjs');
22
- exports.Decodo = _mod_j5hnyr.Decodo;;
23
- const _mod_lfgvog = require('./addon/decodo/options.cjs');
24
- exports.DECODO_DEVICE_TYPES = _mod_lfgvog.DECODO_DEVICE_TYPES;
25
- exports.DECODO_HEADLESS_MODES = _mod_lfgvog.DECODO_HEADLESS_MODES;
26
- exports.DECODO_COMMON_LOCALES = _mod_lfgvog.DECODO_COMMON_LOCALES;
27
- exports.DECODO_COMMON_COUNTRIES = _mod_lfgvog.DECODO_COMMON_COUNTRIES;
28
- exports.DECODO_EUROPEAN_COUNTRIES = _mod_lfgvog.DECODO_EUROPEAN_COUNTRIES;
29
- exports.DECODO_ASIAN_COUNTRIES = _mod_lfgvog.DECODO_ASIAN_COUNTRIES;
30
- exports.DECODO_US_STATES = _mod_lfgvog.DECODO_US_STATES;
31
- exports.DECODO_COMMON_CITIES = _mod_lfgvog.DECODO_COMMON_CITIES;
32
- exports.getRandomDecodoDeviceType = _mod_lfgvog.getRandomDeviceType;
33
- exports.getRandomDecodoLocale = _mod_lfgvog.getRandomLocale;
34
- exports.getRandomDecodoCountry = _mod_lfgvog.getRandomCountry;
35
- exports.getRandomDecodoCity = _mod_lfgvog.getRandomCity;
36
- exports.generateDecodoSessionId = _mod_lfgvog.generateSessionId;;
1
+ const _mod_no49zr = require('./crawler.cjs');
2
+ exports.Crawler = _mod_no49zr.Crawler;;
3
+ const _mod_6cwfk4 = require('./crawler-options.cjs');
4
+ exports.CrawlerOptions = _mod_6cwfk4.CrawlerOptions;;
5
+ const _mod_orelxz = require('../cache/file-cacher.cjs');
6
+ exports.FileCacher = _mod_orelxz.FileCacher;;
7
+ const _mod_1treoe = require('../cache/url-store.cjs');
8
+ exports.UrlStore = _mod_1treoe.UrlStore;;
9
+ const _mod_472eye = require('./addon/oxylabs/index.cjs');
10
+ exports.Oxylabs = _mod_472eye.Oxylabs;;
11
+ const _mod_d7toci = require('./addon/oxylabs/options.cjs');
12
+ exports.OXYLABS_BROWSER_TYPES = _mod_d7toci.OXYLABS_BROWSER_TYPES;
13
+ exports.OXYLABS_COMMON_LOCALES = _mod_d7toci.OXYLABS_COMMON_LOCALES;
14
+ exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_d7toci.OXYLABS_COMMON_GEO_LOCATIONS;
15
+ exports.OXYLABS_US_STATES = _mod_d7toci.OXYLABS_US_STATES;
16
+ exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_d7toci.OXYLABS_EUROPEAN_COUNTRIES;
17
+ exports.OXYLABS_ASIAN_COUNTRIES = _mod_d7toci.OXYLABS_ASIAN_COUNTRIES;
18
+ exports.getRandomOxylabsBrowserType = _mod_d7toci.getRandomBrowserType;
19
+ exports.getRandomOxylabsLocale = _mod_d7toci.getRandomLocale;
20
+ exports.getRandomOxylabsGeoLocation = _mod_d7toci.getRandomGeoLocation;;
21
+ const _mod_xok7vg = require('./addon/decodo/index.cjs');
22
+ exports.Decodo = _mod_xok7vg.Decodo;;
23
+ const _mod_mgqhmj = require('./addon/decodo/options.cjs');
24
+ exports.DECODO_DEVICE_TYPES = _mod_mgqhmj.DECODO_DEVICE_TYPES;
25
+ exports.DECODO_HEADLESS_MODES = _mod_mgqhmj.DECODO_HEADLESS_MODES;
26
+ exports.DECODO_COMMON_LOCALES = _mod_mgqhmj.DECODO_COMMON_LOCALES;
27
+ exports.DECODO_COMMON_COUNTRIES = _mod_mgqhmj.DECODO_COMMON_COUNTRIES;
28
+ exports.DECODO_EUROPEAN_COUNTRIES = _mod_mgqhmj.DECODO_EUROPEAN_COUNTRIES;
29
+ exports.DECODO_ASIAN_COUNTRIES = _mod_mgqhmj.DECODO_ASIAN_COUNTRIES;
30
+ exports.DECODO_US_STATES = _mod_mgqhmj.DECODO_US_STATES;
31
+ exports.DECODO_COMMON_CITIES = _mod_mgqhmj.DECODO_COMMON_CITIES;
32
+ exports.getRandomDecodoDeviceType = _mod_mgqhmj.getRandomDeviceType;
33
+ exports.getRandomDecodoLocale = _mod_mgqhmj.getRandomLocale;
34
+ exports.getRandomDecodoCountry = _mod_mgqhmj.getRandomCountry;
35
+ exports.getRandomDecodoCity = _mod_mgqhmj.getRandomCity;
36
+ exports.generateDecodoSessionId = _mod_mgqhmj.generateSessionId;;
@@ -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 _mod_8qkn02 = require('./manager.cjs');
6
- exports.ProxyManager = _mod_8qkn02.ProxyManager;;
7
- const _mod_ke5nex = require('./parse.cjs');
8
- exports.parseProxyString = _mod_ke5nex.parseProxyString;;
5
+ const _mod_0j13h4 = require('./manager.cjs');
6
+ exports.ProxyManager = _mod_0j13h4.ProxyManager;;
7
+ const _mod_cogtit = require('./parse.cjs');
8
+ exports.parseProxyString = _mod_cogtit.parseProxyString;;
9
9
  function createOptions(uri, opts) {
10
10
  if (uri instanceof URL || typeof uri === "string") {
11
11
  return {
@@ -1,8 +1,8 @@
1
- const _mod_kuel9a = require('./queue.cjs');
2
- exports.RezoQueue = _mod_kuel9a.RezoQueue;;
3
- const _mod_mzgwbx = require('./http-queue.cjs');
4
- exports.HttpQueue = _mod_mzgwbx.HttpQueue;
5
- exports.extractDomain = _mod_mzgwbx.extractDomain;;
6
- const _mod_74swv0 = require('./types.cjs');
7
- exports.Priority = _mod_74swv0.Priority;
8
- exports.HttpMethodPriority = _mod_74swv0.HttpMethodPriority;;
1
+ const _mod_b3b2dj = require('./queue.cjs');
2
+ exports.RezoQueue = _mod_b3b2dj.RezoQueue;;
3
+ const _mod_cobwjn = require('./http-queue.cjs');
4
+ exports.HttpQueue = _mod_cobwjn.HttpQueue;
5
+ exports.extractDomain = _mod_cobwjn.extractDomain;;
6
+ const _mod_2yucs5 = require('./types.cjs');
7
+ exports.Priority = _mod_2yucs5.Priority;
8
+ exports.HttpMethodPriority = _mod_2yucs5.HttpMethodPriority;;
@@ -1,11 +1,11 @@
1
- const _mod_0fl2na = require('./event-emitter.cjs');
2
- exports.UniversalEventEmitter = _mod_0fl2na.UniversalEventEmitter;;
3
- const _mod_4e9ng3 = require('./stream.cjs');
4
- exports.UniversalStreamResponse = _mod_4e9ng3.UniversalStreamResponse;
5
- exports.StreamResponse = _mod_4e9ng3.StreamResponse;;
6
- const _mod_ry8uaf = require('./download.cjs');
7
- exports.UniversalDownloadResponse = _mod_ry8uaf.UniversalDownloadResponse;
8
- exports.DownloadResponse = _mod_ry8uaf.DownloadResponse;;
9
- const _mod_btspbf = require('./upload.cjs');
10
- exports.UniversalUploadResponse = _mod_btspbf.UniversalUploadResponse;
11
- exports.UploadResponse = _mod_btspbf.UploadResponse;;
1
+ const _mod_m9gx68 = require('./event-emitter.cjs');
2
+ exports.UniversalEventEmitter = _mod_m9gx68.UniversalEventEmitter;;
3
+ const _mod_7gd4j6 = require('./stream.cjs');
4
+ exports.UniversalStreamResponse = _mod_7gd4j6.UniversalStreamResponse;
5
+ exports.StreamResponse = _mod_7gd4j6.StreamResponse;;
6
+ const _mod_45jy3g = require('./download.cjs');
7
+ exports.UniversalDownloadResponse = _mod_45jy3g.UniversalDownloadResponse;
8
+ exports.DownloadResponse = _mod_45jy3g.DownloadResponse;;
9
+ const _mod_ibw1bv = require('./upload.cjs');
10
+ exports.UniversalUploadResponse = _mod_ibw1bv.UniversalUploadResponse;
11
+ exports.UploadResponse = _mod_ibw1bv.UploadResponse;;
@@ -1,6 +1,5 @@
1
1
  const http = require("node:http");
2
2
  const https = require("node:https");
3
- const dns = require("node:dns");
4
3
  const { getGlobalDNSCache } = require('../cache/dns-cache.cjs');
5
4
  const DEFAULT_CONFIG = {
6
5
  keepAlive: true,
@@ -55,22 +54,7 @@ class AgentPool {
55
54
  return parts.length > 0 ? parts.join("|") : "default";
56
55
  }
57
56
  createLookupFunction() {
58
- if (!this.dnsCache) {
59
- return;
60
- }
61
- const cache = this.dnsCache;
62
- return (hostname, options, callback) => {
63
- const family = options.family === 6 ? 6 : options.family === 4 ? 4 : undefined;
64
- cache.lookup(hostname, family).then((result) => {
65
- if (result) {
66
- callback(null, result.address, result.family);
67
- } else {
68
- dns.lookup(hostname, options, callback);
69
- }
70
- }).catch(() => {
71
- dns.lookup(hostname, options, callback);
72
- });
73
- };
57
+ return;
74
58
  }
75
59
  createHttpAgent(key) {
76
60
  const agentOptions = {
@@ -1,6 +1,5 @@
1
1
  import * as http from "node:http";
2
2
  import * as https from "node:https";
3
- import dns from "node:dns";
4
3
  import { getGlobalDNSCache } from '../cache/dns-cache.js';
5
4
  const DEFAULT_CONFIG = {
6
5
  keepAlive: true,
@@ -55,22 +54,7 @@ class AgentPool {
55
54
  return parts.length > 0 ? parts.join("|") : "default";
56
55
  }
57
56
  createLookupFunction() {
58
- if (!this.dnsCache) {
59
- return;
60
- }
61
- const cache = this.dnsCache;
62
- return (hostname, options, callback) => {
63
- const family = options.family === 6 ? 6 : options.family === 4 ? 4 : undefined;
64
- cache.lookup(hostname, family).then((result) => {
65
- if (result) {
66
- callback(null, result.address, result.family);
67
- } else {
68
- dns.lookup(hostname, options, callback);
69
- }
70
- }).catch(() => {
71
- dns.lookup(hostname, options, callback);
72
- });
73
- };
57
+ return;
74
58
  }
75
59
  createHttpAgent(key) {
76
60
  const agentOptions = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rezo",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
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",