lighthouse 10.4.0-dev.20230713 → 10.4.0-dev.20230715

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 (174) hide show
  1. package/cli/cli-flags.d.ts +1 -6
  2. package/cli/cli-flags.js +0 -5
  3. package/cli/run.js +3 -10
  4. package/cli/test/smokehouse/lighthouse-runners/bundle.js +3 -1
  5. package/core/config/config-helpers.d.ts +3 -3
  6. package/core/config/config-helpers.js +5 -12
  7. package/core/config/config.js +1 -7
  8. package/core/config/constants.d.ts +0 -2
  9. package/core/config/constants.js +0 -16
  10. package/core/config/filters.js +1 -1
  11. package/core/config/validation.d.ts +5 -10
  12. package/core/config/validation.js +12 -22
  13. package/core/gather/base-artifacts.d.ts +4 -4
  14. package/core/gather/base-artifacts.js +2 -6
  15. package/core/gather/base-gatherer.d.ts +12 -37
  16. package/core/gather/base-gatherer.js +7 -54
  17. package/core/gather/driver/dom.d.ts +4 -4
  18. package/core/gather/driver/dom.js +2 -2
  19. package/core/gather/driver/environment.d.ts +4 -4
  20. package/core/gather/driver/environment.js +2 -2
  21. package/core/gather/driver/execution-context.d.ts +12 -3
  22. package/core/gather/driver/execution-context.js +27 -3
  23. package/core/gather/driver/navigation.d.ts +2 -2
  24. package/core/gather/driver/navigation.js +1 -1
  25. package/core/gather/driver/network-monitor.d.ts +6 -6
  26. package/core/gather/driver/network-monitor.js +3 -3
  27. package/core/gather/driver/network.d.ts +2 -2
  28. package/core/gather/driver/network.js +1 -1
  29. package/core/gather/driver/prepare.d.ts +10 -10
  30. package/core/gather/driver/prepare.js +10 -10
  31. package/core/gather/driver/service-workers.d.ts +4 -4
  32. package/core/gather/driver/service-workers.js +2 -2
  33. package/core/gather/driver/storage.d.ts +6 -6
  34. package/core/gather/driver/storage.js +3 -3
  35. package/core/gather/driver/target-manager.d.ts +6 -5
  36. package/core/gather/driver/target-manager.js +3 -3
  37. package/core/gather/driver/wait-for-condition.d.ts +14 -14
  38. package/core/gather/driver/wait-for-condition.js +8 -8
  39. package/core/gather/driver.d.ts +4 -4
  40. package/core/gather/driver.js +3 -3
  41. package/core/gather/fetcher.d.ts +3 -3
  42. package/core/gather/fetcher.js +1 -1
  43. package/core/gather/gatherers/accessibility.d.ts +4 -4
  44. package/core/gather/gatherers/accessibility.js +3 -3
  45. package/core/gather/gatherers/anchor-elements.d.ts +4 -4
  46. package/core/gather/gatherers/anchor-elements.js +4 -4
  47. package/core/gather/gatherers/bf-cache-failures.d.ts +8 -14
  48. package/core/gather/gatherers/bf-cache-failures.js +5 -14
  49. package/core/gather/gatherers/cache-contents.d.ts +4 -4
  50. package/core/gather/gatherers/cache-contents.js +3 -3
  51. package/core/gather/gatherers/console-messages.d.ts +6 -6
  52. package/core/gather/gatherers/console-messages.js +4 -4
  53. package/core/gather/gatherers/css-usage.d.ts +14 -14
  54. package/core/gather/gatherers/css-usage.js +9 -9
  55. package/core/gather/gatherers/devtools-log-compat.d.ts +5 -5
  56. package/core/gather/gatherers/devtools-log-compat.js +4 -4
  57. package/core/gather/gatherers/devtools-log.d.ts +6 -6
  58. package/core/gather/gatherers/devtools-log.js +4 -4
  59. package/core/gather/gatherers/dobetterweb/doctype.d.ts +4 -4
  60. package/core/gather/gatherers/dobetterweb/doctype.js +3 -3
  61. package/core/gather/gatherers/dobetterweb/domstats.d.ts +4 -4
  62. package/core/gather/gatherers/dobetterweb/domstats.js +3 -3
  63. package/core/gather/gatherers/dobetterweb/optimized-images.d.ts +10 -22
  64. package/core/gather/gatherers/dobetterweb/optimized-images.js +10 -27
  65. package/core/gather/gatherers/dobetterweb/response-compression.d.ts +6 -12
  66. package/core/gather/gatherers/dobetterweb/response-compression.js +6 -15
  67. package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.d.ts +8 -14
  68. package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +5 -14
  69. package/core/gather/gatherers/full-page-screenshot.d.ts +10 -10
  70. package/core/gather/gatherers/full-page-screenshot.js +6 -6
  71. package/core/gather/gatherers/global-listeners.d.ts +4 -4
  72. package/core/gather/gatherers/global-listeners.js +3 -3
  73. package/core/gather/gatherers/iframe-elements.d.ts +4 -4
  74. package/core/gather/gatherers/iframe-elements.js +3 -3
  75. package/core/gather/gatherers/image-elements.d.ts +10 -10
  76. package/core/gather/gatherers/image-elements.js +6 -6
  77. package/core/gather/gatherers/inputs.d.ts +4 -4
  78. package/core/gather/gatherers/inputs.js +3 -3
  79. package/core/gather/gatherers/inspector-issues.d.ts +8 -19
  80. package/core/gather/gatherers/inspector-issues.js +9 -26
  81. package/core/gather/gatherers/installability-errors.d.ts +6 -6
  82. package/core/gather/gatherers/installability-errors.js +4 -4
  83. package/core/gather/gatherers/js-usage.d.ts +6 -6
  84. package/core/gather/gatherers/js-usage.js +4 -4
  85. package/core/gather/gatherers/link-elements.d.ts +8 -20
  86. package/core/gather/gatherers/link-elements.js +7 -24
  87. package/core/gather/gatherers/main-document-content.d.ts +4 -16
  88. package/core/gather/gatherers/main-document-content.js +5 -23
  89. package/core/gather/gatherers/meta-elements.d.ts +4 -4
  90. package/core/gather/gatherers/meta-elements.js +3 -3
  91. package/core/gather/gatherers/network-user-agent.d.ts +5 -5
  92. package/core/gather/gatherers/network-user-agent.js +4 -4
  93. package/core/gather/gatherers/script-elements.d.ts +6 -11
  94. package/core/gather/gatherers/script-elements.js +4 -13
  95. package/core/gather/gatherers/scripts.d.ts +6 -6
  96. package/core/gather/gatherers/scripts.js +4 -4
  97. package/core/gather/gatherers/seo/embedded-content.d.ts +4 -4
  98. package/core/gather/gatherers/seo/embedded-content.js +3 -3
  99. package/core/gather/gatherers/seo/font-size.d.ts +6 -6
  100. package/core/gather/gatherers/seo/font-size.js +5 -5
  101. package/core/gather/gatherers/seo/robots-txt.d.ts +4 -4
  102. package/core/gather/gatherers/seo/robots-txt.js +3 -3
  103. package/core/gather/gatherers/seo/tap-targets.d.ts +8 -8
  104. package/core/gather/gatherers/seo/tap-targets.js +5 -5
  105. package/core/gather/gatherers/service-worker.d.ts +4 -10
  106. package/core/gather/gatherers/service-worker.js +3 -15
  107. package/core/gather/gatherers/source-maps.d.ts +12 -12
  108. package/core/gather/gatherers/source-maps.js +7 -7
  109. package/core/gather/gatherers/stacks.d.ts +7 -7
  110. package/core/gather/gatherers/stacks.js +6 -6
  111. package/core/gather/gatherers/trace-compat.d.ts +5 -5
  112. package/core/gather/gatherers/trace-compat.js +4 -4
  113. package/core/gather/gatherers/trace-elements.d.ts +13 -25
  114. package/core/gather/gatherers/trace-elements.js +13 -30
  115. package/core/gather/gatherers/trace.d.ts +8 -8
  116. package/core/gather/gatherers/trace.js +5 -5
  117. package/core/gather/gatherers/viewport-dimensions.d.ts +4 -4
  118. package/core/gather/gatherers/viewport-dimensions.js +3 -3
  119. package/core/gather/gatherers/web-app-manifest.d.ts +8 -8
  120. package/core/gather/gatherers/web-app-manifest.js +5 -5
  121. package/core/gather/navigation-runner.d.ts +9 -9
  122. package/core/gather/navigation-runner.js +6 -6
  123. package/core/gather/runner-helpers.d.ts +3 -3
  124. package/core/gather/runner-helpers.js +12 -4
  125. package/core/gather/session.d.ts +2 -2
  126. package/core/gather/session.js +1 -1
  127. package/core/gather/snapshot-runner.d.ts +2 -2
  128. package/core/gather/snapshot-runner.js +1 -1
  129. package/core/gather/timespan-runner.d.ts +2 -2
  130. package/core/gather/timespan-runner.js +1 -1
  131. package/core/index.cjs +0 -7
  132. package/core/index.d.ts +0 -15
  133. package/core/index.js +2 -40
  134. package/core/lib/asset-saver.js +8 -4
  135. package/core/lib/axe.js +1 -1
  136. package/core/lib/emulation.d.ts +14 -14
  137. package/core/lib/emulation.js +7 -7
  138. package/core/lib/page-functions.d.ts +2 -0
  139. package/core/lib/page-functions.js +10 -0
  140. package/core/lib/sentry.js +9 -2
  141. package/core/runner.d.ts +8 -30
  142. package/core/runner.js +6 -39
  143. package/core/user-flow.d.ts +4 -4
  144. package/core/user-flow.js +2 -2
  145. package/dist/report/bundle.esm.js +2221 -5832
  146. package/dist/report/flow.js +2631 -235
  147. package/dist/report/standalone.js +2586 -234
  148. package/package.json +8 -15
  149. package/third-party/esbuild-plugins-polyfills/LICENSE +3 -0
  150. package/third-party/esbuild-plugins-polyfills/README.md +7 -0
  151. package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.d.ts +9 -0
  152. package/third-party/esbuild-plugins-polyfills/esbuild-polyfills.js +129 -0
  153. package/tsconfig.json +1 -0
  154. package/types/artifacts.d.ts +12 -45
  155. package/types/config.d.ts +10 -52
  156. package/types/externs.d.ts +0 -2
  157. package/types/gatherer.d.ts +20 -45
  158. package/types/lh.d.ts +0 -2
  159. package/core/gather/gatherers/gatherer.d.ts +0 -46
  160. package/core/gather/gatherers/gatherer.js +0 -58
  161. package/core/legacy/config/config.d.ts +0 -107
  162. package/core/legacy/config/config.js +0 -566
  163. package/core/legacy/config/legacy-default-config.d.ts +0 -4
  164. package/core/legacy/config/legacy-default-config.js +0 -87
  165. package/core/legacy/gather/connections/connection.d.ts +0 -77
  166. package/core/legacy/gather/connections/connection.js +0 -196
  167. package/core/legacy/gather/connections/cri.d.ts +0 -27
  168. package/core/legacy/gather/connections/cri.js +0 -162
  169. package/core/legacy/gather/connections/raw.d.ts +0 -20
  170. package/core/legacy/gather/connections/raw.js +0 -57
  171. package/core/legacy/gather/driver.d.ts +0 -216
  172. package/core/legacy/gather/driver.js +0 -480
  173. package/core/legacy/gather/gather-runner.d.ts +0 -166
  174. package/core/legacy/gather/gather-runner.js +0 -590
