rezo 1.0.41 → 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_ds8hb1 = require('./picker.cjs');
2
- exports.detectRuntime = _mod_ds8hb1.detectRuntime;
3
- exports.getAdapterCapabilities = _mod_ds8hb1.getAdapterCapabilities;
4
- exports.buildAdapterContext = _mod_ds8hb1.buildAdapterContext;
5
- exports.getAvailableAdapters = _mod_ds8hb1.getAvailableAdapters;
6
- exports.selectAdapter = _mod_ds8hb1.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_pf5i2i = require('./lru-cache.cjs');
2
- exports.LRUCache = _mod_pf5i2i.LRUCache;;
3
- const _mod_iftoun = require('./dns-cache.cjs');
4
- exports.DNSCache = _mod_iftoun.DNSCache;
5
- exports.getGlobalDNSCache = _mod_iftoun.getGlobalDNSCache;
6
- exports.resetGlobalDNSCache = _mod_iftoun.resetGlobalDNSCache;;
7
- const _mod_lg2ryg = require('./response-cache.cjs');
8
- exports.ResponseCache = _mod_lg2ryg.ResponseCache;
9
- exports.normalizeResponseCacheConfig = _mod_lg2ryg.normalizeResponseCacheConfig;;
10
- const _mod_btk7am = require('./file-cacher.cjs');
11
- exports.FileCacher = _mod_btk7am.FileCacher;;
12
- const _mod_56wgw7 = require('./url-store.cjs');
13
- exports.UrlStore = _mod_56wgw7.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_7nublp = require('../plugin/crawler.cjs');
2
- exports.Crawler = _mod_7nublp.Crawler;;
3
- const _mod_dsncou = require('../plugin/crawler-options.cjs');
4
- exports.CrawlerOptions = _mod_dsncou.CrawlerOptions;
5
- exports.Domain = _mod_dsncou.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_0ynvco = require('./core/rezo.cjs');
2
- exports.Rezo = _mod_0ynvco.Rezo;
3
- exports.createRezoInstance = _mod_0ynvco.createRezoInstance;
4
- exports.createDefaultInstance = _mod_0ynvco.createDefaultInstance;;
5
- const _mod_bgvlss = require('./errors/rezo-error.cjs');
6
- exports.RezoError = _mod_bgvlss.RezoError;
7
- exports.RezoErrorCode = _mod_bgvlss.RezoErrorCode;;
8
- const _mod_z9q7ik = require('./utils/headers.cjs');
9
- exports.RezoHeaders = _mod_z9q7ik.RezoHeaders;;
10
- const _mod_dxoi53 = require('./utils/form-data.cjs');
11
- exports.RezoFormData = _mod_dxoi53.RezoFormData;;
12
- const _mod_axqg2d = require('./utils/cookies.cjs');
13
- exports.RezoCookieJar = _mod_axqg2d.RezoCookieJar;
14
- exports.Cookie = _mod_axqg2d.Cookie;;
15
- const _mod_0g7fzx = require('./core/hooks.cjs');
16
- exports.createDefaultHooks = _mod_0g7fzx.createDefaultHooks;
17
- exports.mergeHooks = _mod_0g7fzx.mergeHooks;;
18
- const _mod_ncim1p = require('./proxy/manager.cjs');
19
- exports.ProxyManager = _mod_ncim1p.ProxyManager;;
20
- const _mod_gcfuln = require('./queue/index.cjs');
21
- exports.RezoQueue = _mod_gcfuln.RezoQueue;
22
- exports.HttpQueue = _mod_gcfuln.HttpQueue;
23
- exports.Priority = _mod_gcfuln.Priority;
24
- exports.HttpMethodPriority = _mod_gcfuln.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_a2g0l2 = require('./crawler.cjs');
2
- exports.Crawler = _mod_a2g0l2.Crawler;;
3
- const _mod_bsn73l = require('./crawler-options.cjs');
4
- exports.CrawlerOptions = _mod_bsn73l.CrawlerOptions;;
5
- const _mod_ufcptn = require('../cache/file-cacher.cjs');
6
- exports.FileCacher = _mod_ufcptn.FileCacher;;
7
- const _mod_tj3jh8 = require('../cache/url-store.cjs');
8
- exports.UrlStore = _mod_tj3jh8.UrlStore;;
9
- const _mod_imciy5 = require('./addon/oxylabs/index.cjs');
10
- exports.Oxylabs = _mod_imciy5.Oxylabs;;
11
- const _mod_t0yjxb = require('./addon/oxylabs/options.cjs');
12
- exports.OXYLABS_BROWSER_TYPES = _mod_t0yjxb.OXYLABS_BROWSER_TYPES;
13
- exports.OXYLABS_COMMON_LOCALES = _mod_t0yjxb.OXYLABS_COMMON_LOCALES;
14
- exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_t0yjxb.OXYLABS_COMMON_GEO_LOCATIONS;
15
- exports.OXYLABS_US_STATES = _mod_t0yjxb.OXYLABS_US_STATES;
16
- exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_t0yjxb.OXYLABS_EUROPEAN_COUNTRIES;
17
- exports.OXYLABS_ASIAN_COUNTRIES = _mod_t0yjxb.OXYLABS_ASIAN_COUNTRIES;
18
- exports.getRandomOxylabsBrowserType = _mod_t0yjxb.getRandomBrowserType;
19
- exports.getRandomOxylabsLocale = _mod_t0yjxb.getRandomLocale;
20
- exports.getRandomOxylabsGeoLocation = _mod_t0yjxb.getRandomGeoLocation;;
21
- const _mod_z9e7mj = require('./addon/decodo/index.cjs');
22
- exports.Decodo = _mod_z9e7mj.Decodo;;
23
- const _mod_tcfz5k = require('./addon/decodo/options.cjs');
24
- exports.DECODO_DEVICE_TYPES = _mod_tcfz5k.DECODO_DEVICE_TYPES;
25
- exports.DECODO_HEADLESS_MODES = _mod_tcfz5k.DECODO_HEADLESS_MODES;
26
- exports.DECODO_COMMON_LOCALES = _mod_tcfz5k.DECODO_COMMON_LOCALES;
27
- exports.DECODO_COMMON_COUNTRIES = _mod_tcfz5k.DECODO_COMMON_COUNTRIES;
28
- exports.DECODO_EUROPEAN_COUNTRIES = _mod_tcfz5k.DECODO_EUROPEAN_COUNTRIES;
29
- exports.DECODO_ASIAN_COUNTRIES = _mod_tcfz5k.DECODO_ASIAN_COUNTRIES;
30
- exports.DECODO_US_STATES = _mod_tcfz5k.DECODO_US_STATES;
31
- exports.DECODO_COMMON_CITIES = _mod_tcfz5k.DECODO_COMMON_CITIES;
32
- exports.getRandomDecodoDeviceType = _mod_tcfz5k.getRandomDeviceType;
33
- exports.getRandomDecodoLocale = _mod_tcfz5k.getRandomLocale;
34
- exports.getRandomDecodoCountry = _mod_tcfz5k.getRandomCountry;
35
- exports.getRandomDecodoCity = _mod_tcfz5k.getRandomCity;
36
- exports.generateDecodoSessionId = _mod_tcfz5k.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_kx45pf = require('./manager.cjs');
6
- exports.ProxyManager = _mod_kx45pf.ProxyManager;;
7
- const _mod_2nb4l8 = require('./parse.cjs');
8
- exports.parseProxyString = _mod_2nb4l8.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_yjjhva = require('./queue.cjs');
2
- exports.RezoQueue = _mod_yjjhva.RezoQueue;;
3
- const _mod_ldf5pb = require('./http-queue.cjs');
4
- exports.HttpQueue = _mod_ldf5pb.HttpQueue;
5
- exports.extractDomain = _mod_ldf5pb.extractDomain;;
6
- const _mod_s98b4j = require('./types.cjs');
7
- exports.Priority = _mod_s98b4j.Priority;
8
- exports.HttpMethodPriority = _mod_s98b4j.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_gs00ud = require('./event-emitter.cjs');
2
- exports.UniversalEventEmitter = _mod_gs00ud.UniversalEventEmitter;;
3
- const _mod_oxrw52 = require('./stream.cjs');
4
- exports.UniversalStreamResponse = _mod_oxrw52.UniversalStreamResponse;
5
- exports.StreamResponse = _mod_oxrw52.StreamResponse;;
6
- const _mod_x19ane = require('./download.cjs');
7
- exports.UniversalDownloadResponse = _mod_x19ane.UniversalDownloadResponse;
8
- exports.DownloadResponse = _mod_x19ane.DownloadResponse;;
9
- const _mod_il3702 = require('./upload.cjs');
10
- exports.UniversalUploadResponse = _mod_il3702.UniversalUploadResponse;
11
- exports.UploadResponse = _mod_il3702.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.41",
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",