@paulirish/trace_engine 0.0.64 → 0.0.66

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 (434) hide show
  1. package/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +1 -1
  2. package/core/platform/ArrayUtilities.d.ts +5 -0
  3. package/core/platform/ArrayUtilities.js +14 -0
  4. package/core/platform/ArrayUtilities.js.map +1 -1
  5. package/core/platform/HostRuntime.d.ts +1 -0
  6. package/core/platform/HostRuntime.js +1 -1
  7. package/core/platform/HostRuntime.js.map +1 -1
  8. package/core/platform/KeyboardUtilities.js +12 -0
  9. package/core/platform/KeyboardUtilities.js.map +1 -1
  10. package/core/platform/MimeType.js +13 -0
  11. package/core/platform/MimeType.js.map +1 -1
  12. package/core/platform/Size.d.ts +12 -0
  13. package/core/platform/Size.js +36 -0
  14. package/core/platform/Size.js.map +1 -0
  15. package/core/platform/StringUtilities.d.ts +50 -0
  16. package/core/platform/StringUtilities.js +145 -4
  17. package/core/platform/StringUtilities.js.map +1 -1
  18. package/core/platform/TypescriptUtilities.d.ts +0 -6
  19. package/core/platform/TypescriptUtilities.js +0 -8
  20. package/core/platform/TypescriptUtilities.js.map +1 -1
  21. package/core/platform/api/HostRuntime.d.ts +30 -3
  22. package/core/platform/api/HostRuntime.js.map +1 -1
  23. package/core/platform/api/api-tsconfig.json +26 -11
  24. package/core/platform/api/api-tsconfig.ref.json +26 -0
  25. package/core/platform/browser/HostRuntime.js +103 -2
  26. package/core/platform/browser/HostRuntime.js.map +1 -1
  27. package/core/platform/browser/browser-tsconfig.json +22 -11
  28. package/core/platform/browser/browser-tsconfig.ref.json +27 -0
  29. package/core/platform/browser/bundle-tsconfig.json +59 -1
  30. package/core/platform/browser/bundle-tsconfig.ref.json +27 -0
  31. package/core/platform/bundle-tsconfig.json +59 -1
  32. package/core/platform/bundle-tsconfig.ref.json +27 -0
  33. package/core/platform/foundation_unittests-tsconfig.json +73 -0
  34. package/core/platform/foundation_unittests-tsconfig.ref.json +40 -0
  35. package/core/platform/foundation_unittests_node_typecheck-tsconfig.json +70 -0
  36. package/core/platform/node/HostRuntime.js +58 -4
  37. package/core/platform/node/HostRuntime.js.map +1 -1
  38. package/core/platform/node/bundle-tsconfig.json +59 -1
  39. package/core/platform/node/bundle-tsconfig.ref.json +27 -0
  40. package/core/platform/node/node-tsconfig.json +16 -9
  41. package/core/platform/node/node-tsconfig.ref.json +27 -0
  42. package/core/platform/platform-tsconfig.json +25 -13
  43. package/core/platform/platform-tsconfig.ref.json +49 -0
  44. package/core/platform/platform.d.ts +2 -1
  45. package/core/platform/platform.js +2 -1
  46. package/core/platform/platform.js.map +1 -1
  47. package/core/platform/platform_node_typecheck-tsconfig.json +18 -14
  48. package/core/platform/platform_node_typecheck.stamp +0 -0
  49. package/generated/protocol.d.ts +941 -718
  50. package/generated/protocol.js +3300 -1
  51. package/locales/af.json +191 -134
  52. package/locales/am.json +191 -134
  53. package/locales/ar.json +194 -137
  54. package/locales/as.json +193 -136
  55. package/locales/az.json +191 -134
  56. package/locales/be.json +189 -132
  57. package/locales/bg.json +190 -133
  58. package/locales/bn.json +191 -134
  59. package/locales/bs.json +189 -132
  60. package/locales/ca.json +193 -136
  61. package/locales/cs.json +185 -128
  62. package/locales/cy.json +191 -134
  63. package/locales/da.json +189 -132
  64. package/locales/de.json +189 -132
  65. package/locales/el.json +188 -131
  66. package/locales/en-GB.json +193 -136
  67. package/locales/en-US.json +165 -141
  68. package/locales/en-XL.json +165 -141
  69. package/locales/es-419.json +187 -130
  70. package/locales/es.json +186 -129
  71. package/locales/et.json +161 -104
  72. package/locales/eu.json +188 -131
  73. package/locales/fa.json +191 -134
  74. package/locales/fi.json +188 -131
  75. package/locales/fil.json +191 -134
  76. package/locales/fr-CA.json +191 -134
  77. package/locales/fr.json +187 -130
  78. package/locales/gl.json +190 -133
  79. package/locales/gu.json +192 -135
  80. package/locales/he.json +193 -136
  81. package/locales/hi.json +193 -136
  82. package/locales/hr.json +190 -133
  83. package/locales/hu.json +148 -91
  84. package/locales/hy.json +184 -127
  85. package/locales/id.json +190 -133
  86. package/locales/is.json +186 -129
  87. package/locales/it.json +190 -133
  88. package/locales/ja.json +187 -130
  89. package/locales/ka.json +193 -136
  90. package/locales/kk.json +98 -41
  91. package/locales/km.json +191 -134
  92. package/locales/kn.json +194 -137
  93. package/locales/ko.json +79 -22
  94. package/locales/ky.json +192 -135
  95. package/locales/lo.json +191 -134
  96. package/locales/lt.json +189 -132
  97. package/locales/lv.json +126 -69
  98. package/locales/mk.json +191 -134
  99. package/locales/ml.json +187 -130
  100. package/locales/mn.json +187 -130
  101. package/locales/mr.json +189 -132
  102. package/locales/ms.json +190 -133
  103. package/locales/my.json +192 -135
  104. package/locales/ne.json +189 -132
  105. package/locales/nl.json +186 -129
  106. package/locales/no.json +188 -131
  107. package/locales/or.json +189 -132
  108. package/locales/pa.json +190 -133
  109. package/locales/pl.json +190 -133
  110. package/locales/pt-PT.json +189 -132
  111. package/locales/pt.json +191 -134
  112. package/locales/ro.json +186 -129
  113. package/locales/ru.json +110 -53
  114. package/locales/si.json +191 -134
  115. package/locales/sk.json +190 -133
  116. package/locales/sl.json +186 -129
  117. package/locales/sq.json +187 -130
  118. package/locales/sr-Latn.json +187 -130
  119. package/locales/sr.json +187 -130
  120. package/locales/sv.json +189 -132
  121. package/locales/sw.json +195 -138
  122. package/locales/ta.json +190 -133
  123. package/locales/te.json +193 -136
  124. package/locales/th.json +148 -91
  125. package/locales/tr.json +188 -131
  126. package/locales/uk.json +186 -129
  127. package/locales/ur.json +188 -131
  128. package/locales/uz.json +185 -128
  129. package/locales/vi.json +196 -139
  130. package/locales/zh-HK.json +187 -130
  131. package/locales/zh-TW.json +190 -133
  132. package/locales/zh.json +189 -132
  133. package/locales/zu.json +193 -136
  134. package/models/cpu_profile/bundle-tsconfig.json +59 -1
  135. package/models/cpu_profile/bundle-tsconfig.ref.json +27 -0
  136. package/models/cpu_profile/cpu_profile-tsconfig.json +24 -16
  137. package/models/cpu_profile/cpu_profile-tsconfig.ref.json +31 -0
  138. package/models/cpu_profile/cpu_profile_node_typecheck-tsconfig.json +60 -0
  139. package/models/cpu_profile/cpu_profile_node_typecheck.stamp +0 -0
  140. package/models/{trace/devtools_entrypoint-bundle-typescript-tsconfig.json → cpu_profile/foundation_unittests-tsconfig.json} +27 -30
  141. package/models/cpu_profile/foundation_unittests-tsconfig.ref.json +30 -0
  142. package/models/cpu_profile/foundation_unittests_node_typecheck-tsconfig.json +60 -0
  143. package/models/trace/EntityMapper.js +1 -1
  144. package/models/trace/EntityMapper.js.map +1 -1
  145. package/models/trace/LanternComputationData.js +7 -0
  146. package/models/trace/LanternComputationData.js.map +1 -1
  147. package/models/trace/ModelImpl.d.ts +1 -5
  148. package/models/trace/ModelImpl.js +11 -0
  149. package/models/trace/ModelImpl.js.map +1 -1
  150. package/models/trace/Name.js +5 -5
  151. package/models/trace/Name.js.map +1 -1
  152. package/models/trace/Processor.d.ts +2 -6
  153. package/models/trace/Processor.js +77 -15
  154. package/models/trace/Processor.js.map +1 -1
  155. package/models/trace/Styles.js +128 -116
  156. package/models/trace/Styles.js.map +1 -1
  157. package/models/trace/bundle-tsconfig.json +77 -1
  158. package/models/trace/bundle-tsconfig.ref.json +45 -0
  159. package/models/trace/extras/StackTraceForEvent.d.ts +1 -1
  160. package/models/trace/extras/StackTraceForEvent.js.map +1 -1
  161. package/models/trace/extras/ThirdParties.js +7 -7
  162. package/models/trace/extras/ThirdParties.js.map +1 -1
  163. package/models/trace/extras/TraceTree.js +23 -3
  164. package/models/trace/extras/TraceTree.js.map +1 -1
  165. package/models/trace/extras/bundle-tsconfig.json +59 -1
  166. package/models/trace/extras/bundle-tsconfig.ref.json +27 -0
  167. package/models/trace/extras/extras-tsconfig.json +28 -20
  168. package/models/trace/extras/extras-tsconfig.ref.json +49 -0
  169. package/models/trace/extras/extras_node_typecheck-tsconfig.json +78 -0
  170. package/models/trace/extras/extras_node_typecheck.stamp +0 -0
  171. package/models/trace/extras/foundation_unittests-tsconfig.json +91 -0
  172. package/models/trace/extras/foundation_unittests-tsconfig.ref.json +58 -0
  173. package/models/trace/extras/foundation_unittests_node_typecheck-tsconfig.json +88 -0
  174. package/models/trace/foundation_unittests-tsconfig.json +70 -0
  175. package/models/trace/foundation_unittests-tsconfig.ref.json +37 -0
  176. package/models/trace/foundation_unittests_node_typecheck-tsconfig.json +67 -0
  177. package/models/trace/handlers/AsyncJSCallsHandler.js.map +1 -1
  178. package/models/trace/handlers/ExtensionTraceDataHandler.js +1 -1
  179. package/models/trace/handlers/ExtensionTraceDataHandler.js.map +1 -1
  180. package/models/trace/handlers/FlowsHandler.js.map +1 -1
  181. package/models/trace/handlers/FramesHandler.d.ts +1 -2
  182. package/models/trace/handlers/FramesHandler.js +23 -18
  183. package/models/trace/handlers/FramesHandler.js.map +1 -1
  184. package/models/trace/handlers/LayerTreeHandler.js +3 -3
  185. package/models/trace/handlers/LayerTreeHandler.js.map +1 -1
  186. package/models/trace/handlers/LayoutShiftsHandler.d.ts +2 -2
  187. package/models/trace/handlers/LayoutShiftsHandler.js +17 -18
  188. package/models/trace/handlers/LayoutShiftsHandler.js.map +1 -1
  189. package/models/trace/handlers/MetaHandler.d.ts +2 -3
  190. package/models/trace/handlers/MetaHandler.js +38 -7
  191. package/models/trace/handlers/MetaHandler.js.map +1 -1
  192. package/models/trace/handlers/ModelHandlers.d.ts +0 -1
  193. package/models/trace/handlers/ModelHandlers.js +0 -1
  194. package/models/trace/handlers/ModelHandlers.js.map +1 -1
  195. package/models/trace/handlers/NetworkRequestsHandler.js +13 -11
  196. package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
  197. package/models/trace/handlers/PageLoadMetricsHandler.d.ts +2 -0
  198. package/models/trace/handlers/PageLoadMetricsHandler.js +43 -4
  199. package/models/trace/handlers/PageLoadMetricsHandler.js.map +1 -1
  200. package/models/trace/handlers/RendererHandler.js +19 -20
  201. package/models/trace/handlers/RendererHandler.js.map +1 -1
  202. package/models/trace/handlers/SamplesHandler.js.map +1 -1
  203. package/models/trace/handlers/ScreenshotsHandler.js +1 -43
  204. package/models/trace/handlers/ScreenshotsHandler.js.map +1 -1
  205. package/models/trace/handlers/Threads.d.ts +1 -3
  206. package/models/trace/handlers/Threads.js +4 -8
  207. package/models/trace/handlers/Threads.js.map +1 -1
  208. package/models/trace/handlers/UserInteractionsHandler.js.map +1 -1
  209. package/models/trace/handlers/UserTimingsHandler.d.ts +1 -1
  210. package/models/trace/handlers/UserTimingsHandler.js +16 -6
  211. package/models/trace/handlers/UserTimingsHandler.js.map +1 -1
  212. package/models/trace/handlers/WarningsHandler.js.map +1 -1
  213. package/models/trace/handlers/bundle-tsconfig.json +59 -1
  214. package/models/trace/handlers/bundle-tsconfig.ref.json +27 -0
  215. package/models/trace/handlers/foundation_unittests-tsconfig.json +102 -0
  216. package/models/trace/handlers/foundation_unittests-tsconfig.ref.json +69 -0
  217. package/models/trace/handlers/foundation_unittests_node_typecheck-tsconfig.json +99 -0
  218. package/models/trace/handlers/handlers-tsconfig.json +30 -23
  219. package/models/trace/handlers/handlers-tsconfig.ref.json +80 -0
  220. package/models/trace/handlers/handlers_node_typecheck-tsconfig.json +109 -0
  221. package/models/trace/handlers/handlers_node_typecheck.stamp +0 -0
  222. package/models/trace/helpers/Network.d.ts +3 -1
  223. package/models/trace/helpers/Network.js.map +1 -1
  224. package/models/trace/helpers/SamplesIntegrator.js +22 -6
  225. package/models/trace/helpers/SamplesIntegrator.js.map +1 -1
  226. package/models/trace/helpers/SyntheticEvents.d.ts +7 -0
  227. package/models/trace/helpers/SyntheticEvents.js +20 -1
  228. package/models/trace/helpers/SyntheticEvents.js.map +1 -1
  229. package/models/trace/helpers/Timing.js +14 -1
  230. package/models/trace/helpers/Timing.js.map +1 -1
  231. package/models/trace/helpers/Trace.js.map +1 -1
  232. package/models/trace/helpers/bundle-tsconfig.json +59 -1
  233. package/models/trace/helpers/bundle-tsconfig.ref.json +27 -0
  234. package/models/trace/helpers/foundation_unittests-tsconfig.json +73 -0
  235. package/models/trace/helpers/foundation_unittests-tsconfig.ref.json +40 -0
  236. package/models/trace/helpers/foundation_unittests_node_typecheck-tsconfig.json +70 -0
  237. package/models/trace/helpers/helpers-tsconfig.json +27 -22
  238. package/models/trace/helpers/helpers-tsconfig.ref.json +45 -0
  239. package/models/trace/helpers/helpers_node_typecheck-tsconfig.json +74 -0
  240. package/models/trace/helpers/helpers_node_typecheck.stamp +0 -0
  241. package/models/trace/insights/CLSCulprits.d.ts +18 -15
  242. package/models/trace/insights/CLSCulprits.js +7 -6
  243. package/models/trace/insights/CLSCulprits.js.map +1 -1
  244. package/models/trace/insights/Cache.d.ts +8 -7
  245. package/models/trace/insights/Cache.js.map +1 -1
  246. package/models/trace/insights/CharacterSet.d.ts +10 -9
  247. package/models/trace/insights/CharacterSet.js +4 -4
  248. package/models/trace/insights/CharacterSet.js.map +1 -1
  249. package/models/trace/insights/Common.d.ts +2 -1
  250. package/models/trace/insights/Common.js +32 -3
  251. package/models/trace/insights/Common.js.map +1 -1
  252. package/models/trace/insights/DOMSize.d.ts +15 -14
  253. package/models/trace/insights/DOMSize.js +2 -2
  254. package/models/trace/insights/DOMSize.js.map +1 -1
  255. package/models/trace/insights/DocumentLatency.d.ts +13 -12
  256. package/models/trace/insights/DocumentLatency.js +4 -4
  257. package/models/trace/insights/DocumentLatency.js.map +1 -1
  258. package/models/trace/insights/DuplicatedJavaScript.d.ts +16 -7
  259. package/models/trace/insights/DuplicatedJavaScript.js +11 -3
  260. package/models/trace/insights/DuplicatedJavaScript.js.map +1 -1
  261. package/models/trace/insights/FontDisplay.d.ts +19 -9
  262. package/models/trace/insights/FontDisplay.js +13 -3
  263. package/models/trace/insights/FontDisplay.js.map +1 -1
  264. package/models/trace/insights/ForcedReflow.d.ts +13 -13
  265. package/models/trace/insights/ForcedReflow.js +4 -4
  266. package/models/trace/insights/ForcedReflow.js.map +1 -1
  267. package/models/trace/insights/INPBreakdown.d.ts +12 -12
  268. package/models/trace/insights/INPBreakdown.js +1 -1
  269. package/models/trace/insights/INPBreakdown.js.map +1 -1
  270. package/models/trace/insights/ImageDelivery.d.ts +13 -12
  271. package/models/trace/insights/ImageDelivery.js +5 -5
  272. package/models/trace/insights/ImageDelivery.js.map +1 -1
  273. package/models/trace/insights/LCPBreakdown.d.ts +13 -12
  274. package/models/trace/insights/LCPBreakdown.js +3 -3
  275. package/models/trace/insights/LCPBreakdown.js.map +1 -1
  276. package/models/trace/insights/LCPDiscovery.d.ts +14 -13
  277. package/models/trace/insights/LCPDiscovery.js +7 -7
  278. package/models/trace/insights/LCPDiscovery.js.map +1 -1
  279. package/models/trace/insights/LegacyJavaScript.d.ts +16 -7
  280. package/models/trace/insights/LegacyJavaScript.js +11 -3
  281. package/models/trace/insights/LegacyJavaScript.js.map +1 -1
  282. package/models/trace/insights/ModernHTTP.d.ts +10 -10
  283. package/models/trace/insights/ModernHTTP.js +9 -5
  284. package/models/trace/insights/ModernHTTP.js.map +1 -1
  285. package/models/trace/insights/NetworkDependencyTree.d.ts +33 -28
  286. package/models/trace/insights/NetworkDependencyTree.js +17 -13
  287. package/models/trace/insights/NetworkDependencyTree.js.map +1 -1
  288. package/models/trace/insights/RenderBlocking.d.ts +8 -7
  289. package/models/trace/insights/RenderBlocking.js +3 -5
  290. package/models/trace/insights/RenderBlocking.js.map +1 -1
  291. package/models/trace/insights/SlowCSSSelector.d.ts +17 -16
  292. package/models/trace/insights/SlowCSSSelector.js +23 -20
  293. package/models/trace/insights/SlowCSSSelector.js.map +1 -1
  294. package/models/trace/insights/ThirdParties.d.ts +22 -13
  295. package/models/trace/insights/ThirdParties.js +19 -8
  296. package/models/trace/insights/ThirdParties.js.map +1 -1
  297. package/models/trace/insights/Viewport.d.ts +8 -6
  298. package/models/trace/insights/Viewport.js +4 -2
  299. package/models/trace/insights/Viewport.js.map +1 -1
  300. package/models/trace/insights/bundle-tsconfig.json +59 -1
  301. package/models/trace/insights/bundle-tsconfig.ref.json +27 -0
  302. package/models/trace/insights/foundation_unittests-tsconfig.json +98 -0
  303. package/models/trace/insights/foundation_unittests-tsconfig.ref.json +65 -0
  304. package/models/trace/insights/foundation_unittests_node_typecheck-tsconfig.json +95 -0
  305. package/models/trace/insights/insights-tsconfig.json +34 -23
  306. package/models/trace/insights/insights-tsconfig.ref.json +82 -0
  307. package/models/trace/insights/insights_node_typecheck-tsconfig.json +111 -0
  308. package/models/trace/insights/insights_node_typecheck.stamp +0 -0
  309. package/models/trace/insights/types.d.ts +9 -6
  310. package/models/trace/insights/types.js.map +1 -1
  311. package/models/trace/lantern/bundle-tsconfig.json +71 -1
  312. package/models/trace/lantern/bundle-tsconfig.ref.json +39 -0
  313. package/models/trace/lantern/core/NetworkAnalyzer.d.ts +5 -4
  314. package/models/trace/lantern/core/NetworkAnalyzer.js +21 -22
  315. package/models/trace/lantern/core/NetworkAnalyzer.js.map +1 -1
  316. package/models/trace/lantern/core/bundle-tsconfig.json +59 -1
  317. package/models/trace/lantern/core/bundle-tsconfig.ref.json +27 -0
  318. package/models/trace/lantern/core/core-tsconfig.json +23 -12
  319. package/models/trace/lantern/core/core-tsconfig.ref.json +28 -0
  320. package/models/trace/lantern/core/core_node_typecheck-tsconfig.json +57 -0
  321. package/models/trace/lantern/core/core_node_typecheck.stamp +0 -0
  322. package/models/trace/lantern/core/{devtools_entrypoint-bundle-typescript-tsconfig.json → foundation_unittests-tsconfig.json} +34 -13
  323. package/models/trace/lantern/core/foundation_unittests-tsconfig.ref.json +36 -0
  324. package/models/trace/lantern/core/foundation_unittests_node_typecheck-tsconfig.json +66 -0
  325. package/models/trace/lantern/graph/BaseNode.d.ts +2 -2
  326. package/models/trace/lantern/graph/BaseNode.js.map +1 -1
  327. package/models/trace/lantern/graph/CPUNode.d.ts +4 -2
  328. package/models/trace/lantern/graph/CPUNode.js +23 -7
  329. package/models/trace/lantern/graph/CPUNode.js.map +1 -1
  330. package/models/trace/lantern/graph/NetworkNode.js +12 -0
  331. package/models/trace/lantern/graph/NetworkNode.js.map +1 -1
  332. package/models/trace/lantern/graph/PageDependencyGraph.js +26 -4
  333. package/models/trace/lantern/graph/PageDependencyGraph.js.map +1 -1
  334. package/models/trace/lantern/graph/bundle-tsconfig.json +59 -1
  335. package/models/trace/lantern/graph/bundle-tsconfig.ref.json +27 -0
  336. package/models/trace/lantern/graph/{devtools_entrypoint-bundle-typescript-tsconfig.json → foundation_unittests-tsconfig.json} +26 -13
  337. package/models/trace/lantern/graph/foundation_unittests-tsconfig.ref.json +28 -0
  338. package/models/trace/lantern/graph/foundation_unittests_node_typecheck-tsconfig.json +58 -0
  339. package/models/trace/lantern/graph/graph-tsconfig.json +24 -13
  340. package/models/trace/lantern/graph/graph-tsconfig.ref.json +33 -0
  341. package/models/trace/lantern/graph/graph_node_typecheck-tsconfig.json +62 -0
  342. package/models/trace/lantern/graph/graph_node_typecheck.stamp +0 -0
  343. package/models/trace/lantern/metrics/TotalBlockingTime.js +1 -1
  344. package/models/trace/lantern/metrics/TotalBlockingTime.js.map +1 -1
  345. package/models/trace/lantern/metrics/bundle-tsconfig.json +59 -1
  346. package/models/trace/lantern/metrics/bundle-tsconfig.ref.json +27 -0
  347. package/models/trace/lantern/metrics/foundation_unittests-tsconfig.json +76 -0
  348. package/models/trace/lantern/metrics/foundation_unittests-tsconfig.ref.json +43 -0
  349. package/models/trace/lantern/metrics/foundation_unittests_node_typecheck-tsconfig.json +73 -0
  350. package/models/trace/lantern/metrics/metrics-tsconfig.json +26 -15
  351. package/models/trace/lantern/metrics/metrics-tsconfig.ref.json +43 -0
  352. package/models/trace/lantern/metrics/metrics_node_typecheck-tsconfig.json +72 -0
  353. package/models/trace/lantern/metrics/metrics_node_typecheck.stamp +0 -0
  354. package/models/trace/lantern/simulation/ConnectionPool.js +4 -4
  355. package/models/trace/lantern/simulation/ConnectionPool.js.map +1 -1
  356. package/models/trace/lantern/simulation/Constants.d.ts +29 -28
  357. package/models/trace/lantern/simulation/Constants.js +3 -1
  358. package/models/trace/lantern/simulation/Constants.js.map +1 -1
  359. package/models/trace/lantern/simulation/DNSCache.js.map +1 -1
  360. package/models/trace/lantern/simulation/Simulator.js +6 -2
  361. package/models/trace/lantern/simulation/Simulator.js.map +1 -1
  362. package/models/trace/lantern/simulation/TCPConnection.d.ts +4 -4
  363. package/models/trace/lantern/simulation/TCPConnection.js +12 -12
  364. package/models/trace/lantern/simulation/TCPConnection.js.map +1 -1
  365. package/models/trace/lantern/simulation/bundle-tsconfig.json +59 -1
  366. package/models/trace/lantern/simulation/bundle-tsconfig.ref.json +27 -0
  367. package/models/trace/lantern/simulation/foundation_unittests-tsconfig.json +75 -0
  368. package/models/trace/lantern/simulation/foundation_unittests-tsconfig.ref.json +42 -0
  369. package/models/trace/lantern/simulation/foundation_unittests_node_typecheck-tsconfig.json +72 -0
  370. package/models/trace/lantern/simulation/simulation-tsconfig.json +25 -14
  371. package/models/trace/lantern/simulation/simulation-tsconfig.ref.json +38 -0
  372. package/models/trace/lantern/simulation/simulation_node_typecheck-tsconfig.json +67 -0
  373. package/models/trace/lantern/simulation/simulation_node_typecheck.stamp +0 -0
  374. package/models/trace/lantern/{metrics/devtools_entrypoint-bundle-typescript-tsconfig.json → testing/bundle-tsconfig.json} +25 -13
  375. package/models/trace/lantern/testing/bundle-tsconfig.ref.json +27 -0
  376. package/models/trace/lantern/{simulation/devtools_entrypoint-bundle-typescript-tsconfig.json → testing/testing-tsconfig.json} +28 -13
  377. package/models/trace/lantern/testing/testing-tsconfig.ref.json +30 -0
  378. package/models/trace/lantern/types/Lantern.d.ts +27 -19
  379. package/models/trace/lantern/types/Lantern.js.map +1 -1
  380. package/models/trace/lantern/types/bundle-tsconfig.json +59 -1
  381. package/models/trace/lantern/types/bundle-tsconfig.ref.json +27 -0
  382. package/models/trace/lantern/types/types-tsconfig.json +23 -12
  383. package/models/trace/lantern/types/types-tsconfig.ref.json +27 -0
  384. package/models/trace/lantern/types/{devtools_entrypoint-bundle-typescript-tsconfig.json → types_node_typecheck-tsconfig.json} +25 -17
  385. package/models/trace/lantern/types/types_node_typecheck.stamp +0 -0
  386. package/models/trace/trace-tsconfig.json +31 -32
  387. package/models/trace/trace-tsconfig.ref.json +57 -0
  388. package/models/trace/trace_node_typecheck-tsconfig.json +86 -0
  389. package/models/trace/trace_node_typecheck.stamp +0 -0
  390. package/models/trace/types/Configuration.d.ts +11 -0
  391. package/models/trace/types/Configuration.js +1 -0
  392. package/models/trace/types/Configuration.js.map +1 -1
  393. package/models/trace/types/Extensions.d.ts +1 -1
  394. package/models/trace/types/File.d.ts +7 -1
  395. package/models/trace/types/File.js.map +1 -1
  396. package/models/trace/types/Overlays.d.ts +13 -3
  397. package/models/trace/types/Overlays.js.map +1 -1
  398. package/models/trace/types/TraceEvents.d.ts +39 -9
  399. package/models/trace/types/TraceEvents.js +103 -3
  400. package/models/trace/types/TraceEvents.js.map +1 -1
  401. package/models/trace/types/bundle-tsconfig.json +59 -1
  402. package/models/trace/types/bundle-tsconfig.ref.json +27 -0
  403. package/{core/platform/api/api_node_typecheck-tsconfig.json → models/trace/types/foundation_unittests-tsconfig.json} +32 -13
  404. package/models/trace/types/foundation_unittests-tsconfig.ref.json +34 -0
  405. package/models/trace/types/foundation_unittests_node_typecheck-tsconfig.json +64 -0
  406. package/models/trace/types/types-tsconfig.json +27 -19
  407. package/models/trace/types/types-tsconfig.ref.json +44 -0
  408. package/models/trace/types/types_node_typecheck-tsconfig.json +73 -0
  409. package/models/trace/types/types_node_typecheck.stamp +0 -0
  410. package/package.json +2 -3
  411. package/test/test-trace-engine.mjs +1 -1
  412. package/{models/cpu_profile/devtools_entrypoint-bundle-typescript-tsconfig.json → third_party/legacy-javascript/bundle-tsconfig.json} +24 -13
  413. package/third_party/legacy-javascript/bundle-tsconfig.ref.json +27 -0
  414. package/third_party/legacy-javascript/legacy-javascript-tsconfig.ref.json +15 -0
  415. package/third_party/legacy-javascript/legacy-javascript.d.ts +2 -1
  416. package/third_party/legacy-javascript/legacy-javascript.js +3 -1
  417. package/third_party/legacy-javascript/legacy-javascript.js.map +1 -0
  418. package/third_party/legacy-javascript/lib/legacy-javascript.d.ts +18 -0
  419. package/third_party/legacy-javascript/lib/legacy-javascript.js +1119 -0
  420. package/core/platform/api/bundle-tsconfig.json +0 -1
  421. package/core/platform/api/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -48
  422. package/core/platform/browser/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -48
  423. package/core/platform/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -48
  424. package/core/platform/node/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -48
  425. package/models/trace/extras/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -48
  426. package/models/trace/handlers/AuctionWorkletsHandler.d.ts +0 -8
  427. package/models/trace/handlers/AuctionWorkletsHandler.js +0 -163
  428. package/models/trace/handlers/AuctionWorkletsHandler.js.map +0 -1
  429. package/models/trace/handlers/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -48
  430. package/models/trace/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -48
  431. package/models/trace/insights/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -48
  432. package/models/trace/lantern/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -48
  433. package/models/trace/lantern/lantern-tsconfig.json +0 -59
  434. package/models/trace/types/devtools_entrypoint-bundle-typescript-tsconfig.json +0 -48
