lighthouse 12.1.0 → 12.2.0
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/cli-flags.d.ts +2 -2
- package/cli/cli-flags.js +1 -1
- package/cli/sentry-prompt.js +2 -2
- package/cli/test/smokehouse/frontends/lib.d.ts +1 -1
- package/cli/test/smokehouse/lib/concurrent-mapper.d.ts +6 -6
- package/cli/test/smokehouse/lighthouse-runners/bundle.d.ts +1 -1
- package/cli/test/smokehouse/lighthouse-runners/cli.d.ts +1 -2
- package/cli/test/smokehouse/lighthouse-runners/devtools.d.ts +1 -1
- package/cli/test/smokehouse/report-assert.d.ts +0 -1
- package/cli/test/smokehouse/version-check.d.ts +3 -3
- package/core/audits/accessibility/accesskeys.d.ts +3 -3
- package/core/audits/accessibility/aria-allowed-attr.d.ts +3 -3
- package/core/audits/accessibility/aria-allowed-role.d.ts +3 -3
- package/core/audits/accessibility/aria-command-name.d.ts +3 -3
- package/core/audits/accessibility/aria-conditional-attr.d.ts +3 -3
- package/core/audits/accessibility/aria-deprecated-role.d.ts +3 -3
- package/core/audits/accessibility/aria-dialog-name.d.ts +3 -3
- package/core/audits/accessibility/aria-hidden-body.d.ts +3 -3
- package/core/audits/accessibility/aria-hidden-focus.d.ts +3 -3
- package/core/audits/accessibility/aria-input-field-name.d.ts +3 -3
- package/core/audits/accessibility/aria-meter-name.d.ts +3 -3
- package/core/audits/accessibility/aria-progressbar-name.d.ts +3 -3
- package/core/audits/accessibility/aria-prohibited-attr.d.ts +3 -3
- package/core/audits/accessibility/aria-required-attr.d.ts +3 -3
- package/core/audits/accessibility/aria-required-children.d.ts +3 -3
- package/core/audits/accessibility/aria-required-parent.d.ts +3 -3
- package/core/audits/accessibility/aria-roles.d.ts +3 -3
- package/core/audits/accessibility/aria-text.d.ts +3 -3
- package/core/audits/accessibility/aria-toggle-field-name.d.ts +3 -3
- package/core/audits/accessibility/aria-tooltip-name.d.ts +3 -3
- package/core/audits/accessibility/aria-treeitem-name.d.ts +3 -3
- package/core/audits/accessibility/aria-valid-attr-value.d.ts +3 -3
- package/core/audits/accessibility/aria-valid-attr.d.ts +3 -3
- package/core/audits/accessibility/axe-audit.d.ts +1 -1
- package/core/audits/accessibility/button-name.d.ts +3 -3
- package/core/audits/accessibility/bypass.d.ts +3 -3
- package/core/audits/accessibility/color-contrast.d.ts +3 -3
- package/core/audits/accessibility/definition-list.d.ts +3 -3
- package/core/audits/accessibility/dlitem.d.ts +3 -3
- package/core/audits/accessibility/document-title.d.ts +3 -3
- package/core/audits/accessibility/duplicate-id-aria.d.ts +3 -3
- package/core/audits/accessibility/empty-heading.d.ts +3 -3
- package/core/audits/accessibility/form-field-multiple-labels.d.ts +3 -3
- package/core/audits/accessibility/frame-title.d.ts +3 -3
- package/core/audits/accessibility/heading-order.d.ts +3 -3
- package/core/audits/accessibility/html-has-lang.d.ts +3 -3
- package/core/audits/accessibility/html-lang-valid.d.ts +3 -3
- package/core/audits/accessibility/html-xml-lang-mismatch.d.ts +3 -3
- package/core/audits/accessibility/identical-links-same-purpose.d.ts +3 -3
- package/core/audits/accessibility/image-alt.d.ts +3 -3
- package/core/audits/accessibility/image-redundant-alt.d.ts +3 -3
- package/core/audits/accessibility/input-button-name.d.ts +3 -3
- package/core/audits/accessibility/input-image-alt.d.ts +3 -3
- package/core/audits/accessibility/label-content-name-mismatch.d.ts +3 -3
- package/core/audits/accessibility/label.d.ts +3 -3
- package/core/audits/accessibility/landmark-one-main.d.ts +3 -3
- package/core/audits/accessibility/link-in-text-block.d.ts +3 -3
- package/core/audits/accessibility/link-name.d.ts +3 -3
- package/core/audits/accessibility/list.d.ts +3 -3
- package/core/audits/accessibility/listitem.d.ts +3 -3
- package/core/audits/accessibility/meta-refresh.d.ts +3 -3
- package/core/audits/accessibility/meta-viewport.d.ts +3 -3
- package/core/audits/accessibility/object-alt.d.ts +3 -3
- package/core/audits/accessibility/select-name.d.ts +3 -3
- package/core/audits/accessibility/skip-link.d.ts +3 -3
- package/core/audits/accessibility/tabindex.d.ts +3 -3
- package/core/audits/accessibility/table-duplicate-name.d.ts +3 -3
- package/core/audits/accessibility/table-fake-caption.d.ts +3 -3
- package/core/audits/accessibility/target-size.d.ts +3 -3
- package/core/audits/accessibility/td-has-header.d.ts +3 -3
- package/core/audits/accessibility/td-headers-attr.d.ts +3 -3
- package/core/audits/accessibility/th-has-data-cells.d.ts +3 -3
- package/core/audits/accessibility/valid-lang.d.ts +3 -3
- package/core/audits/accessibility/video-caption.d.ts +3 -3
- package/core/audits/audit.d.ts +17 -17
- package/core/audits/autocomplete.d.ts +9 -9
- package/core/audits/bf-cache.d.ts +10 -10
- package/core/audits/bootup-time.d.ts +7 -7
- package/core/audits/byte-efficiency/byte-efficiency-audit.d.ts +6 -8
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +3 -6
- package/core/audits/byte-efficiency/duplicated-javascript.d.ts +4 -4
- package/core/audits/byte-efficiency/efficient-animated-content.d.ts +3 -4
- package/core/audits/byte-efficiency/legacy-javascript.d.ts +7 -8
- package/core/audits/byte-efficiency/modern-image-formats.d.ts +3 -3
- package/core/audits/byte-efficiency/offscreen-images.d.ts +3 -4
- package/core/audits/byte-efficiency/render-blocking-resources.d.ts +5 -9
- package/core/audits/byte-efficiency/render-blocking-resources.js +10 -16
- package/core/audits/byte-efficiency/total-byte-weight.d.ts +4 -4
- package/core/audits/byte-efficiency/unminified-css.d.ts +3 -3
- package/core/audits/byte-efficiency/unminified-javascript.d.ts +3 -3
- package/core/audits/byte-efficiency/unused-css-rules.d.ts +3 -3
- package/core/audits/byte-efficiency/unused-javascript.d.ts +3 -3
- package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +4 -6
- package/core/audits/byte-efficiency/uses-optimized-images.d.ts +3 -3
- package/core/audits/byte-efficiency/uses-responsive-images-snapshot.d.ts +4 -4
- package/core/audits/byte-efficiency/uses-responsive-images.d.ts +4 -5
- package/core/audits/byte-efficiency/uses-text-compression.d.ts +3 -3
- package/core/audits/critical-request-chains.d.ts +3 -3
- package/core/audits/csp-xss.d.ts +8 -8
- package/core/audits/deprecations.d.ts +6 -6
- package/core/audits/dobetterweb/charset.d.ts +3 -3
- package/core/audits/dobetterweb/doctype.d.ts +9 -9
- package/core/audits/dobetterweb/dom-size.d.ts +9 -9
- package/core/audits/dobetterweb/geolocation-on-start.d.ts +3 -3
- package/core/audits/dobetterweb/inspector-issues.d.ts +6 -6
- package/core/audits/dobetterweb/js-libraries.d.ts +3 -3
- package/core/audits/dobetterweb/no-document-write.d.ts +3 -3
- package/core/audits/dobetterweb/notification-on-start.d.ts +3 -3
- package/core/audits/dobetterweb/paste-preventing-inputs.d.ts +3 -3
- package/core/audits/dobetterweb/uses-http2.d.ts +7 -11
- package/core/audits/dobetterweb/uses-http2.js +2 -5
- package/core/audits/dobetterweb/uses-passive-event-listeners.d.ts +3 -3
- package/core/audits/errors-in-console.d.ts +4 -4
- package/core/audits/font-display.d.ts +4 -4
- package/core/audits/image-aspect-ratio.d.ts +5 -5
- package/core/audits/image-size-responsive.d.ts +7 -7
- package/core/audits/is-on-https.d.ts +10 -10
- package/core/audits/largest-contentful-paint-element.d.ts +9 -9
- package/core/audits/layout-shifts.d.ts +9 -9
- package/core/audits/lcp-lazy-loaded.d.ts +3 -3
- package/core/audits/long-tasks.d.ts +11 -11
- package/core/audits/long-tasks.js +5 -5
- package/core/audits/mainthread-work-breakdown.d.ts +5 -5
- package/core/audits/metrics/cumulative-layout-shift.d.ts +1 -1
- package/core/audits/metrics/first-contentful-paint.d.ts +1 -1
- package/core/audits/metrics/first-meaningful-paint.d.ts +1 -1
- package/core/audits/metrics/interaction-to-next-paint.d.ts +1 -1
- package/core/audits/metrics/interactive.d.ts +1 -1
- package/core/audits/metrics/largest-contentful-paint.d.ts +1 -1
- package/core/audits/metrics/max-potential-fid.d.ts +2 -4
- package/core/audits/metrics/speed-index.d.ts +1 -1
- package/core/audits/metrics/total-blocking-time.d.ts +1 -1
- package/core/audits/network-rtt.d.ts +2 -2
- package/core/audits/network-server-latency.d.ts +2 -2
- package/core/audits/non-composited-animations.d.ts +9 -9
- package/core/audits/oopif-iframe-test-audit.d.ts +5 -5
- package/core/audits/preload-fonts.d.ts +3 -3
- package/core/audits/prioritize-lcp-image.d.ts +7 -7
- package/core/audits/redirects-http.d.ts +3 -3
- package/core/audits/redirects.d.ts +2 -3
- package/core/audits/resource-summary.d.ts +1 -1
- package/core/audits/screenshot-thumbnails.d.ts +2 -3
- package/core/audits/script-treemap-data.d.ts +1 -1
- package/core/audits/seo/canonical.d.ts +8 -8
- package/core/audits/seo/crawlable-anchors.d.ts +4 -4
- package/core/audits/seo/font-size.d.ts +11 -11
- package/core/audits/seo/hreflang.d.ts +6 -6
- package/core/audits/seo/http-status-code.d.ts +3 -3
- package/core/audits/seo/is-crawlable.d.ts +9 -10
- package/core/audits/seo/link-text.d.ts +4 -4
- package/core/audits/seo/manual/structured-data.d.ts +2 -2
- package/core/audits/seo/meta-description.d.ts +4 -4
- package/core/audits/seo/robots-txt.d.ts +6 -6
- package/core/audits/server-response-time.d.ts +4 -4
- package/core/audits/third-party-cookies.d.ts +4 -4
- package/core/audits/third-party-facades.d.ts +11 -12
- package/core/audits/third-party-summary.d.ts +5 -6
- package/core/audits/third-party-summary.js +7 -4
- package/core/audits/unsized-images.d.ts +3 -3
- package/core/audits/user-timings.d.ts +6 -6
- package/core/audits/uses-rel-preconnect.d.ts +5 -5
- package/core/audits/uses-rel-preload.d.ts +7 -7
- package/core/audits/uses-rel-preload.js +8 -6
- package/core/audits/valid-source-maps.d.ts +6 -7
- package/core/audits/viewport.d.ts +4 -4
- package/core/audits/work-during-interaction.d.ts +11 -12
- package/core/computed/computed-artifact.d.ts +2 -2
- package/core/computed/critical-request-chains.d.ts +9 -11
- package/core/computed/critical-request-chains.js +6 -6
- package/core/computed/document-urls.d.ts +3 -8
- package/core/computed/document-urls.js +1 -1
- package/core/computed/entity-classification.d.ts +6 -8
- package/core/computed/image-records.d.ts +3 -5
- package/core/computed/js-bundles.d.ts +2 -4
- package/core/computed/lcp-image-record.d.ts +3 -5
- package/core/computed/load-simulator.d.ts +7 -11
- package/core/computed/load-simulator.js +1 -1
- package/core/computed/main-resource.d.ts +5 -7
- package/core/computed/main-resource.js +1 -1
- package/core/computed/main-thread-tasks.d.ts +1 -3
- package/core/computed/metrics/cumulative-layout-shift.d.ts +2 -14
- package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +1 -3
- package/core/computed/metrics/first-contentful-paint.d.ts +1 -3
- package/core/computed/metrics/interactive.d.ts +1 -3
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +3 -7
- package/core/computed/metrics/lantern-first-contentful-paint.js +3 -5
- package/core/computed/metrics/lantern-interactive.d.ts +3 -7
- package/core/computed/metrics/lantern-interactive.js +3 -5
- package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +3 -7
- package/core/computed/metrics/lantern-largest-contentful-paint.js +3 -5
- package/core/computed/metrics/lantern-max-potential-fid.d.ts +3 -7
- package/core/computed/metrics/lantern-max-potential-fid.js +3 -5
- package/core/computed/metrics/lantern-metric.d.ts +8 -8
- package/core/computed/metrics/lantern-metric.js +1 -1
- package/core/computed/metrics/lantern-speed-index.d.ts +3 -7
- package/core/computed/metrics/lantern-speed-index.js +3 -5
- package/core/computed/metrics/lantern-total-blocking-time.d.ts +3 -7
- package/core/computed/metrics/lantern-total-blocking-time.js +1 -3
- package/core/computed/metrics/largest-contentful-paint-all-frames.d.ts +1 -3
- package/core/computed/metrics/largest-contentful-paint.d.ts +1 -3
- package/core/computed/metrics/lcp-breakdown.d.ts +3 -9
- package/core/computed/metrics/max-potential-fid.d.ts +1 -3
- package/core/computed/metrics/responsiveness.d.ts +7 -10
- package/core/computed/metrics/speed-index.d.ts +1 -3
- package/core/computed/metrics/time-to-first-byte.d.ts +1 -3
- package/core/computed/metrics/timing-summary.d.ts +8 -13
- package/core/computed/metrics/total-blocking-time.d.ts +1 -3
- package/core/computed/metrics/total-blocking-time.js +1 -1
- package/core/computed/module-duplication.d.ts +2 -8
- package/core/computed/navigation-insights.d.ts +2 -4
- package/core/computed/network-analysis.d.ts +2 -4
- package/core/computed/network-analysis.js +1 -1
- package/core/computed/network-records.d.ts +1 -3
- package/core/computed/page-dependency-graph.d.ts +9 -14
- package/core/computed/page-dependency-graph.js +3 -4
- package/core/computed/processed-navigation.d.ts +2 -5
- package/core/computed/processed-trace.d.ts +1 -3
- package/core/computed/resource-summary.d.ts +6 -10
- package/core/computed/screenshots.d.ts +1 -6
- package/core/computed/speedline.d.ts +1 -3
- package/core/computed/tbt-impact-tasks.d.ts +4 -5
- package/core/computed/tbt-impact-tasks.js +31 -8
- package/core/computed/trace-engine-result.d.ts +1 -3
- package/core/computed/trace-engine-result.js +10 -1
- package/core/computed/unused-css.d.ts +7 -9
- package/core/computed/unused-javascript-summary.d.ts +3 -5
- package/core/computed/user-timings.d.ts +3 -5
- package/core/computed/viewport-meta.d.ts +7 -9
- package/core/config/config-helpers.d.ts +5 -5
- package/core/config/config.d.ts +3 -3
- package/core/config/constants.d.ts +6 -6
- package/core/config/filters.d.ts +8 -8
- package/core/config/validation.d.ts +1 -1
- package/core/gather/driver/environment.d.ts +5 -5
- package/core/gather/driver/environment.js +1 -1
- package/core/gather/driver/execution-context.d.ts +6 -6
- package/core/gather/driver/navigation.d.ts +3 -3
- package/core/gather/driver/network-monitor.d.ts +6 -6
- package/core/gather/driver/storage.d.ts +4 -4
- package/core/gather/driver/target-manager.d.ts +4 -5
- package/core/gather/driver/target-manager.js +1 -1
- package/core/gather/driver/wait-for-condition.d.ts +3 -3
- package/core/gather/driver/wait-for-condition.js +4 -4
- package/core/gather/driver.d.ts +1 -1
- package/core/gather/gatherers/accessibility.d.ts +1 -1
- package/core/gather/gatherers/anchor-elements.d.ts +1 -1
- package/core/gather/gatherers/bf-cache-failures.d.ts +3 -3
- package/core/gather/gatherers/cache-contents.d.ts +1 -1
- package/core/gather/gatherers/console-messages.d.ts +1 -1
- package/core/gather/gatherers/css-usage.d.ts +1 -1
- package/core/gather/gatherers/devtools-log-compat.d.ts +3 -3
- package/core/gather/gatherers/devtools-log.d.ts +3 -3
- package/core/gather/gatherers/dobetterweb/doctype.d.ts +1 -1
- package/core/gather/gatherers/dobetterweb/domstats.d.ts +1 -1
- package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +6 -7
- package/core/gather/gatherers/dobetterweb/response-compression.d.ts +4 -5
- package/core/gather/gatherers/full-page-screenshot.d.ts +3 -3
- package/core/gather/gatherers/iframe-elements.d.ts +1 -1
- package/core/gather/gatherers/image-elements.d.ts +1 -1
- package/core/gather/gatherers/inputs.d.ts +1 -1
- package/core/gather/gatherers/inspector-issues.d.ts +2 -2
- package/core/gather/gatherers/js-usage.d.ts +1 -1
- package/core/gather/gatherers/link-elements.d.ts +6 -10
- package/core/gather/gatherers/link-elements.js +5 -12
- package/core/gather/gatherers/main-document-content.d.ts +2 -2
- package/core/gather/gatherers/meta-elements.d.ts +1 -1
- package/core/gather/gatherers/network-user-agent.d.ts +4 -4
- package/core/gather/gatherers/root-causes.d.ts +3 -4
- package/core/gather/gatherers/seo/font-size.d.ts +19 -19
- package/core/gather/gatherers/seo/robots-txt.d.ts +1 -1
- package/core/gather/gatherers/source-maps.d.ts +2 -2
- package/core/gather/gatherers/stacks.d.ts +2 -2
- package/core/gather/gatherers/stylesheets.d.ts +1 -9
- package/core/gather/gatherers/stylesheets.js +8 -39
- package/core/gather/gatherers/trace-compat.d.ts +3 -3
- package/core/gather/gatherers/trace-elements.d.ts +4 -6
- package/core/gather/navigation-runner.d.ts +3 -4
- package/core/gather/runner-helpers.d.ts +3 -3
- package/core/gather/session.d.ts +4 -4
- package/core/gather/session.js +1 -1
- package/core/gather/snapshot-runner.d.ts +2 -2
- package/core/gather/timespan-runner.d.ts +3 -3
- package/core/index.d.cts +1 -7
- package/core/index.d.ts +6 -6
- package/core/lib/arbitrary-equality-map.d.ts +2 -2
- package/core/lib/asset-saver.d.ts +3 -3
- package/core/lib/asset-saver.js +1 -1
- package/core/lib/bf-cache-strings.d.ts +117 -117
- package/core/lib/cdt/Platform.d.ts +1 -1
- package/core/lib/cdt/SDK.d.ts +1 -1
- package/core/lib/cdt/generated/ParsedURL.js +2 -2
- package/core/lib/cdt/generated/SourceMap.d.ts +11 -11
- package/core/lib/cdt/generated/SourceMap.js +3 -3
- package/core/lib/csp-evaluator.d.ts +20 -20
- package/core/lib/deprecation-description.d.ts +3 -3
- package/core/lib/deprecations-strings.d.ts +112 -112
- package/core/lib/i18n/i18n.d.ts +48 -48
- package/core/lib/icons.d.ts +3 -3
- package/core/lib/lantern/lantern.d.ts +2 -19
- package/core/lib/lantern/lantern.js +2 -45
- package/core/lib/lantern-trace-saver.d.ts +5 -7
- package/core/lib/lantern-trace-saver.js +2 -3
- package/core/lib/lh-error.d.ts +87 -87
- package/core/lib/lighthouse-compatibility.d.ts +1 -1
- package/core/lib/manifest-parser.d.ts +1 -1
- package/core/lib/minify-devtoolslog.d.ts +1 -1
- package/core/lib/navigation-error.d.ts +4 -6
- package/core/lib/navigation-error.js +2 -2
- package/core/lib/network-recorder.js +1 -1
- package/core/lib/network-request.d.ts +5 -5
- package/core/lib/network-request.js +2 -2
- package/core/lib/page-functions.d.ts +2 -2
- package/core/lib/script-helpers.d.ts +0 -1
- package/core/lib/sentry.d.ts +8 -8
- package/core/lib/stack-packs.d.ts +1 -1
- package/core/lib/trace-engine.d.ts +2 -2
- package/core/lib/tracehouse/cpu-profile-model.d.ts +8 -8
- package/core/lib/tracehouse/cpu-profile-model.js +2 -2
- package/core/lib/tracehouse/main-thread-tasks.d.ts +5 -5
- package/core/lib/tracehouse/task-groups.d.ts +6 -38
- package/core/lib/tracehouse/task-summary.d.ts +0 -1
- package/core/lib/tracehouse/trace-processor.d.ts +9 -9
- package/core/lib/traces/metric-trace-events.d.ts +1 -1
- package/core/lib/url-utils.d.ts +4 -4
- package/core/runner.d.ts +3 -4
- package/core/runner.js +0 -1
- package/core/scoring.d.ts +0 -1
- package/core/user-flow.d.ts +5 -5
- package/dist/report/bundle.esm.js +1 -1
- package/dist/report/flow.js +1 -1
- package/dist/report/standalone.js +1 -1
- package/eslint-local-rules.d.cts +4 -1
- package/flow-report/src/i18n/localized-strings.d.ts +1 -1
- package/flow-report/src/i18n/ui-strings.d.ts +43 -43
- package/package.json +7 -7
- package/readme.md +0 -2
- package/report/generator/file-namer.d.ts +2 -2
- package/report/generator/flow-report-assets.d.ts +1 -1
- package/report/generator/report-generator.d.ts +4 -4
- package/report/renderer/api.d.ts +2 -5
- package/report/renderer/category-renderer.d.ts +8 -8
- package/report/renderer/components.d.ts +2 -2
- package/report/renderer/crc-details-renderer.d.ts +2 -2
- package/report/renderer/details-renderer.d.ts +7 -7
- package/report/renderer/dom.d.ts +7 -7
- package/report/renderer/drop-down-menu.d.ts +1 -1
- package/report/renderer/drop-down-menu.js +15 -17
- package/report/renderer/element-screenshot-renderer.d.ts +3 -3
- package/report/renderer/explodey-gauge.d.ts +2 -2
- package/report/renderer/features-util.d.ts +1 -1
- package/report/renderer/performance-category-renderer.d.ts +1 -1
- package/report/renderer/report-globals.d.ts +1 -1
- package/report/renderer/report-renderer.d.ts +1 -1
- package/report/renderer/report-ui-features.d.ts +1 -1
- package/report/renderer/report-utils.d.ts +62 -62
- package/report/renderer/snippet-renderer.d.ts +9 -9
- package/report/renderer/swap-locale-feature.d.ts +2 -2
- package/report/renderer/topbar-features.d.ts +2 -2
- package/report/types/augment-dom.d.ts +0 -11
- package/shared/localization/format.d.ts +3 -3
- package/shared/localization/locales/en-US.json +1 -1
- package/shared/localization/locales/en-XL.json +1 -1
- package/shared/localization/locales.d.ts +1 -1
- package/shared/type-verifiers.d.ts +1 -1
- package/shared/util.d.ts +6 -6
- package/tsconfig.json +1 -11
- package/types/artifacts.d.ts +4 -4
- package/types/gatherer.d.ts +4 -5
- package/types/internal/node.d.ts +0 -6
- package/types/internal/query-selector.d.ts +2 -2
- package/core/lib/lantern/BaseNode.d.ts +0 -163
- package/core/lib/lantern/BaseNode.js +0 -369
- package/core/lib/lantern/BaseNode.test.js +0 -385
- package/core/lib/lantern/CpuNode.d.ts +0 -43
- package/core/lib/lantern/CpuNode.js +0 -99
- package/core/lib/lantern/LanternError.d.ts +0 -8
- package/core/lib/lantern/LanternError.js +0 -9
- package/core/lib/lantern/Metric.d.ts +0 -69
- package/core/lib/lantern/Metric.js +0 -137
- package/core/lib/lantern/NetworkNode.d.ts +0 -49
- package/core/lib/lantern/NetworkNode.js +0 -136
- package/core/lib/lantern/PageDependencyGraph.d.ts +0 -82
- package/core/lib/lantern/PageDependencyGraph.js +0 -610
- package/core/lib/lantern/PageDependencyGraph.test.js +0 -654
- package/core/lib/lantern/TBTUtils.d.ts +0 -44
- package/core/lib/lantern/TBTUtils.js +0 -76
- package/core/lib/lantern/TBTUtils.test.d.ts +0 -2
- package/core/lib/lantern/TBTUtils.test.js +0 -130
- package/core/lib/lantern/TraceEngineComputationData.d.ts +0 -25
- package/core/lib/lantern/TraceEngineComputationData.js +0 -466
- package/core/lib/lantern/metrics/FirstContentfulPaint.d.ts +0 -79
- package/core/lib/lantern/metrics/FirstContentfulPaint.js +0 -198
- package/core/lib/lantern/metrics/FirstContentfulPaint.test.js +0 -54
- package/core/lib/lantern/metrics/Interactive.d.ts +0 -20
- package/core/lib/lantern/metrics/Interactive.js +0 -109
- package/core/lib/lantern/metrics/Interactive.test.js +0 -56
- package/core/lib/lantern/metrics/LargestContentfulPaint.d.ts +0 -19
- package/core/lib/lantern/metrics/LargestContentfulPaint.js +0 -105
- package/core/lib/lantern/metrics/LargestContentfulPaint.test.js +0 -42
- package/core/lib/lantern/metrics/MaxPotentialFID.d.ts +0 -24
- package/core/lib/lantern/metrics/MaxPotentialFID.js +0 -91
- package/core/lib/lantern/metrics/MetricTestUtils.d.ts +0 -19
- package/core/lib/lantern/metrics/MetricTestUtils.js +0 -48
- package/core/lib/lantern/metrics/SpeedIndex.d.ts +0 -32
- package/core/lib/lantern/metrics/SpeedIndex.js +0 -142
- package/core/lib/lantern/metrics/SpeedIndex.test.js +0 -83
- package/core/lib/lantern/metrics/TotalBlockingTime.d.ts +0 -25
- package/core/lib/lantern/metrics/TotalBlockingTime.js +0 -125
- package/core/lib/lantern/metrics/__snapshots__/FirstContentfulPaint.test.js.snap +0 -11
- package/core/lib/lantern/metrics/__snapshots__/Interactive.test.js.snap +0 -17
- package/core/lib/lantern/metrics/metrics.d.ts +0 -9
- package/core/lib/lantern/metrics/metrics.js +0 -16
- package/core/lib/lantern/simulation/ConnectionPool.d.ts +0 -48
- package/core/lib/lantern/simulation/ConnectionPool.js +0 -152
- package/core/lib/lantern/simulation/ConnectionPool.test.js +0 -195
- package/core/lib/lantern/simulation/Constants.d.ts +0 -52
- package/core/lib/lantern/simulation/Constants.js +0 -48
- package/core/lib/lantern/simulation/DNSCache.d.ts +0 -42
- package/core/lib/lantern/simulation/DNSCache.js +0 -74
- package/core/lib/lantern/simulation/DNSCache.test.js +0 -72
- package/core/lib/lantern/simulation/NetworkAnalyzer.d.ts +0 -209
- package/core/lib/lantern/simulation/NetworkAnalyzer.js +0 -597
- package/core/lib/lantern/simulation/NetworkAnalyzer.test.js +0 -475
- package/core/lib/lantern/simulation/SimulationTimingMap.d.ts +0 -153
- package/core/lib/lantern/simulation/SimulationTimingMap.js +0 -219
- package/core/lib/lantern/simulation/Simulator.d.ts +0 -157
- package/core/lib/lantern/simulation/Simulator.js +0 -593
- package/core/lib/lantern/simulation/Simulator.test.js +0 -434
- package/core/lib/lantern/simulation/TCPConnection.test.d.ts +0 -2
- package/core/lib/lantern/simulation/TCPConnection.test.js +0 -374
- package/core/lib/lantern/simulation/TcpConnection.d.ts +0 -89
- package/core/lib/lantern/simulation/TcpConnection.js +0 -230
- package/core/lib/lantern/simulation/simulation.d.ts +0 -21
- package/core/lib/lantern/simulation/simulation.js +0 -28
- package/core/lib/lantern/types/lantern.d.ts +0 -256
- package/core/lib/lantern/types/lantern.js +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default FontSize;
|
|
2
|
-
export type NodeFontData = LH.Artifacts.FontSize[
|
|
2
|
+
export type NodeFontData = LH.Artifacts.FontSize["analyzedFailingNodesData"][0];
|
|
3
3
|
export type BackendIdsToFontData = Map<number, {
|
|
4
4
|
fontSize: number;
|
|
5
5
|
textLength: number;
|
|
@@ -22,24 +22,24 @@ declare class FontSize extends BaseGatherer {
|
|
|
22
22
|
backendNodeId: number;
|
|
23
23
|
attributes: string[];
|
|
24
24
|
nodeName: string;
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
};
|
|
27
27
|
cssRule?: {
|
|
28
|
-
type: "
|
|
28
|
+
type: "Regular" | "Inline" | "Attributes";
|
|
29
29
|
range?: {
|
|
30
30
|
startLine: number;
|
|
31
31
|
startColumn: number;
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
33
|
parentRule?: {
|
|
34
34
|
origin: import("devtools-protocol").Protocol.CSS.StyleSheetOrigin;
|
|
35
35
|
selectors: {
|
|
36
36
|
text: string;
|
|
37
37
|
}[];
|
|
38
|
-
}
|
|
39
|
-
styleSheetId?: string
|
|
40
|
-
stylesheet?: import("devtools-protocol").Protocol.CSS.CSSStyleSheetHeader
|
|
41
|
-
cssProperties?: import("devtools-protocol").Protocol.CSS.CSSProperty
|
|
42
|
-
}
|
|
38
|
+
};
|
|
39
|
+
styleSheetId?: string;
|
|
40
|
+
stylesheet?: import("devtools-protocol").Protocol.CSS.CSSStyleSheetHeader;
|
|
41
|
+
cssProperties?: Array<import("devtools-protocol").Protocol.CSS.CSSProperty>;
|
|
42
|
+
};
|
|
43
43
|
}[];
|
|
44
44
|
analyzedFailingTextLength: number;
|
|
45
45
|
}>;
|
|
@@ -83,24 +83,24 @@ declare class FontSize extends BaseGatherer {
|
|
|
83
83
|
backendNodeId: number;
|
|
84
84
|
attributes: string[];
|
|
85
85
|
nodeName: string;
|
|
86
|
-
}
|
|
86
|
+
};
|
|
87
87
|
};
|
|
88
88
|
cssRule?: {
|
|
89
|
-
type: "
|
|
89
|
+
type: "Regular" | "Inline" | "Attributes";
|
|
90
90
|
range?: {
|
|
91
91
|
startLine: number;
|
|
92
92
|
startColumn: number;
|
|
93
|
-
}
|
|
93
|
+
};
|
|
94
94
|
parentRule?: {
|
|
95
95
|
origin: import("devtools-protocol").Protocol.CSS.StyleSheetOrigin;
|
|
96
96
|
selectors: {
|
|
97
97
|
text: string;
|
|
98
98
|
}[];
|
|
99
|
-
}
|
|
100
|
-
styleSheetId?: string
|
|
101
|
-
stylesheet?: import("devtools-protocol").Protocol.CSS.CSSStyleSheetHeader
|
|
102
|
-
cssProperties?: import("devtools-protocol").Protocol.CSS.CSSProperty
|
|
103
|
-
}
|
|
99
|
+
};
|
|
100
|
+
styleSheetId?: string;
|
|
101
|
+
stylesheet?: import("devtools-protocol").Protocol.CSS.CSSStyleSheetHeader;
|
|
102
|
+
cssProperties?: Array<import("devtools-protocol").Protocol.CSS.CSSProperty>;
|
|
103
|
+
};
|
|
104
104
|
}[];
|
|
105
105
|
};
|
|
106
106
|
/**
|
|
@@ -117,7 +117,7 @@ declare class FontSize extends BaseGatherer {
|
|
|
117
117
|
* @param {LH.Crdp.CSS.GetMatchedStylesForNodeResponse} matched CSS rules
|
|
118
118
|
* @return {NodeFontData['cssRule']|undefined}
|
|
119
119
|
*/
|
|
120
|
-
export function getEffectiveFontRule({ attributesStyle, inlineStyle, matchedCSSRules, inherited }: LH.Crdp.CSS.GetMatchedStylesForNodeResponse): NodeFontData[
|
|
120
|
+
export function getEffectiveFontRule({ attributesStyle, inlineStyle, matchedCSSRules, inherited }: LH.Crdp.CSS.GetMatchedStylesForNodeResponse): NodeFontData["cssRule"] | undefined;
|
|
121
121
|
/**
|
|
122
122
|
* Finds the most specific directly matched CSS font-size rule from the list.
|
|
123
123
|
*
|
|
@@ -125,6 +125,6 @@ export function getEffectiveFontRule({ attributesStyle, inlineStyle, matchedCSSR
|
|
|
125
125
|
* @param {function(LH.Crdp.CSS.CSSStyle):boolean|string|undefined} isDeclarationOfInterest
|
|
126
126
|
* @return {NodeFontData['cssRule']|undefined}
|
|
127
127
|
*/
|
|
128
|
-
export function findMostSpecificMatchedCSSRule(matchedCSSRules:
|
|
128
|
+
export function findMostSpecificMatchedCSSRule(matchedCSSRules: Array<LH.Crdp.CSS.RuleMatch> | undefined, isDeclarationOfInterest: (arg0: LH.Crdp.CSS.CSSStyle) => boolean | string | undefined): NodeFontData["cssRule"] | undefined;
|
|
129
129
|
import BaseGatherer from '../../base-gatherer.js';
|
|
130
130
|
//# sourceMappingURL=font-size.d.ts.map
|
|
@@ -4,7 +4,7 @@ declare class RobotsTxt extends BaseGatherer {
|
|
|
4
4
|
* @param {LH.Gatherer.Context} passContext
|
|
5
5
|
* @return {Promise<LH.Artifacts['RobotsTxt']>}
|
|
6
6
|
*/
|
|
7
|
-
getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts[
|
|
7
|
+
getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts["RobotsTxt"]>;
|
|
8
8
|
}
|
|
9
9
|
import BaseGatherer from '../../base-gatherer.js';
|
|
10
10
|
//# sourceMappingURL=robots-txt.d.ts.map
|
|
@@ -4,7 +4,7 @@ export default SourceMaps;
|
|
|
4
4
|
*/
|
|
5
5
|
declare class SourceMaps extends BaseGatherer {
|
|
6
6
|
/** @type {LH.Gatherer.GathererMeta<'Scripts'>} */
|
|
7
|
-
meta: LH.Gatherer.GathererMeta<
|
|
7
|
+
meta: LH.Gatherer.GathererMeta<"Scripts">;
|
|
8
8
|
/**
|
|
9
9
|
* @param {LH.Gatherer.Driver} driver
|
|
10
10
|
* @param {string} sourceMapUrl
|
|
@@ -32,7 +32,7 @@ declare class SourceMaps extends BaseGatherer {
|
|
|
32
32
|
* @param {LH.Gatherer.Context<'Scripts'>} context
|
|
33
33
|
* @return {Promise<LH.Artifacts['SourceMaps']>}
|
|
34
34
|
*/
|
|
35
|
-
getArtifact(context: LH.Gatherer.Context<
|
|
35
|
+
getArtifact(context: LH.Gatherer.Context<"Scripts">): Promise<LH.Artifacts["SourceMaps"]>;
|
|
36
36
|
}
|
|
37
37
|
import BaseGatherer from '../base-gatherer.js';
|
|
38
38
|
//# sourceMappingURL=source-maps.d.ts.map
|
|
@@ -27,12 +27,12 @@ declare class Stacks extends BaseGatherer implements LH.Gatherer.GathererInstanc
|
|
|
27
27
|
* @param {LH.Gatherer.Driver['executionContext']} executionContext
|
|
28
28
|
* @return {Promise<LH.Artifacts['Stacks']>}
|
|
29
29
|
*/
|
|
30
|
-
static collectStacks(executionContext: LH.Gatherer.Driver[
|
|
30
|
+
static collectStacks(executionContext: LH.Gatherer.Driver["executionContext"]): Promise<LH.Artifacts["Stacks"]>;
|
|
31
31
|
/**
|
|
32
32
|
* @param {LH.Gatherer.Context} context
|
|
33
33
|
* @return {Promise<LH.Artifacts['Stacks']>}
|
|
34
34
|
*/
|
|
35
|
-
getArtifact(context: LH.Gatherer.Context): Promise<LH.Artifacts[
|
|
35
|
+
getArtifact(context: LH.Gatherer.Context): Promise<LH.Artifacts["Stacks"]>;
|
|
36
36
|
}
|
|
37
37
|
import BaseGatherer from '../base-gatherer.js';
|
|
38
38
|
//# sourceMappingURL=stacks.d.ts.map
|
|
@@ -8,19 +8,11 @@ declare class Stylesheets extends BaseGatherer {
|
|
|
8
8
|
* @param {LH.Crdp.CSS.StyleSheetAddedEvent} event
|
|
9
9
|
*/
|
|
10
10
|
_onStylesheetAdded(event: LH.Crdp.CSS.StyleSheetAddedEvent): void;
|
|
11
|
-
/**
|
|
12
|
-
* @param {LH.Gatherer.Context} context
|
|
13
|
-
*/
|
|
14
|
-
startInstrumentation(context: LH.Gatherer.Context): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* @param {LH.Gatherer.Context} context
|
|
17
|
-
*/
|
|
18
|
-
stopInstrumentation(context: LH.Gatherer.Context): Promise<void>;
|
|
19
11
|
/**
|
|
20
12
|
* @param {LH.Gatherer.Context} context
|
|
21
13
|
* @return {Promise<LH.Artifacts['Stylesheets']>}
|
|
22
14
|
*/
|
|
23
|
-
getArtifact(context: LH.Gatherer.Context): Promise<LH.Artifacts[
|
|
15
|
+
getArtifact(context: LH.Gatherer.Context): Promise<LH.Artifacts["Stylesheets"]>;
|
|
24
16
|
}
|
|
25
17
|
import BaseGatherer from '../base-gatherer.js';
|
|
26
18
|
//# sourceMappingURL=stylesheets.d.ts.map
|
|
@@ -60,63 +60,32 @@ class Stylesheets extends BaseGatherer {
|
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* @param {LH.Gatherer.Context} context
|
|
63
|
+
* @return {Promise<LH.Artifacts['Stylesheets']>}
|
|
63
64
|
*/
|
|
64
|
-
async
|
|
65
|
+
async getArtifact(context) {
|
|
66
|
+
const executionContext = context.driver.executionContext;
|
|
65
67
|
const session = context.driver.defaultSession;
|
|
66
68
|
this._session = session;
|
|
67
69
|
|
|
68
|
-
|
|
69
|
-
// We want to ignore these events in navigation mode because they are not relevant to the
|
|
70
|
-
// navigation that is about to happen. Adding the event listener *after* calling `CSS.enable`
|
|
71
|
-
// ensures that the events for pre-existing stylesheets are ignored.
|
|
72
|
-
const isNavigation = context.gatherMode === 'navigation';
|
|
73
|
-
if (!isNavigation) {
|
|
74
|
-
session.on('CSS.styleSheetAdded', this._onStylesheetAdded);
|
|
75
|
-
}
|
|
70
|
+
session.on('CSS.styleSheetAdded', this._onStylesheetAdded);
|
|
76
71
|
|
|
77
72
|
await session.sendCommand('DOM.enable');
|
|
78
73
|
await session.sendCommand('CSS.enable');
|
|
79
74
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
75
|
+
// Force style to recompute.
|
|
76
|
+
// Doesn't appear to be necessary in newer versions of Chrome.
|
|
77
|
+
await executionContext.evaluateAsync('getComputedStyle(document.body)');
|
|
85
78
|
|
|
86
|
-
/**
|
|
87
|
-
* @param {LH.Gatherer.Context} context
|
|
88
|
-
*/
|
|
89
|
-
async stopInstrumentation(context) {
|
|
90
|
-
const session = context.driver.defaultSession;
|
|
91
79
|
session.off('CSS.styleSheetAdded', this._onStylesheetAdded);
|
|
92
80
|
|
|
93
81
|
// Ensure we finish fetching all stylesheet contents before disabling the CSS domain
|
|
94
|
-
await Promise.all(this._sheetPromises.values());
|
|
82
|
+
const sheets = await Promise.all(this._sheetPromises.values());
|
|
95
83
|
|
|
96
84
|
await session.sendCommand('CSS.disable');
|
|
97
85
|
await session.sendCommand('DOM.disable');
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* @param {LH.Gatherer.Context} context
|
|
102
|
-
* @return {Promise<LH.Artifacts['Stylesheets']>}
|
|
103
|
-
*/
|
|
104
|
-
async getArtifact(context) {
|
|
105
|
-
const executionContext = context.driver.executionContext;
|
|
106
|
-
|
|
107
|
-
if (context.gatherMode === 'snapshot') {
|
|
108
|
-
await this.startInstrumentation(context);
|
|
109
|
-
|
|
110
|
-
// Force style to recompute.
|
|
111
|
-
// Doesn't appear to be necessary in newer versions of Chrome.
|
|
112
|
-
await executionContext.evaluateAsync('getComputedStyle(document.body)');
|
|
113
|
-
|
|
114
|
-
await this.stopInstrumentation(context);
|
|
115
|
-
}
|
|
116
86
|
|
|
117
87
|
/** @type {Map<string, LH.Artifacts.CSSStyleSheetInfo>} */
|
|
118
88
|
const dedupedStylesheets = new Map();
|
|
119
|
-
const sheets = await Promise.all(this._sheetPromises.values());
|
|
120
89
|
|
|
121
90
|
for (const sheet of sheets) {
|
|
122
91
|
// Erroneous sheets will be reported via sentry and the log.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export default TraceCompat;
|
|
2
2
|
/** @implements {LH.Gatherer.GathererInstance<'Trace'>} */
|
|
3
|
-
declare class TraceCompat extends BaseGatherer implements LH.Gatherer.GathererInstance<
|
|
3
|
+
declare class TraceCompat extends BaseGatherer implements LH.Gatherer.GathererInstance<"Trace"> {
|
|
4
4
|
/** @type {LH.Gatherer.GathererMeta<'Trace'>} */
|
|
5
|
-
meta: LH.Gatherer.GathererMeta<
|
|
5
|
+
meta: LH.Gatherer.GathererMeta<"Trace">;
|
|
6
6
|
/**
|
|
7
7
|
* @param {LH.Gatherer.Context<'Trace'>} passContext
|
|
8
8
|
* @return {Promise<LH.Artifacts['traces']>}
|
|
9
9
|
*/
|
|
10
|
-
getArtifact(passContext: LH.Gatherer.Context<
|
|
10
|
+
getArtifact(passContext: LH.Gatherer.Context<"Trace">): Promise<LH.Artifacts["traces"]>;
|
|
11
11
|
}
|
|
12
12
|
import BaseGatherer from '../base-gatherer.js';
|
|
13
13
|
//# sourceMappingURL=trace-compat.d.ts.map
|
|
@@ -18,7 +18,7 @@ declare class TraceElements extends BaseGatherer {
|
|
|
18
18
|
* @param {import('../../lib/trace-engine.js').SaneSyntheticLayoutShift} event Only for debugging
|
|
19
19
|
* @return {number|undefined}
|
|
20
20
|
*/
|
|
21
|
-
static getBiggestImpactNodeForShiftEvent(impactedNodes: LH.Artifacts.TraceImpactedNode[], impactByNodeId: Map<number, number>, event: import(
|
|
21
|
+
static getBiggestImpactNodeForShiftEvent(impactedNodes: LH.Artifacts.TraceImpactedNode[], impactByNodeId: Map<number, number>, event: import("../../lib/trace-engine.js").SaneSyntheticLayoutShift): number | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* This function finds the top (up to 15) layout shifts on the page, and returns
|
|
24
24
|
* the id of the largest impacted node of each shift, along with any related nodes
|
|
@@ -30,7 +30,7 @@ declare class TraceElements extends BaseGatherer {
|
|
|
30
30
|
* @param {LH.Gatherer.Context} context
|
|
31
31
|
* @return {Promise<Array<{nodeId: number}>>}
|
|
32
32
|
*/
|
|
33
|
-
static getTopLayoutShifts(trace: LH.Trace, traceEngineResult: LH.Artifacts.TraceEngineResult[
|
|
33
|
+
static getTopLayoutShifts(trace: LH.Trace, traceEngineResult: LH.Artifacts.TraceEngineResult["data"], rootCauses: LH.Artifacts.TraceEngineRootCauses, context: LH.Gatherer.Context): Promise<Array<{
|
|
34
34
|
nodeId: number;
|
|
35
35
|
}>>;
|
|
36
36
|
/**
|
|
@@ -49,7 +49,7 @@ declare class TraceElements extends BaseGatherer {
|
|
|
49
49
|
type: string;
|
|
50
50
|
} | undefined>;
|
|
51
51
|
/** @type {LH.Gatherer.GathererMeta<'Trace'|'RootCauses'>} */
|
|
52
|
-
meta: LH.Gatherer.GathererMeta<
|
|
52
|
+
meta: LH.Gatherer.GathererMeta<"Trace" | "RootCauses">;
|
|
53
53
|
/** @type {Map<string, string>} */
|
|
54
54
|
animationIdToName: Map<string, string>;
|
|
55
55
|
/** @param {LH.Crdp.Animation.AnimationStartedEvent} args */
|
|
@@ -77,9 +77,7 @@ declare class TraceElements extends BaseGatherer {
|
|
|
77
77
|
* @param {LH.Gatherer.Context<'Trace'|'RootCauses'>} context
|
|
78
78
|
* @return {Promise<LH.Artifacts.TraceElement[]>}
|
|
79
79
|
*/
|
|
80
|
-
getArtifact(context: LH.Gatherer.Context<
|
|
80
|
+
getArtifact(context: LH.Gatherer.Context<"Trace" | "RootCauses">): Promise<LH.Artifacts.TraceElement[]>;
|
|
81
81
|
}
|
|
82
82
|
import BaseGatherer from '../base-gatherer.js';
|
|
83
|
-
import Trace from './trace.js';
|
|
84
|
-
import { TraceEngineResult } from '../../computed/trace-engine-result.js';
|
|
85
83
|
//# sourceMappingURL=trace-elements.d.ts.map
|
|
@@ -6,7 +6,7 @@ export type NavigationContext = {
|
|
|
6
6
|
baseArtifacts: LH.BaseArtifacts;
|
|
7
7
|
computedCache: Map<string, LH.ArbitraryEqualityMap>;
|
|
8
8
|
};
|
|
9
|
-
export type PhaseState = Omit<Parameters<typeof collectPhaseArtifacts>[0],
|
|
9
|
+
export type PhaseState = Omit<Parameters<typeof collectPhaseArtifacts>[0], "phase">;
|
|
10
10
|
/**
|
|
11
11
|
* @param {LH.Puppeteer.Page|undefined} page
|
|
12
12
|
* @param {LH.NavigationRequestor|undefined} requestor
|
|
@@ -14,8 +14,8 @@ export type PhaseState = Omit<Parameters<typeof collectPhaseArtifacts>[0], 'phas
|
|
|
14
14
|
* @return {Promise<LH.Gatherer.GatherResult>}
|
|
15
15
|
*/
|
|
16
16
|
export function navigationGather(page: LH.Puppeteer.Page | undefined, requestor: LH.NavigationRequestor | undefined, options?: {
|
|
17
|
-
config?:
|
|
18
|
-
flags?:
|
|
17
|
+
config?: LH.Config;
|
|
18
|
+
flags?: LH.Flags;
|
|
19
19
|
} | undefined): Promise<LH.Gatherer.GatherResult>;
|
|
20
20
|
/**
|
|
21
21
|
* @param {{driver: Driver, resolvedConfig: LH.Config.ResolvedConfig, requestor: LH.NavigationRequestor}} args
|
|
@@ -54,7 +54,6 @@ export function _cleanup({ requestedUrl, driver, resolvedConfig, lhBrowser, lhPa
|
|
|
54
54
|
}): Promise<void>;
|
|
55
55
|
import { Driver } from './driver.js';
|
|
56
56
|
import { collectPhaseArtifacts } from './runner-helpers.js';
|
|
57
|
-
import { LighthouseError } from '../lib/lh-error.js';
|
|
58
57
|
/**
|
|
59
58
|
* @param {NavigationContext} navigationContext
|
|
60
59
|
* @param {PhaseState} phaseState
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type CollectPhaseArtifactOptions = {
|
|
2
|
-
driver: import(
|
|
2
|
+
driver: import("./driver.js").Driver;
|
|
3
3
|
page: LH.Puppeteer.Page;
|
|
4
4
|
artifactDefinitions: Array<LH.Config.AnyArtifactDefn>;
|
|
5
5
|
artifactState: ArtifactState;
|
|
@@ -10,8 +10,8 @@ export type CollectPhaseArtifactOptions = {
|
|
|
10
10
|
settings: LH.Config.Settings;
|
|
11
11
|
};
|
|
12
12
|
export type IntermediateArtifacts = Record<string, Promise<any>>;
|
|
13
|
-
export type ArtifactState = Record<CollectPhaseArtifactOptions[
|
|
14
|
-
export type Dependencies = LH.Gatherer.Context<LH.Gatherer.DependencyKey>[
|
|
13
|
+
export type ArtifactState = Record<CollectPhaseArtifactOptions["phase"], IntermediateArtifacts>;
|
|
14
|
+
export type Dependencies = LH.Gatherer.Context<LH.Gatherer.DependencyKey>["dependencies"];
|
|
15
15
|
/** @return {ArtifactState} */
|
|
16
16
|
export function getEmptyArtifactState(): ArtifactState;
|
|
17
17
|
/**
|
package/core/gather/session.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export class ProtocolSession extends ProtocolSession_base implements LH.Gatherer
|
|
|
6
6
|
* @param {LH.Puppeteer.CDPSession} cdpSession
|
|
7
7
|
*/
|
|
8
8
|
constructor(cdpSession: LH.Puppeteer.CDPSession);
|
|
9
|
-
_cdpSession: import("
|
|
9
|
+
_cdpSession: import("../index.js").Puppeteer.CDPSession;
|
|
10
10
|
/** @type {LH.Crdp.Target.TargetInfo|undefined} */
|
|
11
11
|
_targetInfo: LH.Crdp.Target.TargetInfo | undefined;
|
|
12
12
|
/** @type {number|undefined} */
|
|
@@ -17,7 +17,7 @@ export class ProtocolSession extends ProtocolSession_base implements LH.Gatherer
|
|
|
17
17
|
* @param {E} method
|
|
18
18
|
* @param {LH.CrdpEvents[E]} params
|
|
19
19
|
*/
|
|
20
|
-
_handleProtocolEvent<E extends keyof
|
|
20
|
+
_handleProtocolEvent<E extends keyof LH.CrdpEvents>(method: E, ...params: LH.CrdpEvents[E]): void;
|
|
21
21
|
_targetCrashedPromise: Promise<never>;
|
|
22
22
|
id(): string;
|
|
23
23
|
/** @param {LH.Crdp.Target.TargetInfo} targetInfo */
|
|
@@ -40,7 +40,7 @@ export class ProtocolSession extends ProtocolSession_base implements LH.Gatherer
|
|
|
40
40
|
* @param {LH.CrdpCommands[C]['paramsType']} params
|
|
41
41
|
* @return {Promise<LH.CrdpCommands[C]['returnType']>}
|
|
42
42
|
*/
|
|
43
|
-
sendCommand<C extends keyof
|
|
43
|
+
sendCommand<C extends keyof LH.CrdpCommands>(method: C, ...params: LH.CrdpCommands[C]["paramsType"]): Promise<LH.CrdpCommands[C]["returnType"]>;
|
|
44
44
|
/**
|
|
45
45
|
* Send and if there's an error response, do not reject.
|
|
46
46
|
* @template {keyof LH.CrdpCommands} C
|
|
@@ -48,7 +48,7 @@ export class ProtocolSession extends ProtocolSession_base implements LH.Gatherer
|
|
|
48
48
|
* @param {LH.CrdpCommands[C]['paramsType']} params
|
|
49
49
|
* @return {Promise<void>}
|
|
50
50
|
*/
|
|
51
|
-
sendCommandAndIgnore<
|
|
51
|
+
sendCommandAndIgnore<C extends keyof LH.CrdpCommands>(method: C, ...params: LH.CrdpCommands[C]["paramsType"]): Promise<void>;
|
|
52
52
|
/**
|
|
53
53
|
* Disposes of a session so that it can no longer talk to Chrome.
|
|
54
54
|
* @return {Promise<void>}
|
package/core/gather/session.js
CHANGED
|
@@ -113,7 +113,7 @@ class ProtocolSession extends CrdpEventEmitter {
|
|
|
113
113
|
const timeoutMs = this.getNextProtocolTimeout();
|
|
114
114
|
this._nextProtocolTimeout = undefined;
|
|
115
115
|
|
|
116
|
-
/** @type {NodeJS.
|
|
116
|
+
/** @type {NodeJS.Timeout|undefined} */
|
|
117
117
|
let timeout;
|
|
118
118
|
const timeoutPromise = new Promise((resolve, reject) => {
|
|
119
119
|
// Unexpected setTimeout invocation to preserve the error stack. https://github.com/GoogleChrome/lighthouse/issues/13332
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @return {Promise<LH.Gatherer.GatherResult>}
|
|
5
5
|
*/
|
|
6
6
|
export function snapshotGather(page: LH.Puppeteer.Page, options?: {
|
|
7
|
-
config?:
|
|
8
|
-
flags?:
|
|
7
|
+
config?: LH.Config;
|
|
8
|
+
flags?: LH.Flags;
|
|
9
9
|
} | undefined): Promise<LH.Gatherer.GatherResult>;
|
|
10
10
|
//# sourceMappingURL=snapshot-runner.d.ts.map
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* @return {Promise<{endTimespanGather(): Promise<LH.Gatherer.GatherResult>}>}
|
|
5
5
|
*/
|
|
6
6
|
export function startTimespanGather(page: LH.Puppeteer.Page, options?: {
|
|
7
|
-
config?:
|
|
8
|
-
flags?:
|
|
7
|
+
config?: LH.Config;
|
|
8
|
+
flags?: LH.Flags;
|
|
9
9
|
} | undefined): Promise<{
|
|
10
10
|
endTimespanGather(): Promise<LH.Gatherer.GatherResult>;
|
|
11
11
|
}>;
|
|
12
12
|
export namespace UIStrings {
|
|
13
|
-
|
|
13
|
+
let warningNavigationDetected: string;
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=timespan-runner.d.ts.map
|
package/core/index.d.cts
CHANGED
|
@@ -7,11 +7,5 @@ export = lighthouse;
|
|
|
7
7
|
* @property {import('./index.js')['snapshot']} snapshot
|
|
8
8
|
*/
|
|
9
9
|
/** @type {import('./index.js')['default'] & ExportType} */
|
|
10
|
-
declare const lighthouse: typeof import("./index.js")[
|
|
11
|
-
type ExportType = {
|
|
12
|
-
startFlow: typeof import("./index.js")['startFlow'];
|
|
13
|
-
navigation: typeof import("./index.js")['navigation'];
|
|
14
|
-
startTimespan: typeof import("./index.js")['startTimespan'];
|
|
15
|
-
snapshot: typeof import("./index.js")['snapshot'];
|
|
16
|
-
};
|
|
10
|
+
declare const lighthouse: typeof import("./index.js")["default"] & ExportType;
|
|
17
11
|
//# sourceMappingURL=index.d.cts.map
|
package/core/index.d.ts
CHANGED
|
@@ -28,8 +28,8 @@ export function startFlow(page: LH.Puppeteer.Page, options?: LH.UserFlow.Options
|
|
|
28
28
|
* @return {Promise<LH.RunnerResult|undefined>}
|
|
29
29
|
*/
|
|
30
30
|
export function navigation(page: LH.Puppeteer.Page | undefined, requestor: LH.NavigationRequestor | undefined, options?: {
|
|
31
|
-
config?: LH.Config
|
|
32
|
-
flags?: LH.Flags
|
|
31
|
+
config?: LH.Config;
|
|
32
|
+
flags?: LH.Flags;
|
|
33
33
|
} | undefined): Promise<LH.RunnerResult | undefined>;
|
|
34
34
|
/**
|
|
35
35
|
* @param {LH.Puppeteer.Page} page
|
|
@@ -37,8 +37,8 @@ export function navigation(page: LH.Puppeteer.Page | undefined, requestor: LH.Na
|
|
|
37
37
|
* @return {Promise<{endTimespan: () => Promise<LH.RunnerResult|undefined>}>}
|
|
38
38
|
*/
|
|
39
39
|
export function startTimespan(page: LH.Puppeteer.Page, options?: {
|
|
40
|
-
config?: LH.Config
|
|
41
|
-
flags?: LH.Flags
|
|
40
|
+
config?: LH.Config;
|
|
41
|
+
flags?: LH.Flags;
|
|
42
42
|
} | undefined): Promise<{
|
|
43
43
|
endTimespan: () => Promise<LH.RunnerResult | undefined>;
|
|
44
44
|
}>;
|
|
@@ -48,8 +48,8 @@ export function startTimespan(page: LH.Puppeteer.Page, options?: {
|
|
|
48
48
|
* @return {Promise<LH.RunnerResult|undefined>}
|
|
49
49
|
*/
|
|
50
50
|
export function snapshot(page: LH.Puppeteer.Page, options?: {
|
|
51
|
-
config?: LH.Config
|
|
52
|
-
flags?: LH.Flags
|
|
51
|
+
config?: LH.Config;
|
|
52
|
+
flags?: LH.Flags;
|
|
53
53
|
} | undefined): Promise<LH.RunnerResult | undefined>;
|
|
54
54
|
/**
|
|
55
55
|
* @template {LH.Result|LH.FlowResult} R
|
|
@@ -15,10 +15,10 @@ export class ArbitraryEqualityMap {
|
|
|
15
15
|
static deepEquals(objA: any, objB: any): boolean;
|
|
16
16
|
_equalsFn: typeof ArbitraryEqualityMap.deepEquals;
|
|
17
17
|
/** @type {Array<{key: *, value: *}>} */
|
|
18
|
-
_entries: {
|
|
18
|
+
_entries: Array<{
|
|
19
19
|
key: any;
|
|
20
20
|
value: any;
|
|
21
|
-
}
|
|
21
|
+
}>;
|
|
22
22
|
/**
|
|
23
23
|
* @param {function(*,*):boolean} equalsFn
|
|
24
24
|
*/
|
|
@@ -54,7 +54,7 @@ export function loadFlowArtifacts(basePath: string): LH.UserFlow.FlowArtifacts;
|
|
|
54
54
|
* @param {string} pathWithBasename
|
|
55
55
|
* @return {Promise<void>}
|
|
56
56
|
*/
|
|
57
|
-
export function saveAssets(artifacts: LH.Artifacts, audits: LH.Result[
|
|
57
|
+
export function saveAssets(artifacts: LH.Artifacts, audits: LH.Result["audits"], pathWithBasename: string): Promise<void>;
|
|
58
58
|
/**
|
|
59
59
|
* @param {LH.Artifacts} artifacts
|
|
60
60
|
* @param {LH.Result['audits']} [audits]
|
|
@@ -78,7 +78,7 @@ export function saveTrace(traceData: LH.Trace, traceFilename: string, options?:
|
|
|
78
78
|
* @param {{gzip?: boolean}=} options
|
|
79
79
|
* @return {Promise<void>}
|
|
80
80
|
*/
|
|
81
|
-
export function saveDevtoolsLog(devtoolsLog:
|
|
81
|
+
export function saveDevtoolsLog(devtoolsLog: LH.DevtoolsLog, devtoolLogFilename: string, options?: {
|
|
82
82
|
gzip?: boolean;
|
|
83
83
|
} | undefined): Promise<void>;
|
|
84
84
|
/**
|
|
@@ -86,7 +86,7 @@ export function saveDevtoolsLog(devtoolsLog: import("../index.js").DevtoolsLog,
|
|
|
86
86
|
* @param {string} outputPath
|
|
87
87
|
* @return {Promise<void>}
|
|
88
88
|
*/
|
|
89
|
-
export function saveLanternNetworkData(devtoolsLog:
|
|
89
|
+
export function saveLanternNetworkData(devtoolsLog: LH.DevtoolsLog, outputPath: string): Promise<void>;
|
|
90
90
|
/**
|
|
91
91
|
* A replacer function for JSON.stingify of the artifacts. Used to serialize objects that
|
|
92
92
|
* JSON won't normally handle.
|
package/core/lib/asset-saver.js
CHANGED
|
@@ -449,7 +449,7 @@ function saveDevtoolsLog(devtoolsLog, devtoolLogFilename, options = {}) {
|
|
|
449
449
|
async function saveLanternDebugTraces(pathWithBasename) {
|
|
450
450
|
if (!process.env.LANTERN_DEBUG) return;
|
|
451
451
|
|
|
452
|
-
for (const [label, nodeTimings] of Lantern.Simulation.Simulator.
|
|
452
|
+
for (const [label, nodeTimings] of Lantern.Simulation.Simulator.allNodeTimings) {
|
|
453
453
|
if (lanternTraceSaver.simulationNamesToIgnore.includes(label)) continue;
|
|
454
454
|
|
|
455
455
|
const traceFilename = `${pathWithBasename}-${label}${traceSuffix}`;
|