chrome-devtools-frontend 1.0.1650232 → 1.0.1650677

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 (265) hide show
  1. package/.agents/skills/version-control/SKILL.md +5 -1
  2. package/config/typescript/tsconfig.base.json +1 -0
  3. package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
  4. package/front_end/core/host/UserMetrics.ts +0 -11
  5. package/front_end/devtools_compatibility.js +1 -2
  6. package/front_end/foundation/Universe.ts +7 -0
  7. package/front_end/models/ai_assistance/AiAgent2.ts +11 -1
  8. package/front_end/models/ai_assistance/README.md +4 -0
  9. package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +2 -0
  10. package/front_end/models/ai_assistance/agents/AiAgent.ts +3 -0
  11. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -0
  12. package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
  13. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  14. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +2 -0
  15. package/front_end/models/ai_assistance/skills/accessibility.md +13 -0
  16. package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +54 -0
  17. package/front_end/models/ai_assistance/tools/ResolveLighthousePath.ts +124 -0
  18. package/front_end/models/ai_assistance/tools/Tool.ts +12 -2
  19. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +4 -0
  20. package/front_end/models/persistence/NetworkPersistenceManager.ts +9 -1
  21. package/front_end/panels/ai_assistance/components/ChatMessage.ts +3 -11
  22. package/front_end/panels/common/ExtensionServer.ts +70 -50
  23. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  24. package/front_end/panels/js_timeline/js_timeline-meta.ts +1 -2
  25. package/front_end/panels/network/RequestHeadersView.ts +2 -2
  26. package/front_end/panels/network/components/RequestHeadersView.css +1 -0
  27. package/front_end/panels/network/components/ResponseHeaderSection.css +5 -1
  28. package/front_end/panels/recorder/testing/RecorderHelpers.ts +2 -0
  29. package/front_end/panels/timeline/timeline-meta.ts +1 -1
  30. package/front_end/third_party/chromium/README.chromium +1 -1
  31. package/front_end/third_party/puppeteer/README.chromium +2 -2
  32. package/front_end/third_party/puppeteer/package/README.md +14 -0
  33. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +60 -24
  34. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +271 -164
  35. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +2 -6
  36. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
  37. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js +2 -2
  38. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
  39. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +2 -2
  40. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
  41. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +11 -7
  42. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
  43. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/JSHandle.d.ts.map +1 -1
  44. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/JSHandle.js +3 -10
  45. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/JSHandle.js.map +1 -1
  46. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +9 -4
  47. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
  48. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +4 -4
  49. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
  50. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/WebWorker.d.ts +13 -0
  51. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/WebWorker.d.ts.map +1 -1
  52. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/WebWorker.js +14 -0
  53. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/WebWorker.js.map +1 -1
  54. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js +5 -5
  55. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
  56. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js +2 -2
  57. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js.map +1 -1
  58. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js +3 -3
  59. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js.map +1 -1
  60. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js +5 -3
  61. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js.map +1 -1
  62. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserContext.js +6 -6
  63. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserContext.js.map +1 -1
  64. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts +1 -1
  65. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
  66. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +3 -3
  67. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
  68. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Deserializer.js +2 -2
  69. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Deserializer.js.map +1 -1
  70. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ExposedFunction.js +6 -6
  71. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ExposedFunction.js.map +1 -1
  72. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js +1 -1
  73. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js.map +1 -1
  74. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +1 -0
  75. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
  76. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +3 -0
  77. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
  78. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js +1 -1
  79. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js.map +1 -1
  80. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +1 -0
  81. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  82. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +11 -0
  83. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  84. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.d.ts.map +1 -1
  85. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.js +4 -4
  86. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Accessibility.js.map +1 -1
  87. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js +3 -3
  88. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js.map +1 -1
  89. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
  90. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +13 -2
  91. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
  92. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/BrowserConnector.js +2 -2
  93. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/BrowserConnector.js.map +1 -1
  94. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js +2 -2
  95. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js.map +1 -1
  96. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Coverage.js +2 -2
  97. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Coverage.js.map +1 -1
  98. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ElementHandle.js +1 -1
  99. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ElementHandle.js.map +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.d.ts +1 -0
  101. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
  102. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js +25 -4
  103. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js.map +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExecutionContext.js +3 -3
  105. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExecutionContext.js.map +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Extension.d.ts.map +1 -1
  107. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Extension.js +9 -11
  108. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Extension.js.map +1 -1
  109. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +3 -3
  110. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
  111. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
  112. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +7 -7
  113. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
  114. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js.map +1 -1
  116. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/JSHandle.js +1 -1
  117. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/JSHandle.js.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts +3 -1
  119. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +18 -10
  121. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +1 -0
  123. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
  124. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +17 -11
  125. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
  126. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js +3 -3
  127. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.d.ts.map +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.js +28 -10
  130. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/TargetManager.js.map +1 -1
  131. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js +10 -6
  133. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js.map +1 -1
  134. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.d.ts +3 -0
  135. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.d.ts.map +1 -1
  136. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.js +20 -5
  137. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.js.map +1 -1
  138. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.d.ts.map +1 -1
  139. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +11 -0
  140. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
  141. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js +2 -2
  142. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserWebSocketTransport.js.map +1 -1
  143. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/CallbackRegistry.js +2 -2
  144. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/CallbackRegistry.js.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Configuration.d.ts +4 -2
  146. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Configuration.d.ts.map +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +26 -13
  148. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts +1 -6
  150. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts.map +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js +24 -33
  152. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js.map +1 -1
  153. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js +2 -2
  154. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts +8 -1
  156. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
  157. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +8 -1
  158. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
  159. package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.d.ts +2 -0
  160. package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.d.ts.map +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.js +4 -2
  162. package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.js.map +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts.map +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js.map +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/TextContent.d.ts.map +1 -1
  168. package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/TextContent.js +15 -5
  169. package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/TextContent.js.map +1 -1
  170. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +5 -1
  171. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  172. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +17 -16
  173. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +14 -9
  176. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js.map +1 -1
  177. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/FirefoxLauncher.js +2 -2
  178. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/FirefoxLauncher.js.map +1 -1
  179. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +2 -2
  180. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
  181. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/PipeTransport.js +3 -3
  182. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/PipeTransport.js.map +1 -1
  183. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts +20 -0
  184. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
  185. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js +38 -9
  186. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js.map +1 -1
  187. package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.d.ts +7 -0
  188. package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.d.ts.map +1 -0
  189. package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.js +16 -0
  190. package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.js.map +1 -0
  191. package/front_end/third_party/puppeteer/package/lib/puppeteer/puppeteer-core.d.ts +1 -0
  192. package/front_end/third_party/puppeteer/package/lib/puppeteer/puppeteer-core.d.ts.map +1 -1
  193. package/front_end/third_party/puppeteer/package/lib/puppeteer/puppeteer-core.js +3 -8
  194. package/front_end/third_party/puppeteer/package/lib/puppeteer/puppeteer-core.js.map +1 -1
  195. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
  196. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
  197. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js.map +1 -1
  198. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  199. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  200. package/front_end/third_party/puppeteer/package/lib/types.d.ts +60 -24
  201. package/front_end/third_party/puppeteer/package/package.json +4 -4
  202. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +4 -8
  203. package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +2 -2
  204. package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +10 -10
  205. package/front_end/third_party/puppeteer/package/src/api/JSHandle.ts +3 -10
  206. package/front_end/third_party/puppeteer/package/src/api/Page.ts +14 -8
  207. package/front_end/third_party/puppeteer/package/src/api/WebWorker.ts +30 -0
  208. package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +5 -5
  209. package/front_end/third_party/puppeteer/package/src/bidi/BidiOverCdp.ts +2 -2
  210. package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +3 -3
  211. package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +5 -3
  212. package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +6 -6
  213. package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +4 -4
  214. package/front_end/third_party/puppeteer/package/src/bidi/Deserializer.ts +2 -2
  215. package/front_end/third_party/puppeteer/package/src/bidi/ExposedFunction.ts +6 -6
  216. package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +1 -1
  217. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +4 -0
  218. package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +1 -1
  219. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +11 -0
  220. package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +6 -4
  221. package/front_end/third_party/puppeteer/package/src/cdp/Binding.ts +3 -3
  222. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +14 -2
  223. package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -2
  224. package/front_end/third_party/puppeteer/package/src/cdp/Connection.ts +2 -2
  225. package/front_end/third_party/puppeteer/package/src/cdp/Coverage.ts +2 -2
  226. package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -1
  227. package/front_end/third_party/puppeteer/package/src/cdp/EmulationManager.ts +36 -4
  228. package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +3 -3
  229. package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +16 -17
  230. package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +3 -3
  231. package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +12 -7
  232. package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +1 -1
  233. package/front_end/third_party/puppeteer/package/src/cdp/JSHandle.ts +1 -1
  234. package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +22 -11
  235. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +18 -10
  236. package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +3 -3
  237. package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +37 -12
  238. package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +11 -9
  239. package/front_end/third_party/puppeteer/package/src/cdp/WebWorker.ts +33 -5
  240. package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +11 -0
  241. package/front_end/third_party/puppeteer/package/src/common/BrowserWebSocketTransport.ts +2 -2
  242. package/front_end/third_party/puppeteer/package/src/common/CallbackRegistry.ts +2 -2
  243. package/front_end/third_party/puppeteer/package/src/common/Configuration.ts +4 -2
  244. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -13
  245. package/front_end/third_party/puppeteer/package/src/common/Debug.ts +30 -40
  246. package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +2 -2
  247. package/front_end/third_party/puppeteer/package/src/common/util.ts +9 -1
  248. package/front_end/third_party/puppeteer/package/src/environment.ts +7 -3
  249. package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
  250. package/front_end/third_party/puppeteer/package/src/injected/TextContent.ts +15 -5
  251. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +23 -23
  252. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +19 -13
  253. package/front_end/third_party/puppeteer/package/src/node/FirefoxLauncher.ts +2 -2
  254. package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +2 -2
  255. package/front_end/third_party/puppeteer/package/src/node/PipeTransport.ts +3 -3
  256. package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +44 -9
  257. package/front_end/third_party/puppeteer/package/src/node-env-setup.ts +18 -0
  258. package/front_end/third_party/puppeteer/package/src/puppeteer-core.ts +5 -9
  259. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  260. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  261. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
  262. package/front_end/tsconfig.json +1 -2
  263. package/inspector_overlay/tsconfig.json +3 -10
  264. package/mcp/tsconfig.json +1 -5
  265. package/package.json +1 -2