@@ -0,0 +1,99 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": false,
4
+ "allowSyntheticDefaultImports": true,
5
+ "checkJs": false,
6
+ "composite": false,
7
+ "declaration": false,
8
+ "disableSourceOfProjectReferenceRedirect": true,
9
+ "experimentalDecorators": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "incremental": false,
12
+ "inlineSources": true,
13
+ "lib": [
14
+ "ES2023",
15
+ "ES2024.Promise",
16
+ "ESNext.Iterator",
17
+ "ESNext.Collection",
18
+ "ESNext.Array"
19
+ ],
20
+ "module": "esnext",
21
+ "moduleResolution": "bundler",
22
+ "noEmit": true,
23
+ "noEmitOnError": true,
24
+ "noFallthroughCasesInSwitch": true,
25
+ "noImplicitOverride": true,
26
+ "noImplicitReturns": true,
27
+ "outDir": ".",
28
+ "preserveConstEnums": true,
29
+ "rootDir": "../../../../../../../front_end/models/trace/handlers",
30
+ "rootDirs": [
31
+ "../../../../../../../",
32
+ "../../../../"
33
+ ],
34
+ "skipLibCheck": true,
35
+ "sourceMap": true,
36
+ "strict": true,
37
+ "target": "es2023",
38
+ "typeRoots": [
39
+ "../../../../../../../node_modules/@types",
40
+ "../../../../../../../node_modules"
41
+ ],
42
+ "types": [
43
+ "mocha",
44
+ "node",
45
+ "undici-types"
46
+ ],
47
+ "useUnknownInCatchVariables": false
48
+ },
49
+ "files": [
50
+ "../../../../../../../front_end/models/trace/handlers/AnimationFramesHandler.test.ts",
51
+ "../../../../../../../front_end/models/trace/handlers/AnimationHandler.test.ts",
52
+ "../../../../../../../front_end/models/trace/handlers/AsyncJSCallsHandler.test.ts",
53
+ "../../../../../../../front_end/models/trace/handlers/DOMStatsHandler.test.ts",
54
+ "../../../../../../../front_end/models/trace/handlers/ExtensionTraceDataHandler.test.ts",
55
+ "../../../../../../../front_end/models/trace/handlers/FlowsHandler.test.ts",
56
+ "../../../../../../../front_end/models/trace/handlers/FramesHandler.test.ts",
57
+ "../../../../../../../front_end/models/trace/handlers/GPUHandler.test.ts",
58
+ "../../../../../../../front_end/models/trace/handlers/ImagePaintingHandler.test.ts",
59
+ "../../../../../../../front_end/models/trace/handlers/InitiatorsHandler.test.ts",
60
+ "../../../../../../../front_end/models/trace/handlers/InvalidationsHandler.test.ts",
61
+ "../../../../../../../front_end/models/trace/handlers/LargestImagePaintHandler.test.ts",
62
+ "../../../../../../../front_end/models/trace/handlers/LargestTextPaintHandler.test.ts",
63
+ "../../../../../../../front_end/models/trace/handlers/LayerTreeHandler.test.ts",
64
+ "../../../../../../../front_end/models/trace/handlers/LayoutShiftsHandler.test.ts",
65
+ "../../../../../../../front_end/models/trace/handlers/MemoryHandler.test.ts",
66
+ "../../../../../../../front_end/models/trace/handlers/MetaHandler.test.ts",
67
+ "../../../../../../../front_end/models/trace/handlers/NetworkRequestsHandler.test.ts",
68
+ "../../../../../../../front_end/models/trace/handlers/PageFramesHandler.test.ts",
69
+ "../../../../../../../front_end/models/trace/handlers/PageLoadMetricsHandler.test.ts",
70
+ "../../../../../../../front_end/models/trace/handlers/RendererHandler.test.ts",
71
+ "../../../../../../../front_end/models/trace/handlers/SamplesHandler.test.ts",
72
+ "../../../../../../../front_end/models/trace/handlers/ScreenshotsHandler.test.ts",
73
+ "../../../../../../../front_end/models/trace/handlers/ScriptsHandler.test.ts",
74
+ "../../../../../../../front_end/models/trace/handlers/SelectorStatsHandler.test.ts",
75
+ "../../../../../../../front_end/models/trace/handlers/Threads.test.ts",
76
+ "../../../../../../../front_end/models/trace/handlers/UserInteractionsHandler.test.ts",
77
+ "../../../../../../../front_end/models/trace/handlers/UserTimingsHandler.test.ts",
78
+ "../../../../../../../front_end/models/trace/handlers/WarningsHandler.test.ts",
79
+ "../../../../../../../front_end/models/trace/handlers/WorkersHandler.test.ts",
80
+ "../../../../../../../front_end/models/trace/handlers/helpers.test.ts"
81
+ ],
82
+ "references": [
83
+ {
84
+ "path": "../../../core/sdk/bundle-tsconfig.ref.json"
85
+ },
86
+ {
87
+ "path": "../../../generated/generated-tsconfig.ref.json"
88
+ },
89
+ {
90
+ "path": "../bundle-tsconfig.ref.json"
91
+ },
92
+ {
93
+ "path": "../../../testing/testing-tsconfig.ref.json"
94
+ },
95
+ {
96
+ "path": "../../cpu_profile/bundle-tsconfig.ref.json"
97
+ }
98
+ ]
99
+ }
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "allowJs": true,
4
- "checkJs": true,
5
- "composite": true,
6
- "declaration": true,
3
+ "allowJs": false,
4
+ "allowSyntheticDefaultImports": true,
5
+ "checkJs": false,
6
+ "composite": false,
7
+ "declaration": false,
8
+ "disableSourceOfProjectReferenceRedirect": true,
7
9
  "experimentalDecorators": true,
