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.
Files changed (118) hide show
  1. package/core/audits/byte-efficiency/byte-efficiency-audit.d.ts +2 -2
  2. package/core/audits/byte-efficiency/byte-efficiency-audit.js +2 -2
  3. package/core/audits/byte-efficiency/render-blocking-resources.d.ts +3 -3
  4. package/core/audits/byte-efficiency/render-blocking-resources.js +4 -4
  5. package/core/audits/dobetterweb/uses-http2.d.ts +2 -2
  6. package/core/audits/dobetterweb/uses-http2.js +2 -2
  7. package/core/audits/long-tasks.d.ts +7 -6
  8. package/core/audits/long-tasks.js +5 -4
  9. package/core/audits/prioritize-lcp-image.d.ts +1 -1
  10. package/core/computed/document-urls.js +3 -2
  11. package/core/computed/load-simulator.d.ts +4 -4
  12. package/core/computed/load-simulator.js +3 -3
  13. package/core/computed/main-resource.js +3 -2
  14. package/core/computed/metrics/lantern-first-contentful-paint.d.ts +4 -4
  15. package/core/computed/metrics/lantern-first-contentful-paint.js +3 -3
  16. package/core/computed/metrics/lantern-interactive.d.ts +4 -4
  17. package/core/computed/metrics/lantern-interactive.js +3 -3
  18. package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +4 -4
  19. package/core/computed/metrics/lantern-largest-contentful-paint.js +3 -3
  20. package/core/computed/metrics/lantern-max-potential-fid.d.ts +4 -4
  21. package/core/computed/metrics/lantern-max-potential-fid.js +3 -3
  22. package/core/computed/metrics/lantern-metric.d.ts +4 -3
  23. package/core/computed/metrics/lantern-metric.js +4 -4
  24. package/core/computed/metrics/lantern-speed-index.d.ts +4 -4
  25. package/core/computed/metrics/lantern-speed-index.js +3 -3
  26. package/core/computed/metrics/lantern-total-blocking-time.d.ts +4 -4
  27. package/core/computed/metrics/lantern-total-blocking-time.js +3 -3
  28. package/core/computed/metrics/total-blocking-time.js +3 -1
  29. package/core/computed/network-analysis.js +2 -2
  30. package/core/computed/page-dependency-graph.d.ts +2 -2
  31. package/core/computed/page-dependency-graph.js +6 -6
  32. package/core/computed/processed-navigation.d.ts +1 -1
  33. package/core/computed/tbt-impact-tasks.js +4 -2
  34. package/core/config/constants.d.ts +28 -53
  35. package/core/config/constants.js +2 -43
  36. package/core/lib/asset-saver.js +2 -2
  37. package/core/lib/lantern/{base-node.d.ts → BaseNode.d.ts} +7 -9
  38. package/core/lib/lantern/{base-node.js → BaseNode.js} +6 -6
  39. package/core/lib/lantern/BaseNode.test.js +385 -0
  40. package/core/lib/lantern/CpuNode.d.ts +43 -0
  41. package/core/lib/lantern/{cpu-node.js → CpuNode.js} +8 -9
  42. package/core/lib/lantern/{lantern-error.d.ts → LanternError.d.ts} +1 -1
  43. package/core/lib/lantern/{metric.d.ts → Metric.d.ts} +17 -17
  44. package/core/lib/lantern/{metric.js → Metric.js} +10 -12
  45. package/core/lib/lantern/{network-node.d.ts → NetworkNode.d.ts} +4 -5
  46. package/core/lib/lantern/{network-node.js → NetworkNode.js} +4 -5
  47. package/core/lib/lantern/{page-dependency-graph.d.ts → PageDependencyGraph.d.ts} +22 -11
  48. package/core/lib/lantern/{page-dependency-graph.js → PageDependencyGraph.js} +56 -22
  49. package/core/lib/lantern/PageDependencyGraph.test.js +654 -0
  50. package/core/lib/lantern/{tbt-utils.d.ts → TBTUtils.d.ts} +1 -1
  51. package/core/lib/lantern/TBTUtils.test.d.ts +2 -0
  52. package/core/lib/lantern/TBTUtils.test.js +130 -0
  53. package/core/lib/lantern/{trace-engine-computation-data.d.ts → TraceEngineComputationData.d.ts} +7 -7
  54. package/core/lib/lantern/{trace-engine-computation-data.js → TraceEngineComputationData.js} +18 -16
  55. package/core/lib/lantern/lantern.d.ts +19 -7
  56. package/core/lib/lantern/lantern.js +21 -1
  57. package/core/lib/lantern/metrics/{first-contentful-paint.d.ts → FirstContentfulPaint.d.ts} +11 -11
  58. package/core/lib/lantern/metrics/{first-contentful-paint.js → FirstContentfulPaint.js} +8 -10
  59. package/core/lib/lantern/metrics/FirstContentfulPaint.test.js +54 -0
  60. package/core/lib/lantern/metrics/Interactive.d.ts +20 -0
  61. package/core/lib/lantern/metrics/{interactive.js → Interactive.js} +14 -17
  62. package/core/lib/lantern/metrics/Interactive.test.js +56 -0
  63. package/core/lib/lantern/metrics/LargestContentfulPaint.d.ts +19 -0
  64. package/core/lib/lantern/metrics/{largest-contentful-paint.js → LargestContentfulPaint.js} +12 -15
  65. package/core/lib/lantern/metrics/LargestContentfulPaint.test.js +42 -0
  66. package/core/lib/lantern/metrics/MaxPotentialFID.d.ts +24 -0
  67. package/core/lib/lantern/metrics/{max-potential-fid.js → MaxPotentialFID.js} +12 -13
  68. package/core/lib/lantern/metrics/MetricTestUtils.d.ts +19 -0
  69. package/core/lib/lantern/metrics/MetricTestUtils.js +48 -0
  70. package/core/lib/lantern/metrics/{speed-index.d.ts → SpeedIndex.d.ts} +7 -13
  71. package/core/lib/lantern/metrics/{speed-index.js → SpeedIndex.js} +12 -14
  72. package/core/lib/lantern/metrics/SpeedIndex.test.js +83 -0
  73. package/core/lib/lantern/metrics/TotalBlockingTime.d.ts +25 -0
  74. package/core/lib/lantern/metrics/{total-blocking-time.js → TotalBlockingTime.js} +13 -16
  75. package/core/lib/lantern/metrics/__snapshots__/first-contentful-paint-test.js.snap +11 -0
  76. package/core/lib/lantern/metrics/__snapshots__/interactive-test.js.snap +17 -0
  77. package/core/lib/lantern/metrics/metrics.d.ts +9 -0
  78. package/core/lib/lantern/metrics/metrics.js +16 -0
  79. package/core/lib/lantern/{simulator/connection-pool.d.ts → simulation/ConnectionPool.d.ts} +5 -5
  80. package/core/lib/lantern/{simulator/connection-pool.js → simulation/ConnectionPool.js} +3 -3
  81. package/core/lib/lantern/simulation/ConnectionPool.test.js +195 -0
  82. package/core/lib/lantern/simulation/Constants.d.ts +52 -0
  83. package/core/lib/lantern/simulation/Constants.js +48 -0
  84. package/core/lib/lantern/{simulator/dns-cache.d.ts → simulation/DNSCache.d.ts} +2 -2
  85. package/core/lib/lantern/{simulator/dns-cache.js → simulation/DNSCache.js} +1 -1
  86. package/core/lib/lantern/simulation/DNSCache.test.js +72 -0
  87. package/core/lib/lantern/{simulator/network-analyzer.d.ts → simulation/NetworkAnalyzer.d.ts} +8 -8
  88. package/core/lib/lantern/{simulator/network-analyzer.js → simulation/NetworkAnalyzer.js} +3 -3
  89. package/core/lib/lantern/simulation/NetworkAnalyzer.test.js +475 -0
  90. package/core/lib/lantern/{simulator/simulator-timing-map.d.ts → simulation/SimulationTimingMap.d.ts} +7 -7
  91. package/core/lib/lantern/{simulator/simulator-timing-map.js → simulation/SimulationTimingMap.js} +5 -6
  92. package/core/lib/lantern/{simulator/simulator.d.ts → simulation/Simulator.d.ts} +13 -15
  93. package/core/lib/lantern/{simulator/simulator.js → simulation/Simulator.js} +29 -30
  94. package/core/lib/lantern/simulation/Simulator.test.js +434 -0
  95. package/core/lib/lantern/simulation/TCPConnection.test.d.ts +2 -0
  96. package/core/lib/lantern/simulation/TCPConnection.test.js +374 -0
  97. package/core/lib/lantern/{simulator/tcp-connection.d.ts → simulation/TcpConnection.d.ts} +2 -2
  98. package/core/lib/lantern/{simulator/tcp-connection.js → simulation/TcpConnection.js} +1 -1
  99. package/core/lib/lantern/simulation/simulation.d.ts +21 -0
  100. package/core/lib/lantern/simulation/simulation.js +28 -0
  101. package/core/lib/lantern/types/lantern.d.ts +81 -9
  102. package/core/lib/lantern-trace-saver.d.ts +4 -4
  103. package/core/lib/lantern-trace-saver.js +3 -3
  104. package/core/lib/navigation-error.js +3 -3
  105. package/core/lib/network-recorder.js +2 -2
  106. package/core/lib/network-request.d.ts +1 -1
  107. package/core/lib/network-request.js +1 -1
  108. package/package.json +5 -5
  109. package/tsconfig.json +10 -8
  110. package/types/artifacts.d.ts +3 -10
  111. package/types/gatherer.d.ts +1 -1
  112. package/core/lib/lantern/cpu-node.d.ts +0 -44
  113. package/core/lib/lantern/metrics/interactive.d.ts +0 -26
  114. package/core/lib/lantern/metrics/largest-contentful-paint.d.ts +0 -19
  115. package/core/lib/lantern/metrics/max-potential-fid.d.ts +0 -30
  116. package/core/lib/lantern/metrics/total-blocking-time.d.ts +0 -31
  117. /package/core/lib/lantern/{lantern-error.js → LanternError.js} +0 -0
  118. /package/core/lib/lantern/{tbt-utils.js → TBTUtils.js} +0 -0