@@ -45,7 +45,7 @@ function waitForNothing() {
45
45
  /**
46
46
  * Returns a promise that resolve when a frame has been navigated.
47
47
  * Used for detecting that our about:blank reset has been completed.
48
- * @param {LH.Gatherer.FRProtocolSession} session
48
+ * @param {LH.Gatherer.ProtocolSession} session
49
49
  * @return {CancellableWait<LH.Crdp.Page.FrameNavigatedEvent>}
50
50
  */
51
51
  function waitForFrameNavigated(session) {
@@ -68,7 +68,7 @@ function waitForFrameNavigated(session) {
68
68
 
69
69
  /**
70
70
  * Returns a promise that resolve when a frame has a FCP.
71
- * @param {LH.Gatherer.FRProtocolSession} session
71
+ * @param {LH.Gatherer.ProtocolSession} session
72
72
  * @param {number} pauseAfterFcpMs
73
73
  * @param {number} maxWaitForFcpMs
74
74
  * @return {CancellableWait}
@@ -119,7 +119,7 @@ function waitForFcp(session, pauseAfterFcpMs, maxWaitForFcpMs) {
119
119
  /**
120
120
  * Returns a promise that resolves when the network has been idle (after DCL) for
121
121
  * `networkQuietThresholdMs` ms and a method to cancel internal network listeners/timeout.
122
- * @param {LH.Gatherer.FRProtocolSession} session
122
+ * @param {LH.Gatherer.ProtocolSession} session
123
123
  * @param {NetworkMonitor} networkMonitor
124
124
  * @param {{networkQuietThresholdMs: number, busyEvent: NetworkMonitorEvent, idleEvent: NetworkMonitorEvent, isIdle(recorder: NetworkMonitor): boolean, pretendDCLAlreadyFired?: boolean}} networkQuietOptions
125
125
  * @return {CancellableWait}
@@ -213,7 +213,7 @@ function waitForNetworkIdle(session, networkMonitor, networkQuietOptions) {
213
213
 
214
214
  /**
215
215
  * Resolves when there have been no long tasks for at least waitForCPUQuiet ms.
216
- * @param {LH.Gatherer.FRProtocolSession} session
216
+ * @param {LH.Gatherer.ProtocolSession} session
217
217
  * @param {number} waitForCPUQuiet
218
218
  * @return {CancellableWait}
219
219
  */
@@ -344,7 +344,7 @@ function checkTimeSinceLastLongTaskInPage() {
344
344
  /**
345
345
  * Return a promise that resolves `pauseAfterLoadMs` after the load event
346
346
  * fires and a method to cancel internal listeners and timeout.
347
- * @param {LH.Gatherer.FRProtocolSession} session
347
+ * @param {LH.Gatherer.ProtocolSession} session
348
348
  * @param {number} pauseAfterLoadMs
349
349
  * @return {CancellableWait}
350
350
  */
@@ -379,7 +379,7 @@ function waitForLoadEvent(session, pauseAfterLoadMs) {
379
379
 
380
380
  /**
381
381
  * Returns whether the page appears to be hung.
382
- * @param {LH.Gatherer.FRProtocolSession} session
382
+ * @param {LH.Gatherer.ProtocolSession} session
383
383
  * @return {Promise<boolean>}
384
384
  */
385
385
  async function isPageHung(session) {
@@ -410,7 +410,7 @@ const DEFAULT_WAIT_FUNCTIONS = {waitForFcp, waitForLoadEvent, waitForCPUIdle, wa
410
410
  * - cpuQuietThresholdMs have passed since the last long task after network-2-quiet.
411
411
  * - maxWaitForLoadedMs milliseconds have passed.
412
412
  * See https://github.com/GoogleChrome/lighthouse/issues/627 for more.
413
- * @param {LH.Gatherer.FRProtocolSession} session
413
+ * @param {LH.Gatherer.ProtocolSession} session
414
414
  * @param {NetworkMonitor} networkMonitor
415
415
  * @param {WaitOptions} options
416
416
  * @return {Promise<{timedOut: boolean}>}
@@ -519,7 +519,7 @@ async function waitForFullyLoaded(session, networkMonitor, options) {
519
519
  }
520
520
 
521
521
  /**
522
- * @param {LH.Gatherer.FRTransitionalDriver} driver
522
+ * @param {LH.Gatherer.Driver} driver
523
523
  */
524
524
  function waitForUserToContinue(driver) {
525
525
  /* c8 ignore start */
@@ -1,5 +1,5 @@
1
- /** @implements {LH.Gatherer.FRTransitionalDriver} */
2
- export class Driver implements LH.Gatherer.FRTransitionalDriver {
1
+ /** @implements {LH.Gatherer.Driver} */
2
+ export class Driver implements LH.Gatherer.Driver {
3
3
  /**
4
4
  * @param {LH.Puppeteer.Page} page
5
5
  */
@@ -11,8 +11,8 @@ export class Driver implements LH.Gatherer.FRTransitionalDriver {
11
11
  _executionContext: ExecutionContext | undefined;
12
12
  /** @type {Fetcher|undefined} */
13
13
  _fetcher: Fetcher | undefined;
14
- defaultSession: import("../../types/gatherer.js").default.FRProtocolSession;
15
- /** @return {LH.Gatherer.FRTransitionalDriver['executionContext']} */
14
+ defaultSession: import("../../types/gatherer.js").default.ProtocolSession;
15
+ /** @return {LH.Gatherer.Driver['executionContext']} */
16
16
  get executionContext(): ExecutionContext;
17
17
  /** @return {Fetcher} */
18
18
  get fetcher(): Fetcher;
@@ -15,7 +15,7 @@ const throwNotConnectedFn = () => {
15
15
  throw new Error('Session not connected');
16
16
  };
17
17
 
18
- /** @type {LH.Gatherer.FRProtocolSession} */
18
+ /** @type {LH.Gatherer.ProtocolSession} */
19
19
  const throwingSession = {
20
20
  setTargetInfo: throwNotConnectedFn,
21
21
  hasNextProtocolTimeout: throwNotConnectedFn,
@@ -28,7 +28,7 @@ const throwingSession = {
28
28
  dispose: throwNotConnectedFn,
29
29
  };
30
30
 
31
- /** @implements {LH.Gatherer.FRTransitionalDriver} */
31
+ /** @implements {LH.Gatherer.Driver} */
32
32
  class Driver {
33
33
  /**
34
34
  * @param {LH.Puppeteer.Page} page
@@ -45,7 +45,7 @@ class Driver {
45
45
  this.defaultSession = throwingSession;
46
46
  }
47
47
 
48
- /** @return {LH.Gatherer.FRTransitionalDriver['executionContext']} */
48
+ /** @return {LH.Gatherer.Driver['executionContext']} */
49
49
  get executionContext() {
50
50
  if (!this._executionContext) return throwNotConnectedFn();
51
51
  return this._executionContext;
@@ -9,10 +9,10 @@ export type FetchResponse = {
9
9
  /** @typedef {{content: string|null, status: number|null}} FetchResponse */
10
10
  export class Fetcher {
11
11
  /**
12
- * @param {LH.Gatherer.FRProtocolSession} session
12
+ * @param {LH.Gatherer.ProtocolSession} session
13
13
  */
14
- constructor(session: LH.Gatherer.FRProtocolSession);
15
- session: LH.Gatherer.FRProtocolSession;
14
+ constructor(session: LH.Gatherer.ProtocolSession);
15
+ session: LH.Gatherer.ProtocolSession;
16
16
  /**
17
17
  * Fetches any resource using the network directly.
18
18
  *
@@ -17,7 +17,7 @@ import * as LH from '../../types/lh.js';
17
17
 
18
18
  class Fetcher {
19
19
  /**
20
- * @param {LH.Gatherer.FRProtocolSession} session
20
+ * @param {LH.Gatherer.ProtocolSession} session
21
21
  */
22
22
  constructor(session) {
23
23
  this.session = session;
@@ -1,16 +1,16 @@
1
1
  export default Accessibility;
2
- declare class Accessibility extends FRGatherer {
2
+ declare class Accessibility extends BaseGatherer {
3
3
  static pageFns: {
4
4
  runA11yChecks: typeof runA11yChecks;
5
5
  createAxeRuleResultArtifact: typeof createAxeRuleResultArtifact;
6
6
  };
7
7
  /**
8
- * @param {LH.Gatherer.FRTransitionalContext} passContext
8
+ * @param {LH.Gatherer.Context} passContext
9
9
  * @return {Promise<LH.Artifacts.Accessibility>}
10
10
  */
11
- getArtifact(passContext: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts.Accessibility>;
11
+ getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts.Accessibility>;
12
12
  }
13
- import FRGatherer from '../base-gatherer.js';
13
+ import BaseGatherer from '../base-gatherer.js';
14
14
  /**
15
15
  * @return {Promise<LH.Artifacts.Accessibility>}
16
16
  */
@@ -6,7 +6,7 @@
6
6
 
7
7
  /* global window, document, getNodeDetails */
8
8
 
9
- import FRGatherer from '../base-gatherer.js';
9
+ import BaseGatherer from '../base-gatherer.js';
10
10
  import {axeSource} from '../../lib/axe.js';
11
11
  import {pageFunctions} from '../../lib/page-functions.js';
12
12
 
@@ -169,7 +169,7 @@ function createAxeRuleResultArtifact(result) {
169
169
  }
170
170
  /* c8 ignore stop */
171
171
 
172
- class Accessibility extends FRGatherer {
172
+ class Accessibility extends BaseGatherer {
173
173
  /** @type {LH.Gatherer.GathererMeta} */
174
174
  meta = {
175
175
  supportedModes: ['snapshot', 'navigation'],
@@ -181,7 +181,7 @@ class Accessibility extends FRGatherer {
181
181
  };
182
182
 
183
183
  /**
184
- * @param {LH.Gatherer.FRTransitionalContext} passContext
184
+ * @param {LH.Gatherer.Context} passContext
185
185
  * @return {Promise<LH.Artifacts.Accessibility>}
186
186
  */
187
187
  getArtifact(passContext) {
@@ -1,10 +1,10 @@
1
1
  export default AnchorElements;
2
- declare class AnchorElements extends FRGatherer {
2
+ declare class AnchorElements extends BaseGatherer {
3
3
  /**
4
- * @param {LH.Gatherer.FRTransitionalContext} passContext
4
+ * @param {LH.Gatherer.Context} passContext
5
5
  * @return {Promise<LH.Artifacts['AnchorElements']>}
6
6
  */
7
- getArtifact(passContext: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts['AnchorElements']>;
7
+ getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts['AnchorElements']>;
8
8
  }
9
- import FRGatherer from '../base-gatherer.js';
9
+ import BaseGatherer from '../base-gatherer.js';
10
10
  //# sourceMappingURL=anchor-elements.d.ts.map
@@ -6,7 +6,7 @@
6
6
 
7
7
  /* global getNodeDetails */
8
8
 
9
- import FRGatherer from '../base-gatherer.js';
9
+ import BaseGatherer from '../base-gatherer.js';
10
10
  import {pageFunctions} from '../../lib/page-functions.js';
11
11
  import {resolveDevtoolsNodePathToObjectId} from '../driver/dom.js';
12
12
 
@@ -76,7 +76,7 @@ function collectAnchorElements() {
76
76
  /* c8 ignore stop */
77
77
 
78
78
  /**
79
- * @param {LH.Gatherer.FRProtocolSession} session
79
+ * @param {LH.Gatherer.ProtocolSession} session
80
80
  * @param {string} devtoolsNodePath
81
81
  * @return {Promise<Array<{type: string}>>}
82
82
  */
@@ -91,14 +91,14 @@ async function getEventListeners(session, devtoolsNodePath) {
91
91
  return response.listeners.map(({type}) => ({type}));
92
92
  }
93
93
 
94
- class AnchorElements extends FRGatherer {
94
+ class AnchorElements extends BaseGatherer {
95
95
  /** @type {LH.Gatherer.GathererMeta} */
96
96
  meta = {
97
97
  supportedModes: ['snapshot', 'navigation'],
98
98
  };
99
99
 
100
100
  /**
101
- * @param {LH.Gatherer.FRTransitionalContext} passContext
101
+ * @param {LH.Gatherer.Context} passContext
102
102
  * @return {Promise<LH.Artifacts['AnchorElements']>}
103
103
  */
104
104
  async getArtifact(passContext) {
@@ -1,5 +1,5 @@
1
1
  export default BFCacheFailures;
2
- declare class BFCacheFailures extends FRGatherer {
2
+ declare class BFCacheFailures extends BaseGatherer {
3
3
  /**
4
4
  * @param {LH.Crdp.Page.BackForwardCacheNotRestoredExplanation[]} errorList
5
5
  * @return {LH.Artifacts.BFCacheFailure}
@@ -18,26 +18,20 @@ declare class BFCacheFailures extends FRGatherer {
18
18
  /** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
19
19
  meta: LH.Gatherer.GathererMeta<'DevtoolsLog'>;
20
20
  /**
21
- * @param {LH.Gatherer.FRTransitionalContext} context
21
+ * @param {LH.Gatherer.Context} context
22
22
  * @return {Promise<LH.Crdp.Page.BackForwardCacheNotUsedEvent|undefined>}
23
23
  */
24
- activelyCollectBFCacheEvent(context: LH.Gatherer.FRTransitionalContext): Promise<LH.Crdp.Page.BackForwardCacheNotUsedEvent | undefined>;
24
+ activelyCollectBFCacheEvent(context: LH.Gatherer.Context): Promise<LH.Crdp.Page.BackForwardCacheNotUsedEvent | undefined>;
25
25
  /**
26
- * @param {LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>} context
26
+ * @param {LH.Gatherer.Context<'DevtoolsLog'>} context
27
27
  * @return {LH.Crdp.Page.BackForwardCacheNotUsedEvent[]}
28
28
  */
29
- passivelyCollectBFCacheEvents(context: LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>): LH.Crdp.Page.BackForwardCacheNotUsedEvent[];
29
+ passivelyCollectBFCacheEvents(context: LH.Gatherer.Context<'DevtoolsLog'>): LH.Crdp.Page.BackForwardCacheNotUsedEvent[];
30
30
  /**
31
- * @param {LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>} context
31
+ * @param {LH.Gatherer.Context<'DevtoolsLog'>} context
32
32
  * @return {Promise<LH.Artifacts['BFCacheFailures']>}
33
33
  */
34
- getArtifact(context: LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>): Promise<LH.Artifacts['BFCacheFailures']>;
35
- /**
36
- * @param {LH.Gatherer.PassContext} passContext
37
- * @param {LH.Gatherer.LoadData} loadData
38
- * @return {Promise<LH.Artifacts['BFCacheFailures']>}
39
- */
40
- afterPass(passContext: LH.Gatherer.PassContext, loadData: LH.Gatherer.LoadData): Promise<LH.Artifacts['BFCacheFailures']>;
34
+ getArtifact(context: LH.Gatherer.Context<'DevtoolsLog'>): Promise<LH.Artifacts['BFCacheFailures']>;
41
35
  }
42
- import FRGatherer from '../base-gatherer.js';
36
+ import BaseGatherer from '../base-gatherer.js';
43
37
  //# sourceMappingURL=bf-cache-failures.d.ts.map
@@ -4,14 +4,14 @@
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
6
 
7
- import FRGatherer from '../base-gatherer.js';
7
+ import BaseGatherer from '../base-gatherer.js';
8
8
  import {waitForFrameNavigated, waitForLoadEvent} from '../driver/wait-for-condition.js';
9
9
  import DevtoolsLog from './devtools-log.js';
10
10
 
11
11
  const AFTER_RETURN_TIMEOUT = 100;
12
12
  const TEMP_PAGE_PAUSE_TIMEOUT = 100;
13
13
 
14
- class BFCacheFailures extends FRGatherer {
14
+ class BFCacheFailures extends BaseGatherer {
15
15
  /** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
16
16
  meta = {
17
17
  supportedModes: ['navigation', 'timespan'],
@@ -83,7 +83,7 @@ class BFCacheFailures extends FRGatherer {
83
83
  }
84
84
 
85
85
  /**
86
- * @param {LH.Gatherer.FRTransitionalContext} context
86
+ * @param {LH.Gatherer.Context} context
87
87
  * @return {Promise<LH.Crdp.Page.BackForwardCacheNotUsedEvent|undefined>}
88
88
  */
89
89
  async activelyCollectBFCacheEvent(context) {
@@ -137,7 +137,7 @@ class BFCacheFailures extends FRGatherer {
137
137
  }
138
138
 
139
139
  /**
140
- * @param {LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>} context
140
+ * @param {LH.Gatherer.Context<'DevtoolsLog'>} context
141
141
  * @return {LH.Crdp.Page.BackForwardCacheNotUsedEvent[]}
142
142
  */
143
143
  passivelyCollectBFCacheEvents(context) {
@@ -151,7 +151,7 @@ class BFCacheFailures extends FRGatherer {
151
151
  }
152
152
 
153
153
  /**
154
- * @param {LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>} context
154
+ * @param {LH.Gatherer.Context<'DevtoolsLog'>} context
155
155
  * @return {Promise<LH.Artifacts['BFCacheFailures']>}
156
156
  */
157
157
  async getArtifact(context) {
@@ -163,15 +163,6 @@ class BFCacheFailures extends FRGatherer {
163
163
 
164
164
  return events.map(BFCacheFailures.processBFCacheEvent);
165
165
  }
166
-
167
- /**
168
- * @param {LH.Gatherer.PassContext} passContext
169
- * @param {LH.Gatherer.LoadData} loadData
170
- * @return {Promise<LH.Artifacts['BFCacheFailures']>}
171
- */
172
- async afterPass(passContext, loadData) {
173
- return this.getArtifact({...passContext, dependencies: {DevtoolsLog: loadData.devtoolsLog}});
174
- }
175
166
  }
176
167
 
177
168
  export default BFCacheFailures;
@@ -1,11 +1,11 @@
1
1
  export default CacheContents;
2
- declare class CacheContents extends FRGatherer {
2
+ declare class CacheContents extends BaseGatherer {
3
3
  /**
4
4
  * Creates an array of cached URLs.
5
- * @param {LH.Gatherer.FRTransitionalContext} passContext
5
+ * @param {LH.Gatherer.Context} passContext
6
6
  * @return {Promise<LH.Artifacts['CacheContents']>}
7
7
  */
8
- getArtifact(passContext: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts['CacheContents']>;
8
+ getArtifact(passContext: LH.Gatherer.Context): Promise<LH.Artifacts['CacheContents']>;
9
9
  }
10
- import FRGatherer from '../base-gatherer.js';
10
+ import BaseGatherer from '../base-gatherer.js';
11
11
  //# sourceMappingURL=cache-contents.d.ts.map
@@ -6,7 +6,7 @@
6
6
 
7
7
  /* global caches */
8
8
 
9
- import FRGatherer from '../base-gatherer.js';
9
+ import BaseGatherer from '../base-gatherer.js';
10
10
 
11
11
  /**
12
12
  * @return {Promise<Array<string>>}
@@ -36,7 +36,7 @@ function getCacheContents() {
36
36
  }
37
37
  /* c8 ignore stop */
38
38
 
39
- class CacheContents extends FRGatherer {
39
+ class CacheContents extends BaseGatherer {
40
40
  /** @type {LH.Gatherer.GathererMeta} */
41
41
  meta = {
42
42
  supportedModes: ['snapshot', 'navigation'],
@@ -44,7 +44,7 @@ class CacheContents extends FRGatherer {
44
44
 
45
45
  /**
46
46
  * Creates an array of cached URLs.
47
- * @param {LH.Gatherer.FRTransitionalContext} passContext
47
+ * @param {LH.Gatherer.Context} passContext
48
48
  * @return {Promise<LH.Artifacts['CacheContents']>}
49
49
  */
50
50
  async getArtifact(passContext) {
@@ -1,5 +1,5 @@
1
1
  export default ConsoleMessages;
2
- declare class ConsoleMessages extends FRGatherer {
2
+ declare class ConsoleMessages extends BaseGatherer {
3
3
  /** @type {LH.Artifacts.ConsoleMessage[]} */
4
4
  _logEntries: LH.Artifacts.ConsoleMessage[];
5
5
  _onConsoleAPICalled: (event: LH.Crdp.Runtime.ConsoleAPICalledEvent) => void;
@@ -22,18 +22,18 @@ declare class ConsoleMessages extends FRGatherer {
22
22
  */
23
23
  onLogEntry(event: LH.Crdp.Log.EntryAddedEvent): void;
24
24
  /**
25
- * @param {LH.Gatherer.FRTransitionalContext} passContext
25
+ * @param {LH.Gatherer.Context} passContext
26
26
  */
27
- startInstrumentation(passContext: LH.Gatherer.FRTransitionalContext): Promise<void>;
27
+ startInstrumentation(passContext: LH.Gatherer.Context): Promise<void>;
28
28
  /**
29
- * @param {LH.Gatherer.FRTransitionalContext} passContext
29
+ * @param {LH.Gatherer.Context} passContext
30
30
  * @return {Promise<void>}
31
31
  */
32
- stopInstrumentation({ driver }: LH.Gatherer.FRTransitionalContext): Promise<void>;
32
+ stopInstrumentation({ driver }: LH.Gatherer.Context): Promise<void>;
33
33
  /**
34
34
  * @return {Promise<LH.Artifacts['ConsoleMessages']>}
35
35
  */
36
36
  getArtifact(): Promise<LH.Artifacts['ConsoleMessages']>;
37
37
  }
38
- import FRGatherer from '../base-gatherer.js';
38
+ import BaseGatherer from '../base-gatherer.js';
39
39
  //# sourceMappingURL=console-messages.d.ts.map
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
 
13
- import FRGatherer from '../base-gatherer.js';
13
+ import BaseGatherer from '../base-gatherer.js';
14
14
 
15
15
  /**
16
16
  * @param {LH.Crdp.Runtime.RemoteObject} obj
@@ -29,7 +29,7 @@ function remoteObjectToString(obj) {
29
29
  return `[${type} ${className}]`;
30
30
  }
31
31
 
32
- class ConsoleMessages extends FRGatherer {
32
+ class ConsoleMessages extends BaseGatherer {
33
33
  /** @type {LH.Gatherer.GathererMeta} */
34
34
  meta = {
35
35
  supportedModes: ['timespan', 'navigation'],
@@ -134,7 +134,7 @@ class ConsoleMessages extends FRGatherer {
134
134
  }
135
135
 
136
136
  /**
137
- * @param {LH.Gatherer.FRTransitionalContext} passContext
137
+ * @param {LH.Gatherer.Context} passContext
138
138
  */
139
139
  async startInstrumentation(passContext) {
140
140
  const session = passContext.driver.defaultSession;
@@ -151,7 +151,7 @@ class ConsoleMessages extends FRGatherer {
151
151
  }
152
152
 
153
153
  /**
154
- * @param {LH.Gatherer.FRTransitionalContext} passContext
154
+ * @param {LH.Gatherer.Context} passContext
155
155
  * @return {Promise<void>}
156
156
  */
157
157
  async stopInstrumentation({driver}) {
@@ -1,7 +1,7 @@
1
1
  export default CSSUsage;
2
- declare class CSSUsage extends FRGatherer {
3
- /** @type {LH.Gatherer.FRProtocolSession|undefined} */
4
- _session: LH.Gatherer.FRProtocolSession | undefined;
2
+ declare class CSSUsage extends BaseGatherer {
3
+ /** @type {LH.Gatherer.ProtocolSession|undefined} */
4
+ _session: LH.Gatherer.ProtocolSession | undefined;
5
5
  /** @type {Map<string, Promise<LH.Artifacts.CSSStyleSheetInfo|Error>>} */
6
6
  _sheetPromises: Map<string, Promise<LH.Artifacts.CSSStyleSheetInfo | Error>>;
7
7
  /**
@@ -14,26 +14,26 @@ declare class CSSUsage extends FRGatherer {
14
14
  */
15
15
  _onStylesheetAdded(event: LH.Crdp.CSS.StyleSheetAddedEvent): Promise<void>;
16
16
  /**
17
- * @param {LH.Gatherer.FRTransitionalContext} context
17
+ * @param {LH.Gatherer.Context} context
18
18
  */
19
- startCSSUsageTracking(context: LH.Gatherer.FRTransitionalContext): Promise<void>;
19
+ startCSSUsageTracking(context: LH.Gatherer.Context): Promise<void>;
20
20
  /**
21
- * @param {LH.Gatherer.FRTransitionalContext} context
21
+ * @param {LH.Gatherer.Context} context
22
22
  */
23
- stopCSSUsageTracking(context: LH.Gatherer.FRTransitionalContext): Promise<void>;
23
+ stopCSSUsageTracking(context: LH.Gatherer.Context): Promise<void>;
24
24
  /**
25
- * @param {LH.Gatherer.FRTransitionalContext} context
25
+ * @param {LH.Gatherer.Context} context
26
26
  */
27
- startInstrumentation(context: LH.Gatherer.FRTransitionalContext): Promise<void>;
27
+ startInstrumentation(context: LH.Gatherer.Context): Promise<void>;
28
28
  /**
29
- * @param {LH.Gatherer.FRTransitionalContext} context
29
+ * @param {LH.Gatherer.Context} context
30
30
  */
31
- stopInstrumentation(context: LH.Gatherer.FRTransitionalContext): Promise<void>;
31
+ stopInstrumentation(context: LH.Gatherer.Context): Promise<void>;
32
32
  /**
33
- * @param {LH.Gatherer.FRTransitionalContext} context
33
+ * @param {LH.Gatherer.Context} context
34
34
  * @return {Promise<LH.Artifacts['CSSUsage']>}
35
35
  */
36
- getArtifact(context: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts['CSSUsage']>;
36
+ getArtifact(context: LH.Gatherer.Context): Promise<LH.Artifacts['CSSUsage']>;
37
37
  }
38
- import FRGatherer from '../base-gatherer.js';
38
+ import BaseGatherer from '../base-gatherer.js';
39
39
  //# sourceMappingURL=css-usage.d.ts.map
@@ -10,13 +10,13 @@
10
10
 
11
11
  import log from 'lighthouse-logger';
12
12
 
13
- import FRGatherer from '../base-gatherer.js';
13
+ import BaseGatherer from '../base-gatherer.js';
14
14
  import {Sentry} from '../../lib/sentry.js';
15
15
 
16
- class CSSUsage extends FRGatherer {
16
+ class CSSUsage extends BaseGatherer {
17
17
  constructor() {
18
18
  super();
19
- /** @type {LH.Gatherer.FRProtocolSession|undefined} */
19
+ /** @type {LH.Gatherer.ProtocolSession|undefined} */
20
20
  this._session = undefined;
21
21
  /** @type {Map<string, Promise<LH.Artifacts.CSSStyleSheetInfo|Error>>} */
22
22
  this._sheetPromises = new Map();
@@ -51,7 +51,7 @@ class CSSUsage extends FRGatherer {
51
51
  );
52
52
  Sentry.captureException(err, {
53
53
  tags: {
54
- gatherer: this.name,
54
+ gatherer: 'CSSUsage',
55
55
  },
56
56
  extra: {
57
57
  url: event.header.sourceURL,
@@ -64,7 +64,7 @@ class CSSUsage extends FRGatherer {
64
64
  }
65
65
 
66
66
  /**
67
- * @param {LH.Gatherer.FRTransitionalContext} context
67
+ * @param {LH.Gatherer.Context} context
68
68
  */
69
69
  async startCSSUsageTracking(context) {
70
70
  const session = context.driver.defaultSession;
@@ -78,7 +78,7 @@ class CSSUsage extends FRGatherer {
78
78
 
79
79
 
80
80
  /**
81
- * @param {LH.Gatherer.FRTransitionalContext} context
81
+ * @param {LH.Gatherer.Context} context
82
82
  */
83
83
  async stopCSSUsageTracking(context) {
84
84
  const session = context.driver.defaultSession;
@@ -88,7 +88,7 @@ class CSSUsage extends FRGatherer {
88
88
  }
89
89
 
90
90
  /**
91
- * @param {LH.Gatherer.FRTransitionalContext} context
91
+ * @param {LH.Gatherer.Context} context
92
92
  */
93
93
  async startInstrumentation(context) {
94
94
  if (context.gatherMode !== 'timespan') return;
@@ -96,7 +96,7 @@ class CSSUsage extends FRGatherer {
96
96
  }
97
97
 
98
98
  /**
99
- * @param {LH.Gatherer.FRTransitionalContext} context
99
+ * @param {LH.Gatherer.Context} context
100
100
  */
101
101
  async stopInstrumentation(context) {
102
102
  if (context.gatherMode !== 'timespan') return;
@@ -104,7 +104,7 @@ class CSSUsage extends FRGatherer {
104
104
  }
105
105
 
106
106
  /**
107
- * @param {LH.Gatherer.FRTransitionalContext} context
107
+ * @param {LH.Gatherer.Context} context
108
108
  * @return {Promise<LH.Artifacts['CSSUsage']>}
109
109
  */
110
110
  async getArtifact(context) {
@@ -1,13 +1,13 @@
1
1
  export default DevtoolsLogCompat;
2
- /** @implements {LH.Gatherer.FRGathererInstance<'DevtoolsLog'>} */
3
- declare class DevtoolsLogCompat extends FRGatherer implements LH.Gatherer.FRGathererInstance<'DevtoolsLog'> {
2
+ /** @implements {LH.Gatherer.GathererInstance<'DevtoolsLog'>} */
3
+ declare class DevtoolsLogCompat extends BaseGatherer implements LH.Gatherer.GathererInstance<'DevtoolsLog'> {
4
4
  /** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
5
5
  meta: LH.Gatherer.GathererMeta<'DevtoolsLog'>;
6
6
  /**
7
- * @param {LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>} passContext
7
+ * @param {LH.Gatherer.Context<'DevtoolsLog'>} passContext
8
8
  * @return {Promise<LH.Artifacts['devtoolsLogs']>}
9
9
  */
10
- getArtifact(passContext: LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>): Promise<LH.Artifacts['devtoolsLogs']>;
10
+ getArtifact(passContext: LH.Gatherer.Context<'DevtoolsLog'>): Promise<LH.Artifacts['devtoolsLogs']>;
11
11
  }
12
- import FRGatherer from '../base-gatherer.js';
12
+ import BaseGatherer from '../base-gatherer.js';
13
13
  //# sourceMappingURL=devtools-log-compat.d.ts.map
@@ -11,10 +11,10 @@
11
11
  */
12
12
 
13
13
  import DevtoolsLogGatherer from './devtools-log.js';
14
- import FRGatherer from '../base-gatherer.js';
14
+ import BaseGatherer from '../base-gatherer.js';
15
15
 
16
- /** @implements {LH.Gatherer.FRGathererInstance<'DevtoolsLog'>} */
17
- class DevtoolsLogCompat extends FRGatherer {
16
+ /** @implements {LH.Gatherer.GathererInstance<'DevtoolsLog'>} */
17
+ class DevtoolsLogCompat extends BaseGatherer {
18
18
  /** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
19
19
  meta = {
20
20
  supportedModes: ['timespan', 'navigation'],
@@ -22,7 +22,7 @@ class DevtoolsLogCompat extends FRGatherer {
22
22
  };
23
23
 
24
24
  /**
25
- * @param {LH.Gatherer.FRTransitionalContext<'DevtoolsLog'>} passContext
25
+ * @param {LH.Gatherer.Context<'DevtoolsLog'>} passContext
26
26
  * @return {Promise<LH.Artifacts['devtoolsLogs']>}
27
27
  */
28
28
  async getArtifact(passContext) {
@@ -1,17 +1,17 @@
1
1
  export default DevtoolsLog;
2
- declare class DevtoolsLog extends FRGatherer {
2
+ declare class DevtoolsLog extends BaseGatherer {
3
3
  static symbol: symbol;
4
4
  _messageLog: DevtoolsMessageLog;
5
5
  /** @param {LH.Protocol.RawEventMessage} e */
6
6
  _onProtocolMessage: (e: LH.Protocol.RawEventMessage) => void;
7
7
  /**
8
- * @param {LH.Gatherer.FRTransitionalContext} passContext
8
+ * @param {LH.Gatherer.Context} passContext
9
9
  */
10
- startSensitiveInstrumentation({ driver }: LH.Gatherer.FRTransitionalContext): Promise<void>;
10
+ startSensitiveInstrumentation({ driver }: LH.Gatherer.Context): Promise<void>;
11
11
  /**
12
- * @param {LH.Gatherer.FRTransitionalContext} passContext
12
+ * @param {LH.Gatherer.Context} passContext
13
13
  */
14
- stopSensitiveInstrumentation({ driver }: LH.Gatherer.FRTransitionalContext): Promise<void>;
14
+ stopSensitiveInstrumentation({ driver }: LH.Gatherer.Context): Promise<void>;
15
15
  /**
16
16
  * @return {Promise<LH.Artifacts['DevtoolsLog']>}
17
17
  */
@@ -44,5 +44,5 @@ export class DevtoolsMessageLog {
44
44
  */
45
45
  record(message: LH.Protocol.RawEventMessage): void;
46
46
  }
47
- import FRGatherer from '../base-gatherer.js';
47
+ import BaseGatherer from '../base-gatherer.js';
48
48
  //# sourceMappingURL=devtools-log.d.ts.map