rezo 1.0.84 → 1.0.86

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.
Files changed (41) hide show
  1. package/dist/adapters/entries/curl.d.ts +24 -3
  2. package/dist/adapters/entries/fetch.d.ts +24 -3
  3. package/dist/adapters/entries/http.d.ts +24 -3
  4. package/dist/adapters/entries/http2.d.ts +24 -3
  5. package/dist/adapters/entries/react-native.d.ts +24 -3
  6. package/dist/adapters/entries/xhr.d.ts +24 -3
  7. package/dist/adapters/index.cjs +6 -6
  8. package/dist/cache/index.cjs +9 -9
  9. package/dist/crawler/index.cjs +42 -42
  10. package/dist/crawler/plugin/sqlite-utils.cjs +1 -1
  11. package/dist/crawler/plugin/sqlite-utils.js +1 -1
  12. package/dist/crawler.d.ts +23 -2
  13. package/dist/entries/crawler.cjs +6 -6
  14. package/dist/index.cjs +31 -31
  15. package/dist/index.d.ts +24 -3
  16. package/dist/internal/agents/index.cjs +14 -14
  17. package/dist/platform/browser.d.ts +24 -3
  18. package/dist/platform/bun.d.ts +24 -3
  19. package/dist/platform/deno.d.ts +24 -3
  20. package/dist/platform/node.d.ts +24 -3
  21. package/dist/platform/react-native.d.ts +24 -3
  22. package/dist/platform/worker.d.ts +24 -3
  23. package/dist/proxy/index.cjs +4 -4
  24. package/dist/queue/index.cjs +9 -9
  25. package/dist/responses/universal/index.cjs +11 -11
  26. package/dist/utils/data-operations.cjs +87 -8
  27. package/dist/utils/data-operations.js +87 -8
  28. package/dist/utils/headers.cjs +1 -1
  29. package/dist/utils/headers.js +1 -1
  30. package/dist/version.cjs +1 -1
  31. package/dist/version.js +1 -1
  32. package/dist/wget/downloader.cjs +35 -1
  33. package/dist/wget/downloader.js +35 -1
  34. package/dist/wget/index.cjs +59 -49
  35. package/dist/wget/index.d.ts +192 -2
  36. package/dist/wget/index.js +9 -0
  37. package/dist/wget/style-extractor.cjs +124 -0
  38. package/dist/wget/style-extractor.js +121 -0
  39. package/dist/wget/types.cjs +11 -0
  40. package/dist/wget/types.js +11 -0
  41. package/package.json +1 -1
@@ -3891,12 +3891,22 @@ export type NestedObject = {
3891
3891
  [key: string]: NestedValue;
3892
3892
  };
3893
3893
  export type NestedArray = NestedValue[];
3894
+ export type NestedMode = "json" | "brackets" | "dots";
3895
+ export interface RezoURLSearchParamsOptions {
3896
+ nestedKeys?: NestedMode;
3897
+ }
3894
3898
  declare class RezoURLSearchParams extends URLSearchParams {
3899
+ private nestedMode;
3900
+ constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams, options?: RezoURLSearchParamsOptions);
3895
3901
  constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams);
3896
3902
  /**
3897
3903
  * Append a nested object to the search params
3898
3904
  */
3899
3905
  appendObject(obj: NestedObject, prefix?: string): void;
3906
+ /**
3907
+ * Build the nested key based on the current mode
3908
+ */
3909
+ private buildNestedKey;
3900
3910
  /**
3901
3911
  * Set a value (replacing existing values with the same key)
3902
3912
  */
