lighthouse 12.0.0-dev.20240610 → 12.0.0-dev.20240612
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/byte-efficiency/byte-efficiency-audit.d.ts +2 -2
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +2 -2
- package/core/audits/byte-efficiency/render-blocking-resources.d.ts +3 -3
- package/core/audits/byte-efficiency/render-blocking-resources.js +4 -4
- package/core/audits/dobetterweb/uses-http2.d.ts +2 -2
- package/core/audits/dobetterweb/uses-http2.js +2 -2
- package/core/audits/long-tasks.d.ts +7 -6
- package/core/audits/long-tasks.js +5 -4
- package/core/audits/prioritize-lcp-image.d.ts +1 -1
- package/core/computed/document-urls.js +3 -2
- package/core/computed/load-simulator.d.ts +4 -4
- package/core/computed/load-simulator.js +3 -3
- package/core/computed/main-resource.js +3 -2
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +4 -4
- package/core/computed/metrics/lantern-first-contentful-paint.js +3 -3
- package/core/computed/metrics/lantern-interactive.d.ts +4 -4
- package/core/computed/metrics/lantern-interactive.js +3 -3
- package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +4 -4
- package/core/computed/metrics/lantern-largest-contentful-paint.js +3 -3
- package/core/computed/metrics/lantern-max-potential-fid.d.ts +4 -4
- package/core/computed/metrics/lantern-max-potential-fid.js +3 -3
- package/core/computed/metrics/lantern-metric.d.ts +4 -3
- package/core/computed/metrics/lantern-metric.js +4 -4
- package/core/computed/metrics/lantern-speed-index.d.ts +4 -4
- package/core/computed/metrics/lantern-speed-index.js +3 -3
- package/core/computed/metrics/lantern-total-blocking-time.d.ts +4 -4
- package/core/computed/metrics/lantern-total-blocking-time.js +3 -3
- package/core/computed/metrics/total-blocking-time.js +3 -1
- package/core/computed/network-analysis.js +2 -2
- package/core/computed/page-dependency-graph.d.ts +2 -2
- package/core/computed/page-dependency-graph.js +6 -6
- package/core/computed/processed-navigation.d.ts +1 -1
- package/core/computed/tbt-impact-tasks.js +4 -2
- package/core/config/constants.d.ts +28 -53
- package/core/config/constants.js +2 -43
- package/core/lib/asset-saver.js +2 -2
- package/core/lib/lantern/{base-node.d.ts → BaseNode.d.ts} +7 -9
- package/core/lib/lantern/{base-node.js → BaseNode.js} +6 -6
- package/core/lib/lantern/BaseNode.test.js +385 -0
- package/core/lib/lantern/CpuNode.d.ts +43 -0
- package/core/lib/lantern/{cpu-node.js → CpuNode.js} +8 -9
- package/core/lib/lantern/{lantern-error.d.ts → LanternError.d.ts} +1 -1
- package/core/lib/lantern/{metric.d.ts → Metric.d.ts} +17 -17
- package/core/lib/lantern/{metric.js → Metric.js} +10 -12
- package/core/lib/lantern/{network-node.d.ts → NetworkNode.d.ts} +4 -5
- package/core/lib/lantern/{network-node.js → NetworkNode.js} +4 -5
- package/core/lib/lantern/{page-dependency-graph.d.ts → PageDependencyGraph.d.ts} +22 -11
- package/core/lib/lantern/{page-dependency-graph.js → PageDependencyGraph.js} +56 -22
- package/core/lib/lantern/PageDependencyGraph.test.js +654 -0
- package/core/lib/lantern/{tbt-utils.d.ts → TBTUtils.d.ts} +1 -1
- package/core/lib/lantern/TBTUtils.test.d.ts +2 -0
- package/core/lib/lantern/TBTUtils.test.js +130 -0
- package/core/lib/lantern/{trace-engine-computation-data.d.ts → TraceEngineComputationData.d.ts} +7 -7
- package/core/lib/lantern/{trace-engine-computation-data.js → TraceEngineComputationData.js} +18 -16
- package/core/lib/lantern/lantern.d.ts +19 -7
- package/core/lib/lantern/lantern.js +21 -1
- package/core/lib/lantern/metrics/{first-contentful-paint.d.ts → FirstContentfulPaint.d.ts} +11 -11
- package/core/lib/lantern/metrics/{first-contentful-paint.js → FirstContentfulPaint.js} +8 -10
- package/core/lib/lantern/metrics/FirstContentfulPaint.test.js +54 -0
- package/core/lib/lantern/metrics/Interactive.d.ts +20 -0
- package/core/lib/lantern/metrics/{interactive.js → Interactive.js} +14 -17
- package/core/lib/lantern/metrics/Interactive.test.js +56 -0
- package/core/lib/lantern/metrics/LargestContentfulPaint.d.ts +19 -0
- package/core/lib/lantern/metrics/{largest-contentful-paint.js → LargestContentfulPaint.js} +12 -15
- package/core/lib/lantern/metrics/LargestContentfulPaint.test.js +42 -0
- package/core/lib/lantern/metrics/MaxPotentialFID.d.ts +24 -0
- package/core/lib/lantern/metrics/{max-potential-fid.js → MaxPotentialFID.js} +12 -13
- package/core/lib/lantern/metrics/MetricTestUtils.d.ts +19 -0
- package/core/lib/lantern/metrics/MetricTestUtils.js +48 -0
- package/core/lib/lantern/metrics/{speed-index.d.ts → SpeedIndex.d.ts} +7 -13
- package/core/lib/lantern/metrics/{speed-index.js → SpeedIndex.js} +12 -14
- package/core/lib/lantern/metrics/SpeedIndex.test.js +83 -0
- package/core/lib/lantern/metrics/TotalBlockingTime.d.ts +25 -0
- package/core/lib/lantern/metrics/{total-blocking-time.js → TotalBlockingTime.js} +13 -16
- package/core/lib/lantern/metrics/__snapshots__/first-contentful-paint-test.js.snap +11 -0
- package/core/lib/lantern/metrics/__snapshots__/interactive-test.js.snap +17 -0
- package/core/lib/lantern/metrics/metrics.d.ts +9 -0
- package/core/lib/lantern/metrics/metrics.js +16 -0
- package/core/lib/lantern/{simulator/connection-pool.d.ts → simulation/ConnectionPool.d.ts} +5 -5
- package/core/lib/lantern/{simulator/connection-pool.js → simulation/ConnectionPool.js} +3 -3
- package/core/lib/lantern/simulation/ConnectionPool.test.js +195 -0
- package/core/lib/lantern/simulation/Constants.d.ts +52 -0
- package/core/lib/lantern/simulation/Constants.js +48 -0
- package/core/lib/lantern/{simulator/dns-cache.d.ts → simulation/DNSCache.d.ts} +2 -2
- package/core/lib/lantern/{simulator/dns-cache.js → simulation/DNSCache.js} +1 -1
- package/core/lib/lantern/simulation/DNSCache.test.js +72 -0
- package/core/lib/lantern/{simulator/network-analyzer.d.ts → simulation/NetworkAnalyzer.d.ts} +8 -8
- package/core/lib/lantern/{simulator/network-analyzer.js → simulation/NetworkAnalyzer.js} +3 -3
- package/core/lib/lantern/simulation/NetworkAnalyzer.test.js +475 -0
- package/core/lib/lantern/{simulator/simulator-timing-map.d.ts → simulation/SimulationTimingMap.d.ts} +7 -7
- package/core/lib/lantern/{simulator/simulator-timing-map.js → simulation/SimulationTimingMap.js} +5 -6
- package/core/lib/lantern/{simulator/simulator.d.ts → simulation/Simulator.d.ts} +13 -15
- package/core/lib/lantern/{simulator/simulator.js → simulation/Simulator.js} +29 -30
- package/core/lib/lantern/simulation/Simulator.test.js +434 -0
- package/core/lib/lantern/simulation/TCPConnection.test.d.ts +2 -0
- package/core/lib/lantern/simulation/TCPConnection.test.js +374 -0
- package/core/lib/lantern/{simulator/tcp-connection.d.ts → simulation/TcpConnection.d.ts} +2 -2
- package/core/lib/lantern/{simulator/tcp-connection.js → simulation/TcpConnection.js} +1 -1
- package/core/lib/lantern/simulation/simulation.d.ts +21 -0
- package/core/lib/lantern/simulation/simulation.js +28 -0
- package/core/lib/lantern/types/lantern.d.ts +81 -9
- package/core/lib/lantern-trace-saver.d.ts +4 -4
- package/core/lib/lantern-trace-saver.js +3 -3
- package/core/lib/navigation-error.js +3 -3
- package/core/lib/network-recorder.js +2 -2
- package/core/lib/network-request.d.ts +1 -1
- package/core/lib/network-request.js +1 -1
- package/package.json +5 -5
- package/tsconfig.json +10 -8
- package/types/artifacts.d.ts +3 -10
- package/types/gatherer.d.ts +1 -1
- package/core/lib/lantern/cpu-node.d.ts +0 -44
- package/core/lib/lantern/metrics/interactive.d.ts +0 -26
- package/core/lib/lantern/metrics/largest-contentful-paint.d.ts +0 -19
- package/core/lib/lantern/metrics/max-potential-fid.d.ts +0 -30
- package/core/lib/lantern/metrics/total-blocking-time.d.ts +0 -31
- /package/core/lib/lantern/{lantern-error.js → LanternError.js} +0 -0
- /package/core/lib/lantern/{tbt-utils.js → TBTUtils.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type Simulator = import('../../lib/lantern/
|
|
2
|
-
export type Node = import('../../lib/lantern/
|
|
1
|
+
export type Simulator = import('../../lib/lantern/simulation/Simulator.js').Simulator;
|
|
2
|
+
export type Node = import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>;
|
|
3
3
|
export type ByteEfficiencyProduct = {
|
|
4
4
|
items: Array<LH.Audit.ByteEfficiencyItem>;
|
|
5
5
|
wastedBytesByUrl?: Map<string, number> | undefined;
|
|
@@ -14,8 +14,8 @@ import {LCPImageRecord} from '../../computed/lcp-image-record.js';
|
|
|
14
14
|
|
|
15
15
|
const str_ = i18n.createIcuMessageFn(import.meta.url, {});
|
|
16
16
|
|
|
17
|
-
/** @typedef {import('../../lib/lantern/
|
|
18
|
-
/** @typedef {import('../../lib/lantern/
|
|
17
|
+
/** @typedef {import('../../lib/lantern/simulation/Simulator.js').Simulator} Simulator */
|
|
18
|
+
/** @typedef {import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
19
19
|
|
|
20
20
|
// Parameters for log-normal distribution scoring. These values were determined by fitting the
|
|
21
21
|
// log-normal cumulative distribution function curve to the former method of linear interpolation
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default RenderBlockingResources;
|
|
2
|
-
export type Simulator = import('../../lib/lantern/
|
|
3
|
-
export type Node = import('../../lib/lantern/
|
|
4
|
-
export type NetworkNode = import('../../lib/lantern/
|
|
2
|
+
export type Simulator = import('../../lib/lantern/simulation/Simulator.js').Simulator;
|
|
3
|
+
export type Node = import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>;
|
|
4
|
+
export type NetworkNode = import('../../lib/lantern/NetworkNode.js').NetworkNode<LH.Artifacts.NetworkRequest>;
|
|
5
5
|
declare class RenderBlockingResources extends Audit {
|
|
6
6
|
/**
|
|
7
7
|
* @param {LH.Artifacts} artifacts
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import {Audit} from '../audit.js';
|
|
13
13
|
import * as i18n from '../../lib/i18n/i18n.js';
|
|
14
|
-
import {BaseNode} from '../../lib/lantern/
|
|
14
|
+
import {BaseNode} from '../../lib/lantern/lantern.js';
|
|
15
15
|
import {UnusedCSS} from '../../computed/unused-css.js';
|
|
16
16
|
import {NetworkRequest} from '../../lib/network-request.js';
|
|
17
17
|
import {LoadSimulator} from '../../computed/load-simulator.js';
|
|
@@ -20,9 +20,9 @@ import {LCPImageRecord} from '../../computed/lcp-image-record.js';
|
|
|
20
20
|
import {NavigationInsights} from '../../computed/navigation-insights.js';
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
/** @typedef {import('../../lib/lantern/
|
|
24
|
-
/** @typedef {import('../../lib/lantern/
|
|
25
|
-
/** @typedef {import('../../lib/lantern/
|
|
23
|
+
/** @typedef {import('../../lib/lantern/simulation/Simulator.js').Simulator} Simulator */
|
|
24
|
+
/** @typedef {import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
25
|
+
/** @typedef {import('../../lib/lantern/NetworkNode.js').NetworkNode<LH.Artifacts.NetworkRequest>} NetworkNode */
|
|
26
26
|
|
|
27
27
|
// Because of the way we detect blocking stylesheets, asynchronously loaded
|
|
28
28
|
// CSS with link[rel=preload] and an onload handler (see https://github.com/filamentgroup/loadCSS)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default UsesHTTP2Audit;
|
|
2
|
-
export type Simulator = import('../../lib/lantern/
|
|
3
|
-
export type Node = import('../../lib/lantern/
|
|
2
|
+
export type Simulator = import('../../lib/lantern/simulation/Simulator.js').Simulator;
|
|
3
|
+
export type Node = import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>;
|
|
4
4
|
declare class UsesHTTP2Audit extends Audit {
|
|
5
5
|
/**
|
|
6
6
|
* Computes the estimated effect of all results being converted to http/2 on the provided graph.
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* origin are over the http/2 protocol.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
/** @typedef {import('../../lib/lantern/
|
|
13
|
-
/** @typedef {import('../../lib/lantern/
|
|
12
|
+
/** @typedef {import('../../lib/lantern/simulation/Simulator.js').Simulator} Simulator */
|
|
13
|
+
/** @typedef {import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>} Node */
|
|
14
14
|
|
|
15
15
|
import {Audit} from '../audit.js';
|
|
16
16
|
import {EntityClassification} from '../../computed/entity-classification.js';
|
|
@@ -25,11 +25,11 @@ declare class LongTasks extends Audit {
|
|
|
25
25
|
* most time will be attributed to 'other' (the category of the top-level
|
|
26
26
|
* RunTask). See pruning in `PageDependencyGraph.linkCPUNodes`.
|
|
27
27
|
* @param {LH.Artifacts.TaskNode} task
|
|
28
|
-
* @param {Map<
|
|
28
|
+
* @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
|
|
29
29
|
* @param {Map<TaskGroupIds, number>} [timeByTaskGroup]
|
|
30
30
|
* @return {{startTime: number, duration: number, timeByTaskGroup: Map<TaskGroupIds, number>}}
|
|
31
31
|
*/
|
|
32
|
-
static getTimingBreakdown(task: LH.Artifacts.TaskNode, taskTimingsByEvent: Map<
|
|
32
|
+
static getTimingBreakdown(task: LH.Artifacts.TaskNode, taskTimingsByEvent: Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined, timeByTaskGroup?: Map<import("../lib/tracehouse/task-groups.js").TaskGroupIds, number> | undefined): {
|
|
33
33
|
startTime: number;
|
|
34
34
|
duration: number;
|
|
35
35
|
timeByTaskGroup: Map<TaskGroupIds, number>;
|
|
@@ -37,17 +37,17 @@ declare class LongTasks extends Audit {
|
|
|
37
37
|
/**
|
|
38
38
|
* @param {Array<LH.Artifacts.TaskNode>} longTasks
|
|
39
39
|
* @param {Set<string>} jsUrls
|
|
40
|
-
* @param {Map<
|
|
40
|
+
* @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
|
|
41
41
|
* @return {LH.Audit.Details.DebugData}
|
|
42
42
|
*/
|
|
43
|
-
static makeDebugData(longTasks: Array<LH.Artifacts.TaskNode>, jsUrls: Set<string>, taskTimingsByEvent: Map<
|
|
43
|
+
static makeDebugData(longTasks: Array<LH.Artifacts.TaskNode>, jsUrls: Set<string>, taskTimingsByEvent: Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined): LH.Audit.Details.DebugData;
|
|
44
44
|
/**
|
|
45
45
|
* Get timing from task, overridden by taskTimingsByEvent if provided.
|
|
46
46
|
* @param {LH.Artifacts.TaskNode} task
|
|
47
|
-
* @param {Map<
|
|
47
|
+
* @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
|
|
48
48
|
* @return {Timing}
|
|
49
49
|
*/
|
|
50
|
-
static getTiming(task: LH.Artifacts.TaskNode, taskTimingsByEvent: Map<
|
|
50
|
+
static getTiming(task: LH.Artifacts.TaskNode, taskTimingsByEvent: Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined): Timing;
|
|
51
51
|
/**
|
|
52
52
|
* @param {LH.Artifacts} artifacts
|
|
53
53
|
* @param {LH.Audit.Context} context
|
|
@@ -61,4 +61,5 @@ export namespace UIStrings {
|
|
|
61
61
|
const displayValue: string;
|
|
62
62
|
}
|
|
63
63
|
import { Audit } from './audit.js';
|
|
64
|
+
import * as Lantern from '../lib/lantern/lantern.js';
|
|
64
65
|
//# sourceMappingURL=long-tasks.d.ts.map
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as Lantern from '../lib/lantern/lantern.js';
|
|
7
8
|
import {Audit} from './audit.js';
|
|
8
9
|
import {NetworkRecords} from '../computed/network-records.js';
|
|
9
10
|
import * as i18n from '../lib/i18n/i18n.js';
|
|
@@ -85,7 +86,7 @@ class LongTasks extends Audit {
|
|
|
85
86
|
* most time will be attributed to 'other' (the category of the top-level
|
|
86
87
|
* RunTask). See pruning in `PageDependencyGraph.linkCPUNodes`.
|
|
87
88
|
* @param {LH.Artifacts.TaskNode} task
|
|
88
|
-
* @param {Map<
|
|
89
|
+
* @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
|
|
89
90
|
* @param {Map<TaskGroupIds, number>} [timeByTaskGroup]
|
|
90
91
|
* @return {{startTime: number, duration: number, timeByTaskGroup: Map<TaskGroupIds, number>}}
|
|
91
92
|
*/
|
|
@@ -116,7 +117,7 @@ class LongTasks extends Audit {
|
|
|
116
117
|
/**
|
|
117
118
|
* @param {Array<LH.Artifacts.TaskNode>} longTasks
|
|
118
119
|
* @param {Set<string>} jsUrls
|
|
119
|
-
* @param {Map<
|
|
120
|
+
* @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
|
|
120
121
|
* @return {LH.Audit.Details.DebugData}
|
|
121
122
|
*/
|
|
122
123
|
static makeDebugData(longTasks, jsUrls, taskTimingsByEvent) {
|
|
@@ -154,7 +155,7 @@ class LongTasks extends Audit {
|
|
|
154
155
|
/**
|
|
155
156
|
* Get timing from task, overridden by taskTimingsByEvent if provided.
|
|
156
157
|
* @param {LH.Artifacts.TaskNode} task
|
|
157
|
-
* @param {Map<
|
|
158
|
+
* @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
|
|
158
159
|
* @return {Timing}
|
|
159
160
|
*/
|
|
160
161
|
static getTiming(task, taskTimingsByEvent) {
|
|
@@ -184,7 +185,7 @@ class LongTasks extends Audit {
|
|
|
184
185
|
const metricComputationData = Audit.makeMetricComputationDataInput(artifacts, context);
|
|
185
186
|
const tbtResult = await TotalBlockingTime.request(metricComputationData, context);
|
|
186
187
|
|
|
187
|
-
/** @type {Map<
|
|
188
|
+
/** @type {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} */
|
|
188
189
|
let taskTimingsByEvent;
|
|
189
190
|
|
|
190
191
|
if (settings.throttlingMethod === 'simulate') {
|
|
@@ -39,7 +39,7 @@ declare class PrioritizeLcpImage extends Audit {
|
|
|
39
39
|
* @return {{lcpNodeToPreload?: LH.Gatherer.Simulation.GraphNetworkNode, initiatorPath?: InitiatorPath}}
|
|
40
40
|
*/
|
|
41
41
|
static getLCPNodeToPreload(mainResource: LH.Artifacts.NetworkRequest, graph: LH.Gatherer.Simulation.GraphNode, lcpRecord: NetworkRequest | undefined): {
|
|
42
|
-
lcpNodeToPreload?: import("../lib/lantern/
|
|
42
|
+
lcpNodeToPreload?: import("../lib/lantern/NetworkNode.js").NetworkNode<NetworkRequest> | undefined;
|
|
43
43
|
initiatorPath?: InitiatorPath | undefined;
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import * as Lantern from '../lib/lantern/lantern.js';
|
|
8
8
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
9
9
|
import {NetworkRecords} from './network-records.js';
|
|
10
10
|
import {ProcessedTrace} from './processed-trace.js';
|
|
@@ -41,7 +41,8 @@ class DocumentUrls {
|
|
|
41
41
|
}
|
|
42
42
|
if (!requestedUrl || !mainDocumentUrl) throw new Error('No main frame navigations found');
|
|
43
43
|
|
|
44
|
-
const initialRequest =
|
|
44
|
+
const initialRequest =
|
|
45
|
+
Lantern.Simulation.NetworkAnalyzer.findResourceForUrl(networkRecords, requestedUrl);
|
|
45
46
|
if (initialRequest?.redirects?.length) requestedUrl = initialRequest.redirects[0].url;
|
|
46
47
|
|
|
47
48
|
return {requestedUrl, mainDocumentUrl};
|
|
@@ -5,24 +5,24 @@ declare const LoadSimulatorComputed: typeof LoadSimulator & {
|
|
|
5
5
|
settings: LH.Audit.Context['settings'];
|
|
6
6
|
}, context: import("../../types/utility-types.js").default.ImmutableObject<{
|
|
7
7
|
computedCache: Map<string, import("../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
8
|
-
}>) => Promise<Simulator<any>>;
|
|
8
|
+
}>) => Promise<Lantern.Simulation.Simulator<any>>;
|
|
9
9
|
};
|
|
10
10
|
declare class LoadSimulator {
|
|
11
11
|
/**
|
|
12
12
|
* @param {{devtoolsLog: LH.DevtoolsLog, settings: LH.Audit.Context['settings']}} data
|
|
13
13
|
* @param {LH.Artifacts.ComputedContext} context
|
|
14
|
-
* @return {Promise<Simulator>}
|
|
14
|
+
* @return {Promise<Lantern.Simulation.Simulator>}
|
|
15
15
|
*/
|
|
16
16
|
static compute_(data: {
|
|
17
17
|
devtoolsLog: import("../index.js").DevtoolsLog;
|
|
18
18
|
settings: LH.Audit.Context['settings'];
|
|
19
|
-
}, context: LH.Artifacts.ComputedContext): Promise<Simulator>;
|
|
19
|
+
}, context: LH.Artifacts.ComputedContext): Promise<Lantern.Simulation.Simulator>;
|
|
20
20
|
/**
|
|
21
21
|
* @param {LH.Artifacts.NetworkAnalysis} networkAnalysis
|
|
22
22
|
* @return {LH.PrecomputedLanternData}
|
|
23
23
|
*/
|
|
24
24
|
static convertAnalysisToSaveableLanternData(networkAnalysis: LH.Artifacts.NetworkAnalysis): LH.PrecomputedLanternData;
|
|
25
25
|
}
|
|
26
|
-
import
|
|
26
|
+
import * as Lantern from '../lib/lantern/lantern.js';
|
|
27
27
|
import { NetworkAnalysis } from './network-analysis.js';
|
|
28
28
|
//# sourceMappingURL=load-simulator.d.ts.map
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
8
|
-
import
|
|
8
|
+
import * as Lantern from '../lib/lantern/lantern.js';
|
|
9
9
|
import {NetworkAnalysis} from './network-analysis.js';
|
|
10
10
|
|
|
11
11
|
class LoadSimulator {
|
|
12
12
|
/**
|
|
13
13
|
* @param {{devtoolsLog: LH.DevtoolsLog, settings: LH.Audit.Context['settings']}} data
|
|
14
14
|
* @param {LH.Artifacts.ComputedContext} context
|
|
15
|
-
* @return {Promise<Simulator>}
|
|
15
|
+
* @return {Promise<Lantern.Simulation.Simulator>}
|
|
16
16
|
*/
|
|
17
17
|
static async compute_(data, context) {
|
|
18
18
|
const networkAnalysis = await NetworkAnalysis.request(data.devtoolsLog, context);
|
|
19
|
-
return Simulator.createSimulator({...data.settings, networkAnalysis});
|
|
19
|
+
return Lantern.Simulation.Simulator.createSimulator({...data.settings, networkAnalysis});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as Lantern from '../lib/lantern/lantern.js';
|
|
7
8
|
import {makeComputedArtifact} from './computed-artifact.js';
|
|
8
9
|
import {NetworkRecords} from './network-records.js';
|
|
9
|
-
import {NetworkAnalyzer} from '../lib/lantern/simulator/network-analyzer.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @fileoverview This artifact identifies the main resource on the page. Current solution assumes
|
|
@@ -28,7 +28,8 @@ class MainResource {
|
|
|
28
28
|
// document request, we should return the last candidate here. Besides, the browser
|
|
29
29
|
// would have evicted the first request by the time `MainDocumentRequest` (a consumer
|
|
30
30
|
// of this computed artifact) attempts to fetch the contents, resulting in a protocol error.
|
|
31
|
-
const mainResource =
|
|
31
|
+
const mainResource =
|
|
32
|
+
Lantern.Simulation.NetworkAnalyzer.findLastDocumentForUrl(records, mainDocumentUrl);
|
|
32
33
|
if (!mainResource) {
|
|
33
34
|
throw new Error('Unable to identify the main resource');
|
|
34
35
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { LanternFirstContentfulPaintComputed as LanternFirstContentfulPaint };
|
|
2
|
-
export type Extras = import('../../lib/lantern/
|
|
2
|
+
export type Extras = import('../../lib/lantern/Metric.js').Extras;
|
|
3
3
|
declare const LanternFirstContentfulPaintComputed: typeof LanternFirstContentfulPaint & {
|
|
4
4
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
5
5
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
6
6
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
7
7
|
};
|
|
8
|
-
/** @typedef {import('../../lib/lantern/
|
|
9
|
-
declare class LanternFirstContentfulPaint extends FirstContentfulPaint {
|
|
8
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
9
|
+
declare class LanternFirstContentfulPaint extends Lantern.Metrics.FirstContentfulPaint {
|
|
10
10
|
/**
|
|
11
11
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
12
12
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -21,5 +21,5 @@ declare class LanternFirstContentfulPaint extends FirstContentfulPaint {
|
|
|
21
21
|
*/
|
|
22
22
|
static compute_(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
23
23
|
}
|
|
24
|
-
import
|
|
24
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
25
25
|
//# sourceMappingURL=lantern-first-contentful-paint.d.ts.map
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
7
8
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
9
|
import {getComputationDataParams, lanternErrorAdapter} from './lantern-metric.js';
|
|
9
|
-
import {FirstContentfulPaint} from '../../lib/lantern/metrics/first-contentful-paint.js';
|
|
10
10
|
|
|
11
|
-
/** @typedef {import('../../lib/lantern/
|
|
11
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
12
12
|
|
|
13
|
-
class LanternFirstContentfulPaint extends FirstContentfulPaint {
|
|
13
|
+
class LanternFirstContentfulPaint extends Lantern.Metrics.FirstContentfulPaint {
|
|
14
14
|
/**
|
|
15
15
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
16
16
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { LanternInteractiveComputed as LanternInteractive };
|
|
2
|
-
export type Extras = import('../../lib/lantern/
|
|
2
|
+
export type Extras = import('../../lib/lantern/Metric.js').Extras;
|
|
3
3
|
declare const LanternInteractiveComputed: typeof LanternInteractive & {
|
|
4
4
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
5
5
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
6
6
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
7
7
|
};
|
|
8
|
-
/** @typedef {import('../../lib/lantern/
|
|
9
|
-
declare class LanternInteractive extends Interactive {
|
|
8
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
9
|
+
declare class LanternInteractive extends Lantern.Metrics.Interactive {
|
|
10
10
|
/**
|
|
11
11
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
12
12
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -21,5 +21,5 @@ declare class LanternInteractive extends Interactive {
|
|
|
21
21
|
*/
|
|
22
22
|
static compute_(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
23
23
|
}
|
|
24
|
-
import
|
|
24
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
25
25
|
//# sourceMappingURL=lantern-interactive.d.ts.map
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
7
8
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
9
|
import {LanternLargestContentfulPaint} from './lantern-largest-contentful-paint.js';
|
|
9
|
-
import {Interactive} from '../../lib/lantern/metrics/interactive.js';
|
|
10
10
|
import {getComputationDataParams, lanternErrorAdapter} from './lantern-metric.js';
|
|
11
11
|
|
|
12
|
-
/** @typedef {import('../../lib/lantern/
|
|
12
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
13
13
|
|
|
14
|
-
class LanternInteractive extends Interactive {
|
|
14
|
+
class LanternInteractive extends Lantern.Metrics.Interactive {
|
|
15
15
|
/**
|
|
16
16
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
17
17
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { LanternLargestContentfulPaintComputed as LanternLargestContentfulPaint };
|
|
2
|
-
export type Extras = import('../../lib/lantern/
|
|
2
|
+
export type Extras = import('../../lib/lantern/Metric.js').Extras;
|
|
3
3
|
declare const LanternLargestContentfulPaintComputed: typeof LanternLargestContentfulPaint & {
|
|
4
4
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
5
5
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
6
6
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
7
7
|
};
|
|
8
|
-
/** @typedef {import('../../lib/lantern/
|
|
9
|
-
declare class LanternLargestContentfulPaint extends LargestContentfulPaint {
|
|
8
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
9
|
+
declare class LanternLargestContentfulPaint extends Lantern.Metrics.LargestContentfulPaint {
|
|
10
10
|
/**
|
|
11
11
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
12
12
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -21,5 +21,5 @@ declare class LanternLargestContentfulPaint extends LargestContentfulPaint {
|
|
|
21
21
|
*/
|
|
22
22
|
static compute_(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
23
23
|
}
|
|
24
|
-
import
|
|
24
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
25
25
|
//# sourceMappingURL=lantern-largest-contentful-paint.d.ts.map
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
7
8
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
-
import {LargestContentfulPaint} from '../../lib/lantern/metrics/largest-contentful-paint.js';
|
|
9
9
|
import {getComputationDataParams, lanternErrorAdapter} from './lantern-metric.js';
|
|
10
10
|
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
11
11
|
|
|
12
|
-
/** @typedef {import('../../lib/lantern/
|
|
12
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
13
13
|
|
|
14
|
-
class LanternLargestContentfulPaint extends LargestContentfulPaint {
|
|
14
|
+
class LanternLargestContentfulPaint extends Lantern.Metrics.LargestContentfulPaint {
|
|
15
15
|
/**
|
|
16
16
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
17
17
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { LanternMaxPotentialFIDComputed as LanternMaxPotentialFID };
|
|
2
|
-
export type Extras = import('../../lib/lantern/
|
|
2
|
+
export type Extras = import('../../lib/lantern/Metric.js').Extras;
|
|
3
3
|
declare const LanternMaxPotentialFIDComputed: typeof LanternMaxPotentialFID & {
|
|
4
4
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
5
5
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
6
6
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
7
7
|
};
|
|
8
|
-
/** @typedef {import('../../lib/lantern/
|
|
9
|
-
declare class LanternMaxPotentialFID extends MaxPotentialFID {
|
|
8
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
9
|
+
declare class LanternMaxPotentialFID extends Lantern.Metrics.MaxPotentialFID {
|
|
10
10
|
/**
|
|
11
11
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
12
12
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -21,5 +21,5 @@ declare class LanternMaxPotentialFID extends MaxPotentialFID {
|
|
|
21
21
|
*/
|
|
22
22
|
static compute_(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
23
23
|
}
|
|
24
|
-
import
|
|
24
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
25
25
|
//# sourceMappingURL=lantern-max-potential-fid.d.ts.map
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
7
8
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
|
-
import {MaxPotentialFID} from '../../lib/lantern/metrics/max-potential-fid.js';
|
|
9
9
|
import {getComputationDataParams, lanternErrorAdapter} from './lantern-metric.js';
|
|
10
10
|
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
11
11
|
|
|
12
|
-
/** @typedef {import('../../lib/lantern/
|
|
12
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
13
13
|
|
|
14
|
-
class LanternMaxPotentialFID extends MaxPotentialFID {
|
|
14
|
+
class LanternMaxPotentialFID extends Lantern.Metrics.MaxPotentialFID {
|
|
15
15
|
/**
|
|
16
16
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
17
17
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @param {LH.Artifacts.ComputedContext} context
|
|
4
4
|
*/
|
|
5
5
|
export function getComputationDataParamsFromTrace(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<{
|
|
6
|
-
simulator:
|
|
6
|
+
simulator: Lantern.Simulation.Simulator<any>;
|
|
7
7
|
graph: import("../page-dependency-graph.js").Node;
|
|
8
8
|
processedNavigation: import("../../lib/lantern/types/lantern.js").Simulation.ProcessedNavigation;
|
|
9
9
|
}>;
|
|
@@ -12,7 +12,7 @@ export function getComputationDataParamsFromTrace(data: LH.Artifacts.MetricCompu
|
|
|
12
12
|
* @param {LH.Artifacts.ComputedContext} context
|
|
13
13
|
*/
|
|
14
14
|
export function getComputationDataParamsFromDevtoolsLog(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<{
|
|
15
|
-
simulator:
|
|
15
|
+
simulator: Lantern.Simulation.Simulator<any>;
|
|
16
16
|
graph: import("../page-dependency-graph.js").Node;
|
|
17
17
|
processedNavigation: import("../../index.js").Artifacts.ProcessedNavigation;
|
|
18
18
|
}>;
|
|
@@ -21,7 +21,7 @@ export function getComputationDataParamsFromDevtoolsLog(data: LH.Artifacts.Metri
|
|
|
21
21
|
* @param {LH.Artifacts.ComputedContext} context
|
|
22
22
|
*/
|
|
23
23
|
export function getComputationDataParams(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<{
|
|
24
|
-
simulator:
|
|
24
|
+
simulator: Lantern.Simulation.Simulator<any>;
|
|
25
25
|
graph: import("../page-dependency-graph.js").Node;
|
|
26
26
|
processedNavigation: import("../../lib/lantern/types/lantern.js").Simulation.ProcessedNavigation;
|
|
27
27
|
}>;
|
|
@@ -30,4 +30,5 @@ export function getComputationDataParams(data: LH.Artifacts.MetricComputationDat
|
|
|
30
30
|
* @return {never}
|
|
31
31
|
*/
|
|
32
32
|
export function lanternErrorAdapter(err: unknown): never;
|
|
33
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
33
34
|
//# sourceMappingURL=lantern-metric.d.ts.map
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
8
8
|
import {LighthouseError} from '../../lib/lh-error.js';
|
|
9
9
|
import {LoadSimulator} from '../load-simulator.js';
|
|
10
10
|
import {ProcessedNavigation} from '../processed-navigation.js';
|
|
11
11
|
import {PageDependencyGraph} from '../page-dependency-graph.js';
|
|
12
12
|
import {TraceEngineResult} from '../trace-engine-result.js';
|
|
13
|
-
import {createProcessedNavigation} from '../../lib/lantern/trace-engine-computation-data.js';
|
|
14
13
|
|
|
15
14
|
/**
|
|
16
15
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
@@ -39,7 +38,8 @@ async function getComputationDataParamsFromTrace(data, context) {
|
|
|
39
38
|
|
|
40
39
|
const graph = await PageDependencyGraph.request({...data, fromTrace: true}, context);
|
|
41
40
|
const traceEngineResult = await TraceEngineResult.request(data, context);
|
|
42
|
-
const processedNavigation =
|
|
41
|
+
const processedNavigation =
|
|
42
|
+
Lantern.TraceEngineComputationData.createProcessedNavigation(traceEngineResult.data);
|
|
43
43
|
const simulator = data.simulator || (await LoadSimulator.request(data, context));
|
|
44
44
|
|
|
45
45
|
return {simulator, graph, processedNavigation};
|
|
@@ -50,7 +50,7 @@ async function getComputationDataParamsFromTrace(data, context) {
|
|
|
50
50
|
* @return {never}
|
|
51
51
|
*/
|
|
52
52
|
function lanternErrorAdapter(err) {
|
|
53
|
-
if (!(err instanceof
|
|
53
|
+
if (!(err instanceof Lantern.Error)) {
|
|
54
54
|
throw err;
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { LanternSpeedIndexComputed as LanternSpeedIndex };
|
|
2
|
-
export type Extras = import('../../lib/lantern/
|
|
2
|
+
export type Extras = import('../../lib/lantern/Metric.js').Extras;
|
|
3
3
|
declare const LanternSpeedIndexComputed: typeof LanternSpeedIndex & {
|
|
4
4
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
5
5
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
6
6
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
7
7
|
};
|
|
8
|
-
/** @typedef {import('../../lib/lantern/
|
|
9
|
-
declare class LanternSpeedIndex extends SpeedIndex {
|
|
8
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
9
|
+
declare class LanternSpeedIndex extends Lantern.Metrics.SpeedIndex {
|
|
10
10
|
/**
|
|
11
11
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
12
12
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -21,5 +21,5 @@ declare class LanternSpeedIndex extends SpeedIndex {
|
|
|
21
21
|
*/
|
|
22
22
|
static compute_(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
23
23
|
}
|
|
24
|
-
import
|
|
24
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
25
25
|
//# sourceMappingURL=lantern-speed-index.d.ts.map
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
7
8
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
9
|
import {getComputationDataParams, lanternErrorAdapter} from './lantern-metric.js';
|
|
9
10
|
import {Speedline} from '../speedline.js';
|
|
10
11
|
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
11
|
-
import {SpeedIndex} from '../../lib/lantern/metrics/speed-index.js';
|
|
12
12
|
|
|
13
|
-
/** @typedef {import('../../lib/lantern/
|
|
13
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
14
14
|
|
|
15
|
-
class LanternSpeedIndex extends SpeedIndex {
|
|
15
|
+
class LanternSpeedIndex extends Lantern.Metrics.SpeedIndex {
|
|
16
16
|
/**
|
|
17
17
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
18
18
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { LanternTotalBlockingTimeComputed as LanternTotalBlockingTime };
|
|
2
|
-
export type Extras = import('../../lib/lantern/
|
|
2
|
+
export type Extras = import('../../lib/lantern/Metric.js').Extras;
|
|
3
3
|
declare const LanternTotalBlockingTimeComputed: typeof LanternTotalBlockingTime & {
|
|
4
4
|
request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
|
|
5
5
|
computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
|
|
6
6
|
}>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
|
|
7
7
|
};
|
|
8
|
-
/** @typedef {import('../../lib/lantern/
|
|
9
|
-
declare class LanternTotalBlockingTime extends TotalBlockingTime {
|
|
8
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
9
|
+
declare class LanternTotalBlockingTime extends Lantern.Metrics.TotalBlockingTime {
|
|
10
10
|
/**
|
|
11
11
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
12
12
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -21,5 +21,5 @@ declare class LanternTotalBlockingTime extends TotalBlockingTime {
|
|
|
21
21
|
*/
|
|
22
22
|
static compute_(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.LanternMetric>;
|
|
23
23
|
}
|
|
24
|
-
import
|
|
24
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
25
25
|
//# sourceMappingURL=lantern-total-blocking-time.d.ts.map
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
8
8
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
9
9
|
import {LanternFirstContentfulPaint} from './lantern-first-contentful-paint.js';
|
|
10
10
|
import {LanternInteractive} from './lantern-interactive.js';
|
|
11
11
|
import {getComputationDataParams} from './lantern-metric.js';
|
|
12
12
|
|
|
13
|
-
/** @typedef {import('../../lib/lantern/
|
|
13
|
+
/** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
|
|
14
14
|
|
|
15
|
-
class LanternTotalBlockingTime extends TotalBlockingTime {
|
|
15
|
+
class LanternTotalBlockingTime extends Lantern.Metrics.TotalBlockingTime {
|
|
16
16
|
/**
|
|
17
17
|
* @param {LH.Artifacts.MetricComputationDataInput} data
|
|
18
18
|
* @param {LH.Artifacts.ComputedContext} context
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as Lantern from '../../lib/lantern/lantern.js';
|
|
7
8
|
import {makeComputedArtifact} from '../computed-artifact.js';
|
|
8
9
|
import ComputedMetric from './metric.js';
|
|
9
10
|
import {TraceProcessor} from '../../lib/tracehouse/trace-processor.js';
|
|
10
11
|
import {LanternTotalBlockingTime} from './lantern-total-blocking-time.js';
|
|
11
12
|
import {Interactive} from './interactive.js';
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
const {calculateSumOfBlockingTime} = Lantern.TBTUtils;
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
17
|
* @fileoverview This audit determines Total Blocking Time.
|