8
10
  "forceConsistentCasingInFileNames": true,
11
+ "incremental": false,
9
12
  "inlineSources": true,
10
13
  "lib": [
11
14
  "dom",
@@ -17,28 +20,34 @@
17
20
  "ESNext.Array"
18
21
  ],
19
22
  "module": "esnext",
23
+ "moduleResolution": "bundler",
20
24
  "noEmitOnError": true,
21
25
  "noFallthroughCasesInSwitch": true,
22
26
  "noImplicitOverride": true,
23
27
  "noImplicitReturns": true,
24
- "noUnusedLocals": false,
25
- "noUnusedParameters": false,
26
28
  "outDir": ".",
29
+ "preserveConstEnums": true,
27
30
  "rootDir": "../../../../../../../front_end/models/trace/handlers",
31
+ "rootDirs": [
32
+ "../../../../../../../",
33
+ "../../../../"
34
+ ],
28
35
  "skipLibCheck": true,
29
36
  "sourceMap": true,
30
37
  "strict": true,
31
- "target": "ES2023",
32
- "tsBuildInfoFile": "handlers-tsconfig.json.tsbuildinfo",
33
- "typeRoots": [],
34
- "types": [],
38
+ "target": "es2023",
39
+ "typeRoots": [
40
+
41
+ ],
42
+ "types": [
43
+
44
+ ],
35
45
  "useUnknownInCatchVariables": false
