rezo 1.0.18 → 1.0.20
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 +39 -34
- package/dist/adapters/curl.js +39 -34
- package/dist/adapters/entries/curl.d.ts +29 -17
- package/dist/adapters/entries/fetch.d.ts +29 -17
- package/dist/adapters/entries/http.d.ts +29 -17
- package/dist/adapters/entries/http2.d.ts +29 -17
- package/dist/adapters/entries/react-native.d.ts +29 -17
- package/dist/adapters/entries/xhr.d.ts +29 -17
- package/dist/adapters/fetch.cjs +42 -41
- package/dist/adapters/fetch.js +42 -41
- package/dist/adapters/http.cjs +184 -73
- package/dist/adapters/http.js +184 -73
- package/dist/adapters/http2.cjs +41 -36
- package/dist/adapters/http2.js +41 -36
- package/dist/adapters/index.cjs +6 -6
- package/dist/adapters/react-native.cjs +41 -27
- package/dist/adapters/react-native.js +41 -27
- package/dist/adapters/xhr.cjs +43 -38
- package/dist/adapters/xhr.js +43 -38
- package/dist/cache/index.cjs +13 -13
- package/dist/crawler.d.ts +29 -17
- package/dist/entries/crawler.cjs +5 -5
- package/dist/index.cjs +24 -24
- package/dist/index.d.ts +29 -17
- package/dist/platform/browser.d.ts +29 -17
- package/dist/platform/bun.d.ts +29 -17
- package/dist/platform/deno.d.ts +29 -17
- package/dist/platform/node.d.ts +29 -17
- package/dist/platform/react-native.d.ts +29 -17
- package/dist/platform/worker.d.ts +29 -17
- package/dist/plugin/index.cjs +36 -36
- package/dist/proxy/index.cjs +2 -2
- package/dist/queue/index.cjs +8 -8
- package/dist/utils/http-config.cjs +8 -4
- package/dist/utils/http-config.js +8 -4
- package/dist/utils/timing.cjs +90 -0
- package/dist/utils/timing.js +78 -0
- package/package.json +1 -1
package/dist/adapters/xhr.js
CHANGED
|
@@ -16,6 +16,30 @@ const Environment = {
|
|
|
16
16
|
hasFormData: typeof FormData !== "undefined",
|
|
17
17
|
hasBlob: typeof Blob !== "undefined"
|
|
18
18
|
};
|
|
19
|
+
function updateTiming(config, timing, bodySize) {
|
|
20
|
+
const now = performance.now();
|
|
21
|
+
config.timing.domainLookupStart = config.timing.startTime;
|
|
22
|
+
config.timing.domainLookupEnd = config.timing.startTime;
|
|
23
|
+
config.timing.connectStart = config.timing.startTime;
|
|
24
|
+
config.timing.secureConnectionStart = 0;
|
|
25
|
+
config.timing.connectEnd = config.timing.startTime;
|
|
26
|
+
config.timing.requestStart = config.timing.startTime;
|
|
27
|
+
config.timing.responseStart = timing.firstByteTime || config.timing.startTime;
|
|
28
|
+
config.timing.responseEnd = now;
|
|
29
|
+
config.transfer.bodySize = bodySize;
|
|
30
|
+
config.transfer.responseSize = bodySize;
|
|
31
|
+
}
|
|
32
|
+
function getTimingDurations(config) {
|
|
33
|
+
const t = config.timing;
|
|
34
|
+
return {
|
|
35
|
+
total: t.responseEnd - t.startTime,
|
|
36
|
+
dns: t.domainLookupEnd - t.domainLookupStart,
|
|
37
|
+
tcp: t.secureConnectionStart > 0 ? t.secureConnectionStart - t.connectStart : t.connectEnd - t.connectStart,
|
|
38
|
+
tls: t.secureConnectionStart > 0 ? t.connectEnd - t.secureConnectionStart : undefined,
|
|
39
|
+
firstByte: t.responseStart - t.startTime,
|
|
40
|
+
download: t.responseEnd - t.responseStart
|
|
41
|
+
};
|
|
42
|
+
}
|
|
19
43
|
const responseCacheInstances = new Map;
|
|
20
44
|
function getCacheConfigKey(option) {
|
|
21
45
|
if (option === true)
|
|
@@ -258,10 +282,11 @@ async function executeXHRRequest(fetchOptions, config, options, perform, streamR
|
|
|
258
282
|
const maxRetries = config?.retry?.maxRetries || 0;
|
|
259
283
|
const incrementDelay = config?.retry?.incrementDelay || false;
|
|
260
284
|
const statusCodes = config?.retry?.statusCodes;
|
|
285
|
+
const startTime = performance.now();
|
|
261
286
|
const timing = {
|
|
262
|
-
startTime
|
|
263
|
-
startTimestamp: Date.now()
|
|
287
|
+
startTime
|
|
264
288
|
};
|
|
289
|
+
config.timing.startTime = startTime;
|
|
265
290
|
const ABSOLUTE_MAX_ATTEMPTS = 50;
|
|
266
291
|
let totalAttempts = 0;
|
|
267
292
|
config.setSignal();
|
|
@@ -326,7 +351,6 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
|
|
|
326
351
|
config.isSecure = isSecure;
|
|
327
352
|
config.finalUrl = url;
|
|
328
353
|
config.network.protocol = isSecure ? "https" : "http";
|
|
329
|
-
config.timing.startTimestamp = timing.startTimestamp;
|
|
330
354
|
const xhr = new XMLHttpRequest;
|
|
331
355
|
xhr.open(fetchOptions.method.toUpperCase(), url, true);
|
|
332
356
|
const headers = toXHRHeaders(fetchOptions.headers);
|
|
@@ -370,9 +394,9 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
|
|
|
370
394
|
});
|
|
371
395
|
}
|
|
372
396
|
xhr.onprogress = (event) => {
|
|
373
|
-
if (!
|
|
397
|
+
if (!timing.firstByteTime) {
|
|
374
398
|
timing.firstByteTime = performance.now();
|
|
375
|
-
config.timing.
|
|
399
|
+
config.timing.responseStart = timing.firstByteTime;
|
|
376
400
|
}
|
|
377
401
|
if (eventEmitter) {
|
|
378
402
|
const progressEvent = {
|
|
@@ -404,13 +428,10 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
|
|
|
404
428
|
};
|
|
405
429
|
}
|
|
406
430
|
xhr.onload = () => {
|
|
407
|
-
if (!
|
|
431
|
+
if (!timing.firstByteTime) {
|
|
408
432
|
timing.firstByteTime = performance.now();
|
|
409
|
-
config.timing.
|
|
433
|
+
config.timing.responseStart = timing.firstByteTime;
|
|
410
434
|
}
|
|
411
|
-
config.timing.endTimestamp = Date.now();
|
|
412
|
-
config.timing.durationMs = performance.now() - timing.startTime;
|
|
413
|
-
config.timing.transferMs = timing.firstByteTime ? performance.now() - timing.firstByteTime : config.timing.durationMs;
|
|
414
435
|
const status = xhr.status;
|
|
415
436
|
const statusText = xhr.statusText;
|
|
416
437
|
const responseHeaders = parseXHRHeaders(xhr);
|
|
@@ -427,8 +448,8 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
|
|
|
427
448
|
contentLength: contentLength ? parseInt(contentLength, 10) : undefined,
|
|
428
449
|
cookies: cookies.array,
|
|
429
450
|
timing: {
|
|
430
|
-
firstByte: config.timing.
|
|
431
|
-
total: performance.now() - timing.startTime
|
|
451
|
+
firstByte: config.timing.responseStart - config.timing.startTime,
|
|
452
|
+
total: performance.now() - config.timing.startTime
|
|
432
453
|
}
|
|
433
454
|
};
|
|
434
455
|
eventEmitter.emit("headers", headersEvent);
|
|
@@ -472,8 +493,7 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
|
|
|
472
493
|
responseData = text;
|
|
473
494
|
}
|
|
474
495
|
}
|
|
475
|
-
config
|
|
476
|
-
config.transfer.responseSize = bodySize;
|
|
496
|
+
updateTiming(config, timing, bodySize);
|
|
477
497
|
if (status >= 400) {
|
|
478
498
|
const error = builErrorFromResponse(`HTTP Error ${status}: ${statusText}`, {
|
|
479
499
|
status,
|
|
@@ -509,14 +529,7 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
|
|
|
509
529
|
finalUrl: xhr.responseURL || url,
|
|
510
530
|
cookies,
|
|
511
531
|
urls: buildUrlTree(config, xhr.responseURL || url),
|
|
512
|
-
timing:
|
|
513
|
-
total: config.timing.durationMs || 0,
|
|
514
|
-
dns: config.timing.dnsMs,
|
|
515
|
-
tcp: config.timing.tcpMs,
|
|
516
|
-
tls: config.timing.tlsMs,
|
|
517
|
-
firstByte: config.timing.ttfbMs,
|
|
518
|
-
download: config.timing.transferMs
|
|
519
|
-
},
|
|
532
|
+
timing: getTimingDurations(config),
|
|
520
533
|
config: sanitizeConfig(config)
|
|
521
534
|
};
|
|
522
535
|
streamResult.emit("finish", streamFinishEvent);
|
|
@@ -537,14 +550,10 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
|
|
|
537
550
|
fileName: config.fileName || "",
|
|
538
551
|
fileSize: bodySize,
|
|
539
552
|
timing: {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
tcp: config.timing.tcpMs,
|
|
543
|
-
tls: config.timing.tlsMs,
|
|
544
|
-
firstByte: config.timing.ttfbMs,
|
|
545
|
-
download: config.timing.transferMs || 0
|
|
553
|
+
...getTimingDurations(config),
|
|
554
|
+
download: getTimingDurations(config).download || 0
|
|
546
555
|
},
|
|
547
|
-
averageSpeed: config.
|
|
556
|
+
averageSpeed: getTimingDurations(config).download ? bodySize / getTimingDurations(config).download * 1000 : 0,
|
|
548
557
|
config: sanitizeConfig(config)
|
|
549
558
|
};
|
|
550
559
|
downloadResult.emit("finish", downloadFinishEvent);
|
|
@@ -566,16 +575,12 @@ function executeSingleXHRRequest(config, fetchOptions, timing, streamResult, dow
|
|
|
566
575
|
urls: buildUrlTree(config, xhr.responseURL || url),
|
|
567
576
|
uploadSize: config.transfer.requestSize || 0,
|
|
568
577
|
timing: {
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
tls: config.timing.tlsMs,
|
|
573
|
-
upload: config.timing.transferMs || 0,
|
|
574
|
-
waiting: config.timing.ttfbMs || 0,
|
|
575
|
-
download: config.timing.transferMs
|
|
578
|
+
...getTimingDurations(config),
|
|
579
|
+
upload: getTimingDurations(config).firstByte || 0,
|
|
580
|
+
waiting: getTimingDurations(config).download > 0 && getTimingDurations(config).firstByte > 0 ? getTimingDurations(config).download - getTimingDurations(config).firstByte : 0
|
|
576
581
|
},
|
|
577
|
-
averageUploadSpeed: config.
|
|
578
|
-
averageDownloadSpeed: config.
|
|
582
|
+
averageUploadSpeed: getTimingDurations(config).firstByte && config.transfer.requestSize ? config.transfer.requestSize / getTimingDurations(config).firstByte * 1000 : 0,
|
|
583
|
+
averageDownloadSpeed: getTimingDurations(config).download ? bodySize / getTimingDurations(config).download * 1000 : 0,
|
|
579
584
|
config: sanitizeConfig(config)
|
|
580
585
|
};
|
|
581
586
|
uploadResult.emit("finish", uploadFinishEvent);
|
package/dist/cache/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.LRUCache =
|
|
3
|
-
const
|
|
4
|
-
exports.DNSCache =
|
|
5
|
-
exports.getGlobalDNSCache =
|
|
6
|
-
exports.resetGlobalDNSCache =
|
|
7
|
-
const
|
|
8
|
-
exports.ResponseCache =
|
|
9
|
-
exports.normalizeResponseCacheConfig =
|
|
10
|
-
const
|
|
11
|
-
exports.FileCacher =
|
|
12
|
-
const
|
|
13
|
-
exports.UrlStore =
|
|
1
|
+
const _mod_pcungp = require('./lru-cache.cjs');
|
|
2
|
+
exports.LRUCache = _mod_pcungp.LRUCache;;
|
|
3
|
+
const _mod_6vuqjm = require('./dns-cache.cjs');
|
|
4
|
+
exports.DNSCache = _mod_6vuqjm.DNSCache;
|
|
5
|
+
exports.getGlobalDNSCache = _mod_6vuqjm.getGlobalDNSCache;
|
|
6
|
+
exports.resetGlobalDNSCache = _mod_6vuqjm.resetGlobalDNSCache;;
|
|
7
|
+
const _mod_cklgi1 = require('./response-cache.cjs');
|
|
8
|
+
exports.ResponseCache = _mod_cklgi1.ResponseCache;
|
|
9
|
+
exports.normalizeResponseCacheConfig = _mod_cklgi1.normalizeResponseCacheConfig;;
|
|
10
|
+
const _mod_wlgf05 = require('./file-cacher.cjs');
|
|
11
|
+
exports.FileCacher = _mod_wlgf05.FileCacher;;
|
|
12
|
+
const _mod_ih62yw = require('./url-store.cjs');
|
|
13
|
+
exports.UrlStore = _mod_ih62yw.UrlStore;;
|
package/dist/crawler.d.ts
CHANGED
|
@@ -2029,24 +2029,26 @@ export interface RezoConfig {
|
|
|
2029
2029
|
* - removeAllCookiesSync(): Clear all cookies
|
|
2030
2030
|
*/
|
|
2031
2031
|
cookieJar: RezoCookieJar;
|
|
2032
|
-
/** @description Comprehensive timing information */
|
|
2032
|
+
/** @description Comprehensive timing information (matches PerformanceResourceTiming API) */
|
|
2033
2033
|
timing: {
|
|
2034
|
-
/** @description Request start timestamp (
|
|
2035
|
-
|
|
2036
|
-
/** @description
|
|
2037
|
-
|
|
2038
|
-
/** @description DNS lookup
|
|
2039
|
-
|
|
2040
|
-
/** @description
|
|
2041
|
-
|
|
2042
|
-
/** @description TLS handshake
|
|
2043
|
-
|
|
2044
|
-
/** @description
|
|
2045
|
-
|
|
2046
|
-
/** @description
|
|
2047
|
-
|
|
2048
|
-
/** @description
|
|
2049
|
-
|
|
2034
|
+
/** @description Request start timestamp (performance.now() value when request began) */
|
|
2035
|
+
startTime: number;
|
|
2036
|
+
/** @description Timestamp when DNS lookup started */
|
|
2037
|
+
domainLookupStart: number;
|
|
2038
|
+
/** @description Timestamp when DNS lookup ended */
|
|
2039
|
+
domainLookupEnd: number;
|
|
2040
|
+
/** @description Timestamp when connection started */
|
|
2041
|
+
connectStart: number;
|
|
2042
|
+
/** @description Timestamp when TLS handshake started (0 for HTTP) */
|
|
2043
|
+
secureConnectionStart: number;
|
|
2044
|
+
/** @description Timestamp when connection completed */
|
|
2045
|
+
connectEnd: number;
|
|
2046
|
+
/** @description Timestamp when request was sent */
|
|
2047
|
+
requestStart: number;
|
|
2048
|
+
/** @description Timestamp when first byte of response received */
|
|
2049
|
+
responseStart: number;
|
|
2050
|
+
/** @description Timestamp when response completed */
|
|
2051
|
+
responseEnd: number;
|
|
2050
2052
|
};
|
|
2051
2053
|
/** @description Network connection information */
|
|
2052
2054
|
network: {
|
|
@@ -2108,6 +2110,8 @@ export interface RezoConfig {
|
|
|
2108
2110
|
};
|
|
2109
2111
|
/** @description Debug mode flag */
|
|
2110
2112
|
debug?: boolean;
|
|
2113
|
+
/** @description URL tracking mode flag - logs redirect chain and retries */
|
|
2114
|
+
trackUrl?: boolean;
|
|
2111
2115
|
/** @description Request tracking identifier */
|
|
2112
2116
|
requestId: string;
|
|
2113
2117
|
/** @description Session identifier */
|
|
@@ -2871,6 +2875,12 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2871
2875
|
debug?: boolean;
|
|
2872
2876
|
/** Enable verbose logging with detailed information */
|
|
2873
2877
|
verbose?: boolean;
|
|
2878
|
+
/**
|
|
2879
|
+
* Enable URL tracking to log the complete redirect chain with status codes.
|
|
2880
|
+
* When enabled, logs: initial URL -> redirect URL (status code) -> final URL
|
|
2881
|
+
* Also logs retry attempts with their status codes.
|
|
2882
|
+
*/
|
|
2883
|
+
trackUrl?: boolean;
|
|
2874
2884
|
/** Name of the cookie containing XSRF token */
|
|
2875
2885
|
xsrfCookieName?: string;
|
|
2876
2886
|
/** Name of the header to send XSRF token in */
|
|
@@ -3352,6 +3362,8 @@ export interface RezoDefaultOptions {
|
|
|
3352
3362
|
debug?: RezoHttpRequest["debug"];
|
|
3353
3363
|
/** Enable verbose logging with detailed information */
|
|
3354
3364
|
verbose?: RezoHttpRequest["verbose"];
|
|
3365
|
+
/** Enable URL tracking to log redirect chain and retry attempts */
|
|
3366
|
+
trackUrl?: RezoHttpRequest["trackUrl"];
|
|
3355
3367
|
/** HTTP agent for HTTP requests */
|
|
3356
3368
|
httpAgent?: RezoHttpRequest["httpAgent"];
|
|
3357
3369
|
/** HTTPS agent for HTTPS requests */
|
package/dist/entries/crawler.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Crawler =
|
|
3
|
-
const
|
|
4
|
-
exports.CrawlerOptions =
|
|
5
|
-
exports.Domain =
|
|
1
|
+
const _mod_3tqnb0 = require('../plugin/crawler.cjs');
|
|
2
|
+
exports.Crawler = _mod_3tqnb0.Crawler;;
|
|
3
|
+
const _mod_a15878 = require('../plugin/crawler-options.cjs');
|
|
4
|
+
exports.CrawlerOptions = _mod_a15878.CrawlerOptions;
|
|
5
|
+
exports.Domain = _mod_a15878.Domain;;
|
package/dist/index.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
const
|
|
2
|
-
exports.Rezo =
|
|
3
|
-
exports.createRezoInstance =
|
|
4
|
-
exports.createDefaultInstance =
|
|
5
|
-
const
|
|
6
|
-
exports.RezoError =
|
|
7
|
-
exports.RezoErrorCode =
|
|
8
|
-
const
|
|
9
|
-
exports.RezoHeaders =
|
|
10
|
-
const
|
|
11
|
-
exports.RezoFormData =
|
|
12
|
-
const
|
|
13
|
-
exports.RezoCookieJar =
|
|
14
|
-
exports.Cookie =
|
|
15
|
-
const
|
|
16
|
-
exports.createDefaultHooks =
|
|
17
|
-
exports.mergeHooks =
|
|
18
|
-
const
|
|
19
|
-
exports.ProxyManager =
|
|
20
|
-
const
|
|
21
|
-
exports.RezoQueue =
|
|
22
|
-
exports.HttpQueue =
|
|
23
|
-
exports.Priority =
|
|
24
|
-
exports.HttpMethodPriority =
|
|
1
|
+
const _mod_duhs83 = require('./core/rezo.cjs');
|
|
2
|
+
exports.Rezo = _mod_duhs83.Rezo;
|
|
3
|
+
exports.createRezoInstance = _mod_duhs83.createRezoInstance;
|
|
4
|
+
exports.createDefaultInstance = _mod_duhs83.createDefaultInstance;;
|
|
5
|
+
const _mod_8z3sz9 = require('./errors/rezo-error.cjs');
|
|
6
|
+
exports.RezoError = _mod_8z3sz9.RezoError;
|
|
7
|
+
exports.RezoErrorCode = _mod_8z3sz9.RezoErrorCode;;
|
|
8
|
+
const _mod_o75xf9 = require('./utils/headers.cjs');
|
|
9
|
+
exports.RezoHeaders = _mod_o75xf9.RezoHeaders;;
|
|
10
|
+
const _mod_igc0kq = require('./utils/form-data.cjs');
|
|
11
|
+
exports.RezoFormData = _mod_igc0kq.RezoFormData;;
|
|
12
|
+
const _mod_kuocqq = require('./utils/cookies.cjs');
|
|
13
|
+
exports.RezoCookieJar = _mod_kuocqq.RezoCookieJar;
|
|
14
|
+
exports.Cookie = _mod_kuocqq.Cookie;;
|
|
15
|
+
const _mod_k7ozxh = require('./core/hooks.cjs');
|
|
16
|
+
exports.createDefaultHooks = _mod_k7ozxh.createDefaultHooks;
|
|
17
|
+
exports.mergeHooks = _mod_k7ozxh.mergeHooks;;
|
|
18
|
+
const _mod_5af6mv = require('./proxy/manager.cjs');
|
|
19
|
+
exports.ProxyManager = _mod_5af6mv.ProxyManager;;
|
|
20
|
+
const _mod_ahusy5 = require('./queue/index.cjs');
|
|
21
|
+
exports.RezoQueue = _mod_ahusy5.RezoQueue;
|
|
22
|
+
exports.HttpQueue = _mod_ahusy5.HttpQueue;
|
|
23
|
+
exports.Priority = _mod_ahusy5.Priority;
|
|
24
|
+
exports.HttpMethodPriority = _mod_ahusy5.HttpMethodPriority;;
|
|
25
25
|
const { RezoError } = require('./errors/rezo-error.cjs');
|
|
26
26
|
const isRezoError = exports.isRezoError = RezoError.isRezoError;
|
|
27
27
|
const Cancel = exports.Cancel = RezoError;
|
package/dist/index.d.ts
CHANGED
|
@@ -1815,24 +1815,26 @@ export interface RezoConfig {
|
|
|
1815
1815
|
* - removeAllCookiesSync(): Clear all cookies
|
|
1816
1816
|
*/
|
|
1817
1817
|
cookieJar: RezoCookieJar;
|
|
1818
|
-
/** @description Comprehensive timing information */
|
|
1818
|
+
/** @description Comprehensive timing information (matches PerformanceResourceTiming API) */
|
|
1819
1819
|
timing: {
|
|
1820
|
-
/** @description Request start timestamp (
|
|
1821
|
-
|
|
1822
|
-
/** @description
|
|
1823
|
-
|
|
1824
|
-
/** @description DNS lookup
|
|
1825
|
-
|
|
1826
|
-
/** @description
|
|
1827
|
-
|
|
1828
|
-
/** @description TLS handshake
|
|
1829
|
-
|
|
1830
|
-
/** @description
|
|
1831
|
-
|
|
1832
|
-
/** @description
|
|
1833
|
-
|
|
1834
|
-
/** @description
|
|
1835
|
-
|
|
1820
|
+
/** @description Request start timestamp (performance.now() value when request began) */
|
|
1821
|
+
startTime: number;
|
|
1822
|
+
/** @description Timestamp when DNS lookup started */
|
|
1823
|
+
domainLookupStart: number;
|
|
1824
|
+
/** @description Timestamp when DNS lookup ended */
|
|
1825
|
+
domainLookupEnd: number;
|
|
1826
|
+
/** @description Timestamp when connection started */
|
|
1827
|
+
connectStart: number;
|
|
1828
|
+
/** @description Timestamp when TLS handshake started (0 for HTTP) */
|
|
1829
|
+
secureConnectionStart: number;
|
|
1830
|
+
/** @description Timestamp when connection completed */
|
|
1831
|
+
connectEnd: number;
|
|
1832
|
+
/** @description Timestamp when request was sent */
|
|
1833
|
+
requestStart: number;
|
|
1834
|
+
/** @description Timestamp when first byte of response received */
|
|
1835
|
+
responseStart: number;
|
|
1836
|
+
/** @description Timestamp when response completed */
|
|
1837
|
+
responseEnd: number;
|
|
1836
1838
|
};
|
|
1837
1839
|
/** @description Network connection information */
|
|
1838
1840
|
network: {
|
|
@@ -1894,6 +1896,8 @@ export interface RezoConfig {
|
|
|
1894
1896
|
};
|
|
1895
1897
|
/** @description Debug mode flag */
|
|
1896
1898
|
debug?: boolean;
|
|
1899
|
+
/** @description URL tracking mode flag - logs redirect chain and retries */
|
|
1900
|
+
trackUrl?: boolean;
|
|
1897
1901
|
/** @description Request tracking identifier */
|
|
1898
1902
|
requestId: string;
|
|
1899
1903
|
/** @description Session identifier */
|
|
@@ -2879,6 +2883,12 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2879
2883
|
debug?: boolean;
|
|
2880
2884
|
/** Enable verbose logging with detailed information */
|
|
2881
2885
|
verbose?: boolean;
|
|
2886
|
+
/**
|
|
2887
|
+
* Enable URL tracking to log the complete redirect chain with status codes.
|
|
2888
|
+
* When enabled, logs: initial URL -> redirect URL (status code) -> final URL
|
|
2889
|
+
* Also logs retry attempts with their status codes.
|
|
2890
|
+
*/
|
|
2891
|
+
trackUrl?: boolean;
|
|
2882
2892
|
/** Name of the cookie containing XSRF token */
|
|
2883
2893
|
xsrfCookieName?: string;
|
|
2884
2894
|
/** Name of the header to send XSRF token in */
|
|
@@ -3379,6 +3389,8 @@ export interface RezoDefaultOptions {
|
|
|
3379
3389
|
debug?: RezoHttpRequest["debug"];
|
|
3380
3390
|
/** Enable verbose logging with detailed information */
|
|
3381
3391
|
verbose?: RezoHttpRequest["verbose"];
|
|
3392
|
+
/** Enable URL tracking to log redirect chain and retry attempts */
|
|
3393
|
+
trackUrl?: RezoHttpRequest["trackUrl"];
|
|
3382
3394
|
/** HTTP agent for HTTP requests */
|
|
3383
3395
|
httpAgent?: RezoHttpRequest["httpAgent"];
|
|
3384
3396
|
/** HTTPS agent for HTTPS requests */
|
|
@@ -1815,24 +1815,26 @@ export interface RezoConfig {
|
|
|
1815
1815
|
* - removeAllCookiesSync(): Clear all cookies
|
|
1816
1816
|
*/
|
|
1817
1817
|
cookieJar: RezoCookieJar;
|
|
1818
|
-
/** @description Comprehensive timing information */
|
|
1818
|
+
/** @description Comprehensive timing information (matches PerformanceResourceTiming API) */
|
|
1819
1819
|
timing: {
|
|
1820
|
-
/** @description Request start timestamp (
|
|
1821
|
-
|
|
1822
|
-
/** @description
|
|
1823
|
-
|
|
1824
|
-
/** @description DNS lookup
|
|
1825
|
-
|
|
1826
|
-
/** @description
|
|
1827
|
-
|
|
1828
|
-
/** @description TLS handshake
|
|
1829
|
-
|
|
1830
|
-
/** @description
|
|
1831
|
-
|
|
1832
|
-
/** @description
|
|
1833
|
-
|
|
1834
|
-
/** @description
|
|
1835
|
-
|
|
1820
|
+
/** @description Request start timestamp (performance.now() value when request began) */
|
|
1821
|
+
startTime: number;
|
|
1822
|
+
/** @description Timestamp when DNS lookup started */
|
|
1823
|
+
domainLookupStart: number;
|
|
1824
|
+
/** @description Timestamp when DNS lookup ended */
|
|
1825
|
+
domainLookupEnd: number;
|
|
1826
|
+
/** @description Timestamp when connection started */
|
|
1827
|
+
connectStart: number;
|
|
1828
|
+
/** @description Timestamp when TLS handshake started (0 for HTTP) */
|
|
1829
|
+
secureConnectionStart: number;
|
|
1830
|
+
/** @description Timestamp when connection completed */
|
|
1831
|
+
connectEnd: number;
|
|
1832
|
+
/** @description Timestamp when request was sent */
|
|
1833
|
+
requestStart: number;
|
|
1834
|
+
/** @description Timestamp when first byte of response received */
|
|
1835
|
+
responseStart: number;
|
|
1836
|
+
/** @description Timestamp when response completed */
|
|
1837
|
+
responseEnd: number;
|
|
1836
1838
|
};
|
|
1837
1839
|
/** @description Network connection information */
|
|
1838
1840
|
network: {
|
|
@@ -1894,6 +1896,8 @@ export interface RezoConfig {
|
|
|
1894
1896
|
};
|
|
1895
1897
|
/** @description Debug mode flag */
|
|
1896
1898
|
debug?: boolean;
|
|
1899
|
+
/** @description URL tracking mode flag - logs redirect chain and retries */
|
|
1900
|
+
trackUrl?: boolean;
|
|
1897
1901
|
/** @description Request tracking identifier */
|
|
1898
1902
|
requestId: string;
|
|
1899
1903
|
/** @description Session identifier */
|
|
@@ -2753,6 +2757,12 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2753
2757
|
debug?: boolean;
|
|
2754
2758
|
/** Enable verbose logging with detailed information */
|
|
2755
2759
|
verbose?: boolean;
|
|
2760
|
+
/**
|
|
2761
|
+
* Enable URL tracking to log the complete redirect chain with status codes.
|
|
2762
|
+
* When enabled, logs: initial URL -> redirect URL (status code) -> final URL
|
|
2763
|
+
* Also logs retry attempts with their status codes.
|
|
2764
|
+
*/
|
|
2765
|
+
trackUrl?: boolean;
|
|
2756
2766
|
/** Name of the cookie containing XSRF token */
|
|
2757
2767
|
xsrfCookieName?: string;
|
|
2758
2768
|
/** Name of the header to send XSRF token in */
|
|
@@ -3234,6 +3244,8 @@ export interface RezoDefaultOptions {
|
|
|
3234
3244
|
debug?: RezoHttpRequest["debug"];
|
|
3235
3245
|
/** Enable verbose logging with detailed information */
|
|
3236
3246
|
verbose?: RezoHttpRequest["verbose"];
|
|
3247
|
+
/** Enable URL tracking to log redirect chain and retry attempts */
|
|
3248
|
+
trackUrl?: RezoHttpRequest["trackUrl"];
|
|
3237
3249
|
/** HTTP agent for HTTP requests */
|
|
3238
3250
|
httpAgent?: RezoHttpRequest["httpAgent"];
|
|
3239
3251
|
/** HTTPS agent for HTTPS requests */
|
package/dist/platform/bun.d.ts
CHANGED
|
@@ -1815,24 +1815,26 @@ export interface RezoConfig {
|
|
|
1815
1815
|
* - removeAllCookiesSync(): Clear all cookies
|
|
1816
1816
|
*/
|
|
1817
1817
|
cookieJar: RezoCookieJar;
|
|
1818
|
-
/** @description Comprehensive timing information */
|
|
1818
|
+
/** @description Comprehensive timing information (matches PerformanceResourceTiming API) */
|
|
1819
1819
|
timing: {
|
|
1820
|
-
/** @description Request start timestamp (
|
|
1821
|
-
|
|
1822
|
-
/** @description
|
|
1823
|
-
|
|
1824
|
-
/** @description DNS lookup
|
|
1825
|
-
|
|
1826
|
-
/** @description
|
|
1827
|
-
|
|
1828
|
-
/** @description TLS handshake
|
|
1829
|
-
|
|
1830
|
-
/** @description
|
|
1831
|
-
|
|
1832
|
-
/** @description
|
|
1833
|
-
|
|
1834
|
-
/** @description
|
|
1835
|
-
|
|
1820
|
+
/** @description Request start timestamp (performance.now() value when request began) */
|
|
1821
|
+
startTime: number;
|
|
1822
|
+
/** @description Timestamp when DNS lookup started */
|
|
1823
|
+
domainLookupStart: number;
|
|
1824
|
+
/** @description Timestamp when DNS lookup ended */
|
|
1825
|
+
domainLookupEnd: number;
|
|
1826
|
+
/** @description Timestamp when connection started */
|
|
1827
|
+
connectStart: number;
|
|
1828
|
+
/** @description Timestamp when TLS handshake started (0 for HTTP) */
|
|
1829
|
+
secureConnectionStart: number;
|
|
1830
|
+
/** @description Timestamp when connection completed */
|
|
1831
|
+
connectEnd: number;
|
|
1832
|
+
/** @description Timestamp when request was sent */
|
|
1833
|
+
requestStart: number;
|
|
1834
|
+
/** @description Timestamp when first byte of response received */
|
|
1835
|
+
responseStart: number;
|
|
1836
|
+
/** @description Timestamp when response completed */
|
|
1837
|
+
responseEnd: number;
|
|
1836
1838
|
};
|
|
1837
1839
|
/** @description Network connection information */
|
|
1838
1840
|
network: {
|
|
@@ -1894,6 +1896,8 @@ export interface RezoConfig {
|
|
|
1894
1896
|
};
|
|
1895
1897
|
/** @description Debug mode flag */
|
|
1896
1898
|
debug?: boolean;
|
|
1899
|
+
/** @description URL tracking mode flag - logs redirect chain and retries */
|
|
1900
|
+
trackUrl?: boolean;
|
|
1897
1901
|
/** @description Request tracking identifier */
|
|
1898
1902
|
requestId: string;
|
|
1899
1903
|
/** @description Session identifier */
|
|
@@ -2753,6 +2757,12 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2753
2757
|
debug?: boolean;
|
|
2754
2758
|
/** Enable verbose logging with detailed information */
|
|
2755
2759
|
verbose?: boolean;
|
|
2760
|
+
/**
|
|
2761
|
+
* Enable URL tracking to log the complete redirect chain with status codes.
|
|
2762
|
+
* When enabled, logs: initial URL -> redirect URL (status code) -> final URL
|
|
2763
|
+
* Also logs retry attempts with their status codes.
|
|
2764
|
+
*/
|
|
2765
|
+
trackUrl?: boolean;
|
|
2756
2766
|
/** Name of the cookie containing XSRF token */
|
|
2757
2767
|
xsrfCookieName?: string;
|
|
2758
2768
|
/** Name of the header to send XSRF token in */
|
|
@@ -3234,6 +3244,8 @@ export interface RezoDefaultOptions {
|
|
|
3234
3244
|
debug?: RezoHttpRequest["debug"];
|
|
3235
3245
|
/** Enable verbose logging with detailed information */
|
|
3236
3246
|
verbose?: RezoHttpRequest["verbose"];
|
|
3247
|
+
/** Enable URL tracking to log redirect chain and retry attempts */
|
|
3248
|
+
trackUrl?: RezoHttpRequest["trackUrl"];
|
|
3237
3249
|
/** HTTP agent for HTTP requests */
|
|
3238
3250
|
httpAgent?: RezoHttpRequest["httpAgent"];
|
|
3239
3251
|
/** HTTPS agent for HTTPS requests */
|
package/dist/platform/deno.d.ts
CHANGED
|
@@ -1815,24 +1815,26 @@ export interface RezoConfig {
|
|
|
1815
1815
|
* - removeAllCookiesSync(): Clear all cookies
|
|
1816
1816
|
*/
|
|
1817
1817
|
cookieJar: RezoCookieJar;
|
|
1818
|
-
/** @description Comprehensive timing information */
|
|
1818
|
+
/** @description Comprehensive timing information (matches PerformanceResourceTiming API) */
|
|
1819
1819
|
timing: {
|
|
1820
|
-
/** @description Request start timestamp (
|
|
1821
|
-
|
|
1822
|
-
/** @description
|
|
1823
|
-
|
|
1824
|
-
/** @description DNS lookup
|
|
1825
|
-
|
|
1826
|
-
/** @description
|
|
1827
|
-
|
|
1828
|
-
/** @description TLS handshake
|
|
1829
|
-
|
|
1830
|
-
/** @description
|
|
1831
|
-
|
|
1832
|
-
/** @description
|
|
1833
|
-
|
|
1834
|
-
/** @description
|
|
1835
|
-
|
|
1820
|
+
/** @description Request start timestamp (performance.now() value when request began) */
|
|
1821
|
+
startTime: number;
|
|
1822
|
+
/** @description Timestamp when DNS lookup started */
|
|
1823
|
+
domainLookupStart: number;
|
|
1824
|
+
/** @description Timestamp when DNS lookup ended */
|
|
1825
|
+
domainLookupEnd: number;
|
|
1826
|
+
/** @description Timestamp when connection started */
|
|
1827
|
+
connectStart: number;
|
|
1828
|
+
/** @description Timestamp when TLS handshake started (0 for HTTP) */
|
|
1829
|
+
secureConnectionStart: number;
|
|
1830
|
+
/** @description Timestamp when connection completed */
|
|
1831
|
+
connectEnd: number;
|
|
1832
|
+
/** @description Timestamp when request was sent */
|
|
1833
|
+
requestStart: number;
|
|
1834
|
+
/** @description Timestamp when first byte of response received */
|
|
1835
|
+
responseStart: number;
|
|
1836
|
+
/** @description Timestamp when response completed */
|
|
1837
|
+
responseEnd: number;
|
|
1836
1838
|
};
|
|
1837
1839
|
/** @description Network connection information */
|
|
1838
1840
|
network: {
|
|
@@ -1894,6 +1896,8 @@ export interface RezoConfig {
|
|
|
1894
1896
|
};
|
|
1895
1897
|
/** @description Debug mode flag */
|
|
1896
1898
|
debug?: boolean;
|
|
1899
|
+
/** @description URL tracking mode flag - logs redirect chain and retries */
|
|
1900
|
+
trackUrl?: boolean;
|
|
1897
1901
|
/** @description Request tracking identifier */
|
|
1898
1902
|
requestId: string;
|
|
1899
1903
|
/** @description Session identifier */
|
|
@@ -2753,6 +2757,12 @@ export interface RezoRequestConfig<D = any> {
|
|
|
2753
2757
|
debug?: boolean;
|
|
2754
2758
|
/** Enable verbose logging with detailed information */
|
|
2755
2759
|
verbose?: boolean;
|
|
2760
|
+
/**
|
|
2761
|
+
* Enable URL tracking to log the complete redirect chain with status codes.
|
|
2762
|
+
* When enabled, logs: initial URL -> redirect URL (status code) -> final URL
|
|
2763
|
+
* Also logs retry attempts with their status codes.
|
|
2764
|
+
*/
|
|
2765
|
+
trackUrl?: boolean;
|
|
2756
2766
|
/** Name of the cookie containing XSRF token */
|
|
2757
2767
|
xsrfCookieName?: string;
|
|
2758
2768
|
/** Name of the header to send XSRF token in */
|
|
@@ -3234,6 +3244,8 @@ export interface RezoDefaultOptions {
|
|
|
3234
3244
|
debug?: RezoHttpRequest["debug"];
|
|
3235
3245
|
/** Enable verbose logging with detailed information */
|
|
3236
3246
|
verbose?: RezoHttpRequest["verbose"];
|
|
3247
|
+
/** Enable URL tracking to log redirect chain and retry attempts */
|
|
3248
|
+
trackUrl?: RezoHttpRequest["trackUrl"];
|
|
3237
3249
|
/** HTTP agent for HTTP requests */
|
|
3238
3250
|
httpAgent?: RezoHttpRequest["httpAgent"];
|
|
3239
3251
|
/** HTTPS agent for HTTPS requests */
|