rezo 1.0.23 → 1.0.25

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.
@@ -642,7 +642,11 @@ async function executeSingleFetchRequest(config, fetchOptions, requestCount, tim
642
642
  const isRedirect = status >= 300 && status < 400 && location;
643
643
  if (isRedirect) {
644
644
  _stats.statusOnNext = "redirect";
645
- _stats.redirectUrl = new URL(location, url).href;
645
+ const redirectUrlObj = new URL(location, url);
646
+ if (!redirectUrlObj.hash && url.hash) {
647
+ redirectUrlObj.hash = url.hash;
648
+ }
649
+ _stats.redirectUrl = redirectUrlObj.href;
646
650
  const partialResponse = {
647
651
  data: "",
648
652
  status,
@@ -642,7 +642,11 @@ async function executeSingleFetchRequest(config, fetchOptions, requestCount, tim
642
642
  const isRedirect = status >= 300 && status < 400 && location;
643
643
  if (isRedirect) {
644
644
  _stats.statusOnNext = "redirect";
645
- _stats.redirectUrl = new URL(location, url).href;
645
+ const redirectUrlObj = new URL(location, url);
646
+ if (!redirectUrlObj.hash && url.hash) {
647
+ redirectUrlObj.hash = url.hash;
648
+ }
649
+ _stats.redirectUrl = redirectUrlObj.href;
646
650
  const partialResponse = {
647
651
  data: "",
648
652
  status,
@@ -290,10 +290,19 @@ async function executeRequest(options, defaultOptions, jar) {
290
290
  try {
291
291
  const res = executeHttp1Request(config.fetchOptions, mainConfig, config.options, perform, d_options.fs, streamResponse, downloadResponse, uploadResponse);
292
292
  if (streamResponse) {
293
+ res.catch((err) => {
294
+ streamResponse.emit("error", err);
295
+ });
293
296
  return streamResponse;
294
297
  } else if (downloadResponse) {
298
+ res.catch((err) => {
299
+ downloadResponse.emit("error", err);
300
+ });
295
301
  return downloadResponse;
296
302
  } else if (uploadResponse) {
303
+ res.catch((err) => {
304
+ uploadResponse.emit("error", err);
305
+ });
297
306
  return uploadResponse;
298
307
  }
299
308
  const response = await res;
@@ -416,17 +425,32 @@ async function executeHttp1Request(fetchOptions, config, options, perform, fs, s
416
425
  const addedOptions = {};
417
426
  const location = _stats.redirectUrl;
418
427
  if (!location || !_stats.redirectUrl) {
419
- throw builErrorFromResponse("Redirect location not found", response, config, fetchOptions);
428
+ const redirectError = builErrorFromResponse("Redirect location not found", response, config, fetchOptions);
429
+ _stats.statusOnNext = "error";
430
+ if (!config.errors)
431
+ config.errors = [];
432
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
433
+ throw redirectError;
420
434
  }
421
435
  if (config.maxRedirects === 0) {
422
436
  config.maxRedirectsReached = true;
423
- throw builErrorFromResponse(`Redirects are disabled (maxRedirects=0)`, response, config, fetchOptions);
437
+ const redirectError = builErrorFromResponse(`Redirects are disabled (maxRedirects=0)`, response, config, fetchOptions);
438
+ _stats.statusOnNext = "error";
439
+ if (!config.errors)
440
+ config.errors = [];
441
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
442
+ throw redirectError;
424
443
  }
425
444
  const enableCycleDetection = config.enableRedirectCycleDetection === true;
426
445
  if (enableCycleDetection) {
427
446
  const normalizedRedirectUrl = _stats.redirectUrl.toLowerCase();
428
447
  if (visitedUrls.has(normalizedRedirectUrl)) {
429
- throw builErrorFromResponse(`Redirect cycle detected: attempting to revisit ${_stats.redirectUrl}`, response, config, fetchOptions);
448
+ const redirectError = builErrorFromResponse(`Redirect cycle detected: attempting to revisit ${_stats.redirectUrl}`, response, config, fetchOptions);
449
+ _stats.statusOnNext = "error";
450
+ if (!config.errors)
451
+ config.errors = [];
452
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
453
+ throw redirectError;
430
454
  }
431
455
  visitedUrls.add(normalizedRedirectUrl);
432
456
  }
@@ -443,15 +467,30 @@ async function executeHttp1Request(fetchOptions, config, options, perform, fs, s
443
467
  if (typeof onRedirect !== "undefined") {
444
468
  if (typeof onRedirect === "boolean") {
445
469
  if (!onRedirect) {
446
- throw builErrorFromResponse("Redirect denied by user", response, config, fetchOptions);
470
+ const redirectError = builErrorFromResponse("Redirect denied by user", response, config, fetchOptions);
471
+ _stats.statusOnNext = "error";
472
+ if (!config.errors)
473
+ config.errors = [];
474
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
475
+ throw redirectError;
447
476
  }
448
477
  } else if (!onRedirect.redirect) {
449
- throw builErrorFromResponse("Redirect denied by user", response, config, fetchOptions);
478
+ const redirectError = builErrorFromResponse("Redirect denied by user", response, config, fetchOptions);
479
+ _stats.statusOnNext = "error";
480
+ if (!config.errors)
481
+ config.errors = [];
482
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
483
+ throw redirectError;
450
484
  }
451
485
  }
452
486
  if (config.redirectCount >= config.maxRedirects && config.maxRedirects > 0) {
453
487
  config.maxRedirectsReached = true;
454
- throw builErrorFromResponse(`Max redirects (${config.maxRedirects}) reached`, response, config, fetchOptions);
488
+ const redirectError = builErrorFromResponse(`Max redirects (${config.maxRedirects}) reached`, response, config, fetchOptions);
489
+ _stats.statusOnNext = "error";
490
+ if (!config.errors)
491
+ config.errors = [];
492
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
493
+ throw redirectError;
455
494
  }
456
495
  config.redirectHistory.push({
457
496
  url: fetchOptions.fullUrl,
@@ -646,7 +685,11 @@ async function request(config, fetchOptions, requestCount, timing, _stats, respo
646
685
  if (isRedirected)
647
686
  _stats.statusOnNext = "redirect";
648
687
  if (isRedirected && location) {
649
- _stats.redirectUrl = new URL(location, url).href;
688
+ const redirectUrlObj = new URL(location, url);
689
+ if (!redirectUrlObj.hash && url.hash) {
690
+ redirectUrlObj.hash = url.hash;
691
+ }
692
+ _stats.redirectUrl = redirectUrlObj.href;
650
693
  if (config.redirectCount) {
651
694
  config.redirectCount++;
652
695
  } else {
@@ -876,10 +919,17 @@ async function request(config, fetchOptions, requestCount, timing, _stats, respo
876
919
  });
877
920
  }
878
921
  });
922
+ req.on("error", (err) => {
923
+ _stats.statusOnNext = "error";
924
+ const error = buildSmartError(config, fetchOptions, err);
925
+ resolve(error);
926
+ });
879
927
  req.on("socket", (socket) => {
880
- if (socket && typeof socket.unref === "function") {
881
- socket.unref();
882
- }
928
+ socket.on("error", (err) => {
929
+ _stats.statusOnNext = "error";
930
+ const error = buildSmartError(config, fetchOptions, err);
931
+ resolve(error);
932
+ });
883
933
  timing.dnsStart = performance.now();
884
934
  config.timing.domainLookupStart = timing.dnsStart;
885
935
  socket.on("lookup", (err, address, family) => {
@@ -290,10 +290,19 @@ export async function executeRequest(options, defaultOptions, jar) {
290
290
  try {
291
291
  const res = executeHttp1Request(config.fetchOptions, mainConfig, config.options, perform, d_options.fs, streamResponse, downloadResponse, uploadResponse);
292
292
  if (streamResponse) {
293
+ res.catch((err) => {
294
+ streamResponse.emit("error", err);
295
+ });
293
296
  return streamResponse;
294
297
  } else if (downloadResponse) {
298
+ res.catch((err) => {
299
+ downloadResponse.emit("error", err);
300
+ });
295
301
  return downloadResponse;
296
302
  } else if (uploadResponse) {
303
+ res.catch((err) => {
304
+ uploadResponse.emit("error", err);
305
+ });
297
306
  return uploadResponse;
298
307
  }
299
308
  const response = await res;
@@ -416,17 +425,32 @@ async function executeHttp1Request(fetchOptions, config, options, perform, fs, s
416
425
  const addedOptions = {};
417
426
  const location = _stats.redirectUrl;
418
427
  if (!location || !_stats.redirectUrl) {
419
- throw builErrorFromResponse("Redirect location not found", response, config, fetchOptions);
428
+ const redirectError = builErrorFromResponse("Redirect location not found", response, config, fetchOptions);
429
+ _stats.statusOnNext = "error";
430
+ if (!config.errors)
431
+ config.errors = [];
432
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
433
+ throw redirectError;
420
434
  }
421
435
  if (config.maxRedirects === 0) {
422
436
  config.maxRedirectsReached = true;
423
- throw builErrorFromResponse(`Redirects are disabled (maxRedirects=0)`, response, config, fetchOptions);
437
+ const redirectError = builErrorFromResponse(`Redirects are disabled (maxRedirects=0)`, response, config, fetchOptions);
438
+ _stats.statusOnNext = "error";
439
+ if (!config.errors)
440
+ config.errors = [];
441
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
442
+ throw redirectError;
424
443
  }
425
444
  const enableCycleDetection = config.enableRedirectCycleDetection === true;
426
445
  if (enableCycleDetection) {
427
446
  const normalizedRedirectUrl = _stats.redirectUrl.toLowerCase();
428
447
  if (visitedUrls.has(normalizedRedirectUrl)) {
429
- throw builErrorFromResponse(`Redirect cycle detected: attempting to revisit ${_stats.redirectUrl}`, response, config, fetchOptions);
448
+ const redirectError = builErrorFromResponse(`Redirect cycle detected: attempting to revisit ${_stats.redirectUrl}`, response, config, fetchOptions);
449
+ _stats.statusOnNext = "error";
450
+ if (!config.errors)
451
+ config.errors = [];
452
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
453
+ throw redirectError;
430
454
  }
431
455
  visitedUrls.add(normalizedRedirectUrl);
432
456
  }
@@ -443,15 +467,30 @@ async function executeHttp1Request(fetchOptions, config, options, perform, fs, s
443
467
  if (typeof onRedirect !== "undefined") {
444
468
  if (typeof onRedirect === "boolean") {
445
469
  if (!onRedirect) {
446
- throw builErrorFromResponse("Redirect denied by user", response, config, fetchOptions);
470
+ const redirectError = builErrorFromResponse("Redirect denied by user", response, config, fetchOptions);
471
+ _stats.statusOnNext = "error";
472
+ if (!config.errors)
473
+ config.errors = [];
474
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
475
+ throw redirectError;
447
476
  }
448
477
  } else if (!onRedirect.redirect) {
449
- throw builErrorFromResponse("Redirect denied by user", response, config, fetchOptions);
478
+ const redirectError = builErrorFromResponse("Redirect denied by user", response, config, fetchOptions);
479
+ _stats.statusOnNext = "error";
480
+ if (!config.errors)
481
+ config.errors = [];
482
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
483
+ throw redirectError;
450
484
  }
451
485
  }
452
486
  if (config.redirectCount >= config.maxRedirects && config.maxRedirects > 0) {
453
487
  config.maxRedirectsReached = true;
454
- throw builErrorFromResponse(`Max redirects (${config.maxRedirects}) reached`, response, config, fetchOptions);
488
+ const redirectError = builErrorFromResponse(`Max redirects (${config.maxRedirects}) reached`, response, config, fetchOptions);
489
+ _stats.statusOnNext = "error";
490
+ if (!config.errors)
491
+ config.errors = [];
492
+ config.errors.push({ attempt: config.retryAttempts + 1, error: redirectError, duration: perform.now() });
493
+ throw redirectError;
455
494
  }
456
495
  config.redirectHistory.push({
457
496
  url: fetchOptions.fullUrl,
@@ -646,7 +685,11 @@ async function request(config, fetchOptions, requestCount, timing, _stats, respo
646
685
  if (isRedirected)
647
686
  _stats.statusOnNext = "redirect";
648
687
  if (isRedirected && location) {
649
- _stats.redirectUrl = new URL(location, url).href;
688
+ const redirectUrlObj = new URL(location, url);
689
+ if (!redirectUrlObj.hash && url.hash) {
690
+ redirectUrlObj.hash = url.hash;
691
+ }
692
+ _stats.redirectUrl = redirectUrlObj.href;
650
693
  if (config.redirectCount) {
651
694
  config.redirectCount++;
652
695
  } else {
@@ -876,10 +919,17 @@ async function request(config, fetchOptions, requestCount, timing, _stats, respo
876
919
  });
877
920
  }
878
921
  });
922
+ req.on("error", (err) => {
923
+ _stats.statusOnNext = "error";
924
+ const error = buildSmartError(config, fetchOptions, err);
925
+ resolve(error);
926
+ });
879
927
  req.on("socket", (socket) => {
880
- if (socket && typeof socket.unref === "function") {
881
- socket.unref();
882
- }
928
+ socket.on("error", (err) => {
929
+ _stats.statusOnNext = "error";
930
+ const error = buildSmartError(config, fetchOptions, err);
931
+ resolve(error);
932
+ });
883
933
  timing.dnsStart = performance.now();
884
934
  config.timing.domainLookupStart = timing.dnsStart;
885
935
  socket.on("lookup", (err, address, family) => {
@@ -824,7 +824,11 @@ async function executeHttp2Stream(config, fetchOptions, requestCount, timing, _s
824
824
  const isRedirect = status >= 300 && status < 400 && location;
825
825
  if (isRedirect) {
826
826
  _stats.statusOnNext = "redirect";
827
- _stats.redirectUrl = new URL(location, url).href;
827
+ const redirectUrlObj = new URL(location, url);
828
+ if (!redirectUrlObj.hash && url.hash) {
829
+ redirectUrlObj.hash = url.hash;
830
+ }
831
+ _stats.redirectUrl = redirectUrlObj.href;
828
832
  }
829
833
  config.network.httpVersion = "h2";
830
834
  (async () => {
@@ -824,7 +824,11 @@ async function executeHttp2Stream(config, fetchOptions, requestCount, timing, _s
824
824
  const isRedirect = status >= 300 && status < 400 && location;
825
825
  if (isRedirect) {
826
826
  _stats.statusOnNext = "redirect";
827
- _stats.redirectUrl = new URL(location, url).href;
827
+ const redirectUrlObj = new URL(location, url);
828
+ if (!redirectUrlObj.hash && url.hash) {
829
+ redirectUrlObj.hash = url.hash;
830
+ }
831
+ _stats.redirectUrl = redirectUrlObj.href;
828
832
  }
829
833
  config.network.httpVersion = "h2";
830
834
  (async () => {
@@ -1,6 +1,6 @@
1
- const _mod_nbovud = require('./picker.cjs');
2
- exports.detectRuntime = _mod_nbovud.detectRuntime;
3
- exports.getAdapterCapabilities = _mod_nbovud.getAdapterCapabilities;
4
- exports.buildAdapterContext = _mod_nbovud.buildAdapterContext;
5
- exports.getAvailableAdapters = _mod_nbovud.getAvailableAdapters;
6
- exports.selectAdapter = _mod_nbovud.selectAdapter;;
1
+ const _mod_8vsbsk = require('./picker.cjs');
2
+ exports.detectRuntime = _mod_8vsbsk.detectRuntime;
3
+ exports.getAdapterCapabilities = _mod_8vsbsk.getAdapterCapabilities;
4
+ exports.buildAdapterContext = _mod_8vsbsk.buildAdapterContext;
5
+ exports.getAvailableAdapters = _mod_8vsbsk.getAvailableAdapters;
6
+ exports.selectAdapter = _mod_8vsbsk.selectAdapter;;
@@ -1,13 +1,13 @@
1
- const _mod_gcibom = require('./lru-cache.cjs');
2
- exports.LRUCache = _mod_gcibom.LRUCache;;
3
- const _mod_1nnd9l = require('./dns-cache.cjs');
4
- exports.DNSCache = _mod_1nnd9l.DNSCache;
5
- exports.getGlobalDNSCache = _mod_1nnd9l.getGlobalDNSCache;
6
- exports.resetGlobalDNSCache = _mod_1nnd9l.resetGlobalDNSCache;;
7
- const _mod_lmofxo = require('./response-cache.cjs');
8
- exports.ResponseCache = _mod_lmofxo.ResponseCache;
9
- exports.normalizeResponseCacheConfig = _mod_lmofxo.normalizeResponseCacheConfig;;
10
- const _mod_xgo0i6 = require('./file-cacher.cjs');
11
- exports.FileCacher = _mod_xgo0i6.FileCacher;;
12
- const _mod_9ouiu9 = require('./url-store.cjs');
13
- exports.UrlStore = _mod_9ouiu9.UrlStore;;
1
+ const _mod_3nlvak = require('./lru-cache.cjs');
2
+ exports.LRUCache = _mod_3nlvak.LRUCache;;
3
+ const _mod_jjdx5e = require('./dns-cache.cjs');
4
+ exports.DNSCache = _mod_jjdx5e.DNSCache;
5
+ exports.getGlobalDNSCache = _mod_jjdx5e.getGlobalDNSCache;
6
+ exports.resetGlobalDNSCache = _mod_jjdx5e.resetGlobalDNSCache;;
7
+ const _mod_6grfwd = require('./response-cache.cjs');
8
+ exports.ResponseCache = _mod_6grfwd.ResponseCache;
9
+ exports.normalizeResponseCacheConfig = _mod_6grfwd.normalizeResponseCacheConfig;;
10
+ const _mod_ietsvu = require('./file-cacher.cjs');
11
+ exports.FileCacher = _mod_ietsvu.FileCacher;;
12
+ const _mod_o14hsh = require('./url-store.cjs');
13
+ exports.UrlStore = _mod_o14hsh.UrlStore;;
@@ -1,5 +1,5 @@
1
- const _mod_j6t9ay = require('../plugin/crawler.cjs');
2
- exports.Crawler = _mod_j6t9ay.Crawler;;
3
- const _mod_jqrm0t = require('../plugin/crawler-options.cjs');
4
- exports.CrawlerOptions = _mod_jqrm0t.CrawlerOptions;
5
- exports.Domain = _mod_jqrm0t.Domain;;
1
+ const _mod_n2jqd1 = require('../plugin/crawler.cjs');
2
+ exports.Crawler = _mod_n2jqd1.Crawler;;
3
+ const _mod_wyfomf = require('../plugin/crawler-options.cjs');
4
+ exports.CrawlerOptions = _mod_wyfomf.CrawlerOptions;
5
+ exports.Domain = _mod_wyfomf.Domain;;
package/dist/index.cjs CHANGED
@@ -1,27 +1,27 @@
1
- const _mod_bseuia = require('./core/rezo.cjs');
2
- exports.Rezo = _mod_bseuia.Rezo;
3
- exports.createRezoInstance = _mod_bseuia.createRezoInstance;
4
- exports.createDefaultInstance = _mod_bseuia.createDefaultInstance;;
5
- const _mod_mzimmd = require('./errors/rezo-error.cjs');
6
- exports.RezoError = _mod_mzimmd.RezoError;
7
- exports.RezoErrorCode = _mod_mzimmd.RezoErrorCode;;
8
- const _mod_r9peyg = require('./utils/headers.cjs');
9
- exports.RezoHeaders = _mod_r9peyg.RezoHeaders;;
10
- const _mod_7pvqmp = require('./utils/form-data.cjs');
11
- exports.RezoFormData = _mod_7pvqmp.RezoFormData;;
12
- const _mod_vdykyy = require('./utils/cookies.cjs');
13
- exports.RezoCookieJar = _mod_vdykyy.RezoCookieJar;
14
- exports.Cookie = _mod_vdykyy.Cookie;;
15
- const _mod_3p5c5b = require('./core/hooks.cjs');
16
- exports.createDefaultHooks = _mod_3p5c5b.createDefaultHooks;
17
- exports.mergeHooks = _mod_3p5c5b.mergeHooks;;
18
- const _mod_vd73s2 = require('./proxy/manager.cjs');
19
- exports.ProxyManager = _mod_vd73s2.ProxyManager;;
20
- const _mod_dqq646 = require('./queue/index.cjs');
21
- exports.RezoQueue = _mod_dqq646.RezoQueue;
22
- exports.HttpQueue = _mod_dqq646.HttpQueue;
23
- exports.Priority = _mod_dqq646.Priority;
24
- exports.HttpMethodPriority = _mod_dqq646.HttpMethodPriority;;
1
+ const _mod_c5wnbk = require('./core/rezo.cjs');
2
+ exports.Rezo = _mod_c5wnbk.Rezo;
3
+ exports.createRezoInstance = _mod_c5wnbk.createRezoInstance;
4
+ exports.createDefaultInstance = _mod_c5wnbk.createDefaultInstance;;
5
+ const _mod_vk9phy = require('./errors/rezo-error.cjs');
6
+ exports.RezoError = _mod_vk9phy.RezoError;
7
+ exports.RezoErrorCode = _mod_vk9phy.RezoErrorCode;;
8
+ const _mod_smhm1d = require('./utils/headers.cjs');
9
+ exports.RezoHeaders = _mod_smhm1d.RezoHeaders;;
10
+ const _mod_umbtma = require('./utils/form-data.cjs');
11
+ exports.RezoFormData = _mod_umbtma.RezoFormData;;
12
+ const _mod_s4d2mf = require('./utils/cookies.cjs');
13
+ exports.RezoCookieJar = _mod_s4d2mf.RezoCookieJar;
14
+ exports.Cookie = _mod_s4d2mf.Cookie;;
15
+ const _mod_lqyqqc = require('./core/hooks.cjs');
16
+ exports.createDefaultHooks = _mod_lqyqqc.createDefaultHooks;
17
+ exports.mergeHooks = _mod_lqyqqc.mergeHooks;;
18
+ const _mod_9k2fte = require('./proxy/manager.cjs');
19
+ exports.ProxyManager = _mod_9k2fte.ProxyManager;;
20
+ const _mod_dw7oqs = require('./queue/index.cjs');
21
+ exports.RezoQueue = _mod_dw7oqs.RezoQueue;
22
+ exports.HttpQueue = _mod_dw7oqs.HttpQueue;
23
+ exports.Priority = _mod_dw7oqs.Priority;
24
+ exports.HttpMethodPriority = _mod_dw7oqs.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_ey9wal = require('./crawler.cjs');
2
- exports.Crawler = _mod_ey9wal.Crawler;;
3
- const _mod_1a0svj = require('./crawler-options.cjs');
4
- exports.CrawlerOptions = _mod_1a0svj.CrawlerOptions;;
5
- const _mod_ldpz72 = require('../cache/file-cacher.cjs');
6
- exports.FileCacher = _mod_ldpz72.FileCacher;;
7
- const _mod_n14nrr = require('../cache/url-store.cjs');
8
- exports.UrlStore = _mod_n14nrr.UrlStore;;
9
- const _mod_cg7bvo = require('./addon/oxylabs/index.cjs');
10
- exports.Oxylabs = _mod_cg7bvo.Oxylabs;;
11
- const _mod_06iufd = require('./addon/oxylabs/options.cjs');
12
- exports.OXYLABS_BROWSER_TYPES = _mod_06iufd.OXYLABS_BROWSER_TYPES;
13
- exports.OXYLABS_COMMON_LOCALES = _mod_06iufd.OXYLABS_COMMON_LOCALES;
14
- exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_06iufd.OXYLABS_COMMON_GEO_LOCATIONS;
15
- exports.OXYLABS_US_STATES = _mod_06iufd.OXYLABS_US_STATES;
16
- exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_06iufd.OXYLABS_EUROPEAN_COUNTRIES;
17
- exports.OXYLABS_ASIAN_COUNTRIES = _mod_06iufd.OXYLABS_ASIAN_COUNTRIES;
18
- exports.getRandomOxylabsBrowserType = _mod_06iufd.getRandomBrowserType;
19
- exports.getRandomOxylabsLocale = _mod_06iufd.getRandomLocale;
20
- exports.getRandomOxylabsGeoLocation = _mod_06iufd.getRandomGeoLocation;;
21
- const _mod_1mm4n9 = require('./addon/decodo/index.cjs');
22
- exports.Decodo = _mod_1mm4n9.Decodo;;
23
- const _mod_hramg2 = require('./addon/decodo/options.cjs');
24
- exports.DECODO_DEVICE_TYPES = _mod_hramg2.DECODO_DEVICE_TYPES;
25
- exports.DECODO_HEADLESS_MODES = _mod_hramg2.DECODO_HEADLESS_MODES;
26
- exports.DECODO_COMMON_LOCALES = _mod_hramg2.DECODO_COMMON_LOCALES;
27
- exports.DECODO_COMMON_COUNTRIES = _mod_hramg2.DECODO_COMMON_COUNTRIES;
28
- exports.DECODO_EUROPEAN_COUNTRIES = _mod_hramg2.DECODO_EUROPEAN_COUNTRIES;
29
- exports.DECODO_ASIAN_COUNTRIES = _mod_hramg2.DECODO_ASIAN_COUNTRIES;
30
- exports.DECODO_US_STATES = _mod_hramg2.DECODO_US_STATES;
31
- exports.DECODO_COMMON_CITIES = _mod_hramg2.DECODO_COMMON_CITIES;
32
- exports.getRandomDecodoDeviceType = _mod_hramg2.getRandomDeviceType;
33
- exports.getRandomDecodoLocale = _mod_hramg2.getRandomLocale;
34
- exports.getRandomDecodoCountry = _mod_hramg2.getRandomCountry;
35
- exports.getRandomDecodoCity = _mod_hramg2.getRandomCity;
36
- exports.generateDecodoSessionId = _mod_hramg2.generateSessionId;;
1
+ const _mod_nllk9k = require('./crawler.cjs');
2
+ exports.Crawler = _mod_nllk9k.Crawler;;
3
+ const _mod_qrdenz = require('./crawler-options.cjs');
4
+ exports.CrawlerOptions = _mod_qrdenz.CrawlerOptions;;
5
+ const _mod_zrawfy = require('../cache/file-cacher.cjs');
6
+ exports.FileCacher = _mod_zrawfy.FileCacher;;
7
+ const _mod_uvh0y9 = require('../cache/url-store.cjs');
8
+ exports.UrlStore = _mod_uvh0y9.UrlStore;;
9
+ const _mod_cg499j = require('./addon/oxylabs/index.cjs');
10
+ exports.Oxylabs = _mod_cg499j.Oxylabs;;
11
+ const _mod_vqortf = require('./addon/oxylabs/options.cjs');
12
+ exports.OXYLABS_BROWSER_TYPES = _mod_vqortf.OXYLABS_BROWSER_TYPES;
13
+ exports.OXYLABS_COMMON_LOCALES = _mod_vqortf.OXYLABS_COMMON_LOCALES;
14
+ exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_vqortf.OXYLABS_COMMON_GEO_LOCATIONS;
15
+ exports.OXYLABS_US_STATES = _mod_vqortf.OXYLABS_US_STATES;
16
+ exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_vqortf.OXYLABS_EUROPEAN_COUNTRIES;
17
+ exports.OXYLABS_ASIAN_COUNTRIES = _mod_vqortf.OXYLABS_ASIAN_COUNTRIES;
18
+ exports.getRandomOxylabsBrowserType = _mod_vqortf.getRandomBrowserType;
19
+ exports.getRandomOxylabsLocale = _mod_vqortf.getRandomLocale;
20
+ exports.getRandomOxylabsGeoLocation = _mod_vqortf.getRandomGeoLocation;;
21
+ const _mod_tmdzgo = require('./addon/decodo/index.cjs');
22
+ exports.Decodo = _mod_tmdzgo.Decodo;;
23
+ const _mod_lmu5vf = require('./addon/decodo/options.cjs');
24
+ exports.DECODO_DEVICE_TYPES = _mod_lmu5vf.DECODO_DEVICE_TYPES;
25
+ exports.DECODO_HEADLESS_MODES = _mod_lmu5vf.DECODO_HEADLESS_MODES;
26
+ exports.DECODO_COMMON_LOCALES = _mod_lmu5vf.DECODO_COMMON_LOCALES;
27
+ exports.DECODO_COMMON_COUNTRIES = _mod_lmu5vf.DECODO_COMMON_COUNTRIES;
28
+ exports.DECODO_EUROPEAN_COUNTRIES = _mod_lmu5vf.DECODO_EUROPEAN_COUNTRIES;
29
+ exports.DECODO_ASIAN_COUNTRIES = _mod_lmu5vf.DECODO_ASIAN_COUNTRIES;
30
+ exports.DECODO_US_STATES = _mod_lmu5vf.DECODO_US_STATES;
31
+ exports.DECODO_COMMON_CITIES = _mod_lmu5vf.DECODO_COMMON_CITIES;
32
+ exports.getRandomDecodoDeviceType = _mod_lmu5vf.getRandomDeviceType;
33
+ exports.getRandomDecodoLocale = _mod_lmu5vf.getRandomLocale;
34
+ exports.getRandomDecodoCountry = _mod_lmu5vf.getRandomCountry;
35
+ exports.getRandomDecodoCity = _mod_lmu5vf.getRandomCity;
36
+ exports.generateDecodoSessionId = _mod_lmu5vf.generateSessionId;;
@@ -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 _mod_mpoy0o = require('./manager.cjs');
5
- exports.ProxyManager = _mod_mpoy0o.ProxyManager;;
4
+ const _mod_0qa1hk = require('./manager.cjs');
5
+ exports.ProxyManager = _mod_0qa1hk.ProxyManager;;
6
6
  function createOptions(uri, opts) {
7
7
  if (uri instanceof URL || typeof uri === "string") {
8
8
  return {
@@ -1,8 +1,8 @@
1
- const _mod_aupzai = require('./queue.cjs');
2
- exports.RezoQueue = _mod_aupzai.RezoQueue;;
3
- const _mod_6g163q = require('./http-queue.cjs');
4
- exports.HttpQueue = _mod_6g163q.HttpQueue;
5
- exports.extractDomain = _mod_6g163q.extractDomain;;
6
- const _mod_sqrola = require('./types.cjs');
7
- exports.Priority = _mod_sqrola.Priority;
8
- exports.HttpMethodPriority = _mod_sqrola.HttpMethodPriority;;
1
+ const _mod_0h7eic = require('./queue.cjs');
2
+ exports.RezoQueue = _mod_0h7eic.RezoQueue;;
3
+ const _mod_0yp12v = require('./http-queue.cjs');
4
+ exports.HttpQueue = _mod_0yp12v.HttpQueue;
5
+ exports.extractDomain = _mod_0yp12v.extractDomain;;
6
+ const _mod_a7m6vx = require('./types.cjs');
7
+ exports.Priority = _mod_a7m6vx.Priority;
8
+ exports.HttpMethodPriority = _mod_a7m6vx.HttpMethodPriority;;
@@ -171,9 +171,6 @@ function setSignal() {
171
171
  if (this.timeout && typeof this.timeout === "number" && this.timeout > 100) {
172
172
  const controller = new AbortController;
173
173
  const timer = setTimeout(() => controller.abort(), this.timeout);
174
- if (typeof timer === "object" && "unref" in timer) {
175
- timer.unref();
176
- }
177
174
  this.timeoutClearInstanse = timer;
178
175
  this.signal = controller.signal;
179
176
  }
@@ -171,9 +171,6 @@ function setSignal() {
171
171
  if (this.timeout && typeof this.timeout === "number" && this.timeout > 100) {
172
172
  const controller = new AbortController;
173
173
  const timer = setTimeout(() => controller.abort(), this.timeout);
174
- if (typeof timer === "object" && "unref" in timer) {
175
- timer.unref();
176
- }
177
174
  this.timeoutClearInstanse = timer;
178
175
  this.signal = controller.signal;
179
176
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rezo",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
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",