36
46
  },
37
47
  "files": [
38
48
  "../../../../../../../front_end/models/trace/handlers/AnimationFramesHandler.ts",
39
49
  "../../../../../../../front_end/models/trace/handlers/AnimationHandler.ts",
40
50
  "../../../../../../../front_end/models/trace/handlers/AsyncJSCallsHandler.ts",
41
- "../../../../../../../front_end/models/trace/handlers/AuctionWorkletsHandler.ts",
42
51
  "../../../../../../../front_end/models/trace/handlers/DOMStatsHandler.ts",
43
52
  "../../../../../../../front_end/models/trace/handlers/ExtensionTraceDataHandler.ts",
44
53
  "../../../../../../../front_end/models/trace/handlers/FlowsHandler.ts",
@@ -71,35 +80,33 @@
71
80
  "../../../../../../../front_end/models/trace/handlers/types.ts",
72
81
  "../../../../../../../front_end/legacy/legacy-defs.d.ts",
73
82
  "../../../../../../../front_end/global_typings/global_defs.d.ts",
74
- "../../../../../../../node_modules/@types/filesystem/index.d.ts"
83
+ "../../../../../../../node_modules/@types/filesystem/index.d.ts",
84
+ "../../../../../../../node_modules/@types/filewriter/index.d.ts"
75
85
  ],
