lighthouse 9.5.0-dev.20230118 → 9.5.0-dev.20230119

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 (505) hide show
  1. package/cli/bin.d.ts +5 -0
  2. package/cli/cli-flags.d.ts +258 -0
  3. package/cli/commands/commands.d.ts +4 -0
  4. package/cli/commands/list-audits.d.ts +2 -0
  5. package/cli/commands/list-locales.d.ts +2 -0
  6. package/cli/commands/list-trace-categories.d.ts +2 -0
  7. package/cli/index.d.ts +3 -0
  8. package/cli/printer.d.ts +28 -0
  9. package/cli/run.d.ts +24 -0
  10. package/cli/sentry-prompt.d.ts +5 -0
  11. package/cli/test/smokehouse/config/exclusions.d.ts +12 -0
  12. package/cli/test/smokehouse/core-tests.d.ts +4 -0
  13. package/cli/test/smokehouse/frontends/back-compat-util.d.ts +16 -0
  14. package/cli/test/smokehouse/frontends/lib.d.ts +8 -0
  15. package/cli/test/smokehouse/frontends/node.d.ts +2 -0
  16. package/cli/test/smokehouse/frontends/smokehouse-bin.d.ts +3 -0
  17. package/cli/test/smokehouse/lib/child-process-error.d.ts +21 -0
  18. package/cli/test/smokehouse/lib/concurrent-mapper.d.ts +78 -0
  19. package/cli/test/smokehouse/lib/local-console.d.ts +33 -0
  20. package/cli/test/smokehouse/lighthouse-runners/bundle.d.ts +16 -0
  21. package/cli/test/smokehouse/lighthouse-runners/cli.d.ts +18 -0
  22. package/cli/test/smokehouse/lighthouse-runners/devtools.d.ts +23 -0
  23. package/cli/test/smokehouse/report-assert-test.d.ts +2 -0
  24. package/cli/test/smokehouse/report-assert.d.ts +50 -0
  25. package/cli/test/smokehouse/smokehouse.d.ts +35 -0
  26. package/cli/test/smokehouse/version-check-test.d.ts +2 -0
  27. package/cli/test/smokehouse/version-check.d.ts +15 -0
  28. package/core/audits/accessibility/accesskeys.d.ts +10 -0
  29. package/core/audits/accessibility/aria-allowed-attr.d.ts +10 -0
  30. package/core/audits/accessibility/aria-command-name.d.ts +10 -0
  31. package/core/audits/accessibility/aria-hidden-body.d.ts +10 -0
  32. package/core/audits/accessibility/aria-hidden-focus.d.ts +10 -0
  33. package/core/audits/accessibility/aria-input-field-name.d.ts +10 -0
  34. package/core/audits/accessibility/aria-meter-name.d.ts +10 -0
  35. package/core/audits/accessibility/aria-progressbar-name.d.ts +10 -0
  36. package/core/audits/accessibility/aria-required-attr.d.ts +10 -0
  37. package/core/audits/accessibility/aria-required-children.d.ts +10 -0
  38. package/core/audits/accessibility/aria-required-parent.d.ts +10 -0
  39. package/core/audits/accessibility/aria-roles.d.ts +10 -0
  40. package/core/audits/accessibility/aria-toggle-field-name.d.ts +10 -0
  41. package/core/audits/accessibility/aria-tooltip-name.d.ts +10 -0
  42. package/core/audits/accessibility/aria-treeitem-name.d.ts +10 -0
  43. package/core/audits/accessibility/aria-valid-attr-value.d.ts +10 -0
  44. package/core/audits/accessibility/aria-valid-attr.d.ts +10 -0
  45. package/core/audits/accessibility/axe-audit.d.ts +17 -0
  46. package/core/audits/accessibility/button-name.d.ts +10 -0
  47. package/core/audits/accessibility/bypass.d.ts +10 -0
  48. package/core/audits/accessibility/color-contrast.d.ts +10 -0
  49. package/core/audits/accessibility/definition-list.d.ts +10 -0
  50. package/core/audits/accessibility/dlitem.d.ts +10 -0
  51. package/core/audits/accessibility/document-title.d.ts +10 -0
  52. package/core/audits/accessibility/duplicate-id-active.d.ts +10 -0
  53. package/core/audits/accessibility/duplicate-id-aria.d.ts +10 -0
  54. package/core/audits/accessibility/form-field-multiple-labels.d.ts +10 -0
  55. package/core/audits/accessibility/frame-title.d.ts +10 -0
  56. package/core/audits/accessibility/heading-order.d.ts +10 -0
  57. package/core/audits/accessibility/html-has-lang.d.ts +10 -0
  58. package/core/audits/accessibility/html-lang-valid.d.ts +10 -0
  59. package/core/audits/accessibility/image-alt.d.ts +10 -0
  60. package/core/audits/accessibility/input-image-alt.d.ts +10 -0
  61. package/core/audits/accessibility/label.d.ts +10 -0
  62. package/core/audits/accessibility/link-name.d.ts +10 -0
  63. package/core/audits/accessibility/list.d.ts +10 -0
  64. package/core/audits/accessibility/listitem.d.ts +10 -0
  65. package/core/audits/accessibility/manual/custom-controls-labels.d.ts +8 -0
  66. package/core/audits/accessibility/manual/custom-controls-roles.d.ts +8 -0
  67. package/core/audits/accessibility/manual/focus-traps.d.ts +8 -0
  68. package/core/audits/accessibility/manual/focusable-controls.d.ts +8 -0
  69. package/core/audits/accessibility/manual/interactive-element-affordance.d.ts +8 -0
  70. package/core/audits/accessibility/manual/logical-tab-order.d.ts +8 -0
  71. package/core/audits/accessibility/manual/managed-focus.d.ts +8 -0
  72. package/core/audits/accessibility/manual/offscreen-content-hidden.d.ts +9 -0
  73. package/core/audits/accessibility/manual/use-landmarks.d.ts +8 -0
  74. package/core/audits/accessibility/manual/visual-order-follows-dom.d.ts +8 -0
  75. package/core/audits/accessibility/meta-refresh.d.ts +10 -0
  76. package/core/audits/accessibility/meta-viewport.d.ts +10 -0
  77. package/core/audits/accessibility/object-alt.d.ts +10 -0
  78. package/core/audits/accessibility/tabindex.d.ts +10 -0
  79. package/core/audits/accessibility/td-headers-attr.d.ts +10 -0
  80. package/core/audits/accessibility/th-has-data-cells.d.ts +10 -0
  81. package/core/audits/accessibility/valid-lang.d.ts +10 -0
  82. package/core/audits/accessibility/video-caption.d.ts +10 -0
  83. package/core/audits/audit.d.ts +150 -0
  84. package/core/audits/audit.js +1 -0
  85. package/core/audits/autocomplete.d.ts +36 -0
  86. package/core/audits/bf-cache.d.ts +21 -0
  87. package/core/audits/bootup-time.d.ts +26 -0
  88. package/core/audits/byte-efficiency/byte-efficiency-audit.d.ts +82 -0
  89. package/core/audits/byte-efficiency/duplicated-javascript.d.ts +52 -0
  90. package/core/audits/byte-efficiency/efficient-animated-content.d.ts +23 -0
  91. package/core/audits/byte-efficiency/legacy-javascript.d.ts +99 -0
  92. package/core/audits/byte-efficiency/modern-image-formats.d.ts +38 -0
  93. package/core/audits/byte-efficiency/offscreen-images.d.ts +75 -0
  94. package/core/audits/byte-efficiency/render-blocking-resources.d.ts +55 -0
  95. package/core/audits/byte-efficiency/total-byte-weight.d.ts +21 -0
  96. package/core/audits/byte-efficiency/unminified-css.d.ts +36 -0
  97. package/core/audits/byte-efficiency/unminified-javascript.d.ts +37 -0
  98. package/core/audits/byte-efficiency/unused-css-rules.d.ts +16 -0
  99. package/core/audits/byte-efficiency/unused-javascript.d.ts +27 -0
  100. package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +61 -0
  101. package/core/audits/byte-efficiency/uses-optimized-images.d.ts +33 -0
  102. package/core/audits/byte-efficiency/uses-responsive-images-snapshot.d.ts +16 -0
  103. package/core/audits/byte-efficiency/uses-responsive-images.d.ts +45 -0
  104. package/core/audits/byte-efficiency/uses-text-compression.d.ts +14 -0
  105. package/core/audits/content-width.d.ts +17 -0
  106. package/core/audits/critical-request-chains.d.ts +44 -0
  107. package/core/audits/csp-xss.d.ts +51 -0
  108. package/core/audits/deprecations.d.ts +19 -0
  109. package/core/audits/diagnostics.d.ts +11 -0
  110. package/core/audits/dobetterweb/charset.d.ts +19 -0
  111. package/core/audits/dobetterweb/doctype.d.ts +21 -0
  112. package/core/audits/dobetterweb/dom-size.d.ts +26 -0
  113. package/core/audits/dobetterweb/geolocation-on-start.d.ts +16 -0
  114. package/core/audits/dobetterweb/inspector-issues.d.ts +45 -0
  115. package/core/audits/dobetterweb/js-libraries.d.ts +15 -0
  116. package/core/audits/dobetterweb/no-document-write.d.ts +16 -0
  117. package/core/audits/dobetterweb/notification-on-start.d.ts +16 -0
  118. package/core/audits/dobetterweb/password-inputs-can-be-pasted-into.d.ts +15 -0
  119. package/core/audits/dobetterweb/uses-http2.d.ts +69 -0
  120. package/core/audits/dobetterweb/uses-passive-event-listeners.d.ts +16 -0
  121. package/core/audits/errors-in-console.d.ts +31 -0
  122. package/core/audits/final-screenshot.d.ts +11 -0
  123. package/core/audits/font-display.d.ts +32 -0
  124. package/core/audits/image-aspect-ratio.d.ts +30 -0
  125. package/core/audits/image-size-responsive.d.ts +28 -0
  126. package/core/audits/installable-manifest.d.ts +118 -0
  127. package/core/audits/is-on-https.d.ts +23 -0
  128. package/core/audits/largest-contentful-paint-element.d.ts +14 -0
  129. package/core/audits/layout-shift-elements.d.ts +15 -0
  130. package/core/audits/lcp-lazy-loaded.d.ts +21 -0
  131. package/core/audits/long-tasks.d.ts +16 -0
  132. package/core/audits/main-thread-tasks.d.ts +11 -0
  133. package/core/audits/mainthread-work-breakdown.d.ts +28 -0
  134. package/core/audits/manual/manual-audit.d.ts +13 -0
  135. package/core/audits/manual/pwa-cross-browser.d.ts +12 -0
  136. package/core/audits/manual/pwa-each-page-has-url.d.ts +12 -0
  137. package/core/audits/manual/pwa-page-transitions.d.ts +12 -0
  138. package/core/audits/maskable-icon.d.ts +25 -0
  139. package/core/audits/metrics/cumulative-layout-shift.d.ts +21 -0
  140. package/core/audits/metrics/experimental-interaction-to-next-paint.d.ts +21 -0
  141. package/core/audits/metrics/first-contentful-paint-3g.d.ts +15 -0
  142. package/core/audits/metrics/first-contentful-paint.d.ts +25 -0
  143. package/core/audits/metrics/first-meaningful-paint.d.ts +28 -0
  144. package/core/audits/metrics/interactive.d.ts +31 -0
  145. package/core/audits/metrics/largest-contentful-paint.d.ts +25 -0
  146. package/core/audits/metrics/max-potential-fid.d.ts +23 -0
  147. package/core/audits/metrics/speed-index.d.ts +27 -0
  148. package/core/audits/metrics/total-blocking-time.d.ts +32 -0
  149. package/core/audits/metrics.d.ts +11 -0
  150. package/core/audits/multi-check-audit.d.ts +28 -0
  151. package/core/audits/network-requests.d.ts +11 -0
  152. package/core/audits/network-rtt.d.ts +15 -0
  153. package/core/audits/network-server-latency.d.ts +15 -0
  154. package/core/audits/no-unload-listeners.d.ts +16 -0
  155. package/core/audits/non-composited-animations.d.ts +21 -0
  156. package/core/audits/oopif-iframe-test-audit.d.ts +14 -0
  157. package/core/audits/performance-budget.d.ts +39 -0
  158. package/core/audits/predictive-perf.d.ts +11 -0
  159. package/core/audits/preload-fonts.d.ts +29 -0
  160. package/core/audits/preload-lcp-image.d.ts +67 -0
  161. package/core/audits/redirects.d.ts +33 -0
  162. package/core/audits/resource-summary.d.ts +16 -0
  163. package/core/audits/screenshot-thumbnails.d.ts +32 -0
  164. package/core/audits/script-elements-test-audit.d.ts +14 -0
  165. package/core/audits/script-treemap-data.d.ts +42 -0
  166. package/core/audits/seo/canonical.d.ts +51 -0
  167. package/core/audits/seo/crawlable-anchors.d.ts +16 -0
  168. package/core/audits/seo/font-size.d.ts +24 -0
  169. package/core/audits/seo/hreflang.d.ts +28 -0
  170. package/core/audits/seo/http-status-code.d.ts +16 -0
  171. package/core/audits/seo/is-crawlable.d.ts +38 -0
  172. package/core/audits/seo/link-text.d.ts +16 -0
  173. package/core/audits/seo/manual/structured-data.d.ts +12 -0
  174. package/core/audits/seo/meta-description.d.ts +16 -0
  175. package/core/audits/seo/plugins.d.ts +15 -0
  176. package/core/audits/seo/robots-txt.d.ts +18 -0
  177. package/core/audits/seo/tap-targets.d.ts +50 -0
  178. package/core/audits/server-response-time.d.ts +21 -0
  179. package/core/audits/service-worker.d.ts +46 -0
  180. package/core/audits/splash-screen.d.ts +37 -0
  181. package/core/audits/themed-omnibox.d.ts +42 -0
  182. package/core/audits/third-party-facades.d.ts +41 -0
  183. package/core/audits/third-party-summary.d.ts +58 -0
  184. package/core/audits/timing-budget.d.ts +43 -0
  185. package/core/audits/unsized-images.d.ts +39 -0
  186. package/core/audits/user-timings.d.ts +43 -0
  187. package/core/audits/uses-rel-preconnect.d.ts +37 -0
  188. package/core/audits/uses-rel-preload.d.ts +61 -0
  189. package/core/audits/valid-source-maps.d.ts +27 -0
  190. package/core/audits/viewport.d.ts +17 -0
  191. package/core/audits/violation-audit.d.ts +14 -0
  192. package/core/audits/work-during-interaction.d.ts +82 -0
  193. package/core/computed/computed-artifact.d.ts +15 -0
  194. package/core/computed/critical-request-chains.d.ts +40 -0
  195. package/core/computed/image-records.d.ts +24 -0
  196. package/core/computed/js-bundles.d.ts +13 -0
  197. package/core/computed/load-simulator.d.ts +28 -0
  198. package/core/computed/main-resource.d.ts +25 -0
  199. package/core/computed/main-thread-tasks.d.ts +15 -0
  200. package/core/computed/manifest-values.d.ts +24 -0
  201. package/core/computed/metrics/cumulative-layout-shift.d.ts +53 -0
  202. package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +19 -0
  203. package/core/computed/metrics/first-contentful-paint.d.ts +15 -0
  204. package/core/computed/metrics/first-meaningful-paint.d.ts +15 -0
  205. package/core/computed/metrics/interactive.d.ts +61 -0
  206. package/core/computed/metrics/lantern-first-contentful-paint.d.ts +48 -0
  207. package/core/computed/metrics/lantern-first-meaningful-paint.d.ts +12 -0
  208. package/core/computed/metrics/lantern-interactive.d.ts +31 -0
  209. package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +25 -0
  210. package/core/computed/metrics/lantern-max-potential-fid.d.ts +30 -0
  211. package/core/computed/metrics/lantern-metric.d.ts +78 -0
  212. package/core/computed/metrics/lantern-speed-index.d.ts +38 -0
  213. package/core/computed/metrics/lantern-total-blocking-time.d.ts +31 -0
  214. package/core/computed/metrics/largest-contentful-paint-all-frames.d.ts +20 -0
  215. package/core/computed/metrics/largest-contentful-paint.d.ts +15 -0
  216. package/core/computed/metrics/max-potential-fid.d.ts +15 -0
  217. package/core/computed/metrics/metric.d.ts +38 -0
  218. package/core/computed/metrics/navigation-metric.d.ts +16 -0
  219. package/core/computed/metrics/responsiveness.d.ts +87 -0
  220. package/core/computed/metrics/speed-index.d.ts +10 -0
  221. package/core/computed/metrics/tbt-utils.d.ts +18 -0
  222. package/core/computed/metrics/timing-summary.d.ts +46 -0
  223. package/core/computed/metrics/total-blocking-time.d.ts +23 -0
  224. package/core/computed/module-duplication.d.ts +37 -0
  225. package/core/computed/network-analysis.d.ts +20 -0
  226. package/core/computed/network-records.d.ts +15 -0
  227. package/core/computed/network-records.js +1 -0
  228. package/core/computed/page-dependency-graph.d.ts +88 -0
  229. package/core/computed/processed-navigation.d.ts +15 -0
  230. package/core/computed/processed-trace.d.ts +14 -0
  231. package/core/computed/resource-summary.d.ts +44 -0
  232. package/core/computed/screenshots.d.ts +20 -0
  233. package/core/computed/speedline.d.ts +15 -0
  234. package/core/computed/unused-css.d.ts +62 -0
  235. package/core/computed/unused-javascript-summary.d.ts +71 -0
  236. package/core/computed/user-timings.d.ts +31 -0
  237. package/core/computed/viewport-meta.d.ts +35 -0
  238. package/core/config/budget.d.ts +74 -0
  239. package/core/config/config-helpers.d.ts +94 -0
  240. package/core/config/config-plugin.d.ts +46 -0
  241. package/core/config/config.d.ts +28 -0
  242. package/core/config/constants.d.ts +86 -0
  243. package/core/config/default-config.d.ts +5 -0
  244. package/core/config/default-config.js +1 -0
  245. package/core/config/desktop-config.d.ts +5 -0
  246. package/core/config/desktop-config.js +1 -0
  247. package/core/config/experimental-config.d.ts +13 -0
  248. package/core/config/filters.d.ts +83 -0
  249. package/core/config/full-config.d.ts +9 -0
  250. package/core/config/lr-desktop-config.d.ts +4 -0
  251. package/core/config/lr-mobile-config.d.ts +9 -0
  252. package/core/config/metrics-to-audits.d.ts +19 -0
  253. package/core/config/perf-config.d.ts +9 -0
  254. package/core/config/validation.d.ts +77 -0
  255. package/core/gather/base-artifacts.d.ts +16 -0
  256. package/core/gather/base-gatherer.d.ts +72 -0
  257. package/core/gather/base-gatherer.js +2 -0
  258. package/core/gather/driver/dom.d.ts +20 -0
  259. package/core/gather/driver/environment.d.ts +35 -0
  260. package/core/gather/driver/execution-context.d.ts +101 -0
  261. package/core/gather/driver/execution-context.js +1 -7
  262. package/core/gather/driver/navigation.d.ts +33 -0
  263. package/core/gather/driver/network-monitor.d.ts +82 -0
  264. package/core/gather/driver/network.d.ts +10 -0
  265. package/core/gather/driver/prepare.d.ts +46 -0
  266. package/core/gather/driver/service-workers.d.ts +16 -0
  267. package/core/gather/driver/storage.d.ts +24 -0
  268. package/core/gather/driver/target-manager.d.ts +61 -0
  269. package/core/gather/driver/wait-for-condition.d.ts +116 -0
  270. package/core/gather/driver/wait-for-condition.js +3 -2
  271. package/core/gather/driver.d.ts +30 -0
  272. package/core/gather/fetcher.d.ts +63 -0
  273. package/core/gather/fetcher.js +2 -0
  274. package/core/gather/gatherers/accessibility.d.ts +23 -0
  275. package/core/gather/gatherers/anchor-elements.d.ts +10 -0
  276. package/core/gather/gatherers/bf-cache-failures.d.ts +43 -0
  277. package/core/gather/gatherers/cache-contents.d.ts +11 -0
  278. package/core/gather/gatherers/console-messages.d.ts +39 -0
  279. package/core/gather/gatherers/css-usage.d.ts +39 -0
  280. package/core/gather/gatherers/devtools-log-compat.d.ts +13 -0
  281. package/core/gather/gatherers/devtools-log.d.ts +48 -0
  282. package/core/gather/gatherers/dobetterweb/doctype.d.ts +10 -0
  283. package/core/gather/gatherers/dobetterweb/domstats.d.ts +10 -0
  284. package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +61 -0
  285. package/core/gather/gatherers/dobetterweb/password-inputs-with-prevented-paste.d.ts +10 -0
  286. package/core/gather/gatherers/dobetterweb/response-compression.d.ts +30 -0
  287. package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.d.ts +53 -0
  288. package/core/gather/gatherers/full-page-screenshot.d.ts +35 -0
  289. package/core/gather/gatherers/gatherer.d.ts +46 -0
  290. package/core/gather/gatherers/global-listeners.d.ts +27 -0
  291. package/core/gather/gatherers/iframe-elements.d.ts +11 -0
  292. package/core/gather/gatherers/image-elements.d.ts +35 -0
  293. package/core/gather/gatherers/inputs.d.ts +10 -0
  294. package/core/gather/gatherers/inspector-issues.d.ts +38 -0
  295. package/core/gather/gatherers/installability-errors.d.ts +17 -0
  296. package/core/gather/gatherers/js-usage.d.ts +22 -0
  297. package/core/gather/gatherers/link-elements.d.ts +39 -0
  298. package/core/gather/gatherers/main-document-content.d.ts +27 -0
  299. package/core/gather/gatherers/meta-elements.d.ts +10 -0
  300. package/core/gather/gatherers/network-user-agent.d.ts +18 -0
  301. package/core/gather/gatherers/script-elements.d.ts +26 -0
  302. package/core/gather/gatherers/scripts.d.ts +27 -0
  303. package/core/gather/gatherers/seo/embedded-content.d.ts +10 -0
  304. package/core/gather/gatherers/seo/font-size.d.ts +131 -0
  305. package/core/gather/gatherers/seo/robots-txt.d.ts +10 -0
  306. package/core/gather/gatherers/seo/tap-targets.d.ts +21 -0
  307. package/core/gather/gatherers/service-worker.d.ts +16 -0
  308. package/core/gather/gatherers/source-maps.d.ts +50 -0
  309. package/core/gather/gatherers/stacks.d.ts +38 -0
  310. package/core/gather/gatherers/trace-compat.d.ts +13 -0
  311. package/core/gather/gatherers/trace-elements.d.ts +83 -0
  312. package/core/gather/gatherers/trace.d.ts +23 -0
  313. package/core/gather/gatherers/viewport-dimensions.d.ts +10 -0
  314. package/core/gather/gatherers/web-app-manifest.d.ts +32 -0
  315. package/core/gather/navigation-runner.d.ts +92 -0
  316. package/core/gather/runner-helpers.d.ts +39 -0
  317. package/core/gather/session.d.ts +50 -0
  318. package/core/gather/snapshot-runner.d.ts +10 -0
  319. package/core/gather/timespan-runner.d.ts +12 -0
  320. package/core/index.d.cts +4 -0
  321. package/core/index.d.ts +88 -0
  322. package/core/index.js +2 -0
  323. package/core/legacy/config/config.d.ts +107 -0
  324. package/core/legacy/config/legacy-default-config.d.ts +4 -0
  325. package/core/legacy/gather/connections/connection.d.ts +75 -0
  326. package/core/legacy/gather/connections/connection.js +1 -0
  327. package/core/legacy/gather/connections/cri.d.ts +27 -0
  328. package/core/legacy/gather/connections/raw.d.ts +20 -0
  329. package/core/legacy/gather/driver.d.ts +214 -0
  330. package/core/legacy/gather/driver.js +1 -0
  331. package/core/legacy/gather/gather-runner.d.ts +166 -0
  332. package/core/lib/arbitrary-equality-map.d.ts +47 -0
  333. package/core/lib/asset-saver.d.ts +101 -0
  334. package/core/lib/axe.d.ts +2 -0
  335. package/core/lib/bf-cache-strings.d.ts +121 -0
  336. package/core/lib/cdt/Common.d.ts +3 -0
  337. package/core/lib/cdt/Platform.d.ts +26 -0
  338. package/core/lib/cdt/SDK.d.ts +2 -0
  339. package/core/lib/cdt/generated/ParsedURL.d.ts +28 -0
  340. package/core/lib/cdt/generated/SourceMap.d.ts +100 -0
  341. package/core/lib/csp-evaluator.d.ts +41 -0
  342. package/core/lib/dependency-graph/base-node.d.ts +161 -0
  343. package/core/lib/dependency-graph/cpu-node.d.ts +34 -0
  344. package/core/lib/dependency-graph/cpu-node.js +1 -0
  345. package/core/lib/dependency-graph/network-node.d.ts +43 -0
  346. package/core/lib/dependency-graph/network-node.js +1 -0
  347. package/core/lib/dependency-graph/simulator/connection-pool.d.ts +58 -0
  348. package/core/lib/dependency-graph/simulator/connection-pool.js +1 -0
  349. package/core/lib/dependency-graph/simulator/dns-cache.d.ts +42 -0
  350. package/core/lib/dependency-graph/simulator/dns-cache.js +2 -0
  351. package/core/lib/dependency-graph/simulator/network-analyzer.d.ts +166 -0
  352. package/core/lib/dependency-graph/simulator/simulator-timing-map.d.ts +153 -0
  353. package/core/lib/dependency-graph/simulator/simulator-timing-map.js +2 -2
  354. package/core/lib/dependency-graph/simulator/simulator.d.ts +154 -0
  355. package/core/lib/dependency-graph/simulator/simulator.js +3 -2
  356. package/core/lib/dependency-graph/simulator/tcp-connection.d.ts +89 -0
  357. package/core/lib/deprecations-strings.d.ts +66 -0
  358. package/core/lib/emulation.d.ts +43 -0
  359. package/core/lib/i18n/i18n.d.ts +81 -0
  360. package/core/lib/icons.d.ts +22 -0
  361. package/core/lib/lantern-trace-saver.d.ts +20 -0
  362. package/core/lib/lh-env.d.ts +2 -0
  363. package/core/lib/lh-error.d.ts +328 -0
  364. package/core/lib/lh-trace-processor.d.ts +5 -0
  365. package/core/lib/manifest-parser.d.ts +186 -0
  366. package/core/lib/median-run.d.ts +17 -0
  367. package/core/lib/minification-estimator.d.ts +9 -0
  368. package/core/lib/minify-devtoolslog.d.ts +6 -0
  369. package/core/lib/minify-trace.d.ts +6 -0
  370. package/core/lib/navigation-error.d.ts +39 -0
  371. package/core/lib/network-recorder.d.ts +115 -0
  372. package/core/lib/network-request.d.ts +245 -0
  373. package/core/lib/network-request.js +1 -0
  374. package/core/lib/page-functions.d.ts +149 -0
  375. package/core/lib/proto-preprocessor.d.ts +13 -0
  376. package/core/lib/rect-helpers.d.ts +100 -0
  377. package/core/lib/script-helpers.d.ts +17 -0
  378. package/core/lib/sentry.d.ts +32 -0
  379. package/core/lib/stack-packs.d.ts +16 -0
  380. package/core/lib/statistics.d.ts +28 -0
  381. package/core/lib/tappable-rects.d.ts +8 -0
  382. package/core/lib/third-party-web.d.ts +32 -0
  383. package/core/lib/timing-trace-saver.d.ts +21 -0
  384. package/core/lib/tracehouse/cpu-profile-model.d.ts +228 -0
  385. package/core/lib/tracehouse/main-thread-tasks.d.ts +162 -0
  386. package/core/lib/tracehouse/main-thread-tasks.js +1 -0
  387. package/core/lib/tracehouse/task-groups.d.ts +66 -0
  388. package/core/lib/tracehouse/task-summary.d.ts +18 -0
  389. package/core/lib/tracehouse/trace-processor.d.ts +275 -0
  390. package/core/lib/traces/metric-trace-events.d.ts +65 -0
  391. package/core/lib/url-utils.d.ts +100 -0
  392. package/core/runner.d.ts +109 -0
  393. package/core/scoring.d.ts +26 -0
  394. package/core/user-flow.d.ts +106 -0
  395. package/core/user-flow.js +1 -0
  396. package/core/util.d.cts +230 -0
  397. package/eslint-local-rules.d.cts +6 -0
  398. package/esm-utils.d.ts +14 -0
  399. package/flow-report/api.d.ts +7 -0
  400. package/flow-report/clients/standalone.d.ts +7 -0
  401. package/flow-report/src/app.d.ts +11 -0
  402. package/flow-report/src/common.d.ts +20 -0
  403. package/flow-report/src/header.d.ts +10 -0
  404. package/flow-report/src/help-dialog.d.ts +10 -0
  405. package/flow-report/src/i18n/i18n.d.ts +209 -0
  406. package/flow-report/src/i18n/localized-strings.d.ts +9 -0
  407. package/flow-report/src/i18n/ui-strings.d.ts +48 -0
  408. package/flow-report/src/icons.d.ts +18 -0
  409. package/flow-report/src/sidebar/flow.d.ts +8 -0
  410. package/flow-report/src/sidebar/sidebar.d.ts +17 -0
  411. package/flow-report/src/summary/category.d.ts +19 -0
  412. package/flow-report/src/summary/summary.d.ts +18 -0
  413. package/flow-report/src/topbar.d.ts +15 -0
  414. package/flow-report/src/util.d.ts +30 -0
  415. package/flow-report/src/wrappers/category-score.d.ts +12 -0
  416. package/flow-report/src/wrappers/markdown.d.ts +10 -0
  417. package/flow-report/src/wrappers/report.d.ts +10 -0
  418. package/flow-report/src/wrappers/styles.d.ts +8 -0
  419. package/flow-report/test/app-test.d.ts +7 -0
  420. package/flow-report/test/common-test.d.ts +7 -0
  421. package/flow-report/test/flow-report-pptr-test.d.ts +7 -0
  422. package/flow-report/test/header-test.d.ts +7 -0
  423. package/flow-report/test/sample-flow.d.ts +7 -0
  424. package/flow-report/test/setup/env-setup.d.ts +11 -0
  425. package/flow-report/test/sidebar/flow-test.d.ts +7 -0
  426. package/flow-report/test/sidebar/sidebar-test.d.ts +7 -0
  427. package/flow-report/test/summary/category-test.d.ts +7 -0
  428. package/flow-report/test/summary/summary-test.d.ts +7 -0
  429. package/flow-report/test/topbar-test.d.ts +7 -0
  430. package/flow-report/test/util-test.d.ts +7 -0
  431. package/flow-report/test/wrappers/category-score-test.d.ts +7 -0
  432. package/flow-report/test/wrappers/markdown-test.d.ts +7 -0
  433. package/flow-report/tsconfig.json +1 -1
  434. package/package.json +5 -2
  435. package/report/clients/bundle.d.ts +6 -0
  436. package/report/clients/standalone.d.ts +2 -0
  437. package/report/generator/file-namer.d.ts +35 -0
  438. package/report/generator/flow-report-assets.d.ts +9 -0
  439. package/report/generator/report-assets.d.ts +8 -0
  440. package/report/generator/report-generator.d.ts +59 -0
  441. package/report/renderer/api.d.ts +31 -0
  442. package/report/renderer/category-renderer.d.ts +176 -0
  443. package/report/renderer/components.d.ts +10 -0
  444. package/report/renderer/crc-details-renderer.d.ts +73 -0
  445. package/report/renderer/details-renderer.d.ts +141 -0
  446. package/report/renderer/dom.d.ts +125 -0
  447. package/report/renderer/drop-down-menu.d.ts +70 -0
  448. package/report/renderer/element-screenshot-renderer.d.ts +79 -0
  449. package/report/renderer/features-util.d.ts +13 -0
  450. package/report/renderer/i18n.d.ts +106 -0
  451. package/report/renderer/logger.d.ts +47 -0
  452. package/report/renderer/open-tab.d.ts +19 -0
  453. package/report/renderer/performance-category-renderer.d.ts +56 -0
  454. package/report/renderer/pwa-category-renderer.d.ts +55 -0
  455. package/report/renderer/report-renderer.d.ts +57 -0
  456. package/report/renderer/report-ui-features.d.ts +71 -0
  457. package/report/renderer/snippet-renderer.d.ts +85 -0
  458. package/report/renderer/swap-locale-feature.d.ts +31 -0
  459. package/report/renderer/text-encoding.d.ts +26 -0
  460. package/report/renderer/topbar-features.d.ts +82 -0
  461. package/report/renderer/util.d.ts +230 -0
  462. package/report/test-assets/faux-psi.d.ts +34 -0
  463. package/report/types/augment-dom.d.ts +1 -1
  464. package/root.d.ts +3 -0
  465. package/shared/localization/format.d.ts +106 -0
  466. package/shared/localization/i18n-module.d.ts +4 -0
  467. package/shared/localization/locales.d.ts +7 -0
  468. package/shared/localization/swap-flow-locale.d.ts +6 -0
  469. package/shared/localization/swap-locale.d.ts +39 -0
  470. package/shared/type-verifiers.d.ts +23 -0
  471. package/third-party/axe/valid-langs.d.ts +9 -0
  472. package/types/artifacts.d.ts +40 -38
  473. package/types/audit.d.ts +6 -6
  474. package/types/config.d.ts +3 -3
  475. package/types/externs.d.ts +7 -3
  476. package/types/gatherer.d.ts +27 -21
  477. package/types/{cssstyle/index.d.ts → internal/cssstyle.d.ts} +0 -0
  478. package/types/{enquirer.d.ts → internal/enquirer.d.ts} +0 -0
  479. package/types/{es-main.d.ts → internal/es-main.d.ts} +0 -0
  480. package/types/internal/global.d.ts +15 -0
  481. package/types/{http-link-header/index.d.ts → internal/http-link-header.d.ts} +0 -0
  482. package/types/{jsonlint-mod.d.ts → internal/jsonlint-mod.d.ts} +0 -0
  483. package/types/{lighthouse-logger/index.d.ts → internal/lighthouse-logger.d.ts} +0 -0
  484. package/types/{lookup-closest-locale/index.d.ts → internal/lookup-closest-locale.d.ts} +3 -1
  485. package/types/{metaviewport-parser/index.d.ts → internal/metaviewport-parser.d.ts} +0 -0
  486. package/types/{node-fetch.d.ts → internal/node-fetch.d.ts} +0 -0
  487. package/types/{node.d.ts → internal/node.d.ts} +0 -0
  488. package/types/{parse-cache-control/index.d.ts → internal/parse-cache-control.d.ts} +0 -0
  489. package/types/{pretty-json-stringify/index.d.ts → internal/pretty-json-stringify.d.ts} +0 -0
  490. package/types/{query-selector.d.ts → internal/query-selector.d.ts} +1 -1
  491. package/types/{rollup-plugin-postprocess.d.ts → internal/rollup-plugin-postprocess.d.ts} +0 -0
  492. package/types/{smokehouse.d.ts → internal/smokehouse.d.ts} +3 -3
  493. package/types/{test.d.ts → internal/test.d.ts} +0 -0
  494. package/types/lh.d.ts +81 -0
  495. package/types/lh.js +13 -0
  496. package/types/lhr/audit-details.d.ts +2 -2
  497. package/types/lhr/audit-result.d.ts +2 -2
  498. package/types/lhr/flow-result.d.ts +1 -1
  499. package/types/lhr/lhr.d.ts +2 -2
  500. package/types/lhr/settings.d.ts +1 -1
  501. package/types/lhr/treemap.d.ts +2 -2
  502. package/types/protocol.d.ts +8 -3
  503. package/types/puppeteer.d.ts +11 -6
  504. package/types/user-flow.d.ts +14 -5
  505. package/types/global-lh.d.ts +0 -85
