lighthouse 12.4.0-dev.20250317 → 12.4.0-dev.20250319
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/core/audits/audit.js +2 -1
- package/core/audits/bootup-time.js +1 -1
- package/core/audits/byte-efficiency/efficient-animated-content.js +1 -1
- package/core/audits/byte-efficiency/legacy-javascript.d.ts +0 -62
- package/core/audits/byte-efficiency/legacy-javascript.js +9 -357
- package/core/audits/byte-efficiency/modern-image-formats.js +1 -1
- package/core/audits/byte-efficiency/offscreen-images.js +3 -3
- package/core/audits/byte-efficiency/render-blocking-resources.js +5 -3
- package/core/audits/byte-efficiency/unminified-css.js +2 -1
- package/core/audits/byte-efficiency/unminified-javascript.js +2 -1
- package/core/audits/byte-efficiency/unused-css-rules.js +1 -1
- package/core/audits/byte-efficiency/unused-javascript.js +1 -1
- package/core/audits/byte-efficiency/uses-long-cache-ttl.js +1 -1
- package/core/audits/byte-efficiency/uses-optimized-images.js +1 -1
- package/core/audits/byte-efficiency/uses-responsive-images.js +1 -1
- package/core/audits/byte-efficiency/uses-text-compression.js +2 -1
- package/core/audits/critical-request-chains.js +4 -3
- package/core/audits/dobetterweb/dom-size.js +1 -1
- package/core/audits/dobetterweb/uses-http2.js +1 -1
- package/core/audits/insights/cls-culprits-insight.js +1 -1
- package/core/audits/insights/document-latency-insight.js +1 -1
- package/core/audits/insights/dom-size-insight.js +1 -1
- package/core/audits/insights/duplicated-javascript-insight.d.ts +11 -0
- package/core/audits/insights/duplicated-javascript-insight.js +54 -0
- package/core/audits/insights/font-display-insight.js +1 -1
- package/core/audits/insights/forced-reflow-insight.d.ts +10 -0
- package/core/audits/insights/forced-reflow-insight.js +64 -12
- package/core/audits/insights/image-delivery-insight.js +1 -1
- package/core/audits/insights/insight-audit.js +2 -1
- package/core/audits/insights/interaction-to-next-paint-insight.js +1 -1
- package/core/audits/insights/lcp-discovery-insight.js +1 -1
- package/core/audits/insights/lcp-phases-insight.js +1 -1
- package/core/audits/insights/network-dependency-tree-insight.js +1 -1
- package/core/audits/insights/render-blocking-insight.js +1 -1
- package/core/audits/insights/slow-css-selector-insight.js +1 -1
- package/core/audits/insights/third-parties-insight.js +1 -1
- package/core/audits/insights/{duplicate-javascript-insight.d.ts → use-cache-insight.d.ts} +3 -3
- package/core/audits/insights/{duplicate-javascript-insight.js → use-cache-insight.js} +6 -6
- package/core/audits/insights/viewport-insight.js +1 -1
- package/core/audits/largest-contentful-paint-element.js +3 -2
- package/core/audits/layout-shifts.js +4 -2
- package/core/audits/lcp-lazy-loaded.js +1 -1
- package/core/audits/long-tasks.js +4 -4
- package/core/audits/mainthread-work-breakdown.js +1 -1
- package/core/audits/metrics/first-contentful-paint.js +2 -2
- package/core/audits/metrics/interactive.js +2 -2
- package/core/audits/metrics/largest-contentful-paint.js +3 -2
- package/core/audits/metrics/max-potential-fid.js +2 -2
- package/core/audits/metrics/speed-index.js +2 -2
- package/core/audits/metrics/total-blocking-time.js +2 -2
- package/core/audits/metrics.js +4 -3
- package/core/audits/predictive-perf.js +3 -3
- package/core/audits/prioritize-lcp-image.js +4 -3
- package/core/audits/redirects.js +3 -2
- package/core/audits/script-treemap-data.js +1 -1
- package/core/audits/third-party-facades.js +1 -1
- package/core/audits/third-party-summary.js +1 -1
- package/core/audits/uses-rel-preconnect.js +6 -5
- package/core/audits/uses-rel-preload.js +3 -3
- package/core/computed/critical-request-chains.d.ts +3 -1
- package/core/computed/critical-request-chains.js +3 -3
- package/core/computed/metrics/first-contentful-paint-all-frames.js +1 -1
- package/core/computed/metrics/first-contentful-paint.js +1 -1
- package/core/computed/metrics/interactive.js +1 -1
- package/core/computed/metrics/lantern-first-contentful-paint.js +1 -1
- package/core/computed/metrics/lantern-interactive.js +1 -1
- package/core/computed/metrics/lantern-largest-contentful-paint.js +1 -1
- package/core/computed/metrics/lantern-max-potential-fid.js +1 -1
- package/core/computed/metrics/lantern-speed-index.js +1 -1
- package/core/computed/metrics/lantern-total-blocking-time.js +1 -1
- package/core/computed/metrics/largest-contentful-paint-all-frames.js +1 -1
- package/core/computed/metrics/largest-contentful-paint.js +1 -1
- package/core/computed/metrics/lcp-breakdown.js +1 -1
- package/core/computed/metrics/max-potential-fid.js +1 -1
- package/core/computed/metrics/metric.js +1 -0
- package/core/computed/metrics/speed-index.js +1 -1
- package/core/computed/metrics/time-to-first-byte.js +1 -1
- package/core/computed/metrics/timing-summary.d.ts +5 -2
- package/core/computed/metrics/timing-summary.js +6 -4
- package/core/computed/metrics/total-blocking-time.js +1 -1
- package/core/computed/navigation-insights.d.ts +3 -1
- package/core/computed/navigation-insights.js +6 -4
- package/core/computed/page-dependency-graph.d.ts +3 -1
- package/core/computed/page-dependency-graph.js +5 -4
- package/core/computed/tbt-impact-tasks.js +1 -1
- package/core/computed/trace-engine-result.d.ts +5 -2
- package/core/computed/trace-engine-result.js +18 -4
- package/core/config/default-config.js +4 -2
- package/core/config/experimental-config.js +2 -1
- package/core/gather/gatherers/source-maps.d.ts +1 -0
- package/core/gather/gatherers/source-maps.js +3 -0
- package/core/gather/gatherers/trace-elements.d.ts +4 -4
- package/core/gather/gatherers/trace-elements.js +7 -4
- package/core/gather/gatherers/trace.js +5 -0
- package/core/lib/legacy-javascript/legacy-javascript.d.ts +29 -0
- package/core/lib/legacy-javascript/legacy-javascript.js +351 -0
- package/package.json +3 -2
- package/shared/localization/locales/ar-XB.json +235 -1
- package/shared/localization/locales/ar.json +235 -7
- package/shared/localization/locales/bg.json +235 -7
- package/shared/localization/locales/ca.json +235 -7
- package/shared/localization/locales/cs.json +234 -6
- package/shared/localization/locales/da.json +236 -8
- package/shared/localization/locales/de.json +234 -6
- package/shared/localization/locales/el.json +235 -7
- package/shared/localization/locales/en-GB.json +235 -19
- package/shared/localization/locales/en-US.json +30 -3
- package/shared/localization/locales/en-XA.json +0 -6
- package/shared/localization/locales/en-XL.json +30 -3
- package/shared/localization/locales/es-419.json +235 -7
- package/shared/localization/locales/es.json +234 -6
- package/shared/localization/locales/fi.json +235 -7
- package/shared/localization/locales/fil.json +237 -3
- package/shared/localization/locales/fr.json +236 -8
- package/shared/localization/locales/he.json +234 -0
- package/shared/localization/locales/hi.json +236 -2
- package/shared/localization/locales/hr.json +235 -7
- package/shared/localization/locales/hu.json +235 -7
- package/shared/localization/locales/id.json +234 -0
- package/shared/localization/locales/it.json +238 -10
- package/shared/localization/locales/ja.json +234 -6
- package/shared/localization/locales/ko.json +235 -16
- package/shared/localization/locales/lt.json +235 -7
- package/shared/localization/locales/lv.json +236 -8
- package/shared/localization/locales/nl.json +235 -4
- package/shared/localization/locales/no.json +235 -7
- package/shared/localization/locales/pl.json +236 -8
- package/shared/localization/locales/pt-PT.json +235 -1
- package/shared/localization/locales/pt.json +235 -1
- package/shared/localization/locales/ro.json +234 -0
- package/shared/localization/locales/ru.json +235 -1
- package/shared/localization/locales/sk.json +235 -1
- package/shared/localization/locales/sl.json +236 -2
- package/shared/localization/locales/sr-Latn.json +235 -1
- package/shared/localization/locales/sr.json +235 -1
- package/shared/localization/locales/sv.json +235 -1
- package/shared/localization/locales/ta.json +235 -1
- package/shared/localization/locales/te.json +237 -3
- package/shared/localization/locales/th.json +235 -1
- package/shared/localization/locales/tr.json +236 -2
- package/shared/localization/locales/uk.json +235 -1
- package/shared/localization/locales/vi.json +236 -2
- package/shared/localization/locales/zh-HK.json +235 -1
- package/shared/localization/locales/zh-TW.json +236 -2
- package/shared/localization/locales/zh.json +234 -0
- package/tsconfig.json +2 -1
- package/types/artifacts.d.ts +1 -0
- /package/core/{audits/byte-efficiency → lib/legacy-javascript}/polyfill-graph-data.json +0 -0
- /package/core/{audits/byte-efficiency → lib/legacy-javascript}/polyfill-module-data.json +0 -0
|
@@ -27,7 +27,7 @@ class TotalBlockingTime extends Audit {
|
|
|
27
27
|
title: str_(i18n.UIStrings.totalBlockingTimeMetric),
|
|
28
28
|
description: str_(UIStrings.description),
|
|
29
29
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
30
|
-
requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL'],
|
|
30
|
+
requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'SourceMaps'],
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -89,7 +89,7 @@ class TotalBlockingTime extends Audit {
|
|
|
89
89
|
const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
|
|
90
90
|
const gatherContext = artifacts.GatherContext;
|
|
91
91
|
const metricComputationData = {trace, devtoolsLog, gatherContext,
|
|
92
|
-
settings: context.settings, URL: artifacts.URL};
|
|
92
|
+
settings: context.settings, URL: artifacts.URL, SourceMaps: artifacts.SourceMaps};
|
|
93
93
|
if (
|
|
94
94
|
gatherContext.gatherMode === 'timespan' &&
|
|
95
95
|
context.settings.throttlingMethod === 'simulate'
|
package/core/audits/metrics.js
CHANGED
|
@@ -26,7 +26,7 @@ class Metrics extends Audit {
|
|
|
26
26
|
title: 'Metrics',
|
|
27
27
|
description: 'Collects all available metrics.',
|
|
28
28
|
supportedModes: ['navigation'],
|
|
29
|
-
requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL'],
|
|
29
|
+
requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'SourceMaps'],
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -36,12 +36,13 @@ class Metrics extends Audit {
|
|
|
36
36
|
* @return {Promise<LH.Audit.Product>}
|
|
37
37
|
*/
|
|
38
38
|
static async audit(artifacts, context) {
|
|
39
|
+
const settings = context.settings;
|
|
39
40
|
const gatherContext = artifacts.GatherContext;
|
|
40
41
|
const trace = artifacts.traces[Audit.DEFAULT_PASS];
|
|
41
42
|
const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
|
|
42
|
-
const URL = artifacts
|
|
43
|
+
const {URL, SourceMaps} = artifacts;
|
|
43
44
|
const summary = await TimingSummary
|
|
44
|
-
.request({trace, devtoolsLog, gatherContext, settings
|
|
45
|
+
.request({trace, devtoolsLog, gatherContext, settings, URL, SourceMaps}, context);
|
|
45
46
|
const metrics = summary.metrics;
|
|
46
47
|
const debugInfo = summary.debugInfo;
|
|
47
48
|
|
|
@@ -33,7 +33,7 @@ class PredictivePerf extends Audit {
|
|
|
33
33
|
'a cellular connection on a mobile device.',
|
|
34
34
|
scoreDisplayMode: Audit.SCORING_MODES.NUMERIC,
|
|
35
35
|
supportedModes: ['navigation'],
|
|
36
|
-
requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL'],
|
|
36
|
+
requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'SourceMaps'],
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -46,10 +46,10 @@ class PredictivePerf extends Audit {
|
|
|
46
46
|
const gatherContext = artifacts.GatherContext;
|
|
47
47
|
const trace = artifacts.traces[Audit.DEFAULT_PASS];
|
|
48
48
|
const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
|
|
49
|
-
const URL = artifacts
|
|
49
|
+
const {URL, SourceMaps} = artifacts;
|
|
50
50
|
/** @type {LH.Config.Settings} */
|
|
51
51
|
const settings = JSON.parse(JSON.stringify(defaultSettings)); // Use default settings.
|
|
52
|
-
const computationData = {trace, devtoolsLog, gatherContext, settings, URL};
|
|
52
|
+
const computationData = {trace, devtoolsLog, gatherContext, settings, URL, SourceMaps};
|
|
53
53
|
const fcp = await LanternFirstContentfulPaint.request(computationData, context);
|
|
54
54
|
const tti = await LanternInteractive.request(computationData, context);
|
|
55
55
|
const si = await LanternSpeedIndex.request(computationData, context);
|
|
@@ -38,7 +38,8 @@ class PrioritizeLcpImage extends Audit {
|
|
|
38
38
|
description: str_(UIStrings.description),
|
|
39
39
|
supportedModes: ['navigation'],
|
|
40
40
|
guidanceLevel: 4,
|
|
41
|
-
requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'TraceElements'
|
|
41
|
+
requiredArtifacts: ['traces', 'devtoolsLogs', 'GatherContext', 'URL', 'TraceElements',
|
|
42
|
+
'SourceMaps'],
|
|
42
43
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
43
44
|
};
|
|
44
45
|
}
|
|
@@ -237,9 +238,9 @@ class PrioritizeLcpImage extends Audit {
|
|
|
237
238
|
const gatherContext = artifacts.GatherContext;
|
|
238
239
|
const trace = artifacts.traces[PrioritizeLcpImage.DEFAULT_PASS];
|
|
239
240
|
const devtoolsLog = artifacts.devtoolsLogs[PrioritizeLcpImage.DEFAULT_PASS];
|
|
240
|
-
const URL = artifacts
|
|
241
|
+
const {URL, SourceMaps} = artifacts;
|
|
241
242
|
const settings = context.settings;
|
|
242
|
-
const metricData = {trace, devtoolsLog, gatherContext, settings, URL};
|
|
243
|
+
const metricData = {trace, devtoolsLog, gatherContext, settings, URL, SourceMaps};
|
|
243
244
|
const lcpElement = artifacts.TraceElements
|
|
244
245
|
.find(element => element.traceEventType === 'largest-contentful-paint');
|
|
245
246
|
|
package/core/audits/redirects.js
CHANGED
|
@@ -31,7 +31,7 @@ class Redirects extends Audit {
|
|
|
31
31
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
32
32
|
supportedModes: ['navigation'],
|
|
33
33
|
guidanceLevel: 2,
|
|
34
|
-
requiredArtifacts: ['URL', 'GatherContext', 'devtoolsLogs', 'traces'],
|
|
34
|
+
requiredArtifacts: ['URL', 'GatherContext', 'devtoolsLogs', 'traces', 'SourceMaps'],
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -87,12 +87,13 @@ class Redirects extends Audit {
|
|
|
87
87
|
const trace = artifacts.traces[Audit.DEFAULT_PASS];
|
|
88
88
|
const devtoolsLog = artifacts.devtoolsLogs[Audit.DEFAULT_PASS];
|
|
89
89
|
const gatherContext = artifacts.GatherContext;
|
|
90
|
+
const {URL, SourceMaps} = artifacts;
|
|
90
91
|
|
|
91
92
|
const processedTrace = await ProcessedTrace.request(trace, context);
|
|
92
93
|
const networkRecords = await NetworkRecords.request(devtoolsLog, context);
|
|
93
94
|
const documentRequests = Redirects.getDocumentRequestChain(networkRecords, processedTrace);
|
|
94
95
|
|
|
95
|
-
const metricComputationData = {trace, devtoolsLog, gatherContext, settings, URL
|
|
96
|
+
const metricComputationData = {trace, devtoolsLog, gatherContext, settings, URL, SourceMaps};
|
|
96
97
|
const metricResult = await LanternInteractive.request(metricComputationData, context);
|
|
97
98
|
|
|
98
99
|
/** @type {Map<string, LH.Gatherer.Simulation.NodeTiming>} */
|
|
@@ -31,7 +31,7 @@ class ScriptTreemapDataAudit extends Audit {
|
|
|
31
31
|
title: 'Script Treemap Data',
|
|
32
32
|
description: 'Used for treemap app',
|
|
33
33
|
requiredArtifacts:
|
|
34
|
-
['traces', 'devtoolsLogs', 'SourceMaps', 'Scripts', 'JsUsage', 'URL'],
|
|
34
|
+
['traces', 'devtoolsLogs', 'SourceMaps', 'Scripts', 'JsUsage', 'URL', 'SourceMaps'],
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -87,7 +87,7 @@ class ThirdPartyFacades extends Audit {
|
|
|
87
87
|
description: str_(UIStrings.description),
|
|
88
88
|
supportedModes: ['navigation'],
|
|
89
89
|
guidanceLevel: 3,
|
|
90
|
-
requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'GatherContext'],
|
|
90
|
+
requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'GatherContext', 'SourceMaps'],
|
|
91
91
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
92
92
|
};
|
|
93
93
|
}
|
|
@@ -67,7 +67,7 @@ class ThirdPartySummary extends Audit {
|
|
|
67
67
|
description: str_(UIStrings.description),
|
|
68
68
|
guidanceLevel: 1,
|
|
69
69
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
70
|
-
requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'GatherContext'],
|
|
70
|
+
requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'GatherContext', 'SourceMaps'],
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -62,7 +62,7 @@ class UsesRelPreconnectAudit extends Audit {
|
|
|
62
62
|
description: str_(UIStrings.description),
|
|
63
63
|
supportedModes: ['navigation'],
|
|
64
64
|
guidanceLevel: 3,
|
|
65
|
-
requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'LinkElements'],
|
|
65
|
+
requiredArtifacts: ['traces', 'devtoolsLogs', 'URL', 'LinkElements', 'SourceMaps'],
|
|
66
66
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
67
67
|
};
|
|
68
68
|
}
|
|
@@ -125,6 +125,7 @@ class UsesRelPreconnectAudit extends Audit {
|
|
|
125
125
|
const trace = artifacts.traces[UsesRelPreconnectAudit.DEFAULT_PASS];
|
|
126
126
|
const devtoolsLog = artifacts.devtoolsLogs[UsesRelPreconnectAudit.DEFAULT_PASS];
|
|
127
127
|
const settings = context.settings;
|
|
128
|
+
const {URL, SourceMaps} = artifacts;
|
|
128
129
|
|
|
129
130
|
let maxWastedLcp = 0;
|
|
130
131
|
let maxWastedFcp = 0;
|
|
@@ -134,15 +135,15 @@ class UsesRelPreconnectAudit extends Audit {
|
|
|
134
135
|
const [networkRecords, mainResource, loadSimulator, processedNavigation, pageGraph] =
|
|
135
136
|
await Promise.all([
|
|
136
137
|
NetworkRecords.request(devtoolsLog, context),
|
|
137
|
-
MainResource.request({devtoolsLog, URL
|
|
138
|
+
MainResource.request({devtoolsLog, URL}, context),
|
|
138
139
|
LoadSimulator.request({devtoolsLog, settings}, context),
|
|
139
140
|
ProcessedNavigation.request(trace, context),
|
|
140
|
-
PageDependencyGraph.request({settings, trace, devtoolsLog, URL
|
|
141
|
+
PageDependencyGraph.request({settings, trace, devtoolsLog, URL, SourceMaps}, context),
|
|
141
142
|
]);
|
|
142
143
|
|
|
143
144
|
const {rtt, additionalRttByOrigin} = loadSimulator.getOptions();
|
|
144
145
|
const lcpGraph =
|
|
145
|
-
|
|
146
|
+
LanternLargestContentfulPaint.getPessimisticGraph(pageGraph, processedNavigation);
|
|
146
147
|
/** @type {Set<string>} */
|
|
147
148
|
const lcpGraphURLs = new Set();
|
|
148
149
|
lcpGraph.traverse(node => {
|
|
@@ -150,7 +151,7 @@ class UsesRelPreconnectAudit extends Audit {
|
|
|
150
151
|
});
|
|
151
152
|
|
|
152
153
|
const fcpGraph =
|
|
153
|
-
|
|
154
|
+
LanternFirstContentfulPaint.getPessimisticGraph(pageGraph, processedNavigation);
|
|
154
155
|
const fcpGraphURLs = new Set();
|
|
155
156
|
fcpGraph.traverse(node => {
|
|
156
157
|
if (node.type === 'network') fcpGraphURLs.add(node.request.url);
|
|
@@ -44,7 +44,7 @@ class UsesRelPreloadAudit extends Audit {
|
|
|
44
44
|
description: str_(UIStrings.description),
|
|
45
45
|
supportedModes: ['navigation'],
|
|
46
46
|
guidanceLevel: 3,
|
|
47
|
-
requiredArtifacts: ['devtoolsLogs', 'traces', 'URL'],
|
|
47
|
+
requiredArtifacts: ['devtoolsLogs', 'traces', 'URL', 'SourceMaps'],
|
|
48
48
|
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
49
49
|
};
|
|
50
50
|
}
|
|
@@ -215,12 +215,12 @@ class UsesRelPreloadAudit extends Audit {
|
|
|
215
215
|
const settings = context.settings;
|
|
216
216
|
const trace = artifacts.traces[UsesRelPreloadAudit.DEFAULT_PASS];
|
|
217
217
|
const devtoolsLog = artifacts.devtoolsLogs[UsesRelPreloadAudit.DEFAULT_PASS];
|
|
218
|
-
const URL = artifacts
|
|
218
|
+
const {URL, SourceMaps} = artifacts;
|
|
219
219
|
const simulatorOptions = {devtoolsLog, settings: context.settings};
|
|
220
220
|
|
|
221
221
|
const [mainResource, graph, simulator] = await Promise.all([
|
|
222
222
|
MainResource.request({devtoolsLog, URL}, context),
|
|
223
|
-
PageDependencyGraph.request({settings, trace, devtoolsLog, URL}, context),
|
|
223
|
+
PageDependencyGraph.request({settings, trace, devtoolsLog, URL, SourceMaps}, context),
|
|
224
224
|
LoadSimulator.request(simulatorOptions, context),
|
|
225
225
|
]);
|
|
226
226
|
|
|
@@ -2,6 +2,7 @@ export { CriticalRequestChainsComputed as CriticalRequestChains };
|
|
|
2
2
|
declare const CriticalRequestChainsComputed: typeof CriticalRequestChains & {
|
|
3
3
|
request: (dependencies: {
|
|
4
4
|
URL: LH.Artifacts["URL"];
|
|
5
|
+
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
5
6
|
devtoolsLog: LH.DevtoolsLog;
|
|
6
7
|
trace: LH.Trace;
|
|
7
8
|
settings: LH.Audit.Context["settings"];
|
|
@@ -25,12 +26,13 @@ declare class CriticalRequestChains {
|
|
|
25
26
|
*/
|
|
26
27
|
static extractChainsFromGraph(mainResource: LH.Artifacts.NetworkRequest, graph: LH.Gatherer.Simulation.GraphNode): LH.Artifacts.CriticalRequestNode;
|
|
27
28
|
/**
|
|
28
|
-
* @param {{URL: LH.Artifacts['URL'], devtoolsLog: LH.DevtoolsLog, trace: LH.Trace, settings: LH.Audit.Context['settings']}} data
|
|
29
|
+
* @param {{URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps'], devtoolsLog: LH.DevtoolsLog, trace: LH.Trace, settings: LH.Audit.Context['settings']}} data
|
|
29
30
|
* @param {LH.Artifacts.ComputedContext} context
|
|
30
31
|
* @return {Promise<LH.Artifacts.CriticalRequestNode>}
|
|
31
32
|
*/
|
|
32
33
|
static compute_(data: {
|
|
33
34
|
URL: LH.Artifacts["URL"];
|
|
35
|
+
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
34
36
|
devtoolsLog: LH.DevtoolsLog;
|
|
35
37
|
trace: LH.Trace;
|
|
36
38
|
settings: LH.Audit.Context["settings"];
|
|
@@ -126,7 +126,7 @@ class CriticalRequestChains {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
|
-
* @param {{URL: LH.Artifacts['URL'], devtoolsLog: LH.DevtoolsLog, trace: LH.Trace, settings: LH.Audit.Context['settings']}} data
|
|
129
|
+
* @param {{URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps'], devtoolsLog: LH.DevtoolsLog, trace: LH.Trace, settings: LH.Audit.Context['settings']}} data
|
|
130
130
|
* @param {LH.Artifacts.ComputedContext} context
|
|
131
131
|
* @return {Promise<LH.Artifacts.CriticalRequestNode>}
|
|
132
132
|
*/
|
|
@@ -138,6 +138,6 @@ class CriticalRequestChains {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
const CriticalRequestChainsComputed =
|
|
142
|
-
|
|
141
|
+
const CriticalRequestChainsComputed = makeComputedArtifact(CriticalRequestChains,
|
|
142
|
+
['URL', 'SourceMaps', 'devtoolsLog', 'trace', 'settings']);
|
|
143
143
|
export {CriticalRequestChainsComputed as CriticalRequestChains};
|
|
@@ -32,6 +32,6 @@ class FirstContentfulPaintAllFrames extends NavigationMetric {
|
|
|
32
32
|
|
|
33
33
|
const FirstContentfulPaintAllFramesComputed = makeComputedArtifact(
|
|
34
34
|
FirstContentfulPaintAllFrames,
|
|
35
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
35
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
36
36
|
);
|
|
37
37
|
export {FirstContentfulPaintAllFramesComputed as FirstContentfulPaintAllFrames};
|
|
@@ -35,6 +35,6 @@ class FirstContentfulPaint extends NavigationMetric {
|
|
|
35
35
|
|
|
36
36
|
const FirstContentfulPaintComputed = makeComputedArtifact(
|
|
37
37
|
FirstContentfulPaint,
|
|
38
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
38
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
39
39
|
);
|
|
40
40
|
export {FirstContentfulPaintComputed as FirstContentfulPaint};
|
|
@@ -181,7 +181,7 @@ class Interactive extends NavigationMetric {
|
|
|
181
181
|
|
|
182
182
|
const InteractiveComputed = makeComputedArtifact(
|
|
183
183
|
Interactive,
|
|
184
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
184
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
185
185
|
);
|
|
186
186
|
export {InteractiveComputed as Interactive};
|
|
187
187
|
|
|
@@ -32,6 +32,6 @@ class LanternFirstContentfulPaint extends Lantern.Metrics.FirstContentfulPaint {
|
|
|
32
32
|
|
|
33
33
|
const LanternFirstContentfulPaintComputed = makeComputedArtifact(
|
|
34
34
|
LanternFirstContentfulPaint,
|
|
35
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
35
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
36
36
|
);
|
|
37
37
|
export {LanternFirstContentfulPaintComputed as LanternFirstContentfulPaint};
|
|
@@ -34,6 +34,6 @@ class LanternInteractive extends Lantern.Metrics.Interactive {
|
|
|
34
34
|
|
|
35
35
|
const LanternInteractiveComputed = makeComputedArtifact(
|
|
36
36
|
LanternInteractive,
|
|
37
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
37
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
38
38
|
);
|
|
39
39
|
export {LanternInteractiveComputed as LanternInteractive};
|
|
@@ -34,6 +34,6 @@ class LanternLargestContentfulPaint extends Lantern.Metrics.LargestContentfulPai
|
|
|
34
34
|
|
|
35
35
|
const LanternLargestContentfulPaintComputed = makeComputedArtifact(
|
|
36
36
|
LanternLargestContentfulPaint,
|
|
37
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
37
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
38
38
|
);
|
|
39
39
|
export {LanternLargestContentfulPaintComputed as LanternLargestContentfulPaint};
|
|
@@ -34,6 +34,6 @@ class LanternMaxPotentialFID extends Lantern.Metrics.MaxPotentialFID {
|
|
|
34
34
|
|
|
35
35
|
const LanternMaxPotentialFIDComputed = makeComputedArtifact(
|
|
36
36
|
LanternMaxPotentialFID,
|
|
37
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
37
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
38
38
|
);
|
|
39
39
|
export {LanternMaxPotentialFIDComputed as LanternMaxPotentialFID};
|
|
@@ -40,6 +40,6 @@ class LanternSpeedIndex extends Lantern.Metrics.SpeedIndex {
|
|
|
40
40
|
|
|
41
41
|
const LanternSpeedIndexComputed = makeComputedArtifact(
|
|
42
42
|
LanternSpeedIndex,
|
|
43
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
43
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
44
44
|
);
|
|
45
45
|
export {LanternSpeedIndexComputed as LanternSpeedIndex};
|
|
@@ -35,6 +35,6 @@ class LanternTotalBlockingTime extends Lantern.Metrics.TotalBlockingTime {
|
|
|
35
35
|
|
|
36
36
|
const LanternTotalBlockingTimeComputed = makeComputedArtifact(
|
|
37
37
|
LanternTotalBlockingTime,
|
|
38
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
38
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
39
39
|
);
|
|
40
40
|
export {LanternTotalBlockingTimeComputed as LanternTotalBlockingTime};
|
|
@@ -40,6 +40,6 @@ class LargestContentfulPaintAllFrames extends NavigationMetric {
|
|
|
40
40
|
|
|
41
41
|
const LargestContentfulPaintAllFramesComputed = makeComputedArtifact(
|
|
42
42
|
LargestContentfulPaintAllFrames,
|
|
43
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
43
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
44
44
|
);
|
|
45
45
|
export {LargestContentfulPaintAllFramesComputed as LargestContentfulPaintAllFrames};
|
|
@@ -47,6 +47,6 @@ class LargestContentfulPaint extends NavigationMetric {
|
|
|
47
47
|
|
|
48
48
|
const LargestContentfulPaintComputed = makeComputedArtifact(
|
|
49
49
|
LargestContentfulPaint,
|
|
50
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
50
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
51
51
|
);
|
|
52
52
|
export {LargestContentfulPaintComputed as LargestContentfulPaint};
|
|
@@ -52,7 +52,7 @@ class LCPBreakdown {
|
|
|
52
52
|
|
|
53
53
|
const LCPBreakdownComputed = makeComputedArtifact(
|
|
54
54
|
LCPBreakdown,
|
|
55
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
55
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
56
56
|
);
|
|
57
57
|
export {LCPBreakdownComputed as LCPBreakdown};
|
|
58
58
|
|
|
@@ -40,6 +40,6 @@ class MaxPotentialFID extends NavigationMetric {
|
|
|
40
40
|
|
|
41
41
|
const MaxPotentialFIDComputed = makeComputedArtifact(
|
|
42
42
|
MaxPotentialFID,
|
|
43
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
43
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
44
44
|
);
|
|
45
45
|
export {MaxPotentialFIDComputed as MaxPotentialFID};
|
|
@@ -35,6 +35,6 @@ class SpeedIndex extends NavigationMetric {
|
|
|
35
35
|
|
|
36
36
|
const SpeedIndexComputed = makeComputedArtifact(
|
|
37
37
|
SpeedIndex,
|
|
38
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
38
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
39
39
|
);
|
|
40
40
|
export {SpeedIndexComputed as SpeedIndex};
|
|
@@ -58,6 +58,6 @@ class TimeToFirstByte extends NavigationMetric {
|
|
|
58
58
|
|
|
59
59
|
const TimeToFirstByteComputed = makeComputedArtifact(
|
|
60
60
|
TimeToFirstByte,
|
|
61
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
61
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
62
62
|
);
|
|
63
63
|
export {TimeToFirstByteComputed as TimeToFirstByte};
|
|
@@ -6,6 +6,7 @@ declare const TimingSummaryComputed: typeof TimingSummary & {
|
|
|
6
6
|
gatherContext: LH.Artifacts["GatherContext"];
|
|
7
7
|
settings: LH.Util.ImmutableObject<LH.Config.Settings>;
|
|
8
8
|
URL: LH.Artifacts["URL"];
|
|
9
|
+
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
9
10
|
}, context: LH.Artifacts.ComputedContext) => ReturnType<typeof TimingSummary.compute_>;
|
|
10
11
|
};
|
|
11
12
|
declare class TimingSummary {
|
|
@@ -15,15 +16,16 @@ declare class TimingSummary {
|
|
|
15
16
|
* @param {LH.Artifacts['GatherContext']} gatherContext
|
|
16
17
|
* @param {LH.Util.ImmutableObject<LH.Config.Settings>} settings
|
|
17
18
|
* @param {LH.Artifacts['URL']} URL
|
|
19
|
+
* @param {LH.Artifacts['SourceMaps']} SourceMaps
|
|
18
20
|
* @param {LH.Artifacts.ComputedContext} context
|
|
19
21
|
* @return {Promise<{metrics: LH.Artifacts.TimingSummary, debugInfo: Record<string,boolean>}>}
|
|
20
22
|
*/
|
|
21
|
-
static summarize(trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts["GatherContext"], settings: LH.Util.ImmutableObject<LH.Config.Settings>, URL: LH.Artifacts["URL"], context: LH.Artifacts.ComputedContext): Promise<{
|
|
23
|
+
static summarize(trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts["GatherContext"], settings: LH.Util.ImmutableObject<LH.Config.Settings>, URL: LH.Artifacts["URL"], SourceMaps: LH.Artifacts["SourceMaps"], context: LH.Artifacts.ComputedContext): Promise<{
|
|
22
24
|
metrics: LH.Artifacts.TimingSummary;
|
|
23
25
|
debugInfo: Record<string, boolean>;
|
|
24
26
|
}>;
|
|
25
27
|
/**
|
|
26
|
-
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts['GatherContext']; settings: LH.Util.ImmutableObject<LH.Config.Settings>, URL: LH.Artifacts['URL']}} data
|
|
28
|
+
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts['GatherContext']; settings: LH.Util.ImmutableObject<LH.Config.Settings>, URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps']}} data
|
|
27
29
|
* @param {LH.Artifacts.ComputedContext} context
|
|
28
30
|
* @return {Promise<{metrics: LH.Artifacts.TimingSummary, debugInfo: Record<string,boolean>}>}
|
|
29
31
|
*/
|
|
@@ -33,6 +35,7 @@ declare class TimingSummary {
|
|
|
33
35
|
gatherContext: LH.Artifacts["GatherContext"];
|
|
34
36
|
settings: LH.Util.ImmutableObject<LH.Config.Settings>;
|
|
35
37
|
URL: LH.Artifacts["URL"];
|
|
38
|
+
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
36
39
|
}, context: LH.Artifacts.ComputedContext): Promise<{
|
|
37
40
|
metrics: LH.Artifacts.TimingSummary;
|
|
38
41
|
debugInfo: Record<string, boolean>;
|
|
@@ -27,11 +27,12 @@ class TimingSummary {
|
|
|
27
27
|
* @param {LH.Artifacts['GatherContext']} gatherContext
|
|
28
28
|
* @param {LH.Util.ImmutableObject<LH.Config.Settings>} settings
|
|
29
29
|
* @param {LH.Artifacts['URL']} URL
|
|
30
|
+
* @param {LH.Artifacts['SourceMaps']} SourceMaps
|
|
30
31
|
* @param {LH.Artifacts.ComputedContext} context
|
|
31
32
|
* @return {Promise<{metrics: LH.Artifacts.TimingSummary, debugInfo: Record<string,boolean>}>}
|
|
32
33
|
*/
|
|
33
|
-
static async summarize(trace, devtoolsLog, gatherContext, settings, URL, context) {
|
|
34
|
-
const metricComputationData = {trace, devtoolsLog, gatherContext, settings, URL};
|
|
34
|
+
static async summarize(trace, devtoolsLog, gatherContext, settings, URL, SourceMaps, context) {
|
|
35
|
+
const metricComputationData = {trace, devtoolsLog, gatherContext, settings, URL, SourceMaps};
|
|
35
36
|
/**
|
|
36
37
|
* @template TArtifacts
|
|
37
38
|
* @template TReturn
|
|
@@ -135,7 +136,7 @@ class TimingSummary {
|
|
|
135
136
|
return {metrics, debugInfo};
|
|
136
137
|
}
|
|
137
138
|
/**
|
|
138
|
-
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts['GatherContext']; settings: LH.Util.ImmutableObject<LH.Config.Settings>, URL: LH.Artifacts['URL']}} data
|
|
139
|
+
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, gatherContext: LH.Artifacts['GatherContext']; settings: LH.Util.ImmutableObject<LH.Config.Settings>, URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps']}} data
|
|
139
140
|
* @param {LH.Artifacts.ComputedContext} context
|
|
140
141
|
* @return {Promise<{metrics: LH.Artifacts.TimingSummary, debugInfo: Record<string,boolean>}>}
|
|
141
142
|
*/
|
|
@@ -146,6 +147,7 @@ class TimingSummary {
|
|
|
146
147
|
data.gatherContext,
|
|
147
148
|
data.settings,
|
|
148
149
|
data.URL,
|
|
150
|
+
data.SourceMaps,
|
|
149
151
|
context
|
|
150
152
|
);
|
|
151
153
|
}
|
|
@@ -153,6 +155,6 @@ class TimingSummary {
|
|
|
153
155
|
|
|
154
156
|
const TimingSummaryComputed = makeComputedArtifact(
|
|
155
157
|
TimingSummary,
|
|
156
|
-
['devtoolsLog', 'gatherContext', 'settings', 'trace', 'URL']
|
|
158
|
+
['devtoolsLog', 'gatherContext', 'settings', 'trace', 'URL', 'SourceMaps']
|
|
157
159
|
);
|
|
158
160
|
export {TimingSummaryComputed as TimingSummary};
|
|
@@ -71,6 +71,6 @@ class TotalBlockingTime extends ComputedMetric {
|
|
|
71
71
|
|
|
72
72
|
const TotalBlockingTimeComputed = makeComputedArtifact(
|
|
73
73
|
TotalBlockingTime,
|
|
74
|
-
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL']
|
|
74
|
+
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
|
|
75
75
|
);
|
|
76
76
|
export {TotalBlockingTimeComputed as TotalBlockingTime};
|
|
@@ -3,6 +3,7 @@ declare const NavigationInsightsComputed: typeof NavigationInsights & {
|
|
|
3
3
|
request: (dependencies: {
|
|
4
4
|
trace: LH.Trace;
|
|
5
5
|
settings: LH.Audit.Context["settings"];
|
|
6
|
+
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
6
7
|
}, context: LH.Artifacts.ComputedContext) => ReturnType<typeof NavigationInsights.compute_>;
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
@@ -11,12 +12,13 @@ declare const NavigationInsightsComputed: typeof NavigationInsights & {
|
|
|
11
12
|
*/
|
|
12
13
|
declare class NavigationInsights {
|
|
13
14
|
/**
|
|
14
|
-
* @param {{trace: LH.Trace, settings: LH.Audit.Context['settings']}} data
|
|
15
|
+
* @param {{trace: LH.Trace, settings: LH.Audit.Context['settings'], SourceMaps: LH.Artifacts['SourceMaps']}} data
|
|
15
16
|
* @param {LH.Artifacts.ComputedContext} context
|
|
16
17
|
*/
|
|
17
18
|
static compute_(data: {
|
|
18
19
|
trace: LH.Trace;
|
|
19
20
|
settings: LH.Audit.Context["settings"];
|
|
21
|
+
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
20
22
|
}, context: LH.Artifacts.ComputedContext): Promise<import("@paulirish/trace_engine/models/trace/insights/types.js").InsightSet>;
|
|
21
23
|
}
|
|
22
24
|
//# sourceMappingURL=navigation-insights.d.ts.map
|
|
@@ -14,13 +14,14 @@ import {TraceEngineResult} from './trace-engine-result.js';
|
|
|
14
14
|
*/
|
|
15
15
|
class NavigationInsights {
|
|
16
16
|
/**
|
|
17
|
-
* @param {{trace: LH.Trace, settings: LH.Audit.Context['settings']}} data
|
|
17
|
+
* @param {{trace: LH.Trace, settings: LH.Audit.Context['settings'], SourceMaps: LH.Artifacts['SourceMaps']}} data
|
|
18
18
|
* @param {LH.Artifacts.ComputedContext} context
|
|
19
19
|
*/
|
|
20
20
|
static async compute_(data, context) {
|
|
21
|
-
const {trace, settings} = data;
|
|
21
|
+
const {trace, settings, SourceMaps} = data;
|
|
22
22
|
const processedTrace = await ProcessedTrace.request(trace, context);
|
|
23
|
-
const traceEngineResult =
|
|
23
|
+
const traceEngineResult =
|
|
24
|
+
await TraceEngineResult.request({trace, settings, SourceMaps}, context);
|
|
24
25
|
|
|
25
26
|
const navigationId = processedTrace.timeOriginEvt.args.data?.navigationId;
|
|
26
27
|
if (!navigationId) throw new Error('No navigationId found');
|
|
@@ -32,5 +33,6 @@ class NavigationInsights {
|
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
const NavigationInsightsComputed =
|
|
36
|
+
const NavigationInsightsComputed =
|
|
37
|
+
makeComputedArtifact(NavigationInsights, ['trace', 'settings', 'SourceMaps']);
|
|
36
38
|
export {NavigationInsightsComputed as NavigationInsights};
|
|
@@ -5,12 +5,13 @@ declare const PageDependencyGraphComputed: typeof PageDependencyGraph & {
|
|
|
5
5
|
devtoolsLog: LH.DevtoolsLog;
|
|
6
6
|
settings: LH.Audit.Context["settings"];
|
|
7
7
|
URL: LH.Artifacts["URL"];
|
|
8
|
+
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
8
9
|
fromTrace?: boolean;
|
|
9
10
|
}, context: LH.Artifacts.ComputedContext) => ReturnType<typeof PageDependencyGraph.compute_>;
|
|
10
11
|
};
|
|
11
12
|
declare class PageDependencyGraph {
|
|
12
13
|
/**
|
|
13
|
-
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, settings: LH.Audit.Context['settings'], URL: LH.Artifacts['URL'], fromTrace?: boolean}} data
|
|
14
|
+
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, settings: LH.Audit.Context['settings'], URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps'], fromTrace?: boolean}} data
|
|
14
15
|
* @param {LH.Artifacts.ComputedContext} context
|
|
15
16
|
* @return {Promise<LH.Gatherer.Simulation.GraphNode>}
|
|
16
17
|
*/
|
|
@@ -19,6 +20,7 @@ declare class PageDependencyGraph {
|
|
|
19
20
|
devtoolsLog: LH.DevtoolsLog;
|
|
20
21
|
settings: LH.Audit.Context["settings"];
|
|
21
22
|
URL: LH.Artifacts["URL"];
|
|
23
|
+
SourceMaps: LH.Artifacts["SourceMaps"];
|
|
22
24
|
fromTrace?: boolean;
|
|
23
25
|
}, context: LH.Artifacts.ComputedContext): Promise<LH.Gatherer.Simulation.GraphNode>;
|
|
24
26
|
}
|
|
@@ -13,19 +13,20 @@ import {TraceEngineResult} from './trace-engine-result.js';
|
|
|
13
13
|
|
|
14
14
|
class PageDependencyGraph {
|
|
15
15
|
/**
|
|
16
|
-
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, settings: LH.Audit.Context['settings'], URL: LH.Artifacts['URL'], fromTrace?: boolean}} data
|
|
16
|
+
* @param {{trace: LH.Trace, devtoolsLog: LH.DevtoolsLog, settings: LH.Audit.Context['settings'], URL: LH.Artifacts['URL'], SourceMaps: LH.Artifacts['SourceMaps'], fromTrace?: boolean}} data
|
|
17
17
|
* @param {LH.Artifacts.ComputedContext} context
|
|
18
18
|
* @return {Promise<LH.Gatherer.Simulation.GraphNode>}
|
|
19
19
|
*/
|
|
20
20
|
static async compute_(data, context) {
|
|
21
|
-
const {trace, settings, devtoolsLog, URL} = data;
|
|
21
|
+
const {trace, settings, devtoolsLog, URL, SourceMaps} = data;
|
|
22
22
|
const [{mainThreadEvents}, networkRecords] = await Promise.all([
|
|
23
23
|
ProcessedTrace.request(trace, context),
|
|
24
24
|
NetworkRecords.request(devtoolsLog, context),
|
|
25
25
|
]);
|
|
26
26
|
|
|
27
27
|
if (data.fromTrace) {
|
|
28
|
-
const traceEngineResult =
|
|
28
|
+
const traceEngineResult =
|
|
29
|
+
await TraceEngineResult.request({trace, settings, SourceMaps}, context);
|
|
29
30
|
const traceEngineData = traceEngineResult.data;
|
|
30
31
|
const requests =
|
|
31
32
|
Lantern.TraceEngineComputationData.createNetworkRequests(trace, traceEngineData);
|
|
@@ -41,5 +42,5 @@ class PageDependencyGraph {
|
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
const PageDependencyGraphComputed = makeComputedArtifact(PageDependencyGraph,
|
|
44
|
-
['devtoolsLog', 'settings', 'trace', 'URL', 'fromTrace']);
|
|
45
|
+
['devtoolsLog', 'settings', 'trace', 'URL', 'SourceMaps', 'fromTrace']);
|
|
45
46
|
export {PageDependencyGraphComputed as PageDependencyGraph};
|
|
@@ -239,6 +239,6 @@ class TBTImpactTasks {
|
|
|
239
239
|
|
|
240
240
|
const TBTImpactTasksComputed = makeComputedArtifact(
|
|
241
241
|
TBTImpactTasks,
|
|
242
|
-
['trace', 'devtoolsLog', 'URL', 'gatherContext', 'settings', 'simulator']
|
|
242
|
+
['trace', 'devtoolsLog', 'URL', 'SourceMaps', 'gatherContext', 'settings', 'simulator']
|
|
243
243
|
);
|
|
244
244
|
export {TBTImpactTasksComputed as TBTImpactTasks};
|