76
86
  "references": [
77
87
  {
78
- "path": "../../../core/common/bundle-tsconfig.json"
79
- },
80
- {
81
- "path": "../../../core/platform/bundle-tsconfig.json"
88
+ "path": "../../../core/common/bundle-tsconfig.ref.json"
82
89
  },
83
90
  {
84
- "path": "../../../core/sdk/bundle-tsconfig.json"
91
+ "path": "../../../core/platform/bundle-tsconfig.ref.json"
85
92
  },
86
93
  {
87
- "path": "../../../generated/generated-tsconfig.json"
94
+ "path": "../../../core/sdk/bundle-tsconfig.ref.json"
88
95
  },
89
96
  {
90
- "path": "../../../generated/protocol-tsconfig.json"
97
+ "path": "../../../generated/generated-tsconfig.ref.json"
91
98
  },
92
99
  {
93
- "path": "../../../third_party/third-party-web/bundle-tsconfig.json"
100
+ "path": "../../../third_party/third-party-web/bundle-tsconfig.ref.json"
94
101
  },
95
102
  {
96
- "path": "../../cpu_profile/bundle-tsconfig.json"
103
+ "path": "../../cpu_profile/bundle-tsconfig.ref.json"
97
104
  },
98
105
  {
99
- "path": "../helpers/bundle-tsconfig.json"
106
+ "path": "../helpers/bundle-tsconfig.ref.json"
100
107
  },
101
108
  {
102
- "path": "../types/bundle-tsconfig.json"
109
+ "path": "../types/bundle-tsconfig.ref.json"
103
110
  }
104
111
  ]
105
112
  }
