rezo 1.0.19 → 1.0.21

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 (40) hide show
  1. package/dist/adapters/curl.cjs +39 -34
  2. package/dist/adapters/curl.js +39 -34
  3. package/dist/adapters/entries/curl.d.ts +19 -18
  4. package/dist/adapters/entries/fetch.d.ts +19 -18
  5. package/dist/adapters/entries/http.d.ts +19 -18
  6. package/dist/adapters/entries/http2.d.ts +19 -18
  7. package/dist/adapters/entries/react-native.d.ts +19 -18
  8. package/dist/adapters/entries/xhr.d.ts +19 -18
  9. package/dist/adapters/fetch.cjs +42 -41
  10. package/dist/adapters/fetch.js +42 -41
  11. package/dist/adapters/http.cjs +65 -46
  12. package/dist/adapters/http.js +65 -46
  13. package/dist/adapters/http2.cjs +41 -36
  14. package/dist/adapters/http2.js +41 -36
  15. package/dist/adapters/index.cjs +6 -6
  16. package/dist/adapters/react-native.cjs +41 -27
  17. package/dist/adapters/react-native.js +41 -27
  18. package/dist/adapters/xhr.cjs +43 -38
  19. package/dist/adapters/xhr.js +43 -38
  20. package/dist/cache/index.cjs +13 -13
  21. package/dist/crawler.d.ts +19 -18
  22. package/dist/entries/crawler.cjs +5 -5
  23. package/dist/errors/rezo-error.cjs +139 -21
  24. package/dist/errors/rezo-error.js +138 -21
  25. package/dist/index.cjs +24 -24
  26. package/dist/index.d.ts +19 -18
  27. package/dist/platform/browser.d.ts +19 -18
  28. package/dist/platform/bun.d.ts +19 -18
  29. package/dist/platform/deno.d.ts +19 -18
  30. package/dist/platform/node.d.ts +19 -18
  31. package/dist/platform/react-native.d.ts +19 -18
  32. package/dist/platform/worker.d.ts +19 -18
  33. package/dist/plugin/index.cjs +36 -36
  34. package/dist/proxy/index.cjs +2 -2
  35. package/dist/queue/index.cjs +8 -8
  36. package/dist/utils/http-config.cjs +6 -3
  37. package/dist/utils/http-config.js +6 -3
  38. package/dist/utils/timing.cjs +90 -0
  39. package/dist/utils/timing.js +78 -0
  40. package/package.json +1 -1
