rezo 1.0.87 → 1.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/entries/curl.d.ts +12 -2
- package/dist/adapters/entries/fetch.d.ts +12 -2
- package/dist/adapters/entries/http.d.ts +12 -2
- package/dist/adapters/entries/http2.d.ts +12 -2
- package/dist/adapters/entries/react-native.d.ts +12 -2
- package/dist/adapters/entries/xhr.d.ts +12 -2
- package/dist/adapters/index.cjs +6 -6
- package/dist/cache/index.cjs +9 -9
- package/dist/crawler/index.cjs +42 -42
- package/dist/crawler/plugin/index.cjs +1 -1
- package/dist/crawler.d.ts +11 -1
- package/dist/entries/crawler.cjs +6 -6
- package/dist/index.cjs +31 -31
- package/dist/index.d.ts +12 -2
- package/dist/internal/agents/index.cjs +14 -14
- package/dist/platform/browser.d.ts +12 -2
- package/dist/platform/bun.d.ts +12 -2
- package/dist/platform/deno.d.ts +12 -2
- package/dist/platform/node.d.ts +12 -2
- package/dist/platform/react-native.d.ts +12 -2
- package/dist/platform/worker.d.ts +12 -2
- package/dist/proxy/index.cjs +4 -4
- package/dist/queue/index.cjs +9 -9
- package/dist/queue/queue.cjs +31 -15
- package/dist/queue/queue.js +31 -15
- package/dist/responses/universal/index.cjs +11 -11
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/wget/index.cjs +51 -51
- package/dist/wget/index.d.ts +11 -1
- package/package.json +1 -1
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
/**
|
|
5068
5078
|
* cURL Options Configuration
|
|
5069
5079
|
*
|
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5068
5078
|
export declare const Cancel: typeof RezoError;
|
|
5069
5079
|
export declare const CancelToken: {
|
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
/**
|
|
5068
5078
|
* Type guard to check if an error is a RezoError instance.
|
|
5069
5079
|
*/
|
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5068
5078
|
export declare const Cancel: typeof RezoError;
|
|
5069
5079
|
export declare const CancelToken: {
|
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5068
5078
|
export declare const Cancel: typeof RezoError;
|
|
5069
5079
|
export declare const CancelToken: {
|
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5068
5078
|
export declare const Cancel: typeof RezoError;
|
|
5069
5079
|
export declare const CancelToken: {
|
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_l4pi6n = require('./picker.cjs');
|
|
2
|
+
exports.detectRuntime = _mod_l4pi6n.detectRuntime;
|
|
3
|
+
exports.getAdapterCapabilities = _mod_l4pi6n.getAdapterCapabilities;
|
|
4
|
+
exports.buildAdapterContext = _mod_l4pi6n.buildAdapterContext;
|
|
5
|
+
exports.getAvailableAdapters = _mod_l4pi6n.getAvailableAdapters;
|
|
6
|
+
exports.selectAdapter = _mod_l4pi6n.selectAdapter;;
|
package/dist/cache/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.LRUCache =
|
|
3
|
-
const
|
|
4
|
-
exports.DNSCache =
|
|
5
|
-
exports.getGlobalDNSCache =
|
|
6
|
-
exports.resetGlobalDNSCache =
|
|
7
|
-
const
|
|
8
|
-
exports.ResponseCache =
|
|
9
|
-
exports.normalizeResponseCacheConfig =
|
|
1
|
+
const _mod_t6h2kn = require('./lru-cache.cjs');
|
|
2
|
+
exports.LRUCache = _mod_t6h2kn.LRUCache;;
|
|
3
|
+
const _mod_nl5s2c = require('./dns-cache.cjs');
|
|
4
|
+
exports.DNSCache = _mod_nl5s2c.DNSCache;
|
|
5
|
+
exports.getGlobalDNSCache = _mod_nl5s2c.getGlobalDNSCache;
|
|
6
|
+
exports.resetGlobalDNSCache = _mod_nl5s2c.resetGlobalDNSCache;;
|
|
7
|
+
const _mod_9alyql = require('./response-cache.cjs');
|
|
8
|
+
exports.ResponseCache = _mod_9alyql.ResponseCache;
|
|
9
|
+
exports.normalizeResponseCacheConfig = _mod_9alyql.normalizeResponseCacheConfig;;
|
package/dist/crawler/index.cjs
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
5
|
-
const
|
|
6
|
-
exports.RobotsTxt =
|
|
7
|
-
const
|
|
8
|
-
exports.FileCacher =
|
|
9
|
-
const
|
|
10
|
-
exports.UrlStore =
|
|
11
|
-
const
|
|
12
|
-
exports.NavigationHistory =
|
|
13
|
-
const
|
|
14
|
-
exports.Oxylabs =
|
|
15
|
-
const
|
|
16
|
-
exports.OXYLABS_BROWSER_TYPES =
|
|
17
|
-
exports.OXYLABS_COMMON_LOCALES =
|
|
18
|
-
exports.OXYLABS_COMMON_GEO_LOCATIONS =
|
|
19
|
-
exports.OXYLABS_US_STATES =
|
|
20
|
-
exports.OXYLABS_EUROPEAN_COUNTRIES =
|
|
21
|
-
exports.OXYLABS_ASIAN_COUNTRIES =
|
|
22
|
-
exports.getRandomOxylabsBrowserType =
|
|
23
|
-
exports.getRandomOxylabsLocale =
|
|
24
|
-
exports.getRandomOxylabsGeoLocation =
|
|
25
|
-
const
|
|
26
|
-
exports.isRestrictedDomain =
|
|
27
|
-
const
|
|
28
|
-
exports.Decodo =
|
|
29
|
-
const
|
|
30
|
-
exports.DECODO_DEVICE_TYPES =
|
|
31
|
-
exports.DECODO_HEADLESS_MODES =
|
|
32
|
-
exports.DECODO_COMMON_LOCALES =
|
|
33
|
-
exports.DECODO_COMMON_COUNTRIES =
|
|
34
|
-
exports.DECODO_EUROPEAN_COUNTRIES =
|
|
35
|
-
exports.DECODO_ASIAN_COUNTRIES =
|
|
36
|
-
exports.DECODO_US_STATES =
|
|
37
|
-
exports.DECODO_COMMON_CITIES =
|
|
38
|
-
exports.getRandomDecodoDeviceType =
|
|
39
|
-
exports.getRandomDecodoLocale =
|
|
40
|
-
exports.getRandomDecodoCountry =
|
|
41
|
-
exports.getRandomDecodoCity =
|
|
42
|
-
exports.generateDecodoSessionId =
|
|
1
|
+
const _mod_8juo7r = require('./crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_8juo7r.Crawler;;
|
|
3
|
+
const _mod_sb4o46 = require('./crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_sb4o46.CrawlerOptions;;
|
|
5
|
+
const _mod_drcjjy = require('./plugin/robots-txt.cjs');
|
|
6
|
+
exports.RobotsTxt = _mod_drcjjy.RobotsTxt;;
|
|
7
|
+
const _mod_q1ga0s = require('./plugin/file-cacher.cjs');
|
|
8
|
+
exports.FileCacher = _mod_q1ga0s.FileCacher;;
|
|
9
|
+
const _mod_uvu7w6 = require('./plugin/url-store.cjs');
|
|
10
|
+
exports.UrlStore = _mod_uvu7w6.UrlStore;;
|
|
11
|
+
const _mod_qf2krg = require('./plugin/navigation-history.cjs');
|
|
12
|
+
exports.NavigationHistory = _mod_qf2krg.NavigationHistory;;
|
|
13
|
+
const _mod_eztyc3 = require('./addon/oxylabs/index.cjs');
|
|
14
|
+
exports.Oxylabs = _mod_eztyc3.Oxylabs;;
|
|
15
|
+
const _mod_w36i5v = require('./addon/oxylabs/options.cjs');
|
|
16
|
+
exports.OXYLABS_BROWSER_TYPES = _mod_w36i5v.OXYLABS_BROWSER_TYPES;
|
|
17
|
+
exports.OXYLABS_COMMON_LOCALES = _mod_w36i5v.OXYLABS_COMMON_LOCALES;
|
|
18
|
+
exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_w36i5v.OXYLABS_COMMON_GEO_LOCATIONS;
|
|
19
|
+
exports.OXYLABS_US_STATES = _mod_w36i5v.OXYLABS_US_STATES;
|
|
20
|
+
exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_w36i5v.OXYLABS_EUROPEAN_COUNTRIES;
|
|
21
|
+
exports.OXYLABS_ASIAN_COUNTRIES = _mod_w36i5v.OXYLABS_ASIAN_COUNTRIES;
|
|
22
|
+
exports.getRandomOxylabsBrowserType = _mod_w36i5v.getRandomBrowserType;
|
|
23
|
+
exports.getRandomOxylabsLocale = _mod_w36i5v.getRandomLocale;
|
|
24
|
+
exports.getRandomOxylabsGeoLocation = _mod_w36i5v.getRandomGeoLocation;;
|
|
25
|
+
const _mod_7a58s0 = require('./scraper.cjs');
|
|
26
|
+
exports.isRestrictedDomain = _mod_7a58s0.isRestrictedDomain;;
|
|
27
|
+
const _mod_b3mhqq = require('./addon/decodo/index.cjs');
|
|
28
|
+
exports.Decodo = _mod_b3mhqq.Decodo;;
|
|
29
|
+
const _mod_17ovrd = require('./addon/decodo/options.cjs');
|
|
30
|
+
exports.DECODO_DEVICE_TYPES = _mod_17ovrd.DECODO_DEVICE_TYPES;
|
|
31
|
+
exports.DECODO_HEADLESS_MODES = _mod_17ovrd.DECODO_HEADLESS_MODES;
|
|
32
|
+
exports.DECODO_COMMON_LOCALES = _mod_17ovrd.DECODO_COMMON_LOCALES;
|
|
33
|
+
exports.DECODO_COMMON_COUNTRIES = _mod_17ovrd.DECODO_COMMON_COUNTRIES;
|
|
34
|
+
exports.DECODO_EUROPEAN_COUNTRIES = _mod_17ovrd.DECODO_EUROPEAN_COUNTRIES;
|
|
35
|
+
exports.DECODO_ASIAN_COUNTRIES = _mod_17ovrd.DECODO_ASIAN_COUNTRIES;
|
|
36
|
+
exports.DECODO_US_STATES = _mod_17ovrd.DECODO_US_STATES;
|
|
37
|
+
exports.DECODO_COMMON_CITIES = _mod_17ovrd.DECODO_COMMON_CITIES;
|
|
38
|
+
exports.getRandomDecodoDeviceType = _mod_17ovrd.getRandomDeviceType;
|
|
39
|
+
exports.getRandomDecodoLocale = _mod_17ovrd.getRandomLocale;
|
|
40
|
+
exports.getRandomDecodoCountry = _mod_17ovrd.getRandomCountry;
|
|
41
|
+
exports.getRandomDecodoCity = _mod_17ovrd.getRandomCity;
|
|
42
|
+
exports.generateDecodoSessionId = _mod_17ovrd.generateSessionId;;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=require("./file-cacher.cjs");exports.FileCacher=e.FileCacher;var r=require("./url-store.cjs");exports.UrlStore=r.UrlStore;var o=require("./result-stream.cjs");exports.ResultStream=o.ResultStream;var t=require("./memory-monitor.cjs");exports.MemoryMonitor=t.MemoryMonitor;var a=require("./health-metrics.cjs");exports.HealthMetrics=a.HealthMetrics;var
|
|
1
|
+
var e=require("./file-cacher.cjs");exports.FileCacher=e.FileCacher;var r=require("./url-store.cjs");exports.UrlStore=r.UrlStore;var o=require("./result-stream.cjs");exports.ResultStream=o.ResultStream;var t=require("./memory-monitor.cjs");exports.MemoryMonitor=t.MemoryMonitor;var a=require("./health-metrics.cjs");exports.HealthMetrics=a.HealthMetrics;var i=require("./capped-map.cjs");exports.CappedMap=i.CappedMap;var s=require("./capped-array.cjs");exports.CappedArray=s.CappedArray;
|
package/dist/crawler.d.ts
CHANGED
|
@@ -2301,9 +2301,19 @@ declare class RezoQueue<T = any> {
|
|
|
2301
2301
|
*/
|
|
2302
2302
|
private insertByPriority;
|
|
2303
2303
|
/**
|
|
2304
|
-
* Try to run next task if capacity available
|
|
2304
|
+
* Try to run next task if capacity available.
|
|
2305
|
+
*
|
|
2306
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2307
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2308
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2309
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2305
2310
|
*/
|
|
2306
2311
|
private tryRunNext;
|
|
2312
|
+
/**
|
|
2313
|
+
* Clear the interval timer (called when queue empties).
|
|
2314
|
+
* The interval will be re-created when new tasks are added.
|
|
2315
|
+
*/
|
|
2316
|
+
private clearIntervalTimer;
|
|
2307
2317
|
/**
|
|
2308
2318
|
* Execute a task
|
|
2309
2319
|
*/
|
package/dist/entries/crawler.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
5
|
-
const
|
|
6
|
-
exports.isRestrictedDomain =
|
|
1
|
+
const _mod_k7gxej = require('../crawler/crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_k7gxej.Crawler;;
|
|
3
|
+
const _mod_psf4i0 = require('../crawler/crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_psf4i0.CrawlerOptions;;
|
|
5
|
+
const _mod_idgace = require('../crawler/scraper.cjs');
|
|
6
|
+
exports.isRestrictedDomain = _mod_idgace.isRestrictedDomain;;
|
package/dist/index.cjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
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.toCurl =
|
|
17
|
-
exports.fromCurl =
|
|
18
|
-
const
|
|
19
|
-
exports.createDefaultHooks =
|
|
20
|
-
exports.mergeHooks =
|
|
21
|
-
const
|
|
22
|
-
exports.ProxyManager =
|
|
23
|
-
const
|
|
24
|
-
exports.RezoQueue =
|
|
25
|
-
exports.HttpQueue =
|
|
26
|
-
exports.RezoHttpQueue =
|
|
27
|
-
exports.Priority =
|
|
28
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_sdntn0 = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_sdntn0.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_sdntn0.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_sdntn0.createDefaultInstance;;
|
|
5
|
+
const _mod_pdyuoe = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_pdyuoe.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_pdyuoe.RezoErrorCode;;
|
|
8
|
+
const _mod_7sheyg = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_7sheyg.RezoHeaders;;
|
|
10
|
+
const _mod_cd79xb = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_cd79xb.RezoFormData;;
|
|
12
|
+
const _mod_ztcyti = require('./utils/cookies.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_ztcyti.RezoCookieJar;
|
|
14
|
+
exports.Cookie = _mod_ztcyti.Cookie;;
|
|
15
|
+
const _mod_utfxtb = require('./utils/curl.cjs');
|
|
16
|
+
exports.toCurl = _mod_utfxtb.toCurl;
|
|
17
|
+
exports.fromCurl = _mod_utfxtb.fromCurl;;
|
|
18
|
+
const _mod_hesx76 = require('./core/hooks.cjs');
|
|
19
|
+
exports.createDefaultHooks = _mod_hesx76.createDefaultHooks;
|
|
20
|
+
exports.mergeHooks = _mod_hesx76.mergeHooks;;
|
|
21
|
+
const _mod_1xsh7m = require('./proxy/manager.cjs');
|
|
22
|
+
exports.ProxyManager = _mod_1xsh7m.ProxyManager;;
|
|
23
|
+
const _mod_h9ctoa = require('./queue/index.cjs');
|
|
24
|
+
exports.RezoQueue = _mod_h9ctoa.RezoQueue;
|
|
25
|
+
exports.HttpQueue = _mod_h9ctoa.HttpQueue;
|
|
26
|
+
exports.RezoHttpQueue = _mod_h9ctoa.RezoHttpQueue;
|
|
27
|
+
exports.Priority = _mod_h9ctoa.Priority;
|
|
28
|
+
exports.HttpMethodPriority = _mod_h9ctoa.HttpMethodPriority;;
|
|
29
29
|
const { RezoError } = require('./errors/rezo-error.cjs');
|
|
30
30
|
const isRezoError = exports.isRezoError = RezoError.isRezoError;
|
|
31
31
|
const Cancel = exports.Cancel = RezoError;
|
|
@@ -35,9 +35,9 @@ const isCancel = exports.isCancel = (error) => {
|
|
|
35
35
|
};
|
|
36
36
|
const all = exports.all = Promise.all.bind(Promise);
|
|
37
37
|
const spread = exports.spread = (callback) => (array) => callback(...array);
|
|
38
|
-
const
|
|
39
|
-
exports.VERSION =
|
|
40
|
-
exports.PACKAGE_NAME =
|
|
38
|
+
const _mod_fwokhm = require('./version.cjs');
|
|
39
|
+
exports.VERSION = _mod_fwokhm.VERSION;
|
|
40
|
+
exports.PACKAGE_NAME = _mod_fwokhm.PACKAGE_NAME;;
|
|
41
41
|
const { executeRequest } = require('./adapters/http.cjs');
|
|
42
42
|
const { setGlobalAdapter, createRezoInstance } = require('./core/rezo.cjs');
|
|
43
43
|
setGlobalAdapter(executeRequest);
|
package/dist/index.d.ts
CHANGED
|
@@ -2244,9 +2244,19 @@ export declare class RezoQueue<T = any> {
|
|
|
2244
2244
|
*/
|
|
2245
2245
|
private insertByPriority;
|
|
2246
2246
|
/**
|
|
2247
|
-
* Try to run next task if capacity available
|
|
2247
|
+
* Try to run next task if capacity available.
|
|
2248
|
+
*
|
|
2249
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2250
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2251
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2252
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2248
2253
|
*/
|
|
2249
2254
|
private tryRunNext;
|
|
2255
|
+
/**
|
|
2256
|
+
* Clear the interval timer (called when queue empties).
|
|
2257
|
+
* The interval will be re-created when new tasks are added.
|
|
2258
|
+
*/
|
|
2259
|
+
private clearIntervalTimer;
|
|
2250
2260
|
/**
|
|
2251
2261
|
* Execute a task
|
|
2252
2262
|
*/
|
|
@@ -5192,7 +5202,7 @@ export declare function createDefaultInstance(config?: RezoDefaultOptions): Rezo
|
|
|
5192
5202
|
*
|
|
5193
5203
|
* IMPORTANT: Update these values when bumping package version.
|
|
5194
5204
|
*/
|
|
5195
|
-
export declare const VERSION = "1.0.
|
|
5205
|
+
export declare const VERSION = "1.0.88";
|
|
5196
5206
|
export declare const PACKAGE_NAME = "rezo";
|
|
5197
5207
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5198
5208
|
export declare const Cancel: typeof RezoError;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Agent =
|
|
3
|
-
const
|
|
4
|
-
exports.HttpProxyAgent =
|
|
5
|
-
const
|
|
6
|
-
exports.HttpsProxyAgent =
|
|
7
|
-
const
|
|
8
|
-
exports.SocksProxyAgent =
|
|
9
|
-
const
|
|
10
|
-
exports.SocksClient =
|
|
11
|
-
const
|
|
12
|
-
exports.bunHttp =
|
|
13
|
-
exports.isBunRuntime =
|
|
14
|
-
exports.isBunSocksRequest =
|
|
1
|
+
const _mod_uxsy33 = require('./base.cjs');
|
|
2
|
+
exports.Agent = _mod_uxsy33.Agent;;
|
|
3
|
+
const _mod_5rtaqp = require('./http-proxy.cjs');
|
|
4
|
+
exports.HttpProxyAgent = _mod_5rtaqp.HttpProxyAgent;;
|
|
5
|
+
const _mod_c1o8pn = require('./https-proxy.cjs');
|
|
6
|
+
exports.HttpsProxyAgent = _mod_c1o8pn.HttpsProxyAgent;;
|
|
7
|
+
const _mod_1us0su = require('./socks-proxy.cjs');
|
|
8
|
+
exports.SocksProxyAgent = _mod_1us0su.SocksProxyAgent;;
|
|
9
|
+
const _mod_psmyux = require('./socks-client.cjs');
|
|
10
|
+
exports.SocksClient = _mod_psmyux.SocksClient;;
|
|
11
|
+
const _mod_kwf9cn = require('./bun-socks-http.cjs');
|
|
12
|
+
exports.bunHttp = _mod_kwf9cn.bunHttp;
|
|
13
|
+
exports.isBunRuntime = _mod_kwf9cn.isBunRuntime;
|
|
14
|
+
exports.isBunSocksRequest = _mod_kwf9cn.isBunSocksRequest;;
|
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5068
5078
|
export declare const Cancel: typeof RezoError;
|
|
5069
5079
|
export declare const CancelToken: {
|
package/dist/platform/bun.d.ts
CHANGED
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5068
5078
|
export declare const Cancel: typeof RezoError;
|
|
5069
5079
|
export declare const CancelToken: {
|
package/dist/platform/deno.d.ts
CHANGED
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5068
5078
|
export declare const Cancel: typeof RezoError;
|
|
5069
5079
|
export declare const CancelToken: {
|
package/dist/platform/node.d.ts
CHANGED
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5068
5078
|
export declare const Cancel: typeof RezoError;
|
|
5069
5079
|
export declare const CancelToken: {
|
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5068
5078
|
export declare const Cancel: typeof RezoError;
|
|
5069
5079
|
export declare const CancelToken: {
|
|
@@ -2182,9 +2182,19 @@ declare class RezoQueue<T = any> {
|
|
|
2182
2182
|
*/
|
|
2183
2183
|
private insertByPriority;
|
|
2184
2184
|
/**
|
|
2185
|
-
* Try to run next task if capacity available
|
|
2185
|
+
* Try to run next task if capacity available.
|
|
2186
|
+
*
|
|
2187
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
2188
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
2189
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
2190
|
+
* tasks are still in the queue waiting to be shifted.
|
|
2186
2191
|
*/
|
|
2187
2192
|
private tryRunNext;
|
|
2193
|
+
/**
|
|
2194
|
+
* Clear the interval timer (called when queue empties).
|
|
2195
|
+
* The interval will be re-created when new tasks are added.
|
|
2196
|
+
*/
|
|
2197
|
+
private clearIntervalTimer;
|
|
2188
2198
|
/**
|
|
2189
2199
|
* Execute a task
|
|
2190
2200
|
*/
|
|
@@ -5063,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
|
|
|
5063
5073
|
*
|
|
5064
5074
|
* IMPORTANT: Update these values when bumping package version.
|
|
5065
5075
|
*/
|
|
5066
|
-
export declare const VERSION = "1.0.
|
|
5076
|
+
export declare const VERSION = "1.0.88";
|
|
5067
5077
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
5068
5078
|
export declare const Cancel: typeof RezoError;
|
|
5069
5079
|
export declare const CancelToken: {
|
package/dist/proxy/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const { Agent, HttpProxyAgent, HttpsProxyAgent, SocksProxyAgent } = require('../internal/agents/index.cjs');
|
|
2
2
|
const { parseProxyString } = require('./parse.cjs');
|
|
3
|
-
const
|
|
4
|
-
exports.ProxyManager =
|
|
5
|
-
const
|
|
6
|
-
exports.parseProxyString =
|
|
3
|
+
const _mod_qvig2a = require('./manager.cjs');
|
|
4
|
+
exports.ProxyManager = _mod_qvig2a.ProxyManager;;
|
|
5
|
+
const _mod_bd1jr1 = require('./parse.cjs');
|
|
6
|
+
exports.parseProxyString = _mod_bd1jr1.parseProxyString;;
|
|
7
7
|
function createOptions(uri, opts) {
|
|
8
8
|
if (uri instanceof URL || typeof uri === "string") {
|
|
9
9
|
return {
|
package/dist/queue/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.RezoQueue =
|
|
3
|
-
const
|
|
4
|
-
exports.HttpQueue =
|
|
5
|
-
exports.RezoHttpQueue =
|
|
6
|
-
exports.extractDomain =
|
|
7
|
-
const
|
|
8
|
-
exports.Priority =
|
|
9
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_khfbin = require('./queue.cjs');
|
|
2
|
+
exports.RezoQueue = _mod_khfbin.RezoQueue;;
|
|
3
|
+
const _mod_nsoyxx = require('./http-queue.cjs');
|
|
4
|
+
exports.HttpQueue = _mod_nsoyxx.HttpQueue;
|
|
5
|
+
exports.RezoHttpQueue = _mod_nsoyxx.HttpQueue;
|
|
6
|
+
exports.extractDomain = _mod_nsoyxx.extractDomain;;
|
|
7
|
+
const _mod_4vao4e = require('./types.cjs');
|
|
8
|
+
exports.Priority = _mod_4vao4e.Priority;
|
|
9
|
+
exports.HttpMethodPriority = _mod_4vao4e.HttpMethodPriority;;
|
package/dist/queue/queue.cjs
CHANGED
|
@@ -103,6 +103,9 @@ class RezoQueue {
|
|
|
103
103
|
this.statsData.added++;
|
|
104
104
|
this.hasEverBeenActive = true;
|
|
105
105
|
this.emit("add", { id: task.id, priority: task.priority });
|
|
106
|
+
if (this.config.interval > 0 && !this.intervalId) {
|
|
107
|
+
this.startInterval();
|
|
108
|
+
}
|
|
106
109
|
if (this.config.autoStart && !this.isPausedFlag) {
|
|
107
110
|
this.tryRunNext();
|
|
108
111
|
}
|
|
@@ -136,7 +139,11 @@ class RezoQueue {
|
|
|
136
139
|
this.statsData.cancelled++;
|
|
137
140
|
this.emit("cancelled", { id: task.id });
|
|
138
141
|
}
|
|
142
|
+
this.clearIntervalTimer();
|
|
139
143
|
this.checkEmpty();
|
|
144
|
+
if (this.pendingCount === 0) {
|
|
145
|
+
this.checkIdle();
|
|
146
|
+
}
|
|
140
147
|
}
|
|
141
148
|
cancel(id) {
|
|
142
149
|
const index = this.queue.findIndex((t) => t.id === id);
|
|
@@ -251,10 +258,7 @@ class RezoQueue {
|
|
|
251
258
|
}
|
|
252
259
|
destroy() {
|
|
253
260
|
this.clear();
|
|
254
|
-
|
|
255
|
-
clearInterval(this.intervalId);
|
|
256
|
-
this.intervalId = undefined;
|
|
257
|
-
}
|
|
261
|
+
this.clearIntervalTimer();
|
|
258
262
|
this.eventHandlers.clear();
|
|
259
263
|
}
|
|
260
264
|
insertByPriority(task) {
|
|
@@ -269,19 +273,32 @@ class RezoQueue {
|
|
|
269
273
|
}
|
|
270
274
|
tryRunNext() {
|
|
271
275
|
if (this.isPausedFlag)
|
|
272
|
-
return;
|
|
273
|
-
if (this.queue.length === 0)
|
|
274
|
-
|
|
276
|
+
return false;
|
|
277
|
+
if (this.queue.length === 0) {
|
|
278
|
+
this.clearIntervalTimer();
|
|
279
|
+
this.checkEmpty();
|
|
280
|
+
if (this.pendingCount === 0) {
|
|
281
|
+
this.checkIdle();
|
|
282
|
+
}
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
275
285
|
if (this.pendingCount >= this.config.concurrency)
|
|
276
|
-
return;
|
|
286
|
+
return false;
|
|
277
287
|
if (this.config.interval > 0) {
|
|
278
288
|
if (this.intervalCount >= this.config.intervalCap)
|
|
279
|
-
return;
|
|
289
|
+
return false;
|
|
280
290
|
this.intervalCount++;
|
|
281
291
|
}
|
|
282
292
|
const task = this.queue.shift();
|
|
283
293
|
this.runTask(task);
|
|
284
294
|
this.tryRunNext();
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
clearIntervalTimer() {
|
|
298
|
+
if (this.intervalId) {
|
|
299
|
+
clearInterval(this.intervalId);
|
|
300
|
+
this.intervalId = undefined;
|
|
301
|
+
}
|
|
285
302
|
}
|
|
286
303
|
async runTask(task) {
|
|
287
304
|
this.pendingCount++;
|
|
@@ -291,7 +308,6 @@ class RezoQueue {
|
|
|
291
308
|
this.emit("active", undefined);
|
|
292
309
|
}
|
|
293
310
|
this.emit("start", { id: task.id });
|
|
294
|
-
this.emit("next", undefined);
|
|
295
311
|
const startTime = Date.now();
|
|
296
312
|
let timeoutId;
|
|
297
313
|
try {
|
|
@@ -335,10 +351,11 @@ class RezoQueue {
|
|
|
335
351
|
delete task._abortHandler;
|
|
336
352
|
delete task._signal;
|
|
337
353
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
354
|
+
queueMicrotask(() => {
|
|
355
|
+
this.pendingCount--;
|
|
356
|
+
this.tryRunNext();
|
|
357
|
+
this.emit("next", undefined);
|
|
358
|
+
});
|
|
342
359
|
}
|
|
343
360
|
}
|
|
344
361
|
recordDuration(duration) {
|
|
@@ -362,7 +379,6 @@ class RezoQueue {
|
|
|
362
379
|
this.intervalStart = Date.now();
|
|
363
380
|
this.tryRunNext();
|
|
364
381
|
}, this.config.interval);
|
|
365
|
-
this.intervalId.unref();
|
|
366
382
|
}
|
|
367
383
|
emit(event, data) {
|
|
368
384
|
const handlers = this.eventHandlers.get(event);
|
package/dist/queue/queue.js
CHANGED
|
@@ -103,6 +103,9 @@ export class RezoQueue {
|
|
|
103
103
|
this.statsData.added++;
|
|
104
104
|
this.hasEverBeenActive = true;
|
|
105
105
|
this.emit("add", { id: task.id, priority: task.priority });
|
|
106
|
+
if (this.config.interval > 0 && !this.intervalId) {
|
|
107
|
+
this.startInterval();
|
|
108
|
+
}
|
|
106
109
|
if (this.config.autoStart && !this.isPausedFlag) {
|
|
107
110
|
this.tryRunNext();
|
|
108
111
|
}
|
|
@@ -136,7 +139,11 @@ export class RezoQueue {
|
|
|
136
139
|
this.statsData.cancelled++;
|
|
137
140
|
this.emit("cancelled", { id: task.id });
|
|
138
141
|
}
|
|
142
|
+
this.clearIntervalTimer();
|
|
139
143
|
this.checkEmpty();
|
|
144
|
+
if (this.pendingCount === 0) {
|
|
145
|
+
this.checkIdle();
|
|
146
|
+
}
|
|
140
147
|
}
|
|
141
148
|
cancel(id) {
|
|
142
149
|
const index = this.queue.findIndex((t) => t.id === id);
|
|
@@ -251,10 +258,7 @@ export class RezoQueue {
|
|
|
251
258
|
}
|
|
252
259
|
destroy() {
|
|
253
260
|
this.clear();
|
|
254
|
-
|
|
255
|
-
clearInterval(this.intervalId);
|
|
256
|
-
this.intervalId = undefined;
|
|
257
|
-
}
|
|
261
|
+
this.clearIntervalTimer();
|
|
258
262
|
this.eventHandlers.clear();
|
|
259
263
|
}
|
|
260
264
|
insertByPriority(task) {
|
|
@@ -269,19 +273,32 @@ export class RezoQueue {
|
|
|
269
273
|
}
|
|
270
274
|
tryRunNext() {
|
|
271
275
|
if (this.isPausedFlag)
|
|
272
|
-
return;
|
|
273
|
-
if (this.queue.length === 0)
|
|
274
|
-
|
|
276
|
+
return false;
|
|
277
|
+
if (this.queue.length === 0) {
|
|
278
|
+
this.clearIntervalTimer();
|
|
279
|
+
this.checkEmpty();
|
|
280
|
+
if (this.pendingCount === 0) {
|
|
281
|
+
this.checkIdle();
|
|
282
|
+
}
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
275
285
|
if (this.pendingCount >= this.config.concurrency)
|
|
276
|
-
return;
|
|
286
|
+
return false;
|
|
277
287
|
if (this.config.interval > 0) {
|
|
278
288
|
if (this.intervalCount >= this.config.intervalCap)
|
|
279
|
-
return;
|
|
289
|
+
return false;
|
|
280
290
|
this.intervalCount++;
|
|
281
291
|
}
|
|
282
292
|
const task = this.queue.shift();
|
|
283
293
|
this.runTask(task);
|
|
284
294
|
this.tryRunNext();
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
clearIntervalTimer() {
|
|
298
|
+
if (this.intervalId) {
|
|
299
|
+
clearInterval(this.intervalId);
|
|
300
|
+
this.intervalId = undefined;
|
|
301
|
+
}
|
|
285
302
|
}
|
|
286
303
|
async runTask(task) {
|
|
287
304
|
this.pendingCount++;
|
|
@@ -291,7 +308,6 @@ export class RezoQueue {
|
|
|
291
308
|
this.emit("active", undefined);
|
|
292
309
|
}
|
|
293
310
|
this.emit("start", { id: task.id });
|
|
294
|
-
this.emit("next", undefined);
|
|
295
311
|
const startTime = Date.now();
|
|
296
312
|
let timeoutId;
|
|
297
313
|
try {
|
|
@@ -335,10 +351,11 @@ export class RezoQueue {
|
|
|
335
351
|
delete task._abortHandler;
|
|
336
352
|
delete task._signal;
|
|
337
353
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
354
|
+
queueMicrotask(() => {
|
|
355
|
+
this.pendingCount--;
|
|
356
|
+
this.tryRunNext();
|
|
357
|
+
this.emit("next", undefined);
|
|
358
|
+
});
|
|
342
359
|
}
|
|
343
360
|
}
|
|
344
361
|
recordDuration(duration) {
|
|
@@ -362,7 +379,6 @@ export class RezoQueue {
|
|
|
362
379
|
this.intervalStart = Date.now();
|
|
363
380
|
this.tryRunNext();
|
|
364
381
|
}, this.config.interval);
|
|
365
|
-
this.intervalId.unref();
|
|
366
382
|
}
|
|
367
383
|
emit(event, data) {
|
|
368
384
|
const handlers = this.eventHandlers.get(event);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.UniversalEventEmitter =
|
|
3
|
-
const
|
|
4
|
-
exports.UniversalStreamResponse =
|
|
5
|
-
exports.StreamResponse =
|
|
6
|
-
const
|
|
7
|
-
exports.UniversalDownloadResponse =
|
|
8
|
-
exports.DownloadResponse =
|
|
9
|
-
const
|
|
10
|
-
exports.UniversalUploadResponse =
|
|
11
|
-
exports.UploadResponse =
|
|
1
|
+
const _mod_pscfsi = require('./event-emitter.cjs');
|
|
2
|
+
exports.UniversalEventEmitter = _mod_pscfsi.UniversalEventEmitter;;
|
|
3
|
+
const _mod_711avn = require('./stream.cjs');
|
|
4
|
+
exports.UniversalStreamResponse = _mod_711avn.UniversalStreamResponse;
|
|
5
|
+
exports.StreamResponse = _mod_711avn.StreamResponse;;
|
|
6
|
+
const _mod_tf33hx = require('./download.cjs');
|
|
7
|
+
exports.UniversalDownloadResponse = _mod_tf33hx.UniversalDownloadResponse;
|
|
8
|
+
exports.DownloadResponse = _mod_tf33hx.DownloadResponse;;
|
|
9
|
+
const _mod_p3xuwv = require('./upload.cjs');
|
|
10
|
+
exports.UniversalUploadResponse = _mod_p3xuwv.UniversalUploadResponse;
|
|
11
|
+
exports.UploadResponse = _mod_p3xuwv.UploadResponse;;
|
package/dist/version.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const VERSION = exports.VERSION = "1.0.
|
|
1
|
+
const VERSION = exports.VERSION = "1.0.88";
|
|
2
2
|
const PACKAGE_NAME = exports.PACKAGE_NAME = "rezo";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "1.0.
|
|
1
|
+
export const VERSION = "1.0.88";
|
|
2
2
|
export const PACKAGE_NAME = "rezo";
|
package/dist/wget/index.cjs
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.WgetError =
|
|
3
|
-
const
|
|
4
|
-
exports.AssetExtractor =
|
|
5
|
-
const
|
|
6
|
-
exports.UrlFilter =
|
|
7
|
-
const
|
|
8
|
-
exports.FileWriter =
|
|
9
|
-
const
|
|
10
|
-
exports.RobotsHandler =
|
|
11
|
-
const
|
|
12
|
-
exports.ResumeHandler =
|
|
13
|
-
const
|
|
14
|
-
exports.ProgressReporter =
|
|
15
|
-
exports.ProgressTracker =
|
|
16
|
-
exports.parseSize =
|
|
17
|
-
const
|
|
18
|
-
exports.LinkConverter =
|
|
19
|
-
const
|
|
20
|
-
exports.StyleExtractor =
|
|
21
|
-
const
|
|
22
|
-
exports.Downloader =
|
|
23
|
-
const
|
|
24
|
-
exports.AssetOrganizer =
|
|
25
|
-
exports.DEFAULT_ASSET_FOLDERS =
|
|
26
|
-
const
|
|
27
|
-
exports.DownloadCache =
|
|
28
|
-
const
|
|
29
|
-
exports.EXECUTABLE_EXTENSIONS =
|
|
30
|
-
exports.ARCHIVE_EXTENSIONS =
|
|
31
|
-
exports.DOCUMENT_EXTENSIONS =
|
|
32
|
-
exports.IMAGE_EXTENSIONS =
|
|
33
|
-
exports.VIDEO_EXTENSIONS =
|
|
34
|
-
exports.AUDIO_EXTENSIONS =
|
|
35
|
-
exports.FONT_EXTENSIONS =
|
|
36
|
-
exports.WEB_ASSET_EXTENSIONS =
|
|
37
|
-
exports.DATA_EXTENSIONS =
|
|
38
|
-
exports.EXECUTABLE_MIME_TYPES =
|
|
39
|
-
exports.ARCHIVE_MIME_TYPES =
|
|
40
|
-
exports.DOCUMENT_MIME_TYPES =
|
|
41
|
-
exports.IMAGE_MIME_TYPES =
|
|
42
|
-
exports.VIDEO_MIME_TYPES =
|
|
43
|
-
exports.AUDIO_MIME_TYPES =
|
|
44
|
-
exports.FONT_MIME_TYPES =
|
|
45
|
-
exports.WEB_ASSET_MIME_TYPES =
|
|
46
|
-
exports.DATA_MIME_TYPES =
|
|
47
|
-
exports.SAFE_WEB_PRESET =
|
|
48
|
-
exports.DOCUMENTS_ONLY_PRESET =
|
|
49
|
-
exports.NO_MEDIA_PRESET =
|
|
50
|
-
exports.MINIMAL_MIRROR_PRESET =
|
|
51
|
-
exports.TEXT_ONLY_PRESET =
|
|
1
|
+
const _mod_du3wv4 = require('./types.cjs');
|
|
2
|
+
exports.WgetError = _mod_du3wv4.WgetError;;
|
|
3
|
+
const _mod_wdsrvi = require('./asset-extractor.cjs');
|
|
4
|
+
exports.AssetExtractor = _mod_wdsrvi.AssetExtractor;;
|
|
5
|
+
const _mod_k27d36 = require('./url-filter.cjs');
|
|
6
|
+
exports.UrlFilter = _mod_k27d36.UrlFilter;;
|
|
7
|
+
const _mod_jus4vf = require('./file-writer.cjs');
|
|
8
|
+
exports.FileWriter = _mod_jus4vf.FileWriter;;
|
|
9
|
+
const _mod_4pd7n8 = require('./robots.cjs');
|
|
10
|
+
exports.RobotsHandler = _mod_4pd7n8.RobotsHandler;;
|
|
11
|
+
const _mod_afbhvt = require('./resume.cjs');
|
|
12
|
+
exports.ResumeHandler = _mod_afbhvt.ResumeHandler;;
|
|
13
|
+
const _mod_ryu9o1 = require('./progress.cjs');
|
|
14
|
+
exports.ProgressReporter = _mod_ryu9o1.ProgressReporter;
|
|
15
|
+
exports.ProgressTracker = _mod_ryu9o1.ProgressTracker;
|
|
16
|
+
exports.parseSize = _mod_ryu9o1.parseSize;;
|
|
17
|
+
const _mod_78ptbc = require('./link-converter.cjs');
|
|
18
|
+
exports.LinkConverter = _mod_78ptbc.LinkConverter;;
|
|
19
|
+
const _mod_mo74an = require('./style-extractor.cjs');
|
|
20
|
+
exports.StyleExtractor = _mod_mo74an.StyleExtractor;;
|
|
21
|
+
const _mod_l29yuo = require('./downloader.cjs');
|
|
22
|
+
exports.Downloader = _mod_l29yuo.Downloader;;
|
|
23
|
+
const _mod_59sixh = require('./asset-organizer.cjs');
|
|
24
|
+
exports.AssetOrganizer = _mod_59sixh.AssetOrganizer;
|
|
25
|
+
exports.DEFAULT_ASSET_FOLDERS = _mod_59sixh.DEFAULT_ASSET_FOLDERS;;
|
|
26
|
+
const _mod_a7qr6m = require('./download-cache.cjs');
|
|
27
|
+
exports.DownloadCache = _mod_a7qr6m.DownloadCache;;
|
|
28
|
+
const _mod_oi08ol = require('./filter-lists.cjs');
|
|
29
|
+
exports.EXECUTABLE_EXTENSIONS = _mod_oi08ol.EXECUTABLE_EXTENSIONS;
|
|
30
|
+
exports.ARCHIVE_EXTENSIONS = _mod_oi08ol.ARCHIVE_EXTENSIONS;
|
|
31
|
+
exports.DOCUMENT_EXTENSIONS = _mod_oi08ol.DOCUMENT_EXTENSIONS;
|
|
32
|
+
exports.IMAGE_EXTENSIONS = _mod_oi08ol.IMAGE_EXTENSIONS;
|
|
33
|
+
exports.VIDEO_EXTENSIONS = _mod_oi08ol.VIDEO_EXTENSIONS;
|
|
34
|
+
exports.AUDIO_EXTENSIONS = _mod_oi08ol.AUDIO_EXTENSIONS;
|
|
35
|
+
exports.FONT_EXTENSIONS = _mod_oi08ol.FONT_EXTENSIONS;
|
|
36
|
+
exports.WEB_ASSET_EXTENSIONS = _mod_oi08ol.WEB_ASSET_EXTENSIONS;
|
|
37
|
+
exports.DATA_EXTENSIONS = _mod_oi08ol.DATA_EXTENSIONS;
|
|
38
|
+
exports.EXECUTABLE_MIME_TYPES = _mod_oi08ol.EXECUTABLE_MIME_TYPES;
|
|
39
|
+
exports.ARCHIVE_MIME_TYPES = _mod_oi08ol.ARCHIVE_MIME_TYPES;
|
|
40
|
+
exports.DOCUMENT_MIME_TYPES = _mod_oi08ol.DOCUMENT_MIME_TYPES;
|
|
41
|
+
exports.IMAGE_MIME_TYPES = _mod_oi08ol.IMAGE_MIME_TYPES;
|
|
42
|
+
exports.VIDEO_MIME_TYPES = _mod_oi08ol.VIDEO_MIME_TYPES;
|
|
43
|
+
exports.AUDIO_MIME_TYPES = _mod_oi08ol.AUDIO_MIME_TYPES;
|
|
44
|
+
exports.FONT_MIME_TYPES = _mod_oi08ol.FONT_MIME_TYPES;
|
|
45
|
+
exports.WEB_ASSET_MIME_TYPES = _mod_oi08ol.WEB_ASSET_MIME_TYPES;
|
|
46
|
+
exports.DATA_MIME_TYPES = _mod_oi08ol.DATA_MIME_TYPES;
|
|
47
|
+
exports.SAFE_WEB_PRESET = _mod_oi08ol.SAFE_WEB_PRESET;
|
|
48
|
+
exports.DOCUMENTS_ONLY_PRESET = _mod_oi08ol.DOCUMENTS_ONLY_PRESET;
|
|
49
|
+
exports.NO_MEDIA_PRESET = _mod_oi08ol.NO_MEDIA_PRESET;
|
|
50
|
+
exports.MINIMAL_MIRROR_PRESET = _mod_oi08ol.MINIMAL_MIRROR_PRESET;
|
|
51
|
+
exports.TEXT_ONLY_PRESET = _mod_oi08ol.TEXT_ONLY_PRESET;;
|
|
52
52
|
const { Downloader } = require('./downloader.cjs');
|
|
53
53
|
const rezo = require('../index.cjs');
|
|
54
54
|
const { promises: fs } = require("node:fs");
|
package/dist/wget/index.d.ts
CHANGED
|
@@ -5079,9 +5079,19 @@ declare class RezoQueue<T = any> {
|
|
|
5079
5079
|
*/
|
|
5080
5080
|
private insertByPriority;
|
|
5081
5081
|
/**
|
|
5082
|
-
* Try to run next task if capacity available
|
|
5082
|
+
* Try to run next task if capacity available.
|
|
5083
|
+
*
|
|
5084
|
+
* Like p-queue's #tryToStartAnother(), this method handles idle/empty
|
|
5085
|
+
* checks INSIDE itself — only after confirming there's nothing left to
|
|
5086
|
+
* dequeue. This prevents the false-idle race where idle fires while
|
|
5087
|
+
* tasks are still in the queue waiting to be shifted.
|
|
5083
5088
|
*/
|
|
5084
5089
|
private tryRunNext;
|
|
5090
|
+
/**
|
|
5091
|
+
* Clear the interval timer (called when queue empties).
|
|
5092
|
+
* The interval will be re-created when new tasks are added.
|
|
5093
|
+
*/
|
|
5094
|
+
private clearIntervalTimer;
|
|
5085
5095
|
/**
|
|
5086
5096
|
* Execute a task
|
|
5087
5097
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rezo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.88",
|
|
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",
|