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/cli/bin.d.ts
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string=} manualArgv
|
|
3
|
+
* @param {{noExitOnFailure?: boolean}=} options
|
|
4
|
+
* @return {LH.CliFlags}
|
|
5
|
+
*/
|
|
6
|
+
export function getFlags(manualArgv?: string | undefined, options?: {
|
|
7
|
+
noExitOnFailure?: boolean;
|
|
8
|
+
} | undefined): LH.CliFlags;
|
|
9
|
+
/**
|
|
10
|
+
* @param {string=} manualArgv
|
|
11
|
+
*/
|
|
12
|
+
export function getYargsParser(manualArgv?: string | undefined): yargs.Argv<yargs.Omit<yargs.Omit<yargs.Omit<yargs.Omit<yargs.Omit<yargs.Omit<yargs.Omit<yargs.Omit<{
|
|
13
|
+
_: string[] | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
"cli-flags-path": unknown;
|
|
16
|
+
}, "verbose" | "quiet"> & yargs.InferredOptionTypes<{
|
|
17
|
+
verbose: {
|
|
18
|
+
type: "boolean";
|
|
19
|
+
default: boolean;
|
|
20
|
+
describe: string;
|
|
21
|
+
};
|
|
22
|
+
quiet: {
|
|
23
|
+
type: "boolean";
|
|
24
|
+
default: boolean;
|
|
25
|
+
describe: string;
|
|
26
|
+
};
|
|
27
|
+
}>, "port" | "screenEmulation" | "emulatedUserAgent" | "hostname" | "preset" | "save-assets" | "list-all-audits" | "list-locales" | "list-trace-categories" | "debug-navigation" | "legacy-navigation" | "additional-trace-categories" | "config-path" | "chrome-flags" | "form-factor" | "max-wait-for-load" | "enable-error-reporting" | "gather-mode" | "audit-mode" | "only-audits" | "only-categories" | "skip-audits" | "budget-path" | "disable-full-page-screenshot"> & yargs.InferredOptionTypes<{
|
|
28
|
+
'save-assets': {
|
|
29
|
+
type: "boolean";
|
|
30
|
+
default: boolean;
|
|
31
|
+
describe: string;
|
|
32
|
+
};
|
|
33
|
+
'list-all-audits': {
|
|
34
|
+
type: "boolean";
|
|
35
|
+
default: boolean;
|
|
36
|
+
describe: string;
|
|
37
|
+
};
|
|
38
|
+
'list-locales': {
|
|
39
|
+
type: "boolean";
|
|
40
|
+
default: boolean;
|
|
41
|
+
describe: string;
|
|
42
|
+
};
|
|
43
|
+
'list-trace-categories': {
|
|
44
|
+
type: "boolean";
|
|
45
|
+
default: boolean;
|
|
46
|
+
describe: string;
|
|
47
|
+
};
|
|
48
|
+
'debug-navigation': {
|
|
49
|
+
type: "boolean";
|
|
50
|
+
describe: string;
|
|
51
|
+
};
|
|
52
|
+
'legacy-navigation': {
|
|
53
|
+
type: "boolean";
|
|
54
|
+
default: boolean;
|
|
55
|
+
describe: string;
|
|
56
|
+
};
|
|
57
|
+
'additional-trace-categories': {
|
|
58
|
+
type: "string";
|
|
59
|
+
describe: string;
|
|
60
|
+
};
|
|
61
|
+
'config-path': {
|
|
62
|
+
type: "string";
|
|
63
|
+
describe: string;
|
|
64
|
+
};
|
|
65
|
+
preset: {
|
|
66
|
+
type: "string";
|
|
67
|
+
describe: string;
|
|
68
|
+
};
|
|
69
|
+
'chrome-flags': {
|
|
70
|
+
type: "string";
|
|
71
|
+
default: string;
|
|
72
|
+
describe: string;
|
|
73
|
+
};
|
|
74
|
+
port: {
|
|
75
|
+
type: "number";
|
|
76
|
+
default: number;
|
|
77
|
+
describe: string;
|
|
78
|
+
};
|
|
79
|
+
hostname: {
|
|
80
|
+
type: "string";
|
|
81
|
+
default: string;
|
|
82
|
+
describe: string;
|
|
83
|
+
};
|
|
84
|
+
'form-factor': {
|
|
85
|
+
type: "string";
|
|
86
|
+
describe: string;
|
|
87
|
+
};
|
|
88
|
+
screenEmulation: {
|
|
89
|
+
describe: string;
|
|
90
|
+
coerce: typeof coerceScreenEmulation;
|
|
91
|
+
};
|
|
92
|
+
emulatedUserAgent: {
|
|
93
|
+
type: "string";
|
|
94
|
+
coerce: typeof coerceOptionalStringBoolean;
|
|
95
|
+
describe: string;
|
|
96
|
+
};
|
|
97
|
+
'max-wait-for-load': {
|
|
98
|
+
type: "number";
|
|
99
|
+
describe: string;
|
|
100
|
+
};
|
|
101
|
+
'enable-error-reporting': {
|
|
102
|
+
type: "boolean";
|
|
103
|
+
describe: string;
|
|
104
|
+
};
|
|
105
|
+
'gather-mode': {
|
|
106
|
+
alias: string;
|
|
107
|
+
coerce: typeof coerceOptionalStringBoolean;
|
|
108
|
+
describe: string;
|
|
109
|
+
};
|
|
110
|
+
'audit-mode': {
|
|
111
|
+
alias: string;
|
|
112
|
+
coerce: typeof coerceOptionalStringBoolean;
|
|
113
|
+
describe: string;
|
|
114
|
+
};
|
|
115
|
+
'only-audits': {
|
|
116
|
+
array: true;
|
|
117
|
+
type: "string";
|
|
118
|
+
coerce: typeof splitCommaSeparatedValues;
|
|
119
|
+
describe: string;
|
|
120
|
+
};
|
|
121
|
+
'only-categories': {
|
|
122
|
+
array: true;
|
|
123
|
+
type: "string";
|
|
124
|
+
coerce: typeof splitCommaSeparatedValues;
|
|
125
|
+
describe: string;
|
|
126
|
+
};
|
|
127
|
+
'skip-audits': {
|
|
128
|
+
array: true;
|
|
129
|
+
type: "string";
|
|
130
|
+
coerce: typeof splitCommaSeparatedValues;
|
|
131
|
+
describe: string;
|
|
132
|
+
};
|
|
133
|
+
'budget-path': {
|
|
134
|
+
type: "string";
|
|
135
|
+
describe: string;
|
|
136
|
+
};
|
|
137
|
+
'disable-full-page-screenshot': {
|
|
138
|
+
type: "boolean";
|
|
139
|
+
describe: string;
|
|
140
|
+
};
|
|
141
|
+
}>, "output" | "view" | "output-path"> & yargs.InferredOptionTypes<{
|
|
142
|
+
output: {
|
|
143
|
+
type: "array";
|
|
144
|
+
default: readonly ["html"];
|
|
145
|
+
coerce: typeof coerceOutput;
|
|
146
|
+
describe: string;
|
|
147
|
+
};
|
|
148
|
+
'output-path': {
|
|
149
|
+
type: "string";
|
|
150
|
+
coerce: typeof coerceOutputPath;
|
|
151
|
+
describe: string;
|
|
152
|
+
};
|
|
153
|
+
view: {
|
|
154
|
+
type: "boolean";
|
|
155
|
+
default: boolean;
|
|
156
|
+
describe: string;
|
|
157
|
+
};
|
|
158
|
+
}>, "locale" | "blocked-url-patterns" | "disable-storage-reset" | "throttling-method"> & yargs.InferredOptionTypes<{
|
|
159
|
+
locale: {
|
|
160
|
+
coerce: typeof coerceLocale;
|
|
161
|
+
describe: string;
|
|
162
|
+
};
|
|
163
|
+
'blocked-url-patterns': {
|
|
164
|
+
array: true;
|
|
165
|
+
type: "string";
|
|
166
|
+
describe: string;
|
|
167
|
+
};
|
|
168
|
+
'disable-storage-reset': {
|
|
169
|
+
type: "boolean";
|
|
170
|
+
describe: string;
|
|
171
|
+
};
|
|
172
|
+
'throttling-method': {
|
|
173
|
+
type: "string";
|
|
174
|
+
describe: string;
|
|
175
|
+
};
|
|
176
|
+
}> & {
|
|
177
|
+
throttling: import("../types/lh.js").ThrottlingSettings | undefined;
|
|
178
|
+
}, "channel" | "plugins" | "extra-headers" | "precomputed-lantern-data-path" | "lantern-data-output-path" | "chrome-ignore-default-flags"> & yargs.InferredOptionTypes<{
|
|
179
|
+
'extra-headers': {
|
|
180
|
+
coerce: typeof coerceExtraHeaders;
|
|
181
|
+
describe: string;
|
|
182
|
+
};
|
|
183
|
+
'precomputed-lantern-data-path': {
|
|
184
|
+
type: "string";
|
|
185
|
+
describe: string;
|
|
186
|
+
};
|
|
187
|
+
'lantern-data-output-path': {
|
|
188
|
+
type: "string";
|
|
189
|
+
describe: string;
|
|
190
|
+
};
|
|
191
|
+
plugins: {
|
|
192
|
+
array: true;
|
|
193
|
+
type: "string";
|
|
194
|
+
coerce: typeof splitCommaSeparatedValues;
|
|
195
|
+
describe: string;
|
|
196
|
+
};
|
|
197
|
+
channel: {
|
|
198
|
+
type: "string";
|
|
199
|
+
default: string;
|
|
200
|
+
};
|
|
201
|
+
'chrome-ignore-default-flags': {
|
|
202
|
+
type: "boolean";
|
|
203
|
+
default: boolean;
|
|
204
|
+
};
|
|
205
|
+
}>, "form-factor"> & {
|
|
206
|
+
"form-factor": "mobile" | "desktop" | undefined;
|
|
207
|
+
}, "throttling-method"> & {
|
|
208
|
+
"throttling-method": "devtools" | "simulate" | "provided" | undefined;
|
|
209
|
+
}, "preset"> & {
|
|
210
|
+
preset: "desktop" | "experimental" | "perf" | undefined;
|
|
211
|
+
}>;
|
|
212
|
+
import yargs from "yargs";
|
|
213
|
+
/**
|
|
214
|
+
* Take yarg's unchecked object value and ensure it is a proper LH.screenEmulationSettings.
|
|
215
|
+
* @param {unknown} value
|
|
216
|
+
* @return {Partial<LH.ScreenEmulationSettings>|undefined}
|
|
217
|
+
*/
|
|
218
|
+
declare function coerceScreenEmulation(value: unknown): Partial<LH.ScreenEmulationSettings> | undefined;
|
|
219
|
+
/**
|
|
220
|
+
* @param {unknown} value
|
|
221
|
+
* @return {boolean|string|undefined}
|
|
222
|
+
*/
|
|
223
|
+
declare function coerceOptionalStringBoolean(value: unknown): boolean | string | undefined;
|
|
224
|
+
/**
|
|
225
|
+
* Support comma-separated values for some array flags by splitting on any ',' found.
|
|
226
|
+
* @param {Array<string>=} strings
|
|
227
|
+
* @return {Array<string>=}
|
|
228
|
+
*/
|
|
229
|
+
declare function splitCommaSeparatedValues(strings?: Array<string> | undefined): Array<string> | undefined;
|
|
230
|
+
/**
|
|
231
|
+
* Coerce output CLI input to `LH.SharedFlagsSettings['output']` or throw if not possible.
|
|
232
|
+
* @param {Array<unknown>} values
|
|
233
|
+
* @return {Array<LH.OutputMode>}
|
|
234
|
+
*/
|
|
235
|
+
declare function coerceOutput(values: Array<unknown>): Array<LH.OutputMode>;
|
|
236
|
+
/**
|
|
237
|
+
* Verifies outputPath is something we can actually write to.
|
|
238
|
+
* @param {unknown=} value
|
|
239
|
+
* @return {string=}
|
|
240
|
+
*/
|
|
241
|
+
declare function coerceOutputPath(value?: unknown | undefined): string | undefined;
|
|
242
|
+
/**
|
|
243
|
+
* Verifies value is a string, then coerces type to LH.Locale for convenience. However, don't
|
|
244
|
+
* allowlist specific locales. Why? So we can support the user who requests 'es-MX' (unsupported)
|
|
245
|
+
* and we'll fall back to 'es' (supported).
|
|
246
|
+
* @param {unknown} value
|
|
247
|
+
* @return {LH.Locale|undefined}
|
|
248
|
+
*/
|
|
249
|
+
declare function coerceLocale(value: unknown): LH.Locale | undefined;
|
|
250
|
+
/**
|
|
251
|
+
* `--extra-headers` comes in as a JSON string or a path to a JSON string, but the flag value
|
|
252
|
+
* needs to be the parsed object. Load file (if necessary) and returns the parsed object.
|
|
253
|
+
* @param {unknown} value
|
|
254
|
+
* @return {LH.SharedFlagsSettings['extraHeaders']}
|
|
255
|
+
*/
|
|
256
|
+
declare function coerceExtraHeaders(value: unknown): LH.SharedFlagsSettings['extraHeaders'];
|
|
257
|
+
export {};
|
|
258
|
+
//# sourceMappingURL=cli-flags.d.ts.map
|
package/cli/index.d.ts
ADDED
package/cli/printer.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verify output path to use, either stdout or a file path.
|
|
3
|
+
* @param {string} path
|
|
4
|
+
* @return {string}
|
|
5
|
+
*/
|
|
6
|
+
export function checkOutputPath(path: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Writes the output.
|
|
9
|
+
* @param {string} output
|
|
10
|
+
* @param {LH.OutputMode} mode
|
|
11
|
+
* @param {string} path
|
|
12
|
+
* @return {Promise<void>}
|
|
13
|
+
*/
|
|
14
|
+
export function write(output: string, mode: LH.OutputMode, path: string): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* An enumeration of acceptable output modes:
|
|
17
|
+
* 'json': JSON formatted results
|
|
18
|
+
* 'html': An HTML report
|
|
19
|
+
* 'csv': CSV formatted results
|
|
20
|
+
* @type {LH.Util.SelfMap<LH.OutputMode>}
|
|
21
|
+
*/
|
|
22
|
+
export const OutputMode: LH.Util.SelfMap<LH.OutputMode>;
|
|
23
|
+
/**
|
|
24
|
+
* Returns a list of valid output options.
|
|
25
|
+
* @return {Array<string>}
|
|
26
|
+
*/
|
|
27
|
+
export function getValidOutputOptions(): Array<string>;
|
|
28
|
+
//# sourceMappingURL=printer.d.ts.map
|
package/cli/run.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type ExitError = Error & {
|
|
2
|
+
code: string;
|
|
3
|
+
friendlyMessage?: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* exported for testing
|
|
7
|
+
* @param {string|Array<string>} flags
|
|
8
|
+
* @return {Array<string>}
|
|
9
|
+
*/
|
|
10
|
+
export function parseChromeFlags(flags?: string | Array<string>): Array<string>;
|
|
11
|
+
/**
|
|
12
|
+
* @param {LH.RunnerResult} runnerResult
|
|
13
|
+
* @param {LH.CliFlags} flags
|
|
14
|
+
* @return {Promise<void>}
|
|
15
|
+
*/
|
|
16
|
+
export function saveResults(runnerResult: LH.RunnerResult, flags: LH.CliFlags): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* @param {string} url
|
|
19
|
+
* @param {LH.CliFlags} flags
|
|
20
|
+
* @param {LH.Config|undefined} config
|
|
21
|
+
* @return {Promise<LH.RunnerResult|undefined>}
|
|
22
|
+
*/
|
|
23
|
+
export function runLighthouse(url: string, flags: LH.CliFlags, config: LH.Config | undefined): Promise<LH.RunnerResult | undefined>;
|
|
24
|
+
//# sourceMappingURL=run.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default exclusions;
|
|
2
|
+
/**
|
|
3
|
+
* @license Copyright 2022 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
|
+
* List of smoke tests excluded per runner. eg: 'cli': ['a11y', 'dbw']
|
|
9
|
+
* @type {Record<string, Array<string>>}
|
|
10
|
+
*/
|
|
11
|
+
declare const exclusions: Record<string, Array<string>>;
|
|
12
|
+
//# sourceMappingURL=exclusions.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
* COMPAT: update from the old TestDefn format (array of `expectations` per
|
|
8
|
+
* definition) to the new format (single `expectations` per def), doing our best
|
|
9
|
+
* generating some unique IDs.
|
|
10
|
+
* TODO: remove in Lighthouse 9+ once PubAds (and others?) are updated.
|
|
11
|
+
* @see https://github.com/GoogleChrome/lighthouse/issues/11950
|
|
12
|
+
* @param {ReadonlyArray<Smokehouse.BackCompatTestDefn>} allTestDefns
|
|
13
|
+
* @return {Array<Smokehouse.TestDfn>}
|
|
14
|
+
*/
|
|
15
|
+
export function updateTestDefnFormat(allTestDefns: ReadonlyArray<Smokehouse.BackCompatTestDefn>): Array<Smokehouse.TestDfn>;
|
|
16
|
+
//# sourceMappingURL=back-compat-util.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Smokehouse.SmokehouseLibOptions} options
|
|
3
|
+
*/
|
|
4
|
+
export function smokehouse(options: Smokehouse.SmokehouseLibOptions): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
testResults: import("../smokehouse.js").SmokehouseResult[];
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright 2019 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
|
+
* An extension of Error that includes any stdout or stderr from a child
|
|
8
|
+
* process. Based on the error thrown by `child_process.exec()`.
|
|
9
|
+
* https://github.com/nodejs/node/blob/3aeae8d81b7b78668c37f7a07a72d94781126d49/lib/child_process.js#L150-L176
|
|
10
|
+
*/
|
|
11
|
+
export class ChildProcessError extends Error {
|
|
12
|
+
/**
|
|
13
|
+
* @param {string} message
|
|
14
|
+
* @param {string=} stdout
|
|
15
|
+
* @param {string=} stderr
|
|
16
|
+
*/
|
|
17
|
+
constructor(message: string, stdout?: string | undefined, stderr?: string | undefined);
|
|
18
|
+
stdout: string;
|
|
19
|
+
stderr: string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=child-process-error.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright 2019 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
|
+
* A class that maintains a concurrency pool to coordinate many jobs that should
|
|
8
|
+
* only be run `concurrencyLimit` at a time.
|
|
9
|
+
* API inspired by http://bluebirdjs.com/docs/api/promise.map.html, but
|
|
10
|
+
* independent callers of `concurrentMap()` share the same concurrency limit.
|
|
11
|
+
*/
|
|
12
|
+
export class ConcurrentMapper {
|
|
13
|
+
/**
|
|
14
|
+
* Runs callbackfn on `values` in parallel, at a max of `concurrency` at a
|
|
15
|
+
* time. Resolves to an array of the results or rejects with the first
|
|
16
|
+
* rejected result. Default `concurrency` limit is `Infinity`.
|
|
17
|
+
* @template T, U
|
|
18
|
+
* @param {Array<T>} values
|
|
19
|
+
* @param {(value: T, index: number, array: Array<T>) => Promise<U>} callbackfn
|
|
20
|
+
* @param {{concurrency: number}} [options]
|
|
21
|
+
* @return {Promise<Array<U>>}
|
|
22
|
+
*/
|
|
23
|
+
static map<T_1, U_2>(values: T_1[], callbackfn: (value: T_1, index: number, array: T_1[]) => Promise<U_2>, options?: {
|
|
24
|
+
concurrency: number;
|
|
25
|
+
} | undefined): Promise<U_2[]>;
|
|
26
|
+
/** @type {Set<Promise<unknown>>} */
|
|
27
|
+
_promisePool: Set<Promise<unknown>>;
|
|
28
|
+
/**
|
|
29
|
+
* The limits of all currently running jobs. There will be duplicates.
|
|
30
|
+
* @type {Array<number>}
|
|
31
|
+
*/
|
|
32
|
+
_allConcurrencyLimits: Array<number>;
|
|
33
|
+
/**
|
|
34
|
+
* Returns whether there are fewer running jobs than the minimum current
|
|
35
|
+
* concurrency limit and the proposed new `concurrencyLimit`.
|
|
36
|
+
* @param {number} concurrencyLimit
|
|
37
|
+
*/
|
|
38
|
+
_canRunMoreAtLimit(concurrencyLimit: number): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Add a job to pool.
|
|
41
|
+
* @param {Promise<unknown>} job
|
|
42
|
+
* @param {number} concurrencyLimit
|
|
43
|
+
*/
|
|
44
|
+
_addJob(job: Promise<unknown>, concurrencyLimit: number): void;
|
|
45
|
+
/**
|
|
46
|
+
* Remove a job from pool.
|
|
47
|
+
* @param {Promise<unknown>} job
|
|
48
|
+
* @param {number} concurrencyLimit
|
|
49
|
+
*/
|
|
50
|
+
_removeJob(job: Promise<unknown>, concurrencyLimit: number): void;
|
|
51
|
+
/**
|
|
52
|
+
* Runs callbackfn on `values` in parallel, at a max of `concurrency` at
|
|
53
|
+
* a time across all callers on this instance. Resolves to an array of the
|
|
54
|
+
* results (for each caller separately) or rejects with the first rejected
|
|
55
|
+
* result. Default `concurrency` limit is `Infinity`.
|
|
56
|
+
* @template T, U
|
|
57
|
+
* @param {Array<T>} values
|
|
58
|
+
* @param {(value: T, index: number, array: Array<T>) => Promise<U>} callbackfn
|
|
59
|
+
* @param {{concurrency: number}} [options]
|
|
60
|
+
* @return {Promise<Array<U>>}
|
|
61
|
+
*/
|
|
62
|
+
pooledMap<T, U>(values: T[], callbackfn: (value: T, index: number, array: T[]) => Promise<U>, options?: {
|
|
63
|
+
concurrency: number;
|
|
64
|
+
} | undefined): Promise<U[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Runs `fn` concurrent to other operations in the pool, at a max of
|
|
67
|
+
* `concurrency` at a time across all callers on this instance. Default
|
|
68
|
+
* `concurrency` limit is `Infinity`.
|
|
69
|
+
* @template U
|
|
70
|
+
* @param {() => Promise<U>} fn
|
|
71
|
+
* @param {{concurrency: number}} [options]
|
|
72
|
+
* @return {Promise<U>}
|
|
73
|
+
*/
|
|
74
|
+
runInPool<U_1>(fn: () => Promise<U_1>, options?: {
|
|
75
|
+
concurrency: number;
|
|
76
|
+
} | undefined): Promise<U_1>;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=concurrent-mapper.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright 2019 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
|
+
* A simple buffered log to use in place of `console`.
|
|
8
|
+
*/
|
|
9
|
+
export class LocalConsole {
|
|
10
|
+
_log: string;
|
|
11
|
+
/**
|
|
12
|
+
* @param {string} str
|
|
13
|
+
*/
|
|
14
|
+
log(str: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Log but without the ending newline.
|
|
17
|
+
* @param {string} str
|
|
18
|
+
*/
|
|
19
|
+
write(str: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* @return {string}
|
|
22
|
+
*/
|
|
23
|
+
getLog(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Append a stdout and stderr to this log.
|
|
26
|
+
* @param {{stdout: string, stderr: string}} stdStrings
|
|
27
|
+
*/
|
|
28
|
+
adoptStdStrings(stdStrings: {
|
|
29
|
+
stdout: string;
|
|
30
|
+
stderr: string;
|
|
31
|
+
}): void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=local-console.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Launch Chrome and do a full Lighthouse run via the Lighthouse DevTools bundle.
|
|
3
|
+
* @param {string} url
|
|
4
|
+
* @param {LH.Config=} config
|
|
5
|
+
* @param {{isDebug?: boolean, useLegacyNavigation?: boolean}=} testRunnerOptions
|
|
6
|
+
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts, log: string}>}
|
|
7
|
+
*/
|
|
8
|
+
export function runLighthouse(url: string, config?: LH.Config | undefined, testRunnerOptions?: {
|
|
9
|
+
isDebug?: boolean;
|
|
10
|
+
useLegacyNavigation?: boolean;
|
|
11
|
+
} | undefined): Promise<{
|
|
12
|
+
lhr: LH.Result;
|
|
13
|
+
artifacts: LH.Artifacts;
|
|
14
|
+
log: string;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference path="../../../../../../types/internal/lighthouse-logger.d.ts" />
|
|
2
|
+
/**
|
|
3
|
+
* Launch Chrome and do a full Lighthouse run via the Lighthouse CLI.
|
|
4
|
+
* @param {string} url
|
|
5
|
+
* @param {LH.Config=} config
|
|
6
|
+
* @param {{isDebug?: boolean, useFraggleRock?: boolean}=} testRunnerOptions
|
|
7
|
+
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts, log: string}>}
|
|
8
|
+
*/
|
|
9
|
+
export function runLighthouse(url: string, config?: LH.Config | undefined, testRunnerOptions?: {
|
|
10
|
+
isDebug?: boolean | undefined;
|
|
11
|
+
useFraggleRock?: boolean | undefined;
|
|
12
|
+
} | undefined): Promise<{
|
|
13
|
+
lhr: LH.Result;
|
|
14
|
+
artifacts: LH.Artifacts;
|
|
15
|
+
log: string;
|
|
16
|
+
}>;
|
|
17
|
+
import log from "lighthouse-logger";
|
|
18
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Launch Chrome and do a full Lighthouse run via DevTools.
|
|
3
|
+
* By default, the latest DevTools frontend is used (.tmp/chromium-web-tests/devtools/devtools-frontend)
|
|
4
|
+
* unless DEVTOOLS_PATH is set.
|
|
5
|
+
* CHROME_PATH determines which Chrome is used–otherwise the default is puppeteer's chrome binary.
|
|
6
|
+
* @param {string} url
|
|
7
|
+
* @param {LH.Config=} config
|
|
8
|
+
* @param {{isDebug?: boolean, useLegacyNavigation?: boolean}=} testRunnerOptions
|
|
9
|
+
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts, log: string}>}
|
|
10
|
+
*/
|
|
11
|
+
export function runLighthouse(url: string, config?: LH.Config | undefined, testRunnerOptions?: {
|
|
12
|
+
isDebug?: boolean;
|
|
13
|
+
useLegacyNavigation?: boolean;
|
|
14
|
+
} | undefined): Promise<{
|
|
15
|
+
lhr: LH.Result;
|
|
16
|
+
artifacts: LH.Artifacts;
|
|
17
|
+
log: string;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Download/pull latest DevTools, build Lighthouse for DevTools, roll to DevTools, and build DevTools.
|
|
21
|
+
*/
|
|
22
|
+
export function setup(): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=devtools.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference path="../../../../../types/internal/lighthouse-logger.d.ts" />
|
|
2
|
+
export type Difference = {
|
|
3
|
+
path: string;
|
|
4
|
+
actual: any;
|
|
5
|
+
expected: any;
|
|
6
|
+
};
|
|
7
|
+
export type Comparison = {
|
|
8
|
+
name: string;
|
|
9
|
+
actual: any;
|
|
10
|
+
expected: any;
|
|
11
|
+
equal: boolean;
|
|
12
|
+
diffs: Difference[] | null;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Log all the comparisons between actual and expected test results, then print
|
|
16
|
+
* summary. Returns count of passed and failed tests.
|
|
17
|
+
* @param {{lhr: LH.Result, artifacts: LH.Artifacts, networkRequests?: string[]}} actual
|
|
18
|
+
* @param {Smokehouse.ExpectedRunnerResult} expected
|
|
19
|
+
* @param {{runner?: string, isDebug?: boolean, useLegacyNavigation?: boolean}=} reportOptions
|
|
20
|
+
* @return {{passed: number, failed: number, log: string}}
|
|
21
|
+
*/
|
|
22
|
+
export function getAssertionReport(actual: {
|
|
23
|
+
lhr: LH.Result;
|
|
24
|
+
artifacts: LH.Artifacts;
|
|
25
|
+
networkRequests?: string[];
|
|
26
|
+
}, expected: Smokehouse.ExpectedRunnerResult, reportOptions?: {
|
|
27
|
+
runner?: string;
|
|
28
|
+
isDebug?: boolean;
|
|
29
|
+
useLegacyNavigation?: boolean;
|
|
30
|
+
} | undefined): {
|
|
31
|
+
passed: number;
|
|
32
|
+
failed: number;
|
|
33
|
+
log: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Walk down expected result, comparing to actual result. If a difference is found,
|
|
37
|
+
* the path to the difference is returned, along with the expected primitive value
|
|
38
|
+
* and the value actually found at that location. If no difference is found, returns
|
|
39
|
+
* null.
|
|
40
|
+
*
|
|
41
|
+
* Only checks own enumerable properties, not object prototypes, and will loop
|
|
42
|
+
* until the stack is exhausted, so works best with simple objects (e.g. parsed JSON).
|
|
43
|
+
* @param {string} path
|
|
44
|
+
* @param {*} actual
|
|
45
|
+
* @param {*} expected
|
|
46
|
+
* @return {Difference[]|null}
|
|
47
|
+
*/
|
|
48
|
+
export function findDifferences(path: string, actual: any, expected: any): Difference[] | null;
|
|
49
|
+
import log from "lighthouse-logger";
|
|
50
|
+
//# sourceMappingURL=report-assert.d.ts.map
|