@@ -0,0 +1,80 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "declaration": true,
5
+ "declarationDir": ".",
6
+ "emitDeclarationOnly": true,
7
+ "outDir": ".",
8
+ "rootDir": "../../../../../../../front_end/models/trace/handlers",
9
+ "rootDirs": [
10
+ "../../../../../../../",
11
+ "../../../../"
12
+ ],
13
+ "skipLibCheck": true
14
+ },
15
+ "files": [
16
+ "../../../../../../../front_end/models/trace/handlers/AnimationFramesHandler.ts",
17
+ "../../../../../../../front_end/models/trace/handlers/AnimationHandler.ts",
18
+ "../../../../../../../front_end/models/trace/handlers/AsyncJSCallsHandler.ts",
19
+ "../../../../../../../front_end/models/trace/handlers/DOMStatsHandler.ts",
20
+ "../../../../../../../front_end/models/trace/handlers/ExtensionTraceDataHandler.ts",
21
+ "../../../../../../../front_end/models/trace/handlers/FlowsHandler.ts",
22
+ "../../../../../../../front_end/models/trace/handlers/FramesHandler.ts",
23
+ "../../../../../../../front_end/models/trace/handlers/GPUHandler.ts",
24
+ "../../../../../../../front_end/models/trace/handlers/ImagePaintingHandler.ts",
25
+ "../../../../../../../front_end/models/trace/handlers/InitiatorsHandler.ts",
26
+ "../../../../../../../front_end/models/trace/handlers/InvalidationsHandler.ts",
27
+ "../../../../../../../front_end/models/trace/handlers/LargestImagePaintHandler.ts",
28
+ "../../../../../../../front_end/models/trace/handlers/LargestTextPaintHandler.ts",
29
+ "../../../../../../../front_end/models/trace/handlers/LayerTreeHandler.ts",
30
+ "../../../../../../../front_end/models/trace/handlers/LayoutShiftsHandler.ts",
31
+ "../../../../../../../front_end/models/trace/handlers/MemoryHandler.ts",
32
+ "../../../../../../../front_end/models/trace/handlers/MetaHandler.ts",
33
+ "../../../../../../../front_end/models/trace/handlers/ModelHandlers.ts",
34
+ "../../../../../../../front_end/models/trace/handlers/NetworkRequestsHandler.ts",
35
+ "../../../../../../../front_end/models/trace/handlers/PageFramesHandler.ts",
36
+ "../../../../../../../front_end/models/trace/handlers/PageLoadMetricsHandler.ts",
37
+ "../../../../../../../front_end/models/trace/handlers/RendererHandler.ts",
38
+ "../../../../../../../front_end/models/trace/handlers/SamplesHandler.ts",
39
+ "../../../../../../../front_end/models/trace/handlers/ScreenshotsHandler.ts",
40
+ "../../../../../../../front_end/models/trace/handlers/ScriptsHandler.ts",
41
+ "../../../../../../../front_end/models/trace/handlers/SelectorStatsHandler.ts",
42
+ "../../../../../../../front_end/models/trace/handlers/Threads.ts",
43
+ "../../../../../../../front_end/models/trace/handlers/UserInteractionsHandler.ts",
44
+ "../../../../../../../front_end/models/trace/handlers/UserTimingsHandler.ts",
45
+ "../../../../../../../front_end/models/trace/handlers/WarningsHandler.ts",
46
+ "../../../../../../../front_end/models/trace/handlers/WorkersHandler.ts",
47
+ "../../../../../../../front_end/models/trace/handlers/helpers.ts",
48
+ "../../../../../../../front_end/models/trace/handlers/types.ts",
49
+ "../../../../../../../front_end/legacy/legacy-defs.d.ts",
50
+ "../../../../../../../front_end/global_typings/global_defs.d.ts",
51
+ "../../../../../../../node_modules/@types/filesystem/index.d.ts",
52
+ "../../../../../../../node_modules/@types/filewriter/index.d.ts"
53
+ ],
54
+ "references": [
55
+ {
56
+ "path": "../../../core/common/bundle-tsconfig.ref.json"
57
+ },
58
+ {
59
+ "path": "../../../core/platform/bundle-tsconfig.ref.json"
60
+ },
61
+ {
62
+ "path": "../../../core/sdk/bundle-tsconfig.ref.json"
63
+ },
64
+ {
65
+ "path": "../../../generated/generated-tsconfig.ref.json"
66
+ },
67
+ {
68
+ "path": "../../../third_party/third-party-web/bundle-tsconfig.ref.json"
69
+ },
70
+ {
71
+ "path": "../../cpu_profile/bundle-tsconfig.ref.json"
72
+ },
73
+ {
74
+ "path": "../helpers/bundle-tsconfig.ref.json"
75
+ },
76
+ {
77
+ "path": "../types/bundle-tsconfig.ref.json"
78
+ }
79
+ ]
80
+ }
@@ -0,0 +1,109 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": false,
4
+ "allowSyntheticDefaultImports": true,
5
+ "checkJs": false,
6
+ "composite": false,
7
+ "declaration": false,
8
+ "disableSourceOfProjectReferenceRedirect": true,
9
+ "experimentalDecorators": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "incremental": false,
12
+ "inlineSources": true,
13
+ "lib": [
14
+ "ES2023",
15
+ "ES2024.Promise",
16
+ "ESNext.Iterator",
17
+ "ESNext.Collection",
18
+ "ESNext.Array"
19
+ ],
20
+ "module": "esnext",
21
+ "moduleResolution": "bundler",
22
+ "noEmit": true,
23
+ "noEmitOnError": true,
24
+ "noFallthroughCasesInSwitch": true,
25
+ "noImplicitOverride": true,
26
+ "noImplicitReturns": true,
27
+ "outDir": ".",
28
+ "preserveConstEnums": true,
29
+ "rootDir": "../../../../../../../front_end/models/trace/handlers",
30
+ "rootDirs": [
31
+ "../../../../../../../",
32
+ "../../../../"
33
+ ],
34
+ "skipLibCheck": true,
35
+ "sourceMap": true,
36
+ "strict": true,
37
+ "target": "es2023",
38
+ "typeRoots": [
39
+ "../../../../../../../node_modules/@types",
40
+ "../../../../../../../node_modules"
41
+ ],
42
+ "types": [
43
+ "node",
44
+ "undici-types"
45
+ ],
46
+ "useUnknownInCatchVariables": false
47
+ },
48
+ "files": [
49
+ "../../../../../../../front_end/models/trace/handlers/AnimationFramesHandler.ts",
50
+ "../../../../../../../front_end/models/trace/handlers/AnimationHandler.ts",
51
+ "../../../../../../../front_end/models/trace/handlers/AsyncJSCallsHandler.ts",
52
+ "../../../../../../../front_end/models/trace/handlers/DOMStatsHandler.ts",
53
+ "../../../../../../../front_end/models/trace/handlers/ExtensionTraceDataHandler.ts",
54
+ "../../../../../../../front_end/models/trace/handlers/FlowsHandler.ts",
55
+ "../../../../../../../front_end/models/trace/handlers/FramesHandler.ts",
56
+ "../../../../../../../front_end/models/trace/handlers/GPUHandler.ts",
57
+ "../../../../../../../front_end/models/trace/handlers/ImagePaintingHandler.ts",
58
+ "../../../../../../../front_end/models/trace/handlers/InitiatorsHandler.ts",
59
+ "../../../../../../../front_end/models/trace/handlers/InvalidationsHandler.ts",
60
+ "../../../../../../../front_end/models/trace/handlers/LargestImagePaintHandler.ts",
61
+ "../../../../../../../front_end/models/trace/handlers/LargestTextPaintHandler.ts",
62
+ "../../../../../../../front_end/models/trace/handlers/LayerTreeHandler.ts",
63
+ "../../../../../../../front_end/models/trace/handlers/LayoutShiftsHandler.ts",
64
+ "../../../../../../../front_end/models/trace/handlers/MemoryHandler.ts",
65
+ "../../../../../../../front_end/models/trace/handlers/MetaHandler.ts",
66
+ "../../../../../../../front_end/models/trace/handlers/ModelHandlers.ts",
67
+ "../../../../../../../front_end/models/trace/handlers/NetworkRequestsHandler.ts",
68
+ "../../../../../../../front_end/models/trace/handlers/PageFramesHandler.ts",
69
+ "../../../../../../../front_end/models/trace/handlers/PageLoadMetricsHandler.ts",
70
+ "../../../../../../../front_end/models/trace/handlers/RendererHandler.ts",
71
+ "../../../../../../../front_end/models/trace/handlers/SamplesHandler.ts",
72
+ "../../../../../../../front_end/models/trace/handlers/ScreenshotsHandler.ts",
73
+ "../../../../../../../front_end/models/trace/handlers/ScriptsHandler.ts",
74
+ "../../../../../../../front_end/models/trace/handlers/SelectorStatsHandler.ts",
75
+ "../../../../../../../front_end/models/trace/handlers/Threads.ts",
76
+ "../../../../../../../front_end/models/trace/handlers/UserInteractionsHandler.ts",
77
+ "../../../../../../../front_end/models/trace/handlers/UserTimingsHandler.ts",
78
+ "../../../../../../../front_end/models/trace/handlers/WarningsHandler.ts",
79
+ "../../../../../../../front_end/models/trace/handlers/WorkersHandler.ts",
80
+ "../../../../../../../front_end/models/trace/handlers/helpers.ts",
81
+ "../../../../../../../front_end/models/trace/handlers/types.ts"
82
+ ],
83
+ "references": [
84
+ {
85
+ "path": "../../../core/common/bundle-tsconfig.ref.json"
86
+ },
87
+ {
88
+ "path": "../../../core/platform/bundle-tsconfig.ref.json"
89
+ },
90
+ {
91
+ "path": "../../../core/sdk/bundle-tsconfig.ref.json"
92
+ },
93
+ {
94
+ "path": "../../../generated/generated-tsconfig.ref.json"
95
+ },
96
+ {
97
+ "path": "../../../third_party/third-party-web/bundle-tsconfig.ref.json"
98
+ },
99
+ {
100
+ "path": "../../cpu_profile/bundle-tsconfig.ref.json"
101
+ },
102
+ {
103
+ "path": "../helpers/bundle-tsconfig.ref.json"
104
+ },
105
+ {
106
+ "path": "../types/bundle-tsconfig.ref.json"
107
+ }
108
+ ]
109
+ }
@@ -1,5 +1,6 @@
1
1
  import * as Protocol from '../../../generated/protocol.js';
