lighthouse 10.4.0 → 11.0.0-dev.20230804
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/CONTRIBUTING.md +1 -1
- package/cli/cli-flags.d.ts +1 -6
- package/cli/cli-flags.js +0 -5
- package/cli/run.js +3 -10
- package/cli/sentry-prompt.js +4 -2
- package/cli/test/smokehouse/core-tests.js +0 -2
- package/cli/test/smokehouse/frontends/smokehouse-bin.js +24 -14
- package/cli/test/smokehouse/lighthouse-runners/bundle.d.ts +1 -2
- package/cli/test/smokehouse/lighthouse-runners/bundle.js +12 -21
- package/cli/test/smokehouse/lighthouse-runners/cli.d.ts +1 -3
- package/cli/test/smokehouse/lighthouse-runners/cli.js +3 -7
- package/cli/test/smokehouse/lighthouse-runners/devtools.d.ts +1 -5
- package/cli/test/smokehouse/lighthouse-runners/devtools.js +1 -12
- package/cli/test/smokehouse/readme.md +0 -2
- package/cli/test/smokehouse/report-assert.d.ts +1 -3
- package/cli/test/smokehouse/report-assert.js +2 -19
- package/cli/test/smokehouse/smokehouse.js +3 -32
- package/core/audits/accessibility/aria-allowed-role.d.ts +10 -0
- package/core/audits/accessibility/aria-allowed-role.js +46 -0
- package/core/audits/accessibility/image-redundant-alt.d.ts +10 -0
- package/core/audits/accessibility/image-redundant-alt.js +45 -0
- package/core/audits/accessibility/label-content-name-mismatch.d.ts +10 -0
- package/core/audits/accessibility/label-content-name-mismatch.js +44 -0
- package/core/audits/accessibility/skip-link.d.ts +10 -0
- package/core/audits/accessibility/skip-link.js +43 -0
- package/core/audits/accessibility/table-duplicate-name.d.ts +10 -0
- package/core/audits/accessibility/table-duplicate-name.js +44 -0
- package/core/audits/accessibility/target-size.js +1 -1
- package/core/audits/byte-efficiency/duplicated-javascript.js +2 -2
- package/core/audits/byte-efficiency/render-blocking-resources.js +1 -0
- package/core/audits/dobetterweb/uses-http2.d.ts +18 -1
- package/core/audits/dobetterweb/uses-http2.js +62 -16
- package/core/audits/installable-manifest.d.ts +1 -5
- package/core/audits/installable-manifest.js +2 -7
- package/core/audits/largest-contentful-paint-element.d.ts +0 -6
- package/core/audits/largest-contentful-paint-element.js +13 -15
- package/core/audits/metrics/{experimental-interaction-to-next-paint.d.ts → interaction-to-next-paint.d.ts} +3 -3
- package/core/audits/metrics/{experimental-interaction-to-next-paint.js → interaction-to-next-paint.js} +3 -3
- package/core/audits/uses-rel-preconnect.js +23 -8
- package/core/audits/work-during-interaction.js +2 -2
- package/core/computed/processed-navigation.d.ts +1 -1
- package/core/config/config-helpers.d.ts +3 -3
- package/core/config/config-helpers.js +5 -12
- package/core/config/config.js +1 -7
- package/core/config/constants.d.ts +0 -2
- package/core/config/constants.js +2 -18
- package/core/config/default-config.js +59 -53
- package/core/config/filters.js +1 -1
- package/core/config/validation.d.ts +7 -12
- package/core/config/validation.js +16 -26
- package/core/gather/base-artifacts.d.ts +4 -4
- package/core/gather/base-artifacts.js +2 -6
- package/core/gather/base-gatherer.d.ts +12 -37
- package/core/gather/base-gatherer.js +7 -54
- package/core/gather/driver/dom.d.ts +4 -4
- package/core/gather/driver/dom.js +2 -2
- package/core/gather/driver/environment.d.ts +4 -4
- package/core/gather/driver/environment.js +2 -2
- package/core/gather/driver/execution-context.d.ts +12 -3
- package/core/gather/driver/execution-context.js +34 -3
- package/core/gather/driver/navigation.d.ts +2 -2
- package/core/gather/driver/navigation.js +2 -5
- package/core/gather/driver/network-monitor.d.ts +7 -6
- package/core/gather/driver/network-monitor.js +4 -4
- package/core/gather/driver/network.d.ts +2 -2
- package/core/gather/driver/network.js +1 -1
- package/core/gather/driver/prepare.d.ts +10 -10
- package/core/gather/driver/prepare.js +10 -10
- package/core/gather/driver/service-workers.d.ts +4 -4
- package/core/gather/driver/service-workers.js +2 -2
- package/core/gather/driver/storage.d.ts +6 -6
- package/core/gather/driver/storage.js +3 -3
- package/core/gather/driver/target-manager.d.ts +6 -5
- package/core/gather/driver/target-manager.js +3 -3
- package/core/gather/driver/wait-for-condition.d.ts +14 -14
- package/core/gather/driver/wait-for-condition.js +8 -8
- package/core/gather/driver.d.ts +9 -6
- package/core/gather/driver.js +14 -4
- package/core/gather/fetcher.d.ts +3 -3
- package/core/gather/fetcher.js +1 -1
- package/core/gather/gatherers/accessibility.d.ts +4 -4
- package/core/gather/gatherers/accessibility.js +8 -3
- package/core/gather/gatherers/anchor-elements.d.ts +4 -4
- package/core/gather/gatherers/anchor-elements.js +4 -4
- package/core/gather/gatherers/bf-cache-failures.d.ts +8 -14
- package/core/gather/gatherers/bf-cache-failures.js +5 -14
- package/core/gather/gatherers/cache-contents.d.ts +4 -4
- package/core/gather/gatherers/cache-contents.js +3 -3
- package/core/gather/gatherers/console-messages.d.ts +6 -6
- package/core/gather/gatherers/console-messages.js +4 -4
- package/core/gather/gatherers/css-usage.d.ts +14 -14
- package/core/gather/gatherers/css-usage.js +9 -9
- package/core/gather/gatherers/devtools-log-compat.d.ts +5 -5
- package/core/gather/gatherers/devtools-log-compat.js +4 -4
- package/core/gather/gatherers/devtools-log.d.ts +6 -6
- package/core/gather/gatherers/devtools-log.js +4 -4
- package/core/gather/gatherers/dobetterweb/doctype.d.ts +4 -4
- package/core/gather/gatherers/dobetterweb/doctype.js +3 -3
- package/core/gather/gatherers/dobetterweb/domstats.d.ts +4 -4
- package/core/gather/gatherers/dobetterweb/domstats.js +3 -3
- package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +10 -22
- package/core/gather/gatherers/dobetterweb/optimized-images.js +10 -27
- package/core/gather/gatherers/dobetterweb/response-compression.d.ts +6 -12
- package/core/gather/gatherers/dobetterweb/response-compression.js +14 -21
- package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.d.ts +8 -14
- package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +5 -14
- package/core/gather/gatherers/full-page-screenshot.d.ts +10 -10
- package/core/gather/gatherers/full-page-screenshot.js +7 -10
- package/core/gather/gatherers/global-listeners.d.ts +4 -4
- package/core/gather/gatherers/global-listeners.js +3 -3
- package/core/gather/gatherers/iframe-elements.d.ts +4 -4
- package/core/gather/gatherers/iframe-elements.js +3 -3
- package/core/gather/gatherers/image-elements.d.ts +10 -10
- package/core/gather/gatherers/image-elements.js +6 -6
- package/core/gather/gatherers/inputs.d.ts +4 -4
- package/core/gather/gatherers/inputs.js +3 -3
- package/core/gather/gatherers/inspector-issues.d.ts +8 -19
- package/core/gather/gatherers/inspector-issues.js +9 -26
- package/core/gather/gatherers/installability-errors.d.ts +6 -6
- package/core/gather/gatherers/installability-errors.js +4 -4
- package/core/gather/gatherers/js-usage.d.ts +6 -6
- package/core/gather/gatherers/js-usage.js +4 -4
- package/core/gather/gatherers/link-elements.d.ts +8 -20
- package/core/gather/gatherers/link-elements.js +7 -24
- package/core/gather/gatherers/main-document-content.d.ts +4 -16
- package/core/gather/gatherers/main-document-content.js +5 -23
- package/core/gather/gatherers/meta-elements.d.ts +4 -4
- package/core/gather/gatherers/meta-elements.js +3 -3
- package/core/gather/gatherers/network-user-agent.d.ts +5 -5
- package/core/gather/gatherers/network-user-agent.js +4 -4
- package/core/gather/gatherers/script-elements.d.ts +6 -11
- package/core/gather/gatherers/script-elements.js +4 -13
- package/core/gather/gatherers/scripts.d.ts +7 -6
- package/core/gather/gatherers/scripts.js +7 -9
- package/core/gather/gatherers/seo/embedded-content.d.ts +4 -4
- package/core/gather/gatherers/seo/embedded-content.js +3 -3
- package/core/gather/gatherers/seo/font-size.d.ts +6 -6
- package/core/gather/gatherers/seo/font-size.js +5 -5
- package/core/gather/gatherers/seo/robots-txt.d.ts +4 -4
- package/core/gather/gatherers/seo/robots-txt.js +3 -3
- package/core/gather/gatherers/seo/tap-targets.d.ts +8 -8
- package/core/gather/gatherers/seo/tap-targets.js +5 -5
- package/core/gather/gatherers/service-worker.d.ts +4 -10
- package/core/gather/gatherers/service-worker.js +3 -15
- package/core/gather/gatherers/source-maps.d.ts +11 -23
- package/core/gather/gatherers/source-maps.js +22 -53
- package/core/gather/gatherers/stacks.d.ts +7 -7
- package/core/gather/gatherers/stacks.js +6 -6
- package/core/gather/gatherers/trace-compat.d.ts +5 -5
- package/core/gather/gatherers/trace-compat.js +4 -4
- package/core/gather/gatherers/trace-elements.d.ts +13 -25
- package/core/gather/gatherers/trace-elements.js +19 -32
- package/core/gather/gatherers/trace.d.ts +8 -8
- package/core/gather/gatherers/trace.js +5 -5
- package/core/gather/gatherers/viewport-dimensions.d.ts +4 -4
- package/core/gather/gatherers/viewport-dimensions.js +3 -3
- package/core/gather/gatherers/web-app-manifest.d.ts +8 -8
- package/core/gather/gatherers/web-app-manifest.js +5 -5
- package/core/gather/navigation-runner.d.ts +9 -9
- package/core/gather/navigation-runner.js +14 -8
- package/core/gather/runner-helpers.d.ts +3 -3
- package/core/gather/runner-helpers.js +12 -4
- package/core/gather/session.d.ts +2 -2
- package/core/gather/session.js +1 -1
- package/core/gather/snapshot-runner.d.ts +2 -2
- package/core/gather/snapshot-runner.js +1 -1
- package/core/gather/timespan-runner.d.ts +2 -2
- package/core/gather/timespan-runner.js +1 -1
- package/core/index.cjs +0 -7
- package/core/index.d.ts +0 -15
- package/core/index.js +2 -40
- package/core/lib/asset-saver.js +14 -4
- package/core/lib/axe.js +1 -1
- package/core/lib/dependency-graph/simulator/network-analyzer.d.ts +28 -12
- package/core/lib/dependency-graph/simulator/network-analyzer.js +128 -100
- package/core/lib/emulation.d.ts +14 -14
- package/core/lib/emulation.js +7 -7
- package/core/lib/navigation-error.js +5 -0
- package/core/lib/network-recorder.d.ts +2 -1
- package/core/lib/network-recorder.js +1 -0
- package/core/lib/network-request.js +12 -3
- package/core/lib/page-functions.d.ts +10 -2
- package/core/lib/page-functions.js +85 -8
- package/core/lib/sentry.js +9 -2
- package/core/lib/stack-packs.js +4 -0
- package/core/runner.d.ts +8 -30
- package/core/runner.js +8 -39
- package/core/user-flow.d.ts +4 -4
- package/core/user-flow.js +2 -2
- package/dist/report/bundle.esm.js +2221 -5832
- package/dist/report/flow.js +2631 -235
- package/dist/report/standalone.js +2586 -234
- package/flow-report/src/i18n/i18n.d.ts +2 -2
- package/package.json +19 -25
- package/readme.md +3 -1
- package/report/assets/templates.html +3 -1
- package/report/renderer/category-renderer.d.ts +3 -2
- package/report/renderer/category-renderer.js +8 -4
- package/report/renderer/components.js +11 -5
- package/report/renderer/pwa-category-renderer.js +1 -1
- package/report/renderer/report-ui-features.js +9 -6
- package/report/renderer/report-utils.d.ts +1 -1
- package/report/renderer/report-utils.js +2 -2
- package/report/renderer/topbar-features.js +3 -0
- package/shared/localization/locales/ar-XB.json +185 -44
- package/shared/localization/locales/ar.json +185 -44
- package/shared/localization/locales/bg.json +185 -44
- package/shared/localization/locales/ca.json +190 -49
- package/shared/localization/locales/cs.json +185 -44
- package/shared/localization/locales/da.json +185 -44
- package/shared/localization/locales/de.json +185 -44
- package/shared/localization/locales/el.json +185 -44
- package/shared/localization/locales/en-GB.json +185 -44
- package/shared/localization/locales/en-US.json +99 -45
- package/shared/localization/locales/en-XA.json +185 -44
- package/shared/localization/locales/en-XL.json +99 -45
- package/shared/localization/locales/es-419.json +185 -44
- package/shared/localization/locales/es.json +185 -44
- package/shared/localization/locales/fi.json +185 -44
- package/shared/localization/locales/fil.json +185 -44
- package/shared/localization/locales/fr.json +185 -44
- package/shared/localization/locales/he.json +186 -45
- package/shared/localization/locales/hi.json +185 -44
- package/shared/localization/locales/hr.json +185 -44
- package/shared/localization/locales/hu.json +185 -44
- package/shared/localization/locales/id.json +185 -44
- package/shared/localization/locales/it.json +185 -44
- package/shared/localization/locales/ja.json +185 -44
- package/shared/localization/locales/ko.json +185 -44
- package/shared/localization/locales/lt.json +185 -44
- package/shared/localization/locales/lv.json +185 -44
- package/shared/localization/locales/nl.json +185 -44
- package/shared/localization/locales/no.json +185 -44
- package/shared/localization/locales/pl.json +185 -44
- package/shared/localization/locales/pt-PT.json +185 -44
- package/shared/localization/locales/pt.json +190 -49
- package/shared/localization/locales/ro.json +185 -44
- package/shared/localization/locales/ru.json +185 -44
- package/shared/localization/locales/sk.json +185 -44
- package/shared/localization/locales/sl.json +185 -44
- package/shared/localization/locales/sr-Latn.json +185 -44
- package/shared/localization/locales/sr.json +185 -44
- package/shared/localization/locales/sv.json +185 -44
- package/shared/localization/locales/ta.json +185 -44
- package/shared/localization/locales/te.json +185 -44
- package/shared/localization/locales/th.json +185 -44
- package/shared/localization/locales/tr.json +185 -44
- package/shared/localization/locales/uk.json +185 -44
- package/shared/localization/locales/vi.json +185 -44
- package/shared/localization/locales/zh-HK.json +185 -44
- package/shared/localization/locales/zh-TW.json +185 -44
- package/shared/localization/locales/zh.json +185 -44
- package/third-party/esbuild-plugins-polyfills/LICENSE +3 -0
- package/third-party/esbuild-plugins-polyfills/README.md +7 -0
- package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.d.ts +9 -0
- package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.js +129 -0
- package/tsconfig.json +2 -1
- package/types/artifacts.d.ts +16 -45
- package/types/config.d.ts +10 -52
- package/types/externs.d.ts +0 -2
- package/types/gatherer.d.ts +24 -47
- package/types/internal/rxjs.d.ts +26 -0
- package/types/internal/smokehouse.d.ts +1 -3
- package/types/lh.d.ts +0 -2
- package/types/lhr/settings.d.ts +1 -1
- package/core/audits/metrics/first-contentful-paint-3g.d.ts +0 -15
- package/core/audits/metrics/first-contentful-paint-3g.js +0 -69
- package/core/audits/resource-summary.d.ts +0 -16
- package/core/audits/resource-summary.js +0 -104
- package/core/audits/service-worker.d.ts +0 -46
- package/core/audits/service-worker.js +0 -182
- package/core/gather/gatherers/gatherer.d.ts +0 -46
- package/core/gather/gatherers/gatherer.js +0 -58
- package/core/legacy/config/config.d.ts +0 -107
- package/core/legacy/config/config.js +0 -566
- package/core/legacy/config/legacy-default-config.d.ts +0 -4
- package/core/legacy/config/legacy-default-config.js +0 -87
- package/core/legacy/gather/connections/connection.d.ts +0 -77
- package/core/legacy/gather/connections/connection.js +0 -196
- package/core/legacy/gather/connections/cri.d.ts +0 -27
- package/core/legacy/gather/connections/cri.js +0 -162
- package/core/legacy/gather/connections/raw.d.ts +0 -20
- package/core/legacy/gather/connections/raw.js +0 -57
- package/core/legacy/gather/driver.d.ts +0 -216
- package/core/legacy/gather/driver.js +0 -480
- package/core/legacy/gather/gather-runner.d.ts +0 -166
- package/core/legacy/gather/gather-runner.js +0 -590
- package/types/internal/lighthouse-logger.d.ts +0 -34
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
export type Driver = import('./driver.js').Driver;
|
|
2
|
-
export type ArbitraryEqualityMap = import('../../lib/arbitrary-equality-map.js').ArbitraryEqualityMap;
|
|
3
|
-
/**
|
|
4
|
-
* Each entry in each gatherer result array is the output of a gatherer phase:
|
|
5
|
-
* `beforePass`, `pass`, and `afterPass`. Flattened into an `LH.Artifacts` in
|
|
6
|
-
* `collectArtifacts`.
|
|
7
|
-
*/
|
|
8
|
-
export type GathererResults = Record<keyof LH.GathererArtifacts, Array<LH.Gatherer.PhaseResult>>;
|
|
9
|
-
export type GathererResultsEntries = Array<[keyof GathererResults, GathererResults[keyof GathererResults]]>;
|
|
10
|
-
/** @typedef {import('./driver.js').Driver} Driver */
|
|
11
|
-
/** @typedef {import('../../lib/arbitrary-equality-map.js').ArbitraryEqualityMap} ArbitraryEqualityMap */
|
|
12
|
-
/**
|
|
13
|
-
* Each entry in each gatherer result array is the output of a gatherer phase:
|
|
14
|
-
* `beforePass`, `pass`, and `afterPass`. Flattened into an `LH.Artifacts` in
|
|
15
|
-
* `collectArtifacts`.
|
|
16
|
-
* @typedef {Record<keyof LH.GathererArtifacts, Array<LH.Gatherer.PhaseResult>>} GathererResults
|
|
17
|
-
*/
|
|
18
|
-
/** @typedef {Array<[keyof GathererResults, GathererResults[keyof GathererResults]]>} GathererResultsEntries */
|
|
19
|
-
/**
|
|
20
|
-
* Class that drives browser to load the page and runs gatherer lifecycle hooks.
|
|
21
|
-
*/
|
|
22
|
-
export class GatherRunner {
|
|
23
|
-
/**
|
|
24
|
-
* Loads about:blank and waits there briefly. Since a Page.reload command does
|
|
25
|
-
* not let a service worker take over, we navigate away and then come back to
|
|
26
|
-
* reload. We do not `waitForLoad` on about:blank since a page load event is
|
|
27
|
-
* never fired on it.
|
|
28
|
-
* @param {Driver} driver
|
|
29
|
-
* @param {string=} url
|
|
30
|
-
* @return {Promise<void>}
|
|
31
|
-
*/
|
|
32
|
-
static loadBlank(driver: Driver, url?: string | undefined): Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
* Loads options.url with specified options. If the main document URL
|
|
35
|
-
* redirects, options.url will be updated accordingly. As such, options.url
|
|
36
|
-
* will always represent the post-redirected URL. options.requestedUrl is the
|
|
37
|
-
* pre-redirect starting URL. If the navigation errors with "expected" errors such as
|
|
38
|
-
* NO_FCP, a `navigationError` is returned.
|
|
39
|
-
* @param {Driver} driver
|
|
40
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
41
|
-
* @return {Promise<{navigationError?: LH.LighthouseError}>}
|
|
42
|
-
*/
|
|
43
|
-
static loadPage(driver: Driver, passContext: LH.Gatherer.PassContext): Promise<{
|
|
44
|
-
navigationError?: LH.LighthouseError;
|
|
45
|
-
}>;
|
|
46
|
-
/**
|
|
47
|
-
* Rejects if any open tabs would share a service worker with the target URL.
|
|
48
|
-
* This includes the target tab, so navigation to something like about:blank
|
|
49
|
-
* should be done before calling.
|
|
50
|
-
* @param {LH.Gatherer.FRProtocolSession} session
|
|
51
|
-
* @param {string} pageUrl
|
|
52
|
-
* @return {Promise<void>}
|
|
53
|
-
*/
|
|
54
|
-
static assertNoSameOriginServiceWorkerClients(session: LH.Gatherer.FRProtocolSession, pageUrl: string): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* @param {Driver} driver
|
|
57
|
-
* @param {{requestedUrl: string, settings: LH.Config.Settings}} options
|
|
58
|
-
* @return {Promise<void>}
|
|
59
|
-
*/
|
|
60
|
-
static setupDriver(driver: Driver, options: {
|
|
61
|
-
requestedUrl: string;
|
|
62
|
-
settings: LH.Config.Settings;
|
|
63
|
-
}): Promise<void>;
|
|
64
|
-
/**
|
|
65
|
-
* Reset browser state where needed and release the connection.
|
|
66
|
-
* @param {Driver} driver
|
|
67
|
-
* @param {{requestedUrl: string, settings: LH.Config.Settings}} options
|
|
68
|
-
* @return {Promise<void>}
|
|
69
|
-
*/
|
|
70
|
-
static disposeDriver(driver: Driver, options: {
|
|
71
|
-
requestedUrl: string;
|
|
72
|
-
settings: LH.Config.Settings;
|
|
73
|
-
}): Promise<void>;
|
|
74
|
-
/**
|
|
75
|
-
* Beging recording devtoolsLog and trace (if requested).
|
|
76
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
77
|
-
* @return {Promise<void>}
|
|
78
|
-
*/
|
|
79
|
-
static beginRecording(passContext: LH.Gatherer.PassContext): Promise<void>;
|
|
80
|
-
/**
|
|
81
|
-
* End recording devtoolsLog and trace (if requested), returning an
|
|
82
|
-
* `LH.Gatherer.LoadData` with the recorded data.
|
|
83
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
84
|
-
* @return {Promise<LH.Gatherer.LoadData>}
|
|
85
|
-
*/
|
|
86
|
-
static endRecording(passContext: LH.Gatherer.PassContext): Promise<LH.Gatherer.LoadData>;
|
|
87
|
-
/**
|
|
88
|
-
* Run beforePass() on gatherers.
|
|
89
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
90
|
-
* @param {Partial<GathererResults>} gathererResults
|
|
91
|
-
* @return {Promise<void>}
|
|
92
|
-
*/
|
|
93
|
-
static beforePass(passContext: LH.Gatherer.PassContext, gathererResults: Partial<GathererResults>): Promise<void>;
|
|
94
|
-
/**
|
|
95
|
-
* Run pass() on gatherers.
|
|
96
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
97
|
-
* @param {Partial<GathererResults>} gathererResults
|
|
98
|
-
* @return {Promise<void>}
|
|
99
|
-
*/
|
|
100
|
-
static pass(passContext: LH.Gatherer.PassContext, gathererResults: Partial<GathererResults>): Promise<void>;
|
|
101
|
-
/**
|
|
102
|
-
* Run afterPass() on gatherers.
|
|
103
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
104
|
-
* @param {LH.Gatherer.LoadData} loadData
|
|
105
|
-
* @param {Partial<GathererResults>} gathererResults
|
|
106
|
-
* @return {Promise<void>}
|
|
107
|
-
*/
|
|
108
|
-
static afterPass(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData, gathererResults: Partial<GathererResults>): Promise<void>;
|
|
109
|
-
/**
|
|
110
|
-
* Takes the results of each gatherer phase for each gatherer and uses the
|
|
111
|
-
* last produced value (that's not undefined) as the artifact for that
|
|
112
|
-
* gatherer. If an error was rejected from a gatherer phase,
|
|
113
|
-
* uses that error object as the artifact instead.
|
|
114
|
-
* @param {Partial<GathererResults>} gathererResults
|
|
115
|
-
* @return {Promise<{artifacts: Partial<LH.GathererArtifacts>}>}
|
|
116
|
-
*/
|
|
117
|
-
static collectArtifacts(gathererResults: Partial<GathererResults>): Promise<{
|
|
118
|
-
artifacts: Partial<LH.GathererArtifacts>;
|
|
119
|
-
}>;
|
|
120
|
-
/**
|
|
121
|
-
* Return an initialized but mostly empty set of base artifacts, to be
|
|
122
|
-
* populated as the run continues.
|
|
123
|
-
* @param {{driver: Driver, requestedUrl: string, settings: LH.Config.Settings}} options
|
|
124
|
-
* @return {Promise<LH.BaseArtifacts>}
|
|
125
|
-
*/
|
|
126
|
-
static initializeBaseArtifacts(options: {
|
|
127
|
-
driver: Driver;
|
|
128
|
-
requestedUrl: string;
|
|
129
|
-
settings: LH.Config.Settings;
|
|
130
|
-
}): Promise<LH.BaseArtifacts>;
|
|
131
|
-
/**
|
|
132
|
-
* Populates the important base artifacts from a fully loaded test page.
|
|
133
|
-
* Currently must be run before `start-url` gatherer so that `WebAppManifest`
|
|
134
|
-
* will be available to it.
|
|
135
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
136
|
-
*/
|
|
137
|
-
static populateBaseArtifacts(passContext: LH.Gatherer.PassContext): Promise<void>;
|
|
138
|
-
/**
|
|
139
|
-
* @param {Array<LH.Config.Pass>} passConfigs
|
|
140
|
-
* @param {{driver: Driver, requestedUrl: string, settings: LH.Config.Settings, computedCache: Map<string, ArbitraryEqualityMap>}} options
|
|
141
|
-
* @return {Promise<LH.Artifacts>}
|
|
142
|
-
*/
|
|
143
|
-
static run(passConfigs: Array<LH.Config.Pass>, options: {
|
|
144
|
-
driver: Driver;
|
|
145
|
-
requestedUrl: string;
|
|
146
|
-
settings: LH.Config.Settings;
|
|
147
|
-
computedCache: Map<string, ArbitraryEqualityMap>;
|
|
148
|
-
}): Promise<LH.Artifacts>;
|
|
149
|
-
/**
|
|
150
|
-
* Save the devtoolsLog and trace (if applicable) to baseArtifacts.
|
|
151
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
152
|
-
* @param {LH.Gatherer.LoadData} loadData
|
|
153
|
-
* @param {string} passName
|
|
154
|
-
*/
|
|
155
|
-
static _addLoadDataToBaseArtifacts(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData, passName: string): void;
|
|
156
|
-
/**
|
|
157
|
-
* Starting from about:blank, load the page and run gatherers for this pass.
|
|
158
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
159
|
-
* @return {Promise<{artifacts: Partial<LH.GathererArtifacts>, pageLoadError?: LH.LighthouseError}>}
|
|
160
|
-
*/
|
|
161
|
-
static runPass(passContext: LH.Gatherer.PassContext): Promise<{
|
|
162
|
-
artifacts: Partial<LH.GathererArtifacts>;
|
|
163
|
-
pageLoadError?: import("../../lib/lh-error.js").LighthouseError | undefined;
|
|
164
|
-
}>;
|
|
165
|
-
}
|
|
166
|
-
//# sourceMappingURL=gather-runner.d.ts.map
|