@@ -1,5 +1,5 @@
1
- export type Simulator = import('../../lib/lantern/simulator/simulator.js').Simulator;
2
- export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
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/simulator/simulator.js').Simulator} Simulator */
18
- /** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
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/simulator/simulator.js').Simulator;
3
- export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
4
- export type NetworkNode = import('../../lib/lantern/network-node.js').NetworkNode<LH.Artifacts.NetworkRequest>;
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/base-node.js';
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/simulator/simulator.js').Simulator} Simulator */
24
- /** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
25
- /** @typedef {import('../../lib/lantern/network-node.js').NetworkNode<LH.Artifacts.NetworkRequest>} NetworkNode */
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/simulator/simulator.js').Simulator;
3
- export type Node = import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>;
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/simulator/simulator.js').Simulator} Simulator */
13
- /** @typedef {import('../../lib/lantern/base-node.js').Node<LH.Artifacts.NetworkRequest>} Node */
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<LH.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
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<LH.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined, timeByTaskGroup?: Map<import("../lib/tracehouse/task-groups.js").TaskGroupIds, number> | undefined): {
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<LH.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
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<LH.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined): LH.Audit.Details.DebugData;
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<LH.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
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<LH.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined): Timing;
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<LH.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
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<LH.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
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<LH.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
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<LH.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} */
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/network-node.js").NetworkNode<NetworkRequest> | undefined;
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 {NetworkAnalyzer} from '../lib/lantern/simulator/network-analyzer.js';
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 = NetworkAnalyzer.findResourceForUrl(networkRecords, requestedUrl);
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 { Simulator } from '../lib/lantern/simulator/simulator.js';
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 {Simulator} from '../lib/lantern/simulator/simulator.js';
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 = NetworkAnalyzer.findLastDocumentForUrl(records, mainDocumentUrl);
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/metric.js').Extras;
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/metric.js').Extras} Extras */
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 { FirstContentfulPaint } from '../../lib/lantern/metrics/first-contentful-paint.js';
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/metric.js').Extras} Extras */
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/metric.js').Extras;
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/metric.js').Extras} Extras */
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 { Interactive } from '../../lib/lantern/metrics/interactive.js';
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/metric.js').Extras} Extras */
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/metric.js').Extras;
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/metric.js').Extras} Extras */
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 { LargestContentfulPaint } from '../../lib/lantern/metrics/largest-contentful-paint.js';
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/metric.js').Extras} Extras */
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/metric.js').Extras;
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/metric.js').Extras} Extras */
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 { MaxPotentialFID } from '../../lib/lantern/metrics/max-potential-fid.js';
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/metric.js').Extras} Extras */
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: import("../../lib/lantern/simulator/simulator.js").Simulator<any>;
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: import("../../lib/lantern/simulator/simulator.js").Simulator<any>;
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: import("../../lib/lantern/simulator/simulator.js").Simulator<any>;
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 {LanternError} from '../../lib/lantern/lantern-error.js';
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 = createProcessedNavigation(traceEngineResult.data);
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 LanternError)) {
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/metric.js').Extras;
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/metric.js').Extras} Extras */
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 { SpeedIndex } from '../../lib/lantern/metrics/speed-index.js';
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/metric.js').Extras} Extras */
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/metric.js').Extras;
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/metric.js').Extras} Extras */
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 { TotalBlockingTime } from '../../lib/lantern/metrics/total-blocking-time.js';
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 {TotalBlockingTime} from '../../lib/lantern/metrics/total-blocking-time.js';
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/metric.js').Extras} Extras */
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
- import {calculateSumOfBlockingTime} from '../../lib/lantern/tbt-utils.js';
13
+
14
+ const {calculateSumOfBlockingTime} = Lantern.TBTUtils;
13
15
 
14
16
  /**
15
17
  * @fileoverview This audit determines Total Blocking Time.