@@ -0,0 +1,214 @@
1
+ export type CrdpEventEmitter = LH.Protocol.StrictEventEmitter<LH.CrdpEvents>;
2
+ /**
3
+ * @typedef {LH.Protocol.StrictEventEmitter<LH.CrdpEvents>} CrdpEventEmitter
4
+ */
5
+ /**
6
+ * @implements {LH.Gatherer.FRTransitionalDriver}
7
+ */
8
+ export class Driver implements LH.Gatherer.FRTransitionalDriver {
9
+ /** @deprecated - Not available on Fraggle Rock driver. */
10
+ static get traceCategories(): string[];
11
+ /**
12
+ * @param {import('./connections/connection.js').Connection} connection
13
+ */
14
+ constructor(connection: import('./connections/connection.js').Connection);
15
+ /**
16
+ * @pri_vate (This should be private, but that makes our tests harder).
17
+ * An event emitter that enforces mapping between Crdp event names and payload types.
18
+ */
19
+ _eventEmitter: CrdpEventEmitter;
20
+ /**
21
+ * @private
22
+ * Used to save network and lifecycle protocol traffic. Just Page and Network are needed.
23
+ */
24
+ private _devtoolsLog;
25
+ /**
26
+ * @private
27
+ * @type {Map<string, number>}
28
+ */
29
+ private _domainEnabledCounts;
30
+ /**
31
+ * @type {number}
32
+ * @private
33
+ */
34
+ private _nextProtocolTimeout;
35
+ online: boolean;
36
+ executionContext: ExecutionContext;
37
+ defaultSession: Driver;
38
+ fetcher: Fetcher;
39
+ _connection: import("./connections/connection.js").Connection;
40
+ /** @private @deprecated Only available for plugin backcompat. */
41
+ private evaluate;
42
+ /** @private @deprecated Only available for plugin backcompat. */
43
+ private evaluateAsync;
44
+ targetManager: {
45
+ rootSession: () => Driver;
46
+ /**
47
+ * Bind to *any* protocol event.
48
+ * @param {'protocolevent'} event
49
+ * @param {(payload: LH.Protocol.RawEventMessage) => void} callback
50
+ */
51
+ on: (event: 'protocolevent', callback: (payload: LH.Protocol.RawEventMessage) => void) => void;
52
+ /**
53
+ * Unbind to *any* protocol event.
54
+ * @param {'protocolevent'} event
55
+ * @param {(payload: LH.Protocol.RawEventMessage) => void} callback
56
+ */
57
+ off: (event: 'protocolevent', callback: (payload: LH.Protocol.RawEventMessage) => void) => void;
58
+ };
59
+ /**
60
+ * @return {Promise<LH.Crdp.Browser.GetVersionResponse & {milestone: number}>}
61
+ */
62
+ getBrowserVersion(): Promise<LH.Crdp.Browser.GetVersionResponse & {
63
+ milestone: number;
64
+ }>;
65
+ /**
66
+ * @return {Promise<void>}
67
+ */
68
+ connect(): Promise<void>;
69
+ /**
70
+ * @return {Promise<void>}
71
+ */
72
+ disconnect(): Promise<void>;
73
+ /** @return {Promise<void>} */
74
+ dispose(): Promise<void>;
75
+ /**
76
+ * Get the browser WebSocket endpoint for devtools protocol clients like Puppeteer.
77
+ * Only works with WebSocket connection, not extension or devtools.
78
+ * @return {Promise<string>}
79
+ */
80
+ wsEndpoint(): Promise<string>;
81
+ /**
82
+ * Bind listeners for protocol events.
83
+ * @template {keyof LH.CrdpEvents} E
84
+ * @param {E} eventName
85
+ * @param {(...args: LH.CrdpEvents[E]) => void} cb
86
+ */
87
+ on<E extends keyof LH.CrdpEvents>(eventName: E, cb: (...args: LH.CrdpEvents[E]) => void): void;
88
+ /**
89
+ * Bind a one-time listener for protocol events. Listener is removed once it
90
+ * has been called.
91
+ * @template {keyof LH.CrdpEvents} E
92
+ * @param {E} eventName
93
+ * @param {(...args: LH.CrdpEvents[E]) => void} cb
94
+ */
95
+ once<E_1 extends keyof LH.CrdpEvents>(eventName: E_1, cb: (...args: LH.CrdpEvents[E_1]) => void): void;
96
+ /**
97
+ * Unbind event listener.
98
+ * @template {keyof LH.CrdpEvents} E
99
+ * @param {E} eventName
100
+ * @param {Function} cb
101
+ */
102
+ off<E_2 extends keyof LH.CrdpEvents>(eventName: E_2, cb: Function): void;
103
+ /** @param {LH.Crdp.Target.TargetInfo} targetInfo */
104
+ setTargetInfo(targetInfo: LH.Crdp.Target.TargetInfo): void;
105
+ /**
106
+ * Debounce enabling or disabling domains to prevent driver users from
107
+ * stomping on each other. Maintains an internal count of the times a domain
108
+ * has been enabled. Returns false if the command would have no effect (domain
109
+ * is already enabled or disabled), or if command would interfere with another
110
+ * user of that domain (e.g. two gatherers have enabled a domain, both need to
111
+ * disable it for it to be disabled). Returns true otherwise.
112
+ * @param {string} domain
113
+ * @param {string|undefined} sessionId
114
+ * @param {boolean} enable
115
+ * @return {boolean}
116
+ * @private
117
+ */
118
+ private _shouldToggleDomain;
119
+ /**
120
+ * @return {boolean}
121
+ */
122
+ hasNextProtocolTimeout(): boolean;
123
+ /**
124
+ * @return {number}
125
+ */
126
+ getNextProtocolTimeout(): number;
127
+ /**
128
+ * timeout is used for the next call to 'sendCommand'.
129
+ * NOTE: This can eventually be replaced when TypeScript
130
+ * resolves https://github.com/Microsoft/TypeScript/issues/5453.
131
+ * @param {number} timeout
132
+ */
133
+ setNextProtocolTimeout(timeout: number): void;
134
+ /**
135
+ * @param {LH.Protocol.RawEventMessage} event
136
+ */
137
+ _handleProtocolEvent(event: LH.Protocol.RawEventMessage): void;
138
+ /**
139
+ * @param {Error} error
140
+ */
141
+ _handleEventError(error: Error): void;
142
+ /**
143
+ * @param {LH.Crdp.Target.AttachedToTargetEvent} event
144
+ */
145
+ _handleTargetAttached(event: LH.Crdp.Target.AttachedToTargetEvent): Promise<void>;
146
+ /**
147
+ * Call protocol methods, with a timeout.
148
+ * To configure the timeout for the next call, use 'setNextProtocolTimeout'.
149
+ * If 'sessionId' is undefined, the message is sent to the main session.
150
+ * @template {keyof LH.CrdpCommands} C
151
+ * @param {C} method
152
+ * @param {string|undefined} sessionId
153
+ * @param {LH.CrdpCommands[C]['paramsType']} params
154
+ * @return {Promise<LH.CrdpCommands[C]['returnType']>}
155
+ */
156
+ sendCommandToSession<C extends keyof LH.CrdpCommands>(method: C, sessionId: string | undefined, ...params: LH.CrdpCommands[C]["paramsType"]): Promise<LH.CrdpCommands[C]["returnType"]>;
157
+ /**
158
+ * Alias for 'sendCommandToSession(method, undefined, ...params)'
159
+ * @template {keyof LH.CrdpCommands} C
160
+ * @param {C} method
161
+ * @param {LH.CrdpCommands[C]['paramsType']} params
162
+ * @return {Promise<LH.CrdpCommands[C]['returnType']>}
163
+ */
164
+ sendCommand<C_1 extends keyof LH.CrdpCommands>(method: C_1, ...params: LH.CrdpCommands[C_1]["paramsType"]): Promise<LH.CrdpCommands[C_1]["returnType"]>;
165
+ /**
166
+ * Call protocol methods.
167
+ * @private
168
+ * @template {keyof LH.CrdpCommands} C
169
+ * @param {C} method
170
+ * @param {string|undefined} sessionId
171
+ * @param {LH.CrdpCommands[C]['paramsType']} params
172
+ * @return {Promise<LH.CrdpCommands[C]['returnType']>}
173
+ */
174
+ private _innerSendCommand;
175
+ /**
176
+ * Returns whether a domain is currently enabled.
177
+ * @param {string} domain
178
+ * @return {boolean}
179
+ */
180
+ isDomainEnabled(domain: string): boolean;
181
+ /**
182
+ * Return the body of the response with the given ID. Rejects if getting the
183
+ * body times out.
184
+ * @param {string} requestId
185
+ * @param {number} [timeout]
186
+ * @return {Promise<string>}
187
+ */
188
+ getRequestContent(requestId: string, timeout?: number | undefined): Promise<string>;
189
+ /**
190
+ * @param {{additionalTraceCategories?: string|null}=} settings
191
+ * @return {Promise<void>}
192
+ */
193
+ beginTrace(settings?: {
194
+ additionalTraceCategories?: string | null;
195
+ } | undefined): Promise<void>;
196
+ /**
197
+ * @return {Promise<LH.Trace>}
198
+ */
199
+ endTrace(): Promise<LH.Trace>;
200
+ /**
201
+ * Begin recording devtools protocol messages.
202
+ */
203
+ beginDevtoolsLog(): void;
204
+ /**
205
+ * Stop recording to devtoolsLog and return log contents.
206
+ * @return {LH.DevtoolsLog}
207
+ */
208
+ endDevtoolsLog(): LH.DevtoolsLog;
209
+ url(): Promise<string>;
210
+ }
211
+ import * as LH from "../../../types/lh.js";
212
+ import { ExecutionContext } from "../../gather/driver/execution-context.js";
213
+ import { Fetcher } from "../../gather/fetcher.js";
214
+ //# sourceMappingURL=driver.d.ts.map
@@ -8,6 +8,7 @@ import {EventEmitter} from 'events';
8
8
 
