rezo 1.0.127 → 1.0.129

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 (79) hide show
  1. package/dist/adapters/curl.cjs +15 -15
  2. package/dist/adapters/curl.js +15 -15
  3. package/dist/adapters/entries/curl.d.ts +9 -5
  4. package/dist/adapters/entries/fetch.d.ts +9 -5
  5. package/dist/adapters/entries/http.d.ts +9 -5
  6. package/dist/adapters/entries/http2.d.ts +9 -5
  7. package/dist/adapters/entries/react-native.cjs +6 -6
  8. package/dist/adapters/entries/react-native.d.ts +9 -5
  9. package/dist/adapters/entries/xhr.d.ts +9 -5
  10. package/dist/adapters/http.cjs +6 -6
  11. package/dist/adapters/http.js +6 -6
  12. package/dist/adapters/http2.cjs +6 -6
  13. package/dist/adapters/http2.js +6 -6
  14. package/dist/adapters/index.cjs +6 -6
  15. package/dist/cache/dns-cache.cjs +11 -1
  16. package/dist/cache/dns-cache.js +11 -1
  17. package/dist/cache/index.cjs +9 -9
  18. package/dist/cache/response-cache.cjs +40 -14
  19. package/dist/cache/response-cache.js +40 -14
  20. package/dist/cookies/cookie-jar.cjs +16 -9
  21. package/dist/cookies/cookie-jar.js +12 -5
  22. package/dist/cookies/index.cjs +10 -10
  23. package/dist/core/rezo.cjs +2 -2
  24. package/dist/core/rezo.js +2 -2
  25. package/dist/crawler/addon/oxylabs/index.cjs +1 -1
  26. package/dist/crawler/crawler.cjs +3 -3
  27. package/dist/crawler/crawler.js +3 -3
  28. package/dist/crawler/index.cjs +42 -42
  29. package/dist/crawler/plugin/index.cjs +1 -1
  30. package/dist/crawler/scraper.cjs +1 -1
  31. package/dist/crawler/scraper.js +1 -1
  32. package/dist/crawler.d.ts +11 -7
  33. package/dist/entries/crawler.cjs +6 -6
  34. package/dist/index.cjs +48 -48
  35. package/dist/index.d.ts +9 -5
  36. package/dist/internal/agents/index.cjs +14 -14
  37. package/dist/internal/agents/socks-client.cjs +3 -3
  38. package/dist/internal/agents/socks-client.js +3 -3
  39. package/dist/platform/browser.d.ts +9 -5
  40. package/dist/platform/bun.d.ts +9 -5
  41. package/dist/platform/deno.d.ts +9 -5
  42. package/dist/platform/node.d.ts +9 -5
  43. package/dist/platform/react-native.cjs +6 -6
  44. package/dist/platform/react-native.d.ts +9 -5
  45. package/dist/platform/worker.d.ts +9 -5
  46. package/dist/proxy/index.cjs +4 -4
  47. package/dist/queue/index.cjs +8 -8
  48. package/dist/queue/queue.cjs +3 -3
  49. package/dist/queue/queue.js +3 -3
  50. package/dist/responses/buildError.cjs +1 -1
  51. package/dist/responses/buildError.js +1 -1
  52. package/dist/responses/buildResponse.cjs +1 -1
  53. package/dist/responses/buildResponse.js +1 -1
  54. package/dist/responses/universal/index.cjs +11 -11
  55. package/dist/responses/universal/stream.cjs +11 -9
  56. package/dist/responses/universal/stream.js +11 -9
  57. package/dist/stealth/index.cjs +17 -17
  58. package/dist/stealth/profiles/index.cjs +10 -10
  59. package/dist/utils/agent-pool.cjs +3 -3
  60. package/dist/utils/agent-pool.js +3 -3
  61. package/dist/utils/form-data.cjs +1 -1
  62. package/dist/utils/form-data.js +1 -1
  63. package/dist/utils/http-config.cjs +22 -14
  64. package/dist/utils/http-config.js +22 -14
  65. package/dist/utils/node-runtime.cjs +29 -0
  66. package/dist/utils/node-runtime.js +26 -0
  67. package/dist/version.cjs +1 -1
  68. package/dist/version.js +1 -1
  69. package/dist/wget/asset-extractor.cjs +1 -1
  70. package/dist/wget/asset-extractor.js +1 -1
  71. package/dist/wget/asset-organizer.cjs +1 -1
  72. package/dist/wget/asset-organizer.js +1 -1
  73. package/dist/wget/index.cjs +51 -51
  74. package/dist/wget/index.d.ts +10 -6
  75. package/dist/wget/link-converter.cjs +2 -2
  76. package/dist/wget/link-converter.js +2 -2
  77. package/dist/wget/url-filter.cjs +1 -1
  78. package/dist/wget/url-filter.js +1 -1
  79. package/package.json +1 -1
@@ -196,7 +196,7 @@ function buildUrlTree(config, finalUrl) {
196
196
  }
197
197
  return urls.length > 0 ? urls : [finalUrl];
198
198
  }
