rezo 1.0.86 → 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.
@@ -423,10 +423,13 @@ export declare class RezoFormData {
423
423
  */
424
424
  toUint8Array(): Promise<Uint8Array>;
425
425
  /**
426
- * Create RezoFormData from object
427
- * Handles nested objects, arrays, Blobs, Files, and Buffers
426
+ * Create RezoFormData from object.
427
+ * By default, nested objects/arrays are JSON-encoded as string values.
428
+ * Pass `nestedKeys: true` to flatten with bracket notation instead.
428
429
  */
429
- static fromObject(obj: Record<string, unknown>): RezoFormData;
430
+ static fromObject(obj: Record<string, unknown>, options?: {
431
+ nestedKeys?: boolean;
432
+ }): RezoFormData;
430
433
  /**
431
434
  * Create RezoFormData from native FormData
432
435
  */
@@ -2179,9 +2182,19 @@ declare class RezoQueue<T = any> {
2179
2182
  */
2180
2183
  private insertByPriority;
2181
2184
  /**
2182
- * 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.
2183
2191
  */
2184
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;
2185
2198
  /**
2186
2199
  * Execute a task
2187
2200
  */
@@ -5060,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5060
5073
  *
5061
5074
  * IMPORTANT: Update these values when bumping package version.
5062
5075
  */
5063
- export declare const VERSION = "1.0.86";
5076
+ export declare const VERSION = "1.0.88";
5064
5077
  /**
5065
5078
  * cURL Options Configuration
5066
5079
  *
@@ -423,10 +423,13 @@ export declare class RezoFormData {
423
423
  */
424
424
  toUint8Array(): Promise<Uint8Array>;
425
425
  /**
426
- * Create RezoFormData from object
427
- * Handles nested objects, arrays, Blobs, Files, and Buffers
426
+ * Create RezoFormData from object.
427
+ * By default, nested objects/arrays are JSON-encoded as string values.
428
+ * Pass `nestedKeys: true` to flatten with bracket notation instead.
428
429
  */
429
- static fromObject(obj: Record<string, unknown>): RezoFormData;
430
+ static fromObject(obj: Record<string, unknown>, options?: {
431
+ nestedKeys?: boolean;
432
+ }): RezoFormData;
430
433
  /**
431
434
  * Create RezoFormData from native FormData
432
435
  */
@@ -2179,9 +2182,19 @@ declare class RezoQueue<T = any> {
2179
2182
  */
2180
2183
  private insertByPriority;
2181
2184
  /**
2182
- * 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.
2183
2191
  */
2184
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;
2185
2198
  /**
2186
2199
  * Execute a task
2187
2200
  */
@@ -5060,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5060
5073
  *
5061
5074
  * IMPORTANT: Update these values when bumping package version.
5062
5075
  */
5063
- export declare const VERSION = "1.0.86";
5076
+ export declare const VERSION = "1.0.88";
5064
5077
  export declare const isRezoError: typeof RezoError.isRezoError;
5065
5078
  export declare const Cancel: typeof RezoError;
5066
5079
  export declare const CancelToken: {
@@ -423,10 +423,13 @@ export declare class RezoFormData {
423
423
  */
424
424
  toUint8Array(): Promise<Uint8Array>;
425
425
  /**
426
- * Create RezoFormData from object
427
- * Handles nested objects, arrays, Blobs, Files, and Buffers
426
+ * Create RezoFormData from object.
427
+ * By default, nested objects/arrays are JSON-encoded as string values.
428
+ * Pass `nestedKeys: true` to flatten with bracket notation instead.
428
429
  */
429
- static fromObject(obj: Record<string, unknown>): RezoFormData;
430
+ static fromObject(obj: Record<string, unknown>, options?: {
431
+ nestedKeys?: boolean;
432
+ }): RezoFormData;
430
433
  /**
431
434
  * Create RezoFormData from native FormData
432
435
  */
@@ -2179,9 +2182,19 @@ declare class RezoQueue<T = any> {
2179
2182
  */
2180
2183
  private insertByPriority;
2181
2184
  /**
2182
- * 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.
2183
2191
  */
2184
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;
2185
2198
  /**
2186
2199
  * Execute a task
2187
2200
  */
@@ -5060,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5060
5073
  *
5061
5074
  * IMPORTANT: Update these values when bumping package version.
5062
5075
  */
5063
- export declare const VERSION = "1.0.86";
5076
+ export declare const VERSION = "1.0.88";
5064
5077
  /**
5065
5078
  * Type guard to check if an error is a RezoError instance.
5066
5079
  */
@@ -423,10 +423,13 @@ export declare class RezoFormData {
423
423
  */
424
424
  toUint8Array(): Promise<Uint8Array>;
425
425
  /**
426
- * Create RezoFormData from object
427
- * Handles nested objects, arrays, Blobs, Files, and Buffers
426
+ * Create RezoFormData from object.
427
+ * By default, nested objects/arrays are JSON-encoded as string values.
428
+ * Pass `nestedKeys: true` to flatten with bracket notation instead.
428
429
  */
429
- static fromObject(obj: Record<string, unknown>): RezoFormData;
430
+ static fromObject(obj: Record<string, unknown>, options?: {
431
+ nestedKeys?: boolean;
432
+ }): RezoFormData;
430
433
  /**
431
434
  * Create RezoFormData from native FormData
432
435
  */
@@ -2179,9 +2182,19 @@ declare class RezoQueue<T = any> {
2179
2182
  */
2180
2183
  private insertByPriority;
2181
2184
  /**
2182
- * 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.
2183
2191
  */
2184
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;
2185
2198
  /**
2186
2199
  * Execute a task
2187
2200
  */
@@ -5060,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5060
5073
  *
5061
5074
  * IMPORTANT: Update these values when bumping package version.
5062
5075
  */
5063
- export declare const VERSION = "1.0.86";
5076
+ export declare const VERSION = "1.0.88";
5064
5077
  export declare const isRezoError: typeof RezoError.isRezoError;
5065
5078
  export declare const Cancel: typeof RezoError;
5066
5079
  export declare const CancelToken: {
@@ -423,10 +423,13 @@ export declare class RezoFormData {
423
423
  */
424
424
  toUint8Array(): Promise<Uint8Array>;
425
425
  /**
426
- * Create RezoFormData from object
427
- * Handles nested objects, arrays, Blobs, Files, and Buffers
426
+ * Create RezoFormData from object.
427
+ * By default, nested objects/arrays are JSON-encoded as string values.
428
+ * Pass `nestedKeys: true` to flatten with bracket notation instead.
428
429
  */
429
- static fromObject(obj: Record<string, unknown>): RezoFormData;
430
+ static fromObject(obj: Record<string, unknown>, options?: {
431
+ nestedKeys?: boolean;
432
+ }): RezoFormData;
430
433
  /**
431
434
  * Create RezoFormData from native FormData
432
435
  */
@@ -2179,9 +2182,19 @@ declare class RezoQueue<T = any> {
2179
2182
  */
2180
2183
  private insertByPriority;
2181
2184
  /**
2182
- * 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.
2183
2191
  */
2184
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;
2185
2198
  /**
2186
2199
  * Execute a task
2187
2200
  */
@@ -5060,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5060
5073
  *
5061
5074
  * IMPORTANT: Update these values when bumping package version.
5062
5075
  */
5063
- export declare const VERSION = "1.0.86";
5076
+ export declare const VERSION = "1.0.88";
5064
5077
  export declare const isRezoError: typeof RezoError.isRezoError;
5065
5078
  export declare const Cancel: typeof RezoError;
5066
5079
  export declare const CancelToken: {
@@ -423,10 +423,13 @@ export declare class RezoFormData {
423
423
  */
424
424
  toUint8Array(): Promise<Uint8Array>;
425
425
  /**
426
- * Create RezoFormData from object
427
- * Handles nested objects, arrays, Blobs, Files, and Buffers
426
+ * Create RezoFormData from object.
427
+ * By default, nested objects/arrays are JSON-encoded as string values.
428
+ * Pass `nestedKeys: true` to flatten with bracket notation instead.
428
429
  */
429
- static fromObject(obj: Record<string, unknown>): RezoFormData;
430
+ static fromObject(obj: Record<string, unknown>, options?: {
431
+ nestedKeys?: boolean;
432
+ }): RezoFormData;
430
433
  /**
431
434
  * Create RezoFormData from native FormData
432
435
  */
@@ -2179,9 +2182,19 @@ declare class RezoQueue<T = any> {
2179
2182
  */
2180
2183
  private insertByPriority;
2181
2184
  /**
2182
- * 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.
2183
2191
  */
2184
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;
2185
2198
  /**
2186
2199
  * Execute a task
2187
2200
  */
@@ -5060,7 +5073,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5060
5073
  *
5061
5074
  * IMPORTANT: Update these values when bumping package version.
5062
5075
  */
5063
- export declare const VERSION = "1.0.86";
5076
+ export declare const VERSION = "1.0.88";
5064
5077
  export declare const isRezoError: typeof RezoError.isRezoError;
5065
5078
  export declare const Cancel: typeof RezoError;
5066
5079
  export declare const CancelToken: {
@@ -1,6 +1,6 @@
1
- const _mod_b1m08l = require('./picker.cjs');
2
- exports.detectRuntime = _mod_b1m08l.detectRuntime;
3
- exports.getAdapterCapabilities = _mod_b1m08l.getAdapterCapabilities;
4
- exports.buildAdapterContext = _mod_b1m08l.buildAdapterContext;
5
- exports.getAvailableAdapters = _mod_b1m08l.getAvailableAdapters;
6
- exports.selectAdapter = _mod_b1m08l.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;;
@@ -1,9 +1,9 @@
1
- const _mod_k9ylvy = require('./lru-cache.cjs');
2
- exports.LRUCache = _mod_k9ylvy.LRUCache;;
3
- const _mod_q33d35 = require('./dns-cache.cjs');
4
- exports.DNSCache = _mod_q33d35.DNSCache;
5
- exports.getGlobalDNSCache = _mod_q33d35.getGlobalDNSCache;
6
- exports.resetGlobalDNSCache = _mod_q33d35.resetGlobalDNSCache;;
7
- const _mod_9a34hp = require('./response-cache.cjs');
8
- exports.ResponseCache = _mod_9a34hp.ResponseCache;
9
- exports.normalizeResponseCacheConfig = _mod_9a34hp.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;;
@@ -1,42 +1,42 @@
1
- const _mod_fdxzna = require('./crawler.cjs');
2
- exports.Crawler = _mod_fdxzna.Crawler;;
3
- const _mod_5hg9tk = require('./crawler-options.cjs');
4
- exports.CrawlerOptions = _mod_5hg9tk.CrawlerOptions;;
5
- const _mod_dr2ip6 = require('./plugin/robots-txt.cjs');
6
- exports.RobotsTxt = _mod_dr2ip6.RobotsTxt;;
7
- const _mod_8akelh = require('./plugin/file-cacher.cjs');
8
- exports.FileCacher = _mod_8akelh.FileCacher;;
9
- const _mod_4m9z2q = require('./plugin/url-store.cjs');
10
- exports.UrlStore = _mod_4m9z2q.UrlStore;;
11
- const _mod_rqnler = require('./plugin/navigation-history.cjs');
12
- exports.NavigationHistory = _mod_rqnler.NavigationHistory;;
13
- const _mod_0txu4j = require('./addon/oxylabs/index.cjs');
14
- exports.Oxylabs = _mod_0txu4j.Oxylabs;;
15
- const _mod_1qozqm = require('./addon/oxylabs/options.cjs');
16
- exports.OXYLABS_BROWSER_TYPES = _mod_1qozqm.OXYLABS_BROWSER_TYPES;
17
- exports.OXYLABS_COMMON_LOCALES = _mod_1qozqm.OXYLABS_COMMON_LOCALES;
18
- exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_1qozqm.OXYLABS_COMMON_GEO_LOCATIONS;
19
- exports.OXYLABS_US_STATES = _mod_1qozqm.OXYLABS_US_STATES;
20
- exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_1qozqm.OXYLABS_EUROPEAN_COUNTRIES;
21
- exports.OXYLABS_ASIAN_COUNTRIES = _mod_1qozqm.OXYLABS_ASIAN_COUNTRIES;
22
- exports.getRandomOxylabsBrowserType = _mod_1qozqm.getRandomBrowserType;
23
- exports.getRandomOxylabsLocale = _mod_1qozqm.getRandomLocale;
24
- exports.getRandomOxylabsGeoLocation = _mod_1qozqm.getRandomGeoLocation;;
25
- const _mod_6z5dzj = require('./scraper.cjs');
26
- exports.isRestrictedDomain = _mod_6z5dzj.isRestrictedDomain;;
27
- const _mod_ovpndy = require('./addon/decodo/index.cjs');
28
- exports.Decodo = _mod_ovpndy.Decodo;;
29
- const _mod_mbs3yd = require('./addon/decodo/options.cjs');
30
- exports.DECODO_DEVICE_TYPES = _mod_mbs3yd.DECODO_DEVICE_TYPES;
31
- exports.DECODO_HEADLESS_MODES = _mod_mbs3yd.DECODO_HEADLESS_MODES;
32
- exports.DECODO_COMMON_LOCALES = _mod_mbs3yd.DECODO_COMMON_LOCALES;
33
- exports.DECODO_COMMON_COUNTRIES = _mod_mbs3yd.DECODO_COMMON_COUNTRIES;
34
- exports.DECODO_EUROPEAN_COUNTRIES = _mod_mbs3yd.DECODO_EUROPEAN_COUNTRIES;
35
- exports.DECODO_ASIAN_COUNTRIES = _mod_mbs3yd.DECODO_ASIAN_COUNTRIES;
36
- exports.DECODO_US_STATES = _mod_mbs3yd.DECODO_US_STATES;
37
- exports.DECODO_COMMON_CITIES = _mod_mbs3yd.DECODO_COMMON_CITIES;
38
- exports.getRandomDecodoDeviceType = _mod_mbs3yd.getRandomDeviceType;
39
- exports.getRandomDecodoLocale = _mod_mbs3yd.getRandomLocale;
40
- exports.getRandomDecodoCountry = _mod_mbs3yd.getRandomCountry;
41
- exports.getRandomDecodoCity = _mod_mbs3yd.getRandomCity;
42
- exports.generateDecodoSessionId = _mod_mbs3yd.generateSessionId;;
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;;
package/dist/crawler.d.ts CHANGED
@@ -551,10 +551,13 @@ declare class RezoFormData {
551
551
  */
552
552
  toUint8Array(): Promise<Uint8Array>;
553
553
  /**
554
- * Create RezoFormData from object
555
- * Handles nested objects, arrays, Blobs, Files, and Buffers
554
+ * Create RezoFormData from object.
555
+ * By default, nested objects/arrays are JSON-encoded as string values.
556
+ * Pass `nestedKeys: true` to flatten with bracket notation instead.
556
557
  */
557
- static fromObject(obj: Record<string, unknown>): RezoFormData;
558
+ static fromObject(obj: Record<string, unknown>, options?: {
559
+ nestedKeys?: boolean;
560
+ }): RezoFormData;
558
561
  /**
559
562
  * Create RezoFormData from native FormData
560
563
  */
@@ -2298,9 +2301,19 @@ declare class RezoQueue<T = any> {
2298
2301
  */
2299
2302
  private insertByPriority;
2300
2303
  /**
2301
- * 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.
2302
2310
  */
2303
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;
2304
2317
  /**
2305
2318
  * Execute a task
2306
2319
  */
@@ -1,6 +1,6 @@
1
- const _mod_tx3e9n = require('../crawler/crawler.cjs');
2
- exports.Crawler = _mod_tx3e9n.Crawler;;
3
- const _mod_wi6zf0 = require('../crawler/crawler-options.cjs');
4
- exports.CrawlerOptions = _mod_wi6zf0.CrawlerOptions;;
5
- const _mod_by1p3x = require('../crawler/scraper.cjs');
6
- exports.isRestrictedDomain = _mod_by1p3x.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 _mod_gfwlqn = require('./core/rezo.cjs');
2
- exports.Rezo = _mod_gfwlqn.Rezo;
3
- exports.createRezoInstance = _mod_gfwlqn.createRezoInstance;
4
- exports.createDefaultInstance = _mod_gfwlqn.createDefaultInstance;;
5
- const _mod_jm3yk1 = require('./errors/rezo-error.cjs');
6
- exports.RezoError = _mod_jm3yk1.RezoError;
7
- exports.RezoErrorCode = _mod_jm3yk1.RezoErrorCode;;
8
- const _mod_rnxs4w = require('./utils/headers.cjs');
9
- exports.RezoHeaders = _mod_rnxs4w.RezoHeaders;;
10
- const _mod_6iu6tg = require('./utils/form-data.cjs');
11
- exports.RezoFormData = _mod_6iu6tg.RezoFormData;;
12
- const _mod_mqrm3i = require('./utils/cookies.cjs');
13
- exports.RezoCookieJar = _mod_mqrm3i.RezoCookieJar;
14
- exports.Cookie = _mod_mqrm3i.Cookie;;
15
- const _mod_pikotx = require('./utils/curl.cjs');
16
- exports.toCurl = _mod_pikotx.toCurl;
17
- exports.fromCurl = _mod_pikotx.fromCurl;;
18
- const _mod_qrpwm8 = require('./core/hooks.cjs');
19
- exports.createDefaultHooks = _mod_qrpwm8.createDefaultHooks;
20
- exports.mergeHooks = _mod_qrpwm8.mergeHooks;;
21
- const _mod_x17p93 = require('./proxy/manager.cjs');
22
- exports.ProxyManager = _mod_x17p93.ProxyManager;;
23
- const _mod_sb1ecv = require('./queue/index.cjs');
24
- exports.RezoQueue = _mod_sb1ecv.RezoQueue;
25
- exports.HttpQueue = _mod_sb1ecv.HttpQueue;
26
- exports.RezoHttpQueue = _mod_sb1ecv.RezoHttpQueue;
27
- exports.Priority = _mod_sb1ecv.Priority;
28
- exports.HttpMethodPriority = _mod_sb1ecv.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 _mod_mg08mz = require('./version.cjs');
39
- exports.VERSION = _mod_mg08mz.VERSION;
40
- exports.PACKAGE_NAME = _mod_mg08mz.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
@@ -423,10 +423,13 @@ export declare class RezoFormData {
423
423
  */
424
424
  toUint8Array(): Promise<Uint8Array>;
425
425
  /**
426
- * Create RezoFormData from object
427
- * Handles nested objects, arrays, Blobs, Files, and Buffers
426
+ * Create RezoFormData from object.
427
+ * By default, nested objects/arrays are JSON-encoded as string values.
428
+ * Pass `nestedKeys: true` to flatten with bracket notation instead.
428
429
  */
429
- static fromObject(obj: Record<string, unknown>): RezoFormData;
430
+ static fromObject(obj: Record<string, unknown>, options?: {
431
+ nestedKeys?: boolean;
432
+ }): RezoFormData;
430
433
  /**
431
434
  * Create RezoFormData from native FormData
432
435
  */
@@ -2241,9 +2244,19 @@ export declare class RezoQueue<T = any> {
2241
2244
  */
2242
2245
  private insertByPriority;
2243
2246
  /**
2244
- * 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.
2245
2253
  */
2246
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;
2247
2260
  /**
2248
2261
  * Execute a task
2249
2262
  */
@@ -5189,7 +5202,7 @@ export declare function createDefaultInstance(config?: RezoDefaultOptions): Rezo
5189
5202
  *
5190
5203
  * IMPORTANT: Update these values when bumping package version.
5191
5204
  */
5192
- export declare const VERSION = "1.0.86";
5205
+ export declare const VERSION = "1.0.88";
5193
5206
  export declare const PACKAGE_NAME = "rezo";
5194
5207
  export declare const isRezoError: typeof RezoError.isRezoError;
5195
5208
  export declare const Cancel: typeof RezoError;
@@ -1,14 +1,14 @@
1
- const _mod_2pwo1u = require('./base.cjs');
2
- exports.Agent = _mod_2pwo1u.Agent;;
3
- const _mod_ncm88r = require('./http-proxy.cjs');
4
- exports.HttpProxyAgent = _mod_ncm88r.HttpProxyAgent;;
5
- const _mod_r4i2hz = require('./https-proxy.cjs');
6
- exports.HttpsProxyAgent = _mod_r4i2hz.HttpsProxyAgent;;
7
- const _mod_o0fb3v = require('./socks-proxy.cjs');
8
- exports.SocksProxyAgent = _mod_o0fb3v.SocksProxyAgent;;
9
- const _mod_hqtj8b = require('./socks-client.cjs');
10
- exports.SocksClient = _mod_hqtj8b.SocksClient;;
11
- const _mod_1yx1mz = require('./bun-socks-http.cjs');
12
- exports.bunHttp = _mod_1yx1mz.bunHttp;
13
- exports.isBunRuntime = _mod_1yx1mz.isBunRuntime;
14
- exports.isBunSocksRequest = _mod_1yx1mz.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;;