rezo 1.0.79 → 1.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/curl.cjs +2 -4
- package/dist/adapters/curl.js +2 -4
- package/dist/adapters/entries/curl.d.ts +1810 -1393
- package/dist/adapters/entries/fetch.d.ts +1809 -1392
- package/dist/adapters/entries/http.d.ts +1809 -1392
- package/dist/adapters/entries/http2.d.ts +1809 -1392
- package/dist/adapters/entries/react-native.d.ts +1809 -1392
- package/dist/adapters/entries/xhr.d.ts +1809 -1392
- package/dist/adapters/fetch.cjs +40 -30
- package/dist/adapters/fetch.js +40 -30
- package/dist/adapters/http.cjs +45 -37
- package/dist/adapters/http.js +45 -37
- package/dist/adapters/http2.cjs +45 -36
- package/dist/adapters/http2.js +45 -36
- package/dist/adapters/index.cjs +6 -6
- package/dist/adapters/react-native.cjs +37 -27
- package/dist/adapters/react-native.js +37 -27
- package/dist/adapters/xhr.cjs +29 -19
- package/dist/adapters/xhr.js +29 -19
- package/dist/cache/index.cjs +9 -9
- package/dist/core/rezo.cjs +21 -2
- package/dist/core/rezo.js +21 -2
- package/dist/crawler/index.cjs +42 -42
- package/dist/crawler/plugin/index.cjs +1 -1
- package/dist/crawler.d.ts +1715 -1298
- package/dist/entries/crawler.cjs +4 -4
- package/dist/index.cjs +31 -30
- package/dist/index.d.ts +1770 -1550
- package/dist/index.js +1 -1
- package/dist/internal/agents/index.cjs +14 -14
- package/dist/platform/browser.d.ts +1809 -1392
- package/dist/platform/bun.d.ts +1809 -1392
- package/dist/platform/deno.d.ts +1809 -1392
- package/dist/platform/node.d.ts +1809 -1392
- package/dist/platform/react-native.d.ts +1809 -1392
- package/dist/platform/worker.d.ts +1809 -1392
- package/dist/proxy/index.cjs +4 -4
- package/dist/proxy/manager.cjs +29 -0
- package/dist/proxy/manager.js +29 -0
- package/dist/queue/http-queue.cjs +22 -6
- package/dist/queue/http-queue.js +22 -6
- package/dist/queue/index.cjs +9 -8
- package/dist/queue/index.js +1 -1
- package/dist/responses/universal/index.cjs +11 -11
- package/dist/utils/http-config.cjs +116 -23
- package/dist/utils/http-config.js +112 -22
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist/wget/index.cjs +49 -49
- package/dist/wget/index.d.ts +1712 -1295
- package/package.json +1 -1
package/dist/adapters/curl.cjs
CHANGED
|
@@ -10,7 +10,7 @@ const { buildSmartError, builErrorFromResponse } = require('../responses/buildEr
|
|
|
10
10
|
const { RezoCookieJar, Cookie } = require('../utils/cookies.cjs');
|
|
11
11
|
const RezoFormData = require('../utils/form-data.cjs');
|
|
12
12
|
const { existsSync } = require("node:fs");
|
|
13
|
-
const { getDefaultConfig, prepareHTTPOptions } = require('../utils/http-config.cjs');
|
|
13
|
+
const { getDefaultConfig, prepareHTTPOptions, calculateRetryDelay } = require('../utils/http-config.cjs');
|
|
14
14
|
const { RezoHeaders } = require('../utils/headers.cjs');
|
|
15
15
|
const { StreamResponse } = require('../responses/stream.cjs');
|
|
16
16
|
const { DownloadResponse } = require('../responses/download.cjs');
|
|
@@ -2327,9 +2327,7 @@ async function executeRequest(options, defaultOptions, jar) {
|
|
|
2327
2327
|
duration: perform.now()
|
|
2328
2328
|
});
|
|
2329
2329
|
perform.reset();
|
|
2330
|
-
const
|
|
2331
|
-
const incrementDelay = config.retry.incrementDelay || false;
|
|
2332
|
-
const delay = incrementDelay ? retryDelay * config.retryAttempts : retryDelay;
|
|
2330
|
+
const delay = calculateRetryDelay(config.retryAttempts, config.retry.retryDelay, config.retry.backoff, config.retry.maxDelay);
|
|
2333
2331
|
debugLog.retry(config, config.retryAttempts, maxRetries, response.status, delay);
|
|
2334
2332
|
if (config.hooks?.beforeRetry && config.hooks.beforeRetry.length > 0) {
|
|
2335
2333
|
for (const hook of config.hooks.beforeRetry) {
|
package/dist/adapters/curl.js
CHANGED
|
@@ -10,7 +10,7 @@ import { buildSmartError, builErrorFromResponse } from '../responses/buildError.
|
|
|
10
10
|
import { RezoCookieJar, Cookie } from '../utils/cookies.js';
|
|
11
11
|
import RezoFormData from '../utils/form-data.js';
|
|
12
12
|
import { existsSync } from "node:fs";
|
|
13
|
-
import { getDefaultConfig, prepareHTTPOptions } from '../utils/http-config.js';
|
|
13
|
+
import { getDefaultConfig, prepareHTTPOptions, calculateRetryDelay } from '../utils/http-config.js';
|
|
14
14
|
import { RezoHeaders } from '../utils/headers.js';
|
|
15
15
|
import { StreamResponse } from '../responses/stream.js';
|
|
16
16
|
import { DownloadResponse } from '../responses/download.js';
|
|
@@ -2327,9 +2327,7 @@ export async function executeRequest(options, defaultOptions, jar) {
|
|
|
2327
2327
|
duration: perform.now()
|
|
2328
2328
|
});
|
|
2329
2329
|
perform.reset();
|
|
2330
|
-
const
|
|
2331
|
-
const incrementDelay = config.retry.incrementDelay || false;
|
|
2332
|
-
const delay = incrementDelay ? retryDelay * config.retryAttempts : retryDelay;
|
|
2330
|
+
const delay = calculateRetryDelay(config.retryAttempts, config.retry.retryDelay, config.retry.backoff, config.retry.maxDelay);
|
|
2333
2331
|
debugLog.retry(config, config.retryAttempts, maxRetries, response.status, delay);
|
|
2334
2332
|
if (config.hooks?.beforeRetry && config.hooks.beforeRetry.length > 0) {
|
|
2335
2333
|
for (const hook of config.hooks.beforeRetry) {
|