lighthouse 9.5.0-dev.20230117 → 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/render-blocking-resources.js +1 -3
- 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-preconnect.js +1 -4
- 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-metric.js +1 -3
- 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/metric.js +1 -1
- 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/timing-summary.js +1 -1
- 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-navigation.js +5 -2
- 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 +5 -4
- 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-elements.js +4 -4
- 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/dist/report/bundle.esm.js +2 -0
- package/dist/report/flow.js +1 -1
- package/dist/report/standalone.js +1 -1
- 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/performance-category-renderer.js +2 -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/generator/report-generator-test.js +3 -3
- package/report/test/renderer/performance-category-renderer-test.js +8 -9
- 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
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export declare const flowResult: LH.FlowResult;
|
|
7
|
+
//# sourceMappingURL=sample-flow.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
declare const rootHooks: {
|
|
7
|
+
beforeAll(): void;
|
|
8
|
+
beforeEach(): void;
|
|
9
|
+
};
|
|
10
|
+
export { rootHooks, };
|
|
11
|
+
//# sourceMappingURL=env-setup.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=flow-test.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=sidebar-test.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=category-test.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=summary-test.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=topbar-test.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=util-test.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=category-score-test.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=markdown-test.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lighthouse",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "9.5.0-dev.
|
|
4
|
+
"version": "9.5.0-dev.20230119",
|
|
5
5
|
"description": "Automated auditing, performance metrics, and best practices for the web.",
|
|
6
6
|
"main": "./core/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"node": ">=16.16"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"prepack": "yarn build-report --standalone --flow --esm",
|
|
16
|
+
"prepack": "yarn build-report --standalone --flow --esm && yarn build-types",
|
|
17
|
+
"postpack": "yarn clean-types",
|
|
17
18
|
"build-all": "npm-run-posix-or-windows build-all:task",
|
|
18
19
|
"build-all:task": "yarn build-report && yarn build-cdt-lib && yarn build-devtools && concurrently 'yarn build-extension' 'yarn build-lr' 'yarn build-viewer' 'yarn build-treemap' 'yarn build-smokehouse-bundle' && yarn build-pack",
|
|
19
20
|
"build-all:task:windows": "yarn build-report && yarn build-cdt-lib && yarn build-extension && yarn build-devtools && yarn build-lr && yarn build-viewer && yarn build-treemap && yarn build-smokehouse-bundle",
|
|
@@ -29,9 +30,11 @@
|
|
|
29
30
|
"build-sample-reports": "yarn build-report && node build/build-sample-reports.js",
|
|
30
31
|
"build-treemap": "node ./build/build-treemap.js",
|
|
31
32
|
"build-viewer": "node ./build/build-viewer.js",
|
|
33
|
+
"build-types": "yarn type-check && rsync -a .tmp/tsbuildinfo/ ./ --include='*.d.ts' --include='*.d.cts' --exclude='*.map' --exclude='*.tsbuildinfo'",
|
|
32
34
|
"reset-link": "(yarn unlink || true) && yarn link && yarn link lighthouse",
|
|
33
35
|
"c8": "bash core/scripts/c8.sh",
|
|
34
36
|
"clean": "rm -r dist proto/scripts/*.json proto/scripts/*_pb2.* proto/scripts/*_pb.* proto/scripts/__pycache__ proto/scripts/*.pyc *.report.html *.report.dom.html *.report.json *.devtoolslog.json *.trace.json shared/localization/locales/*.ctc.json || true",
|
|
37
|
+
"clean-types": "git clean -xfq '*.d.ts' '*.d.cts' -e 'node_modules/' -e 'dist/' -e '.tmp/' -e '**/types/'",
|
|
35
38
|
"lint": "[ \"$CI\" = true ] && eslint --quiet -f codeframe . || eslint .",
|
|
36
39
|
"smoke": "node cli/test/smokehouse/frontends/smokehouse-bin.js",
|
|
37
40
|
"debug": "node --inspect-brk ./cli/index.js",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DOM } from "../renderer/dom.js";
|
|
2
|
+
export { ReportRenderer } from "../renderer/report-renderer.js";
|
|
3
|
+
export { ReportUIFeatures } from "../renderer/report-ui-features.js";
|
|
4
|
+
export { renderReport } from "../renderer/api.js";
|
|
5
|
+
export { swapLocale, format } from "../../shared/localization/i18n-module.js";
|
|
6
|
+
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a filenamePrefix of hostname_YYYY-MM-DD_HH-MM-SS.
|
|
3
|
+
* @param {{finalDisplayedUrl: string, fetchTime: string}} lhr
|
|
4
|
+
* @return {string}
|
|
5
|
+
*/
|
|
6
|
+
export function getLhrFilenamePrefix(lhr: {
|
|
7
|
+
finalDisplayedUrl: string;
|
|
8
|
+
fetchTime: string;
|
|
9
|
+
}): string;
|
|
10
|
+
/**
|
|
11
|
+
* @fileoverview
|
|
12
|
+
* @suppress {reportUnknownTypes}
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Generate a filenamePrefix of name_YYYY-MM-DD_HH-MM-SS
|
|
16
|
+
* Date/time uses the local timezone, however Node has unreliable ICU
|
|
17
|
+
* support, so we must construct a YYYY-MM-DD date format manually. :/
|
|
18
|
+
* @param {string} name
|
|
19
|
+
* @param {string|undefined} fetchTime
|
|
20
|
+
*/
|
|
21
|
+
export function getFilenamePrefix(name: string, fetchTime: string | undefined): string;
|
|
22
|
+
/**
|
|
23
|
+
* Generate a filenamePrefix of name_YYYY-MM-DD_HH-MM-SS.
|
|
24
|
+
* @param {{name: string, steps: Array<{lhr: {fetchTime: string}}>}} flowResult
|
|
25
|
+
* @return {string}
|
|
26
|
+
*/
|
|
27
|
+
export function getFlowResultFilenamePrefix(flowResult: {
|
|
28
|
+
name: string;
|
|
29
|
+
steps: {
|
|
30
|
+
lhr: {
|
|
31
|
+
fetchTime: string;
|
|
32
|
+
};
|
|
33
|
+
}[];
|
|
34
|
+
}): string;
|
|
35
|
+
//# sourceMappingURL=file-namer.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export namespace flowReportAssets {
|
|
2
|
+
export { FLOW_REPORT_TEMPLATE };
|
|
3
|
+
export const FLOW_REPORT_CSS: string;
|
|
4
|
+
export { FLOW_REPORT_JAVASCRIPT };
|
|
5
|
+
}
|
|
6
|
+
declare const FLOW_REPORT_TEMPLATE: string;
|
|
7
|
+
declare const FLOW_REPORT_JAVASCRIPT: string;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=flow-report-assets.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export type LHResult = import('../../types/lhr/lhr').default;
|
|
2
|
+
export type FlowResult = import('../../types/lhr/flow-result').default;
|
|
3
|
+
/** @typedef {import('../../types/lhr/lhr').default} LHResult */
|
|
4
|
+
/** @typedef {import('../../types/lhr/flow-result').default} FlowResult */
|
|
5
|
+
export class ReportGenerator {
|
|
6
|
+
/**
|
|
7
|
+
* Replaces all the specified strings in source without serial replacements.
|
|
8
|
+
* @param {string} source
|
|
9
|
+
* @param {!Array<{search: string, replacement: string}>} replacements
|
|
10
|
+
* @return {string}
|
|
11
|
+
*/
|
|
12
|
+
static replaceStrings(source: string, replacements: Array<{
|
|
13
|
+
search: string;
|
|
14
|
+
replacement: string;
|
|
15
|
+
}>): string;
|
|
16
|
+
/**
|
|
17
|
+
* @param {unknown} object
|
|
18
|
+
* @return {string}
|
|
19
|
+
*/
|
|
20
|
+
static sanitizeJson(object: unknown): string;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the standalone report HTML as a string with the report JSON and renderer JS inlined.
|
|
23
|
+
* @param {LHResult} lhr
|
|
24
|
+
* @return {string}
|
|
25
|
+
*/
|
|
26
|
+
static generateReportHtml(lhr: LHResult): string;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the standalone flow report HTML as a string with the report JSON and renderer JS inlined.
|
|
29
|
+
* @param {FlowResult} flow
|
|
30
|
+
* @return {string}
|
|
31
|
+
*/
|
|
32
|
+
static generateFlowReportHtml(flow: FlowResult): string;
|
|
33
|
+
/**
|
|
34
|
+
* Converts the results to a CSV formatted string
|
|
35
|
+
* Each row describes the result of 1 audit with
|
|
36
|
+
* - the name of the category the audit belongs to
|
|
37
|
+
* - the name of the audit
|
|
38
|
+
* - a description of the audit
|
|
39
|
+
* - the score type that is used for the audit
|
|
40
|
+
* - the score value of the audit
|
|
41
|
+
*
|
|
42
|
+
* @param {LHResult} lhr
|
|
43
|
+
* @return {string}
|
|
44
|
+
*/
|
|
45
|
+
static generateReportCSV(lhr: LHResult): string;
|
|
46
|
+
/**
|
|
47
|
+
* @param {LHResult|FlowResult} result
|
|
48
|
+
* @return {result is FlowResult}
|
|
49
|
+
*/
|
|
50
|
+
static isFlowResult(result: LHResult | FlowResult): result is import("../../types/lhr/flow-result").default;
|
|
51
|
+
/**
|
|
52
|
+
* Creates the results output in a format based on the `mode`.
|
|
53
|
+
* @param {LHResult|FlowResult} result
|
|
54
|
+
* @param {LHResult['configSettings']['output']} outputModes
|
|
55
|
+
* @return {string|string[]}
|
|
56
|
+
*/
|
|
57
|
+
static generateReport(result: LHResult | FlowResult, outputModes: LHResult['configSettings']['output']): string | string[];
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=report-generator.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {LH.Result} lhr
|
|
3
|
+
* @param {LH.Renderer.Options} opts
|
|
4
|
+
* @return {HTMLElement}
|
|
5
|
+
*/
|
|
6
|
+
export function renderReport(lhr: LH.Result, opts?: LH.Renderer.Options): HTMLElement;
|
|
7
|
+
/**
|
|
8
|
+
* @param {LH.ReportResult.Category} category
|
|
9
|
+
* @param {Parameters<CategoryRenderer['renderCategoryScore']>[2]=} options
|
|
10
|
+
* @return {DocumentFragment}
|
|
11
|
+
*/
|
|
12
|
+
export function renderCategoryScore(category: LH.ReportResult.Category, options?: [category: import("../types/report-result.js").default.Category, groupDefinitions: Record<string, import("../../types/lhr/lhr.js").default.ReportGroup>, options?: {
|
|
13
|
+
gatherMode: import("../../types/lhr/lhr.js").default.GatherMode;
|
|
14
|
+
omitLabel?: boolean | undefined;
|
|
15
|
+
onPageAnchorRendered?: ((link: HTMLAnchorElement) => void) | undefined;
|
|
16
|
+
} | undefined][2] | undefined): DocumentFragment;
|
|
17
|
+
/**
|
|
18
|
+
* @param {Blob} blob
|
|
19
|
+
* @param {string} filename
|
|
20
|
+
*/
|
|
21
|
+
export function saveFile(blob: Blob, filename: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* @param {string} markdownText
|
|
24
|
+
* @return {Element}
|
|
25
|
+
*/
|
|
26
|
+
export function convertMarkdownCodeSnippets(markdownText: string): Element;
|
|
27
|
+
/**
|
|
28
|
+
* @return {DocumentFragment}
|
|
29
|
+
*/
|
|
30
|
+
export function createStylesElement(): DocumentFragment;
|
|
31
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
export class CategoryRenderer {
|
|
2
|
+
/**
|
|
3
|
+
* @param {DOM} dom
|
|
4
|
+
* @param {DetailsRenderer} detailsRenderer
|
|
5
|
+
*/
|
|
6
|
+
constructor(dom: DOM, detailsRenderer: DetailsRenderer);
|
|
7
|
+
/** @type {DOM} */
|
|
8
|
+
dom: DOM;
|
|
9
|
+
/** @type {DetailsRenderer} */
|
|
10
|
+
detailsRenderer: DetailsRenderer;
|
|
11
|
+
/**
|
|
12
|
+
* Display info per top-level clump. Define on class to avoid race with Util init.
|
|
13
|
+
*/
|
|
14
|
+
get _clumpTitles(): {
|
|
15
|
+
warning: string;
|
|
16
|
+
manual: string;
|
|
17
|
+
passed: string;
|
|
18
|
+
notApplicable: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @param {LH.ReportResult.AuditRef} audit
|
|
22
|
+
* @return {Element}
|
|
23
|
+
*/
|
|
24
|
+
renderAudit(audit: LH.ReportResult.AuditRef): Element;
|
|
25
|
+
/**
|
|
26
|
+
* Populate an DOM tree with audit details. Used by renderAudit and renderOpportunity
|
|
27
|
+
* @param {LH.ReportResult.AuditRef} audit
|
|
28
|
+
* @param {DocumentFragment} component
|
|
29
|
+
* @return {!Element}
|
|
30
|
+
*/
|
|
31
|
+
populateAuditValues(audit: LH.ReportResult.AuditRef, component: DocumentFragment): Element;
|
|
32
|
+
/**
|
|
33
|
+
* Inject the final screenshot next to the score gauge of the first category (likely Performance)
|
|
34
|
+
* @param {HTMLElement} categoriesEl
|
|
35
|
+
* @param {LH.ReportResult['audits']} audits
|
|
36
|
+
* @param {Element} scoreScaleEl
|
|
37
|
+
*/
|
|
38
|
+
injectFinalScreenshot(categoriesEl: HTMLElement, audits: LH.ReportResult['audits'], scoreScaleEl: Element): null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* @return {Element}
|
|
41
|
+
*/
|
|
42
|
+
_createChevron(): Element;
|
|
43
|
+
/**
|
|
44
|
+
* @param {Element} element DOM node to populate with values.
|
|
45
|
+
* @param {number|null} score
|
|
46
|
+
* @param {string} scoreDisplayMode
|
|
47
|
+
* @return {!Element}
|
|
48
|
+
*/
|
|
49
|
+
_setRatingClass(element: Element, score: number | null, scoreDisplayMode: string): Element;
|
|
50
|
+
/**
|
|
51
|
+
* @param {LH.ReportResult.Category} category
|
|
52
|
+
* @param {Record<string, LH.Result.ReportGroup>} groupDefinitions
|
|
53
|
+
* @param {{gatherMode: LH.Result.GatherMode}=} options
|
|
54
|
+
* @return {DocumentFragment}
|
|
55
|
+
*/
|
|
56
|
+
renderCategoryHeader(category: LH.ReportResult.Category, groupDefinitions: Record<string, LH.Result.ReportGroup>, options?: {
|
|
57
|
+
gatherMode: LH.Result.GatherMode;
|
|
58
|
+
} | undefined): DocumentFragment;
|
|
59
|
+
/**
|
|
60
|
+
* Renders the group container for a group of audits. Individual audit elements can be added
|
|
61
|
+
* directly to the returned element.
|
|
62
|
+
* @param {LH.Result.ReportGroup} group
|
|
63
|
+
* @return {[Element, Element | null]}
|
|
64
|
+
*/
|
|
65
|
+
renderAuditGroup(group: LH.Result.ReportGroup): [Element, Element | null];
|
|
66
|
+
/**
|
|
67
|
+
* Takes an array of auditRefs, groups them if requested, then returns an
|
|
68
|
+
* array of audit and audit-group elements.
|
|
69
|
+
* @param {Array<LH.ReportResult.AuditRef>} auditRefs
|
|
70
|
+
* @param {Object<string, LH.Result.ReportGroup>} groupDefinitions
|
|
71
|
+
* @return {Array<Element>}
|
|
72
|
+
*/
|
|
73
|
+
_renderGroupedAudits(auditRefs: Array<LH.ReportResult.AuditRef>, groupDefinitions: {
|
|
74
|
+
[x: string]: LH.Result.ReportGroup;
|
|
75
|
+
}): Array<Element>;
|
|
76
|
+
/**
|
|
77
|
+
* Take a set of audits, group them if they have groups, then render in a top-level
|
|
78
|
+
* clump that can't be expanded/collapsed.
|
|
79
|
+
* @param {Array<LH.ReportResult.AuditRef>} auditRefs
|
|
80
|
+
* @param {Object<string, LH.Result.ReportGroup>} groupDefinitions
|
|
81
|
+
* @return {Element}
|
|
82
|
+
*/
|
|
83
|
+
renderUnexpandableClump(auditRefs: Array<LH.ReportResult.AuditRef>, groupDefinitions: {
|
|
84
|
+
[x: string]: LH.Result.ReportGroup;
|
|
85
|
+
}): Element;
|
|
86
|
+
/**
|
|
87
|
+
* Take a set of audits and render in a top-level, expandable clump that starts
|
|
88
|
+
* in a collapsed state.
|
|
89
|
+
* @param {Exclude<TopLevelClumpId, 'failed'>} clumpId
|
|
90
|
+
* @param {{auditRefs: Array<LH.ReportResult.AuditRef>, description?: string}} clumpOpts
|
|
91
|
+
* @return {!Element}
|
|
92
|
+
*/
|
|
93
|
+
renderClump(clumpId: Exclude<TopLevelClumpId, 'failed'>, { auditRefs, description }: {
|
|
94
|
+
auditRefs: Array<LH.ReportResult.AuditRef>;
|
|
95
|
+
description?: string;
|
|
96
|
+
}): Element;
|
|
97
|
+
/**
|
|
98
|
+
* @param {LH.ReportResult.Category} category
|
|
99
|
+
* @param {Record<string, LH.Result.ReportGroup>} groupDefinitions
|
|
100
|
+
* @param {{gatherMode: LH.Result.GatherMode, omitLabel?: boolean, onPageAnchorRendered?: (link: HTMLAnchorElement) => void}=} options
|
|
101
|
+
* @return {DocumentFragment}
|
|
102
|
+
*/
|
|
103
|
+
renderCategoryScore(category: LH.ReportResult.Category, groupDefinitions: Record<string, LH.Result.ReportGroup>, options?: {
|
|
104
|
+
gatherMode: LH.Result.GatherMode;
|
|
105
|
+
omitLabel?: boolean | undefined;
|
|
106
|
+
onPageAnchorRendered?: ((link: HTMLAnchorElement) => void) | undefined;
|
|
107
|
+
} | undefined): DocumentFragment;
|
|
108
|
+
/**
|
|
109
|
+
* @param {LH.ReportResult.Category} category
|
|
110
|
+
* @param {Record<string, LH.Result.ReportGroup>} groupDefinitions
|
|
111
|
+
* @return {DocumentFragment}
|
|
112
|
+
*/
|
|
113
|
+
renderScoreGauge(category: LH.ReportResult.Category, groupDefinitions: Record<string, LH.Result.ReportGroup>): DocumentFragment;
|
|
114
|
+
/**
|
|
115
|
+
* @param {LH.ReportResult.Category} category
|
|
116
|
+
* @return {DocumentFragment}
|
|
117
|
+
*/
|
|
118
|
+
renderCategoryFraction(category: LH.ReportResult.Category): DocumentFragment;
|
|
119
|
+
/**
|
|
120
|
+
* Returns true if an LH category has any non-"notApplicable" audits.
|
|
121
|
+
* @param {LH.ReportResult.Category} category
|
|
122
|
+
* @return {boolean}
|
|
123
|
+
*/
|
|
124
|
+
hasApplicableAudits(category: LH.ReportResult.Category): boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Define the score arc of the gauge
|
|
127
|
+
* Credit to xgad for the original technique: https://codepen.io/xgad/post/svg-radial-progress-meters
|
|
128
|
+
* @param {SVGCircleElement} arcElem
|
|
129
|
+
* @param {number} percent
|
|
130
|
+
*/
|
|
131
|
+
_setGaugeArc(arcElem: SVGCircleElement, percent: number): void;
|
|
132
|
+
/**
|
|
133
|
+
* @param {LH.ReportResult.AuditRef} audit
|
|
134
|
+
* @return {boolean}
|
|
135
|
+
*/
|
|
136
|
+
_auditHasWarning(audit: LH.ReportResult.AuditRef): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Returns the id of the top-level clump to put this audit in.
|
|
139
|
+
* @param {LH.ReportResult.AuditRef} auditRef
|
|
140
|
+
* @return {TopLevelClumpId}
|
|
141
|
+
*/
|
|
142
|
+
_getClumpIdForAuditRef(auditRef: LH.ReportResult.AuditRef): TopLevelClumpId;
|
|
143
|
+
/**
|
|
144
|
+
* Renders a set of top level sections (clumps), under a status of failed, warning,
|
|
145
|
+
* manual, passed, or notApplicable. The result ends up something like:
|
|
146
|
+
*
|
|
147
|
+
* failed clump
|
|
148
|
+
* ├── audit 1 (w/o group)
|
|
149
|
+
* ├── audit 2 (w/o group)
|
|
150
|
+
* ├── audit group
|
|
151
|
+
* | ├── audit 3
|
|
152
|
+
* | └── audit 4
|
|
153
|
+
* └── audit group
|
|
154
|
+
* ├── audit 5
|
|
155
|
+
* └── audit 6
|
|
156
|
+
* other clump (e.g. 'manual')
|
|
157
|
+
* ├── audit 1
|
|
158
|
+
* ├── audit 2
|
|
159
|
+
* ├── …
|
|
160
|
+
* ⋮
|
|
161
|
+
* @param {LH.ReportResult.Category} category
|
|
162
|
+
* @param {Object<string, LH.Result.ReportGroup>=} groupDefinitions
|
|
163
|
+
* @param {{gatherMode: LH.Result.GatherMode}=} options
|
|
164
|
+
* @return {Element}
|
|
165
|
+
*/
|
|
166
|
+
render(category: LH.ReportResult.Category, groupDefinitions?: {
|
|
167
|
+
[x: string]: LH.Result.ReportGroup;
|
|
168
|
+
} | undefined, options?: {
|
|
169
|
+
gatherMode: LH.Result.GatherMode;
|
|
170
|
+
} | undefined): Element;
|
|
171
|
+
}
|
|
172
|
+
export type DOM = import('./dom.js').DOM;
|
|
173
|
+
export type ReportRenderer = import('./report-renderer.js').ReportRenderer;
|
|
174
|
+
export type DetailsRenderer = import('./details-renderer.js').DetailsRenderer;
|
|
175
|
+
export type TopLevelClumpId = 'failed' | 'warning' | 'manual' | 'passed' | 'notApplicable';
|
|
176
|
+
//# sourceMappingURL=category-renderer.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @typedef {'3pFilter'|'audit'|'categoryHeader'|'chevron'|'clump'|'crc'|'crcChain'|'elementScreenshot'|'footer'|'fraction'|'gauge'|'gaugePwa'|'heading'|'metric'|'opportunity'|'opportunityHeader'|'scorescale'|'scoresWrapper'|'snippet'|'snippetContent'|'snippetHeader'|'snippetLine'|'styles'|'topbar'|'warningsToplevel'} ComponentName */
|
|
2
|
+
/**
|
|
3
|
+
* @param {DOM} dom
|
|
4
|
+
* @param {ComponentName} componentName
|
|
5
|
+
* @return {DocumentFragment}
|
|
6
|
+
*/
|
|
7
|
+
export function createComponent(dom: DOM, componentName: ComponentName): DocumentFragment;
|
|
8
|
+
export type DOM = import('./dom.js').DOM;
|
|
9
|
+
export type ComponentName = '3pFilter' | 'audit' | 'categoryHeader' | 'chevron' | 'clump' | 'crc' | 'crcChain' | 'elementScreenshot' | 'footer' | 'fraction' | 'gauge' | 'gaugePwa' | 'heading' | 'metric' | 'opportunity' | 'opportunityHeader' | 'scorescale' | 'scoresWrapper' | 'snippet' | 'snippetContent' | 'snippetHeader' | 'snippetLine' | 'styles' | 'topbar' | 'warningsToplevel';
|
|
10
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type DOM = import('./dom.js').DOM;
|
|
2
|
+
export type DetailsRenderer = import('./details-renderer.js').DetailsRenderer;
|
|
3
|
+
export type CRCSegment = {
|
|
4
|
+
node: LH.Audit.Details.SimpleCriticalRequestNode[string];
|
|
5
|
+
isLastChild: boolean;
|
|
6
|
+
hasChildren: boolean;
|
|
7
|
+
startTime: number;
|
|
8
|
+
transferSize: number;
|
|
9
|
+
treeMarkers: boolean[];
|
|
10
|
+
};
|
|
11
|
+
/** @typedef {import('./dom.js').DOM} DOM */
|
|
12
|
+
/** @typedef {import('./details-renderer.js').DetailsRenderer} DetailsRenderer */
|
|
13
|
+
/**
|
|
14
|
+
* @typedef CRCSegment
|
|
15
|
+
* @property {LH.Audit.Details.SimpleCriticalRequestNode[string]} node
|
|
16
|
+
* @property {boolean} isLastChild
|
|
17
|
+
* @property {boolean} hasChildren
|
|
18
|
+
* @property {number} startTime
|
|
19
|
+
* @property {number} transferSize
|
|
20
|
+
* @property {boolean[]} treeMarkers
|
|
21
|
+
*/
|
|
22
|
+
export class CriticalRequestChainRenderer {
|
|
23
|
+
/**
|
|
24
|
+
* Create render context for critical-request-chain tree display.
|
|
25
|
+
* @param {LH.Audit.Details.SimpleCriticalRequestNode} tree
|
|
26
|
+
* @return {{tree: LH.Audit.Details.SimpleCriticalRequestNode, startTime: number, transferSize: number}}
|
|
27
|
+
*/
|
|
28
|
+
static initTree(tree: LH.Audit.Details.SimpleCriticalRequestNode): {
|
|
29
|
+
tree: LH.Audit.Details.SimpleCriticalRequestNode;
|
|
30
|
+
startTime: number;
|
|
31
|
+
transferSize: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Helper to create context for each critical-request-chain node based on its
|
|
35
|
+
* parent. Calculates if this node is the last child, whether it has any
|
|
36
|
+
* children itself and what the tree looks like all the way back up to the root,
|
|
37
|
+
* so the tree markers can be drawn correctly.
|
|
38
|
+
* @param {LH.Audit.Details.SimpleCriticalRequestNode} parent
|
|
39
|
+
* @param {string} id
|
|
40
|
+
* @param {number} startTime
|
|
41
|
+
* @param {number} transferSize
|
|
42
|
+
* @param {Array<boolean>=} treeMarkers
|
|
43
|
+
* @param {boolean=} parentIsLastChild
|
|
44
|
+
* @return {CRCSegment}
|
|
45
|
+
*/
|
|
46
|
+
static createSegment(parent: LH.Audit.Details.SimpleCriticalRequestNode, id: string, startTime: number, transferSize: number, treeMarkers?: Array<boolean> | undefined, parentIsLastChild?: boolean | undefined): CRCSegment;
|
|
47
|
+
/**
|
|
48
|
+
* Creates the DOM for a tree segment.
|
|
49
|
+
* @param {DOM} dom
|
|
50
|
+
* @param {CRCSegment} segment
|
|
51
|
+
* @param {DetailsRenderer} detailsRenderer
|
|
52
|
+
* @return {Node}
|
|
53
|
+
*/
|
|
54
|
+
static createChainNode(dom: DOM, segment: CRCSegment, detailsRenderer: DetailsRenderer): Node;
|
|
55
|
+
/**
|
|
56
|
+
* Recursively builds a tree from segments.
|
|
57
|
+
* @param {DOM} dom
|
|
58
|
+
* @param {DocumentFragment} tmpl
|
|
59
|
+
* @param {CRCSegment} segment
|
|
60
|
+
* @param {Element} elem Parent element.
|
|
61
|
+
* @param {LH.Audit.Details.CriticalRequestChain} details
|
|
62
|
+
* @param {DetailsRenderer} detailsRenderer
|
|
63
|
+
*/
|
|
64
|
+
static buildTree(dom: DOM, tmpl: DocumentFragment, segment: CRCSegment, elem: Element, details: LH.Audit.Details.CriticalRequestChain, detailsRenderer: DetailsRenderer): void;
|
|
65
|
+
/**
|
|
66
|
+
* @param {DOM} dom
|
|
67
|
+
* @param {LH.Audit.Details.CriticalRequestChain} details
|
|
68
|
+
* @param {DetailsRenderer} detailsRenderer
|
|
69
|
+
* @return {Element}
|
|
70
|
+
*/
|
|
71
|
+
static render(dom: DOM, details: LH.Audit.Details.CriticalRequestChain, detailsRenderer: DetailsRenderer): Element;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=crc-details-renderer.d.ts.map
|