rezo 1.0.74 → 1.0.75
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 +4 -1
- package/dist/adapters/entries/fetch.d.ts +4 -1
- package/dist/adapters/entries/http.d.ts +4 -1
- package/dist/adapters/entries/http2.d.ts +4 -1
- package/dist/adapters/entries/react-native.d.ts +4 -1
- package/dist/adapters/entries/xhr.d.ts +4 -1
- package/dist/adapters/http.cjs +2 -1
- package/dist/adapters/http.js +2 -1
- package/dist/adapters/index.cjs +6 -6
- package/dist/cache/index.cjs +9 -9
- package/dist/crawler/crawler-options.cjs +1 -1
- package/dist/crawler/crawler-options.js +1 -1
- package/dist/crawler/crawler.cjs +72 -1
- package/dist/crawler/crawler.js +72 -1
- package/dist/crawler/index.cjs +40 -40
- package/dist/crawler/plugin/index.cjs +1 -1
- package/dist/crawler.d.ts +101 -0
- package/dist/entries/crawler.cjs +4 -4
- package/dist/index.cjs +30 -30
- package/dist/index.d.ts +4 -1
- package/dist/internal/agents/bun-socks-http.cjs +573 -0
- package/dist/internal/agents/bun-socks-http.js +570 -0
- package/dist/internal/agents/index.cjs +14 -10
- package/dist/internal/agents/index.js +1 -0
- package/dist/platform/browser.d.ts +4 -1
- package/dist/platform/bun.d.ts +4 -1
- package/dist/platform/deno.d.ts +4 -1
- package/dist/platform/node.d.ts +4 -1
- package/dist/platform/react-native.d.ts +4 -1
- package/dist/platform/worker.d.ts +4 -1
- package/dist/proxy/index.cjs +4 -4
- package/dist/queue/index.cjs +8 -8
- package/dist/queue/queue.cjs +3 -0
- package/dist/queue/queue.js +3 -0
- 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 +49 -49
- package/dist/wget/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/crawler/index.cjs
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
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.Decodo =
|
|
27
|
-
const
|
|
28
|
-
exports.DECODO_DEVICE_TYPES =
|
|
29
|
-
exports.DECODO_HEADLESS_MODES =
|
|
30
|
-
exports.DECODO_COMMON_LOCALES =
|
|
31
|
-
exports.DECODO_COMMON_COUNTRIES =
|
|
32
|
-
exports.DECODO_EUROPEAN_COUNTRIES =
|
|
33
|
-
exports.DECODO_ASIAN_COUNTRIES =
|
|
34
|
-
exports.DECODO_US_STATES =
|
|
35
|
-
exports.DECODO_COMMON_CITIES =
|
|
36
|
-
exports.getRandomDecodoDeviceType =
|
|
37
|
-
exports.getRandomDecodoLocale =
|
|
38
|
-
exports.getRandomDecodoCountry =
|
|
39
|
-
exports.getRandomDecodoCity =
|
|
40
|
-
exports.generateDecodoSessionId =
|
|
1
|
+
const _mod_5bvyq1 = require('./crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_5bvyq1.Crawler;;
|
|
3
|
+
const _mod_4xvaze = require('./crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_4xvaze.CrawlerOptions;;
|
|
5
|
+
const _mod_iv735a = require('./plugin/robots-txt.cjs');
|
|
6
|
+
exports.RobotsTxt = _mod_iv735a.RobotsTxt;;
|
|
7
|
+
const _mod_gfu8y8 = require('./plugin/file-cacher.cjs');
|
|
8
|
+
exports.FileCacher = _mod_gfu8y8.FileCacher;;
|
|
9
|
+
const _mod_e921br = require('./plugin/url-store.cjs');
|
|
10
|
+
exports.UrlStore = _mod_e921br.UrlStore;;
|
|
11
|
+
const _mod_zhqmsp = require('./plugin/navigation-history.cjs');
|
|
12
|
+
exports.NavigationHistory = _mod_zhqmsp.NavigationHistory;;
|
|
13
|
+
const _mod_pv5ztj = require('./addon/oxylabs/index.cjs');
|
|
14
|
+
exports.Oxylabs = _mod_pv5ztj.Oxylabs;;
|
|
15
|
+
const _mod_9qqy6e = require('./addon/oxylabs/options.cjs');
|
|
16
|
+
exports.OXYLABS_BROWSER_TYPES = _mod_9qqy6e.OXYLABS_BROWSER_TYPES;
|
|
17
|
+
exports.OXYLABS_COMMON_LOCALES = _mod_9qqy6e.OXYLABS_COMMON_LOCALES;
|
|
18
|
+
exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_9qqy6e.OXYLABS_COMMON_GEO_LOCATIONS;
|
|
19
|
+
exports.OXYLABS_US_STATES = _mod_9qqy6e.OXYLABS_US_STATES;
|
|
20
|
+
exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_9qqy6e.OXYLABS_EUROPEAN_COUNTRIES;
|
|
21
|
+
exports.OXYLABS_ASIAN_COUNTRIES = _mod_9qqy6e.OXYLABS_ASIAN_COUNTRIES;
|
|
22
|
+
exports.getRandomOxylabsBrowserType = _mod_9qqy6e.getRandomBrowserType;
|
|
23
|
+
exports.getRandomOxylabsLocale = _mod_9qqy6e.getRandomLocale;
|
|
24
|
+
exports.getRandomOxylabsGeoLocation = _mod_9qqy6e.getRandomGeoLocation;;
|
|
25
|
+
const _mod_tth5gh = require('./addon/decodo/index.cjs');
|
|
26
|
+
exports.Decodo = _mod_tth5gh.Decodo;;
|
|
27
|
+
const _mod_fr8mjs = require('./addon/decodo/options.cjs');
|
|
28
|
+
exports.DECODO_DEVICE_TYPES = _mod_fr8mjs.DECODO_DEVICE_TYPES;
|
|
29
|
+
exports.DECODO_HEADLESS_MODES = _mod_fr8mjs.DECODO_HEADLESS_MODES;
|
|
30
|
+
exports.DECODO_COMMON_LOCALES = _mod_fr8mjs.DECODO_COMMON_LOCALES;
|
|
31
|
+
exports.DECODO_COMMON_COUNTRIES = _mod_fr8mjs.DECODO_COMMON_COUNTRIES;
|
|
32
|
+
exports.DECODO_EUROPEAN_COUNTRIES = _mod_fr8mjs.DECODO_EUROPEAN_COUNTRIES;
|
|
33
|
+
exports.DECODO_ASIAN_COUNTRIES = _mod_fr8mjs.DECODO_ASIAN_COUNTRIES;
|
|
34
|
+
exports.DECODO_US_STATES = _mod_fr8mjs.DECODO_US_STATES;
|
|
35
|
+
exports.DECODO_COMMON_CITIES = _mod_fr8mjs.DECODO_COMMON_CITIES;
|
|
36
|
+
exports.getRandomDecodoDeviceType = _mod_fr8mjs.getRandomDeviceType;
|
|
37
|
+
exports.getRandomDecodoLocale = _mod_fr8mjs.getRandomLocale;
|
|
38
|
+
exports.getRandomDecodoCountry = _mod_fr8mjs.getRandomCountry;
|
|
39
|
+
exports.getRandomDecodoCity = _mod_fr8mjs.getRandomCity;
|
|
40
|
+
exports.generateDecodoSessionId = _mod_fr8mjs.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
|
|
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 c=require("./health-metrics.cjs");exports.HealthMetrics=c.HealthMetrics;var m=require("./capped-map.cjs");exports.CappedMap=m.CappedMap;var a=require("./capped-array.cjs");exports.CappedArray=a.CappedArray;
|
package/dist/crawler.d.ts
CHANGED
|
@@ -2065,6 +2065,8 @@ declare class RezoError<T = any> extends Error {
|
|
|
2065
2065
|
* Queue configuration options
|
|
2066
2066
|
*/
|
|
2067
2067
|
export interface QueueConfig {
|
|
2068
|
+
/** Name of the queue - useful for debugging and logging */
|
|
2069
|
+
name?: string;
|
|
2068
2070
|
/** Maximum concurrent tasks (default: Infinity) */
|
|
2069
2071
|
concurrency?: number;
|
|
2070
2072
|
/** Auto-start processing when tasks are added (default: true) */
|
|
@@ -2195,6 +2197,7 @@ declare class RezoQueue<T = any> {
|
|
|
2195
2197
|
private isPausedFlag;
|
|
2196
2198
|
private intervalId?;
|
|
2197
2199
|
private intervalCount;
|
|
2200
|
+
readonly name: string;
|
|
2198
2201
|
private intervalStart;
|
|
2199
2202
|
private eventHandlers;
|
|
2200
2203
|
private statsData;
|
|
@@ -4579,6 +4582,8 @@ declare class Rezo {
|
|
|
4579
4582
|
*/
|
|
4580
4583
|
export type IProxy = RezoRequestConfig["proxy"];
|
|
4581
4584
|
interface queueOptions$1 {
|
|
4585
|
+
/** Queue name (optional) - if not provided, a random name will be generated */
|
|
4586
|
+
name?: string;
|
|
4582
4587
|
/** Maximum concurrent requests */
|
|
4583
4588
|
concurrency?: number;
|
|
4584
4589
|
/** Interval in milliseconds between batches */
|
|
@@ -4593,6 +4598,20 @@ interface queueOptions$1 {
|
|
|
4593
4598
|
autoStart?: boolean;
|
|
4594
4599
|
/** Carry over concurrency count between intervals */
|
|
4595
4600
|
carryoverConcurrencyCount?: boolean;
|
|
4601
|
+
/**
|
|
4602
|
+
* Random delay in milliseconds added to each request (0 to randomDelay).
|
|
4603
|
+
* When configured on a limiter, this takes
|
|
4604
|
+
* priority over autoThrottle for the matching domain.
|
|
4605
|
+
* @example
|
|
4606
|
+
* ```typescript
|
|
4607
|
+
* // Add 0-2000ms random jitter between requests
|
|
4608
|
+
* crawler.config.addLimiter({
|
|
4609
|
+
* domain: 'api.example.com',
|
|
4610
|
+
* options: { concurrency: 2, randomDelay: 2000 }
|
|
4611
|
+
* });
|
|
4612
|
+
* ```
|
|
4613
|
+
*/
|
|
4614
|
+
randomDelay?: number;
|
|
4596
4615
|
}
|
|
4597
4616
|
/**
|
|
4598
4617
|
* Crawler response structure
|
|
@@ -6652,6 +6671,8 @@ export declare class CrawlerOptions {
|
|
|
6652
6671
|
private proxies;
|
|
6653
6672
|
/** Internal storage for rate limiter configurations with domain mapping */
|
|
6654
6673
|
private limiters;
|
|
6674
|
+
/** Callback invoked when a new limiter is added (set by Crawler for onQueueChange) */
|
|
6675
|
+
onLimiterAdded?: (queue: RezoQueue) => void;
|
|
6655
6676
|
/** Internal storage for custom header configurations with domain mapping */
|
|
6656
6677
|
private requestHeaders;
|
|
6657
6678
|
/**
|
|
@@ -6906,6 +6927,32 @@ export declare class CrawlerOptions {
|
|
|
6906
6927
|
* ```
|
|
6907
6928
|
*/
|
|
6908
6929
|
destroyLimiters(): void;
|
|
6930
|
+
/**
|
|
6931
|
+
* Get all configured limiter queues
|
|
6932
|
+
* @description Returns all RezoQueue instances created by addLimiter().
|
|
6933
|
+
* Useful for subscribing to queue events across all limiters.
|
|
6934
|
+
* @returns Array of limiter configurations with their RezoQueue instances
|
|
6935
|
+
* @example
|
|
6936
|
+
* ```typescript
|
|
6937
|
+
* const limiters = options.getLimiters();
|
|
6938
|
+
* for (const limiter of limiters) {
|
|
6939
|
+
* limiter.pqueue.on('completed', () => console.log('Task done'));
|
|
6940
|
+
* }
|
|
6941
|
+
* ```
|
|
6942
|
+
*/
|
|
6943
|
+
getLimiters(): ReadonlyArray<{
|
|
6944
|
+
domain?: Domain;
|
|
6945
|
+
isGlobal?: boolean;
|
|
6946
|
+
pqueue: RezoQueue;
|
|
6947
|
+
randomDelay?: number;
|
|
6948
|
+
}>;
|
|
6949
|
+
/**
|
|
6950
|
+
* Get the randomDelay configured for a specific URL's domain
|
|
6951
|
+
* @param url - The URL to check
|
|
6952
|
+
* @param useGlobal - Whether to fall back to global limiters
|
|
6953
|
+
* @returns The randomDelay in milliseconds, or undefined if not configured
|
|
6954
|
+
*/
|
|
6955
|
+
getRandomDelay(url: string, useGlobal?: boolean): number | undefined;
|
|
6909
6956
|
/**
|
|
6910
6957
|
* Clear all global configurations from headers, proxies, limiters, Decodo, and Oxylabs
|
|
6911
6958
|
* @returns The CrawlerOptions instance for method chaining
|
|
@@ -7094,6 +7141,30 @@ export interface CrawlStats {
|
|
|
7094
7141
|
endTime?: number;
|
|
7095
7142
|
currentDepth: number;
|
|
7096
7143
|
}
|
|
7144
|
+
/**
|
|
7145
|
+
* Queue change event data passed to onQueueChange handler.
|
|
7146
|
+
* Fires when any queue's state changes (main crawler queue, scraper queue, or limiter queues).
|
|
7147
|
+
*/
|
|
7148
|
+
export interface QueueChangeEvent {
|
|
7149
|
+
/** Name of the queue that changed */
|
|
7150
|
+
queueName: string;
|
|
7151
|
+
/** Type of queue: 'crawler', 'scraper', or 'limiter' */
|
|
7152
|
+
queueType: "crawler" | "scraper" | "limiter";
|
|
7153
|
+
/** The event that triggered this change */
|
|
7154
|
+
event: "add" | "start" | "completed" | "error" | "timeout" | "cancelled" | "idle" | "active" | "paused" | "resumed";
|
|
7155
|
+
/** Number of tasks currently running */
|
|
7156
|
+
pending: number;
|
|
7157
|
+
/** Number of tasks waiting in queue */
|
|
7158
|
+
size: number;
|
|
7159
|
+
/** Total tasks (pending + size) */
|
|
7160
|
+
total: number;
|
|
7161
|
+
/** Is queue paused */
|
|
7162
|
+
isPaused: boolean;
|
|
7163
|
+
/** Is queue idle (no tasks) */
|
|
7164
|
+
isIdle: boolean;
|
|
7165
|
+
/** Task ID if event is task-specific (add, start, completed, error, timeout, cancelled) */
|
|
7166
|
+
taskId?: string;
|
|
7167
|
+
}
|
|
7097
7168
|
/**
|
|
7098
7169
|
* A powerful web crawler that provides event-driven HTML parsing and data extraction.
|
|
7099
7170
|
* Supports caching, proxy rotation, retry mechanisms, and email lead discovery.
|
|
@@ -7184,6 +7255,7 @@ export declare class Crawler {
|
|
|
7184
7255
|
private startHandlers;
|
|
7185
7256
|
private finishHandlers;
|
|
7186
7257
|
private redirectHandlers;
|
|
7258
|
+
private queueChangeHandlers;
|
|
7187
7259
|
/** Data collection for export - bounded to prevent memory issues */
|
|
7188
7260
|
private collectedData;
|
|
7189
7261
|
/** Flag to track if crawl has started */
|
|
@@ -7446,6 +7518,22 @@ export declare class Crawler {
|
|
|
7446
7518
|
* ```
|
|
7447
7519
|
*/
|
|
7448
7520
|
onRedirect(handler: (event: RedirectEvent$1) => Promise<void>): Crawler;
|
|
7521
|
+
/**
|
|
7522
|
+
* Registers a handler called when any queue's state changes.
|
|
7523
|
+
* Fires for the main crawler queue, scraper queue, and all limiter queues.
|
|
7524
|
+
* Each event reports only the specific queue that changed (not aggregated).
|
|
7525
|
+
*
|
|
7526
|
+
* @param handler - Function to handle queue change events (sync callback)
|
|
7527
|
+
* @returns The crawler instance for method chaining
|
|
7528
|
+
*
|
|
7529
|
+
* @example
|
|
7530
|
+
* ```typescript
|
|
7531
|
+
* crawler.onQueueChange((event) => {
|
|
7532
|
+
* console.log(`[${event.queueType}:${event.queueName}] ${event.event} - pending: ${event.pending}, size: ${event.size}`);
|
|
7533
|
+
* });
|
|
7534
|
+
* ```
|
|
7535
|
+
*/
|
|
7536
|
+
onQueueChange(handler: (event: QueueChangeEvent) => void): Crawler;
|
|
7449
7537
|
/**
|
|
7450
7538
|
* Registers a handler for raw response data.
|
|
7451
7539
|
* Triggered for all responses, providing access to the raw Buffer data.
|
|
@@ -7650,6 +7738,19 @@ export declare class Crawler {
|
|
|
7650
7738
|
* ```
|
|
7651
7739
|
*/
|
|
7652
7740
|
onText(selection: string, handler: ElementBoundHandler<string>): Crawler;
|
|
7741
|
+
/** Track which limiter queues we've already subscribed to */
|
|
7742
|
+
private subscribedLimiterQueues;
|
|
7743
|
+
/**
|
|
7744
|
+
* Subscribe to a queue's events to emit QueueChangeEvent
|
|
7745
|
+
* @param queue - The RezoQueue to subscribe to
|
|
7746
|
+
* @param queueType - Type of queue: 'crawler', 'scraper', or 'limiter'
|
|
7747
|
+
*/
|
|
7748
|
+
private _subscribeToQueueEvents;
|
|
7749
|
+
/**
|
|
7750
|
+
* Subscribe to all limiter queues that haven't been subscribed to yet.
|
|
7751
|
+
* Called when onQueueChange handlers are registered to ensure limiter events are captured.
|
|
7752
|
+
*/
|
|
7753
|
+
private _subscribeToLimiterQueues;
|
|
7653
7754
|
private _onBody;
|
|
7654
7755
|
private _onAttribute;
|
|
7655
7756
|
private _onText;
|
package/dist/entries/crawler.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
1
|
+
const _mod_ezbo5o = require('../crawler/crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_ezbo5o.Crawler;;
|
|
3
|
+
const _mod_c2caeq = require('../crawler/crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_c2caeq.CrawlerOptions;;
|
package/dist/index.cjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
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.Priority =
|
|
27
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_rb9z31 = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_rb9z31.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_rb9z31.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_rb9z31.createDefaultInstance;;
|
|
5
|
+
const _mod_fqmvh0 = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_fqmvh0.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_fqmvh0.RezoErrorCode;;
|
|
8
|
+
const _mod_ongh26 = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_ongh26.RezoHeaders;;
|
|
10
|
+
const _mod_938jqr = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_938jqr.RezoFormData;;
|
|
12
|
+
const _mod_voe6ji = require('./utils/cookies.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_voe6ji.RezoCookieJar;
|
|
14
|
+
exports.Cookie = _mod_voe6ji.Cookie;;
|
|
15
|
+
const _mod_khv7g7 = require('./utils/curl.cjs');
|
|
16
|
+
exports.toCurl = _mod_khv7g7.toCurl;
|
|
17
|
+
exports.fromCurl = _mod_khv7g7.fromCurl;;
|
|
18
|
+
const _mod_q4kf90 = require('./core/hooks.cjs');
|
|
19
|
+
exports.createDefaultHooks = _mod_q4kf90.createDefaultHooks;
|
|
20
|
+
exports.mergeHooks = _mod_q4kf90.mergeHooks;;
|
|
21
|
+
const _mod_ld2923 = require('./proxy/manager.cjs');
|
|
22
|
+
exports.ProxyManager = _mod_ld2923.ProxyManager;;
|
|
23
|
+
const _mod_u5qd1j = require('./queue/index.cjs');
|
|
24
|
+
exports.RezoQueue = _mod_u5qd1j.RezoQueue;
|
|
25
|
+
exports.HttpQueue = _mod_u5qd1j.HttpQueue;
|
|
26
|
+
exports.Priority = _mod_u5qd1j.Priority;
|
|
27
|
+
exports.HttpMethodPriority = _mod_u5qd1j.HttpMethodPriority;;
|
|
28
28
|
const { RezoError } = require('./errors/rezo-error.cjs');
|
|
29
29
|
const isRezoError = exports.isRezoError = RezoError.isRezoError;
|
|
30
30
|
const Cancel = exports.Cancel = RezoError;
|
|
@@ -34,9 +34,9 @@ const isCancel = exports.isCancel = (error) => {
|
|
|
34
34
|
};
|
|
35
35
|
const all = exports.all = Promise.all.bind(Promise);
|
|
36
36
|
const spread = exports.spread = (callback) => (array) => callback(...array);
|
|
37
|
-
const
|
|
38
|
-
exports.VERSION =
|
|
39
|
-
exports.PACKAGE_NAME =
|
|
37
|
+
const _mod_q52nw9 = require('./version.cjs');
|
|
38
|
+
exports.VERSION = _mod_q52nw9.VERSION;
|
|
39
|
+
exports.PACKAGE_NAME = _mod_q52nw9.PACKAGE_NAME;;
|
|
40
40
|
const { executeRequest } = require('./adapters/http.cjs');
|
|
41
41
|
const { setGlobalAdapter, createRezoInstance } = require('./core/rezo.cjs');
|
|
42
42
|
setGlobalAdapter(executeRequest);
|
package/dist/index.d.ts
CHANGED
|
@@ -2016,6 +2016,8 @@ export declare const HttpMethodPriority: Record<string, number>;
|
|
|
2016
2016
|
* Queue configuration options
|
|
2017
2017
|
*/
|
|
2018
2018
|
export interface QueueConfig {
|
|
2019
|
+
/** Name of the queue - useful for debugging and logging */
|
|
2020
|
+
name?: string;
|
|
2019
2021
|
/** Maximum concurrent tasks (default: Infinity) */
|
|
2020
2022
|
concurrency?: number;
|
|
2021
2023
|
/** Auto-start processing when tasks are added (default: true) */
|
|
@@ -2253,6 +2255,7 @@ export declare class RezoQueue<T = any> {
|
|
|
2253
2255
|
private isPausedFlag;
|
|
2254
2256
|
private intervalId?;
|
|
2255
2257
|
private intervalCount;
|
|
2258
|
+
readonly name: string;
|
|
2256
2259
|
private intervalStart;
|
|
2257
2260
|
private eventHandlers;
|
|
2258
2261
|
private statsData;
|
|
@@ -4883,7 +4886,7 @@ export declare class HttpQueue extends RezoQueue<any> {
|
|
|
4883
4886
|
*
|
|
4884
4887
|
* IMPORTANT: Update these values when bumping package version.
|
|
4885
4888
|
*/
|
|
4886
|
-
export declare const VERSION = "1.0.
|
|
4889
|
+
export declare const VERSION = "1.0.75";
|
|
4887
4890
|
export declare const PACKAGE_NAME = "rezo";
|
|
4888
4891
|
export declare const isRezoError: typeof RezoError.isRezoError;
|
|
4889
4892
|
export declare const Cancel: typeof RezoError;
|