9
9
  import log from 'lighthouse-logger';
10
10
 
11
+ import * as LH from '../../../types/lh.js';
11
12
  import {Fetcher} from '../../gather/fetcher.js';
12
13
  import {ExecutionContext} from '../../gather/driver/execution-context.js';
13
14
  import {LighthouseError} from '../../lib/lh-error.js';
@@ -0,0 +1,166 @@
1
+ export type Driver = import('./driver.js').Driver;
2
+ export type ArbitraryEqualityMap = import('../../lib/arbitrary-equality-map.js').ArbitraryEqualityMap;
3
+ /**
4
+ * Each entry in each gatherer result array is the output of a gatherer phase:
5
+ * `beforePass`, `pass`, and `afterPass`. Flattened into an `LH.Artifacts` in
6
+ * `collectArtifacts`.
7
+ */
8
+ export type GathererResults = Record<keyof LH.GathererArtifacts, Array<LH.Gatherer.PhaseResult>>;
9
+ export type GathererResultsEntries = Array<[keyof GathererResults, GathererResults[keyof GathererResults]]>;
10
+ /** @typedef {import('./driver.js').Driver} Driver */
11
+ /** @typedef {import('../../lib/arbitrary-equality-map.js').ArbitraryEqualityMap} ArbitraryEqualityMap */
12
+ /**
13
+ * Each entry in each gatherer result array is the output of a gatherer phase:
14
+ * `beforePass`, `pass`, and `afterPass`. Flattened into an `LH.Artifacts` in
15
+ * `collectArtifacts`.
16
+ * @typedef {Record<keyof LH.GathererArtifacts, Array<LH.Gatherer.PhaseResult>>} GathererResults
17
+ */
18
+ /** @typedef {Array<[keyof GathererResults, GathererResults[keyof GathererResults]]>} GathererResultsEntries */
19
+ /**
20
+ * Class that drives browser to load the page and runs gatherer lifecycle hooks.
21
+ */
22
+ export class GatherRunner {
23
+ /**
24
+ * Loads about:blank and waits there briefly. Since a Page.reload command does
25
+ * not let a service worker take over, we navigate away and then come back to
26
+ * reload. We do not `waitForLoad` on about:blank since a page load event is
27
+ * never fired on it.
28
+ * @param {Driver} driver
29
+ * @param {string=} url
30
+ * @return {Promise<void>}
31
+ */
32
+ static loadBlank(driver: Driver, url?: string | undefined): Promise<void>;
33
+ /**
34
+ * Loads options.url with specified options. If the main document URL
35
+ * redirects, options.url will be updated accordingly. As such, options.url
36
+ * will always represent the post-redirected URL. options.requestedUrl is the
37
+ * pre-redirect starting URL. If the navigation errors with "expected" errors such as
38
+ * NO_FCP, a `navigationError` is returned.
39
+ * @param {Driver} driver
40
+ * @param {LH.Gatherer.PassContext} passContext
41
+ * @return {Promise<{navigationError?: LH.LighthouseError}>}
42
+ */
43
+ static loadPage(driver: Driver, passContext: LH.Gatherer.PassContext): Promise<{
44
+ navigationError?: LH.LighthouseError;
45
+ }>;
46
+ /**
47
+ * Rejects if any open tabs would share a service worker with the target URL.
48
+ * This includes the target tab, so navigation to something like about:blank
49
+ * should be done before calling.
50
+ * @param {LH.Gatherer.FRProtocolSession} session
51
+ * @param {string} pageUrl
52
+ * @return {Promise<void>}
53
+ */
54
+ static assertNoSameOriginServiceWorkerClients(session: LH.Gatherer.FRProtocolSession, pageUrl: string): Promise<void>;
55
+ /**
56
+ * @param {Driver} driver
57
+ * @param {{requestedUrl: string, settings: LH.Config.Settings}} options
58
+ * @return {Promise<void>}
59
+ */
60
+ static setupDriver(driver: Driver, options: {
61
+ requestedUrl: string;
62
+ settings: LH.Config.Settings;
63
+ }): Promise<void>;
64
+ /**
65
+ * Reset browser state where needed and release the connection.
66
+ * @param {Driver} driver
67
+ * @param {{requestedUrl: string, settings: LH.Config.Settings}} options
68
+ * @return {Promise<void>}
69
+ */
70
+ static disposeDriver(driver: Driver, options: {
71
+ requestedUrl: string;
72
+ settings: LH.Config.Settings;
73
+ }): Promise<void>;
74
+ /**
75
+ * Beging recording devtoolsLog and trace (if requested).
76
+ * @param {LH.Gatherer.PassContext} passContext
77
+ * @return {Promise<void>}
78
+ */
79
+ static beginRecording(passContext: LH.Gatherer.PassContext): Promise<void>;
80
+ /**
81
+ * End recording devtoolsLog and trace (if requested), returning an
82
+ * `LH.Gatherer.LoadData` with the recorded data.
83
+ * @param {LH.Gatherer.PassContext} passContext
84
+ * @return {Promise<LH.Gatherer.LoadData>}
85
+ */
86
+ static endRecording(passContext: LH.Gatherer.PassContext): Promise<LH.Gatherer.LoadData>;
87
+ /**
88
+ * Run beforePass() on gatherers.
89
+ * @param {LH.Gatherer.PassContext} passContext
90
+ * @param {Partial<GathererResults>} gathererResults
91
+ * @return {Promise<void>}
92
+ */
93
+ static beforePass(passContext: LH.Gatherer.PassContext, gathererResults: Partial<GathererResults>): Promise<void>;
94
+ /**
95
+ * Run pass() on gatherers.
96
+ * @param {LH.Gatherer.PassContext} passContext
97
+ * @param {Partial<GathererResults>} gathererResults
98
+ * @return {Promise<void>}
99
+ */
100
+ static pass(passContext: LH.Gatherer.PassContext, gathererResults: Partial<GathererResults>): Promise<void>;
101
+ /**
102
+ * Run afterPass() on gatherers.
103
+ * @param {LH.Gatherer.PassContext} passContext
104
+ * @param {LH.Gatherer.LoadData} loadData
105
+ * @param {Partial<GathererResults>} gathererResults
106
+ * @return {Promise<void>}
107
+ */
108
+ static afterPass(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData, gathererResults: Partial<GathererResults>): Promise<void>;
109
+ /**
110
+ * Takes the results of each gatherer phase for each gatherer and uses the
111
+ * last produced value (that's not undefined) as the artifact for that
112
+ * gatherer. If an error was rejected from a gatherer phase,
113
+ * uses that error object as the artifact instead.
114
+ * @param {Partial<GathererResults>} gathererResults
115
+ * @return {Promise<{artifacts: Partial<LH.GathererArtifacts>}>}
116
+ */
117
+ static collectArtifacts(gathererResults: Partial<GathererResults>): Promise<{
118
+ artifacts: Partial<LH.GathererArtifacts>;
119
+ }>;
120
+ /**
121
+ * Return an initialized but mostly empty set of base artifacts, to be
122
+ * populated as the run continues.
123
+ * @param {{driver: Driver, requestedUrl: string, settings: LH.Config.Settings}} options
124
+ * @return {Promise<LH.BaseArtifacts>}
125
+ */
126
+ static initializeBaseArtifacts(options: {
127
+ driver: Driver;
128
+ requestedUrl: string;
129
+ settings: LH.Config.Settings;
130
+ }): Promise<LH.BaseArtifacts>;
131
+ /**
132
+ * Populates the important base artifacts from a fully loaded test page.
133
+ * Currently must be run before `start-url` gatherer so that `WebAppManifest`
134
+ * will be available to it.
135
+ * @param {LH.Gatherer.PassContext} passContext
136
+ */
137
+ static populateBaseArtifacts(passContext: LH.Gatherer.PassContext): Promise<void>;
138
+ /**
139
+ * @param {Array<LH.Config.Pass>} passConfigs
140
+ * @param {{driver: Driver, requestedUrl: string, settings: LH.Config.Settings, computedCache: Map<string, ArbitraryEqualityMap>}} options
141
+ * @return {Promise<LH.Artifacts>}
142
+ */
143
+ static run(passConfigs: Array<LH.Config.Pass>, options: {
144
+ driver: Driver;
145
+ requestedUrl: string;
146
+ settings: LH.Config.Settings;
147
+ computedCache: Map<string, ArbitraryEqualityMap>;
148
+ }): Promise<LH.Artifacts>;
149
+ /**
150
+ * Save the devtoolsLog and trace (if applicable) to baseArtifacts.
151
+ * @param {LH.Gatherer.PassContext} passContext
152
+ * @param {LH.Gatherer.LoadData} loadData
153
+ * @param {string} passName
154
+ */
155
+ static _addLoadDataToBaseArtifacts(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData, passName: string): void;
156
+ /**
157
+ * Starting from about:blank, load the page and run gatherers for this pass.
158
+ * @param {LH.Gatherer.PassContext} passContext
159
+ * @return {Promise<{artifacts: Partial<LH.GathererArtifacts>, pageLoadError?: LH.LighthouseError}>}
160
+ */
161
+ static runPass(passContext: LH.Gatherer.PassContext): Promise<{
162
+ artifacts: Partial<LH.GathererArtifacts>;
163
+ pageLoadError?: import("../../lib/lh-error.js").LighthouseError | undefined;
164
+ }>;
165
+ }
166
+ //# sourceMappingURL=gather-runner.d.ts.map
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @fileoverview This class is designed to allow maps with arbitrary equality functions.
3
+ * It is not meant to be performant and is well-suited to use cases where the number of entries is
4
+ * likely to be small (like computed artifacts).
5
+ */
6
+ export class ArbitraryEqualityMap {
7
+ /**
8
+ * Determines whether two objects are deeply equal. Defers to lodash isEqual, but is kept here for
9
+ * easy usage by consumers.
10
+ * See https://lodash.com/docs/4.17.5#isEqual.
11
+ * @param {*} objA
12
+ * @param {*} objB
13
+ * @return {boolean}
14
+ */
15
+ static deepEquals(objA: any, objB: any): boolean;
16
+ _equalsFn: typeof ArbitraryEqualityMap.deepEquals;
17
+ /** @type {Array<{key: *, value: *}>} */
18
+ _entries: {
19
+ key: any;
20
+ value: any;
21
+ }[];
22
+ /**
23
+ * @param {function(*,*):boolean} equalsFn
24
+ */
25
+ setEqualityFn(equalsFn: (arg0: any, arg1: any) => boolean): void;
26
+ /**
27
+ * @param {*} key
28
+ * @return {boolean}
29
+ */
30
+ has(key: any): boolean;
31
+ /**
32
+ * @param {*} key
33
+ * @return {*}
34
+ */
35
+ get(key: any): any;
36
+ /**
37
+ * @param {*} key
38
+ * @param {*} value
39
+ */
40
+ set(key: any, value: any): void;
41
+ /**
42
+ * @param {*} key
43
+ * @return {number}
44
+ */
45
+ _findIndexOf(key: any): number;
46
+ }
47
+ //# sourceMappingURL=arbitrary-equality-map.d.ts.map
@@ -0,0 +1,101 @@
1
+ export type PreparedAssets = {
2
+ passName: string;
3
+ traceData: LH.Trace;
4
+ devtoolsLog: import("../index.js").DevtoolsLog;
5
+ };
6
+ /**
7
+ * Save artifacts object mostly to single file located at basePath/artifacts.json.
8
+ * Also save the traces & devtoolsLogs to their own files
9
+ * @param {LH.Artifacts} artifacts
10
+ * @param {string} basePath
11
+ * @return {Promise<void>}
12
+ */
13
+ export function saveArtifacts(artifacts: LH.Artifacts, basePath: string): Promise<void>;
14
+ /**
15
+ * Saves flow artifacts with the following file structure:
16
+ * flow/ -- Directory specified by `basePath`.
17
+ * options.json -- Flow options (e.g. flow name, flags).
18
+ * step0/ -- Directory containing artifacts for the first step.
19
+ * options.json -- First step's options (e.g. step flags).
20
+ * artifacts.json -- First step's artifacts except the DevTools log and trace.
21
+ * defaultPass.devtoolslog.json -- First step's DevTools log.
22
+ * defaultPass.trace.json -- First step's trace.
23
+ * step1/ -- Directory containing artifacts for the second step.
24
+ *
25
+ * @param {LH.UserFlow.FlowArtifacts} flowArtifacts
26
+ * @param {string} basePath
27
+ * @return {Promise<void>}
28
+ */
29
+ export function saveFlowArtifacts(flowArtifacts: LH.UserFlow.FlowArtifacts, basePath: string): Promise<void>;
30
+ /**
31
+ * Save LHR to file located at basePath/lhr.report.json.
32
+ * @param {LH.Result} lhr
33
+ * @param {string} basePath
34
+ */
35
+ export function saveLhr(lhr: LH.Result, basePath: string): void;
36
+ /**
37
+ * @typedef {object} PreparedAssets
38
+ * @property {string} passName
39
+ * @property {LH.Trace} traceData
40
+ * @property {LH.DevtoolsLog} devtoolsLog
41
+ */
42
+ /**
43
+ * Load artifacts object from files located within basePath
44
+ * Also save the traces to their own files
45
+ * @param {string} basePath
46
+ * @return {LH.Artifacts}
47
+ */
48
+ export function loadArtifacts(basePath: string): LH.Artifacts;
49
+ /**
50
+ * @param {string} basePath
51
+ * @return {LH.UserFlow.FlowArtifacts}
52
+ */
53
+ export function loadFlowArtifacts(basePath: string): LH.UserFlow.FlowArtifacts;
54
+ /**
55
+ * Writes trace(s) and associated asset(s) to disk.
56
+ * @param {LH.Artifacts} artifacts
57
+ * @param {LH.Result['audits']} audits
58
+ * @param {string} pathWithBasename
59
+ * @return {Promise<void>}
60
+ */
61
+ export function saveAssets(artifacts: LH.Artifacts, audits: LH.Result['audits'], pathWithBasename: string): Promise<void>;
62
+ /**
63
+ * Filter traces and extract screenshots to prepare for saving.
64
+ * @param {LH.Artifacts} artifacts
65
+ * @param {LH.Result['audits']} [audits]
66
+ * @return {Promise<Array<PreparedAssets>>}
67
+ */
68
+ export function prepareAssets(artifacts: LH.Artifacts, audits?: Record<string, import("../../types/lhr/audit-result.js").Result> | undefined): Promise<Array<PreparedAssets>>;
69
+ /**
70
+ * Save a trace as JSON by streaming to disk at traceFilename.
71
+ * @param {LH.Trace} traceData
72
+ * @param {string} traceFilename
73
+ * @return {Promise<void>}
74
+ */
75
+ export function saveTrace(traceData: LH.Trace, traceFilename: string): Promise<void>;
76
+ /**
77
+ * Save a devtoolsLog as JSON by streaming to disk at devtoolLogFilename.
78
+ * @param {LH.DevtoolsLog} devtoolsLog
79
+ * @param {string} devtoolLogFilename
80
+ * @return {Promise<void>}
81
+ */
82
+ export function saveDevtoolsLog(devtoolsLog: import("../index.js").DevtoolsLog, devtoolLogFilename: string): Promise<void>;
83
+ /**
84
+ * @param {LH.DevtoolsLog} devtoolsLog
85
+ * @param {string} outputPath
86
+ * @return {Promise<void>}
87
+ */
88
+ export function saveLanternNetworkData(devtoolsLog: import("../index.js").DevtoolsLog, outputPath: string): Promise<void>;
89
+ /**
90
+ * A replacer function for JSON.stingify of the artifacts. Used to serialize objects that
91
+ * JSON won't normally handle.
92
+ * @param {string} key
93
+ * @param {any} value
94
+ */
95
+ export function stringifyReplacer(key: string, value: any): any;
96
+ /**
97
+ * Normalize timing data so it doesn't change every update.
98
+ * @param {LH.Result.MeasureEntry[]} timings
99
+ */
100
+ export function normalizeTimingEntries(timings: LH.Result.MeasureEntry[]): void;
101
+ //# sourceMappingURL=asset-saver.d.ts.map
@@ -0,0 +1,2 @@
1
+ export const axeSource: string;
2
+ //# sourceMappingURL=axe.d.ts.map
@@ -0,0 +1,121 @@
1
+ /** @type {Record<string, {name: LH.IcuMessage} | undefined>} */
2
+ export const NotRestoredReasonDescription: Record<string, {
3
+ name: LH.IcuMessage;
4
+ } | undefined>;
5
+ export namespace UIStrings {
6
+ const notMainFrame: string;
7
+ const backForwardCacheDisabled: string;
8
+ const relatedActiveContentsExist: string;
9
+ const HTTPStatusNotOK: string;
10
+ const schemeNotHTTPOrHTTPS: string;
11
+ const loading: string;
12
+ const wasGrantedMediaAccess: string;
13
+ const HTTPMethodNotGET: string;
14
+ const subframeIsNavigating: string;
15
+ const timeout: string;
16
+ const cacheLimit: string;
17
+ const JavaScriptExecution: string;
18
+ const rendererProcessKilled: string;
19
+ const rendererProcessCrashed: string;
20
+ const grantedMediaStreamAccess: string;
21
+ const cacheFlushed: string;
22
+ const serviceWorkerVersionActivation: string;
23
+ const sessionRestored: string;
24
+ const serviceWorkerPostMessage: string;
25
+ const enteredBackForwardCacheBeforeServiceWorkerHostAdded: string;
26
+ const serviceWorkerClaim: string;
27
+ const haveInnerContents: string;
28
+ const timeoutPuttingInCache: string;
29
+ const backForwardCacheDisabledByLowMemory: string;
30
+ const backForwardCacheDisabledByCommandLine: string;
31
+ const networkRequestDatapipeDrainedAsBytesConsumer: string;
32
+ const networkRequestRedirected: string;
33
+ const networkRequestTimeout: string;
34
+ const networkExceedsBufferLimit: string;
35
+ const navigationCancelledWhileRestoring: string;
36
+ const backForwardCacheDisabledForPrerender: string;
37
+ const userAgentOverrideDiffers: string;
38
+ const foregroundCacheLimit: string;
39
+ const backForwardCacheDisabledForDelegate: string;
40
+ const unloadHandlerExistsInMainFrame: string;
41
+ const unloadHandlerExistsInSubFrame: string;
42
+ const serviceWorkerUnregistration: string;
43
+ const noResponseHead: string;
44
+ const cacheControlNoStore: string;
45
+ const ineligibleAPI: string;
46
+ const internalError: string;
47
+ const webSocket: string;
48
+ const webTransport: string;
49
+ const webRTC: string;
50
+ const mainResourceHasCacheControlNoStore: string;
51
+ const mainResourceHasCacheControlNoCache: string;
52
+ const subresourceHasCacheControlNoStore: string;
53
+ const subresourceHasCacheControlNoCache: string;
54
+ const containsPlugins: string;
55
+ const documentLoaded: string;
56
+ const dedicatedWorkerOrWorklet: string;
57
+ const outstandingNetworkRequestOthers: string;
58
+ const outstandingIndexedDBTransaction: string;
59
+ const requestedNotificationsPermission: string;
60
+ const requestedMIDIPermission: string;
61
+ const requestedAudioCapturePermission: string;
62
+ const requestedVideoCapturePermission: string;
63
+ const requestedBackForwardCacheBlockedSensors: string;
64
+ const requestedBackgroundWorkPermission: string;
65
+ const broadcastChannel: string;
66
+ const indexedDBConnection: string;
67
+ const webXR: string;
68
+ const sharedWorker: string;
69
+ const webLocks: string;
70
+ const webHID: string;
71
+ const webShare: string;
72
+ const requestedStorageAccessGrant: string;
73
+ const webNfc: string;
74
+ const outstandingNetworkRequestFetch: string;
75
+ const outstandingNetworkRequestXHR: string;
76
+ const appBanner: string;
77
+ const printing: string;
78
+ const webDatabase: string;
79
+ const pictureInPicture: string;
80
+ const portal: string;
81
+ const speechRecognizer: string;
82
+ const idleManager: string;
83
+ const paymentManager: string;
84
+ const speechSynthesis: string;
85
+ const keyboardLock: string;
86
+ const webOTPService: string;
87
+ const outstandingNetworkRequestDirectSocket: string;
88
+ const injectedJavascript: string;
89
+ const injectedStyleSheet: string;
90
+ const contentSecurityHandler: string;
91
+ const contentWebAuthenticationAPI: string;
92
+ const contentFileChooser: string;
93
+ const contentSerial: string;
94
+ const contentFileSystemAccess: string;
95
+ const contentMediaDevicesDispatcherHost: string;
96
+ const contentWebBluetooth: string;
97
+ const contentWebUSB: string;
98
+ const contentMediaSession: string;
99
+ const contentMediaSessionService: string;
100
+ const contentMediaPlay: string;
101
+ const contentScreenReader: string;
102
+ const embedderPopupBlockerTabHelper: string;
103
+ const embedderSafeBrowsingTriggeredPopupBlocker: string;
104
+ const embedderSafeBrowsingThreatDetails: string;
105
+ const embedderAppBannerManager: string;
106
+ const embedderDomDistillerViewerSource: string;
107
+ const embedderDomDistillerSelfDeletingRequestDelegate: string;
108
+ const embedderOomInterventionTabHelper: string;
109
+ const embedderOfflinePage: string;
110
+ const embedderChromePasswordManagerClientBindCredentialManager: string;
111
+ const embedderPermissionRequestManager: string;
112
+ const embedderModalDialog: string;
113
+ const embedderExtensions: string;
114
+ const embedderExtensionMessaging: string;
115
+ const embedderExtensionMessagingForOpenPort: string;
116
+ const embedderExtensionSentMessageToCachedFrame: string;
117
+ const errorDocument: string;
118
+ const fencedFramesEmbedder: string;
119
+ const keepaliveRequest: string;
120
+ }
121
+ //# sourceMappingURL=bf-cache-strings.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { ParsedURL };
2
+ import ParsedURL = require("./generated/ParsedURL.js");
3
+ //# sourceMappingURL=Common.d.ts.map