@@ -1 +1 @@
1
- {"version":3,"file":"NodeWebSocketTransport.js","sourceRoot":"","sources":["../../../src/node/NodeWebSocketTransport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,aAAa,MAAM,IAAI,CAAC;AAG/B,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,MAAM,OAAO,sBAAsB;IACjC,MAAM,CAAC,MAAM,CACX,GAAW,EACX,OAAgC;QAEhC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,EAAE,GAAG,IAAI,aAAa,CAAC,GAAG,EAAE,EAAE,EAAE;gBACpC,eAAe,EAAE,IAAI;gBACrB,iBAAiB,EAAE,KAAK;gBACxB,sBAAsB,EAAE,KAAK;gBAC7B,UAAU,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI,EAAE,QAAQ;gBACvC,OAAO,EAAE;oBACP,YAAY,EAAE,aAAa,cAAc,EAAE;oBAC3C,GAAG,OAAO;iBACX;aACF,CAA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;YACtC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC,CAAC,CAAC;QACH,gEAAgE;QAChE,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACtD,CAAC;IAED,IAAI,CAAC,OAAe;QAClB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '../common/EventEmitter.js';
2
- import { debugError } from '../common/util.js';
2
+ import { debugCatchError } from '../common/util.js';
3
3
  import { assert } from '../util/assert.js';
4
4
  import { DisposableStack } from '../util/disposable.js';
5
5
  /**
@@ -26,12 +26,12 @@ export class PipeTransport {
26
26
  this.onclose.call(null);
27
27
  }
28
28
  });
29
- pipeReadEmitter.on('error', debugError);
29
+ pipeReadEmitter.on('error', debugCatchError);
30
30
  const pipeWriteEmitter = this.#subscriptions.use(
31
31
  // NodeJS event emitters don't support `*` so we need to typecast
32
32
  // As long as we don't use it we should be OK.
33
33
  new EventEmitter(pipeWrite));
34
- pipeWriteEmitter.on('error', debugError);
34
+ pipeWriteEmitter.on('error', debugCatchError);
35
35
  }
36
36
  send(message) {
37
37
  assert(!this.#isClosed, '`PipeTransport` is closed.');
@@ -1 +1 @@
1
- {"version":3,"file":"PipeTransport.js","sourceRoot":"","sources":["../../../src/node/PipeTransport.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAC,eAAe,EAAC,MAAM,uB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AC;YACjC,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC5B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,eAAe,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;IAChC,CAAC;CACF"}
@@ -7,6 +7,26 @@ import { PassThrough } from 'node:stream';
7
7
  import type { BoundingBox } from '../api/ElementHandle.js';
8
8
  import type { Page, VideoFormat } from '../api/Page.js';
9
9
  import { asyncDisposeSymbol } from '../util/disposable.js';
10
+ /**
11
+ * Computes how many encoder frames to emit for a captured frame that spans
12
+ * `[previousTimestamp, timestamp]`, so that the cumulative number of emitted
13
+ * frames tracks a constant-`fps` grid anchored at `startTimestamp`.
14
+ *
15
+ * Counting each interval independently with
16
+ * `Math.round(fps * (timestamp - previousTimestamp))` is wrong when frames are
17
+ * captured faster than `fps`: every sub-`1/fps` interval still rounds up to a
18
+ * whole frame, so the emitted frame count grows with the capture rate instead
19
+ * of staying at `fps * duration`, which stretches playback (and, for very high
20
+ * capture rates, the per-interval value rounds down to 0 and frames are
21
+ * dropped). Differencing the rounded cumulative position keeps the total at
22
+ * `Math.round(fps * (lastTimestamp - startTimestamp))`, independent of the
23
+ * capture rate.
24
+ *
25
+ * Timestamps are in seconds (CDP `Page.screencastFrame` metadata timestamps).
26
+ *
27
+ * @internal
28
+ */
29
+ export declare function countFrames(startTimestamp: number, previousTimestamp: number, timestamp: number, fps: number): number;
10
30
  /**
11
31
  * @internal
12
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ScreenRecorder.d.ts","sourceRoot":"","sources":["../../../src/node/ScreenRecorder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAexC,OAAO,KAAK,EA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AI,OAAO,CAAC,IAAI,CAAC;CAIrD"}
@@ -49,12 +49,36 @@ import { PassThrough } from 'node:stream';
49
49
  import { bufferCount, concatMap, filter, from, fromEvent, lastValueFrom, map, takeUntil, tap, } from '../../third_party/rxjs/rxjs.js';
50
50
  import { CDPSessionEvent } from '../api/CDPSession.js';
51
51
  import { debug } from '../common/Debug.js';
52
- import { debugError, fromEmitterEvent } from '../common/util.js';
52
+ import { fromEmitterEvent, debugCatchError } from '../common/util.js';
53
53
  import { guarded } from '../util/decorators.js';
54
54
  import { asyncDisposeSymbol } from '../util/disposable.js';
55
55
  const CRF_VALUE = 30;
56
56
  const DEFAULT_FPS = 30;
57
57
  const debugFfmpeg = debug('puppeteer:ffmpeg');
58
+ /**
59
+ * Computes how many encoder frames to emit for a captured frame that spans
60
+ * `[previousTimestamp, timestamp]`, so that the cumulative number of emitted
61
+ * frames tracks a constant-`fps` grid anchored at `startTimestamp`.
62
+ *
63
+ * Counting each interval independently with
64
+ * `Math.round(fps * (timestamp - previousTimestamp))` is wrong when frames are
65
+ * captured faster than `fps`: every sub-`1/fps` interval still rounds up to a
66
+ * whole frame, so the emitted frame count grows with the capture rate instead
67
+ * of staying at `fps * duration`, which stretches playback (and, for very high
68
+ * capture rates, the per-interval value rounds down to 0 and frames are
69
+ * dropped). Differencing the rounded cumulative position keeps the total at
70
+ * `Math.round(fps * (lastTimestamp - startTimestamp))`, independent of the
71
+ * capture rate.
72
+ *
73
+ * Timestamps are in seconds (CDP `Page.screencastFrame` metadata timestamps).
74
+ *
75
+ * @internal
76
+ */
77
+ export function countFrames(startTimestamp, previousTimestamp, timestamp, fps) {
78
+ const end = Math.round((timestamp - startTimestamp) * fps);
79
+ const start = Math.round((previousTimestamp - startTimestamp) * fps);
80
+ return Math.max(0, end - start);
81
+ }
58
82
  /**
59
83
  * @public
60
84
  */
@@ -143,15 +167,17 @@ let ScreenRecorder = (() => {
143
167
  'nobuffer',
144
168
  ],
145
169
  // Forces input to be read from standard input, and forces png input
146
- // image format.
147
- ['-f', 'image2pipe', '-vcodec', 'png', '-i', 'pipe:0'],
170
+ // image format. `-framerate` is an input option and must appear before
171
+ // `-i`; otherwise ffmpeg ignores it and the image2pipe demuxer falls
172
+ // back to its default 25fps, stretching the output timeline relative to
173
+ // the frames we feed it at `fps`.
174
+ // prettier-ignore
175
+ ['-framerate', `${fps}`, '-f', 'image2pipe', '-vcodec', 'png', '-i', 'pipe:0'],
148
176
  // No audio
149
177
  ['-an'],
150
178
  // This drastically reduces stalling when cpu is overbooked. By default
151
179
  // VP9 tries to use all available threads?
152
180
  ['-threads', '1'],
153
- // Specifies the frame rate we are giving ffmpeg.
154
- ['-framerate', `${fps}`],
155
181
  // Disable bitrate.
156
182
  ['-b:v', '0'],
157
183
  // Specifies the encoding and format we are using.
@@ -165,13 +191,15 @@ let ScreenRecorder = (() => {
165
191
  ].flat(), { stdio: ['pipe', 'pipe', 'pipe'] });
166
192
  this.#process.stdout.pipe(this);
167
193
  this.#process.stderr.on('data', (data) => {
168
- debugFfmpeg(data.toString('utf8'));
194
+ debugFfmpeg?.(data.toString('utf8'));
169
195
  });
170
196
  this.#page = page;
171
197
  const { client } = this.#page.mainFrame();
172
198
  client.once(CDPSessionEvent.Disconnected, () => {
173
- void this.stop().catch(debugError);
199
+ void this.stop().catch(debugCatchError);
174
200
  });
201
+ // Anchor for the constant-fps grid; set to the first frame's timestamp.
202
+ let startTimestamp;
175
203
  this.#lastFrame = lastValueFrom(fromEmitterEvent(client, 'Page.screencastFrame').pipe(tap(event => {
176
204
  void client.send('Page.screencastFrameAck', {
177
205
  sessionId: event.sessionId,
@@ -184,7 +212,8 @@ let ScreenRecorder = (() => {
184
212
  timestamp: event.metadata.timestamp,
185
213
  };
186
214
  }), bufferCount(2, 1), concatMap(([{ timestamp: previousTimestamp, buffer }, { timestamp }]) => {
187
- return from(Array(Math.round(fps * Math.max(timestamp - previousTimestamp, 0))).fill(buffer));
215
+ startTimestamp ??= previousTimestamp;
216
+ return from(Array(countFrames(startTimestamp, previousTimestamp, timestamp, fps)).fill(buffer));
188
217
  }), map(buffer => {
189
218
  void this.#writeFrame(buffer);
190
219
  return [buffer, performance.now()];
@@ -254,7 +283,7 @@ let ScreenRecorder = (() => {
254
283
  return;
255
284
  }
256
285
  // Stopping the screencast will flush the frames.
257
- await this.#page._stopScreencast().catch(debugError);
286
+ await this.#page._stopScreencast().catch(debugCatchError);
258
287
  this.#controller.abort();
259
288
  // Repeat the last frame for the remaining frames.
260
289
  const [buffer, timestamp] = await this.#lastFrame;
@@ -1 +1 @@
1
- {"version":3,"file":"ScreenRecorder.js","sourceRoot":"","sources":["../../../src/node/ScreenRecorder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,OAAO,EAAC,KAAK,EAAE,SAAS,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAGxC,OAAO,EACL,WAAW,EACX,SAAS,EACT,MAAM,EACN,IAAI,EACJ,SAAS,EACT,aAAa,EACb,GAAG,EACH,SAAS,EACT,GAAG,GACJ,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAEzD,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB,MAAM,WAAW,GAAG,KA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OAAO;YACT,CAAC;YACD,iDAAiD;YACjD,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAE1D,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;YAEzB,kDAAkD;YAClD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC;YAClD,MAAM,OAAO,CAAC,GAAG,CACf,KAAK,CACH,IAAI,CAAC,GAAG,CACN,CAAC,EACD,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,CACjE,CACF;iBACE,IAAI,CAAC,MAAM,CAAC;iBACZ,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CACpC,CAAC;YAEF,4CAA4C;YAC5C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YAC1B,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;gBAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;QACL,CAAC;QAED;;WAEG;QACM,KAAK,CAAC,oCAhDd,OAAO,EAAE,uBAeT,OAAO,EAAE,GAiCM,kBAAkB,EAAC;YACjC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,KAAK,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACpC,CAAC;;;SAtSU,cAAc"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=node-env-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-env-setup.d.ts","sourceRoot":"","sources":["../../src/node-env-setup.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Google Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import fs from 'node:fs';
7
+ import path from 'node:path';
8
+ import { debuglog } from 'node:util';
9
+ import { environment } from './environment.js';
10
+ environment.value = {
11
+ fs,
12
+ path,
13
+ debuglog,
14
+ ScreenRecorder: environment.value.ScreenRecorder,
15
+ };
16
+ //# sourceMappingURL=node-env-setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-env-setup.js","sourceRoot":"","sources":["../../src/node-env-setup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,WAAW,CAAC,KAAK,GAAG;IAClB,EAAE;IACF,IAAI;IACJ,QAAQ;IACR,cAAc,EAAE,WAAW,CAAC,KAAK,CAAC,cAAc;CACjD,CAAC"}
@@ -3,6 +3,7 @@
3
3
  * Copyright 2017 Google Inc.
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ import './node-env-setup.js';
6
7
  export * from './index.js';
7
8
  import * as Puppeteer from './index.js';
8
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"puppeteer-core.d.ts","sourceRoot":"","sources":["../../src/puppeteer-core.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAC;AAO3B,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAQxC;;GAEG;AACH,QAAA,MAAM,SAAS,yBAEb,CAAC;AAEH,eAAO;AACL;;GAEG;AACH,OAAO;AACP;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,cAAc;;;;;AACd;;GAEG;AACH,MAAM,mEACK,CAAC;AAEd,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"puppeteer-core.d.ts","sourceRoot":"","sources":["../../src/puppeteer-core.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,qBAAqB,CAAC;AAE7B,cAAc,YAAY,CAAC;AAI3B,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAIxC;;GAEG;AACH,QAAA,MAAM,SAAS,yBAEb,CAAC;AAEH,eAAO;AACL;;GAEG;AACH,OAAO;AACP;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,cAAc;;;;;AACd;;GAEG;AACH,MAAM,mEACK,CAAC;AAEd,eAAe,SAAS,CAAC"}
@@ -3,17 +3,12 @@
3
3
  * Copyright 2017 Google Inc.
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ // Set up Node-specific environment dependencies before importing other modules.
7
+ import './node-env-setup.js';
6
8
  export * from './index.js';
7
- import fs from 'node:fs';
8
- import path from 'node:path';
9
9
  import { environment } from './environment.js';
10
10
  import * as Puppeteer from './index.js';
11
- // Set up Node-specific environment dependencies.
12
- environment.value = {
13
- fs,
14
- path,
15
- ScreenRecorder: Puppeteer.ScreenRecorder,
16
- };
11
+ environment.value.ScreenRecorder = Puppeteer.ScreenRecorder;
17
12
  /**
18
13
  * @public
19
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"puppeteer-core.js","sourceRoot":"","sources":["../../src/puppeteer-core.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,YAAY,CAAC;AAE3B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAExC,iDAAiD;AACjD,WAAW,CAAC,KAAK,GAAG;IAClB,EAAE;IACF,IAAI;IACJ,cAAc,EAAE,SAAS,CAAC,cAAc;CACzC,CAAC;AACF;;GAEG;AACH,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,aAAa,CAAC;IAC5C,eAAe,EAAE,IAAI;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM;AACX;;GAEG;AACH,OAAO;AACP;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,cAAc;AACd;;GAEG;AACH,MAAM,GACP,GAAG,SAAS,CAAC;AAEd,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"puppeteer-core.js","sourceRoot":"","sources":["../../src/puppeteer-core.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gFAAgF;AAChF,OAAO,qBAAqB,CAAC;AAE7B,cAAc,YAAY,CAAC;AAE3B,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAExC,WAAW,CAAC,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC,cAAc,CAAC;AAE5D;;GAEG;AACH,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,aAAa,CAAC;IAC5C,eAAe,EAAE,IAAI;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM;AACX;;GAEG;AACH,OAAO;AACP;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,cAAc;AACd;;GAEG;AACH,MAAM,GACP,GAAG,SAAS,CAAC;AAEd,eAAe,SAAS,CAAC"}
@@ -7,8 +7,8 @@
7
7
  * @internal
8
8
  */
9
9
  export declare const PUPPETEER_REVISIONS: Readonly<{
10
- chrome: "149.0.7827.22";
11
- 'chrome-headless-shell': "149.0.7827.22";
12
- firefox: "stable_151.0";
10
+ chrome: "150.0.7871.24";
11
+ 'chrome-headless-shell': "150.0.7871.24";
12
+ firefox: "stable_152.0.2";
13
13
  }>;
14
14
  //# sourceMappingURL=revisions.d.ts.map
@@ -7,8 +7,8 @@
7
7
  * @internal
8
8
  */
9
9
  export const PUPPETEER_REVISIONS = Object.freeze({
10
- chrome: '149.0.7827.22',
11
- 'chrome-headless-shell': '149.0.7827.22',
12
- firefox: 'stable_151.0',
10
+ chrome: '150.0.7871.24',
11
+ 'chrome-headless-shell': '150.0.7871.24',
12
+ firefox: 'stable_152.0.2',
13
13
  });
14
14
  //# sourceMappingURL=revisions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"revisions.js","sourceRoot":"","sources":["../../src/revisions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,eAAe;IACvB,uBAAuB,EAAE,eAAe;IACxC,OAAO,EAAE,cAAc;CACxB,CAAC,CAAC"}
1
+ {"version":3,"file":"revisions.js","sourceRoot":"","sources":["../../src/revisions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,eAAe;IACvB,uBAAuB,EAAE,eAAe;IACxC,OAAO,EAAE,gBAAgB;CAC1B,CAAC,CAAC"}
@@ -3,5 +3,5 @@
3
3
  * Copyright 2025 Google Inc.
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- export declare const packageVersion = "25.1.0";
6
+ export declare const packageVersion = "25.2.1";
7
7
  //# sourceMappingURL=version.d.ts.map
@@ -5,6 +5,6 @@
5
5
  */
6
6
  // If moved update release-please config
7
7
  // x-release-please-start-version
8
- export const packageVersion = '25.1.0';
8
+ export const packageVersion = '25.2.1';
9
9
  // x-release-please-end
10
10
  //# sourceMappingURL=version.js.map
@@ -557,15 +557,11 @@ export declare abstract class Browser extends EventEmitter<BrowserEvents> {
557
557
  }>
558
558
  ): Promise<void>;
559
559
  /**
560
- * Installs an extension and returns the ID. In Chrome, this is only
561
- * available if the browser was created using `pipe: true` and the
562
- * `--enable-unsafe-extension-debugging` flag is set.
560
+ * Installs an extension and returns the ID.
563
561
  */
564
562
  abstract installExtension(path: string): Promise<string>;
565
563
  /**
566
- * Uninstalls an extension. In Chrome, this is only available if the browser
567
- * was created using `pipe: true` and the
568
- * `--enable-unsafe-extension-debugging` flag is set.
564
+ * Uninstalls an extension.
569
565
  */
570
566
  abstract uninstallExtension(id: string): Promise<void>;
571
567
  /**
@@ -1179,9 +1175,11 @@ export declare interface Configuration {
1179
1175
  */
1180
1176
  temporaryDirectory?: string;
1181
1177
  /**
1182
- * Tells Puppeteer to not download during installation.
1178
+ * Tells Puppeteer to not download any of the browsers during installation.
1183
1179
  *
1184
- * Can be overridden by `PUPPETEER_SKIP_DOWNLOAD`.
1180
+ * Can be overridden by `PUPPETEER_SKIP_DOWNLOAD` or by specifying either
1181
+ * `skipDownload` property in each browser specific config or by providing
1182
+ * `PUPPETEER_FIREFOX_SKIP_DOWNLOAD` and `PUPPETEER_CHROME_SKIP_DOWNLOAD`.
1185
1183
  */
1186
1184
  skipDownload?: boolean;
1187
1185
  /**
@@ -1369,26 +1367,32 @@ export declare interface ConnectOptions {
1369
1367
  /**
1370
1368
  * A list of URL patterns to block.
1371
1369
  *
1372
- * This option allows you to restrict the browser from accessing specific
1373
- * URLs or origins. It uses the standard [URLPattern](https://urlpattern.spec.whatwg.org/) API to match URLs.
1370
+ * This option allows you to restrict the browser from accessing specific URLs
1371
+ * or origins. It uses the standard
1372
+ * [URLPattern](https://urlpattern.spec.whatwg.org/) API to match URLs.
1374
1373
  *
1375
- * When connecting to an existing browser, Puppeteer will silently detach from any
1376
- * already open targets that violate the patterns.
1374
+ * When connecting to an existing browser, Puppeteer will silently detach from
1375
+ * any already open targets that violate the patterns.
1377
1376
  *
1378
1377
  * For any network requests made by the browser (including navigations and
1379
1378
  * subresources like images or scripts), the request will fail with an error
1380
1379
  * if the URL matches a blocked pattern.
1381
1380
  *
1382
- * @example Pattern to block a specific domain:
1383
- * `*://example.com/*`
1381
+ * @example Pattern to block a specific domain: `*://example.com/*`
1384
1382
  *
1385
- * @example Pattern to block all subdomains:
1386
- * `*://*.evil.com/*`
1383
+ * @example Pattern to block all subdomains: `*://*.evil.com/*`
1387
1384
  *
1388
1385
  * @remarks
1389
- * Currently only supported for CDP connections.
1386
+ * Currently only supported for Chrome.
1390
1387
  *
1391
- * Inner `<iframe>` content loading is currently not blocked.
1388
+ * The feature works while Puppeteer is attached to the CDP targets.
1389
+ * It intercepts requests in the network service in Chrome.
1390
+ * Chrome may perform some network access in other ways or
1391
+ * some web features may omit the network service.
1392
+ * The feature is meant as an additional guardrails to LLM-based
1393
+ * usage under Puppeteer control and not a complete network sandbox.
1394
+ * For complete network sandboxing, we recommend using
1395
+ * container/OS-level sandbox mechanism.
1392
1396
  *
1393
1397
  * Cannot be used along with {@link ConnectOptions.allowlist}.
1394
1398
  *
@@ -1418,9 +1422,16 @@ export declare interface ConnectOptions {
1418
1422
  * `*://*.example.com/*`
1419
1423
  *
1420
1424
  * @remarks
1421
- * Currently only supported for CDP connections.
1425
+ * Currently only supported for Chrome.
1422
1426
  *
1423
- * Inner `<iframe>` content loading is currently not blocked.
1427
+ * The feature works while Puppeteer is attached to the CDP targets.
1428
+ * It intercepts requests in the network service in Chrome.
1429
+ * Chrome may perform some network access in other ways or
1430
+ * some web features may omit the network service.
1431
+ * The feature is meant as an additional guardrails to LLM-based
1432
+ * usage under Puppeteer control and not a complete network sandbox.
1433
+ * For complete network sandboxing, we recommend using
1434
+ * container/OS-level sandbox mechanism.
1424
1435
  *
1425
1436
  * Cannot be used along with {@link ConnectOptions.blocklist}.
1426
1437
  *
@@ -5753,7 +5764,8 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
5753
5764
  /**
5754
5765
  * A target this page was created from.
5755
5766
  *
5756
- * @deprecated Use {@link Page.createCDPSession} directly.
5767
+ * @deprecated To create CDP session use {@link Page.createCDPSession} directly. To
5768
+ * identify pages spawned by this one, use {@link PageEvent.Popup} event instead.
5757
5769
  */
5758
5770
  abstract target(): Target;
5759
5771
  /**
@@ -5789,9 +5801,8 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
5789
5801
  */
5790
5802
  abstract get tracing(): Tracing;
5791
5803
  /**
5792
- * Experimental API for {@link https://github.com/webmachinelearning/webmcp
5793
- * | WebMCP}. Requires Chrome 149+ with the
5794
- * `--enable-features=WebMCPTesting,DevToolsWebMCPSupport` flags enabled.
5804
+ * Experimental API for {@link https://github.com/webmachinelearning/webmcp| WebMCP}.
5805
+ * Requires Chrome 150+ with the `--enable-features=WebMCP` flag enabled.
5795
5806
  *
5796
5807
  * @experimental
5797
5808
  */
@@ -6829,6 +6840,11 @@ export declare abstract class Page extends EventEmitter<PageEvents> {
6829
6840
  * ```
6830
6841
  */
6831
6842
  abstract emulateMediaFeatures(features?: MediaFeature[]): Promise<void>;
6843
+ /**
6844
+ * @param locale - Locale to emulate on the page. Passing no locale disables
6845
+ * locale emulation.
6846
+ */
6847
+ abstract emulateLocale(locale?: string): Promise<void>;
6832
6848
  /**
6833
6849
  * @param timezoneId - Changes the timezone of the page. See
6834
6850
  * {@link https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt | ICU’s metaZones.txt}
@@ -9762,6 +9778,26 @@ export declare abstract class WebWorker extends EventEmitter<WebWorkerEvents> {
9762
9778
  func: Func | string,
9763
9779
  ...args: Params
9764
9780
  ): Promise<HandleFor<Awaited<ReturnType<Func>>>>;
9781
+ /**
9782
+ * Waits for the provided function, `workerFunction`, to return a truthy value when
9783
+ * evaluated in the page's context.
9784
+ *
9785
+ * @param workerFunction - Function to be evaluated in browser context until it
9786
+ * returns a truthy value.
9787
+ * @param options - Options for configuring waiting behavior.
9788
+ */
9789
+ waitForFunction<
9790
+ Params extends unknown[],
9791
+ Func extends EvaluateFunc<Params> = EvaluateFunc<Params>,
9792
+ >(
9793
+ workerFunction: Func | string,
9794
+ options?: {
9795
+ polling?: number;
9796
+ timeout?: number;
9797
+ signal?: AbortSignal;
9798
+ },
9799
+ ...args: Params
9800
+ ): Promise<HandleFor<Awaited<ReturnType<Func>>>>;
9765
9801
  close(): Promise<void>;
9766
9802
  }
9767
9803
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puppeteer-core",
3
- "version": "25.1.0",
3
+ "version": "25.2.1",
4
4
  "description": "A high-level API to control headless Chrome over the DevTools Protocol",
5
5
  "keywords": [
6
6
  "puppeteer",
@@ -148,15 +148,15 @@
148
148
  "author": "The Chromium Authors",
149
149
  "license": "Apache-2.0",
150
150
  "dependencies": {
151
- "@puppeteer/browsers": "3.0.4",
151
+ "@puppeteer/browsers": "3.0.5",
152
152
  "chromium-bidi": "16.0.1",
153
- "devtools-protocol": "0.0.1624250",
153
+ "devtools-protocol": "0.0.1638949",
154
154
  "typed-query-selector": "^2.12.2",
155
155
  "webdriver-bidi-protocol": "0.4.2",
156
156
  "ws": "^8.21.0"
157
157
  },
158
158
  "devDependencies": {
159
- "@types/chrome": "0.1.40",
159
+ "@types/chrome": "0.1.43",
160
160
  "@types/node": "^18.17.15",
161
161
  "@types/ws": "8.18.1",
162
162
  "mitt": "3.0.1",
@@ -23,11 +23,11 @@ import type {
23
23
  import type {DownloadBehavior} from '../common/DownloadBehavior.js';
24
24
  import {EventEmitter, type EventType} from '../common/EventEmitter.js';
25
25
  import {
26
- debugError,
27
26
  fromEmitterEvent,
28
27
  filterAsync,
29
28
  timeout,
30
29
  fromAbortSignal,
30
+ debugCatchError,
31
31
  } from '../common/util.js';
32
32
  import {asyncDisposeSymbol, disposeSymbol} from '../util/disposable.js';
33
33
 
@@ -641,16 +641,12 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
641
641
  }
642
642
 
643
643
  /**
644
- * Installs an extension and returns the ID. In Chrome, this is only
645
- * available if the browser was created using `pipe: true` and the
646
- * `--enable-unsafe-extension-debugging` flag is set.
644
+ * Installs an extension and returns the ID.
647
645
  */
648
646
  abstract installExtension(path: string): Promise<string>;
649
647
 
650
648
  /**
651
- * Uninstalls an extension. In Chrome, this is only available if the browser
652
- * was created using `pipe: true` and the
653
- * `--enable-unsafe-extension-debugging` flag is set.
649
+ * Uninstalls an extension.
654
650
  */
655
651
  abstract uninstallExtension(id: string): Promise<void>;
656
652
 
@@ -684,7 +680,7 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
684
680
 
685
681
  /** @internal */
686
682
  override [disposeSymbol](): void {
687
- return void this[asyncDisposeSymbol]().catch(debugError);
683
+ return void this[asyncDisposeSymbol]().catch(debugCatchError);
688
684
  }
689
685
 
690
686
  /** @internal */
@@ -17,10 +17,10 @@ import type {
17
17
  } from '../common/Cookie.js';
18
18
  import {EventEmitter, type EventType} from '../common/EventEmitter.js';
19
19
  import {
20
- debugError,
21
20
  fromEmitterEvent,
22
21
  filterAsync,
23
22
  timeout,
23
+ debugCatchError,
24
24
  } from '../common/util.js';
25
25
  import {asyncDisposeSymbol, disposeSymbol} from '../util/disposable.js';
26
26
  import {Mutex} from '../util/Mutex.js';
@@ -374,7 +374,7 @@ export abstract class BrowserContext extends EventEmitter<BrowserContextEvents>
374
374
 
375
375
  /** @internal */
376
376
  override [disposeSymbol](): void {
377
- return void this[asyncDisposeSymbol]().catch(debugError);
377
+ return void this[asyncDisposeSymbol]().catch(debugCatchError);
378
378
  }
379
379
 
380
380
  /** @internal */
@@ -622,17 +622,17 @@ export function headersArray(
622
622
  headers: Record<string, string | string[]>,
623
623
  ): Array<{name: string; value: string}> {
624
624
  const result = [];
625
- for (const name in headers) {
625
+ for (const name of Object.keys(headers)) {
626
626
  const value = headers[name];
627
627
 
628
- if (!Object.is(value, undefined)) {
629
- const values = Array.isArray(value) ? value : [value];
630
-
631
- result.push(
632
- ...values.map(value => {
633
- return {name, value: value + ''};
634
- }),
635
- );
628
+ if (value !== undefined) {
629
+ if (Array.isArray(value)) {
630
+ for (const v of value) {
631
+ result.push({name, value: v + ''});
632
+ }
633
+ } else {
634
+ result.push({name, value: value + ''});
635
+ }
636
636
  }
637
637
  }
638
638
  return result;
@@ -746,5 +746,5 @@ export function handleError(error: ProtocolError): void {
746
746
  // In certain cases, protocol will return error if the request was
747
747
  // already canceled or the page was closed. We should tolerate these
748
748
  // errors.
749
- debugError(error);
749
+ debugError?.(error);
750
750
  }