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/curl.cjs
CHANGED
|
@@ -34,6 +34,35 @@ function mergeRequestAndResponseCookies(requestCookies, responseCookies) {
|
|
|
34
34
|
}
|
|
35
35
|
return Array.from(cookieMap.values());
|
|
36
36
|
}
|
|
37
|
+
function buildTimingFromCurlStats(stats, startTime) {
|
|
38
|
+
const timeNamelookup = parseFloat(stats["time_namelookup"]) * 1000 || 0;
|
|
39
|
+
const timeConnect = parseFloat(stats["time_connect"]) * 1000 || 0;
|
|
40
|
+
const timeAppconnect = parseFloat(stats["time_appconnect"]) * 1000 || 0;
|
|
41
|
+
const timeStarttransfer = parseFloat(stats["time_starttransfer"]) * 1000 || 0;
|
|
42
|
+
const timeTotal = parseFloat(stats["time_total"]) * 1000 || 0;
|
|
43
|
+
return {
|
|
44
|
+
startTime,
|
|
45
|
+
domainLookupStart: startTime,
|
|
46
|
+
domainLookupEnd: startTime + timeNamelookup,
|
|
47
|
+
connectStart: startTime + timeNamelookup,
|
|
48
|
+
secureConnectionStart: timeAppconnect > timeConnect ? startTime + timeConnect : 0,
|
|
49
|
+
connectEnd: startTime + (timeAppconnect > 0 ? timeAppconnect : timeConnect),
|
|
50
|
+
requestStart: startTime + (timeAppconnect > 0 ? timeAppconnect : timeConnect),
|
|
51
|
+
responseStart: startTime + timeStarttransfer,
|
|
52
|
+
responseEnd: startTime + timeTotal
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function getTimingDurations(config) {
|
|
56
|
+
const t = config.timing;
|
|
57
|
+
return {
|
|
58
|
+
total: t.responseEnd - t.startTime,
|
|
59
|
+
dns: t.domainLookupEnd - t.domainLookupStart,
|
|
60
|
+
tcp: t.secureConnectionStart > 0 ? t.secureConnectionStart - t.connectStart : t.connectEnd - t.connectStart,
|
|
61
|
+
tls: t.secureConnectionStart > 0 ? t.connectEnd - t.secureConnectionStart : undefined,
|
|
62
|
+
firstByte: t.responseStart - t.startTime,
|
|
63
|
+
download: t.responseEnd - t.responseStart
|
|
64
|
+
};
|
|
65
|
+
}
|
|
37
66
|
|
|
38
67
|
class CurlCapabilities {
|
|
39
68
|
static instance;
|
|
@@ -1433,18 +1462,8 @@ class CurlResponseParser {
|
|
|
1433
1462
|
} else {
|
|
1434
1463
|
data = responseBody;
|
|
1435
1464
|
}
|
|
1436
|
-
const
|
|
1437
|
-
|
|
1438
|
-
startTimestamp: config.timing?.startTimestamp || Date.now(),
|
|
1439
|
-
endTimestamp: Date.now(),
|
|
1440
|
-
dnsMs: parseFloat(stats["time_namelookup"]) * 1000 || 0,
|
|
1441
|
-
tcpMs: (parseFloat(stats["time_connect"]) - parseFloat(stats["time_namelookup"])) * 1000 || 0,
|
|
1442
|
-
tlsMs: (parseFloat(stats["time_appconnect"]) - parseFloat(stats["time_connect"])) * 1000 || 0,
|
|
1443
|
-
ttfbMs: parseFloat(stats["time_starttransfer"]) * 1000 || 0,
|
|
1444
|
-
transferMs: (parseFloat(stats["time_total"]) - parseFloat(stats["time_starttransfer"])) * 1000 || 0,
|
|
1445
|
-
durationMs: totalMs
|
|
1446
|
-
};
|
|
1447
|
-
config.timing = timing;
|
|
1465
|
+
const startTime = config.timing?.startTime || performance.now();
|
|
1466
|
+
config.timing = buildTimingFromCurlStats(stats, startTime);
|
|
1448
1467
|
config.status = status;
|
|
1449
1468
|
config.statusText = statusText;
|
|
1450
1469
|
const isSecure = config.url?.startsWith("https") || false;
|
|
@@ -1682,14 +1701,7 @@ class CurlExecutor {
|
|
|
1682
1701
|
finalUrl: response.finalUrl,
|
|
1683
1702
|
cookies: response.cookies,
|
|
1684
1703
|
urls: response.urls,
|
|
1685
|
-
timing:
|
|
1686
|
-
total: performance.now() - startTime,
|
|
1687
|
-
firstByte: config.timing?.ttfbMs,
|
|
1688
|
-
dns: config.timing?.dnsMs,
|
|
1689
|
-
tcp: config.timing?.tcpMs,
|
|
1690
|
-
tls: config.timing?.tlsMs,
|
|
1691
|
-
download: config.timing?.transferMs
|
|
1692
|
-
},
|
|
1704
|
+
timing: getTimingDurations(config),
|
|
1693
1705
|
config
|
|
1694
1706
|
};
|
|
1695
1707
|
streamResult.emit("finish", finishEvent);
|
|
@@ -1712,14 +1724,10 @@ class CurlExecutor {
|
|
|
1712
1724
|
fileName,
|
|
1713
1725
|
fileSize,
|
|
1714
1726
|
timing: {
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
dns: config.timing?.dnsMs,
|
|
1718
|
-
tcp: config.timing?.tcpMs,
|
|
1719
|
-
tls: config.timing?.tlsMs,
|
|
1720
|
-
download: performance.now() - startTime
|
|
1727
|
+
...getTimingDurations(config),
|
|
1728
|
+
download: getTimingDurations(config).download || 0
|
|
1721
1729
|
},
|
|
1722
|
-
averageSpeed: fileSize / (
|
|
1730
|
+
averageSpeed: getTimingDurations(config).download ? fileSize / getTimingDurations(config).download * 1000 : 0,
|
|
1723
1731
|
config
|
|
1724
1732
|
};
|
|
1725
1733
|
downloadResult.emit("finish", finishEvent);
|
|
@@ -1742,14 +1750,11 @@ class CurlExecutor {
|
|
|
1742
1750
|
urls: response.urls,
|
|
1743
1751
|
uploadSize: config.transfer?.requestSize || 0,
|
|
1744
1752
|
timing: {
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
tls: config.timing?.tlsMs,
|
|
1749
|
-
upload: performance.now() - startTime,
|
|
1750
|
-
waiting: 0
|
|
1753
|
+
...getTimingDurations(config),
|
|
1754
|
+
upload: getTimingDurations(config).firstByte || 0,
|
|
1755
|
+
waiting: getTimingDurations(config).download > 0 && getTimingDurations(config).firstByte > 0 ? getTimingDurations(config).download - getTimingDurations(config).firstByte : 0
|
|
1751
1756
|
},
|
|
1752
|
-
averageUploadSpeed: (config.transfer?.requestSize
|
|
1757
|
+
averageUploadSpeed: getTimingDurations(config).firstByte && config.transfer?.requestSize ? config.transfer.requestSize / getTimingDurations(config).firstByte * 1000 : 0,
|
|
1753
1758
|
config
|
|
1754
1759
|
};
|
|
1755
1760
|
uploadResult.emit("finish", finishEvent);
|
package/dist/adapters/curl.js
CHANGED
|
@@ -34,6 +34,35 @@ function mergeRequestAndResponseCookies(requestCookies, responseCookies) {
|
|
|
34
34
|
}
|
|
35
35
|
return Array.from(cookieMap.values());
|
|
36
36
|
}
|
|
37
|
+
function buildTimingFromCurlStats(stats, startTime) {
|
|
38
|
+
const timeNamelookup = parseFloat(stats["time_namelookup"]) * 1000 || 0;
|
|
39
|
+
const timeConnect = parseFloat(stats["time_connect"]) * 1000 || 0;
|
|
40
|
+
const timeAppconnect = parseFloat(stats["time_appconnect"]) * 1000 || 0;
|
|
41
|
+
const timeStarttransfer = parseFloat(stats["time_starttransfer"]) * 1000 || 0;
|
|
42
|
+
const timeTotal = parseFloat(stats["time_total"]) * 1000 || 0;
|
|
43
|
+
return {
|
|
44
|
+
startTime,
|
|
45
|
+
domainLookupStart: startTime,
|
|
46
|
+
domainLookupEnd: startTime + timeNamelookup,
|
|
47
|
+
connectStart: startTime + timeNamelookup,
|
|
48
|
+
secureConnectionStart: timeAppconnect > timeConnect ? startTime + timeConnect : 0,
|
|
49
|
+
connectEnd: startTime + (timeAppconnect > 0 ? timeAppconnect : timeConnect),
|
|
50
|
+
requestStart: startTime + (timeAppconnect > 0 ? timeAppconnect : timeConnect),
|
|
51
|
+
responseStart: startTime + timeStarttransfer,
|
|
52
|
+
responseEnd: startTime + timeTotal
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function getTimingDurations(config) {
|
|
56
|
+
const t = config.timing;
|
|
57
|
+
return {
|
|
58
|
+
total: t.responseEnd - t.startTime,
|
|
59
|
+
dns: t.domainLookupEnd - t.domainLookupStart,
|
|
60
|
+
tcp: t.secureConnectionStart > 0 ? t.secureConnectionStart - t.connectStart : t.connectEnd - t.connectStart,
|
|
61
|
+
tls: t.secureConnectionStart > 0 ? t.connectEnd - t.secureConnectionStart : undefined,
|
|
62
|
+
firstByte: t.responseStart - t.startTime,
|
|
63
|
+
download: t.responseEnd - t.responseStart
|
|
64
|
+
};
|
|
65
|
+
}
|
|
37
66
|
|
|
38
67
|
class CurlCapabilities {
|
|
39
68
|
static instance;
|
|
@@ -1433,18 +1462,8 @@ class CurlResponseParser {
|
|
|
1433
1462
|
} else {
|
|
1434
1463
|
data = responseBody;
|
|
1435
1464
|
}
|
|
1436
|
-
const
|
|
1437
|
-
|
|
1438
|
-
startTimestamp: config.timing?.startTimestamp || Date.now(),
|
|
1439
|
-
endTimestamp: Date.now(),
|
|
1440
|
-
dnsMs: parseFloat(stats["time_namelookup"]) * 1000 || 0,
|
|
1441
|
-
tcpMs: (parseFloat(stats["time_connect"]) - parseFloat(stats["time_namelookup"])) * 1000 || 0,
|
|
1442
|
-
tlsMs: (parseFloat(stats["time_appconnect"]) - parseFloat(stats["time_connect"])) * 1000 || 0,
|
|
1443
|
-
ttfbMs: parseFloat(stats["time_starttransfer"]) * 1000 || 0,
|
|
1444
|
-
transferMs: (parseFloat(stats["time_total"]) - parseFloat(stats["time_starttransfer"])) * 1000 || 0,
|
|
1445
|
-
durationMs: totalMs
|
|
1446
|
-
};
|
|
1447
|
-
config.timing = timing;
|
|
1465
|
+
const startTime = config.timing?.startTime || performance.now();
|
|
1466
|
+
config.timing = buildTimingFromCurlStats(stats, startTime);
|
|
1448
1467
|
config.status = status;
|
|
1449
1468
|
config.statusText = statusText;
|
|
1450
1469
|
const isSecure = config.url?.startsWith("https") || false;
|
|
@@ -1682,14 +1701,7 @@ class CurlExecutor {
|
|
|
1682
1701
|
finalUrl: response.finalUrl,
|
|
1683
1702
|
cookies: response.cookies,
|
|
1684
1703
|
urls: response.urls,
|
|
1685
|
-
timing:
|
|
1686
|
-
total: performance.now() - startTime,
|
|
1687
|
-
firstByte: config.timing?.ttfbMs,
|
|
1688
|
-
dns: config.timing?.dnsMs,
|
|
1689
|
-
tcp: config.timing?.tcpMs,
|
|
1690
|
-
tls: config.timing?.tlsMs,
|
|
1691
|
-
download: config.timing?.transferMs
|
|
1692
|
-
},
|
|
1704
|
+
timing: getTimingDurations(config),
|
|
1693
1705
|
config
|
|
1694
1706
|
};
|
|
1695
1707
|
streamResult.emit("finish", finishEvent);
|
|
@@ -1712,14 +1724,10 @@ class CurlExecutor {
|
|
|
1712
1724
|
fileName,
|
|
1713
1725
|
fileSize,
|
|
1714
1726
|
timing: {
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
dns: config.timing?.dnsMs,
|
|
1718
|
-
tcp: config.timing?.tcpMs,
|
|
1719
|
-
tls: config.timing?.tlsMs,
|
|
1720
|
-
download: performance.now() - startTime
|
|
1727
|
+
...getTimingDurations(config),
|
|
1728
|
+
download: getTimingDurations(config).download || 0
|
|
1721
1729
|
},
|
|
1722
|
-
averageSpeed: fileSize / (
|
|
1730
|
+
averageSpeed: getTimingDurations(config).download ? fileSize / getTimingDurations(config).download * 1000 : 0,
|
|
1723
1731
|
config
|
|
1724
1732
|
};
|
|
1725
1733
|
downloadResult.emit("finish", finishEvent);
|
|
@@ -1742,14 +1750,11 @@ class CurlExecutor {
|
|
|
1742
1750
|
urls: response.urls,
|
|
1743
1751
|
uploadSize: config.transfer?.requestSize || 0,
|
|
1744
1752
|
timing: {
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
tls: config.timing?.tlsMs,
|
|
1749
|
-
upload: performance.now() - startTime,
|
|
1750
|
-
waiting: 0
|
|
1753
|
+
...getTimingDurations(config),
|
|
1754
|
+
upload: getTimingDurations(config).firstByte || 0,
|
|
1755
|
+
waiting: getTimingDurations(config).download > 0 && getTimingDurations(config).firstByte > 0 ? getTimingDurations(config).download - getTimingDurations(config).firstByte : 0
|
|
1751
1756
|
},
|
|
1752
|
-
averageUploadSpeed: (config.transfer?.requestSize
|
|
1757
|
+
averageUploadSpeed: getTimingDurations(config).firstByte && config.transfer?.requestSize ? config.transfer.requestSize / getTimingDurations(config).firstByte * 1000 : 0,
|
|
1753
1758
|
config
|
|
1754
1759
|
};
|
|
1755
1760
|
uploadResult.emit("finish", finishEvent);
|
|
@@ -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 */
|
|
@@ -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 */
|
|
@@ -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 */
|
|
@@ -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 */
|
|
@@ -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 */
|