2
- import type { SyntheticNetworkRequest } from '../types/TraceEvents.js';
2
+ import type * as Types from '../types/types.js';
3
+ type SyntheticNetworkRequest = Types.Events.SyntheticNetworkRequest;
3
4
  export declare function isSyntheticNetworkRequestEventRenderBlocking(event: SyntheticNetworkRequest): boolean;
4
5
  export declare function isSyntheticNetworkRequestHighPriority(event: SyntheticNetworkRequest): boolean;
5
6
  export interface CacheControl {
@@ -24,3 +25,4 @@ export declare function parseCacheControl(header: string | null): CacheControl |
24
25
  * https://github.com/GoogleChrome/lighthouse/pull/11766#discussion_r582340683
25
26
  */
26
27
  export declare function isSyntheticNetworkRequestLocalhost(event: SyntheticNetworkRequest): boolean;
28
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Network.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/helpers/Network.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2024 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\nimport * as Protocol from '../../../generated/protocol.js';\nimport type {RenderBlocking, SyntheticNetworkRequest} from '../types/TraceEvents.js';\n\n// Important: we purposefully treat `potentially_blocking` as\n// non-render-blocking here because:\n// 1. An async script can run on the main thread at any point, including before\n// the page is loaded\n// 2. An async script will never block the parsing and rendering process of the\n// browser.\n// 3. Therefore, from a developer's point of view, there is nothing more they\n// can do if they've put `async` on, and within the context of Insights, we\n// shouldn't report an async script as render-blocking.\n// In the future we may want to consider suggesting the use of `defer` over\n// `async`, as it doesn't have this concern, but for now we'll allow `async`\n// and not report it as an issue.\nconst NON_RENDER_BLOCKING_VALUES = new Set<RenderBlocking>([\n 'non_blocking',\n 'dynamically_injected_non_blocking',\n 'potentially_blocking',\n]);\n\nexport function isSyntheticNetworkRequestEventRenderBlocking(event: SyntheticNetworkRequest): boolean {\n return !NON_RENDER_BLOCKING_VALUES.has(event.args.data.renderBlocking);\n}\n\nconst HIGH_NETWORK_PRIORITIES = new Set<Protocol.Network.ResourcePriority>([\n Protocol.Network.ResourcePriority.VeryHigh,\n Protocol.Network.ResourcePriority.High,\n Protocol.Network.ResourcePriority.Medium,\n]);\n\nexport function isSyntheticNetworkRequestHighPriority(event: SyntheticNetworkRequest): boolean {\n return HIGH_NETWORK_PRIORITIES.has(event.args.data.priority);\n}\n\nexport interface CacheControl {\n 'max-age'?: number;\n 'no-cache'?: boolean;\n 'no-store'?: boolean;\n 'must-revalidate'?: boolean;\n // eslint-disable-next-line @stylistic/quote-props\n 'private'?: boolean;\n}\n\nexport const CACHEABLE_STATUS_CODES = new Set([200, 203, 206]);\n\n/** @type {Set<LH.Crdp.Network.ResourceType>} */\nexport const STATIC_RESOURCE_TYPES = new Set([\n Protocol.Network.ResourceType.Font,\n Protocol.Network.ResourceType.Image,\n Protocol.Network.ResourceType.Media,\n Protocol.Network.ResourceType.Script,\n Protocol.Network.ResourceType.Stylesheet,\n]);\n\nexport const NON_NETWORK_SCHEMES = [\n 'blob', // @see https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n 'data', // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n 'intent', // @see https://developer.chrome.com/docs/multidevice/android/intents/\n 'file', // @see https://en.wikipedia.org/wiki/File_URI_scheme\n 'filesystem', // @see https://developer.mozilla.org/en-US/docs/Web/API/FileSystem\n 'chrome-extension',\n];\n\n/**\n * Parses Cache-Control directives based on https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control\n * eg. 'no-cache, no-store, max-age=0, no-transform, private' will return\n * {no-cache: true, no-store: true, max-age: 0, no-transform: true, private: true}\n */\nexport function parseCacheControl(header: string|null): CacheControl|null {\n if (!header) {\n return null;\n }\n\n const directives = header.split(',').map(directive => directive.trim());\n const cacheControlOptions: CacheControl = {};\n\n for (const directive of directives) {\n const [key, value] = directive.split('=').map(part => part.trim());\n\n switch (key) {\n case 'max-age': {\n const maxAge = parseInt(value, 10);\n if (!isNaN(maxAge)) {\n cacheControlOptions['max-age'] = maxAge;\n }\n break;\n }\n case 'no-cache':\n cacheControlOptions['no-cache'] = true;\n break;\n case 'no-store':\n cacheControlOptions['no-store'] = true;\n break;\n case 'must-revalidate':\n cacheControlOptions['must-revalidate'] = true;\n break;\n case 'private':\n cacheControlOptions['private'] = true;\n break;\n default:\n // Ignore unknown directives\n break;\n }\n }\n\n return cacheControlOptions;\n}\n\nconst SECURE_LOCALHOST_DOMAINS = ['localhost', '127.0.0.1'];\n\n/**\n * Is the host localhost-enough to satisfy the \"secure context\" definition\n * https://github.com/GoogleChrome/lighthouse/pull/11766#discussion_r582340683\n */\nexport function isSyntheticNetworkRequestLocalhost(event: SyntheticNetworkRequest): boolean {\n try {\n const hostname = new URL(event.args.data.url).hostname;\n // Any hostname terminating in `.localhost` is considered to be local.\n // https://w3c.github.io/webappsec-secure-contexts/#localhost\n // This method doesn't consider IPs that resolve to loopback, IPv6 or other loopback edgecases\n return SECURE_LOCALHOST_DOMAINS.includes(hostname) || hostname.endsWith('.localhost');\n } catch {\n return false;\n }\n}\n"]}
1
+ {"version":3,"file":"Network.js","sourceRoot":"","sources":["../../../../../../../front_end/models/trace/helpers/Network.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2024 The Chromium Authors\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\nimport * as Protocol from '../../../generated/protocol.js';\nimport type * as Types from '../types/types.js';\n\ntype RenderBlocking = Types.Events.RenderBlocking;\ntype SyntheticNetworkRequest = Types.Events.SyntheticNetworkRequest;\n\n// Important: we purposefully treat `potentially_blocking` as\n// non-render-blocking here because:\n// 1. An async script can run on the main thread at any point, including before\n// the page is loaded\n// 2. An async script will never block the parsing and rendering process of the\n// browser.\n// 3. Therefore, from a developer's point of view, there is nothing more they\n// can do if they've put `async` on, and within the context of Insights, we\n// shouldn't report an async script as render-blocking.\n// In the future we may want to consider suggesting the use of `defer` over\n// `async`, as it doesn't have this concern, but for now we'll allow `async`\n// and not report it as an issue.\nconst NON_RENDER_BLOCKING_VALUES = new Set<RenderBlocking>([\n 'non_blocking',\n 'dynamically_injected_non_blocking',\n 'potentially_blocking',\n]);\n\nexport function isSyntheticNetworkRequestEventRenderBlocking(event: SyntheticNetworkRequest): boolean {\n return !NON_RENDER_BLOCKING_VALUES.has(event.args.data.renderBlocking);\n}\n\nconst HIGH_NETWORK_PRIORITIES = new Set<Protocol.Network.ResourcePriority>([\n Protocol.Network.ResourcePriority.VeryHigh,\n Protocol.Network.ResourcePriority.High,\n Protocol.Network.ResourcePriority.Medium,\n]);\n\nexport function isSyntheticNetworkRequestHighPriority(event: SyntheticNetworkRequest): boolean {\n return HIGH_NETWORK_PRIORITIES.has(event.args.data.priority);\n}\n\nexport interface CacheControl {\n 'max-age'?: number;\n 'no-cache'?: boolean;\n 'no-store'?: boolean;\n 'must-revalidate'?: boolean;\n // eslint-disable-next-line @stylistic/quote-props\n 'private'?: boolean;\n}\n\nexport const CACHEABLE_STATUS_CODES: Set<number> = new Set([200, 203, 206]);\n\n/** @type {Set<LH.Crdp.Network.ResourceType>} */\nexport const STATIC_RESOURCE_TYPES: Set<Protocol.Network.ResourceType> = new Set([\n Protocol.Network.ResourceType.Font,\n Protocol.Network.ResourceType.Image,\n Protocol.Network.ResourceType.Media,\n Protocol.Network.ResourceType.Script,\n Protocol.Network.ResourceType.Stylesheet,\n]);\n\nexport const NON_NETWORK_SCHEMES: string[] = [\n 'blob', // @see https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n 'data', // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n 'intent', // @see https://developer.chrome.com/docs/multidevice/android/intents/\n 'file', // @see https://en.wikipedia.org/wiki/File_URI_scheme\n 'filesystem', // @see https://developer.mozilla.org/en-US/docs/Web/API/FileSystem\n 'chrome-extension',\n];\n\n/**\n * Parses Cache-Control directives based on https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control\n * eg. 'no-cache, no-store, max-age=0, no-transform, private' will return\n * {no-cache: true, no-store: true, max-age: 0, no-transform: true, private: true}\n */\nexport function parseCacheControl(header: string|null): CacheControl|null {\n if (!header) {\n return null;\n }\n\n const directives = header.split(',').map(directive => directive.trim());\n const cacheControlOptions: CacheControl = {};\n\n for (const directive of directives) {\n const [key, value] = directive.split('=').map(part => part.trim());\n\n switch (key) {\n case 'max-age': {\n const maxAge = parseInt(value, 10);\n if (!isNaN(maxAge)) {\n cacheControlOptions['max-age'] = maxAge;\n }\n break;\n }\n case 'no-cache':\n cacheControlOptions['no-cache'] = true;\n break;\n case 'no-store':\n cacheControlOptions['no-store'] = true;\n break;\n case 'must-revalidate':\n cacheControlOptions['must-revalidate'] = true;\n break;\n case 'private':\n cacheControlOptions['private'] = true;\n break;\n default:\n // Ignore unknown directives\n break;\n }\n }\n\n return cacheControlOptions;\n}\n\nconst SECURE_LOCALHOST_DOMAINS = ['localhost', '127.0.0.1'];\n\n/**\n * Is the host localhost-enough to satisfy the \"secure context\" definition\n * https://github.com/GoogleChrome/lighthouse/pull/11766#discussion_r582340683\n */\nexport function isSyntheticNetworkRequestLocalhost(event: SyntheticNetworkRequest): boolean {\n try {\n const hostname = new URL(event.args.data.url).hostname;\n // Any hostname terminating in `.localhost` is considered to be local.\n // https://w3c.github.io/webappsec-secure-contexts/#localhost\n // This method doesn't consider IPs that resolve to loopback, IPv6 or other loopback edgecases\n return SECURE_LOCALHOST_DOMAINS.includes(hostname) || hostname.endsWith('.localhost');\n } catch {\n return false;\n }\n}\n"]}
@@ -68,9 +68,13 @@ export class SamplesIntegrator {
68
68
  #lockedJsStackDepth = [];
69
69
  /**
70
70
  * Used to keep track when samples should be integrated even if they
71
- * are not children of invocation trace events. This is useful in
72
- * cases where we can be missing the start of JS invocation events if
73
- * we start tracing half-way through.
71
+ * are not children of invocation trace events. This is used in two cases:
72
+ * 1. We start tracing half-way through, so we miss the start of JS
73
+ * invocation events.
74
+ * 2. On threads (like Web Workers) without real JS invocation parent events,
75
+ * but where trace events (like SchedulePostMessage) integrate stack traces.
76
+ * Enabling fake JS mode allows subsequent samples to be processed and
77
+ * eventually correct the stack, preventing a deadlock.
74
78
  */
75
79
  #fakeJSInvocation = false;
76
80
  /**
@@ -141,7 +145,7 @@ export class SamplesIntegrator {
141
145
  this.#onProfileCall(event, parentEvent);
142
146
  continue;
143
147
  }
144
- this.#onTraceEventStart(event);
148
+ this.#onTraceEventStart(event, parentEvent);
145
149
  stack.push(event);
146
150
  }
147
151
  while (stack.length) {
@@ -153,7 +157,7 @@ export class SamplesIntegrator {
153
157
  sortTraceEventsInPlace(this.jsSampleEvents);
154
158
  return this.#constructedProfileCalls;
155
159
  }
156
- #onTraceEventStart(event) {
160
+ #onTraceEventStart(event, parent) {
157
161
  // Top level events cannot be nested into JS frames so we reset
158
162
  // the stack when we find one.
159
163
  if (event.name === Types.Events.Name.RUN_MICROTASKS || event.name === Types.Events.Name.RUN_TASK) {
@@ -166,6 +170,18 @@ export class SamplesIntegrator {
166
170
  this.#fakeJSInvocation = false;
167
171
  }
168
172
  this.#extractStackTrace(event);
173
+ if (extractSampleTraceId(event)) {
174
+ const hasJSInvocationParent = parent && Types.Events.isJSInvocationEvent(parent);
175
+ if (!hasJSInvocationParent) {
176
+ // If the event has a sampleTraceId (meaning it has a stack trace) but
177
+ // no JS invocation parent, we enter fake JS mode. This ensures that
178
+ // subsequent samples on this thread are processed, allowing the stack
179
+ // to be correctly updated/truncated. Without this, subsequent samples
180
+ // would be ignored because the stack is non-empty but we are not
181
+ // considered to be in JS.
182
+ this.#fakeJSInvocation = true;
183
+ }
184
+ }
169
185
  // Keep track of the call frames in the stack before the event
170
186
  // happened. For the duration of this event, these frames cannot
171
187
  // change (none can be terminated before this event finishes).
@@ -473,7 +489,7 @@ export class SamplesIntegrator {
473
489
  traceEvents: [cpuProfileEvent],
474
490
  metadata: {
475
491
  dataOrigin: Types.File.DataOrigin.CPU_PROFILE,
476
- }
492
+ },
477
493
  };
478
494
  }
479
495
  static extractCpuProfileFromFakeTrace(traceEvents) {