lighthouse 10.1.1 → 10.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 +1 -1
- package/cli/test/smokehouse/lighthouse-runners/cli.d.ts +1 -1
- package/cli/test/smokehouse/report-assert.d.ts +1 -1
- package/core/audits/accessibility/accesskeys.d.ts +1 -1
- package/core/audits/accessibility/accesskeys.js +1 -1
- package/core/audits/accessibility/aria-allowed-attr.d.ts +1 -1
- package/core/audits/accessibility/aria-allowed-attr.js +1 -1
- package/core/audits/accessibility/aria-command-name.d.ts +1 -1
- package/core/audits/accessibility/aria-command-name.js +1 -1
- package/core/audits/accessibility/aria-hidden-body.d.ts +1 -1
- package/core/audits/accessibility/aria-hidden-body.js +1 -1
- package/core/audits/accessibility/aria-hidden-focus.d.ts +1 -1
- package/core/audits/accessibility/aria-hidden-focus.js +1 -1
- package/core/audits/accessibility/aria-input-field-name.d.ts +1 -1
- package/core/audits/accessibility/aria-input-field-name.js +1 -1
- package/core/audits/accessibility/aria-meter-name.d.ts +1 -1
- package/core/audits/accessibility/aria-meter-name.js +1 -1
- package/core/audits/accessibility/aria-progressbar-name.d.ts +1 -1
- package/core/audits/accessibility/aria-progressbar-name.js +1 -1
- package/core/audits/accessibility/aria-required-attr.d.ts +1 -1
- package/core/audits/accessibility/aria-required-attr.js +1 -1
- package/core/audits/accessibility/aria-required-children.d.ts +1 -1
- package/core/audits/accessibility/aria-required-children.js +1 -1
- package/core/audits/accessibility/aria-required-parent.d.ts +1 -1
- package/core/audits/accessibility/aria-required-parent.js +1 -1
- package/core/audits/accessibility/aria-roles.d.ts +1 -1
- package/core/audits/accessibility/aria-roles.js +1 -1
- package/core/audits/accessibility/aria-toggle-field-name.d.ts +1 -1
- package/core/audits/accessibility/aria-toggle-field-name.js +1 -1
- package/core/audits/accessibility/aria-tooltip-name.d.ts +1 -1
- package/core/audits/accessibility/aria-tooltip-name.js +1 -1
- package/core/audits/accessibility/aria-treeitem-name.d.ts +1 -1
- package/core/audits/accessibility/aria-treeitem-name.js +1 -1
- package/core/audits/accessibility/aria-valid-attr-value.d.ts +1 -1
- package/core/audits/accessibility/aria-valid-attr-value.js +1 -1
- package/core/audits/accessibility/aria-valid-attr.d.ts +1 -1
- package/core/audits/accessibility/aria-valid-attr.js +1 -1
- package/core/audits/accessibility/axe-audit.d.ts +1 -1
- package/core/audits/accessibility/button-name.d.ts +1 -1
- package/core/audits/accessibility/button-name.js +1 -1
- package/core/audits/accessibility/bypass.d.ts +1 -1
- package/core/audits/accessibility/bypass.js +1 -1
- package/core/audits/accessibility/color-contrast.d.ts +1 -1
- package/core/audits/accessibility/color-contrast.js +1 -1
- package/core/audits/accessibility/definition-list.d.ts +1 -1
- package/core/audits/accessibility/definition-list.js +1 -1
- package/core/audits/accessibility/dlitem.d.ts +1 -1
- package/core/audits/accessibility/dlitem.js +1 -1
- package/core/audits/accessibility/document-title.d.ts +1 -1
- package/core/audits/accessibility/document-title.js +1 -1
- package/core/audits/accessibility/duplicate-id-active.d.ts +1 -1
- package/core/audits/accessibility/duplicate-id-active.js +1 -1
- package/core/audits/accessibility/duplicate-id-aria.d.ts +1 -1
- package/core/audits/accessibility/duplicate-id-aria.js +1 -1
- package/core/audits/accessibility/form-field-multiple-labels.d.ts +1 -1
- package/core/audits/accessibility/form-field-multiple-labels.js +1 -1
- package/core/audits/accessibility/frame-title.d.ts +1 -1
- package/core/audits/accessibility/frame-title.js +1 -1
- package/core/audits/accessibility/heading-order.d.ts +1 -1
- package/core/audits/accessibility/heading-order.js +1 -1
- package/core/audits/accessibility/html-has-lang.d.ts +1 -1
- package/core/audits/accessibility/html-has-lang.js +1 -1
- package/core/audits/accessibility/html-lang-valid.d.ts +1 -1
- package/core/audits/accessibility/html-lang-valid.js +1 -1
- package/core/audits/accessibility/image-alt.d.ts +1 -1
- package/core/audits/accessibility/image-alt.js +1 -1
- package/core/audits/accessibility/input-image-alt.d.ts +1 -1
- package/core/audits/accessibility/input-image-alt.js +1 -1
- package/core/audits/accessibility/label.d.ts +1 -1
- package/core/audits/accessibility/label.js +1 -1
- package/core/audits/accessibility/link-name.d.ts +1 -1
- package/core/audits/accessibility/link-name.js +1 -1
- package/core/audits/accessibility/list.d.ts +1 -1
- package/core/audits/accessibility/list.js +1 -1
- package/core/audits/accessibility/listitem.d.ts +1 -1
- package/core/audits/accessibility/listitem.js +1 -1
- package/core/audits/accessibility/manual/custom-controls-labels.d.ts +1 -1
- package/core/audits/accessibility/manual/custom-controls-roles.d.ts +1 -1
- package/core/audits/accessibility/manual/focus-traps.d.ts +1 -1
- package/core/audits/accessibility/manual/focusable-controls.d.ts +1 -1
- package/core/audits/accessibility/manual/interactive-element-affordance.d.ts +1 -1
- package/core/audits/accessibility/manual/logical-tab-order.d.ts +1 -1
- package/core/audits/accessibility/manual/managed-focus.d.ts +1 -1
- package/core/audits/accessibility/manual/offscreen-content-hidden.d.ts +1 -1
- package/core/audits/accessibility/manual/use-landmarks.d.ts +1 -1
- package/core/audits/accessibility/manual/visual-order-follows-dom.d.ts +1 -1
- package/core/audits/accessibility/meta-refresh.d.ts +1 -1
- package/core/audits/accessibility/meta-refresh.js +1 -1
- package/core/audits/accessibility/meta-viewport.d.ts +1 -1
- package/core/audits/accessibility/meta-viewport.js +1 -1
- package/core/audits/accessibility/object-alt.d.ts +1 -1
- package/core/audits/accessibility/object-alt.js +1 -1
- package/core/audits/accessibility/tabindex.d.ts +1 -1
- package/core/audits/accessibility/tabindex.js +1 -1
- package/core/audits/accessibility/td-headers-attr.d.ts +1 -1
- package/core/audits/accessibility/td-headers-attr.js +1 -1
- package/core/audits/accessibility/th-has-data-cells.d.ts +1 -1
- package/core/audits/accessibility/th-has-data-cells.js +1 -1
- package/core/audits/accessibility/valid-lang.d.ts +1 -1
- package/core/audits/accessibility/valid-lang.js +1 -1
- package/core/audits/accessibility/video-caption.d.ts +1 -1
- package/core/audits/accessibility/video-caption.js +1 -1
- package/core/audits/audit.d.ts +1 -1
- package/core/audits/autocomplete.d.ts +1 -1
- package/core/audits/bf-cache.d.ts +1 -1
- package/core/audits/bootup-time.d.ts +1 -1
- package/core/audits/byte-efficiency/byte-efficiency-audit.d.ts +1 -1
- package/core/audits/byte-efficiency/duplicated-javascript.d.ts +1 -1
- package/core/audits/byte-efficiency/efficient-animated-content.d.ts +2 -2
- package/core/audits/byte-efficiency/legacy-javascript.d.ts +2 -2
- package/core/audits/byte-efficiency/modern-image-formats.d.ts +1 -1
- package/core/audits/byte-efficiency/offscreen-images.d.ts +2 -2
- package/core/audits/byte-efficiency/render-blocking-resources.d.ts +1 -1
- package/core/audits/byte-efficiency/total-byte-weight.d.ts +1 -1
- package/core/audits/byte-efficiency/unminified-css.d.ts +1 -1
- package/core/audits/byte-efficiency/unminified-javascript.d.ts +1 -1
- package/core/audits/byte-efficiency/unused-css-rules.d.ts +1 -1
- package/core/audits/byte-efficiency/unused-javascript.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-long-cache-ttl.d.ts +3 -3
- package/core/audits/byte-efficiency/uses-optimized-images.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-responsive-images-snapshot.d.ts +1 -1
- package/core/audits/byte-efficiency/uses-responsive-images.d.ts +2 -2
- package/core/audits/byte-efficiency/uses-text-compression.d.ts +1 -1
- package/core/audits/content-width.d.ts +1 -1
- package/core/audits/critical-request-chains.d.ts +1 -1
- package/core/audits/csp-xss.d.ts +1 -1
- package/core/audits/deprecations.d.ts +1 -1
- package/core/audits/diagnostics.d.ts +1 -1
- package/core/audits/dobetterweb/charset.d.ts +1 -1
- package/core/audits/dobetterweb/doctype.d.ts +1 -1
- package/core/audits/dobetterweb/dom-size.d.ts +1 -1
- package/core/audits/dobetterweb/geolocation-on-start.d.ts +1 -1
- package/core/audits/dobetterweb/inspector-issues.d.ts +1 -1
- package/core/audits/dobetterweb/js-libraries.d.ts +1 -1
- package/core/audits/dobetterweb/no-document-write.d.ts +1 -1
- package/core/audits/dobetterweb/notification-on-start.d.ts +1 -1
- package/core/audits/dobetterweb/paste-preventing-inputs.d.ts +1 -1
- package/core/audits/dobetterweb/uses-http2.d.ts +3 -3
- package/core/audits/dobetterweb/uses-passive-event-listeners.d.ts +1 -1
- package/core/audits/errors-in-console.d.ts +1 -1
- package/core/audits/final-screenshot.d.ts +1 -1
- package/core/audits/font-display.d.ts +1 -1
- package/core/audits/image-aspect-ratio.d.ts +1 -1
- package/core/audits/image-size-responsive.d.ts +1 -1
- package/core/audits/installable-manifest.d.ts +1 -1
- package/core/audits/is-on-https.d.ts +1 -1
- package/core/audits/largest-contentful-paint-element.d.ts +17 -3
- package/core/audits/largest-contentful-paint-element.js +77 -4
- package/core/audits/layout-shift-elements.d.ts +1 -1
- package/core/audits/lcp-lazy-loaded.d.ts +1 -1
- package/core/audits/long-tasks.d.ts +1 -1
- package/core/audits/main-thread-tasks.d.ts +1 -1
- package/core/audits/mainthread-work-breakdown.d.ts +1 -1
- package/core/audits/manual/manual-audit.d.ts +1 -1
- package/core/audits/manual/pwa-cross-browser.d.ts +1 -1
- package/core/audits/manual/pwa-each-page-has-url.d.ts +1 -1
- package/core/audits/manual/pwa-page-transitions.d.ts +1 -1
- package/core/audits/maskable-icon.d.ts +1 -1
- package/core/audits/metrics/cumulative-layout-shift.d.ts +1 -1
- package/core/audits/metrics/experimental-interaction-to-next-paint.d.ts +1 -1
- package/core/audits/metrics/first-contentful-paint-3g.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/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 +1 -1
- package/core/audits/metrics/speed-index.d.ts +1 -1
- package/core/audits/metrics/total-blocking-time.d.ts +1 -1
- package/core/audits/metrics.d.ts +1 -1
- package/core/audits/multi-check-audit.d.ts +1 -1
- package/core/audits/network-requests.d.ts +1 -1
- package/core/audits/network-requests.js +1 -0
- package/core/audits/network-rtt.d.ts +1 -1
- package/core/audits/network-server-latency.d.ts +1 -1
- package/core/audits/no-unload-listeners.d.ts +1 -1
- package/core/audits/non-composited-animations.d.ts +1 -1
- package/core/audits/performance-budget.d.ts +2 -2
- package/core/audits/predictive-perf.d.ts +1 -1
- package/core/audits/predictive-perf.js +10 -3
- package/core/audits/preload-fonts.d.ts +1 -1
- package/core/audits/prioritize-lcp-image.d.ts +2 -13
- package/core/audits/prioritize-lcp-image.js +3 -55
- package/core/audits/redirects.d.ts +2 -2
- package/core/audits/resource-summary.d.ts +1 -1
- package/core/audits/screenshot-thumbnails.d.ts +2 -2
- package/core/audits/script-treemap-data.d.ts +1 -1
- package/core/audits/seo/canonical.d.ts +1 -1
- package/core/audits/seo/crawlable-anchors.d.ts +1 -1
- package/core/audits/seo/font-size.d.ts +1 -1
- package/core/audits/seo/hreflang.d.ts +1 -1
- package/core/audits/seo/http-status-code.d.ts +1 -1
- package/core/audits/seo/is-crawlable.d.ts +1 -1
- package/core/audits/seo/link-text.d.ts +1 -1
- package/core/audits/seo/manual/structured-data.d.ts +1 -1
- package/core/audits/seo/meta-description.d.ts +1 -1
- package/core/audits/seo/plugins.d.ts +1 -1
- package/core/audits/seo/robots-txt.d.ts +1 -1
- package/core/audits/seo/tap-targets.d.ts +1 -1
- package/core/audits/server-response-time.d.ts +1 -1
- package/core/audits/service-worker.d.ts +1 -1
- package/core/audits/splash-screen.d.ts +2 -2
- package/core/audits/themed-omnibox.d.ts +2 -2
- package/core/audits/third-party-facades.d.ts +2 -2
- package/core/audits/third-party-summary.d.ts +2 -2
- package/core/audits/timing-budget.d.ts +3 -3
- package/core/audits/unsized-images.d.ts +1 -1
- package/core/audits/user-timings.d.ts +1 -1
- package/core/audits/uses-rel-preconnect.d.ts +1 -1
- package/core/audits/uses-rel-preload.d.ts +2 -2
- package/core/audits/valid-source-maps.d.ts +2 -2
- package/core/audits/viewport.d.ts +1 -1
- package/core/audits/violation-audit.d.ts +1 -1
- package/core/audits/work-during-interaction.d.ts +2 -2
- package/core/computed/critical-request-chains.d.ts +1 -1
- package/core/computed/document-urls.d.ts +32 -0
- package/core/computed/document-urls.js +53 -0
- package/core/computed/entity-classification.js +0 -1
- package/core/computed/lcp-image-record.d.ts +26 -0
- package/core/computed/lcp-image-record.js +74 -0
- package/core/computed/load-simulator.d.ts +2 -2
- package/core/computed/metrics/cumulative-layout-shift.d.ts +1 -1
- package/core/computed/metrics/first-contentful-paint-all-frames.d.ts +1 -1
- package/core/computed/metrics/first-contentful-paint.d.ts +7 -1
- package/core/computed/metrics/first-meaningful-paint.d.ts +7 -1
- package/core/computed/metrics/interactive.d.ts +7 -1
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lantern-first-meaningful-paint.d.ts +1 -1
- package/core/computed/metrics/lantern-interactive.d.ts +1 -1
- package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +1 -1
- package/core/computed/metrics/lantern-max-potential-fid.d.ts +1 -1
- package/core/computed/metrics/lantern-metric.d.ts +1 -1
- package/core/computed/metrics/lantern-speed-index.d.ts +1 -1
- package/core/computed/metrics/lantern-total-blocking-time.d.ts +1 -1
- package/core/computed/metrics/largest-contentful-paint-all-frames.d.ts +1 -1
- package/core/computed/metrics/largest-contentful-paint.d.ts +7 -1
- package/core/computed/metrics/lcp-breakdown.d.ts +23 -0
- package/core/computed/metrics/lcp-breakdown.js +58 -0
- package/core/computed/metrics/max-potential-fid.d.ts +7 -1
- package/core/computed/metrics/metric.d.ts +2 -2
- package/core/computed/metrics/metric.js +1 -1
- package/core/computed/metrics/navigation-metric.d.ts +3 -3
- package/core/computed/metrics/navigation-metric.js +1 -1
- package/core/computed/metrics/responsiveness.d.ts +1 -1
- package/core/computed/metrics/speed-index.d.ts +7 -1
- package/core/computed/metrics/time-to-first-byte.d.ts +16 -0
- package/core/computed/metrics/time-to-first-byte.js +60 -0
- package/core/computed/metrics/timing-summary.js +10 -0
- package/core/computed/metrics/total-blocking-time.d.ts +7 -1
- package/core/computed/network-records.d.ts +1 -1
- package/core/computed/page-dependency-graph.d.ts +4 -13
- package/core/computed/page-dependency-graph.js +2 -33
- package/core/computed/processed-navigation.d.ts +1 -1
- package/core/computed/resource-summary.d.ts +4 -4
- package/core/config/default-config.d.ts +1 -1
- package/core/config/desktop-config.d.ts +1 -1
- package/core/gather/base-gatherer.d.ts +1 -1
- package/core/gather/driver/execution-context.d.ts +1 -1
- package/core/gather/driver/network-monitor.d.ts +2 -2
- package/core/gather/driver/target-manager.d.ts +2 -1
- package/core/gather/driver/target-manager.js +5 -3
- package/core/gather/driver/wait-for-condition.js +12 -0
- package/core/gather/driver.d.ts +3 -3
- package/core/gather/fetcher.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 +1 -1
- 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 +1 -1
- package/core/gather/gatherers/devtools-log.d.ts +1 -1
- 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 +2 -2
- package/core/gather/gatherers/dobetterweb/optimized-images.js +2 -2
- package/core/gather/gatherers/dobetterweb/response-compression.d.ts +2 -2
- package/core/gather/gatherers/dobetterweb/response-compression.js +1 -2
- package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.d.ts +1 -1
- package/core/gather/gatherers/full-page-screenshot.d.ts +1 -1
- package/core/gather/gatherers/global-listeners.d.ts +1 -1
- 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 +1 -1
- package/core/gather/gatherers/installability-errors.d.ts +1 -1
- package/core/gather/gatherers/js-usage.d.ts +1 -1
- package/core/gather/gatherers/link-elements.d.ts +1 -1
- package/core/gather/gatherers/main-document-content.d.ts +1 -1
- package/core/gather/gatherers/meta-elements.d.ts +1 -1
- package/core/gather/gatherers/network-user-agent.d.ts +1 -1
- package/core/gather/gatherers/script-elements.d.ts +2 -2
- package/core/gather/gatherers/script-elements.js +1 -2
- package/core/gather/gatherers/scripts.d.ts +1 -3
- package/core/gather/gatherers/scripts.js +0 -3
- package/core/gather/gatherers/seo/embedded-content.d.ts +1 -1
- package/core/gather/gatherers/seo/font-size.d.ts +1 -1
- package/core/gather/gatherers/seo/robots-txt.d.ts +1 -1
- package/core/gather/gatherers/seo/tap-targets.d.ts +1 -1
- package/core/gather/gatherers/service-worker.d.ts +1 -1
- package/core/gather/gatherers/source-maps.d.ts +1 -1
- package/core/gather/gatherers/stacks.d.ts +1 -1
- package/core/gather/gatherers/trace-compat.d.ts +1 -1
- package/core/gather/gatherers/trace-elements.d.ts +2 -2
- package/core/gather/gatherers/trace.d.ts +1 -1
- package/core/gather/gatherers/viewport-dimensions.d.ts +1 -1
- package/core/gather/gatherers/web-app-manifest.d.ts +1 -1
- package/core/gather/navigation-runner.d.ts +3 -3
- package/core/gather/navigation-runner.js +1 -1
- package/core/gather/runner-helpers.js +18 -4
- package/core/index.cjs +28 -0
- package/core/index.d.ts +2 -2
- package/core/legacy/gather/connections/connection.d.ts +3 -1
- package/core/legacy/gather/connections/connection.js +15 -0
- package/core/legacy/gather/connections/cri.d.ts +2 -2
- package/core/legacy/gather/connections/raw.d.ts +1 -1
- package/core/legacy/gather/driver.d.ts +3 -3
- package/core/legacy/gather/gather-runner.js +1 -1
- package/core/lib/dependency-graph/cpu-node.d.ts +2 -2
- package/core/lib/dependency-graph/network-node.d.ts +3 -3
- package/core/lib/dependency-graph/simulator/connection-pool.d.ts +2 -2
- package/core/lib/dependency-graph/simulator/dns-cache.d.ts +1 -1
- package/core/lib/dependency-graph/simulator/simulator.d.ts +5 -5
- package/core/lib/lh-trace-processor.d.ts +1 -1
- package/core/lib/navigation-error.d.ts +2 -2
- package/core/lib/network-recorder.d.ts +17 -11
- package/core/lib/network-recorder.js +24 -31
- package/core/lib/network-request.d.ts +7 -8
- package/core/lib/network-request.js +8 -6
- package/core/lib/stack-packs.js +9 -1
- package/core/lib/tracehouse/main-thread-tasks.d.ts +1 -1
- package/core/lib/tracehouse/task-summary.d.ts +1 -1
- package/core/lib/url-utils.js +1 -0
- package/core/runner.d.ts +2 -2
- package/core/runner.js +8 -2
- package/core/scoring.d.ts +1 -1
- package/core/user-flow.d.ts +1 -1
- package/dist/report/bundle.esm.js +3 -1
- package/dist/report/flow.js +3 -3
- package/dist/report/standalone.js +5 -5
- package/package.json +9 -8
- package/report/README.md +1 -1
- package/report/assets/styles.css +0 -4
- package/report/renderer/components.js +1 -1
- package/report/renderer/performance-category-renderer.d.ts +1 -1
- package/report/renderer/pwa-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/topbar-features.d.ts +1 -1
- package/shared/localization/i18n-module.d.ts +2 -2
- package/shared/localization/locales/ar-XB.json +113 -53
- package/shared/localization/locales/ar.json +113 -53
- package/shared/localization/locales/bg.json +113 -53
- package/shared/localization/locales/ca.json +115 -55
- package/shared/localization/locales/cs.json +113 -53
- package/shared/localization/locales/da.json +114 -54
- package/shared/localization/locales/de.json +113 -53
- package/shared/localization/locales/el.json +113 -53
- package/shared/localization/locales/en-GB.json +107 -47
- package/shared/localization/locales/en-US.json +92 -44
- package/shared/localization/locales/en-XA.json +113 -53
- package/shared/localization/locales/en-XL.json +92 -44
- package/shared/localization/locales/es-419.json +113 -53
- package/shared/localization/locales/es.json +114 -54
- package/shared/localization/locales/fi.json +113 -53
- package/shared/localization/locales/fil.json +113 -53
- package/shared/localization/locales/fr.json +113 -53
- package/shared/localization/locales/he.json +114 -54
- package/shared/localization/locales/hi.json +116 -56
- package/shared/localization/locales/hr.json +113 -53
- package/shared/localization/locales/hu.json +113 -53
- package/shared/localization/locales/id.json +113 -53
- package/shared/localization/locales/it.json +114 -54
- package/shared/localization/locales/ja.json +116 -56
- package/shared/localization/locales/ko.json +113 -53
- package/shared/localization/locales/lt.json +113 -53
- package/shared/localization/locales/lv.json +113 -53
- package/shared/localization/locales/nl.json +117 -57
- package/shared/localization/locales/no.json +114 -54
- package/shared/localization/locales/pl.json +125 -65
- package/shared/localization/locales/pt-PT.json +117 -57
- package/shared/localization/locales/pt.json +113 -53
- package/shared/localization/locales/ro.json +113 -53
- package/shared/localization/locales/ru.json +113 -53
- package/shared/localization/locales/sk.json +112 -52
- package/shared/localization/locales/sl.json +113 -53
- package/shared/localization/locales/sr-Latn.json +113 -53
- package/shared/localization/locales/sr.json +113 -53
- package/shared/localization/locales/sv.json +113 -53
- package/shared/localization/locales/ta.json +113 -53
- package/shared/localization/locales/te.json +113 -53
- package/shared/localization/locales/th.json +113 -53
- package/shared/localization/locales/tr.json +113 -53
- package/shared/localization/locales/uk.json +115 -55
- package/shared/localization/locales/vi.json +113 -53
- package/shared/localization/locales/zh-HK.json +113 -53
- package/shared/localization/locales/zh-TW.json +113 -53
- package/shared/localization/locales/zh.json +113 -53
- package/shared/util.js +2 -0
- package/types/artifacts.d.ts +4 -0
- package/types/externs.d.ts +1 -1
- package/types/internal/test.d.ts +1 -1
- package/types/protocol.d.ts +3 -0
|
@@ -25,6 +25,8 @@ class Connection {
|
|
|
25
25
|
this._lastCommandId = 0;
|
|
26
26
|
/** @type {Map<number, CommandCallback>} */
|
|
27
27
|
this._callbacks = new Map();
|
|
28
|
+
/** @type {Map<string, LH.Protocol.TargetType>} */
|
|
29
|
+
this._sessionIdToTargetType = new Map();
|
|
28
30
|
|
|
29
31
|
this._eventEmitter = /** @type {?CrdpEventMessageEmitter} */ (new EventEmitter());
|
|
30
32
|
}
|
|
@@ -129,6 +131,18 @@ class Connection {
|
|
|
129
131
|
if (!('id' in object)) {
|
|
130
132
|
log.formatProtocol('<= event',
|
|
131
133
|
{method: object.method, params: object.params}, 'verbose');
|
|
134
|
+
if (object.method === 'Target.attachedToTarget') {
|
|
135
|
+
const type = object.params.targetInfo.type;
|
|
136
|
+
if (type === 'page' || type === 'iframe') {
|
|
137
|
+
this._sessionIdToTargetType.set(object.params.sessionId, type);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (object.sessionId) {
|
|
141
|
+
const type = this._sessionIdToTargetType.get(object.sessionId);
|
|
142
|
+
if (type) {
|
|
143
|
+
object.targetType = type;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
132
146
|
this.emitProtocolEvent(object);
|
|
133
147
|
return;
|
|
134
148
|
}
|
|
@@ -175,6 +189,7 @@ class Connection {
|
|
|
175
189
|
this._eventEmitter.removeAllListeners();
|
|
176
190
|
this._eventEmitter = null;
|
|
177
191
|
}
|
|
192
|
+
this._sessionIdToTargetType.clear();
|
|
178
193
|
}
|
|
179
194
|
}
|
|
180
195
|
|
|
@@ -22,6 +22,6 @@ export class CriConnection extends Connection {
|
|
|
22
22
|
*/
|
|
23
23
|
private _runJsonCommand;
|
|
24
24
|
}
|
|
25
|
-
import { Connection } from
|
|
26
|
-
import WebSocket from
|
|
25
|
+
import { Connection } from './connection.js';
|
|
26
|
+
import WebSocket from 'ws';
|
|
27
27
|
//# sourceMappingURL=cri.d.ts.map
|
|
@@ -209,7 +209,7 @@ export class Driver implements LH.Gatherer.FRTransitionalDriver {
|
|
|
209
209
|
endDevtoolsLog(): Promise<LH.DevtoolsLog>;
|
|
210
210
|
url(): Promise<string>;
|
|
211
211
|
}
|
|
212
|
-
import * as LH from
|
|
213
|
-
import { ExecutionContext } from
|
|
214
|
-
import { Fetcher } from
|
|
212
|
+
import * as LH from '../../../types/lh.js';
|
|
213
|
+
import { ExecutionContext } from '../../gather/driver/execution-context.js';
|
|
214
|
+
import { Fetcher } from '../../gather/fetcher.js';
|
|
215
215
|
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -452,7 +452,7 @@ class GatherRunner {
|
|
|
452
452
|
// Add a `bidx=20` query param, eg: https://www.example.com/?bidx=50
|
|
453
453
|
const parsedUrl = UrlUtils.isValid(options.requestedUrl) && new URL(options.requestedUrl);
|
|
454
454
|
if (options.settings.channel === 'lr' && parsedUrl && parsedUrl.searchParams.has('bidx')) {
|
|
455
|
-
const bidxRunCount = parsedUrl.searchParams.get('bidx') || 0;
|
|
455
|
+
const bidxRunCount = Number(parsedUrl.searchParams.get('bidx')) || 0;
|
|
456
456
|
// Add the first bidx into the new set
|
|
457
457
|
const indexes = [baseArtifacts.BenchmarkIndex];
|
|
458
458
|
for (let i = 0; i < bidxRunCount; i++) {
|
|
@@ -29,6 +29,6 @@ export class CPUNode extends BaseNode {
|
|
|
29
29
|
*/
|
|
30
30
|
cloneWithoutRelationships(): CPUNode;
|
|
31
31
|
}
|
|
32
|
-
import { BaseNode } from
|
|
33
|
-
import * as LH from
|
|
32
|
+
import { BaseNode } from './base-node.js';
|
|
33
|
+
import * as LH from '../../../types/lh.js';
|
|
34
34
|
//# sourceMappingURL=cpu-node.d.ts.map
|
|
@@ -37,7 +37,7 @@ export class NetworkNode extends BaseNode {
|
|
|
37
37
|
*/
|
|
38
38
|
cloneWithoutRelationships(): NetworkNode;
|
|
39
39
|
}
|
|
40
|
-
import { BaseNode } from
|
|
41
|
-
import { NetworkRequest } from
|
|
42
|
-
import * as LH from
|
|
40
|
+
import { BaseNode } from './base-node.js';
|
|
41
|
+
import { NetworkRequest } from '../network-request.js';
|
|
42
|
+
import * as LH from '../../../types/lh.js';
|
|
43
43
|
//# sourceMappingURL=network-node.d.ts.map
|
|
@@ -53,6 +53,6 @@ export class ConnectionPool {
|
|
|
53
53
|
*/
|
|
54
54
|
release(record: LH.Artifacts.NetworkRequest): void;
|
|
55
55
|
}
|
|
56
|
-
import * as LH from
|
|
57
|
-
import { TcpConnection } from
|
|
56
|
+
import * as LH from '../../../../types/lh.js';
|
|
57
|
+
import { TcpConnection } from './tcp-connection.js';
|
|
58
58
|
//# sourceMappingURL=connection-pool.d.ts.map
|
|
@@ -36,7 +36,7 @@ export class DNSCache {
|
|
|
36
36
|
export namespace DNSCache {
|
|
37
37
|
export { DNS_RESOLUTION_RTT_MULTIPLIER as RTT_MULTIPLIER };
|
|
38
38
|
}
|
|
39
|
-
import * as LH from
|
|
39
|
+
import * as LH from '../../../../types/lh.js';
|
|
40
40
|
declare const DNS_RESOLUTION_RTT_MULTIPLIER: 2;
|
|
41
41
|
export {};
|
|
42
42
|
//# sourceMappingURL=dns-cache.d.ts.map
|
|
@@ -146,9 +146,9 @@ export class Simulator {
|
|
|
146
146
|
*/
|
|
147
147
|
computeWastedMsFromWastedBytes(wastedBytes: number): number;
|
|
148
148
|
}
|
|
149
|
-
import * as LH from
|
|
150
|
-
import { SimulatorTimingMap } from
|
|
151
|
-
import { DNSCache } from
|
|
152
|
-
import { ConnectionPool } from
|
|
153
|
-
import { TcpConnection } from
|
|
149
|
+
import * as LH from '../../../../types/lh.js';
|
|
150
|
+
import { SimulatorTimingMap } from './simulator-timing-map.js';
|
|
151
|
+
import { DNSCache } from './dns-cache.js';
|
|
152
|
+
import { ConnectionPool } from './connection-pool.js';
|
|
153
|
+
import { TcpConnection } from './tcp-connection.js';
|
|
154
154
|
//# sourceMappingURL=simulator.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default LHTraceProcessor;
|
|
2
2
|
declare class LHTraceProcessor extends TraceProcessor {
|
|
3
3
|
}
|
|
4
|
-
import { TraceProcessor } from
|
|
4
|
+
import { TraceProcessor } from '../lib/tracehouse/trace-processor.js';
|
|
5
5
|
//# sourceMappingURL=lh-trace-processor.d.ts.map
|
|
@@ -34,6 +34,6 @@ export function getNonHtmlError(finalRecord: LH.Artifacts.NetworkRequest | undef
|
|
|
34
34
|
export namespace UIStrings {
|
|
35
35
|
const warningXhtml: string;
|
|
36
36
|
}
|
|
37
|
-
import { NetworkRequest } from
|
|
38
|
-
import { LighthouseError } from
|
|
37
|
+
import { NetworkRequest } from './network-request.js';
|
|
38
|
+
import { LighthouseError } from './lh-error.js';
|
|
39
39
|
//# sourceMappingURL=navigation-error.d.ts.map
|
|
@@ -22,8 +22,6 @@ export class NetworkRecorder extends NetworkRecorder_base {
|
|
|
22
22
|
_records: NetworkRequest[];
|
|
23
23
|
/** @type {Map<string, NetworkRequest>} */
|
|
24
24
|
_recordsById: Map<string, NetworkRequest>;
|
|
25
|
-
/** @type {string|null|undefined} */
|
|
26
|
-
_mainSessionId: string | null | undefined;
|
|
27
25
|
/**
|
|
28
26
|
* Returns the array of raw network request data without finalizing the initiator and
|
|
29
27
|
* redirect chain.
|
|
@@ -45,52 +43,59 @@ export class NetworkRecorder extends NetworkRecorder_base {
|
|
|
45
43
|
*/
|
|
46
44
|
private onRequestFinished;
|
|
47
45
|
/**
|
|
48
|
-
* @param {{params: LH.Crdp.Network.RequestWillBeSentEvent, sessionId?: string}} event
|
|
46
|
+
* @param {{params: LH.Crdp.Network.RequestWillBeSentEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
49
47
|
*/
|
|
50
48
|
onRequestWillBeSent(event: {
|
|
51
49
|
params: LH.Crdp.Network.RequestWillBeSentEvent;
|
|
50
|
+
targetType: LH.Protocol.TargetType;
|
|
52
51
|
sessionId?: string;
|
|
53
52
|
}): void;
|
|
54
53
|
/**
|
|
55
|
-
* @param {{params: LH.Crdp.Network.RequestServedFromCacheEvent, sessionId?: string}} event
|
|
54
|
+
* @param {{params: LH.Crdp.Network.RequestServedFromCacheEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
56
55
|
*/
|
|
57
56
|
onRequestServedFromCache(event: {
|
|
58
57
|
params: LH.Crdp.Network.RequestServedFromCacheEvent;
|
|
58
|
+
targetType: LH.Protocol.TargetType;
|
|
59
59
|
sessionId?: string;
|
|
60
60
|
}): void;
|
|
61
61
|
/**
|
|
62
|
-
* @param {{params: LH.Crdp.Network.ResponseReceivedEvent, sessionId?: string}} event
|
|
62
|
+
* @param {{params: LH.Crdp.Network.ResponseReceivedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
63
63
|
*/
|
|
64
64
|
onResponseReceived(event: {
|
|
65
65
|
params: LH.Crdp.Network.ResponseReceivedEvent;
|
|
66
|
+
targetType: LH.Protocol.TargetType;
|
|
66
67
|
sessionId?: string;
|
|
67
68
|
}): void;
|
|
68
69
|
/**
|
|
69
|
-
* @param {{params: LH.Crdp.Network.DataReceivedEvent, sessionId?: string}} event
|
|
70
|
+
* @param {{params: LH.Crdp.Network.DataReceivedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
70
71
|
*/
|
|
71
72
|
onDataReceived(event: {
|
|
72
73
|
params: LH.Crdp.Network.DataReceivedEvent;
|
|
74
|
+
targetType: LH.Protocol.TargetType;
|
|
73
75
|
sessionId?: string;
|
|
74
76
|
}): void;
|
|
75
77
|
/**
|
|
76
|
-
* @param {{params: LH.Crdp.Network.LoadingFinishedEvent, sessionId?: string}} event
|
|
78
|
+
* @param {{params: LH.Crdp.Network.LoadingFinishedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
77
79
|
*/
|
|
78
80
|
onLoadingFinished(event: {
|
|
79
81
|
params: LH.Crdp.Network.LoadingFinishedEvent;
|
|
82
|
+
targetType: LH.Protocol.TargetType;
|
|
80
83
|
sessionId?: string;
|
|
81
84
|
}): void;
|
|
82
85
|
/**
|
|
83
|
-
* @param {{params: LH.Crdp.Network.LoadingFailedEvent, sessionId?: string}} event
|
|
86
|
+
* @param {{params: LH.Crdp.Network.LoadingFailedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
84
87
|
*/
|
|
85
88
|
onLoadingFailed(event: {
|
|
86
89
|
params: LH.Crdp.Network.LoadingFailedEvent;
|
|
90
|
+
targetType: LH.Protocol.TargetType;
|
|
87
91
|
sessionId?: string;
|
|
88
92
|
}): void;
|
|
89
93
|
/**
|
|
90
|
-
* @param {{params: LH.Crdp.Network.ResourceChangedPriorityEvent, sessionId?: string}} event
|
|
94
|
+
* @param {{params: LH.Crdp.Network.ResourceChangedPriorityEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
91
95
|
*/
|
|
92
96
|
onResourceChangedPriority(event: {
|
|
93
97
|
params: LH.Crdp.Network.ResourceChangedPriorityEvent;
|
|
98
|
+
targetType: LH.Protocol.TargetType;
|
|
94
99
|
sessionId?: string;
|
|
95
100
|
}): void;
|
|
96
101
|
/**
|
|
@@ -105,11 +110,12 @@ export class NetworkRecorder extends NetworkRecorder_base {
|
|
|
105
110
|
* message is referring.
|
|
106
111
|
*
|
|
107
112
|
* @param {string} requestId
|
|
113
|
+
* @param {LH.Protocol.TargetType} targetType
|
|
108
114
|
* @param {string|undefined} sessionId
|
|
109
115
|
* @return {NetworkRequest|undefined}
|
|
110
116
|
*/
|
|
111
|
-
_findRealRequestAndSetSession(requestId: string, sessionId: string | undefined): NetworkRequest | undefined;
|
|
117
|
+
_findRealRequestAndSetSession(requestId: string, targetType: LH.Protocol.TargetType, sessionId: string | undefined): NetworkRequest | undefined;
|
|
112
118
|
}
|
|
113
|
-
import { NetworkRequest } from
|
|
119
|
+
import { NetworkRequest } from './network-request.js';
|
|
114
120
|
export {};
|
|
115
121
|
//# sourceMappingURL=network-recorder.d.ts.map
|
|
@@ -31,8 +31,6 @@ class NetworkRecorder extends RequestEventEmitter {
|
|
|
31
31
|
this._records = [];
|
|
32
32
|
/** @type {Map<string, NetworkRequest>} */
|
|
33
33
|
this._recordsById = new Map();
|
|
34
|
-
/** @type {string|null|undefined} */
|
|
35
|
-
this._mainSessionId = null;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
/**
|
|
@@ -71,11 +69,12 @@ class NetworkRecorder extends RequestEventEmitter {
|
|
|
71
69
|
// DevTools SDK network layer.
|
|
72
70
|
|
|
73
71
|
/**
|
|
74
|
-
* @param {{params: LH.Crdp.Network.RequestWillBeSentEvent, sessionId?: string}} event
|
|
72
|
+
* @param {{params: LH.Crdp.Network.RequestWillBeSentEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
75
73
|
*/
|
|
76
74
|
onRequestWillBeSent(event) {
|
|
77
75
|
const data = event.params;
|
|
78
|
-
const originalRequest = this._findRealRequestAndSetSession(
|
|
76
|
+
const originalRequest = this._findRealRequestAndSetSession(
|
|
77
|
+
data.requestId, event.targetType, event.sessionId);
|
|
79
78
|
// This is a simple new request, create the NetworkRequest object and finish.
|
|
80
79
|
if (!originalRequest) {
|
|
81
80
|
const request = new NetworkRequest();
|
|
@@ -114,44 +113,48 @@ class NetworkRecorder extends RequestEventEmitter {
|
|
|
114
113
|
}
|
|
115
114
|
|
|
116
115
|
/**
|
|
117
|
-
* @param {{params: LH.Crdp.Network.RequestServedFromCacheEvent, sessionId?: string}} event
|
|
116
|
+
* @param {{params: LH.Crdp.Network.RequestServedFromCacheEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
118
117
|
*/
|
|
119
118
|
onRequestServedFromCache(event) {
|
|
120
119
|
const data = event.params;
|
|
121
|
-
const request = this._findRealRequestAndSetSession(
|
|
120
|
+
const request = this._findRealRequestAndSetSession(
|
|
121
|
+
data.requestId, event.targetType, event.sessionId);
|
|
122
122
|
if (!request) return;
|
|
123
123
|
log.verbose('network', `${request.url} served from cache`);
|
|
124
124
|
request.onRequestServedFromCache();
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
|
-
* @param {{params: LH.Crdp.Network.ResponseReceivedEvent, sessionId?: string}} event
|
|
128
|
+
* @param {{params: LH.Crdp.Network.ResponseReceivedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
129
129
|
*/
|
|
130
130
|
onResponseReceived(event) {
|
|
131
131
|
const data = event.params;
|
|
132
|
-
const request = this._findRealRequestAndSetSession(
|
|
132
|
+
const request = this._findRealRequestAndSetSession(
|
|
133
|
+
data.requestId, event.targetType, event.sessionId);
|
|
133
134
|
if (!request) return;
|
|
134
135
|
log.verbose('network', `${request.url} response received`);
|
|
135
136
|
request.onResponseReceived(data);
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
/**
|
|
139
|
-
* @param {{params: LH.Crdp.Network.DataReceivedEvent, sessionId?: string}} event
|
|
140
|
+
* @param {{params: LH.Crdp.Network.DataReceivedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
140
141
|
*/
|
|
141
142
|
onDataReceived(event) {
|
|
142
143
|
const data = event.params;
|
|
143
|
-
const request = this._findRealRequestAndSetSession(
|
|
144
|
+
const request = this._findRealRequestAndSetSession(
|
|
145
|
+
data.requestId, event.targetType, event.sessionId);
|
|
144
146
|
if (!request) return;
|
|
145
147
|
log.verbose('network', `${request.url} data received`);
|
|
146
148
|
request.onDataReceived(data);
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
/**
|
|
150
|
-
* @param {{params: LH.Crdp.Network.LoadingFinishedEvent, sessionId?: string}} event
|
|
152
|
+
* @param {{params: LH.Crdp.Network.LoadingFinishedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
151
153
|
*/
|
|
152
154
|
onLoadingFinished(event) {
|
|
153
155
|
const data = event.params;
|
|
154
|
-
const request = this._findRealRequestAndSetSession(
|
|
156
|
+
const request = this._findRealRequestAndSetSession(
|
|
157
|
+
data.requestId, event.targetType, event.sessionId);
|
|
155
158
|
if (!request) return;
|
|
156
159
|
log.verbose('network', `${request.url} loading finished`);
|
|
157
160
|
request.onLoadingFinished(data);
|
|
@@ -159,11 +162,12 @@ class NetworkRecorder extends RequestEventEmitter {
|
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
/**
|
|
162
|
-
* @param {{params: LH.Crdp.Network.LoadingFailedEvent, sessionId?: string}} event
|
|
165
|
+
* @param {{params: LH.Crdp.Network.LoadingFailedEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
163
166
|
*/
|
|
164
167
|
onLoadingFailed(event) {
|
|
165
168
|
const data = event.params;
|
|
166
|
-
const request = this._findRealRequestAndSetSession(
|
|
169
|
+
const request = this._findRealRequestAndSetSession(
|
|
170
|
+
data.requestId, event.targetType, event.sessionId);
|
|
167
171
|
if (!request) return;
|
|
168
172
|
log.verbose('network', `${request.url} loading failed`);
|
|
169
173
|
request.onLoadingFailed(data);
|
|
@@ -171,11 +175,12 @@ class NetworkRecorder extends RequestEventEmitter {
|
|
|
171
175
|
}
|
|
172
176
|
|
|
173
177
|
/**
|
|
174
|
-
* @param {{params: LH.Crdp.Network.ResourceChangedPriorityEvent, sessionId?: string}} event
|
|
178
|
+
* @param {{params: LH.Crdp.Network.ResourceChangedPriorityEvent, targetType: LH.Protocol.TargetType, sessionId?: string}} event
|
|
175
179
|
*/
|
|
176
180
|
onResourceChangedPriority(event) {
|
|
177
181
|
const data = event.params;
|
|
178
|
-
const request = this._findRealRequestAndSetSession(
|
|
182
|
+
const request = this._findRealRequestAndSetSession(
|
|
183
|
+
data.requestId, event.targetType, event.sessionId);
|
|
179
184
|
if (!request) return;
|
|
180
185
|
request.onResourceChangedPriority(data);
|
|
181
186
|
}
|
|
@@ -204,24 +209,11 @@ class NetworkRecorder extends RequestEventEmitter {
|
|
|
204
209
|
* message is referring.
|
|
205
210
|
*
|
|
206
211
|
* @param {string} requestId
|
|
212
|
+
* @param {LH.Protocol.TargetType} targetType
|
|
207
213
|
* @param {string|undefined} sessionId
|
|
208
214
|
* @return {NetworkRequest|undefined}
|
|
209
215
|
*/
|
|
210
|
-
_findRealRequestAndSetSession(requestId, sessionId) {
|
|
211
|
-
// The very first sessionId processed is always the main sessionId. In all but DevTools,
|
|
212
|
-
// this sessionId is undefined. However, in DevTools the main Lighthouse protocol connection
|
|
213
|
-
// does send events with sessionId set to a string, because of how DevTools routes the protocol
|
|
214
|
-
// to Lighthouse.
|
|
215
|
-
// Many places in Lighthouse use `record.sessionId === undefined` to mean that the session is not
|
|
216
|
-
// an OOPIF. To maintain this property, we intercept sessionId here and set it to undefined if
|
|
217
|
-
// it matches the first value seen.
|
|
218
|
-
if (this._mainSessionId === null) {
|
|
219
|
-
this._mainSessionId = sessionId;
|
|
220
|
-
}
|
|
221
|
-
if (this._mainSessionId === sessionId) {
|
|
222
|
-
sessionId = undefined;
|
|
223
|
-
}
|
|
224
|
-
|
|
216
|
+
_findRealRequestAndSetSession(requestId, targetType, sessionId) {
|
|
225
217
|
let request = this._recordsById.get(requestId);
|
|
226
218
|
if (!request || !request.isValid) return undefined;
|
|
227
219
|
|
|
@@ -230,6 +222,7 @@ class NetworkRecorder extends RequestEventEmitter {
|
|
|
230
222
|
}
|
|
231
223
|
|
|
232
224
|
request.setSession(sessionId);
|
|
225
|
+
request.sessionTargetType = targetType;
|
|
233
226
|
|
|
234
227
|
return request;
|
|
235
228
|
}
|
|
@@ -133,12 +133,10 @@ export class NetworkRequest {
|
|
|
133
133
|
fetchedViaServiceWorker: boolean;
|
|
134
134
|
/** @type {string|undefined} */
|
|
135
135
|
frameId: string | undefined;
|
|
136
|
-
/**
|
|
137
|
-
* @type {string|undefined}
|
|
138
|
-
* Only set for child targets (OOPIFs). This is the sessionId of the protocol connection on
|
|
139
|
-
* which this request was discovered. `undefined` means it came from the root.
|
|
140
|
-
*/
|
|
136
|
+
/** @type {string|undefined} */
|
|
141
137
|
sessionId: string | undefined;
|
|
138
|
+
/** @type {LH.Protocol.TargetType|undefined} */
|
|
139
|
+
sessionTargetType: LH.Protocol.TargetType | undefined;
|
|
142
140
|
isLinkPreload: boolean;
|
|
143
141
|
/**
|
|
144
142
|
* @return {boolean}
|
|
@@ -178,9 +176,10 @@ export class NetworkRequest {
|
|
|
178
176
|
*/
|
|
179
177
|
onRedirectResponse(data: LH.Crdp.Network.RequestWillBeSentEvent): void;
|
|
180
178
|
/**
|
|
181
|
-
* @param {string
|
|
179
|
+
* @param {string|undefined} sessionId
|
|
182
180
|
*/
|
|
183
|
-
setSession(sessionId
|
|
181
|
+
setSession(sessionId: string | undefined): void;
|
|
182
|
+
get isOutOfProcessIframe(): boolean;
|
|
184
183
|
/**
|
|
185
184
|
* @param {LH.Crdp.Network.Response} response
|
|
186
185
|
* @param {number} timestamp in seconds
|
|
@@ -235,7 +234,7 @@ export namespace NetworkRequest {
|
|
|
235
234
|
export { HEADER_FETCHED_SIZE };
|
|
236
235
|
export { HEADER_PROTOCOL_IS_H2 };
|
|
237
236
|
}
|
|
238
|
-
import * as LH from
|
|
237
|
+
import * as LH from '../../types/lh.js';
|
|
239
238
|
declare const HEADER_TCP: "X-TCPMs";
|
|
240
239
|
declare const HEADER_SSL: "X-SSLMs";
|
|
241
240
|
declare const HEADER_REQ: "X-RequestMs";
|
|
@@ -178,12 +178,10 @@ class NetworkRequest {
|
|
|
178
178
|
this.fetchedViaServiceWorker = false;
|
|
179
179
|
/** @type {string|undefined} */
|
|
180
180
|
this.frameId = '';
|
|
181
|
-
/**
|
|
182
|
-
* @type {string|undefined}
|
|
183
|
-
* Only set for child targets (OOPIFs). This is the sessionId of the protocol connection on
|
|
184
|
-
* which this request was discovered. `undefined` means it came from the root.
|
|
185
|
-
*/
|
|
181
|
+
/** @type {string|undefined} */
|
|
186
182
|
this.sessionId = undefined;
|
|
183
|
+
/** @type {LH.Protocol.TargetType|undefined} */
|
|
184
|
+
this.sessionTargetType = undefined;
|
|
187
185
|
this.isLinkPreload = false;
|
|
188
186
|
}
|
|
189
187
|
|
|
@@ -320,12 +318,16 @@ class NetworkRequest {
|
|
|
320
318
|
}
|
|
321
319
|
|
|
322
320
|
/**
|
|
323
|
-
* @param {string
|
|
321
|
+
* @param {string|undefined} sessionId
|
|
324
322
|
*/
|
|
325
323
|
setSession(sessionId) {
|
|
326
324
|
this.sessionId = sessionId;
|
|
327
325
|
}
|
|
328
326
|
|
|
327
|
+
get isOutOfProcessIframe() {
|
|
328
|
+
return this.sessionTargetType === 'iframe';
|
|
329
|
+
}
|
|
330
|
+
|
|
329
331
|
/**
|
|
330
332
|
* @param {LH.Crdp.Network.Response} response
|
|
331
333
|
* @param {number} timestamp in seconds
|
package/core/lib/stack-packs.js
CHANGED
|
@@ -15,6 +15,10 @@ import * as i18n from './i18n/i18n.js';
|
|
|
15
15
|
* @type {Array<{packId: string, requiredStacks: Array<string>}>}
|
|
16
16
|
*/
|
|
17
17
|
const stackPacksToInclude = [
|
|
18
|
+
{
|
|
19
|
+
packId: 'gatsby',
|
|
20
|
+
requiredStacks: ['js:gatsby'],
|
|
21
|
+
},
|
|
18
22
|
{
|
|
19
23
|
packId: 'wordpress',
|
|
20
24
|
requiredStacks: ['js:wordpress'],
|
|
@@ -117,7 +121,11 @@ function getStackPacks(pageStacks) {
|
|
|
117
121
|
});
|
|
118
122
|
}
|
|
119
123
|
|
|
120
|
-
return packs
|
|
124
|
+
return packs.sort((a, b) => {
|
|
125
|
+
const aVal = stackPacksToInclude.findIndex(p => p.packId === a.id);
|
|
126
|
+
const bVal = stackPacksToInclude.findIndex(p => p.packId === b.id);
|
|
127
|
+
return aVal - bVal;
|
|
128
|
+
});
|
|
121
129
|
}
|
|
122
130
|
|
|
123
131
|
export {
|
|
@@ -158,5 +158,5 @@ export class MainThreadTasks {
|
|
|
158
158
|
taskLabelFn?: ((node: TaskNode) => string) | undefined;
|
|
159
159
|
}): string;
|
|
160
160
|
}
|
|
161
|
-
import * as LH from
|
|
161
|
+
import * as LH from '../../../types/lh.js';
|
|
162
162
|
//# sourceMappingURL=main-thread-tasks.d.ts.map
|
|
@@ -14,5 +14,5 @@ export function getAttributableURLForTask(task: LH.Artifacts.TaskNode, jsURLs: S
|
|
|
14
14
|
* @return {Map<string, Record<string, number>>}
|
|
15
15
|
*/
|
|
16
16
|
export function getExecutionTimingsByURL(tasks: LH.Artifacts.TaskNode[], networkRecords: Array<LH.Artifacts.NetworkRequest>): Map<string, Record<string, number>>;
|
|
17
|
-
import { NetworkRequest } from
|
|
17
|
+
import { NetworkRequest } from '../network-request.js';
|
|
18
18
|
//# sourceMappingURL=task-summary.d.ts.map
|
package/core/lib/url-utils.js
CHANGED
|
@@ -22,6 +22,7 @@ const NON_NETWORK_SCHEMES = [
|
|
|
22
22
|
'intent', // @see https://developer.chrome.com/docs/multidevice/android/intents/
|
|
23
23
|
'file', // @see https://en.wikipedia.org/wiki/File_URI_scheme
|
|
24
24
|
'filesystem', // @see https://developer.mozilla.org/en-US/docs/Web/API/FileSystem
|
|
25
|
+
'chrome-extension',
|
|
25
26
|
];
|
|
26
27
|
|
|
27
28
|
/**
|
package/core/runner.d.ts
CHANGED
|
@@ -109,6 +109,6 @@ export class Runner {
|
|
|
109
109
|
*/
|
|
110
110
|
static _getDataSavePath(settings: LH.Config.Settings): string;
|
|
111
111
|
}
|
|
112
|
-
import { Driver } from
|
|
113
|
-
import { Audit } from
|
|
112
|
+
import { Driver } from './legacy/gather/driver.js';
|
|
113
|
+
import { Audit } from './audits/audit.js';
|
|
114
114
|
//# sourceMappingURL=runner.d.ts.map
|
package/core/runner.js
CHANGED
|
@@ -88,6 +88,13 @@ class Runner {
|
|
|
88
88
|
log.timeEnd(resultsStatus);
|
|
89
89
|
log.timeEnd(runnerStatus);
|
|
90
90
|
|
|
91
|
+
/** @type {LH.Artifacts['FullPageScreenshot']|undefined} */
|
|
92
|
+
let fullPageScreenshot = artifacts.FullPageScreenshot;
|
|
93
|
+
if (resolvedConfig.settings.disableFullPageScreenshot ||
|
|
94
|
+
fullPageScreenshot instanceof Error) {
|
|
95
|
+
fullPageScreenshot = undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
91
98
|
/** @type {LH.RawIcu<LH.Result>} */
|
|
92
99
|
const i18nLhr = {
|
|
93
100
|
lighthouseVersion,
|
|
@@ -113,8 +120,7 @@ class Runner {
|
|
|
113
120
|
categoryGroups: resolvedConfig.groups || undefined,
|
|
114
121
|
stackPacks: stackPacks.getStackPacks(artifacts.Stacks),
|
|
115
122
|
entities: await Runner.getEntityClassification(artifacts, {computedCache}),
|
|
116
|
-
fullPageScreenshot
|
|
117
|
-
undefined : artifacts.FullPageScreenshot,
|
|
123
|
+
fullPageScreenshot,
|
|
118
124
|
timing: this._getTiming(artifacts),
|
|
119
125
|
i18n: {
|
|
120
126
|
rendererFormattedStrings: format.getRendererFormattedStrings(settings.locale),
|
package/core/scoring.d.ts
CHANGED
package/core/user-flow.d.ts
CHANGED