199
- async function updateCookies(config, cookieStrings, url, rootJar) {
199
+ async function _updateCookies(config, cookieStrings, url, rootJar) {
200
200
  if (!cookieStrings || cookieStrings.length === 0)
201
201
  return;
202
202
  const tempJar = new RezoCookieJar;
@@ -455,18 +455,18 @@ class CurlProgressTracker extends EventEmitter {
455
455
  downloadedBytes = 0;
456
456
  uploadedBytes = 0;
457
457
  downloadSpeed = 0;
458
- uploadSpeed = 0;
459
- timeRemaining = 0;
460
- startTime = Date.now();
458
+ _uploadSpeed = 0;
459
+ _timeRemaining = 0;
460
+ _startTime = Date.now();
461
461
  parseProgress(line) {
462
462
  const progressMatch = line.match(/\s*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+([\d:-]+)\s+([\d:-]+)\s+([\d:-]+)\s+(\d+)/);
463
463
  if (progressMatch) {
464
- const [, totalPercent, total, receivedPercent, received, xferPercent, xfer, avgDload, avgUpload, timeTotal, timeSpent, timeLeft, currentSpeed] = progressMatch;
464
+ const [, _totalPercent, total, _receivedPercent, received, _xferPercent, xfer, avgDload, avgUpload, _timeTotal, _timeSpent, timeLeft, currentSpeed] = progressMatch;
465
465
  this.totalBytes = parseInt(total);
466
466
  this.downloadedBytes = parseInt(received);
467
467
  this.uploadedBytes = parseInt(xfer);
468
468
  this.downloadSpeed = parseInt(avgDload);
469
- this.uploadSpeed = parseInt(avgUpload);
469
+ this._uploadSpeed = parseInt(avgUpload);
470
470
  const progress = {
471
471
  total: this.totalBytes,
472
472
  loaded: this.downloadedBytes + this.uploadedBytes,
@@ -1372,7 +1372,7 @@ class CurlCommandBuilder {
1372
1372
  this.addArg("--max-time", Math.ceil(config.timeout / 1000).toString());
1373
1373
  }
1374
1374
  }
1375
- buildAuthentication(config, originalRequest) {
1375
+ buildAuthentication(config, _originalRequest) {
1376
1376
  if (!config.auth) {
1377
1377
  return;
1378
1378
  }
@@ -1538,14 +1538,14 @@ class CurlCommandBuilder {
1538
1538
  this.addArg("-c", cookieJarFile);
1539
1539
  return cookieJarFile;
1540
1540
  }
1541
- buildConnectionOptions(config, originalRequest) {
1541
+ buildConnectionOptions(_config, originalRequest) {
1542
1542
  if (originalRequest.keepAlive === false) {
1543
1543
  this.addArg("-H", "Connection: close");
1544
1544
  } else {
1545
1545
  this.addArg("-H", "Connection: keep-alive");
1546
1546
  }
1547
1547
  }
1548
- buildDownloadOptions(config, originalRequest, tempFiles) {
1548
+ buildDownloadOptions(config, originalRequest, _tempFiles) {
1549
1549
  const saveTo = originalRequest.saveTo || config.fileName;
1550
1550
  if (saveTo) {
1551
1551
  this.addArg("--create-dirs");
@@ -1643,7 +1643,7 @@ class CurlCommandBuilder {
1643
1643
  }
1644
1644
 
1645
1645
  class CurlResponseParser {
1646
- static parse(stdout, stderr, config, originalRequest) {
1646
+ static parse(stdout, _stderr, config, originalRequest) {
1647
1647
  const statsMarker = "---CURL_STATS_START---";
1648
1648
  const statsEndMarker = "---CURL_STATS_END---";
1649
1649
  let body = stdout;
@@ -1833,7 +1833,7 @@ class CurlResponseParser {
1833
1833
  };
1834
1834
  return statusTexts[status] || "Unknown";
1835
1835
  }
1836
- static parseCookies(headers) {
1836
+ static _parseCookies(headers) {
1837
1837
  const setCookieHeaders = headers["set-cookie"];
1838
1838
  const cookieArray = [];
1839
1839
  if (setCookieHeaders) {
@@ -1947,7 +1947,7 @@ class CurlExecutor {
1947
1947
  }
1948
1948
  return url;
1949
1949
  }
1950
- async executeCurlCommand(args, config, originalRequest, tempFiles, cookieJar, streamResult, downloadResult, uploadResult) {
1950
+ async executeCurlCommand(args, config, originalRequest, _tempFiles, _cookieJar, streamResult, downloadResult, uploadResult) {
1951
1951
  return new Promise((resolve, reject) => {
1952
1952
  const isStreaming = !!streamResult;
1953
1953
  const isDownload = !!downloadResult;
@@ -1958,7 +1958,7 @@ class CurlExecutor {
1958
1958
  let stdout = "";
1959
1959
  let stderr = "";
1960
1960
  const progressTracker = new CurlProgressTracker;
1961
- const startTime = performance.now();
1961
+ const _startTime = performance.now();
1962
1962
  if (originalRequest.onDownloadProgress) {
1963
1963
  progressTracker.on("progress", (progress) => {
1964
1964
  originalRequest.onDownloadProgress(progress);
@@ -2212,7 +2212,7 @@ async function executeRequest(options, defaultOptions, jar) {
2212
2212
  let cache;
2213
2213
  let requestHeaders;
2214
2214
  let cachedEntry;
2215
- let needsRevalidation = false;
2215
+ let _needsRevalidation = false;
2216
2216
  const isStream = options._isStream || options.responseType === "stream";
2217
2217
  const isDownload = options._isDownload || !!options.fileName || !!options.saveTo || options.responseType === "download";
2218
2218
  const isUpload = options._isUpload || options.responseType === "upload";
@@ -2223,7 +2223,7 @@ async function executeRequest(options, defaultOptions, jar) {
2223
2223
  if (cachedEntry) {
2224
2224
  const cacheControl = parseCacheControlFromHeaders(cachedEntry.headers);
2225
2225
  if (cacheControl.noCache || cacheControl.mustRevalidate) {
2226
- needsRevalidation = true;
2226
+ _needsRevalidation = true;
2227
2227
  } else {
2228
2228
  return buildCachedRezoResponse(cachedEntry, config);
2229
2229
  }
@@ -196,7 +196,7 @@ function buildUrlTree(config, finalUrl) {
196
196
  }
197
197
  return urls.length > 0 ? urls : [finalUrl];
198
198
  }
199
- async function updateCookies(config, cookieStrings, url, rootJar) {
199
+ async function _updateCookies(config, cookieStrings, url, rootJar) {
200
200
  if (!cookieStrings || cookieStrings.length === 0)
201
201
  return;
202
202
  const tempJar = new RezoCookieJar;
@@ -455,18 +455,18 @@ class CurlProgressTracker extends EventEmitter {
455
455
  downloadedBytes = 0;
456
456
  uploadedBytes = 0;
457
457
  downloadSpeed = 0;
458
- uploadSpeed = 0;
459
- timeRemaining = 0;
460
- startTime = Date.now();
458
+ _uploadSpeed = 0;
459
+ _timeRemaining = 0;
460
+ _startTime = Date.now();
461
461
  parseProgress(line) {
462
462
  const progressMatch = line.match(/\s*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+([\d:-]+)\s+([\d:-]+)\s+([\d:-]+)\s+(\d+)/);
463
463
  if (progressMatch) {
464
- const [, totalPercent, total, receivedPercent, received, xferPercent, xfer, avgDload, avgUpload, timeTotal, timeSpent, timeLeft, currentSpeed] = progressMatch;
464
+ const [, _totalPercent, total, _receivedPercent, received, _xferPercent, xfer, avgDload, avgUpload, _timeTotal, _timeSpent, timeLeft, currentSpeed] = progressMatch;
465
465
  this.totalBytes = parseInt(total);
466
466
  this.downloadedBytes = parseInt(received);
467
467
  this.uploadedBytes = parseInt(xfer);
468
468
  this.downloadSpeed = parseInt(avgDload);
469
- this.uploadSpeed = parseInt(avgUpload);
469
+ this._uploadSpeed = parseInt(avgUpload);
470
470
  const progress = {
471
471
  total: this.totalBytes,
472
472
  loaded: this.downloadedBytes + this.uploadedBytes,
@@ -1372,7 +1372,7 @@ class CurlCommandBuilder {
1372
1372
  this.addArg("--max-time", Math.ceil(config.timeout / 1000).toString());
1373
1373
  }
1374
1374
  }
1375
- buildAuthentication(config, originalRequest) {
1375
+ buildAuthentication(config, _originalRequest) {
1376
1376
  if (!config.auth) {
1377
1377
  return;
1378
1378
  }
@@ -1538,14 +1538,14 @@ class CurlCommandBuilder {
1538
1538
  this.addArg("-c", cookieJarFile);
1539
1539
  return cookieJarFile;
1540
1540
  }
1541
- buildConnectionOptions(config, originalRequest) {
1541
+ buildConnectionOptions(_config, originalRequest) {
1542
1542
  if (originalRequest.keepAlive === false) {
1543
1543
  this.addArg("-H", "Connection: close");
1544
1544
  } else {
1545
1545
  this.addArg("-H", "Connection: keep-alive");
1546
1546
  }
1547
1547
  }
1548
- buildDownloadOptions(config, originalRequest, tempFiles) {
1548
+ buildDownloadOptions(config, originalRequest, _tempFiles) {
1549
1549
  const saveTo = originalRequest.saveTo || config.fileName;
1550
1550
  if (saveTo) {
1551
1551
  this.addArg("--create-dirs");
@@ -1643,7 +1643,7 @@ class CurlCommandBuilder {
1643
1643
  }
1644
1644
 
1645
1645
  class CurlResponseParser {
1646
- static parse(stdout, stderr, config, originalRequest) {
1646
+ static parse(stdout, _stderr, config, originalRequest) {
1647
1647
  const statsMarker = "---CURL_STATS_START---";
1648
1648
  const statsEndMarker = "---CURL_STATS_END---";
1649
1649
  let body = stdout;
@@ -1833,7 +1833,7 @@ class CurlResponseParser {
1833
1833
  };
1834
1834
  return statusTexts[status] || "Unknown";
1835
1835
  }
1836
- static parseCookies(headers) {
1836
+ static _parseCookies(headers) {
1837
1837
  const setCookieHeaders = headers["set-cookie"];
1838
1838
  const cookieArray = [];
1839
1839
  if (setCookieHeaders) {
@@ -1947,7 +1947,7 @@ class CurlExecutor {
1947
1947
  }
1948
1948
  return url;
1949
1949
  }
1950
- async executeCurlCommand(args, config, originalRequest, tempFiles, cookieJar, streamResult, downloadResult, uploadResult) {
1950
+ async executeCurlCommand(args, config, originalRequest, _tempFiles, _cookieJar, streamResult, downloadResult, uploadResult) {
1951
1951
  return new Promise((resolve, reject) => {
1952
1952
  const isStreaming = !!streamResult;
1953
1953
  const isDownload = !!downloadResult;
@@ -1958,7 +1958,7 @@ class CurlExecutor {
1958
1958
  let stdout = "";
1959
1959
  let stderr = "";
1960
1960
  const progressTracker = new CurlProgressTracker;
1961
- const startTime = performance.now();
1961
+ const _startTime = performance.now();
1962
1962
  if (originalRequest.onDownloadProgress) {
1963
1963
  progressTracker.on("progress", (progress) => {
1964
1964
  originalRequest.onDownloadProgress(progress);
@@ -2212,7 +2212,7 @@ export async function executeRequest(options, defaultOptions, jar) {
2212
2212
  let cache;
2213
2213
  let requestHeaders;
2214
2214
  let cachedEntry;
2215
- let needsRevalidation = false;
2215
+ let _needsRevalidation = false;
2216
2216
  const isStream = options._isStream || options.responseType === "stream";
2217
2217
  const isDownload = options._isDownload || !!options.fileName || !!options.saveTo || options.responseType === "download";
2218
2218
  const isUpload = options._isUpload || options.responseType === "upload";
@@ -2223,7 +2223,7 @@ export async function executeRequest(options, defaultOptions, jar) {
2223
2223
  if (cachedEntry) {
2224
2224
  const cacheControl = parseCacheControlFromHeaders(cachedEntry.headers);
2225
2225
  if (cacheControl.noCache || cacheControl.mustRevalidate) {
2226
- needsRevalidation = true;
2226
+ _needsRevalidation = true;
2227
2227
  } else {
2228
2228
  return buildCachedRezoResponse(cachedEntry, config);
2229
2229
  }
@@ -312,7 +312,7 @@ export declare class RezoCookieJar extends TouchCookieJar {
312
312
  * @param filePath - Path to the cookie file
313
313
  * @param defaultUrl - Default URL for cookies without domain (optional)
314
314
  */
315
- loadFromFile(filePath: string, defaultUrl?: string): void;
315
+ loadFromFile(filePath: string, _defaultUrl?: string): void;
316
316
  /**
317
317
  * Save cookies to a file.
318
318
  * - .json files save cookies as serialized JSON
@@ -2216,7 +2216,7 @@ declare class RezoQueue<T = any> {
2216
2216
  private intervalId?;
2217
2217
  private intervalCount;
2218
2218
  readonly name: string;
2219
- private intervalStart;
2219
+ private _intervalStart;
2220
2220
  private eventHandlers;
2221
2221
  private statsData;
2222
2222
  private totalDuration;
@@ -4459,6 +4459,10 @@ export type RezoHttpOptionsRequest = Omit<RezoHttpRequest, "data" | "body">;
4459
4459
  * @internal - Do not use internally within the library
4460
4460
  */
4461
4461
  export type RezoRequestOptions = Omit<RezoRequestConfig, "fullUrl">;
4462
+ /**
4463
+ * Helper types for GET method with specific response types
4464
+ * These ensure responseType is properly typed without conflicts
4465
+ */
4462
4466
  export interface httpAdapterOverloads {
4463
4467
  request<T = any>(options: RezoRequestOptions): Promise<RezoResponse<T>>;
4464
4468
  request<T = any>(options: RezoRequestOptions & {
@@ -5589,7 +5593,7 @@ export declare class Rezo {
5589
5593
  * ```
5590
5594
  */
5591
5595
  buildUri(config: string | URL | BuildUriOptions): RezoUri;
5592
- private isvalidJson;
5596
+ private _isvalidJson;
5593
5597
  /**
5594
5598
  * Deep-merge two request configs. Headers and params are merged (not replaced).
5595
5599
  * Properties from config2 take precedence over config1.
@@ -5648,7 +5652,7 @@ export declare class Rezo {
5648
5652
  requestLimit?: number;
5649
5653
  };
5650
5654
  }): AsyncGenerator<T, void, undefined>;
5651
- private __create;
5655
+ private _create;
5652
5656
  /** Get the cookie jar for this instance */
5653
5657
  get jar(): RezoCookieJar;
5654
5658
  set jar(jar: RezoCookieJar);
@@ -6023,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
6023
6027
  *
6024
6028
  * IMPORTANT: Update these values when bumping package version.
6025
6029
  */
6026
- export declare const VERSION = "1.0.127";
6030
+ export declare const VERSION = "1.0.129";
6027
6031
  /**
6028
6032
  * cURL Options Configuration
6029
6033
  *
@@ -312,7 +312,7 @@ export declare class RezoCookieJar extends TouchCookieJar {
312
312
  * @param filePath - Path to the cookie file
313
313
  * @param defaultUrl - Default URL for cookies without domain (optional)
314
314
  */
315
- loadFromFile(filePath: string, defaultUrl?: string): void;
315
+ loadFromFile(filePath: string, _defaultUrl?: string): void;
316
316
  /**
317
317
  * Save cookies to a file.
318
318
  * - .json files save cookies as serialized JSON
@@ -2216,7 +2216,7 @@ declare class RezoQueue<T = any> {
2216
2216
  private intervalId?;
2217
2217
  private intervalCount;
2218
2218
  readonly name: string;
2219
- private intervalStart;
2219
+ private _intervalStart;
2220
2220
  private eventHandlers;
2221
2221
  private statsData;
2222
2222
  private totalDuration;
@@ -4459,6 +4459,10 @@ export type RezoHttpOptionsRequest = Omit<RezoHttpRequest, "data" | "body">;
4459
4459
  * @internal - Do not use internally within the library
4460
4460
  */
4461
4461
  export type RezoRequestOptions = Omit<RezoRequestConfig, "fullUrl">;
4462
+ /**
4463
+ * Helper types for GET method with specific response types
4464
+ * These ensure responseType is properly typed without conflicts
4465
+ */
4462
4466
  export interface httpAdapterOverloads {
4463
4467
  request<T = any>(options: RezoRequestOptions): Promise<RezoResponse<T>>;
4464
4468
  request<T = any>(options: RezoRequestOptions & {
@@ -5589,7 +5593,7 @@ export declare class Rezo {
5589
5593
  * ```
5590
5594
  */
5591
5595
  buildUri(config: string | URL | BuildUriOptions): RezoUri;
5592
- private isvalidJson;
5596
+ private _isvalidJson;
5593
5597
  /**
5594
5598
  * Deep-merge two request configs. Headers and params are merged (not replaced).
5595
5599
  * Properties from config2 take precedence over config1.
@@ -5648,7 +5652,7 @@ export declare class Rezo {
5648
5652
  requestLimit?: number;
5649
5653
  };
5650
5654
  }): AsyncGenerator<T, void, undefined>;
5651
- private __create;
5655
+ private _create;
5652
5656
  /** Get the cookie jar for this instance */
5653
5657
  get jar(): RezoCookieJar;
5654
5658
  set jar(jar: RezoCookieJar);
@@ -6023,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
6023
6027
  *
6024
6028
  * IMPORTANT: Update these values when bumping package version.
6025
6029
  */
6026
- export declare const VERSION = "1.0.127";
6030
+ export declare const VERSION = "1.0.129";
6027
6031
  export declare const isRezoError: typeof RezoError.isRezoError;
6028
6032
  export declare const Cancel: typeof RezoError;
6029
6033
  export declare const CancelToken: {
@@ -312,7 +312,7 @@ export declare class RezoCookieJar extends TouchCookieJar {
312
312
  * @param filePath - Path to the cookie file
313
313
  * @param defaultUrl - Default URL for cookies without domain (optional)
314
314
  */
315
- loadFromFile(filePath: string, defaultUrl?: string): void;
315
+ loadFromFile(filePath: string, _defaultUrl?: string): void;
316
316
  /**
317
317
  * Save cookies to a file.
318
318
  * - .json files save cookies as serialized JSON
@@ -2216,7 +2216,7 @@ declare class RezoQueue<T = any> {
2216
2216
  private intervalId?;
2217
2217
  private intervalCount;
2218
2218
  readonly name: string;
2219
- private intervalStart;
2219
+ private _intervalStart;
2220
2220
  private eventHandlers;
2221
2221
  private statsData;
2222
2222
  private totalDuration;
@@ -4459,6 +4459,10 @@ export type RezoHttpOptionsRequest = Omit<RezoHttpRequest, "data" | "body">;
4459
4459
  * @internal - Do not use internally within the library
4460
4460
  */
4461
4461
  export type RezoRequestOptions = Omit<RezoRequestConfig, "fullUrl">;
4462
+ /**
4463
+ * Helper types for GET method with specific response types
4464
+ * These ensure responseType is properly typed without conflicts
4465
+ */
4462
4466
  export interface httpAdapterOverloads {
4463
4467
  request<T = any>(options: RezoRequestOptions): Promise<RezoResponse<T>>;
4464
4468
  request<T = any>(options: RezoRequestOptions & {
@@ -5589,7 +5593,7 @@ export declare class Rezo {
5589
5593
  * ```
5590
5594
  */
5591
5595
  buildUri(config: string | URL | BuildUriOptions): RezoUri;
5592
- private isvalidJson;
5596
+ private _isvalidJson;
5593
5597
  /**
5594
5598
  * Deep-merge two request configs. Headers and params are merged (not replaced).
5595
5599
  * Properties from config2 take precedence over config1.
@@ -5648,7 +5652,7 @@ export declare class Rezo {
5648
5652
  requestLimit?: number;
5649
5653
  };
5650
5654
  }): AsyncGenerator<T, void, undefined>;
5651
- private __create;
5655
+ private _create;
5652
5656
  /** Get the cookie jar for this instance */
5653
5657
  get jar(): RezoCookieJar;
5654
5658
  set jar(jar: RezoCookieJar);
@@ -6023,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
6023
6027
  *
6024
6028
  * IMPORTANT: Update these values when bumping package version.
6025
6029
  */
6026
- export declare const VERSION = "1.0.127";
6030
+ export declare const VERSION = "1.0.129";
6027
6031
  /**
6028
6032
  * Type guard to check if an error is a RezoError instance.
6029
6033
  */
@@ -312,7 +312,7 @@ export declare class RezoCookieJar extends TouchCookieJar {
312
312
  * @param filePath - Path to the cookie file
313
313
  * @param defaultUrl - Default URL for cookies without domain (optional)
314
314
  */
315
- loadFromFile(filePath: string, defaultUrl?: string): void;
315
+ loadFromFile(filePath: string, _defaultUrl?: string): void;
316
316
  /**
317
317
  * Save cookies to a file.
318
318
  * - .json files save cookies as serialized JSON
@@ -2216,7 +2216,7 @@ declare class RezoQueue<T = any> {
2216
2216
  private intervalId?;
2217
2217
  private intervalCount;
2218
2218
  readonly name: string;
2219
- private intervalStart;
2219
+ private _intervalStart;
2220
2220
  private eventHandlers;
2221
2221
  private statsData;
2222
2222
  private totalDuration;
@@ -4459,6 +4459,10 @@ export type RezoHttpOptionsRequest = Omit<RezoHttpRequest, "data" | "body">;
4459
4459
  * @internal - Do not use internally within the library
4460
4460
  */
4461
4461
  export type RezoRequestOptions = Omit<RezoRequestConfig, "fullUrl">;
4462
+ /**
4463
+ * Helper types for GET method with specific response types
4464
+ * These ensure responseType is properly typed without conflicts
4465
+ */
4462
4466
  export interface httpAdapterOverloads {
4463
4467
  request<T = any>(options: RezoRequestOptions): Promise<RezoResponse<T>>;
4464
4468
  request<T = any>(options: RezoRequestOptions & {
@@ -5589,7 +5593,7 @@ export declare class Rezo {
5589
5593
  * ```
5590
5594
  */
5591
5595
  buildUri(config: string | URL | BuildUriOptions): RezoUri;
5592
- private isvalidJson;
5596
+ private _isvalidJson;
5593
5597
  /**
5594
5598
  * Deep-merge two request configs. Headers and params are merged (not replaced).
5595
5599
  * Properties from config2 take precedence over config1.
@@ -5648,7 +5652,7 @@ export declare class Rezo {
5648
5652
  requestLimit?: number;
5649
5653
  };
5650
5654
  }): AsyncGenerator<T, void, undefined>;
5651
- private __create;
5655
+ private _create;
5652
5656
  /** Get the cookie jar for this instance */
5653
5657
  get jar(): RezoCookieJar;
5654
5658
  set jar(jar: RezoCookieJar);
@@ -6023,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
6023
6027
  *
6024
6028
  * IMPORTANT: Update these values when bumping package version.
6025
6029
  */
6026
- export declare const VERSION = "1.0.127";
6030
+ export declare const VERSION = "1.0.129";
6027
6031
  export declare const isRezoError: typeof RezoError.isRezoError;
6028
6032
  export declare const Cancel: typeof RezoError;
6029
6033
  export declare const CancelToken: {
@@ -6,12 +6,12 @@ const { RezoFormData } = require('../../utils/form-data.cjs');
6
6
  const { RezoCookieJar, Cookie } = require('../../cookies/cookie-jar.cjs');
7
7
  const { createDefaultHooks, mergeHooks } = require('../../core/hooks.cjs');
8
8
  const { VERSION } = require('../../version.cjs');
9
- const _mod_iamxdq = require('../../platform/react-native-providers.cjs');
10
- exports.createFetchStreamTransport = _mod_iamxdq.createFetchStreamTransport;
11
- exports.createExpoFileSystemAdapter = _mod_iamxdq.createExpoFileSystemAdapter;
12
- exports.createReactNativeFsAdapter = _mod_iamxdq.createReactNativeFsAdapter;
13
- exports.createNetInfoProvider = _mod_iamxdq.createNetInfoProvider;
14
- exports.createExpoBackgroundTaskProvider = _mod_iamxdq.createExpoBackgroundTaskProvider;;
9
+ const _mod_fi01d9 = require('../../platform/react-native-providers.cjs');
10
+ exports.createFetchStreamTransport = _mod_fi01d9.createFetchStreamTransport;
11
+ exports.createExpoFileSystemAdapter = _mod_fi01d9.createExpoFileSystemAdapter;
12
+ exports.createReactNativeFsAdapter = _mod_fi01d9.createReactNativeFsAdapter;
13
+ exports.createNetInfoProvider = _mod_fi01d9.createNetInfoProvider;
14
+ exports.createExpoBackgroundTaskProvider = _mod_fi01d9.createExpoBackgroundTaskProvider;;
15
15
  exports.Rezo = Rezo;
16
16
  exports.RezoError = RezoError;
17
17
  exports.RezoErrorCode = RezoErrorCode;
@@ -312,7 +312,7 @@ export declare class RezoCookieJar extends TouchCookieJar {
312
312
  * @param filePath - Path to the cookie file
313
313
  * @param defaultUrl - Default URL for cookies without domain (optional)
314
314
  */
315
- loadFromFile(filePath: string, defaultUrl?: string): void;
315
+ loadFromFile(filePath: string, _defaultUrl?: string): void;
316
316
  /**
317
317
  * Save cookies to a file.
318
318
  * - .json files save cookies as serialized JSON
@@ -2216,7 +2216,7 @@ declare class RezoQueue<T = any> {
2216
2216
  private intervalId?;
2217
2217
  private intervalCount;
2218
2218
  readonly name: string;
2219
- private intervalStart;
2219
+ private _intervalStart;
2220
2220
  private eventHandlers;
2221
2221
  private statsData;
2222
2222
  private totalDuration;
@@ -4459,6 +4459,10 @@ export type RezoHttpOptionsRequest = Omit<RezoHttpRequest, "data" | "body">;
4459
4459
  * @internal - Do not use internally within the library
4460
4460
  */
4461
4461
  export type RezoRequestOptions = Omit<RezoRequestConfig, "fullUrl">;
4462
+ /**
4463
+ * Helper types for GET method with specific response types
4464
+ * These ensure responseType is properly typed without conflicts
4465
+ */
4462
4466
  export interface httpAdapterOverloads {
4463
4467
  request<T = any>(options: RezoRequestOptions): Promise<RezoResponse<T>>;
4464
4468
  request<T = any>(options: RezoRequestOptions & {
@@ -5589,7 +5593,7 @@ export declare class Rezo {
5589
5593
  * ```
5590
5594
  */
5591
5595
  buildUri(config: string | URL | BuildUriOptions): RezoUri;
5592
- private isvalidJson;
5596
+ private _isvalidJson;
5593
5597
  /**
5594
5598
  * Deep-merge two request configs. Headers and params are merged (not replaced).
5595
5599
  * Properties from config2 take precedence over config1.
@@ -5648,7 +5652,7 @@ export declare class Rezo {
5648
5652
  requestLimit?: number;
5649
5653
  };
5650
5654
  }): AsyncGenerator<T, void, undefined>;
5651
- private __create;
5655
+ private _create;
5652
5656
  /** Get the cookie jar for this instance */
5653
5657
  get jar(): RezoCookieJar;
5654
5658
  set jar(jar: RezoCookieJar);
@@ -6023,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
6023
6027
  *
6024
6028
  * IMPORTANT: Update these values when bumping package version.
6025
6029
  */
6026
- export declare const VERSION = "1.0.127";
6030
+ export declare const VERSION = "1.0.129";
6027
6031
  export interface ExpoFileSystemFileLike {
6028
6032
  uri?: string;
6029
6033
  size?: number;
@@ -312,7 +312,7 @@ export declare class RezoCookieJar extends TouchCookieJar {
312
312
  * @param filePath - Path to the cookie file
313
313
  * @param defaultUrl - Default URL for cookies without domain (optional)
314
314
  */
315
- loadFromFile(filePath: string, defaultUrl?: string): void;
315
+ loadFromFile(filePath: string, _defaultUrl?: string): void;
316
316
  /**
317
317
  * Save cookies to a file.
318
318
  * - .json files save cookies as serialized JSON
@@ -2216,7 +2216,7 @@ declare class RezoQueue<T = any> {
2216
2216
  private intervalId?;
2217
2217
  private intervalCount;
2218
2218
  readonly name: string;
2219
- private intervalStart;
2219
+ private _intervalStart;
2220
2220
  private eventHandlers;
2221
2221
  private statsData;
2222
2222
  private totalDuration;
@@ -4459,6 +4459,10 @@ export type RezoHttpOptionsRequest = Omit<RezoHttpRequest, "data" | "body">;
4459
4459
  * @internal - Do not use internally within the library
4460
4460
  */
4461
4461
  export type RezoRequestOptions = Omit<RezoRequestConfig, "fullUrl">;
4462
+ /**
4463
+ * Helper types for GET method with specific response types
4464
+ * These ensure responseType is properly typed without conflicts
4465
+ */
4462
4466
  export interface httpAdapterOverloads {
4463
4467
  request<T = any>(options: RezoRequestOptions): Promise<RezoResponse<T>>;
4464
4468
  request<T = any>(options: RezoRequestOptions & {
@@ -5589,7 +5593,7 @@ export declare class Rezo {
5589
5593
  * ```
5590
5594
  */
5591
5595
  buildUri(config: string | URL | BuildUriOptions): RezoUri;
5592
- private isvalidJson;
5596
+ private _isvalidJson;
5593
5597
  /**
5594
5598
  * Deep-merge two request configs. Headers and params are merged (not replaced).
5595
5599
  * Properties from config2 take precedence over config1.
@@ -5648,7 +5652,7 @@ export declare class Rezo {
5648
5652
  requestLimit?: number;
5649
5653
  };
5650
5654
  }): AsyncGenerator<T, void, undefined>;
5651
- private __create;
5655
+ private _create;
5652
5656
  /** Get the cookie jar for this instance */
5653
5657
  get jar(): RezoCookieJar;
5654
5658
  set jar(jar: RezoCookieJar);
@@ -6023,7 +6027,7 @@ export interface RezoInstance extends Rezo, RezoCallable {
6023
6027
  *
6024
6028
  * IMPORTANT: Update these values when bumping package version.
6025
6029
  */
6026
- export declare const VERSION = "1.0.127";
6030
+ export declare const VERSION = "1.0.129";
6027
6031
  export declare const isRezoError: typeof RezoError.isRezoError;
6028
6032
  export declare const Cancel: typeof RezoError;
6029
6033
  export declare const CancelToken: {
@@ -234,7 +234,7 @@ async function executeRequest(options, defaultOptions, jar) {
234
234
  let cache;
235
235
  let requestHeaders;
236
236
  let cachedEntry;
237
- let needsRevalidation = false;
237
+ let _needsRevalidation = false;
238
238
  if (cacheOption) {
239
239
  cache = getResponseCache(cacheOption);
240
240
  requestHeaders = config.fetchOptions.headers instanceof RezoHeaders ? Object.fromEntries(config.fetchOptions.headers.entries()) : config.fetchOptions.headers;
@@ -242,7 +242,7 @@ async function executeRequest(options, defaultOptions, jar) {
242
242
  if (cachedEntry) {
243
243
  const cacheControl = parseCacheControlFromHeaders(cachedEntry.headers);
244
244
  if (cacheControl.noCache || cacheControl.mustRevalidate) {
245
- needsRevalidation = true;
245
+ _needsRevalidation = true;
246
246
  } else {
247
247
  return buildCachedRezoResponse(cachedEntry, mainConfig);
248
248
  }
@@ -704,7 +704,7 @@ async function executeHttp1Request(fetchOptions, config, options, perform, fs, s
704
704
  }
705
705
  }
706
706
  }
707
- async function request(config, fetchOptions, requestCount, timing, _stats, responseStatusCode, fs, streamResult, downloadResult, uploadResult, rootJar) {
707
+ async function request(config, fetchOptions, requestCount, timing, _stats, _responseStatusCode, fs, streamResult, downloadResult, uploadResult, rootJar) {
708
708
  return await new Promise(async (resolve) => {
709
709
  try {
710
710
  const { fullUrl, body, fileName: filename } = fetchOptions;
@@ -747,7 +747,7 @@ async function request(config, fetchOptions, requestCount, timing, _stats, respo
747
747
  }
748
748
  const { statusCode, statusMessage, headers, httpVersion, socket } = res;
749
749
  const { remoteAddress, remotePort, localAddress, localPort } = socket;
750
- responseStatusCode = statusCode;
750
+ _responseStatusCode = statusCode;
751
751
  config.network.remoteAddress = remoteAddress;
752
752
  config.network.remotePort = remotePort;
753
753
  config.network.localAddress = localAddress;
@@ -1368,7 +1368,7 @@ async function request(config, fetchOptions, requestCount, timing, _stats, respo
1368
1368
  const uploadStart = performance.now();
1369
1369
  for (let offset = 0;offset < totalSize; offset += chunkSize) {
1370
1370
  const end = Math.min(offset + chunkSize, totalSize);
1371
- const chunk = buffer.slice(offset, end);
1371
+ const chunk = buffer.subarray(offset, end);
1372
1372
  req.write(chunk);
1373
1373
  written += chunk.length;
1374
1374
  const now = performance.now();
@@ -1587,7 +1587,7 @@ function buildHTTPOptions(fetchOptions, isSecure, url) {
1587
1587
  };
1588
1588
  return requestOptions;
1589
1589
  }
1590
- async function setInitialConfig(config, fetchOptions, isSecure, url, httpModule, requestCount, startTime, actualTimestamp) {
1590
+ async function setInitialConfig(config, fetchOptions, isSecure, url, httpModule, requestCount, _startTime, _actualTimestamp) {
1591
1591
  if (requestCount === 0) {
1592
1592
  const { body, timeout, proxy, httpAgent, httpsAgent, fileName: filename, auth, signal } = fetchOptions;
1593
1593
  config.adapterUsed = isSecure ? "https" : "http";