@@ -3910,9 +3920,20 @@ declare class RezoURLSearchParams extends URLSearchParams {
3910
3920
  */
3911
3921
  private appendArray;
3912
3922
  /**
3913
- * Convert to a plain object (useful for debugging)
3923
+ * Convert to a plain flat object (keys remain as-is)
3924
+ */
3925
+ toFlatObject(): Record<string, string>;
3926
+ /**
3927
+ * Convert to a nested object, parsing bracket/dot notation keys
3928
+ * and JSON-encoded values back into their original structure
3929
+ */
3930
+ toObject(): Record<string, any>;
3931
+ /**
3932
+ * Override toString to use unencoded brackets for nested keys.
3933
+ * Native URLSearchParams encodes [ ] as %5B %5D, but standard
3934
+ * form encoding (PHP, Rails, Express/qs) expects literal brackets.
3914
3935
  */
3915
- toObject(): Record<string, string>;
3936
+ toString(): string;
3916
3937
  /**
3917
3938
  * Create from a flat object with bracket notation keys
3918
3939
  */
@@ -5039,7 +5060,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5039
5060
  *
5040
5061
  * IMPORTANT: Update these values when bumping package version.
5041
5062
  */
5042
- export declare const VERSION = "1.0.84";
5063
+ export declare const VERSION = "1.0.86";
5043
5064
  /**
5044
5065
  * cURL Options Configuration
5045
5066
  *
@@ -3891,12 +3891,22 @@ export type NestedObject = {
3891
3891
  [key: string]: NestedValue;
3892
3892
  };
3893
3893
  export type NestedArray = NestedValue[];
3894
+ export type NestedMode = "json" | "brackets" | "dots";
3895
+ export interface RezoURLSearchParamsOptions {
3896
+ nestedKeys?: NestedMode;
3897
+ }
3894
3898
  declare class RezoURLSearchParams extends URLSearchParams {
3899
+ private nestedMode;
3900
+ constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams, options?: RezoURLSearchParamsOptions);
3895
3901
  constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams);
3896
3902
  /**
3897
3903
  * Append a nested object to the search params
3898
3904
  */
3899
3905
  appendObject(obj: NestedObject, prefix?: string): void;
3906
+ /**
3907
+ * Build the nested key based on the current mode
3908
+ */
3909
+ private buildNestedKey;
3900
3910
  /**
3901
3911
  * Set a value (replacing existing values with the same key)
3902
3912
  */
@@ -3910,9 +3920,20 @@ declare class RezoURLSearchParams extends URLSearchParams {
3910
3920
  */
3911
3921
  private appendArray;
3912
3922
  /**
3913
- * Convert to a plain object (useful for debugging)
3923
+ * Convert to a plain flat object (keys remain as-is)
3924
+ */
3925
+ toFlatObject(): Record<string, string>;
3926
+ /**
3927
+ * Convert to a nested object, parsing bracket/dot notation keys
3928
+ * and JSON-encoded values back into their original structure
3929
+ */
3930
+ toObject(): Record<string, any>;
3931
+ /**
3932
+ * Override toString to use unencoded brackets for nested keys.
3933
+ * Native URLSearchParams encodes [ ] as %5B %5D, but standard
3934
+ * form encoding (PHP, Rails, Express/qs) expects literal brackets.
3914
3935
  */
3915
- toObject(): Record<string, string>;
3936
+ toString(): string;
3916
3937
  /**
3917
3938
  * Create from a flat object with bracket notation keys
3918
3939
  */
@@ -5039,7 +5060,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5039
5060
  *
5040
5061
  * IMPORTANT: Update these values when bumping package version.
5041
5062
  */
5042
- export declare const VERSION = "1.0.84";
5063
+ export declare const VERSION = "1.0.86";
5043
5064
  export declare const isRezoError: typeof RezoError.isRezoError;
5044
5065
  export declare const Cancel: typeof RezoError;
5045
5066
  export declare const CancelToken: {
@@ -3891,12 +3891,22 @@ export type NestedObject = {
3891
3891
  [key: string]: NestedValue;
3892
3892
  };
3893
3893
  export type NestedArray = NestedValue[];
3894
+ export type NestedMode = "json" | "brackets" | "dots";
3895
+ export interface RezoURLSearchParamsOptions {
3896
+ nestedKeys?: NestedMode;
3897
+ }
3894
3898
  declare class RezoURLSearchParams extends URLSearchParams {
3899
+ private nestedMode;
3900
+ constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams, options?: RezoURLSearchParamsOptions);
3895
3901
  constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams);
3896
3902
  /**
3897
3903
  * Append a nested object to the search params
3898
3904
  */
3899
3905
  appendObject(obj: NestedObject, prefix?: string): void;
3906
+ /**
3907
+ * Build the nested key based on the current mode
3908
+ */
3909
+ private buildNestedKey;
3900
3910
  /**
3901
3911
  * Set a value (replacing existing values with the same key)
3902
3912
  */
@@ -3910,9 +3920,20 @@ declare class RezoURLSearchParams extends URLSearchParams {
3910
3920
  */
3911
3921
  private appendArray;
3912
3922
  /**
3913
- * Convert to a plain object (useful for debugging)
3923
+ * Convert to a plain flat object (keys remain as-is)
3924
+ */
3925
+ toFlatObject(): Record<string, string>;
3926
+ /**
3927
+ * Convert to a nested object, parsing bracket/dot notation keys
3928
+ * and JSON-encoded values back into their original structure
3929
+ */
3930
+ toObject(): Record<string, any>;
3931
+ /**
3932
+ * Override toString to use unencoded brackets for nested keys.
3933
+ * Native URLSearchParams encodes [ ] as %5B %5D, but standard
3934
+ * form encoding (PHP, Rails, Express/qs) expects literal brackets.
3914
3935
  */
3915
- toObject(): Record<string, string>;
3936
+ toString(): string;
3916
3937
  /**
3917
3938
  * Create from a flat object with bracket notation keys
3918
3939
  */
@@ -5039,7 +5060,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5039
5060
  *
5040
5061
  * IMPORTANT: Update these values when bumping package version.
5041
5062
  */
5042
- export declare const VERSION = "1.0.84";
5063
+ export declare const VERSION = "1.0.86";
5043
5064
  /**
5044
5065
  * Type guard to check if an error is a RezoError instance.
5045
5066
  */
@@ -3891,12 +3891,22 @@ export type NestedObject = {
3891
3891
  [key: string]: NestedValue;
3892
3892
  };
3893
3893
  export type NestedArray = NestedValue[];
3894
+ export type NestedMode = "json" | "brackets" | "dots";
3895
+ export interface RezoURLSearchParamsOptions {
3896
+ nestedKeys?: NestedMode;
3897
+ }
3894
3898
  declare class RezoURLSearchParams extends URLSearchParams {
3899
+ private nestedMode;
3900
+ constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams, options?: RezoURLSearchParamsOptions);
3895
3901
  constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams);
3896
3902
  /**
3897
3903
  * Append a nested object to the search params
3898
3904
  */
3899
3905
  appendObject(obj: NestedObject, prefix?: string): void;
3906
+ /**
3907
+ * Build the nested key based on the current mode
3908
+ */
3909
+ private buildNestedKey;
3900
3910
  /**
3901
3911
  * Set a value (replacing existing values with the same key)
3902
3912
  */
@@ -3910,9 +3920,20 @@ declare class RezoURLSearchParams extends URLSearchParams {
3910
3920
  */
3911
3921
  private appendArray;
3912
3922
  /**
3913
- * Convert to a plain object (useful for debugging)
3923
+ * Convert to a plain flat object (keys remain as-is)
3924
+ */
3925
+ toFlatObject(): Record<string, string>;
3926
+ /**
3927
+ * Convert to a nested object, parsing bracket/dot notation keys
3928
+ * and JSON-encoded values back into their original structure
3929
+ */
3930
+ toObject(): Record<string, any>;
3931
+ /**
3932
+ * Override toString to use unencoded brackets for nested keys.
3933
+ * Native URLSearchParams encodes [ ] as %5B %5D, but standard
3934
+ * form encoding (PHP, Rails, Express/qs) expects literal brackets.
3914
3935
  */
3915
- toObject(): Record<string, string>;
3936
+ toString(): string;
3916
3937
  /**
3917
3938
  * Create from a flat object with bracket notation keys
3918
3939
  */
@@ -5039,7 +5060,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5039
5060
  *
5040
5061
  * IMPORTANT: Update these values when bumping package version.
5041
5062
  */
5042
- export declare const VERSION = "1.0.84";
5063
+ export declare const VERSION = "1.0.86";
5043
5064
  export declare const isRezoError: typeof RezoError.isRezoError;
5044
5065
  export declare const Cancel: typeof RezoError;
5045
5066
  export declare const CancelToken: {
@@ -3891,12 +3891,22 @@ export type NestedObject = {
3891
3891
  [key: string]: NestedValue;
3892
3892
  };
3893
3893
  export type NestedArray = NestedValue[];
3894
+ export type NestedMode = "json" | "brackets" | "dots";
3895
+ export interface RezoURLSearchParamsOptions {
3896
+ nestedKeys?: NestedMode;
3897
+ }
3894
3898
  declare class RezoURLSearchParams extends URLSearchParams {
3899
+ private nestedMode;
3900
+ constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams, options?: RezoURLSearchParamsOptions);
3895
3901
  constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams);
3896
3902
  /**
3897
3903
  * Append a nested object to the search params
3898
3904
  */
3899
3905
  appendObject(obj: NestedObject, prefix?: string): void;
3906
+ /**
3907
+ * Build the nested key based on the current mode
3908
+ */
3909
+ private buildNestedKey;
3900
3910
  /**
3901
3911
  * Set a value (replacing existing values with the same key)
3902
3912
  */
@@ -3910,9 +3920,20 @@ declare class RezoURLSearchParams extends URLSearchParams {
3910
3920
  */
3911
3921
  private appendArray;
3912
3922
  /**
3913
- * Convert to a plain object (useful for debugging)
3923
+ * Convert to a plain flat object (keys remain as-is)
3924
+ */
3925
+ toFlatObject(): Record<string, string>;
3926
+ /**
3927
+ * Convert to a nested object, parsing bracket/dot notation keys
3928
+ * and JSON-encoded values back into their original structure
3929
+ */
3930
+ toObject(): Record<string, any>;
3931
+ /**
3932
+ * Override toString to use unencoded brackets for nested keys.
3933
+ * Native URLSearchParams encodes [ ] as %5B %5D, but standard
3934
+ * form encoding (PHP, Rails, Express/qs) expects literal brackets.
3914
3935
  */
3915
- toObject(): Record<string, string>;
3936
+ toString(): string;
3916
3937
  /**
3917
3938
  * Create from a flat object with bracket notation keys
3918
3939
  */
@@ -5039,7 +5060,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5039
5060
  *
5040
5061
  * IMPORTANT: Update these values when bumping package version.
5041
5062
  */
5042
- export declare const VERSION = "1.0.84";
5063
+ export declare const VERSION = "1.0.86";
5043
5064
  export declare const isRezoError: typeof RezoError.isRezoError;
5044
5065
  export declare const Cancel: typeof RezoError;
5045
5066
  export declare const CancelToken: {
@@ -3891,12 +3891,22 @@ export type NestedObject = {
3891
3891
  [key: string]: NestedValue;
3892
3892
  };
3893
3893
  export type NestedArray = NestedValue[];
3894
+ export type NestedMode = "json" | "brackets" | "dots";
3895
+ export interface RezoURLSearchParamsOptions {
3896
+ nestedKeys?: NestedMode;
3897
+ }
3894
3898
  declare class RezoURLSearchParams extends URLSearchParams {
3899
+ private nestedMode;
3900
+ constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams, options?: RezoURLSearchParamsOptions);
3895
3901
  constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams);
3896
3902
  /**
3897
3903
  * Append a nested object to the search params
3898
3904
  */
3899
3905
  appendObject(obj: NestedObject, prefix?: string): void;
3906
+ /**
3907
+ * Build the nested key based on the current mode
3908
+ */
3909
+ private buildNestedKey;
3900
3910
  /**
3901
3911
  * Set a value (replacing existing values with the same key)
3902
3912
  */
@@ -3910,9 +3920,20 @@ declare class RezoURLSearchParams extends URLSearchParams {
3910
3920
  */
3911
3921
  private appendArray;
3912
3922
  /**
3913
- * Convert to a plain object (useful for debugging)
3923
+ * Convert to a plain flat object (keys remain as-is)
3924
+ */
3925
+ toFlatObject(): Record<string, string>;
3926
+ /**
3927
+ * Convert to a nested object, parsing bracket/dot notation keys
3928
+ * and JSON-encoded values back into their original structure
3929
+ */
3930
+ toObject(): Record<string, any>;
3931
+ /**
3932
+ * Override toString to use unencoded brackets for nested keys.
3933
+ * Native URLSearchParams encodes [ ] as %5B %5D, but standard
3934
+ * form encoding (PHP, Rails, Express/qs) expects literal brackets.
3914
3935
  */
3915
- toObject(): Record<string, string>;
3936
+ toString(): string;
3916
3937
  /**
3917
3938
  * Create from a flat object with bracket notation keys
3918
3939
  */
@@ -5039,7 +5060,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
5039
5060
  *
5040
5061
  * IMPORTANT: Update these values when bumping package version.
5041
5062
  */
5042
- export declare const VERSION = "1.0.84";
5063
+ export declare const VERSION = "1.0.86";
5043
5064
  export declare const isRezoError: typeof RezoError.isRezoError;
5044
5065
  export declare const Cancel: typeof RezoError;
5045
5066
  export declare const CancelToken: {
@@ -1,6 +1,6 @@
1
- const _mod_3p5i7l = require('./picker.cjs');
2
- exports.detectRuntime = _mod_3p5i7l.detectRuntime;
3
- exports.getAdapterCapabilities = _mod_3p5i7l.getAdapterCapabilities;
4
- exports.buildAdapterContext = _mod_3p5i7l.buildAdapterContext;
5
- exports.getAvailableAdapters = _mod_3p5i7l.getAvailableAdapters;
6
- exports.selectAdapter = _mod_3p5i7l.selectAdapter;;
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,9 +1,9 @@
1
- const _mod_ci3rei = require('./lru-cache.cjs');
2
- exports.LRUCache = _mod_ci3rei.LRUCache;;
3
- const _mod_5hg6xp = require('./dns-cache.cjs');
4
- exports.DNSCache = _mod_5hg6xp.DNSCache;
5
- exports.getGlobalDNSCache = _mod_5hg6xp.getGlobalDNSCache;
6
- exports.resetGlobalDNSCache = _mod_5hg6xp.resetGlobalDNSCache;;
7
- const _mod_ychnao = require('./response-cache.cjs');
8
- exports.ResponseCache = _mod_ychnao.ResponseCache;
9
- exports.normalizeResponseCacheConfig = _mod_ychnao.normalizeResponseCacheConfig;;
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,42 +1,42 @@
1
- const _mod_duk9tf = require('./crawler.cjs');
2
- exports.Crawler = _mod_duk9tf.Crawler;;
3
- const _mod_akzmlw = require('./crawler-options.cjs');
4
- exports.CrawlerOptions = _mod_akzmlw.CrawlerOptions;;
5
- const _mod_6op5fj = require('./plugin/robots-txt.cjs');
6
- exports.RobotsTxt = _mod_6op5fj.RobotsTxt;;
7
- const _mod_dtkqtw = require('./plugin/file-cacher.cjs');
8
- exports.FileCacher = _mod_dtkqtw.FileCacher;;
9
- const _mod_7vu350 = require('./plugin/url-store.cjs');
10
- exports.UrlStore = _mod_7vu350.UrlStore;;
11
- const _mod_f8xhaf = require('./plugin/navigation-history.cjs');
12
- exports.NavigationHistory = _mod_f8xhaf.NavigationHistory;;
13
- const _mod_ytibwi = require('./addon/oxylabs/index.cjs');
14
- exports.Oxylabs = _mod_ytibwi.Oxylabs;;
15
- const _mod_1sgs87 = require('./addon/oxylabs/options.cjs');
16
- exports.OXYLABS_BROWSER_TYPES = _mod_1sgs87.OXYLABS_BROWSER_TYPES;
17
- exports.OXYLABS_COMMON_LOCALES = _mod_1sgs87.OXYLABS_COMMON_LOCALES;
18
- exports.OXYLABS_COMMON_GEO_LOCATIONS = _mod_1sgs87.OXYLABS_COMMON_GEO_LOCATIONS;
19
- exports.OXYLABS_US_STATES = _mod_1sgs87.OXYLABS_US_STATES;
20
- exports.OXYLABS_EUROPEAN_COUNTRIES = _mod_1sgs87.OXYLABS_EUROPEAN_COUNTRIES;
21
- exports.OXYLABS_ASIAN_COUNTRIES = _mod_1sgs87.OXYLABS_ASIAN_COUNTRIES;
22
- exports.getRandomOxylabsBrowserType = _mod_1sgs87.getRandomBrowserType;
23
- exports.getRandomOxylabsLocale = _mod_1sgs87.getRandomLocale;
24
- exports.getRandomOxylabsGeoLocation = _mod_1sgs87.getRandomGeoLocation;;
25
- const _mod_5mf9qe = require('./scraper.cjs');
26
- exports.isRestrictedDomain = _mod_5mf9qe.isRestrictedDomain;;
27
- const _mod_4si1yx = require('./addon/decodo/index.cjs');
28
- exports.Decodo = _mod_4si1yx.Decodo;;
29
- const _mod_quv5x1 = require('./addon/decodo/options.cjs');
30
- exports.DECODO_DEVICE_TYPES = _mod_quv5x1.DECODO_DEVICE_TYPES;
31
- exports.DECODO_HEADLESS_MODES = _mod_quv5x1.DECODO_HEADLESS_MODES;
32
- exports.DECODO_COMMON_LOCALES = _mod_quv5x1.DECODO_COMMON_LOCALES;
33
- exports.DECODO_COMMON_COUNTRIES = _mod_quv5x1.DECODO_COMMON_COUNTRIES;
34
- exports.DECODO_EUROPEAN_COUNTRIES = _mod_quv5x1.DECODO_EUROPEAN_COUNTRIES;
35
- exports.DECODO_ASIAN_COUNTRIES = _mod_quv5x1.DECODO_ASIAN_COUNTRIES;
36
- exports.DECODO_US_STATES = _mod_quv5x1.DECODO_US_STATES;
37
- exports.DECODO_COMMON_CITIES = _mod_quv5x1.DECODO_COMMON_CITIES;
38
- exports.getRandomDecodoDeviceType = _mod_quv5x1.getRandomDeviceType;
39
- exports.getRandomDecodoLocale = _mod_quv5x1.getRandomLocale;
40
- exports.getRandomDecodoCountry = _mod_quv5x1.getRandomCountry;
41
- exports.getRandomDecodoCity = _mod_quv5x1.getRandomCity;
42
- exports.generateDecodoSessionId = _mod_quv5x1.generateSessionId;;
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 +1 @@
1
- var h=Object.create;var{getPrototypeOf:y,defineProperty:l,getOwnPropertyNames:f}=Object;var d=Object.prototype.hasOwnProperty;var u=(t,a,r)=>{r=t!=null?h(y(t)):{};let s=a||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r;for(let e of f(t))if(!d.call(s,e))l(s,e,{get:()=>t[e],enumerable:!0});return s};var x=exports.isBun=typeof globalThis.Bun<"u",m={maxRetries:5,initialDelayMs:50,maxDelayMs:1000};function w(t){if(!t)return!1;let a=t.message||t.toString();return a.includes("SQLITE_BUSY")||a.includes("database is locked")||a.includes("database table is locked")}function D(t){return new Promise((a)=>setTimeout(a,t))}function i(t,a={}){let r={...m,...a},s;for(let e=0;e<=r.maxRetries;e++)try{return t()}catch(n){if(s=n,!w(n)||e>=r.maxRetries)throw n;let c=Math.min(r.initialDelayMs*Math.pow(2,e)+Math.random()*50,r.maxDelayMs),o=Date.now();while(Date.now()-o<c);}throw s}async function M(t,a={}){let r={...m,...a},s;for(let e=0;e<=r.maxRetries;e++)try{return await t()}catch(n){if(s=n,!w(n)||e>=r.maxRetries)throw n;let c=Math.min(r.initialDelayMs*Math.pow(2,e)+Math.random()*50,r.maxDelayMs);await D(c)}throw s}async function R(t,a={}){if(x){let{Database:e}=await import("bun:sqlite"),n=new e(t);return{run:(c,...o)=>i(()=>n.run(c,...o),a),get:(c,...o)=>i(()=>n.query(c).get(...o),a),all:(c,...o)=>i(()=>n.query(c).all(...o),a),exec:(c)=>i(()=>n.exec(c),a),close:()=>n.close()}}let{DatabaseSync:r}=await import("node:sqlite"),s=new r(t);return{run:(e,...n)=>i(()=>{if(n.length===0)s.exec(e);else s.prepare(e).run(...n)},a),get:(e,...n)=>i(()=>{return s.prepare(e).get(...n)},a),all:(e,...n)=>i(()=>{return s.prepare(e).all(...n)},a),exec:(e)=>i(()=>s.exec(e),a),close:()=>s.close()}}exports.withRetrySync=i;exports.withRetryAsync=M;exports.createDatabase=R;
1
+ var m=exports.isBun=typeof globalThis.Bun<"u",l={maxRetries:5,initialDelayMs:50,maxDelayMs:1000};function u(s){if(!s)return!1;let a=s.message||s.toString();return a.includes("SQLITE_BUSY")||a.includes("database is locked")||a.includes("database table is locked")}function w(s){return new Promise((a)=>setTimeout(a,s))}function i(s,a={}){let c={...l,...a},r;for(let e=0;e<=c.maxRetries;e++)try{return s()}catch(t){if(r=t,!u(t)||e>=c.maxRetries)throw t;let n=Math.min(c.initialDelayMs*Math.pow(2,e)+Math.random()*50,c.maxDelayMs),o=Date.now();while(Date.now()-o<n);}throw r}async function h(s,a={}){let c={...l,...a},r;for(let e=0;e<=c.maxRetries;e++)try{return await s()}catch(t){if(r=t,!u(t)||e>=c.maxRetries)throw t;let n=Math.min(c.initialDelayMs*Math.pow(2,e)+Math.random()*50,c.maxDelayMs);await w(n)}throw r}async function y(s,a={}){if(m){let{Database:e}=await import("bun:sqlite"),t=new e(s);return{run:(n,...o)=>i(()=>t.run(n,...o),a),get:(n,...o)=>i(()=>t.query(n).get(...o),a),all:(n,...o)=>i(()=>t.query(n).all(...o),a),exec:(n)=>i(()=>t.exec(n),a),close:()=>t.close()}}let{DatabaseSync:c}=await import("node:sqlite"),r=new c(s);return{run:(e,...t)=>i(()=>{if(t.length===0)r.exec(e);else r.prepare(e).run(...t)},a),get:(e,...t)=>i(()=>{return r.prepare(e).get(...t)},a),all:(e,...t)=>i(()=>{return r.prepare(e).all(...t)},a),exec:(e)=>i(()=>r.exec(e),a),close:()=>r.close()}}exports.withRetrySync=i;exports.withRetryAsync=h;exports.createDatabase=y;
@@ -1 +1 @@
1
- import{createRequire as p}from"node:module";var h=Object.create;var{getPrototypeOf:f,defineProperty:i,getOwnPropertyNames:d}=Object;var y=Object.prototype.hasOwnProperty;var u=(t,a,r)=>{r=t!=null?h(f(t)):{};let s=a||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r;for(let e of d(t))if(!y.call(s,e))i(s,e,{get:()=>t[e],enumerable:!0});return s};var m=p(import.meta.url);var D=typeof globalThis.Bun<"u",w={maxRetries:5,initialDelayMs:50,maxDelayMs:1000};function x(t){if(!t)return!1;let a=t.message||t.toString();return a.includes("SQLITE_BUSY")||a.includes("database is locked")||a.includes("database table is locked")}function M(t){return new Promise((a)=>setTimeout(a,t))}function c(t,a={}){let r={...w,...a},s;for(let e=0;e<=r.maxRetries;e++)try{return t()}catch(n){if(s=n,!x(n)||e>=r.maxRetries)throw n;let o=Math.min(r.initialDelayMs*Math.pow(2,e)+Math.random()*50,r.maxDelayMs),l=Date.now();while(Date.now()-l<o);}throw s}async function b(t,a={}){let r={...w,...a},s;for(let e=0;e<=r.maxRetries;e++)try{return await t()}catch(n){if(s=n,!x(n)||e>=r.maxRetries)throw n;let o=Math.min(r.initialDelayMs*Math.pow(2,e)+Math.random()*50,r.maxDelayMs);await M(o)}throw s}async function E(t,a={}){if(D){let{Database:e}=await import("bun:sqlite"),n=new e(t);return{run:(o,...l)=>c(()=>n.run(o,...l),a),get:(o,...l)=>c(()=>n.query(o).get(...l),a),all:(o,...l)=>c(()=>n.query(o).all(...l),a),exec:(o)=>c(()=>n.exec(o),a),close:()=>n.close()}}let{DatabaseSync:r}=await import("node:sqlite"),s=new r(t);return{run:(e,...n)=>c(()=>{if(n.length===0)s.exec(e);else s.prepare(e).run(...n)},a),get:(e,...n)=>c(()=>{return s.prepare(e).get(...n)},a),all:(e,...n)=>c(()=>{return s.prepare(e).all(...n)},a),exec:(e)=>c(()=>s.exec(e),a),close:()=>s.close()}}export{c as withRetrySync,b as withRetryAsync,D as isBun,E as createDatabase};
1
+ import{createRequire as w}from"node:module";var i=w(import.meta.url);var x=typeof globalThis.Bun<"u",u={maxRetries:5,initialDelayMs:50,maxDelayMs:1000};function m(s){if(!s)return!1;let a=s.message||s.toString();return a.includes("SQLITE_BUSY")||a.includes("database is locked")||a.includes("database table is locked")}function h(s){return new Promise((a)=>setTimeout(a,s))}function c(s,a={}){let o={...u,...a},r;for(let e=0;e<=o.maxRetries;e++)try{return s()}catch(t){if(r=t,!m(t)||e>=o.maxRetries)throw t;let n=Math.min(o.initialDelayMs*Math.pow(2,e)+Math.random()*50,o.maxDelayMs),l=Date.now();while(Date.now()-l<n);}throw r}async function y(s,a={}){let o={...u,...a},r;for(let e=0;e<=o.maxRetries;e++)try{return await s()}catch(t){if(r=t,!m(t)||e>=o.maxRetries)throw t;let n=Math.min(o.initialDelayMs*Math.pow(2,e)+Math.random()*50,o.maxDelayMs);await h(n)}throw r}async function p(s,a={}){if(x){let{Database:e}=await import("bun:sqlite"),t=new e(s);return{run:(n,...l)=>c(()=>t.run(n,...l),a),get:(n,...l)=>c(()=>t.query(n).get(...l),a),all:(n,...l)=>c(()=>t.query(n).all(...l),a),exec:(n)=>c(()=>t.exec(n),a),close:()=>t.close()}}let{DatabaseSync:o}=await import("node:sqlite"),r=new o(s);return{run:(e,...t)=>c(()=>{if(t.length===0)r.exec(e);else r.prepare(e).run(...t)},a),get:(e,...t)=>c(()=>{return r.prepare(e).get(...t)},a),all:(e,...t)=>c(()=>{return r.prepare(e).all(...t)},a),exec:(e)=>c(()=>r.exec(e),a),close:()=>r.close()}}export{c as withRetrySync,y as withRetryAsync,x as isBun,p as createDatabase};
package/dist/crawler.d.ts CHANGED
@@ -3914,12 +3914,22 @@ export type NestedObject = {
3914
3914
  [key: string]: NestedValue;
3915
3915
  };
3916
3916
  export type NestedArray = NestedValue[];
3917
+ export type NestedMode = "json" | "brackets" | "dots";
3918
+ export interface RezoURLSearchParamsOptions {
3919
+ nestedKeys?: NestedMode;
3920
+ }
3917
3921
  declare class RezoURLSearchParams extends URLSearchParams {
3922
+ private nestedMode;
3923
+ constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams, options?: RezoURLSearchParamsOptions);
3918
3924
  constructor(init?: string | URLSearchParams | NestedObject | string[][] | RezoURLSearchParams);
3919
3925
  /**
3920
3926
  * Append a nested object to the search params
3921
3927
  */
3922
3928
  appendObject(obj: NestedObject, prefix?: string): void;
3929
+ /**
3930
+ * Build the nested key based on the current mode
3931
+ */
3932
+ private buildNestedKey;
3923
3933
  /**
3924
3934
  * Set a value (replacing existing values with the same key)
3925
3935
  */
@@ -3933,9 +3943,20 @@ declare class RezoURLSearchParams extends URLSearchParams {
3933
3943
  */
3934
3944
  private appendArray;
3935
3945
  /**
3936
- * Convert to a plain object (useful for debugging)
3946
+ * Convert to a plain flat object (keys remain as-is)
3947
+ */
3948
+ toFlatObject(): Record<string, string>;
3949
+ /**
3950
+ * Convert to a nested object, parsing bracket/dot notation keys
3951
+ * and JSON-encoded values back into their original structure
3952
+ */
3953
+ toObject(): Record<string, any>;
3954
+ /**
3955
+ * Override toString to use unencoded brackets for nested keys.
3956
+ * Native URLSearchParams encodes [ ] as %5B %5D, but standard
3957
+ * form encoding (PHP, Rails, Express/qs) expects literal brackets.
3937
3958
  */
3938
- toObject(): Record<string, string>;
3959
+ toString(): string;
3939
3960
  /**
3940
3961
  * Create from a flat object with bracket notation keys
3941
3962
  */
@@ -1,6 +1,6 @@
1
- const _mod_19fgvq = require('../crawler/crawler.cjs');
2
- exports.Crawler = _mod_19fgvq.Crawler;;
3
- const _mod_upiha4 = require('../crawler/crawler-options.cjs');
4
- exports.CrawlerOptions = _mod_upiha4.CrawlerOptions;;
5
- const _mod_p1t2de = require('../crawler/scraper.cjs');
6
- exports.isRestrictedDomain = _mod_p1t2de.isRestrictedDomain;;
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;;
package/dist/index.cjs CHANGED
@@ -1,31 +1,31 @@
1
- const _mod_srihcf = require('./core/rezo.cjs');
2
- exports.Rezo = _mod_srihcf.Rezo;
3
- exports.createRezoInstance = _mod_srihcf.createRezoInstance;
4
- exports.createDefaultInstance = _mod_srihcf.createDefaultInstance;;
5
- const _mod_uokgel = require('./errors/rezo-error.cjs');
6
- exports.RezoError = _mod_uokgel.RezoError;
7
- exports.RezoErrorCode = _mod_uokgel.RezoErrorCode;;
8
- const _mod_rxz6f7 = require('./utils/headers.cjs');
9
- exports.RezoHeaders = _mod_rxz6f7.RezoHeaders;;
10
- const _mod_aiv919 = require('./utils/form-data.cjs');
11
- exports.RezoFormData = _mod_aiv919.RezoFormData;;
12
- const _mod_aox6y7 = require('./utils/cookies.cjs');
13
- exports.RezoCookieJar = _mod_aox6y7.RezoCookieJar;
14
- exports.Cookie = _mod_aox6y7.Cookie;;
15
- const _mod_x4c884 = require('./utils/curl.cjs');
16
- exports.toCurl = _mod_x4c884.toCurl;
17
- exports.fromCurl = _mod_x4c884.fromCurl;;
18
- const _mod_50bd90 = require('./core/hooks.cjs');
19
- exports.createDefaultHooks = _mod_50bd90.createDefaultHooks;
20
- exports.mergeHooks = _mod_50bd90.mergeHooks;;
21
- const _mod_zdpxrf = require('./proxy/manager.cjs');
22
- exports.ProxyManager = _mod_zdpxrf.ProxyManager;;
23
- const _mod_gqx7wa = require('./queue/index.cjs');
24
- exports.RezoQueue = _mod_gqx7wa.RezoQueue;
25
- exports.HttpQueue = _mod_gqx7wa.HttpQueue;
26
- exports.RezoHttpQueue = _mod_gqx7wa.RezoHttpQueue;
27
- exports.Priority = _mod_gqx7wa.Priority;
28
- exports.HttpMethodPriority = _mod_gqx7wa.HttpMethodPriority;;
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;;
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_vtpksw = require('./version.cjs');
39
- exports.VERSION = _mod_vtpksw.VERSION;
40
- exports.PACKAGE_NAME = _mod_vtpksw.PACKAGE_NAME;;
38
+ const _mod_mg08mz = require('./version.cjs');
39
+ exports.VERSION = _mod_mg08mz.VERSION;
40
+ exports.PACKAGE_NAME = _mod_mg08mz.PACKAGE_NAME;;
41
41
  const { executeRequest } = require('./adapters/http.cjs');
42
42
  const { setGlobalAdapter, createRezoInstance } = require('./core/rezo.cjs');
43
43
  setGlobalAdapter(executeRequest);