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.
- package/cli/bin.d.ts +5 -0
- package/cli/cli-flags.d.ts +258 -0
- package/cli/commands/commands.d.ts +4 -0
- package/cli/commands/list-audits.d.ts +2 -0
- package/cli/commands/list-locales.d.ts +2 -0
- package/cli/commands/list-trace-categories.d.ts +2 -0
- package/cli/index.d.ts +3 -0
- package/cli/printer.d.ts +28 -0
- package/cli/run.d.ts +24 -0
- package/cli/sentry-prompt.d.ts +5 -0
- package/cli/test/smokehouse/config/exclusions.d.ts +12 -0
- package/cli/test/smokehouse/core-tests.d.ts +4 -0
- package/cli/test/smokehouse/frontends/back-compat-util.d.ts +16 -0
- package/cli/test/smokehouse/frontends/lib.d.ts +8 -0
- package/cli/test/smokehouse/frontends/node.d.ts +2 -0
- package/cli/test/smokehouse/frontends/smokehouse-bin.d.ts +3 -0
- package/cli/test/smokehouse/lib/child-process-error.d.ts +21 -0
- package/cli/test/smokehouse/lib/concurrent-mapper.d.ts +78 -0
- package/cli/test/smokehouse/lib/local-console.d.ts +33 -0
- package/cli/test/smokehouse/lighthouse-runners/bundle.d.ts +16 -0
- package/cli/test/smokehouse/lighthouse-runners/cli.d.ts +18 -0
- package/cli/test/smokehouse/lighthouse-runners/devtools.d.ts +23 -0
- package/cli/test/smokehouse/report-assert-test.d.ts +2 -0
- package/cli/test/smokehouse/report-assert.d.ts +50 -0
- package/cli/test/smokehouse/smokehouse.d.ts +35 -0
- package/cli/test/smokehouse/version-check-test.d.ts +2 -0
- package/cli/test/smokehouse/version-check.d.ts +15 -0
- package/core/audits/accessibility/accesskeys.d.ts +10 -0
- package/core/audits/accessibility/aria-allowed-attr.d.ts +10 -0
- package/core/audits/accessibility/aria-command-name.d.ts +10 -0
- package/core/audits/accessibility/aria-hidden-body.d.ts +10 -0
- package/core/audits/accessibility/aria-hidden-focus.d.ts +10 -0
- package/core/audits/accessibility/aria-input-field-name.d.ts +10 -0
- package/core/audits/accessibility/aria-meter-name.d.ts +10 -0
- package/core/audits/accessibility/aria-progressbar-name.d.ts +10 -0
- package/core/audits/accessibility/aria-required-attr.d.ts +10 -0
- package/core/audits/accessibility/aria-required-children.d.ts +10 -0
- package/core/audits/accessibility/aria-required-parent.d.ts +10 -0
- package/core/audits/accessibility/aria-roles.d.ts +10 -0
- package/core/audits/accessibility/aria-toggle-field-name.d.ts +10 -0
- package/core/audits/accessibility/aria-tooltip-name.d.ts +10 -0
- package/core/audits/accessibility/aria-treeitem-name.d.ts +10 -0
- package/core/audits/accessibility/aria-valid-attr-value.d.ts +10 -0
- package/core/audits/accessibility/aria-valid-attr.d.ts +10 -0
- package/core/audits/accessibility/axe-audit.d.ts +17 -0
- package/core/audits/accessibility/button-name.d.ts +10 -0
- package/core/audits/accessibility/bypass.d.ts +10 -0
- package/core/audits/accessibility/color-contrast.d.ts +10 -0
- package/core/audits/accessibility/definition-list.d.ts +10 -0
- package/core/audits/accessibility/dlitem.d.ts +10 -0
- package/core/audits/accessibility/document-title.d.ts +10 -0
- package/core/audits/accessibility/duplicate-id-active.d.ts +10 -0
- package/core/audits/accessibility/duplicate-id-aria.d.ts +10 -0
- package/core/audits/accessibility/form-field-multiple-labels.d.ts +10 -0
- package/core/audits/accessibility/frame-title.d.ts +10 -0
- package/core/audits/accessibility/heading-order.d.ts +10 -0
- package/core/audits/accessibility/html-has-lang.d.ts +10 -0
- package/core/audits/accessibility/html-lang-valid.d.ts +10 -0
- package/core/audits/accessibility/image-alt.d.ts +10 -0
- package/core/audits/accessibility/input-image-alt.d.ts +10 -0
- package/core/audits/accessibility/label.d.ts +10 -0
- package/core/audits/accessibility/link-name.d.ts +10 -0
- package/core/audits/accessibility/list.d.ts +10 -0
- package/core/audits/accessibility/listitem.d.ts +10 -0
- package/core/audits/accessibility/manual/custom-controls-labels.d.ts +8 -0
- package/core/audits/accessibility/manual/custom-controls-roles.d.ts +8 -0
- package/core/audits/accessibility/manual/focus-traps.d.ts +8 -0
- package/core/audits/accessibility/manual/focusable-controls.d.ts +8 -0
- package/core/audits/accessibility/manual/interactive-element-affordance.d.ts +8 -0
- package/core/audits/accessibility/manual/logical-tab-order.d.ts +8 -0
- package/core/audits/accessibility/manual/managed-focus.d.ts +8 -0
- package/core/audits/accessibility/manual/offscreen-content-hidden.d.ts +9 -0
- package/core/audits/accessibility/manual/use-landmarks.d.ts +8 -0
- package/core/audits/accessibility/manual/visual-order-follows-dom.d.ts +8 -0
- package/core/audits/accessibility/meta-refresh.d.ts +10 -0
- package/core/audits/accessibility/meta-viewport.d.ts +10 -0
- package/core/audits/accessibility/object-alt.d.ts +10 -0
- package/core/audits/accessibility/tabindex.d.ts +10 -0
- package/core/audits/accessibility/td-headers-attr.d.ts +10 -0
- package/core/audits/accessibility/th-has-data-cells.d.ts +10 -0
- package/core/audits/accessibility/valid-lang.d.ts +10 -0
- package/core/audits/accessibility/video-caption.d.ts +10 -0
- package/core/audits/audit.d.ts +150 -0
- package/core/audits/audit.js +1 -0
- package/core/audits/autocomplete.d.ts +36 -0
- package/core/audits/bf-cache.d.ts +21 -0
- package/core/audits/bootup-time.d.ts +26 -0
- package/core/audits/byte-efficiency/byte-efficiency-audit.d.ts +82 -0
- package/core/audits/byte-efficiency/duplicated-javascript.d.ts +52 -0
- package/core/audits/byte-efficiency/efficient-animated-content.d.ts +23 -0
- package/core/audits/byte-efficiency/legacy-javascript.d.ts +99 -0
- package/core/audits/byte-efficiency/modern-image-formats.d.ts +38 -0
- package/core/audits/byte-efficiency/offscreen-images.d.ts +75 -0
- package/core/audits/byte-efficiency/render-blocking-resources.d.ts +55 -0
- package/core/audits/byte-efficiency/total-byte-weight.d.ts +21 -0
- package/core/audits/byte-efficiency/unminified-css.d.ts +36 -0
- package/core/audits/byte-efficiency/unminified-javascript.d.ts +37 -0
- package/core/audits/byte-efficiency/unused-css-rules.d.ts +16 -0
- package/core/audits/byte-efficiency/unused-javascript.d.ts +27 -0
- package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +61 -0
- package/core/audits/byte-efficiency/uses-optimized-images.d.ts +33 -0
- package/core/audits/byte-efficiency/uses-responsive-images-snapshot.d.ts +16 -0
- package/core/audits/byte-efficiency/uses-responsive-images.d.ts +45 -0
- package/core/audits/byte-efficiency/uses-text-compression.d.ts +14 -0
- package/core/audits/content-width.d.ts +17 -0
- package/core/audits/critical-request-chains.d.ts +44 -0
- package/core/audits/csp-xss.d.ts +51 -0
- package/core/audits/deprecations.d.ts +19 -0
- package/core/audits/diagnostics.d.ts +11 -0
- package/core/audits/dobetterweb/charset.d.ts +19 -0
- package/core/audits/dobetterweb/doctype.d.ts +21 -0
- package/core/audits/dobetterweb/dom-size.d.ts +26 -0
- package/core/audits/dobetterweb/geolocation-on-start.d.ts +16 -0
- package/core/audits/dobetterweb/inspector-issues.d.ts +45 -0
- package/core/audits/dobetterweb/js-libraries.d.ts +15 -0
- package/core/audits/dobetterweb/no-document-write.d.ts +16 -0
- package/core/audits/dobetterweb/notification-on-start.d.ts +16 -0
- package/core/audits/dobetterweb/password-inputs-can-be-pasted-into.d.ts +15 -0
- package/core/audits/dobetterweb/uses-http2.d.ts +69 -0
- package/core/audits/dobetterweb/uses-passive-event-listeners.d.ts +16 -0
- package/core/audits/errors-in-console.d.ts +31 -0
- package/core/audits/final-screenshot.d.ts +11 -0
- package/core/audits/font-display.d.ts +32 -0
- package/core/audits/image-aspect-ratio.d.ts +30 -0
- package/core/audits/image-size-responsive.d.ts +28 -0
- package/core/audits/installable-manifest.d.ts +118 -0
- package/core/audits/is-on-https.d.ts +23 -0
- package/core/audits/largest-contentful-paint-element.d.ts +14 -0
- package/core/audits/layout-shift-elements.d.ts +15 -0
- package/core/audits/lcp-lazy-loaded.d.ts +21 -0
- package/core/audits/long-tasks.d.ts +16 -0
- package/core/audits/main-thread-tasks.d.ts +11 -0
- package/core/audits/mainthread-work-breakdown.d.ts +28 -0
- package/core/audits/manual/manual-audit.d.ts +13 -0
- package/core/audits/manual/pwa-cross-browser.d.ts +12 -0
- package/core/audits/manual/pwa-each-page-has-url.d.ts +12 -0
- package/core/audits/manual/pwa-page-transitions.d.ts +12 -0
- package/core/audits/maskable-icon.d.ts +25 -0
- package/core/audits/metrics/cumulative-layout-shift.d.ts +21 -0
- package/core/audits/metrics/experimental-interaction-to-next-paint.d.ts +21 -0
- package/core/audits/metrics/first-contentful-paint-3g.d.ts +15 -0
- package/core/audits/metrics/first-contentful-paint.d.ts +25 -0
- package/core/audits/metrics/first-meaningful-paint.d.ts +28 -0
- package/core/audits/metrics/interactive.d.ts +31 -0
- package/core/audits/metrics/largest-contentful-paint.d.ts +25 -0
- package/core/audits/metrics/max-potential-fid.d.ts +23 -0
- package/core/audits/metrics/speed-index.d.ts +27 -0
- package/core/audits/metrics/total-blocking-time.d.ts +32 -0
- package/core/audits/metrics.d.ts +11 -0
- package/core/audits/multi-check-audit.d.ts +28 -0
- package/core/audits/network-requests.d.ts +11 -0
- package/core/audits/network-rtt.d.ts +15 -0
- package/core/audits/network-server-latency.d.ts +15 -0
- package/core/audits/no-unload-listeners.d.ts +16 -0
- package/core/audits/non-composited-animations.d.ts +21 -0
- package/core/audits/oopif-iframe-test-audit.d.ts +14 -0
- package/core/audits/performance-budget.d.ts +39 -0
- package/core/audits/predictive-perf.d.ts +11 -0
- package/core/audits/preload-fonts.d.ts +29 -0
- package/core/audits/preload-lcp-image.d.ts +67 -0
- package/core/audits/redirects.d.ts +33 -0
- package/core/audits/resource-summary.d.ts +16 -0
- package/core/audits/screenshot-thumbnails.d.ts +32 -0
- package/core/audits/script-elements-test-audit.d.ts +14 -0
- package/core/audits/script-treemap-data.d.ts +42 -0
- package/core/audits/seo/canonical.d.ts +51 -0
- package/core/audits/seo/crawlable-anchors.d.ts +16 -0
- package/core/audits/seo/font-size.d.ts +24 -0
- package/core/audits/seo/hreflang.d.ts +28 -0
- package/core/audits/seo/http-status-code.d.ts +16 -0
- package/core/audits/seo/is-crawlable.d.ts +38 -0
- package/core/audits/seo/link-text.d.ts +16 -0
- package/core/audits/seo/manual/structured-data.d.ts +12 -0
- package/core/audits/seo/meta-description.d.ts +16 -0
- package/core/audits/seo/plugins.d.ts +15 -0
- package/core/audits/seo/robots-txt.d.ts +18 -0
- package/core/audits/seo/tap-targets.d.ts +50 -0
- package/core/audits/server-response-time.d.ts +21 -0
- package/core/audits/service-worker.d.ts +46 -0
- package/core/audits/splash-screen.d.ts +37 -0
- package/core/audits/themed-omnibox.d.ts +42 -0
- package/core/audits/third-party-facades.d.ts +41 -0
- package/core/audits/third-party-summary.d.ts +58 -0
- package/core/audits/timing-budget.d.ts +43 -0
- package/core/audits/unsized-images.d.ts +39 -0
- package/core/audits/user-timings.d.ts +43 -0
- package/core/audits/uses-rel-preconnect.d.ts +37 -0
- package/core/audits/uses-rel-preload.d.ts +61 -0
- package/core/audits/valid-source-maps.d.ts +27 -0
- package/core/audits/viewport.d.ts +17 -0
- package/core/audits/violation-audit.d.ts +14 -0
- package/core/audits/work-during-interaction.d.ts +82 -0
- package/core/computed/computed-artifact.d.ts +15 -0
- package/core/computed/critical-request-chains.d.ts +40 -0
- package/core/computed/image-records.d.ts +24 -0
- package/core/computed/js-bundles.d.ts +13 -0
- package/core/computed/load-simulator.d.ts +28 -0
- package/core/computed/main-resource.d.ts +25 -0
- package/core/computed/main-thread-tasks.d.ts +15 -0
- package/core/computed/manifest-values.d.ts +24 -0
- package/core/computed/metrics/cumulative-layout-shift.d.ts +53 -0
- package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +19 -0
- package/core/computed/metrics/first-contentful-paint.d.ts +15 -0
- package/core/computed/metrics/first-meaningful-paint.d.ts +15 -0
- package/core/computed/metrics/interactive.d.ts +61 -0
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +48 -0
- package/core/computed/metrics/lantern-first-meaningful-paint.d.ts +12 -0
- package/core/computed/metrics/lantern-interactive.d.ts +31 -0
- package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +25 -0
- package/core/computed/metrics/lantern-max-potential-fid.d.ts +30 -0
- package/core/computed/metrics/lantern-metric.d.ts +78 -0
- package/core/computed/metrics/lantern-speed-index.d.ts +38 -0
- package/core/computed/metrics/lantern-total-blocking-time.d.ts +31 -0
- package/core/computed/metrics/largest-contentful-paint-all-frames.d.ts +20 -0
- package/core/computed/metrics/largest-contentful-paint.d.ts +15 -0
- package/core/computed/metrics/max-potential-fid.d.ts +15 -0
- package/core/computed/metrics/metric.d.ts +38 -0
- package/core/computed/metrics/navigation-metric.d.ts +16 -0
- package/core/computed/metrics/responsiveness.d.ts +87 -0
- package/core/computed/metrics/speed-index.d.ts +10 -0
- package/core/computed/metrics/tbt-utils.d.ts +18 -0
- package/core/computed/metrics/timing-summary.d.ts +46 -0
- package/core/computed/metrics/total-blocking-time.d.ts +23 -0
- package/core/computed/module-duplication.d.ts +37 -0
- package/core/computed/network-analysis.d.ts +20 -0
- package/core/computed/network-records.d.ts +15 -0
- package/core/computed/network-records.js +1 -0
- package/core/computed/page-dependency-graph.d.ts +88 -0
- package/core/computed/processed-navigation.d.ts +15 -0
- package/core/computed/processed-trace.d.ts +14 -0
- package/core/computed/resource-summary.d.ts +44 -0
- package/core/computed/screenshots.d.ts +20 -0
- package/core/computed/speedline.d.ts +15 -0
- package/core/computed/unused-css.d.ts +62 -0
- package/core/computed/unused-javascript-summary.d.ts +71 -0
- package/core/computed/user-timings.d.ts +31 -0
- package/core/computed/viewport-meta.d.ts +35 -0
- package/core/config/budget.d.ts +74 -0
- package/core/config/config-helpers.d.ts +94 -0
- package/core/config/config-plugin.d.ts +46 -0
- package/core/config/config.d.ts +28 -0
- package/core/config/constants.d.ts +86 -0
- package/core/config/default-config.d.ts +5 -0
- package/core/config/default-config.js +1 -0
- package/core/config/desktop-config.d.ts +5 -0
- package/core/config/desktop-config.js +1 -0
- package/core/config/experimental-config.d.ts +13 -0
- package/core/config/filters.d.ts +83 -0
- package/core/config/full-config.d.ts +9 -0
- package/core/config/lr-desktop-config.d.ts +4 -0
- package/core/config/lr-mobile-config.d.ts +9 -0
- package/core/config/metrics-to-audits.d.ts +19 -0
- package/core/config/perf-config.d.ts +9 -0
- package/core/config/validation.d.ts +77 -0
- package/core/gather/base-artifacts.d.ts +16 -0
- package/core/gather/base-gatherer.d.ts +72 -0
- package/core/gather/base-gatherer.js +2 -0
- package/core/gather/driver/dom.d.ts +20 -0
- package/core/gather/driver/environment.d.ts +35 -0
- package/core/gather/driver/execution-context.d.ts +101 -0
- package/core/gather/driver/execution-context.js +1 -7
- package/core/gather/driver/navigation.d.ts +33 -0
- package/core/gather/driver/network-monitor.d.ts +82 -0
- package/core/gather/driver/network.d.ts +10 -0
- package/core/gather/driver/prepare.d.ts +46 -0
- package/core/gather/driver/service-workers.d.ts +16 -0
- package/core/gather/driver/storage.d.ts +24 -0
- package/core/gather/driver/target-manager.d.ts +61 -0
- package/core/gather/driver/wait-for-condition.d.ts +116 -0
- package/core/gather/driver/wait-for-condition.js +3 -2
- package/core/gather/driver.d.ts +30 -0
- package/core/gather/fetcher.d.ts +63 -0
- package/core/gather/fetcher.js +2 -0
- package/core/gather/gatherers/accessibility.d.ts +23 -0
- package/core/gather/gatherers/anchor-elements.d.ts +10 -0
- package/core/gather/gatherers/bf-cache-failures.d.ts +43 -0
- package/core/gather/gatherers/cache-contents.d.ts +11 -0
- package/core/gather/gatherers/console-messages.d.ts +39 -0
- package/core/gather/gatherers/css-usage.d.ts +39 -0
- package/core/gather/gatherers/devtools-log-compat.d.ts +13 -0
- package/core/gather/gatherers/devtools-log.d.ts +48 -0
- package/core/gather/gatherers/dobetterweb/doctype.d.ts +10 -0
- package/core/gather/gatherers/dobetterweb/domstats.d.ts +10 -0
- package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +61 -0
- package/core/gather/gatherers/dobetterweb/password-inputs-with-prevented-paste.d.ts +10 -0
- package/core/gather/gatherers/dobetterweb/response-compression.d.ts +30 -0
- package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.d.ts +53 -0
- package/core/gather/gatherers/full-page-screenshot.d.ts +35 -0
- package/core/gather/gatherers/gatherer.d.ts +46 -0
- package/core/gather/gatherers/global-listeners.d.ts +27 -0
- package/core/gather/gatherers/iframe-elements.d.ts +11 -0
- package/core/gather/gatherers/image-elements.d.ts +35 -0
- package/core/gather/gatherers/inputs.d.ts +10 -0
- package/core/gather/gatherers/inspector-issues.d.ts +38 -0
- package/core/gather/gatherers/installability-errors.d.ts +17 -0
- package/core/gather/gatherers/js-usage.d.ts +22 -0
- package/core/gather/gatherers/link-elements.d.ts +39 -0
- package/core/gather/gatherers/main-document-content.d.ts +27 -0
- package/core/gather/gatherers/meta-elements.d.ts +10 -0
- package/core/gather/gatherers/network-user-agent.d.ts +18 -0
- package/core/gather/gatherers/script-elements.d.ts +26 -0
- package/core/gather/gatherers/scripts.d.ts +27 -0
- package/core/gather/gatherers/seo/embedded-content.d.ts +10 -0
- package/core/gather/gatherers/seo/font-size.d.ts +131 -0
- package/core/gather/gatherers/seo/robots-txt.d.ts +10 -0
- package/core/gather/gatherers/seo/tap-targets.d.ts +21 -0
- package/core/gather/gatherers/service-worker.d.ts +16 -0
- package/core/gather/gatherers/source-maps.d.ts +50 -0
- package/core/gather/gatherers/stacks.d.ts +38 -0
- package/core/gather/gatherers/trace-compat.d.ts +13 -0
- package/core/gather/gatherers/trace-elements.d.ts +83 -0
- package/core/gather/gatherers/trace.d.ts +23 -0
- package/core/gather/gatherers/viewport-dimensions.d.ts +10 -0
- package/core/gather/gatherers/web-app-manifest.d.ts +32 -0
- package/core/gather/navigation-runner.d.ts +92 -0
- package/core/gather/runner-helpers.d.ts +39 -0
- package/core/gather/session.d.ts +50 -0
- package/core/gather/snapshot-runner.d.ts +10 -0
- package/core/gather/timespan-runner.d.ts +12 -0
- package/core/index.d.cts +4 -0
- package/core/index.d.ts +88 -0
- package/core/index.js +2 -0
- package/core/legacy/config/config.d.ts +107 -0
- package/core/legacy/config/legacy-default-config.d.ts +4 -0
- package/core/legacy/gather/connections/connection.d.ts +75 -0
- package/core/legacy/gather/connections/connection.js +1 -0
- package/core/legacy/gather/connections/cri.d.ts +27 -0
- package/core/legacy/gather/connections/raw.d.ts +20 -0
- package/core/legacy/gather/driver.d.ts +214 -0
- package/core/legacy/gather/driver.js +1 -0
- package/core/legacy/gather/gather-runner.d.ts +166 -0
- package/core/lib/arbitrary-equality-map.d.ts +47 -0
- package/core/lib/asset-saver.d.ts +101 -0
- package/core/lib/axe.d.ts +2 -0
- package/core/lib/bf-cache-strings.d.ts +121 -0
- package/core/lib/cdt/Common.d.ts +3 -0
- package/core/lib/cdt/Platform.d.ts +26 -0
- package/core/lib/cdt/SDK.d.ts +2 -0
- package/core/lib/cdt/generated/ParsedURL.d.ts +28 -0
- package/core/lib/cdt/generated/SourceMap.d.ts +100 -0
- package/core/lib/csp-evaluator.d.ts +41 -0
- package/core/lib/dependency-graph/base-node.d.ts +161 -0
- package/core/lib/dependency-graph/cpu-node.d.ts +34 -0
- package/core/lib/dependency-graph/cpu-node.js +1 -0
- package/core/lib/dependency-graph/network-node.d.ts +43 -0
- package/core/lib/dependency-graph/network-node.js +1 -0
- package/core/lib/dependency-graph/simulator/connection-pool.d.ts +58 -0
- package/core/lib/dependency-graph/simulator/connection-pool.js +1 -0
- package/core/lib/dependency-graph/simulator/dns-cache.d.ts +42 -0
- package/core/lib/dependency-graph/simulator/dns-cache.js +2 -0
- package/core/lib/dependency-graph/simulator/network-analyzer.d.ts +166 -0
- package/core/lib/dependency-graph/simulator/simulator-timing-map.d.ts +153 -0
- package/core/lib/dependency-graph/simulator/simulator-timing-map.js +2 -2
- package/core/lib/dependency-graph/simulator/simulator.d.ts +154 -0
- package/core/lib/dependency-graph/simulator/simulator.js +3 -2
- package/core/lib/dependency-graph/simulator/tcp-connection.d.ts +89 -0
- package/core/lib/deprecations-strings.d.ts +66 -0
- package/core/lib/emulation.d.ts +43 -0
- package/core/lib/i18n/i18n.d.ts +81 -0
- package/core/lib/icons.d.ts +22 -0
- package/core/lib/lantern-trace-saver.d.ts +20 -0
- package/core/lib/lh-env.d.ts +2 -0
- package/core/lib/lh-error.d.ts +328 -0
- package/core/lib/lh-trace-processor.d.ts +5 -0
- package/core/lib/manifest-parser.d.ts +186 -0
- package/core/lib/median-run.d.ts +17 -0
- package/core/lib/minification-estimator.d.ts +9 -0
- package/core/lib/minify-devtoolslog.d.ts +6 -0
- package/core/lib/minify-trace.d.ts +6 -0
- package/core/lib/navigation-error.d.ts +39 -0
- package/core/lib/network-recorder.d.ts +115 -0
- package/core/lib/network-request.d.ts +245 -0
- package/core/lib/network-request.js +1 -0
- package/core/lib/page-functions.d.ts +149 -0
- package/core/lib/proto-preprocessor.d.ts +13 -0
- package/core/lib/rect-helpers.d.ts +100 -0
- package/core/lib/script-helpers.d.ts +17 -0
- package/core/lib/sentry.d.ts +32 -0
- package/core/lib/stack-packs.d.ts +16 -0
- package/core/lib/statistics.d.ts +28 -0
- package/core/lib/tappable-rects.d.ts +8 -0
- package/core/lib/third-party-web.d.ts +32 -0
- package/core/lib/timing-trace-saver.d.ts +21 -0
- package/core/lib/tracehouse/cpu-profile-model.d.ts +228 -0
- package/core/lib/tracehouse/main-thread-tasks.d.ts +162 -0
- package/core/lib/tracehouse/main-thread-tasks.js +1 -0
- package/core/lib/tracehouse/task-groups.d.ts +66 -0
- package/core/lib/tracehouse/task-summary.d.ts +18 -0
- package/core/lib/tracehouse/trace-processor.d.ts +275 -0
- package/core/lib/traces/metric-trace-events.d.ts +65 -0
- package/core/lib/url-utils.d.ts +100 -0
- package/core/runner.d.ts +109 -0
- package/core/scoring.d.ts +26 -0
- package/core/user-flow.d.ts +106 -0
- package/core/user-flow.js +1 -0
- package/core/util.d.cts +230 -0
- package/eslint-local-rules.d.cts +6 -0
- package/esm-utils.d.ts +14 -0
- package/flow-report/api.d.ts +7 -0
- package/flow-report/clients/standalone.d.ts +7 -0
- package/flow-report/src/app.d.ts +11 -0
- package/flow-report/src/common.d.ts +20 -0
- package/flow-report/src/header.d.ts +10 -0
- package/flow-report/src/help-dialog.d.ts +10 -0
- package/flow-report/src/i18n/i18n.d.ts +209 -0
- package/flow-report/src/i18n/localized-strings.d.ts +9 -0
- package/flow-report/src/i18n/ui-strings.d.ts +48 -0
- package/flow-report/src/icons.d.ts +18 -0
- package/flow-report/src/sidebar/flow.d.ts +8 -0
- package/flow-report/src/sidebar/sidebar.d.ts +17 -0
- package/flow-report/src/summary/category.d.ts +19 -0
- package/flow-report/src/summary/summary.d.ts +18 -0
- package/flow-report/src/topbar.d.ts +15 -0
- package/flow-report/src/util.d.ts +30 -0
- package/flow-report/src/wrappers/category-score.d.ts +12 -0
- package/flow-report/src/wrappers/markdown.d.ts +10 -0
- package/flow-report/src/wrappers/report.d.ts +10 -0
- package/flow-report/src/wrappers/styles.d.ts +8 -0
- package/flow-report/test/app-test.d.ts +7 -0
- package/flow-report/test/common-test.d.ts +7 -0
- package/flow-report/test/flow-report-pptr-test.d.ts +7 -0
- package/flow-report/test/header-test.d.ts +7 -0
- package/flow-report/test/sample-flow.d.ts +7 -0
- package/flow-report/test/setup/env-setup.d.ts +11 -0
- package/flow-report/test/sidebar/flow-test.d.ts +7 -0
- package/flow-report/test/sidebar/sidebar-test.d.ts +7 -0
- package/flow-report/test/summary/category-test.d.ts +7 -0
- package/flow-report/test/summary/summary-test.d.ts +7 -0
- package/flow-report/test/topbar-test.d.ts +7 -0
- package/flow-report/test/util-test.d.ts +7 -0
- package/flow-report/test/wrappers/category-score-test.d.ts +7 -0
- package/flow-report/test/wrappers/markdown-test.d.ts +7 -0
- package/flow-report/tsconfig.json +1 -1
- package/package.json +5 -2
- package/report/clients/bundle.d.ts +6 -0
- package/report/clients/standalone.d.ts +2 -0
- package/report/generator/file-namer.d.ts +35 -0
- package/report/generator/flow-report-assets.d.ts +9 -0
- package/report/generator/report-assets.d.ts +8 -0
- package/report/generator/report-generator.d.ts +59 -0
- package/report/renderer/api.d.ts +31 -0
- package/report/renderer/category-renderer.d.ts +176 -0
- package/report/renderer/components.d.ts +10 -0
- package/report/renderer/crc-details-renderer.d.ts +73 -0
- package/report/renderer/details-renderer.d.ts +141 -0
- package/report/renderer/dom.d.ts +125 -0
- package/report/renderer/drop-down-menu.d.ts +70 -0
- package/report/renderer/element-screenshot-renderer.d.ts +79 -0
- package/report/renderer/features-util.d.ts +13 -0
- package/report/renderer/i18n.d.ts +106 -0
- package/report/renderer/logger.d.ts +47 -0
- package/report/renderer/open-tab.d.ts +19 -0
- package/report/renderer/performance-category-renderer.d.ts +56 -0
- package/report/renderer/pwa-category-renderer.d.ts +55 -0
- package/report/renderer/report-renderer.d.ts +57 -0
- package/report/renderer/report-ui-features.d.ts +71 -0
- package/report/renderer/snippet-renderer.d.ts +85 -0
- package/report/renderer/swap-locale-feature.d.ts +31 -0
- package/report/renderer/text-encoding.d.ts +26 -0
- package/report/renderer/topbar-features.d.ts +82 -0
- package/report/renderer/util.d.ts +230 -0
- package/report/test-assets/faux-psi.d.ts +34 -0
- package/report/types/augment-dom.d.ts +1 -1
- package/root.d.ts +3 -0
- package/shared/localization/format.d.ts +106 -0
- package/shared/localization/i18n-module.d.ts +4 -0
- package/shared/localization/locales.d.ts +7 -0
- package/shared/localization/swap-flow-locale.d.ts +6 -0
- package/shared/localization/swap-locale.d.ts +39 -0
- package/shared/type-verifiers.d.ts +23 -0
- package/third-party/axe/valid-langs.d.ts +9 -0
- package/types/artifacts.d.ts +40 -38
- package/types/audit.d.ts +6 -6
- package/types/config.d.ts +3 -3
- package/types/externs.d.ts +7 -3
- package/types/gatherer.d.ts +27 -21
- package/types/{cssstyle/index.d.ts → internal/cssstyle.d.ts} +0 -0
- package/types/{enquirer.d.ts → internal/enquirer.d.ts} +0 -0
- package/types/{es-main.d.ts → internal/es-main.d.ts} +0 -0
- package/types/internal/global.d.ts +15 -0
- package/types/{http-link-header/index.d.ts → internal/http-link-header.d.ts} +0 -0
- package/types/{jsonlint-mod.d.ts → internal/jsonlint-mod.d.ts} +0 -0
- package/types/{lighthouse-logger/index.d.ts → internal/lighthouse-logger.d.ts} +0 -0
- package/types/{lookup-closest-locale/index.d.ts → internal/lookup-closest-locale.d.ts} +3 -1
- package/types/{metaviewport-parser/index.d.ts → internal/metaviewport-parser.d.ts} +0 -0
- package/types/{node-fetch.d.ts → internal/node-fetch.d.ts} +0 -0
- package/types/{node.d.ts → internal/node.d.ts} +0 -0
- package/types/{parse-cache-control/index.d.ts → internal/parse-cache-control.d.ts} +0 -0
- package/types/{pretty-json-stringify/index.d.ts → internal/pretty-json-stringify.d.ts} +0 -0
- package/types/{query-selector.d.ts → internal/query-selector.d.ts} +1 -1
- package/types/{rollup-plugin-postprocess.d.ts → internal/rollup-plugin-postprocess.d.ts} +0 -0
- package/types/{smokehouse.d.ts → internal/smokehouse.d.ts} +3 -3
- package/types/{test.d.ts → internal/test.d.ts} +0 -0
- package/types/lh.d.ts +81 -0
- package/types/lh.js +13 -0
- package/types/lhr/audit-details.d.ts +2 -2
- package/types/lhr/audit-result.d.ts +2 -2
- package/types/lhr/flow-result.d.ts +1 -1
- package/types/lhr/lhr.d.ts +2 -2
- package/types/lhr/settings.d.ts +1 -1
- package/types/lhr/treemap.d.ts +2 -2
- package/types/protocol.d.ts +8 -3
- package/types/puppeteer.d.ts +11 -6
- package/types/user-flow.d.ts +14 -5
- package/types/global-lh.d.ts +0 -85
package/types/audit.d.ts
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {ArbitraryEqualityMap} from '../core/lib/arbitrary-equality-map.js';
|
|
8
|
-
import {Artifacts} from './artifacts';
|
|
9
|
-
import AuditDetails from './lhr/audit-details';
|
|
10
|
-
import Config from './config';
|
|
11
|
-
import Gatherer from './gatherer';
|
|
12
|
-
import {IcuMessage} from './lhr/i18n';
|
|
13
|
-
import * as AuditResult from './lhr/audit-result';
|
|
8
|
+
import {Artifacts} from './artifacts.js';
|
|
9
|
+
import AuditDetails from './lhr/audit-details.js';
|
|
10
|
+
import Config from './config.js';
|
|
11
|
+
import Gatherer from './gatherer.js';
|
|
12
|
+
import {IcuMessage} from './lhr/i18n.js';
|
|
13
|
+
import * as AuditResult from './lhr/audit-result.js';
|
|
14
14
|
import Util from './utility-types.js';
|
|
15
15
|
|
|
16
16
|
declare module Audit {
|
package/types/config.d.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import {Audit} from '../core/audits/audit.js';
|
|
9
|
-
import {SharedFlagsSettings, ConfigSettings} from './lhr/settings';
|
|
10
|
-
import Gatherer from './gatherer';
|
|
11
|
-
import {IcuMessage} from './lhr/i18n';
|
|
9
|
+
import {SharedFlagsSettings, ConfigSettings} from './lhr/settings.js';
|
|
10
|
+
import Gatherer from './gatherer.js';
|
|
11
|
+
import {IcuMessage} from './lhr/i18n.js';
|
|
12
12
|
|
|
13
13
|
interface ClassOf<T> {
|
|
14
14
|
new (): T;
|
package/types/externs.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {Artifacts} from './artifacts';
|
|
8
|
-
import LHResult from './lhr/lhr';
|
|
9
|
-
import {SharedFlagsSettings, OutputMode} from './lhr/settings';
|
|
7
|
+
import {Artifacts} from './artifacts.js';
|
|
8
|
+
import LHResult from './lhr/lhr.js';
|
|
9
|
+
import {SharedFlagsSettings, OutputMode} from './lhr/settings.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Extends the flags in SharedFlagsSettings with flags used to configure the
|
|
@@ -71,6 +71,10 @@ export interface CliFlags extends Flags {
|
|
|
71
71
|
export interface RunnerResult {
|
|
72
72
|
lhr: LHResult;
|
|
73
73
|
report: string|string[];
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
* WARNING: Some artifacts are not guaranteed to be stable. The structure is subject to change in minor releases.
|
|
77
|
+
*/
|
|
74
78
|
artifacts: Artifacts;
|
|
75
79
|
}
|
|
76
80
|
|
package/types/gatherer.d.ts
CHANGED
|
@@ -4,32 +4,38 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
7
|
+
import {Protocol as Crdp} from 'devtools-protocol/types/protocol.js';
|
|
8
|
+
import {ProtocolMapping as CrdpMappings} from 'devtools-protocol/types/protocol-mapping.js';
|
|
9
|
+
|
|
10
|
+
import {NetworkNode as _NetworkNode} from '../core/lib/dependency-graph/network-node.js';
|
|
11
|
+
import {CPUNode as _CPUNode} from '../core/lib/dependency-graph/cpu-node.js';
|
|
12
|
+
import {Simulator as _Simulator} from '../core/lib/dependency-graph/simulator/simulator.js';
|
|
13
|
+
import {Driver} from '../core/legacy/gather/driver.js';
|
|
14
|
+
import {ExecutionContext} from '../core/gather/driver/execution-context.js';
|
|
15
|
+
import {Fetcher} from '../core/gather/fetcher.js';
|
|
16
|
+
import {ArbitraryEqualityMap} from '../core/lib/arbitrary-equality-map.js';
|
|
17
|
+
|
|
18
|
+
import {Artifacts, BaseArtifacts, FRBaseArtifacts, GathererArtifacts, DevtoolsLog, Trace} from './artifacts.js';
|
|
19
|
+
import Config from './config.js';
|
|
20
|
+
import {IcuMessage} from './lhr/i18n.js';
|
|
21
|
+
import Result from './lhr/lhr.js';
|
|
22
|
+
import Protocol from './protocol.js';
|
|
23
|
+
import Puppeteer from './puppeteer.js';
|
|
24
|
+
|
|
25
|
+
type CrdpEvents = CrdpMappings.Events;
|
|
26
|
+
type CrdpCommands = CrdpMappings.Commands;
|
|
21
27
|
|
|
22
28
|
declare module Gatherer {
|
|
23
29
|
/** The Lighthouse wrapper around a raw CDP session. */
|
|
24
30
|
interface FRProtocolSession {
|
|
25
|
-
setTargetInfo(targetInfo:
|
|
31
|
+
setTargetInfo(targetInfo: Crdp.Target.TargetInfo): void;
|
|
26
32
|
hasNextProtocolTimeout(): boolean;
|
|
27
33
|
getNextProtocolTimeout(): number;
|
|
28
34
|
setNextProtocolTimeout(ms: number): void;
|
|
29
|
-
on<TEvent extends keyof
|
|
30
|
-
once<TEvent extends keyof
|
|
31
|
-
off<TEvent extends keyof
|
|
32
|
-
sendCommand<TMethod extends keyof
|
|
35
|
+
on<TEvent extends keyof CrdpEvents>(event: TEvent, callback: (...args: CrdpEvents[TEvent]) => void): void;
|
|
36
|
+
once<TEvent extends keyof CrdpEvents>(event: TEvent, callback: (...args: CrdpEvents[TEvent]) => void): void;
|
|
37
|
+
off<TEvent extends keyof CrdpEvents>(event: TEvent, callback: (...args: CrdpEvents[TEvent]) => void): void;
|
|
38
|
+
sendCommand<TMethod extends keyof CrdpCommands>(method: TMethod, ...params: CrdpCommands[TMethod]['paramsType']): Promise<CrdpCommands[TMethod]['returnType']>;
|
|
33
39
|
dispose(): Promise<void>;
|
|
34
40
|
}
|
|
35
41
|
|
|
@@ -53,7 +59,7 @@ declare module Gatherer {
|
|
|
53
59
|
/** The connection to the page being analyzed. */
|
|
54
60
|
driver: FRTransitionalDriver;
|
|
55
61
|
/** The Puppeteer page handle. Will be undefined in legacy navigation mode. */
|
|
56
|
-
page?:
|
|
62
|
+
page?: Puppeteer.Page;
|
|
57
63
|
/** The set of base artifacts that are always collected. */
|
|
58
64
|
baseArtifacts: FRBaseArtifacts;
|
|
59
65
|
/** The cached results of computed artifacts. */
|
|
@@ -149,7 +155,7 @@ declare module Gatherer {
|
|
|
149
155
|
type AnyFRGathererInstance = FRGathererInstanceExpander<Gatherer.DependencyKey>
|
|
150
156
|
|
|
151
157
|
namespace Simulation {
|
|
152
|
-
type GraphNode = import('../core/lib/dependency-graph/base-node').Node;
|
|
158
|
+
type GraphNode = import('../core/lib/dependency-graph/base-node.js').Node;
|
|
153
159
|
type GraphNetworkNode = _NetworkNode;
|
|
154
160
|
type GraphCPUNode = _CPUNode;
|
|
155
161
|
type Simulator = _Simulator;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright 2023 The Lighthouse Authors. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview Most of our files use the global `LH` namespace to access our types.
|
|
9
|
+
* This file allows us to use the global namespace while iteratively converting files to use direct type imports.
|
|
10
|
+
* TODO: Remove this file and import all types directly.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export * from '../lh.js';
|
|
14
|
+
|
|
15
|
+
export as namespace LH;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
type Locale = import('../lhr/settings.js').Locale;
|
|
8
|
+
|
|
7
9
|
declare module 'lookup-closest-locale' {
|
|
8
|
-
function lookupClosestLocale(locale: string[]|string|undefined, available: Record<
|
|
10
|
+
function lookupClosestLocale(locale: string[]|string|undefined, available: Record<Locale, any>): Locale|undefined;
|
|
9
11
|
|
|
10
12
|
export = lookupClosestLocale;
|
|
11
13
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @fileoverview Stricter querySelector/querySelectorAll using typed-query-selector.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {ParseSelectorToTagNames} from 'typed-query-selector/parser';
|
|
11
|
+
import {ParseSelectorToTagNames} from 'typed-query-selector/parser.js';
|
|
12
12
|
|
|
13
13
|
/** Merge properties of the types in union `T`. Where properties overlap, property types becomes the union of the two (or more) possible types. */
|
|
14
14
|
type MergeTypes<T> = {
|
|
File without changes
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {Artifacts} from '
|
|
8
|
-
import Config from '
|
|
9
|
-
import LHResult from '
|
|
7
|
+
import {Artifacts} from '../artifacts.js';
|
|
8
|
+
import Config from '../config.js';
|
|
9
|
+
import LHResult from '../lhr/lhr.js';
|
|
10
10
|
|
|
11
11
|
declare global {
|
|
12
12
|
module Smokehouse {
|
|
File without changes
|
package/types/lh.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright 2023 The Lighthouse Authors. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {ArbitraryEqualityMap as ArbitraryEqualityMap_} from '../core/lib/arbitrary-equality-map.js';
|
|
8
|
+
import * as Artifacts_ from './artifacts.js';
|
|
9
|
+
import Audit_ from './audit.js';
|
|
10
|
+
import Budget_ from './lhr/budget.js';
|
|
11
|
+
import Config_ from './config.js';
|
|
12
|
+
import {Protocol as _Crdp} from 'devtools-protocol/types/protocol.js';
|
|
13
|
+
import {ProtocolMapping as _CrdpMappings} from 'devtools-protocol/types/protocol-mapping.js';
|
|
14
|
+
import * as Externs from './externs.js';
|
|
15
|
+
import Gatherer_ from './gatherer.js';
|
|
16
|
+
import * as I18n from './lhr/i18n.js';
|
|
17
|
+
import {LighthouseError as LighthouseError_} from '../core/lib/lh-error.js';
|
|
18
|
+
import LHResult from './lhr/lhr.js';
|
|
19
|
+
import FlowResult_ from './lhr/flow-result.js';
|
|
20
|
+
import Protocol_ from './protocol.js';
|
|
21
|
+
import * as Settings from './lhr/settings.js';
|
|
22
|
+
import Treemap_ from './lhr/treemap.js';
|
|
23
|
+
import UserFlow_ from './user-flow.js';
|
|
24
|
+
import Puppeteer_ from './puppeteer.js';
|
|
25
|
+
import Util_ from './utility-types.js';
|
|
26
|
+
|
|
27
|
+
// Construct hierarchy of global types under the LH namespace.
|
|
28
|
+
export type ArbitraryEqualityMap = ArbitraryEqualityMap_;
|
|
29
|
+
export type NavigationRequestor = string | (() => Promise<void> | void);
|
|
30
|
+
|
|
31
|
+
export import Util = Util_;
|
|
32
|
+
|
|
33
|
+
export import Puppeteer = Puppeteer_;
|
|
34
|
+
|
|
35
|
+
// artifacts.d.ts
|
|
36
|
+
export import Artifacts = Artifacts_.Artifacts;
|
|
37
|
+
export import BaseArtifacts = Artifacts_.BaseArtifacts;
|
|
38
|
+
export import FRArtifacts = Artifacts_.FRArtifacts;
|
|
39
|
+
export import FRBaseArtifacts = Artifacts_.FRBaseArtifacts;
|
|
40
|
+
export import GathererArtifacts = Artifacts_.GathererArtifacts;
|
|
41
|
+
export import DevtoolsLog = Artifacts_.DevtoolsLog;
|
|
42
|
+
export import Trace = Artifacts_.Trace;
|
|
43
|
+
export import TraceCpuProfile = Artifacts_.TraceCpuProfile;
|
|
44
|
+
export import TraceEvent = Artifacts_.TraceEvent;
|
|
45
|
+
|
|
46
|
+
export import Audit = Audit_;
|
|
47
|
+
export import Budget = Budget_;
|
|
48
|
+
export import Config = Config_;
|
|
49
|
+
export import Crdp = _Crdp;
|
|
50
|
+
export import CrdpEvents = _CrdpMappings.Events;
|
|
51
|
+
export import CrdpCommands = _CrdpMappings.Commands;
|
|
52
|
+
|
|
53
|
+
export import UserFlow = UserFlow_;
|
|
54
|
+
|
|
55
|
+
// externs.d.ts
|
|
56
|
+
export import Flags = Externs.Flags;
|
|
57
|
+
export import CliFlags = Externs.CliFlags;
|
|
58
|
+
export import RunnerResult = Externs.RunnerResult;
|
|
59
|
+
export import DevToolsJsonTarget = Externs.DevToolsJsonTarget;
|
|
60
|
+
|
|
61
|
+
export import Gatherer = Gatherer_;
|
|
62
|
+
export import LighthouseError = LighthouseError_;
|
|
63
|
+
export import Result = LHResult;
|
|
64
|
+
export import FlowResult = FlowResult_;
|
|
65
|
+
|
|
66
|
+
// lhr/i18n.d.ts
|
|
67
|
+
export import IcuMessage = I18n.IcuMessage;
|
|
68
|
+
export import RawIcu = I18n.RawIcu;
|
|
69
|
+
export import FormattedIcu = I18n.FormattedIcu;
|
|
70
|
+
|
|
71
|
+
export import Protocol = Protocol_;
|
|
72
|
+
|
|
73
|
+
// lhr/settings.d.ts
|
|
74
|
+
export import Locale = Settings.Locale;
|
|
75
|
+
export import ThrottlingSettings = Settings.ThrottlingSettings;
|
|
76
|
+
export import ScreenEmulationSettings = Settings.ScreenEmulationSettings;
|
|
77
|
+
export import SharedFlagsSettings = Settings.SharedFlagsSettings;
|
|
78
|
+
export import OutputMode = Settings.OutputMode;
|
|
79
|
+
export import PrecomputedLanternData = Settings.PrecomputedLanternData;
|
|
80
|
+
|
|
81
|
+
export import Treemap = Treemap_;
|
package/types/lh.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @license Copyright 2023 The Lighthouse Authors. All Rights Reserved.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @fileoverview Typescript does not allow us to import an entire module via JSDOC so we need to import type modules via regular imports.
|
|
10
|
+
* This empty module will be served to any JS file that needs to import our global type module.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export {};
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {IcuMessage} from './i18n';
|
|
8
|
-
import Treemap from './treemap';
|
|
7
|
+
import {IcuMessage} from './i18n.js';
|
|
8
|
+
import Treemap from './treemap.js';
|
|
9
9
|
|
|
10
10
|
type Details =
|
|
11
11
|
Details.CriticalRequestChain |
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {FormattedIcu} from './i18n';
|
|
8
|
-
import AuditDetails from './audit-details';
|
|
7
|
+
import {FormattedIcu} from './i18n.js';
|
|
8
|
+
import AuditDetails from './audit-details.js';
|
|
9
9
|
|
|
10
10
|
interface ScoreDisplayModes {
|
|
11
11
|
/** Scores of 0-1 (map to displayed scores of 0-100). */
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import Result from './lhr';
|
|
7
|
+
import Result from './lhr.js';
|
|
8
8
|
|
|
9
9
|
declare module FlowResult {
|
|
10
10
|
interface Step {
|
package/types/lhr/lhr.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {Result as AuditResult} from './audit-result';
|
|
7
|
+
import {Result as AuditResult} from './audit-result.js';
|
|
8
8
|
import AuditDetails from './audit-details.js';
|
|
9
|
-
import {ConfigSettings} from './settings';
|
|
9
|
+
import {ConfigSettings} from './settings.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* The full output of a Lighthouse run.
|
package/types/lhr/settings.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import Budget from './budget';
|
|
7
|
+
import Budget from './budget.js';
|
|
8
8
|
|
|
9
9
|
export type Locale = 'en-US'|'en'|'en-AU'|'en-GB'|'en-IE'|'en-SG'|'en-ZA'|'en-IN'|'ar-XB'|'ar'|'bg'|'ca'|'cs'|'da'|'de'|'el'|'en-XA'|'en-XL'|'es'|'es-419'|'es-AR'|'es-BO'|'es-BR'|'es-BZ'|'es-CL'|'es-CO'|'es-CR'|'es-CU'|'es-DO'|'es-EC'|'es-GT'|'es-HN'|'es-MX'|'es-NI'|'es-PA'|'es-PE'|'es-PR'|'es-PY'|'es-SV'|'es-US'|'es-UY'|'es-VE'|'fi'|'fil'|'fr'|'he'|'hi'|'hr'|'hu'|'gsw'|'id'|'in'|'it'|'iw'|'ja'|'ko'|'lt'|'lv'|'mo'|'nl'|'nb'|'no'|'pl'|'pt'|'pt-PT'|'ro'|'ru'|'sk'|'sl'|'sr'|'sr-Latn'|'sv'|'ta'|'te'|'th'|'tl'|'tr'|'uk'|'vi'|'zh'|'zh-HK'|'zh-TW';
|
|
10
10
|
|
package/types/lhr/treemap.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {Result as AuditResult} from './audit-result';
|
|
8
|
-
import {Locale} from './settings';
|
|
7
|
+
import {Result as AuditResult} from './audit-result.js';
|
|
8
|
+
import {Locale} from './settings.js';
|
|
9
9
|
|
|
10
10
|
declare module Treemap {
|
|
11
11
|
interface Options {
|
package/types/protocol.d.ts
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import {ProtocolMapping as CrdpMappings} from 'devtools-protocol/types/protocol-mapping.js';
|
|
8
|
+
|
|
9
|
+
type CrdpEvents = CrdpMappings.Events;
|
|
10
|
+
type CrdpCommands = CrdpMappings.Commands;
|
|
11
|
+
|
|
7
12
|
declare module Protocol {
|
|
8
13
|
/**
|
|
9
14
|
* An intermediate type, used to create a record of all possible Crdp raw event
|
|
@@ -13,10 +18,10 @@ declare module Protocol {
|
|
|
13
18
|
* }
|
|
14
19
|
*/
|
|
15
20
|
type RawEventMessageRecord = {
|
|
16
|
-
[K in keyof
|
|
21
|
+
[K in keyof CrdpEvents]: {
|
|
17
22
|
method: K,
|
|
18
23
|
// Drop [] for `undefined` (so a JS value is valid).
|
|
19
|
-
params:
|
|
24
|
+
params: CrdpEvents[K] extends [] ? undefined: CrdpEvents[K][number]
|
|
20
25
|
// If sessionId is not set, it means the event was from the root target.
|
|
21
26
|
sessionId?: string;
|
|
22
27
|
};
|
|
@@ -33,7 +38,7 @@ declare module Protocol {
|
|
|
33
38
|
*/
|
|
34
39
|
type RawCommandMessage = {
|
|
35
40
|
id: number;
|
|
36
|
-
result:
|
|
41
|
+
result: CrdpCommands[keyof CrdpCommands]['returnType'];
|
|
37
42
|
error: {
|
|
38
43
|
code: number,
|
|
39
44
|
message: string
|
package/types/puppeteer.d.ts
CHANGED
|
@@ -4,19 +4,24 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
import puppeteerCore from 'puppeteer-core';
|
|
7
|
+
import * as puppeteerCore from 'puppeteer-core';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* @fileoverview Lighthouse should be compatible with puppeteer and puppeteer-core even though the types can be slightly different between the two packages.
|
|
12
11
|
* Anytime we want to use a Puppeteer type within Lighthouse, we should pull the union type from here rather than one of the packages directly.
|
|
13
12
|
*/
|
|
14
13
|
|
|
14
|
+
type IfNotAny<T> = [T & 0] extends [1] ? never : T;
|
|
15
|
+
|
|
15
16
|
declare module Puppeteer {
|
|
16
|
-
|
|
17
|
-
export type
|
|
18
|
-
|
|
19
|
-
export type
|
|
17
|
+
// @ts-ignore Puppeteer is an optional dependency. `IfNotAny` will handle the `any` type if it's not installed.
|
|
18
|
+
export type Browser = puppeteerCore.Browser | IfNotAny<import('puppeteer').Browser>;
|
|
19
|
+
// @ts-ignore Puppeteer is an optional dependency. `IfNotAny` will handle the `any` type if it's not installed.
|
|
20
|
+
export type Page = puppeteerCore.Page | IfNotAny<import('puppeteer').Page>;
|
|
21
|
+
// @ts-ignore Puppeteer is an optional dependency. `IfNotAny` will handle the `any` type if it's not installed.
|
|
22
|
+
export type CDPSession = puppeteerCore.CDPSession | IfNotAny<import('puppeteer').CDPSession>;
|
|
23
|
+
// @ts-ignore Puppeteer is an optional dependency. `IfNotAny` will handle the `any` type if it's not installed.
|
|
24
|
+
export type Connection = puppeteerCore.Connection | IfNotAny<import('puppeteer').Connection>;
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
export default Puppeteer;
|
package/types/user-flow.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright 2022 The Lighthouse Authors. All Rights Reserved.
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4
|
+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {UserFlow as UserFlow_} from '../core/user-flow.js';
|
|
8
|
+
import Config from './config.js';
|
|
9
|
+
import {Flags} from './externs.js';
|
|
10
|
+
import {Artifacts} from './artifacts.js';
|
|
2
11
|
|
|
3
12
|
declare module UserFlow {
|
|
4
13
|
export interface FlowArtifacts {
|
|
@@ -8,20 +17,20 @@ declare module UserFlow {
|
|
|
8
17
|
|
|
9
18
|
export interface Options {
|
|
10
19
|
/** Config to use for each flow step. */
|
|
11
|
-
config?:
|
|
20
|
+
config?: Config;
|
|
12
21
|
/** Base flags to use for each flow step. Step specific flags will override these flags. */
|
|
13
|
-
flags?:
|
|
22
|
+
flags?: Flags;
|
|
14
23
|
/** Display name for this user flow. */
|
|
15
24
|
name?: string;
|
|
16
25
|
}
|
|
17
26
|
|
|
18
|
-
export interface StepFlags extends
|
|
27
|
+
export interface StepFlags extends Flags {
|
|
19
28
|
/** Display name for this flow step. */
|
|
20
29
|
name?: string;
|
|
21
30
|
}
|
|
22
31
|
|
|
23
32
|
export interface GatherStep {
|
|
24
|
-
artifacts:
|
|
33
|
+
artifacts: Artifacts;
|
|
25
34
|
flags?: StepFlags;
|
|
26
35
|
}
|
|
27
36
|
}
|
package/types/global-lh.d.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright 2021 The Lighthouse Authors. All Rights Reserved.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4
|
-
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import {ArbitraryEqualityMap as ArbitraryEqualityMap_} from '../core/lib/arbitrary-equality-map.js';
|
|
8
|
-
import * as Artifacts_ from './artifacts';
|
|
9
|
-
import Audit_ from './audit';
|
|
10
|
-
import Budget_ from './lhr/budget';
|
|
11
|
-
import Config_ from './config';
|
|
12
|
-
import _Crdp from 'devtools-protocol/types/protocol';
|
|
13
|
-
import _CrdpMappings from 'devtools-protocol/types/protocol-mapping';
|
|
14
|
-
import * as Externs from './externs';
|
|
15
|
-
import Gatherer_ from './gatherer';
|
|
16
|
-
import * as I18n from './lhr/i18n';
|
|
17
|
-
import {LighthouseError as LighthouseError_} from '../core/lib/lh-error.js';
|
|
18
|
-
import LHResult from './lhr/lhr';
|
|
19
|
-
import FlowResult_ from './lhr/flow-result';
|
|
20
|
-
import Protocol_ from './protocol';
|
|
21
|
-
import * as Settings from './lhr/settings';
|
|
22
|
-
import Treemap_ from './lhr/treemap';
|
|
23
|
-
import UserFlow_ from './user-flow';
|
|
24
|
-
import Puppeteer_ from './puppeteer';
|
|
25
|
-
import Util_ from './utility-types.js';
|
|
26
|
-
|
|
27
|
-
// Construct hierarchy of global types under the LH namespace.
|
|
28
|
-
declare global {
|
|
29
|
-
module LH {
|
|
30
|
-
export type ArbitraryEqualityMap = ArbitraryEqualityMap_;
|
|
31
|
-
export type NavigationRequestor = string | (() => Promise<void> | void);
|
|
32
|
-
|
|
33
|
-
export import Util = Util_;
|
|
34
|
-
|
|
35
|
-
export import Puppeteer = Puppeteer_;
|
|
36
|
-
|
|
37
|
-
// artifacts.d.ts
|
|
38
|
-
export import Artifacts = Artifacts_.Artifacts;
|
|
39
|
-
export import BaseArtifacts = Artifacts_.BaseArtifacts;
|
|
40
|
-
export import FRArtifacts = Artifacts_.FRArtifacts;
|
|
41
|
-
export import FRBaseArtifacts = Artifacts_.FRBaseArtifacts;
|
|
42
|
-
export import GathererArtifacts = Artifacts_.GathererArtifacts;
|
|
43
|
-
export import DevtoolsLog = Artifacts_.DevtoolsLog;
|
|
44
|
-
export import Trace = Artifacts_.Trace;
|
|
45
|
-
export import TraceCpuProfile = Artifacts_.TraceCpuProfile;
|
|
46
|
-
export import TraceEvent = Artifacts_.TraceEvent;
|
|
47
|
-
|
|
48
|
-
export import Audit = Audit_;
|
|
49
|
-
export import Budget = Budget_;
|
|
50
|
-
export import Config = Config_;
|
|
51
|
-
export import Crdp = _Crdp;
|
|
52
|
-
export import CrdpEvents = _CrdpMappings.Events;
|
|
53
|
-
export import CrdpCommands = _CrdpMappings.Commands;
|
|
54
|
-
|
|
55
|
-
export import UserFlow = UserFlow_;
|
|
56
|
-
|
|
57
|
-
// externs.d.ts
|
|
58
|
-
export import Flags = Externs.Flags;
|
|
59
|
-
export import CliFlags = Externs.CliFlags;
|
|
60
|
-
export import RunnerResult = Externs.RunnerResult;
|
|
61
|
-
export import DevToolsJsonTarget = Externs.DevToolsJsonTarget;
|
|
62
|
-
|
|
63
|
-
export import Gatherer = Gatherer_;
|
|
64
|
-
export import LighthouseError = LighthouseError_;
|
|
65
|
-
export import Result = LHResult;
|
|
66
|
-
export import FlowResult = FlowResult_;
|
|
67
|
-
|
|
68
|
-
// i18n.d.ts.
|
|
69
|
-
export import IcuMessage = I18n.IcuMessage;
|
|
70
|
-
export import RawIcu = I18n.RawIcu;
|
|
71
|
-
export import FormattedIcu = I18n.FormattedIcu;
|
|
72
|
-
|
|
73
|
-
export import Protocol = Protocol_;
|
|
74
|
-
|
|
75
|
-
// lhr/settings.d.ts
|
|
76
|
-
export import Locale = Settings.Locale;
|
|
77
|
-
export import ThrottlingSettings = Settings.ThrottlingSettings;
|
|
78
|
-
export import ScreenEmulationSettings = Settings.ScreenEmulationSettings;
|
|
79
|
-
export import SharedFlagsSettings = Settings.SharedFlagsSettings;
|
|
80
|
-
export import OutputMode = Settings.OutputMode;
|
|
81
|
-
export import PrecomputedLanternData = Settings.PrecomputedLanternData;
|
|
82
|
-
|
|
83
|
-
export import Treemap = Treemap_;
|
|
84
|
-
}
|
|
85
|
-
}
|