@@ -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 totalMs = parseFloat(stats["time_total"]) * 1000 || 0;
1437
- const timing = {
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
- total: performance.now() - startTime,
1716
- firstByte: config.timing?.ttfbMs,
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 / ((performance.now() - startTime) / 1000),
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
- total: performance.now() - startTime,
1746
- dns: config.timing?.dnsMs,
1747
- tcp: config.timing?.tcpMs,
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 || 0) / ((performance.now() - startTime) / 1000),
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);
@@ -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 totalMs = parseFloat(stats["time_total"]) * 1000 || 0;
1437
- const timing = {
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
- total: performance.now() - startTime,
1716
- firstByte: config.timing?.ttfbMs,
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 / ((performance.now() - startTime) / 1000),
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
- total: performance.now() - startTime,
1746
- dns: config.timing?.dnsMs,
1747
- tcp: config.timing?.tcpMs,
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 || 0) / ((performance.now() - startTime) / 1000),
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 (absolute performance.now() value) */
1821
- startTimestamp: number;
1822
- /** @description Request end timestamp (absolute performance.now() value) */
1823
- endTimestamp: number;
1824
- /** @description DNS lookup duration in milliseconds */
1825
- dnsMs?: number;
1826
- /** @description TCP connection duration in milliseconds */
1827
- tcpMs?: number;
1828
- /** @description TLS handshake duration in milliseconds */
1829
- tlsMs?: number;
1830
- /** @description Time to first byte in milliseconds (from start to first response byte) */
1831
- ttfbMs?: number;
1832
- /** @description Content transfer duration in milliseconds */
1833
- transferMs?: number;
1834
- /** @description Total request duration in milliseconds (endTimestamp - startTimestamp) */
1835
- durationMs: number;
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: {
@@ -2012,7 +2014,6 @@ export declare class RezoError<T = any> extends Error {
2012
2014
  readonly isSocksError: boolean;
2013
2015
  readonly isTlsError: boolean;
2014
2016
  readonly isRetryable: boolean;
2015
- readonly details: string;
2016
2017
  readonly suggestion: string;
2017
2018
  constructor(message: string, config: RezoConfig, code?: string, request?: RezoHttpRequest, response?: RezoResponse<T>);
2018
2019
  static isRezoError(error: unknown): error is RezoError;
@@ -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 (absolute performance.now() value) */
1821
- startTimestamp: number;
1822
- /** @description Request end timestamp (absolute performance.now() value) */
1823
- endTimestamp: number;
1824
- /** @description DNS lookup duration in milliseconds */
1825
- dnsMs?: number;
1826
- /** @description TCP connection duration in milliseconds */
1827
- tcpMs?: number;
1828
- /** @description TLS handshake duration in milliseconds */
1829
- tlsMs?: number;
1830
- /** @description Time to first byte in milliseconds (from start to first response byte) */
1831
- ttfbMs?: number;
1832
- /** @description Content transfer duration in milliseconds */
1833
- transferMs?: number;
1834
- /** @description Total request duration in milliseconds (endTimestamp - startTimestamp) */
1835
- durationMs: number;
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: {
@@ -2012,7 +2014,6 @@ export declare class RezoError<T = any> extends Error {
2012
2014
  readonly isSocksError: boolean;
2013
2015
  readonly isTlsError: boolean;
2014
2016
  readonly isRetryable: boolean;
2015
- readonly details: string;
2016
2017
  readonly suggestion: string;
2017
2018
  constructor(message: string, config: RezoConfig, code?: string, request?: RezoHttpRequest, response?: RezoResponse<T>);
2018
2019
  static isRezoError(error: unknown): error is RezoError;
@@ -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 (absolute performance.now() value) */
1821
- startTimestamp: number;
1822
- /** @description Request end timestamp (absolute performance.now() value) */
1823
- endTimestamp: number;
1824
- /** @description DNS lookup duration in milliseconds */
1825
- dnsMs?: number;
1826
- /** @description TCP connection duration in milliseconds */
1827
- tcpMs?: number;
1828
- /** @description TLS handshake duration in milliseconds */
1829
- tlsMs?: number;
1830
- /** @description Time to first byte in milliseconds (from start to first response byte) */
1831
- ttfbMs?: number;
1832
- /** @description Content transfer duration in milliseconds */
1833
- transferMs?: number;
1834
- /** @description Total request duration in milliseconds (endTimestamp - startTimestamp) */
1835
- durationMs: number;
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: {
@@ -2012,7 +2014,6 @@ export declare class RezoError<T = any> extends Error {
2012
2014
  readonly isSocksError: boolean;
2013
2015
  readonly isTlsError: boolean;
2014
2016
  readonly isRetryable: boolean;
2015
- readonly details: string;
2016
2017
  readonly suggestion: string;
2017
2018
  constructor(message: string, config: RezoConfig, code?: string, request?: RezoHttpRequest, response?: RezoResponse<T>);
2018
2019
  static isRezoError(error: unknown): error is RezoError;
@@ -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 (absolute performance.now() value) */
1821
- startTimestamp: number;
1822
- /** @description Request end timestamp (absolute performance.now() value) */
1823
- endTimestamp: number;
1824
- /** @description DNS lookup duration in milliseconds */
1825
- dnsMs?: number;
1826
- /** @description TCP connection duration in milliseconds */
1827
- tcpMs?: number;
1828
- /** @description TLS handshake duration in milliseconds */
1829
- tlsMs?: number;
1830
- /** @description Time to first byte in milliseconds (from start to first response byte) */
1831
- ttfbMs?: number;
1832
- /** @description Content transfer duration in milliseconds */
1833
- transferMs?: number;
1834
- /** @description Total request duration in milliseconds (endTimestamp - startTimestamp) */
1835
- durationMs: number;
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: {
@@ -2012,7 +2014,6 @@ export declare class RezoError<T = any> extends Error {
2012
2014
  readonly isSocksError: boolean;
2013
2015
  readonly isTlsError: boolean;
2014
2016
  readonly isRetryable: boolean;
2015
- readonly details: string;
2016
2017
  readonly suggestion: string;
2017
2018
  constructor(message: string, config: RezoConfig, code?: string, request?: RezoHttpRequest, response?: RezoResponse<T>);
2018
2019
  static isRezoError(error: unknown): error is RezoError;
@@ -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 (absolute performance.now() value) */
1821
- startTimestamp: number;
1822
- /** @description Request end timestamp (absolute performance.now() value) */
1823
- endTimestamp: number;
1824
- /** @description DNS lookup duration in milliseconds */
1825
- dnsMs?: number;
1826
- /** @description TCP connection duration in milliseconds */
1827
- tcpMs?: number;
1828
- /** @description TLS handshake duration in milliseconds */
1829
- tlsMs?: number;
1830
- /** @description Time to first byte in milliseconds (from start to first response byte) */
1831
- ttfbMs?: number;
1832
- /** @description Content transfer duration in milliseconds */
1833
- transferMs?: number;
1834
- /** @description Total request duration in milliseconds (endTimestamp - startTimestamp) */
1835
- durationMs: number;
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: {
@@ -2012,7 +2014,6 @@ export declare class RezoError<T = any> extends Error {
2012
2014
  readonly isSocksError: boolean;
2013
2015
  readonly isTlsError: boolean;
2014
2016
  readonly isRetryable: boolean;
2015
- readonly details: string;
2016
2017
  readonly suggestion: string;
2017
2018
  constructor(message: string, config: RezoConfig, code?: string, request?: RezoHttpRequest, response?: RezoResponse<T>);
2018
2019
  static isRezoError(error: unknown): error is RezoError;
@@ -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 (absolute performance.now() value) */
1821
- startTimestamp: number;
1822
- /** @description Request end timestamp (absolute performance.now() value) */
1823
- endTimestamp: number;
1824
- /** @description DNS lookup duration in milliseconds */
1825
- dnsMs?: number;
1826
- /** @description TCP connection duration in milliseconds */
1827
- tcpMs?: number;
1828
- /** @description TLS handshake duration in milliseconds */
1829
- tlsMs?: number;
1830
- /** @description Time to first byte in milliseconds (from start to first response byte) */
1831
- ttfbMs?: number;
1832
- /** @description Content transfer duration in milliseconds */
1833
- transferMs?: number;
1834
- /** @description Total request duration in milliseconds (endTimestamp - startTimestamp) */
1835
- durationMs: number;
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: {
@@ -2012,7 +2014,6 @@ export declare class RezoError<T = any> extends Error {
2012
2014
  readonly isSocksError: boolean;
2013
2015
  readonly isTlsError: boolean;
2014
2016
  readonly isRetryable: boolean;
2015
- readonly details: string;
2016
2017
  readonly suggestion: string;
2017
2018
  constructor(message: string, config: RezoConfig, code?: string, request?: RezoHttpRequest, response?: RezoResponse<T>);
2018
2019
  static isRezoError(error: unknown): error is RezoError;