lighthouse 10.4.0 → 11.0.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/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 +17 -24
- 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
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* @param {LH.Gatherer.
|
|
7
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
8
8
|
* @return {Promise<LH.Crdp.ServiceWorker.WorkerVersionUpdatedEvent>}
|
|
9
9
|
*/
|
|
10
|
-
export function getServiceWorkerVersions(session: LH.Gatherer.
|
|
10
|
+
export function getServiceWorkerVersions(session: LH.Gatherer.ProtocolSession): Promise<LH.Crdp.ServiceWorker.WorkerVersionUpdatedEvent>;
|
|
11
11
|
/**
|
|
12
|
-
* @param {LH.Gatherer.
|
|
12
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
13
13
|
* @return {Promise<LH.Crdp.ServiceWorker.WorkerRegistrationUpdatedEvent>}
|
|
14
14
|
*/
|
|
15
|
-
export function getServiceWorkerRegistrations(session: LH.Gatherer.
|
|
15
|
+
export function getServiceWorkerRegistrations(session: LH.Gatherer.ProtocolSession): Promise<LH.Crdp.ServiceWorker.WorkerRegistrationUpdatedEvent>;
|
|
16
16
|
//# sourceMappingURL=service-workers.d.ts.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @param {LH.Gatherer.
|
|
8
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
9
9
|
* @return {Promise<LH.Crdp.ServiceWorker.WorkerVersionUpdatedEvent>}
|
|
10
10
|
*/
|
|
11
11
|
function getServiceWorkerVersions(session) {
|
|
@@ -37,7 +37,7 @@ function getServiceWorkerVersions(session) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* @param {LH.Gatherer.
|
|
40
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
41
41
|
* @return {Promise<LH.Crdp.ServiceWorker.WorkerRegistrationUpdatedEvent>}
|
|
42
42
|
*/
|
|
43
43
|
function getServiceWorkerRegistrations(session) {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param {LH.Gatherer.
|
|
2
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
3
3
|
* @param {string} url
|
|
4
4
|
* @return {Promise<LH.IcuMessage[]>}
|
|
5
5
|
*/
|
|
6
|
-
export function clearDataForOrigin(session: LH.Gatherer.
|
|
6
|
+
export function clearDataForOrigin(session: LH.Gatherer.ProtocolSession, url: string): Promise<LH.IcuMessage[]>;
|
|
7
7
|
/**
|
|
8
8
|
* Clear the network cache on disk and in memory.
|
|
9
|
-
* @param {LH.Gatherer.
|
|
9
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
10
10
|
* @return {Promise<LH.IcuMessage[]>}
|
|
11
11
|
*/
|
|
12
|
-
export function clearBrowserCaches(session: LH.Gatherer.
|
|
12
|
+
export function clearBrowserCaches(session: LH.Gatherer.ProtocolSession): Promise<LH.IcuMessage[]>;
|
|
13
13
|
/**
|
|
14
|
-
* @param {LH.Gatherer.
|
|
14
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
15
15
|
* @param {string} url
|
|
16
16
|
* @return {Promise<LH.IcuMessage | undefined>}
|
|
17
17
|
*/
|
|
18
|
-
export function getImportantStorageWarning(session: LH.Gatherer.
|
|
18
|
+
export function getImportantStorageWarning(session: LH.Gatherer.ProtocolSession, url: string): Promise<LH.IcuMessage | undefined>;
|
|
19
19
|
export namespace UIStrings {
|
|
20
20
|
const warningData: string;
|
|
21
21
|
const warningCacheTimeout: string;
|
|
@@ -34,7 +34,7 @@ const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* @param {LH.Gatherer.
|
|
37
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
38
38
|
* @param {string} url
|
|
39
39
|
* @return {Promise<LH.IcuMessage[]>}
|
|
40
40
|
*/
|
|
@@ -82,7 +82,7 @@ async function clearDataForOrigin(session, url) {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* @param {LH.Gatherer.
|
|
85
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
86
86
|
* @param {string} url
|
|
87
87
|
* @return {Promise<LH.IcuMessage | undefined>}
|
|
88
88
|
*/
|
|
@@ -112,7 +112,7 @@ async function getImportantStorageWarning(session, url) {
|
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* Clear the network cache on disk and in memory.
|
|
115
|
-
* @param {LH.Gatherer.
|
|
115
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
116
116
|
* @return {Promise<LH.IcuMessage[]>}
|
|
117
117
|
*/
|
|
118
118
|
async function clearBrowserCaches(session) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type TargetWithSession = {
|
|
2
2
|
target: LH.Crdp.Target.TargetInfo;
|
|
3
3
|
cdpSession: LH.Puppeteer.CDPSession;
|
|
4
|
-
session: LH.Gatherer.
|
|
4
|
+
session: LH.Gatherer.ProtocolSession;
|
|
5
5
|
protocolListener: (event: unknown) => void;
|
|
6
6
|
};
|
|
7
7
|
export type ProtocolEventMap = {
|
|
@@ -46,14 +46,14 @@ export class TargetManager extends TargetManager_base {
|
|
|
46
46
|
_onExecutionContextsCleared(): void;
|
|
47
47
|
/**
|
|
48
48
|
* @param {string} sessionId
|
|
49
|
-
* @return {LH.Gatherer.
|
|
49
|
+
* @return {LH.Gatherer.ProtocolSession}
|
|
50
50
|
*/
|
|
51
|
-
_findSession(sessionId: string): LH.Gatherer.
|
|
51
|
+
_findSession(sessionId: string): LH.Gatherer.ProtocolSession;
|
|
52
52
|
/**
|
|
53
53
|
* Returns the root session.
|
|
54
|
-
* @return {LH.Gatherer.
|
|
54
|
+
* @return {LH.Gatherer.ProtocolSession}
|
|
55
55
|
*/
|
|
56
|
-
rootSession(): LH.Gatherer.
|
|
56
|
+
rootSession(): LH.Gatherer.ProtocolSession;
|
|
57
57
|
mainFrameExecutionContexts(): import("devtools-protocol").Protocol.Runtime.ExecutionContextDescription[];
|
|
58
58
|
/**
|
|
59
59
|
* Returns a listener for all protocol events from session, and augments the
|
|
@@ -71,5 +71,6 @@ export class TargetManager extends TargetManager_base {
|
|
|
71
71
|
*/
|
|
72
72
|
disable(): Promise<void>;
|
|
73
73
|
}
|
|
74
|
+
import { ProtocolSession } from '../session.js';
|
|
74
75
|
export {};
|
|
75
76
|
//# sourceMappingURL=target-manager.d.ts.map
|
|
@@ -19,7 +19,7 @@ import {ProtocolSession} from '../session.js';
|
|
|
19
19
|
* @typedef {{
|
|
20
20
|
* target: LH.Crdp.Target.TargetInfo,
|
|
21
21
|
* cdpSession: LH.Puppeteer.CDPSession,
|
|
22
|
-
* session: LH.Gatherer.
|
|
22
|
+
* session: LH.Gatherer.ProtocolSession,
|
|
23
23
|
* protocolListener: (event: unknown) => void,
|
|
24
24
|
* }} TargetWithSession
|
|
25
25
|
*/
|
|
@@ -84,7 +84,7 @@ class TargetManager extends ProtocolEventEmitter {
|
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* @param {string} sessionId
|
|
87
|
-
* @return {LH.Gatherer.
|
|
87
|
+
* @return {LH.Gatherer.ProtocolSession}
|
|
88
88
|
*/
|
|
89
89
|
_findSession(sessionId) {
|
|
90
90
|
for (const {session, cdpSession} of this._targetIdToTargets.values()) {
|
|
@@ -96,7 +96,7 @@ class TargetManager extends ProtocolEventEmitter {
|
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* Returns the root session.
|
|
99
|
-
* @return {LH.Gatherer.
|
|
99
|
+
* @return {LH.Gatherer.ProtocolSession}
|
|
100
100
|
*/
|
|
101
101
|
rootSession() {
|
|
102
102
|
const rootSessionId = this._rootCdpSession.id();
|
|
@@ -49,35 +49,35 @@ export function waitForNothing(): {
|
|
|
49
49
|
/**
|
|
50
50
|
* Returns a promise that resolve when a frame has been navigated.
|
|
51
51
|
* Used for detecting that our about:blank reset has been completed.
|
|
52
|
-
* @param {LH.Gatherer.
|
|
52
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
53
53
|
* @return {CancellableWait<LH.Crdp.Page.FrameNavigatedEvent>}
|
|
54
54
|
*/
|
|
55
|
-
export function waitForFrameNavigated(session: LH.Gatherer.
|
|
55
|
+
export function waitForFrameNavigated(session: LH.Gatherer.ProtocolSession): CancellableWait<LH.Crdp.Page.FrameNavigatedEvent>;
|
|
56
56
|
/**
|
|
57
57
|
* Returns a promise that resolve when a frame has a FCP.
|
|
58
|
-
* @param {LH.Gatherer.
|
|
58
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
59
59
|
* @param {number} pauseAfterFcpMs
|
|
60
60
|
* @param {number} maxWaitForFcpMs
|
|
61
61
|
* @return {CancellableWait}
|
|
62
62
|
*/
|
|
63
|
-
export function waitForFcp(session: LH.Gatherer.
|
|
63
|
+
export function waitForFcp(session: LH.Gatherer.ProtocolSession, pauseAfterFcpMs: number, maxWaitForFcpMs: number): CancellableWait;
|
|
64
64
|
/**
|
|
65
65
|
* Return a promise that resolves `pauseAfterLoadMs` after the load event
|
|
66
66
|
* fires and a method to cancel internal listeners and timeout.
|
|
67
|
-
* @param {LH.Gatherer.
|
|
67
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
68
68
|
* @param {number} pauseAfterLoadMs
|
|
69
69
|
* @return {CancellableWait}
|
|
70
70
|
*/
|
|
71
|
-
export function waitForLoadEvent(session: LH.Gatherer.
|
|
71
|
+
export function waitForLoadEvent(session: LH.Gatherer.ProtocolSession, pauseAfterLoadMs: number): CancellableWait;
|
|
72
72
|
/**
|
|
73
73
|
* Returns a promise that resolves when the network has been idle (after DCL) for
|
|
74
74
|
* `networkQuietThresholdMs` ms and a method to cancel internal network listeners/timeout.
|
|
75
|
-
* @param {LH.Gatherer.
|
|
75
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
76
76
|
* @param {NetworkMonitor} networkMonitor
|
|
77
77
|
* @param {{networkQuietThresholdMs: number, busyEvent: NetworkMonitorEvent, idleEvent: NetworkMonitorEvent, isIdle(recorder: NetworkMonitor): boolean, pretendDCLAlreadyFired?: boolean}} networkQuietOptions
|
|
78
78
|
* @return {CancellableWait}
|
|
79
79
|
*/
|
|
80
|
-
export function waitForNetworkIdle(session: LH.Gatherer.
|
|
80
|
+
export function waitForNetworkIdle(session: LH.Gatherer.ProtocolSession, networkMonitor: NetworkMonitor, networkQuietOptions: {
|
|
81
81
|
networkQuietThresholdMs: number;
|
|
82
82
|
busyEvent: NetworkMonitorEvent;
|
|
83
83
|
idleEvent: NetworkMonitorEvent;
|
|
@@ -86,11 +86,11 @@ export function waitForNetworkIdle(session: LH.Gatherer.FRProtocolSession, netwo
|
|
|
86
86
|
}): CancellableWait;
|
|
87
87
|
/**
|
|
88
88
|
* Resolves when there have been no long tasks for at least waitForCPUQuiet ms.
|
|
89
|
-
* @param {LH.Gatherer.
|
|
89
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
90
90
|
* @param {number} waitForCPUQuiet
|
|
91
91
|
* @return {CancellableWait}
|
|
92
92
|
*/
|
|
93
|
-
export function waitForCPUIdle(session: LH.Gatherer.
|
|
93
|
+
export function waitForCPUIdle(session: LH.Gatherer.ProtocolSession, waitForCPUQuiet: number): CancellableWait;
|
|
94
94
|
/**
|
|
95
95
|
* Returns a promise that resolves when:
|
|
96
96
|
* - All of the following conditions have been met:
|
|
@@ -101,16 +101,16 @@ export function waitForCPUIdle(session: LH.Gatherer.FRProtocolSession, waitForCP
|
|
|
101
101
|
* - cpuQuietThresholdMs have passed since the last long task after network-2-quiet.
|
|
102
102
|
* - maxWaitForLoadedMs milliseconds have passed.
|
|
103
103
|
* See https://github.com/GoogleChrome/lighthouse/issues/627 for more.
|
|
104
|
-
* @param {LH.Gatherer.
|
|
104
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
105
105
|
* @param {NetworkMonitor} networkMonitor
|
|
106
106
|
* @param {WaitOptions} options
|
|
107
107
|
* @return {Promise<{timedOut: boolean}>}
|
|
108
108
|
*/
|
|
109
|
-
export function waitForFullyLoaded(session: LH.Gatherer.
|
|
109
|
+
export function waitForFullyLoaded(session: LH.Gatherer.ProtocolSession, networkMonitor: NetworkMonitor, options: WaitOptions): Promise<{
|
|
110
110
|
timedOut: boolean;
|
|
111
111
|
}>;
|
|
112
112
|
/**
|
|
113
|
-
* @param {LH.Gatherer.
|
|
113
|
+
* @param {LH.Gatherer.Driver} driver
|
|
114
114
|
*/
|
|
115
|
-
export function waitForUserToContinue(driver: LH.Gatherer.
|
|
115
|
+
export function waitForUserToContinue(driver: LH.Gatherer.Driver): Promise<void>;
|
|
116
116
|
//# sourceMappingURL=wait-for-condition.d.ts.map
|
|
@@ -45,7 +45,7 @@ function waitForNothing() {
|
|
|
45
45
|
/**
|
|
46
46
|
* Returns a promise that resolve when a frame has been navigated.
|
|
47
47
|
* Used for detecting that our about:blank reset has been completed.
|
|
48
|
-
* @param {LH.Gatherer.
|
|
48
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
49
49
|
* @return {CancellableWait<LH.Crdp.Page.FrameNavigatedEvent>}
|
|
50
50
|
*/
|
|
51
51
|
function waitForFrameNavigated(session) {
|
|
@@ -68,7 +68,7 @@ function waitForFrameNavigated(session) {
|
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Returns a promise that resolve when a frame has a FCP.
|
|
71
|
-
* @param {LH.Gatherer.
|
|
71
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
72
72
|
* @param {number} pauseAfterFcpMs
|
|
73
73
|
* @param {number} maxWaitForFcpMs
|
|
74
74
|
* @return {CancellableWait}
|
|
@@ -119,7 +119,7 @@ function waitForFcp(session, pauseAfterFcpMs, maxWaitForFcpMs) {
|
|
|
119
119
|
/**
|
|
120
120
|
* Returns a promise that resolves when the network has been idle (after DCL) for
|
|
121
121
|
* `networkQuietThresholdMs` ms and a method to cancel internal network listeners/timeout.
|
|
122
|
-
* @param {LH.Gatherer.
|
|
122
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
123
123
|
* @param {NetworkMonitor} networkMonitor
|
|
124
124
|
* @param {{networkQuietThresholdMs: number, busyEvent: NetworkMonitorEvent, idleEvent: NetworkMonitorEvent, isIdle(recorder: NetworkMonitor): boolean, pretendDCLAlreadyFired?: boolean}} networkQuietOptions
|
|
125
125
|
* @return {CancellableWait}
|
|
@@ -213,7 +213,7 @@ function waitForNetworkIdle(session, networkMonitor, networkQuietOptions) {
|
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
* Resolves when there have been no long tasks for at least waitForCPUQuiet ms.
|
|
216
|
-
* @param {LH.Gatherer.
|
|
216
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
217
217
|
* @param {number} waitForCPUQuiet
|
|
218
218
|
* @return {CancellableWait}
|
|
219
219
|
*/
|
|
@@ -344,7 +344,7 @@ function checkTimeSinceLastLongTaskInPage() {
|
|
|
344
344
|
/**
|
|
345
345
|
* Return a promise that resolves `pauseAfterLoadMs` after the load event
|
|
346
346
|
* fires and a method to cancel internal listeners and timeout.
|
|
347
|
-
* @param {LH.Gatherer.
|
|
347
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
348
348
|
* @param {number} pauseAfterLoadMs
|
|
349
349
|
* @return {CancellableWait}
|
|
350
350
|
*/
|
|
@@ -379,7 +379,7 @@ function waitForLoadEvent(session, pauseAfterLoadMs) {
|
|
|
379
379
|
|
|
380
380
|
/**
|
|
381
381
|
* Returns whether the page appears to be hung.
|
|
382
|
-
* @param {LH.Gatherer.
|
|
382
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
383
383
|
* @return {Promise<boolean>}
|
|
384
384
|
*/
|
|
385
385
|
async function isPageHung(session) {
|
|
@@ -410,7 +410,7 @@ const DEFAULT_WAIT_FUNCTIONS = {waitForFcp, waitForLoadEvent, waitForCPUIdle, wa
|
|
|
410
410
|
* - cpuQuietThresholdMs have passed since the last long task after network-2-quiet.
|
|
411
411
|
* - maxWaitForLoadedMs milliseconds have passed.
|
|
412
412
|
* See https://github.com/GoogleChrome/lighthouse/issues/627 for more.
|
|
413
|
-
* @param {LH.Gatherer.
|
|
413
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
414
414
|
* @param {NetworkMonitor} networkMonitor
|
|
415
415
|
* @param {WaitOptions} options
|
|
416
416
|
* @return {Promise<{timedOut: boolean}>}
|
|
@@ -519,7 +519,7 @@ async function waitForFullyLoaded(session, networkMonitor, options) {
|
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
/**
|
|
522
|
-
* @param {LH.Gatherer.
|
|
522
|
+
* @param {LH.Gatherer.Driver} driver
|
|
523
523
|
*/
|
|
524
524
|
function waitForUserToContinue(driver) {
|
|
525
525
|
/* c8 ignore start */
|
package/core/gather/driver.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** @implements {LH.Gatherer.
|
|
2
|
-
export class Driver implements LH.Gatherer.
|
|
1
|
+
/** @implements {LH.Gatherer.Driver} */
|
|
2
|
+
export class Driver implements LH.Gatherer.Driver {
|
|
3
3
|
/**
|
|
4
4
|
* @param {LH.Puppeteer.Page} page
|
|
5
5
|
*/
|
|
@@ -7,16 +7,18 @@ export class Driver implements LH.Gatherer.FRTransitionalDriver {
|
|
|
7
7
|
_page: import("../../types/puppeteer.js").default.Page;
|
|
8
8
|
/** @type {TargetManager|undefined} */
|
|
9
9
|
_targetManager: TargetManager | undefined;
|
|
10
|
+
/** @type {NetworkMonitor|undefined} */
|
|
11
|
+
_networkMonitor: NetworkMonitor | undefined;
|
|
10
12
|
/** @type {ExecutionContext|undefined} */
|
|
11
13
|
_executionContext: ExecutionContext | undefined;
|
|
12
14
|
/** @type {Fetcher|undefined} */
|
|
13
15
|
_fetcher: Fetcher | undefined;
|
|
14
|
-
defaultSession: import("../../types/gatherer.js").default.
|
|
15
|
-
/** @return {LH.Gatherer.
|
|
16
|
+
defaultSession: import("../../types/gatherer.js").default.ProtocolSession;
|
|
17
|
+
/** @return {LH.Gatherer.Driver['executionContext']} */
|
|
16
18
|
get executionContext(): ExecutionContext;
|
|
17
|
-
|
|
18
|
-
get fetcher(): Fetcher;
|
|
19
|
+
get fetcher(): any;
|
|
19
20
|
get targetManager(): any;
|
|
21
|
+
get networkMonitor(): any;
|
|
20
22
|
/** @return {Promise<string>} */
|
|
21
23
|
url(): Promise<string>;
|
|
22
24
|
/** @return {Promise<void>} */
|
|
@@ -25,6 +27,7 @@ export class Driver implements LH.Gatherer.FRTransitionalDriver {
|
|
|
25
27
|
disconnect(): Promise<void>;
|
|
26
28
|
}
|
|
27
29
|
import { TargetManager } from './driver/target-manager.js';
|
|
30
|
+
import { NetworkMonitor } from './driver/network-monitor.js';
|
|
28
31
|
import { ExecutionContext } from './driver/execution-context.js';
|
|
29
32
|
import { Fetcher } from './fetcher.js';
|
|
30
33
|
//# sourceMappingURL=driver.d.ts.map
|
package/core/gather/driver.js
CHANGED
|
@@ -9,13 +9,14 @@ import log from 'lighthouse-logger';
|
|
|
9
9
|
import {ExecutionContext} from './driver/execution-context.js';
|
|
10
10
|
import {TargetManager} from './driver/target-manager.js';
|
|
11
11
|
import {Fetcher} from './fetcher.js';
|
|
12
|
+
import {NetworkMonitor} from './driver/network-monitor.js';
|
|
12
13
|
|
|
13
14
|
/** @return {*} */
|
|
14
15
|
const throwNotConnectedFn = () => {
|
|
15
16
|
throw new Error('Session not connected');
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
/** @type {LH.Gatherer.
|
|
19
|
+
/** @type {LH.Gatherer.ProtocolSession} */
|
|
19
20
|
const throwingSession = {
|
|
20
21
|
setTargetInfo: throwNotConnectedFn,
|
|
21
22
|
hasNextProtocolTimeout: throwNotConnectedFn,
|
|
@@ -28,7 +29,7 @@ const throwingSession = {
|
|
|
28
29
|
dispose: throwNotConnectedFn,
|
|
29
30
|
};
|
|
30
31
|
|
|
31
|
-
/** @implements {LH.Gatherer.
|
|
32
|
+
/** @implements {LH.Gatherer.Driver} */
|
|
32
33
|
class Driver {
|
|
33
34
|
/**
|
|
34
35
|
* @param {LH.Puppeteer.Page} page
|
|
@@ -37,6 +38,8 @@ class Driver {
|
|
|
37
38
|
this._page = page;
|
|
38
39
|
/** @type {TargetManager|undefined} */
|
|
39
40
|
this._targetManager = undefined;
|
|
41
|
+
/** @type {NetworkMonitor|undefined} */
|
|
42
|
+
this._networkMonitor = undefined;
|
|
40
43
|
/** @type {ExecutionContext|undefined} */
|
|
41
44
|
this._executionContext = undefined;
|
|
42
45
|
/** @type {Fetcher|undefined} */
|
|
@@ -45,13 +48,12 @@ class Driver {
|
|
|
45
48
|
this.defaultSession = throwingSession;
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
/** @return {LH.Gatherer.
|
|
51
|
+
/** @return {LH.Gatherer.Driver['executionContext']} */
|
|
49
52
|
get executionContext() {
|
|
50
53
|
if (!this._executionContext) return throwNotConnectedFn();
|
|
51
54
|
return this._executionContext;
|
|
52
55
|
}
|
|
53
56
|
|
|
54
|
-
/** @return {Fetcher} */
|
|
55
57
|
get fetcher() {
|
|
56
58
|
if (!this._fetcher) return throwNotConnectedFn();
|
|
57
59
|
return this._fetcher;
|
|
@@ -62,6 +64,11 @@ class Driver {
|
|
|
62
64
|
return this._targetManager;
|
|
63
65
|
}
|
|
64
66
|
|
|
67
|
+
get networkMonitor() {
|
|
68
|
+
if (!this._networkMonitor) return throwNotConnectedFn();
|
|
69
|
+
return this._networkMonitor;
|
|
70
|
+
}
|
|
71
|
+
|
|
65
72
|
/** @return {Promise<string>} */
|
|
66
73
|
async url() {
|
|
67
74
|
return this._page.url();
|
|
@@ -75,6 +82,8 @@ class Driver {
|
|
|
75
82
|
const cdpSession = await this._page.target().createCDPSession();
|
|
76
83
|
this._targetManager = new TargetManager(cdpSession);
|
|
77
84
|
await this._targetManager.enable();
|
|
85
|
+
this._networkMonitor = new NetworkMonitor(this._targetManager);
|
|
86
|
+
await this._networkMonitor.enable();
|
|
78
87
|
this.defaultSession = this._targetManager.rootSession();
|
|
79
88
|
this._executionContext = new ExecutionContext(this.defaultSession);
|
|
80
89
|
this._fetcher = new Fetcher(this.defaultSession);
|
|
@@ -85,6 +94,7 @@ class Driver {
|
|
|
85
94
|
async disconnect() {
|
|
86
95
|
if (this.defaultSession === throwingSession) return;
|
|
87
96
|
await this._targetManager?.disable();
|
|
97
|
+
await this._networkMonitor?.disable();
|
|
88
98
|
await this.defaultSession.dispose();
|
|
89
99
|
}
|
|
90
100
|
}
|
package/core/gather/fetcher.d.ts
CHANGED
|
@@ -9,10 +9,10 @@ export type FetchResponse = {
|
|
|
9
9
|
/** @typedef {{content: string|null, status: number|null}} FetchResponse */
|
|
10
10
|
export class Fetcher {
|
|
11
11
|
/**
|
|
12
|
-
* @param {LH.Gatherer.
|
|
12
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
13
13
|
*/
|
|
14
|
-
constructor(session: LH.Gatherer.
|
|
15
|
-
session: LH.Gatherer.
|
|
14
|
+
constructor(session: LH.Gatherer.ProtocolSession);
|
|
15
|
+
session: LH.Gatherer.ProtocolSession;
|
|
16
16
|
/**
|
|
17
17
|
* Fetches any resource using the network directly.
|
|
18
18
|
*
|
package/core/gather/fetcher.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export default Accessibility;
|
|
2
|
-
declare class Accessibility extends
|
|
2
|
+
declare class Accessibility extends BaseGatherer {
|
|
3
3
|
static pageFns: {
|
|
4
4
|
runA11yChecks: typeof runA11yChecks;
|
|
5
5
|
createAxeRuleResultArtifact: typeof createAxeRuleResultArtifact;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* @param {LH.Gatherer.
|
|
8
|
+
* @param {LH.Gatherer.Context} passContext
|
|
9
9
|
* @return {Promise<LH.Artifacts.Accessibility>}
|
|
10
10
|
*/
|
|
11
|
-
getArtifact(passContext: LH.Gatherer.
|
|
11
|
+
getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts.Accessibility>;
|
|
12
12
|
}
|
|
13
|
-
import
|
|
13
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
14
14
|
/**
|
|
15
15
|
* @return {Promise<LH.Artifacts.Accessibility>}
|
|
16
16
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
/* global window, document, getNodeDetails */
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
10
10
|
import {axeSource} from '../../lib/axe.js';
|
|
11
11
|
import {pageFunctions} from '../../lib/page-functions.js';
|
|
12
12
|
|
|
@@ -41,6 +41,7 @@ async function runA11yChecks() {
|
|
|
41
41
|
// Consider http://go/prcpg for expert review of the aXe rules.
|
|
42
42
|
'accesskeys': {enabled: true},
|
|
43
43
|
'area-alt': {enabled: false},
|
|
44
|
+
'aria-allowed-role': {enabled: true},
|
|
44
45
|
'aria-dialog-name': {enabled: true},
|
|
45
46
|
'aria-roledescription': {enabled: false},
|
|
46
47
|
'aria-treeitem-name': {enabled: true},
|
|
@@ -54,7 +55,9 @@ async function runA11yChecks() {
|
|
|
54
55
|
'heading-order': {enabled: true},
|
|
55
56
|
'html-xml-lang-mismatch': {enabled: true},
|
|
56
57
|
'identical-links-same-purpose': {enabled: true},
|
|
58
|
+
'image-redundant-alt': {enabled: true},
|
|
57
59
|
'input-button-name': {enabled: true},
|
|
60
|
+
'label-content-name-mismatch': {enabled: true},
|
|
58
61
|
'landmark-one-main': {enabled: true},
|
|
59
62
|
'link-in-text-block': {enabled: true},
|
|
60
63
|
'marquee': {enabled: false},
|
|
@@ -66,8 +69,10 @@ async function runA11yChecks() {
|
|
|
66
69
|
'scrollable-region-focusable': {enabled: false},
|
|
67
70
|
'select-name': {enabled: true},
|
|
68
71
|
'server-side-image-map': {enabled: false},
|
|
72
|
+
'skip-link': {enabled: true},
|
|
69
73
|
'svg-img-alt': {enabled: false},
|
|
70
74
|
'tabindex': {enabled: true},
|
|
75
|
+
'table-duplicate-name': {enabled: true},
|
|
71
76
|
'table-fake-caption': {enabled: true},
|
|
72
77
|
'target-size': {enabled: true},
|
|
73
78
|
'td-has-header': {enabled: true},
|
|
@@ -169,7 +174,7 @@ function createAxeRuleResultArtifact(result) {
|
|
|
169
174
|
}
|
|
170
175
|
/* c8 ignore stop */
|
|
171
176
|
|
|
172
|
-
class Accessibility extends
|
|
177
|
+
class Accessibility extends BaseGatherer {
|
|
173
178
|
/** @type {LH.Gatherer.GathererMeta} */
|
|
174
179
|
meta = {
|
|
175
180
|
supportedModes: ['snapshot', 'navigation'],
|
|
@@ -181,7 +186,7 @@ class Accessibility extends FRGatherer {
|
|
|
181
186
|
};
|
|
182
187
|
|
|
183
188
|
/**
|
|
184
|
-
* @param {LH.Gatherer.
|
|
189
|
+
* @param {LH.Gatherer.Context} passContext
|
|
185
190
|
* @return {Promise<LH.Artifacts.Accessibility>}
|
|
186
191
|
*/
|
|
187
192
|
getArtifact(passContext) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export default AnchorElements;
|
|
2
|
-
declare class AnchorElements extends
|
|
2
|
+
declare class AnchorElements extends BaseGatherer {
|
|
3
3
|
/**
|
|
4
|
-
* @param {LH.Gatherer.
|
|
4
|
+
* @param {LH.Gatherer.Context} passContext
|
|
5
5
|
* @return {Promise<LH.Artifacts['AnchorElements']>}
|
|
6
6
|
*/
|
|
7
|
-
getArtifact(passContext: LH.Gatherer.
|
|
7
|
+
getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts['AnchorElements']>;
|
|
8
8
|
}
|
|
9
|
-
import
|
|
9
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
10
10
|
//# sourceMappingURL=anchor-elements.d.ts.map
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
/* global getNodeDetails */
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
10
10
|
import {pageFunctions} from '../../lib/page-functions.js';
|
|
11
11
|
import {resolveDevtoolsNodePathToObjectId} from '../driver/dom.js';
|
|
12
12
|
|
|
@@ -76,7 +76,7 @@ function collectAnchorElements() {
|
|
|
76
76
|
/* c8 ignore stop */
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
* @param {LH.Gatherer.
|
|
79
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
80
80
|
* @param {string} devtoolsNodePath
|
|
81
81
|
* @return {Promise<Array<{type: string}>>}
|
|
82
82
|
*/
|
|
@@ -91,14 +91,14 @@ async function getEventListeners(session, devtoolsNodePath) {
|
|
|
91
91
|
return response.listeners.map(({type}) => ({type}));
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
class AnchorElements extends
|
|
94
|
+
class AnchorElements extends BaseGatherer {
|
|
95
95
|
/** @type {LH.Gatherer.GathererMeta} */
|
|
96
96
|
meta = {
|
|
97
97
|
supportedModes: ['snapshot', 'navigation'],
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* @param {LH.Gatherer.
|
|
101
|
+
* @param {LH.Gatherer.Context} passContext
|
|
102
102
|
* @return {Promise<LH.Artifacts['AnchorElements']>}
|
|
103
103
|
*/
|
|
104
104
|
async getArtifact(passContext) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default BFCacheFailures;
|
|
2
|
-
declare class BFCacheFailures extends
|
|
2
|
+
declare class BFCacheFailures extends BaseGatherer {
|
|
3
3
|
/**
|
|
4
4
|
* @param {LH.Crdp.Page.BackForwardCacheNotRestoredExplanation[]} errorList
|
|
5
5
|
* @return {LH.Artifacts.BFCacheFailure}
|
|
@@ -18,26 +18,20 @@ declare class BFCacheFailures extends FRGatherer {
|
|
|
18
18
|
/** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
|
|
19
19
|
meta: LH.Gatherer.GathererMeta<'DevtoolsLog'>;
|
|
20
20
|
/**
|
|
21
|
-
* @param {LH.Gatherer.
|
|
21
|
+
* @param {LH.Gatherer.Context} context
|
|
22
22
|
* @return {Promise<LH.Crdp.Page.BackForwardCacheNotUsedEvent|undefined>}
|
|
23
23
|
*/
|
|
24
|
-
activelyCollectBFCacheEvent(context: LH.Gatherer.
|
|
24
|
+
activelyCollectBFCacheEvent(context: LH.Gatherer.Context): Promise<LH.Crdp.Page.BackForwardCacheNotUsedEvent | undefined>;
|
|
25
25
|
/**
|
|
26
|
-
* @param {LH.Gatherer.
|
|
26
|
+
* @param {LH.Gatherer.Context<'DevtoolsLog'>} context
|
|
27
27
|
* @return {LH.Crdp.Page.BackForwardCacheNotUsedEvent[]}
|
|
28
28
|
*/
|
|
29
|
-
passivelyCollectBFCacheEvents(context: LH.Gatherer.
|
|
29
|
+
passivelyCollectBFCacheEvents(context: LH.Gatherer.Context<'DevtoolsLog'>): LH.Crdp.Page.BackForwardCacheNotUsedEvent[];
|
|
30
30
|
/**
|
|
31
|
-
* @param {LH.Gatherer.
|
|
31
|
+
* @param {LH.Gatherer.Context<'DevtoolsLog'>} context
|
|
32
32
|
* @return {Promise<LH.Artifacts['BFCacheFailures']>}
|
|
33
33
|
*/
|
|
34
|
-
getArtifact(context: LH.Gatherer.
|
|
35
|
-
/**
|
|
36
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
37
|
-
* @param {LH.Gatherer.LoadData} loadData
|
|
38
|
-
* @return {Promise<LH.Artifacts['BFCacheFailures']>}
|
|
39
|
-
*/
|
|
40
|
-
afterPass(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData): Promise<LH.Artifacts['BFCacheFailures']>;
|
|
34
|
+
getArtifact(context: LH.Gatherer.Context<'DevtoolsLog'>): Promise<LH.Artifacts['BFCacheFailures']>;
|
|
41
35
|
}
|
|
42
|
-
import
|
|
36
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
43
37
|
//# sourceMappingURL=bf-cache-failures.d.ts.map
|