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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default ResponseCompression;
|
|
2
|
-
declare class ResponseCompression extends
|
|
2
|
+
declare class ResponseCompression extends BaseGatherer {
|
|
3
3
|
/**
|
|
4
4
|
* @param {LH.Artifacts.NetworkRequest[]} networkRecords
|
|
5
5
|
* @return {LH.Artifacts['ResponseCompression']}
|
|
@@ -8,23 +8,17 @@ declare class ResponseCompression extends FRGatherer {
|
|
|
8
8
|
/** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
|
|
9
9
|
meta: LH.Gatherer.GathererMeta<'DevtoolsLog'>;
|
|
10
10
|
/**
|
|
11
|
-
* @param {LH.Gatherer.
|
|
11
|
+
* @param {LH.Gatherer.Context} context
|
|
12
12
|
* @param {LH.Artifacts.NetworkRequest[]} networkRecords
|
|
13
13
|
* @return {Promise<LH.Artifacts['ResponseCompression']>}
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
getCompressibleRecords(context: LH.Gatherer.Context, networkRecords: LH.Artifacts.NetworkRequest[]): Promise<LH.Artifacts['ResponseCompression']>;
|
|
16
16
|
/**
|
|
17
|
-
* @param {LH.Gatherer.
|
|
17
|
+
* @param {LH.Gatherer.Context<'DevtoolsLog'>} context
|
|
18
18
|
* @return {Promise<LH.Artifacts['ResponseCompression']>}
|
|
19
19
|
*/
|
|
20
|
-
getArtifact(context: LH.Gatherer.
|
|
21
|
-
/**
|
|
22
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
23
|
-
* @param {LH.Gatherer.LoadData} loadData
|
|
24
|
-
* @return {Promise<LH.Artifacts['ResponseCompression']>}
|
|
25
|
-
*/
|
|
26
|
-
afterPass(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData): Promise<LH.Artifacts['ResponseCompression']>;
|
|
20
|
+
getArtifact(context: LH.Gatherer.Context<'DevtoolsLog'>): Promise<LH.Artifacts['ResponseCompression']>;
|
|
27
21
|
}
|
|
28
|
-
import
|
|
22
|
+
import BaseGatherer from '../../base-gatherer.js';
|
|
29
23
|
import { NetworkRequest } from '../../../lib/network-request.js';
|
|
30
24
|
//# sourceMappingURL=response-compression.d.ts.map
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
import {Buffer} from 'buffer';
|
|
14
14
|
import {gzip} from 'zlib';
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
import log from 'lighthouse-logger';
|
|
17
|
+
|
|
18
|
+
import BaseGatherer from '../../base-gatherer.js';
|
|
17
19
|
import UrlUtils from '../../../lib/url-utils.js';
|
|
18
|
-
import {Sentry} from '../../../lib/sentry.js';
|
|
19
20
|
import {NetworkRequest} from '../../../lib/network-request.js';
|
|
20
21
|
import DevtoolsLog from '../devtools-log.js';
|
|
21
22
|
import {fetchResponseBodyFromCache} from '../../driver/network.js';
|
|
@@ -39,7 +40,7 @@ const textResourceTypes = [
|
|
|
39
40
|
NetworkRequest.TYPES.EventSource,
|
|
40
41
|
];
|
|
41
42
|
|
|
42
|
-
class ResponseCompression extends
|
|
43
|
+
class ResponseCompression extends BaseGatherer {
|
|
43
44
|
/** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
|
|
44
45
|
meta = {
|
|
45
46
|
supportedModes: ['timespan', 'navigation'],
|
|
@@ -91,11 +92,11 @@ class ResponseCompression extends FRGatherer {
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
/**
|
|
94
|
-
* @param {LH.Gatherer.
|
|
95
|
+
* @param {LH.Gatherer.Context} context
|
|
95
96
|
* @param {LH.Artifacts.NetworkRequest[]} networkRecords
|
|
96
97
|
* @return {Promise<LH.Artifacts['ResponseCompression']>}
|
|
97
98
|
*/
|
|
98
|
-
async
|
|
99
|
+
async getCompressibleRecords(context, networkRecords) {
|
|
99
100
|
const session = context.driver.defaultSession;
|
|
100
101
|
const textRecords = ResponseCompression.filterUnoptimizedResponses(networkRecords);
|
|
101
102
|
|
|
@@ -119,12 +120,13 @@ class ResponseCompression extends FRGatherer {
|
|
|
119
120
|
});
|
|
120
121
|
});
|
|
121
122
|
}).catch(err => {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
extra
|
|
125
|
-
|
|
126
|
-
}
|
|
123
|
+
const isExpectedError = err?.message?.includes('No resource with given identifier found');
|
|
124
|
+
if (!isExpectedError) {
|
|
125
|
+
err.extra = {url: UrlUtils.elideDataURI(record.url)};
|
|
126
|
+
throw err;
|
|
127
|
+
}
|
|
127
128
|
|
|
129
|
+
log.error('ResponseCompression', err.message);
|
|
128
130
|
record.gzipSize = undefined;
|
|
129
131
|
return record;
|
|
130
132
|
});
|
|
@@ -132,22 +134,13 @@ class ResponseCompression extends FRGatherer {
|
|
|
132
134
|
}
|
|
133
135
|
|
|
134
136
|
/**
|
|
135
|
-
* @param {LH.Gatherer.
|
|
137
|
+
* @param {LH.Gatherer.Context<'DevtoolsLog'>} context
|
|
136
138
|
* @return {Promise<LH.Artifacts['ResponseCompression']>}
|
|
137
139
|
*/
|
|
138
140
|
async getArtifact(context) {
|
|
139
141
|
const devtoolsLog = context.dependencies.DevtoolsLog;
|
|
140
142
|
const networkRecords = await NetworkRecords.request(devtoolsLog, context);
|
|
141
|
-
return this.
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
146
|
-
* @param {LH.Gatherer.LoadData} loadData
|
|
147
|
-
* @return {Promise<LH.Artifacts['ResponseCompression']>}
|
|
148
|
-
*/
|
|
149
|
-
async afterPass(passContext, loadData) {
|
|
150
|
-
return this._getArtifact({...passContext, dependencies: {}}, loadData.networkRecords);
|
|
143
|
+
return this.getCompressibleRecords(context, networkRecords);
|
|
151
144
|
}
|
|
152
145
|
}
|
|
153
146
|
|
|
@@ -19,35 +19,29 @@ export type ScriptTag = {
|
|
|
19
19
|
url: string;
|
|
20
20
|
src: string;
|
|
21
21
|
};
|
|
22
|
-
declare class TagsBlockingFirstPaint extends
|
|
22
|
+
declare class TagsBlockingFirstPaint extends BaseGatherer {
|
|
23
23
|
/**
|
|
24
24
|
* @param {Array<LH.Artifacts.NetworkRequest>} networkRecords
|
|
25
25
|
* @return {Map<string, LH.Artifacts.NetworkRequest>}
|
|
26
26
|
*/
|
|
27
27
|
static _filteredAndIndexedByUrl(networkRecords: Array<LH.Artifacts.NetworkRequest>): Map<string, LH.Artifacts.NetworkRequest>;
|
|
28
28
|
/**
|
|
29
|
-
* @param {LH.Gatherer.
|
|
29
|
+
* @param {LH.Gatherer.Driver} driver
|
|
30
30
|
* @param {Array<LH.Artifacts.NetworkRequest>} networkRecords
|
|
31
31
|
* @return {Promise<Array<LH.Artifacts.TagBlockingFirstPaint>>}
|
|
32
32
|
*/
|
|
33
|
-
static findBlockingTags(driver: LH.Gatherer.
|
|
33
|
+
static findBlockingTags(driver: LH.Gatherer.Driver, networkRecords: Array<LH.Artifacts.NetworkRequest>): Promise<Array<LH.Artifacts.TagBlockingFirstPaint>>;
|
|
34
34
|
/** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
|
|
35
35
|
meta: LH.Gatherer.GathererMeta<'DevtoolsLog'>;
|
|
36
36
|
/**
|
|
37
|
-
* @param {LH.Gatherer.
|
|
37
|
+
* @param {LH.Gatherer.Context} context
|
|
38
38
|
*/
|
|
39
|
-
startSensitiveInstrumentation(context: LH.Gatherer.
|
|
39
|
+
startSensitiveInstrumentation(context: LH.Gatherer.Context): Promise<void>;
|
|
40
40
|
/**
|
|
41
|
-
* @param {LH.Gatherer.
|
|
41
|
+
* @param {LH.Gatherer.Context<'DevtoolsLog'>} context
|
|
42
42
|
* @return {Promise<LH.Artifacts['TagsBlockingFirstPaint']>}
|
|
43
43
|
*/
|
|
44
|
-
getArtifact(context: LH.Gatherer.
|
|
45
|
-
/**
|
|
46
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
47
|
-
* @param {LH.Gatherer.LoadData} loadData
|
|
48
|
-
* @return {Promise<LH.Artifacts['TagsBlockingFirstPaint']>}
|
|
49
|
-
*/
|
|
50
|
-
afterPass(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData): Promise<LH.Artifacts['TagsBlockingFirstPaint']>;
|
|
44
|
+
getArtifact(context: LH.Gatherer.Context<'DevtoolsLog'>): Promise<LH.Artifacts['TagsBlockingFirstPaint']>;
|
|
51
45
|
}
|
|
52
|
-
import
|
|
46
|
+
import BaseGatherer from '../../base-gatherer.js';
|
|
53
47
|
//# sourceMappingURL=tags-blocking-first-paint.d.ts.map
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
import {NetworkRecords} from '../../../computed/network-records.js';
|
|
21
21
|
import DevtoolsLog from '../devtools-log.js';
|
|
22
|
-
import
|
|
22
|
+
import BaseGatherer from '../../base-gatherer.js';
|
|
23
23
|
|
|
24
24
|
/* global document, window, HTMLLinkElement, SVGScriptElement */
|
|
25
25
|
|
|
@@ -113,7 +113,7 @@ async function collectTagsThatBlockFirstPaint() {
|
|
|
113
113
|
}
|
|
114
114
|
/* c8 ignore stop */
|
|
115
115
|
|
|
116
|
-
class TagsBlockingFirstPaint extends
|
|
116
|
+
class TagsBlockingFirstPaint extends BaseGatherer {
|
|
117
117
|
/** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
|
|
118
118
|
meta = {
|
|
119
119
|
supportedModes: ['navigation'],
|
|
@@ -149,7 +149,7 @@ class TagsBlockingFirstPaint extends FRGatherer {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
|
-
* @param {LH.Gatherer.
|
|
152
|
+
* @param {LH.Gatherer.Driver} driver
|
|
153
153
|
* @param {Array<LH.Artifacts.NetworkRequest>} networkRecords
|
|
154
154
|
* @return {Promise<Array<LH.Artifacts.TagBlockingFirstPaint>>}
|
|
155
155
|
*/
|
|
@@ -206,7 +206,7 @@ class TagsBlockingFirstPaint extends FRGatherer {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
|
-
* @param {LH.Gatherer.
|
|
209
|
+
* @param {LH.Gatherer.Context} context
|
|
210
210
|
*/
|
|
211
211
|
async startSensitiveInstrumentation(context) {
|
|
212
212
|
const {executionContext} = context.driver;
|
|
@@ -215,7 +215,7 @@ class TagsBlockingFirstPaint extends FRGatherer {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
|
-
* @param {LH.Gatherer.
|
|
218
|
+
* @param {LH.Gatherer.Context<'DevtoolsLog'>} context
|
|
219
219
|
* @return {Promise<LH.Artifacts['TagsBlockingFirstPaint']>}
|
|
220
220
|
*/
|
|
221
221
|
async getArtifact(context) {
|
|
@@ -223,15 +223,6 @@ class TagsBlockingFirstPaint extends FRGatherer {
|
|
|
223
223
|
const networkRecords = await NetworkRecords.request(devtoolsLog, context);
|
|
224
224
|
return TagsBlockingFirstPaint.findBlockingTags(context.driver, networkRecords);
|
|
225
225
|
}
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
229
|
-
* @param {LH.Gatherer.LoadData} loadData
|
|
230
|
-
* @return {Promise<LH.Artifacts['TagsBlockingFirstPaint']>}
|
|
231
|
-
*/
|
|
232
|
-
afterPass(passContext, loadData) {
|
|
233
|
-
return TagsBlockingFirstPaint.findBlockingTags(passContext.driver, loadData.networkRecords);
|
|
234
|
-
}
|
|
235
226
|
}
|
|
236
227
|
|
|
237
228
|
export default TagsBlockingFirstPaint;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export default FullPageScreenshot;
|
|
2
|
-
declare class FullPageScreenshot extends
|
|
2
|
+
declare class FullPageScreenshot extends BaseGatherer {
|
|
3
3
|
/**
|
|
4
|
-
* @param {LH.Gatherer.
|
|
4
|
+
* @param {LH.Gatherer.Context} context
|
|
5
5
|
* @param {{height: number, width: number, mobile: boolean}} deviceMetrics
|
|
6
6
|
*/
|
|
7
|
-
_resizeViewport(context: LH.Gatherer.
|
|
7
|
+
_resizeViewport(context: LH.Gatherer.Context, deviceMetrics: {
|
|
8
8
|
height: number;
|
|
9
9
|
width: number;
|
|
10
10
|
mobile: boolean;
|
|
11
11
|
}): Promise<void>;
|
|
12
12
|
/**
|
|
13
|
-
* @param {LH.Gatherer.
|
|
13
|
+
* @param {LH.Gatherer.Context} context
|
|
14
14
|
* @return {Promise<LH.Result.FullPageScreenshot['screenshot']>}
|
|
15
15
|
*/
|
|
16
|
-
_takeScreenshot(context: LH.Gatherer.
|
|
16
|
+
_takeScreenshot(context: LH.Gatherer.Context): Promise<LH.Result.FullPageScreenshot['screenshot']>;
|
|
17
17
|
/**
|
|
18
18
|
* Gatherers can collect details about DOM nodes, including their position on the page.
|
|
19
19
|
* Layout shifts occuring after a gatherer runs can cause these positions to be incorrect,
|
|
@@ -21,15 +21,15 @@ declare class FullPageScreenshot extends FRGatherer {
|
|
|
21
21
|
* `getNodeDetails` maintains a collection of DOM objects in the page, which we can iterate
|
|
22
22
|
* to re-collect the bounding client rectangle.
|
|
23
23
|
* @see pageFunctions.getNodeDetails
|
|
24
|
-
* @param {LH.Gatherer.
|
|
24
|
+
* @param {LH.Gatherer.Context} context
|
|
25
25
|
* @return {Promise<LH.Result.FullPageScreenshot['nodes']>}
|
|
26
26
|
*/
|
|
27
|
-
_resolveNodes(context: LH.Gatherer.
|
|
27
|
+
_resolveNodes(context: LH.Gatherer.Context): Promise<LH.Result.FullPageScreenshot['nodes']>;
|
|
28
28
|
/**
|
|
29
|
-
* @param {LH.Gatherer.
|
|
29
|
+
* @param {LH.Gatherer.Context} context
|
|
30
30
|
* @return {Promise<LH.Artifacts['FullPageScreenshot']>}
|
|
31
31
|
*/
|
|
32
|
-
getArtifact(context: LH.Gatherer.
|
|
32
|
+
getArtifact(context: LH.Gatherer.Context): Promise<LH.Artifacts['FullPageScreenshot']>;
|
|
33
33
|
}
|
|
34
|
-
import
|
|
34
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
35
35
|
//# sourceMappingURL=full-page-screenshot.d.ts.map
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
/* globals window getBoundingClientRect requestAnimationFrame */
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
10
10
|
import * as emulation from '../../lib/emulation.js';
|
|
11
11
|
import {pageFunctions} from '../../lib/page-functions.js';
|
|
12
|
-
import {NetworkMonitor} from '../driver/network-monitor.js';
|
|
13
12
|
import {waitForNetworkIdle} from '../driver/wait-for-condition.js';
|
|
14
13
|
|
|
15
14
|
// JPEG quality setting
|
|
@@ -65,14 +64,14 @@ function waitForDoubleRaf() {
|
|
|
65
64
|
|
|
66
65
|
/* c8 ignore stop */
|
|
67
66
|
|
|
68
|
-
class FullPageScreenshot extends
|
|
67
|
+
class FullPageScreenshot extends BaseGatherer {
|
|
69
68
|
/** @type {LH.Gatherer.GathererMeta} */
|
|
70
69
|
meta = {
|
|
71
70
|
supportedModes: ['snapshot', 'timespan', 'navigation'],
|
|
72
71
|
};
|
|
73
72
|
|
|
74
73
|
/**
|
|
75
|
-
* @param {LH.Gatherer.
|
|
74
|
+
* @param {LH.Gatherer.Context} context
|
|
76
75
|
* @param {{height: number, width: number, mobile: boolean}} deviceMetrics
|
|
77
76
|
*/
|
|
78
77
|
async _resizeViewport(context, deviceMetrics) {
|
|
@@ -89,7 +88,7 @@ class FullPageScreenshot extends FRGatherer {
|
|
|
89
88
|
const height = Math.min(fullHeight, MAX_WEBP_SIZE);
|
|
90
89
|
|
|
91
90
|
// Setup network monitor before we change the viewport.
|
|
92
|
-
const networkMonitor =
|
|
91
|
+
const networkMonitor = context.driver.networkMonitor;
|
|
93
92
|
const waitForNetworkIdleResult = waitForNetworkIdle(session, networkMonitor, {
|
|
94
93
|
pretendDCLAlreadyFired: true,
|
|
95
94
|
networkQuietThresholdMs: 1000,
|
|
@@ -97,7 +96,6 @@ class FullPageScreenshot extends FRGatherer {
|
|
|
97
96
|
idleEvent: 'network-critical-idle',
|
|
98
97
|
isIdle: recorder => recorder.isCriticalIdle(),
|
|
99
98
|
});
|
|
100
|
-
await networkMonitor.enable();
|
|
101
99
|
|
|
102
100
|
await session.sendCommand('Emulation.setDeviceMetricsOverride', {
|
|
103
101
|
mobile: deviceMetrics.mobile,
|
|
@@ -113,14 +111,13 @@ class FullPageScreenshot extends FRGatherer {
|
|
|
113
111
|
waitForNetworkIdleResult.promise,
|
|
114
112
|
]);
|
|
115
113
|
waitForNetworkIdleResult.cancel();
|
|
116
|
-
await networkMonitor.disable();
|
|
117
114
|
|
|
118
115
|
// Now that new resources are (probably) fetched, wait long enough for a layout.
|
|
119
116
|
await context.driver.executionContext.evaluate(waitForDoubleRaf, {args: []});
|
|
120
117
|
}
|
|
121
118
|
|
|
122
119
|
/**
|
|
123
|
-
* @param {LH.Gatherer.
|
|
120
|
+
* @param {LH.Gatherer.Context} context
|
|
124
121
|
* @return {Promise<LH.Result.FullPageScreenshot['screenshot']>}
|
|
125
122
|
*/
|
|
126
123
|
async _takeScreenshot(context) {
|
|
@@ -150,7 +147,7 @@ class FullPageScreenshot extends FRGatherer {
|
|
|
150
147
|
* `getNodeDetails` maintains a collection of DOM objects in the page, which we can iterate
|
|
151
148
|
* to re-collect the bounding client rectangle.
|
|
152
149
|
* @see pageFunctions.getNodeDetails
|
|
153
|
-
* @param {LH.Gatherer.
|
|
150
|
+
* @param {LH.Gatherer.Context} context
|
|
154
151
|
* @return {Promise<LH.Result.FullPageScreenshot['nodes']>}
|
|
155
152
|
*/
|
|
156
153
|
async _resolveNodes(context) {
|
|
@@ -189,7 +186,7 @@ class FullPageScreenshot extends FRGatherer {
|
|
|
189
186
|
}
|
|
190
187
|
|
|
191
188
|
/**
|
|
192
|
-
* @param {LH.Gatherer.
|
|
189
|
+
* @param {LH.Gatherer.Context} context
|
|
193
190
|
* @return {Promise<LH.Artifacts['FullPageScreenshot']>}
|
|
194
191
|
*/
|
|
195
192
|
async getArtifact(context) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default GlobalListeners;
|
|
2
|
-
declare class GlobalListeners extends
|
|
2
|
+
declare class GlobalListeners extends BaseGatherer {
|
|
3
3
|
/**
|
|
4
4
|
* @param {LH.Crdp.DOMDebugger.EventListener} listener
|
|
5
5
|
* @return {listener is {type: 'pagehide'|'unload'|'visibilitychange'} & LH.Crdp.DOMDebugger.EventListener}
|
|
@@ -18,10 +18,10 @@ declare class GlobalListeners extends FRGatherer {
|
|
|
18
18
|
*/
|
|
19
19
|
dedupeListeners(listeners: LH.Artifacts['GlobalListeners']): LH.Artifacts['GlobalListeners'];
|
|
20
20
|
/**
|
|
21
|
-
* @param {LH.Gatherer.
|
|
21
|
+
* @param {LH.Gatherer.Context} passContext
|
|
22
22
|
* @return {Promise<LH.Artifacts['GlobalListeners']>}
|
|
23
23
|
*/
|
|
24
|
-
getArtifact(passContext: LH.Gatherer.
|
|
24
|
+
getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts['GlobalListeners']>;
|
|
25
25
|
}
|
|
26
|
-
import
|
|
26
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
27
27
|
//# sourceMappingURL=global-listeners.d.ts.map
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
import log from 'lighthouse-logger';
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
17
17
|
|
|
18
|
-
class GlobalListeners extends
|
|
18
|
+
class GlobalListeners extends BaseGatherer {
|
|
19
19
|
/** @type {LH.Gatherer.GathererMeta} */
|
|
20
20
|
meta = {
|
|
21
21
|
supportedModes: ['snapshot', 'timespan', 'navigation'],
|
|
@@ -57,7 +57,7 @@ class GlobalListeners extends FRGatherer {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
* @param {LH.Gatherer.
|
|
60
|
+
* @param {LH.Gatherer.Context} passContext
|
|
61
61
|
* @return {Promise<LH.Artifacts['GlobalListeners']>}
|
|
62
62
|
*/
|
|
63
63
|
async getArtifact(passContext) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export default IFrameElements;
|
|
2
|
-
declare class IFrameElements extends
|
|
2
|
+
declare class IFrameElements extends BaseGatherer {
|
|
3
3
|
/**
|
|
4
|
-
* @param {LH.Gatherer.
|
|
4
|
+
* @param {LH.Gatherer.Context} passContext
|
|
5
5
|
* @return {Promise<LH.Artifacts['IFrameElements']>}
|
|
6
6
|
* @override
|
|
7
7
|
*/
|
|
8
|
-
override getArtifact(passContext: LH.Gatherer.
|
|
8
|
+
override getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts['IFrameElements']>;
|
|
9
9
|
}
|
|
10
|
-
import
|
|
10
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
11
11
|
//# sourceMappingURL=iframe-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
|
|
|
12
12
|
/* eslint-env browser, node */
|
|
@@ -37,14 +37,14 @@ function collectIFrameElements() {
|
|
|
37
37
|
}
|
|
38
38
|
/* c8 ignore stop */
|
|
39
39
|
|
|
40
|
-
class IFrameElements extends
|
|
40
|
+
class IFrameElements extends BaseGatherer {
|
|
41
41
|
/** @type {LH.Gatherer.GathererMeta} */
|
|
42
42
|
meta = {
|
|
43
43
|
supportedModes: ['snapshot', 'navigation'],
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* @param {LH.Gatherer.
|
|
47
|
+
* @param {LH.Gatherer.Context} passContext
|
|
48
48
|
* @return {Promise<LH.Artifacts['IFrameElements']>}
|
|
49
49
|
* @override
|
|
50
50
|
*/
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
export default ImageElements;
|
|
2
|
-
declare class ImageElements extends
|
|
2
|
+
declare class ImageElements extends BaseGatherer {
|
|
3
3
|
/** @type {Map<string, {naturalWidth: number, naturalHeight: number}>} */
|
|
4
4
|
_naturalSizeCache: Map<string, {
|
|
5
5
|
naturalWidth: number;
|
|
6
6
|
naturalHeight: number;
|
|
7
7
|
}>;
|
|
8
8
|
/**
|
|
9
|
-
* @param {LH.Gatherer.
|
|
9
|
+
* @param {LH.Gatherer.Driver} driver
|
|
10
10
|
* @param {LH.Artifacts.ImageElement} element
|
|
11
11
|
*/
|
|
12
|
-
fetchElementWithSizeInformation(driver: LH.Gatherer.
|
|
12
|
+
fetchElementWithSizeInformation(driver: LH.Gatherer.Driver, element: LH.Artifacts.ImageElement): Promise<void>;
|
|
13
13
|
/**
|
|
14
14
|
* Images might be sized via CSS. In order to compute unsized-images failures, we need to collect
|
|
15
15
|
* matched CSS rules to see if this is the case.
|
|
16
16
|
* @url http://go/dwoqq (googlers only)
|
|
17
|
-
* @param {LH.Gatherer.
|
|
17
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
18
18
|
* @param {string} devtoolsNodePath
|
|
19
19
|
* @param {LH.Artifacts.ImageElement} element
|
|
20
20
|
*/
|
|
21
|
-
fetchSourceRules(session: LH.Gatherer.
|
|
21
|
+
fetchSourceRules(session: LH.Gatherer.ProtocolSession, devtoolsNodePath: string, element: LH.Artifacts.ImageElement): Promise<void>;
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
|
-
* @param {LH.Gatherer.
|
|
24
|
+
* @param {LH.Gatherer.Driver} driver
|
|
25
25
|
* @param {LH.Artifacts.ImageElement[]} elements
|
|
26
26
|
*/
|
|
27
|
-
collectExtraDetails(driver: LH.Gatherer.
|
|
27
|
+
collectExtraDetails(driver: LH.Gatherer.Driver, elements: LH.Artifacts.ImageElement[]): Promise<void>;
|
|
28
28
|
/**
|
|
29
|
-
* @param {LH.Gatherer.
|
|
29
|
+
* @param {LH.Gatherer.Context} context
|
|
30
30
|
* @return {Promise<LH.Artifacts['ImageElements']>}
|
|
31
31
|
*/
|
|
32
|
-
getArtifact(context: LH.Gatherer.
|
|
32
|
+
getArtifact(context: LH.Gatherer.Context): Promise<LH.Artifacts['ImageElements']>;
|
|
33
33
|
}
|
|
34
|
-
import
|
|
34
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
35
35
|
//# sourceMappingURL=image-elements.d.ts.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import log from 'lighthouse-logger';
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
15
15
|
import {pageFunctions} from '../../lib/page-functions.js';
|
|
16
16
|
import * as FontSize from './seo/font-size.js';
|
|
17
17
|
|
|
@@ -235,7 +235,7 @@ function getPixelArea(element) {
|
|
|
235
235
|
return element.displayedHeight * element.displayedWidth;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
class ImageElements extends
|
|
238
|
+
class ImageElements extends BaseGatherer {
|
|
239
239
|
/** @type {LH.Gatherer.GathererMeta} */
|
|
240
240
|
meta = {
|
|
241
241
|
supportedModes: ['snapshot', 'timespan', 'navigation'],
|
|
@@ -248,7 +248,7 @@ class ImageElements extends FRGatherer {
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
/**
|
|
251
|
-
* @param {LH.Gatherer.
|
|
251
|
+
* @param {LH.Gatherer.Driver} driver
|
|
252
252
|
* @param {LH.Artifacts.ImageElement} element
|
|
253
253
|
*/
|
|
254
254
|
async fetchElementWithSizeInformation(driver, element) {
|
|
@@ -276,7 +276,7 @@ class ImageElements extends FRGatherer {
|
|
|
276
276
|
* Images might be sized via CSS. In order to compute unsized-images failures, we need to collect
|
|
277
277
|
* matched CSS rules to see if this is the case.
|
|
278
278
|
* @url http://go/dwoqq (googlers only)
|
|
279
|
-
* @param {LH.Gatherer.
|
|
279
|
+
* @param {LH.Gatherer.ProtocolSession} session
|
|
280
280
|
* @param {string} devtoolsNodePath
|
|
281
281
|
* @param {LH.Artifacts.ImageElement} element
|
|
282
282
|
*/
|
|
@@ -302,7 +302,7 @@ class ImageElements extends FRGatherer {
|
|
|
302
302
|
|
|
303
303
|
/**
|
|
304
304
|
*
|
|
305
|
-
* @param {LH.Gatherer.
|
|
305
|
+
* @param {LH.Gatherer.Driver} driver
|
|
306
306
|
* @param {LH.Artifacts.ImageElement[]} elements
|
|
307
307
|
*/
|
|
308
308
|
async collectExtraDetails(driver, elements) {
|
|
@@ -334,7 +334,7 @@ class ImageElements extends FRGatherer {
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
|
-
* @param {LH.Gatherer.
|
|
337
|
+
* @param {LH.Gatherer.Context} context
|
|
338
338
|
* @return {Promise<LH.Artifacts['ImageElements']>}
|
|
339
339
|
*/
|
|
340
340
|
async getArtifact(context) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export default Inputs;
|
|
2
|
-
declare class Inputs extends
|
|
2
|
+
declare class Inputs extends BaseGatherer {
|
|
3
3
|
/**
|
|
4
|
-
* @param {LH.Gatherer.
|
|
4
|
+
* @param {LH.Gatherer.Context} passContext
|
|
5
5
|
* @return {Promise<LH.Artifacts['Inputs']>}
|
|
6
6
|
*/
|
|
7
|
-
getArtifact(passContext: LH.Gatherer.
|
|
7
|
+
getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts['Inputs']>;
|
|
8
8
|
}
|
|
9
|
-
import
|
|
9
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
10
10
|
//# sourceMappingURL=inputs.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
|
|
|
12
12
|
/* eslint-env browser, node */
|
|
@@ -93,14 +93,14 @@ function collectElements() {
|
|
|
93
93
|
}
|
|
94
94
|
/* c8 ignore stop */
|
|
95
95
|
|
|
96
|
-
class Inputs extends
|
|
96
|
+
class Inputs extends BaseGatherer {
|
|
97
97
|
/** @type {LH.Gatherer.GathererMeta} */
|
|
98
98
|
meta = {
|
|
99
99
|
supportedModes: ['snapshot', 'navigation'],
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
* @param {LH.Gatherer.
|
|
103
|
+
* @param {LH.Gatherer.Context} passContext
|
|
104
104
|
* @return {Promise<LH.Artifacts['Inputs']>}
|
|
105
105
|
*/
|
|
106
106
|
async getArtifact(passContext) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default InspectorIssues;
|
|
2
|
-
declare class InspectorIssues extends
|
|
2
|
+
declare class InspectorIssues extends BaseGatherer {
|
|
3
3
|
/** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
|
|
4
4
|
meta: LH.Gatherer.GathererMeta<'DevtoolsLog'>;
|
|
5
5
|
/** @type {Array<LH.Crdp.Audits.InspectorIssue>} */
|
|
@@ -10,29 +10,18 @@ declare class InspectorIssues extends FRGatherer {
|
|
|
10
10
|
*/
|
|
11
11
|
onIssueAdded(entry: LH.Crdp.Audits.IssueAddedEvent): void;
|
|
12
12
|
/**
|
|
13
|
-
* @param {LH.Gatherer.
|
|
13
|
+
* @param {LH.Gatherer.Context} context
|
|
14
14
|
*/
|
|
15
|
-
startInstrumentation(context: LH.Gatherer.
|
|
15
|
+
startInstrumentation(context: LH.Gatherer.Context): Promise<void>;
|
|
16
16
|
/**
|
|
17
|
-
* @param {LH.Gatherer.
|
|
17
|
+
* @param {LH.Gatherer.Context} context
|
|
18
18
|
*/
|
|
19
|
-
stopInstrumentation(context: LH.Gatherer.
|
|
19
|
+
stopInstrumentation(context: LH.Gatherer.Context): Promise<void>;
|
|
20
20
|
/**
|
|
21
|
-
* @param {
|
|
21
|
+
* @param {LH.Gatherer.Context<'DevtoolsLog'>} context
|
|
22
22
|
* @return {Promise<LH.Artifacts['InspectorIssues']>}
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @param {LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>} context
|
|
27
|
-
* @return {Promise<LH.Artifacts['InspectorIssues']>}
|
|
28
|
-
*/
|
|
29
|
-
getArtifact(context: LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>): Promise<LH.Artifacts['InspectorIssues']>;
|
|
30
|
-
/**
|
|
31
|
-
* @param {LH.Gatherer.PassContext} passContext
|
|
32
|
-
* @param {LH.Gatherer.LoadData} loadData
|
|
33
|
-
* @return {Promise<LH.Artifacts['InspectorIssues']>}
|
|
34
|
-
*/
|
|
35
|
-
afterPass(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData): Promise<LH.Artifacts['InspectorIssues']>;
|
|
24
|
+
getArtifact(context: LH.Gatherer.Context<'DevtoolsLog'>): Promise<LH.Artifacts['InspectorIssues']>;
|
|
36
25
|
}
|
|
37
|
-
import
|
|
26
|
+
import BaseGatherer from '../base-gatherer.js';
|
|
38
27
|
//# sourceMappingURL=inspector-issues.d.ts.map
|