rezo 1.0.23 → 1.0.24
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/fetch.cjs +5 -1
- package/dist/adapters/fetch.js +5 -1
- package/dist/adapters/http.cjs +67 -9
- package/dist/adapters/http.js +67 -9
- package/dist/adapters/http2.cjs +5 -1
- package/dist/adapters/http2.js +5 -1
- package/dist/adapters/index.cjs +6 -6
- package/dist/cache/index.cjs +13 -13
- package/dist/entries/crawler.cjs +5 -5
- package/dist/index.cjs +24 -24
- 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 +0 -3
- package/dist/utils/http-config.js +0 -3
- package/package.json +1 -1
package/dist/adapters/fetch.cjs
CHANGED
|
@@ -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
|
-
|
|
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,
|
package/dist/adapters/fetch.js
CHANGED
|
@@ -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
|
-
|
|
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,
|
package/dist/adapters/http.cjs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,25 @@ 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.
|
|
881
|
-
socket.
|
|
928
|
+
if (socket && typeof socket.ref === "function") {
|
|
929
|
+
socket.ref();
|
|
882
930
|
}
|
|
931
|
+
socket.on("error", (err) => {
|
|
932
|
+
_stats.statusOnNext = "error";
|
|
933
|
+
const error = buildSmartError(config, fetchOptions, err);
|
|
934
|
+
resolve(error);
|
|
935
|
+
});
|
|
936
|
+
socket.on("close", () => {
|
|
937
|
+
if (socket && typeof socket.unref === "function") {
|
|
938
|
+
socket.unref();
|
|
939
|
+
}
|
|
940
|
+
});
|
|
883
941
|
timing.dnsStart = performance.now();
|
|
884
942
|
config.timing.domainLookupStart = timing.dnsStart;
|
|
885
943
|
socket.on("lookup", (err, address, family) => {
|
package/dist/adapters/http.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,25 @@ 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.
|
|
881
|
-
socket.
|
|
928
|
+
if (socket && typeof socket.ref === "function") {
|
|
929
|
+
socket.ref();
|
|
882
930
|
}
|
|
931
|
+
socket.on("error", (err) => {
|
|
932
|
+
_stats.statusOnNext = "error";
|
|
933
|
+
const error = buildSmartError(config, fetchOptions, err);
|
|
934
|
+
resolve(error);
|
|
935
|
+
});
|
|
936
|
+
socket.on("close", () => {
|
|
937
|
+
if (socket && typeof socket.unref === "function") {
|
|
938
|
+
socket.unref();
|
|
939
|
+
}
|
|
940
|
+
});
|
|
883
941
|
timing.dnsStart = performance.now();
|
|
884
942
|
config.timing.domainLookupStart = timing.dnsStart;
|
|
885
943
|
socket.on("lookup", (err, address, family) => {
|
package/dist/adapters/http2.cjs
CHANGED
|
@@ -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
|
-
|
|
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 () => {
|
package/dist/adapters/http2.js
CHANGED
|
@@ -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
|
-
|
|
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 () => {
|
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_ncjrtt = require('./picker.cjs');
|
|
2
|
+
exports.detectRuntime = _mod_ncjrtt.detectRuntime;
|
|
3
|
+
exports.getAdapterCapabilities = _mod_ncjrtt.getAdapterCapabilities;
|
|
4
|
+
exports.buildAdapterContext = _mod_ncjrtt.buildAdapterContext;
|
|
5
|
+
exports.getAvailableAdapters = _mod_ncjrtt.getAvailableAdapters;
|
|
6
|
+
exports.selectAdapter = _mod_ncjrtt.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_l7ow4q = require('./lru-cache.cjs');
|
|
2
|
+
exports.LRUCache = _mod_l7ow4q.LRUCache;;
|
|
3
|
+
const _mod_tpblqv = require('./dns-cache.cjs');
|
|
4
|
+
exports.DNSCache = _mod_tpblqv.DNSCache;
|
|
5
|
+
exports.getGlobalDNSCache = _mod_tpblqv.getGlobalDNSCache;
|
|
6
|
+
exports.resetGlobalDNSCache = _mod_tpblqv.resetGlobalDNSCache;;
|
|
7
|
+
const _mod_4rqtce = require('./response-cache.cjs');
|
|
8
|
+
exports.ResponseCache = _mod_4rqtce.ResponseCache;
|
|
9
|
+
exports.normalizeResponseCacheConfig = _mod_4rqtce.normalizeResponseCacheConfig;;
|
|
10
|
+
const _mod_uyhauf = require('./file-cacher.cjs');
|
|
11
|
+
exports.FileCacher = _mod_uyhauf.FileCacher;;
|
|
12
|
+
const _mod_vrr530 = require('./url-store.cjs');
|
|
13
|
+
exports.UrlStore = _mod_vrr530.UrlStore;;
|
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_svweel = require('../plugin/crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_svweel.Crawler;;
|
|
3
|
+
const _mod_vyrtez = require('../plugin/crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_vyrtez.CrawlerOptions;
|
|
5
|
+
exports.Domain = _mod_vyrtez.Domain;;
|
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_709l2k = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_709l2k.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_709l2k.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_709l2k.createDefaultInstance;;
|
|
5
|
+
const _mod_4pfhn3 = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_4pfhn3.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_4pfhn3.RezoErrorCode;;
|
|
8
|
+
const _mod_c4cz93 = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_c4cz93.RezoHeaders;;
|
|
10
|
+
const _mod_jughps = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_jughps.RezoFormData;;
|
|
12
|
+
const _mod_hiuujv = require('./utils/cookies.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_hiuujv.RezoCookieJar;
|
|
14
|
+
exports.Cookie = _mod_hiuujv.Cookie;;
|
|
15
|
+
const _mod_0o40uv = require('./core/hooks.cjs');
|
|
16
|
+
exports.createDefaultHooks = _mod_0o40uv.createDefaultHooks;
|
|
17
|
+
exports.mergeHooks = _mod_0o40uv.mergeHooks;;
|
|
18
|
+
const _mod_cvs7bl = require('./proxy/manager.cjs');
|
|
19
|
+
exports.ProxyManager = _mod_cvs7bl.ProxyManager;;
|
|
20
|
+
const _mod_9w2rwz = require('./queue/index.cjs');
|
|
21
|
+
exports.RezoQueue = _mod_9w2rwz.RezoQueue;
|
|
22
|
+
exports.HttpQueue = _mod_9w2rwz.HttpQueue;
|
|
23
|
+
exports.Priority = _mod_9w2rwz.Priority;
|
|
24
|
+
exports.HttpMethodPriority = _mod_9w2rwz.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/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_2h7zi4 = require('./crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_2h7zi4.Crawler;;
|
|
3
|
+
const _mod_hq5ai3 = require('./crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_hq5ai3.CrawlerOptions;;
|
|
5
|
+
const _mod_802owd = require('../cache/file-cacher.cjs');
|
|
6
|
+
exports.FileCacher = _mod_802owd.FileCacher;;
|
|
7
|
+
const _mod_1pspqz = require('../cache/url-store.cjs');
|
|
8
|
+
exports.UrlStore = _mod_1pspqz.UrlStore;;
|
|
9
|
+
const _mod_rk4fkq = require('./addon/oxylabs/index.cjs');
|
|
10
|
+
exports.Oxylabs = _mod_rk4fkq.Oxylabs;;
|
|
11
|
+
const _mod_1mm6ev = require('./addon/oxylabs/options.cjs');
|
|
12
|
+
exports.OXYLABS_BROWSER_TYPES = _mod_1mm6ev.OXYLABS_BROWSER_TYPES;
|
|
13
|
+
exports.OXYLABS_COMMON_LOCALES = _mod_1mm6ev.OXYLABS_COMMON_LOCALES;
|
|
14
|
+
exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_1mm6ev.OXYLABS_COMMON_GEO_LOCATIONS;
|
|
15
|
+
exports.OXYLABS_US_STATES = _mod_1mm6ev.OXYLABS_US_STATES;
|
|
16
|
+
exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_1mm6ev.OXYLABS_EUROPEAN_COUNTRIES;
|
|
17
|
+
exports.OXYLABS_ASIAN_COUNTRIES = _mod_1mm6ev.OXYLABS_ASIAN_COUNTRIES;
|
|
18
|
+
exports.getRandomOxylabsBrowserType = _mod_1mm6ev.getRandomBrowserType;
|
|
19
|
+
exports.getRandomOxylabsLocale = _mod_1mm6ev.getRandomLocale;
|
|
20
|
+
exports.getRandomOxylabsGeoLocation = _mod_1mm6ev.getRandomGeoLocation;;
|
|
21
|
+
const _mod_yfyj7o = require('./addon/decodo/index.cjs');
|
|
22
|
+
exports.Decodo = _mod_yfyj7o.Decodo;;
|
|
23
|
+
const _mod_ixh6o9 = require('./addon/decodo/options.cjs');
|
|
24
|
+
exports.DECODO_DEVICE_TYPES = _mod_ixh6o9.DECODO_DEVICE_TYPES;
|
|
25
|
+
exports.DECODO_HEADLESS_MODES = _mod_ixh6o9.DECODO_HEADLESS_MODES;
|
|
26
|
+
exports.DECODO_COMMON_LOCALES = _mod_ixh6o9.DECODO_COMMON_LOCALES;
|
|
27
|
+
exports.DECODO_COMMON_COUNTRIES = _mod_ixh6o9.DECODO_COMMON_COUNTRIES;
|
|
28
|
+
exports.DECODO_EUROPEAN_COUNTRIES = _mod_ixh6o9.DECODO_EUROPEAN_COUNTRIES;
|
|
29
|
+
exports.DECODO_ASIAN_COUNTRIES = _mod_ixh6o9.DECODO_ASIAN_COUNTRIES;
|
|
30
|
+
exports.DECODO_US_STATES = _mod_ixh6o9.DECODO_US_STATES;
|
|
31
|
+
exports.DECODO_COMMON_CITIES = _mod_ixh6o9.DECODO_COMMON_CITIES;
|
|
32
|
+
exports.getRandomDecodoDeviceType = _mod_ixh6o9.getRandomDeviceType;
|
|
33
|
+
exports.getRandomDecodoLocale = _mod_ixh6o9.getRandomLocale;
|
|
34
|
+
exports.getRandomDecodoCountry = _mod_ixh6o9.getRandomCountry;
|
|
35
|
+
exports.getRandomDecodoCity = _mod_ixh6o9.getRandomCity;
|
|
36
|
+
exports.generateDecodoSessionId = _mod_ixh6o9.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_za54yh = require('./manager.cjs');
|
|
5
|
+
exports.ProxyManager = _mod_za54yh.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_46s3ou = require('./queue.cjs');
|
|
2
|
+
exports.RezoQueue = _mod_46s3ou.RezoQueue;;
|
|
3
|
+
const _mod_4wb7cj = require('./http-queue.cjs');
|
|
4
|
+
exports.HttpQueue = _mod_4wb7cj.HttpQueue;
|
|
5
|
+
exports.extractDomain = _mod_4wb7cj.extractDomain;;
|
|
6
|
+
const _mod_6ok396 = require('./types.cjs');
|
|
7
|
+
exports.Priority = _mod_6ok396.Priority;
|
|
8
|
+
exports.HttpMethodPriority = _mod_6ok396.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.
|
|
3
|
+
"version": "1.0.24",
|
|
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",
|