rechrome 1.35.1 → 1.36.1

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 (402) hide show
  1. package/README.md +79 -0
  2. package/extension/lib/background.mjs +28 -1
  3. package/extension/lib/ui/connect.js +29 -19
  4. package/listeners.js +17 -1
  5. package/listeners.ts +7 -2
  6. package/package.json +5 -3
  7. package/rechrome.js +101 -17
  8. package/rechrome.ts +101 -17
  9. package/scoped-upload.js +165 -0
  10. package/scoped-upload.ts +140 -0
  11. package/serve.js +140 -25
  12. package/serve.ts +140 -25
  13. package/vendor/playwright-cli/node_modules/playwright-core/lib/coreBundle.js +360 -256
  14. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-client/help.json +9 -4
  15. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-client/program.js +6 -1
  16. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-client/session.js +10 -12
  17. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/extension.js +8 -5
  18. package/vendor/playwright-cli/node_modules/playwright-core/lib/androidServerImpl.js +0 -65
  19. package/vendor/playwright-cli/node_modules/playwright-core/lib/browserServerImpl.js +0 -120
  20. package/vendor/playwright-cli/node_modules/playwright-core/lib/cli/driver.js +0 -98
  21. package/vendor/playwright-cli/node_modules/playwright-core/lib/cli/program.js +0 -597
  22. package/vendor/playwright-cli/node_modules/playwright-core/lib/cli/programWithTestStub.js +0 -74
  23. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/android.js +0 -361
  24. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/api.js +0 -137
  25. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/artifact.js +0 -79
  26. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/browser.js +0 -169
  27. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/browserContext.js +0 -583
  28. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/browserType.js +0 -153
  29. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/cdpSession.js +0 -55
  30. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/channelOwner.js +0 -194
  31. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clientHelper.js +0 -64
  32. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clientInstrumentation.js +0 -55
  33. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clientStackTrace.js +0 -69
  34. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/clock.js +0 -68
  35. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/connect.js +0 -143
  36. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/connection.js +0 -322
  37. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/consoleMessage.js +0 -61
  38. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/coverage.js +0 -44
  39. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/debugger.js +0 -57
  40. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/dialog.js +0 -56
  41. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/disposable.js +0 -76
  42. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/download.js +0 -62
  43. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/electron.js +0 -138
  44. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/elementHandle.js +0 -281
  45. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/errors.js +0 -77
  46. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/eventEmitter.js +0 -314
  47. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/events.js +0 -103
  48. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/fetch.js +0 -367
  49. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/fileChooser.js +0 -46
  50. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/fileUtils.js +0 -34
  51. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/frame.js +0 -404
  52. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/harRouter.js +0 -99
  53. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/input.js +0 -84
  54. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/jsHandle.js +0 -105
  55. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/jsonPipe.js +0 -39
  56. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/localUtils.js +0 -60
  57. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/locator.js +0 -367
  58. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/network.js +0 -750
  59. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/page.js +0 -729
  60. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/platform.js +0 -77
  61. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/playwright.js +0 -71
  62. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/screencast.js +0 -48
  63. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/selectors.js +0 -57
  64. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/stream.js +0 -39
  65. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/timeoutSettings.js +0 -79
  66. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/tracing.js +0 -126
  67. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/types.js +0 -28
  68. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/video.js +0 -68
  69. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/waiter.js +0 -142
  70. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/webError.js +0 -39
  71. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/worker.js +0 -85
  72. package/vendor/playwright-cli/node_modules/playwright-core/lib/client/writableStream.js +0 -39
  73. package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +0 -28
  74. package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/clockSource.js +0 -28
  75. package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/injectedScriptSource.js +0 -28
  76. package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +0 -28
  77. package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/storageScriptSource.js +0 -28
  78. package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/utilityScriptSource.js +0 -28
  79. package/vendor/playwright-cli/node_modules/playwright-core/lib/generated/webSocketMockSource.js +0 -336
  80. package/vendor/playwright-cli/node_modules/playwright-core/lib/inProcessFactory.js +0 -60
  81. package/vendor/playwright-cli/node_modules/playwright-core/lib/inprocess.js +0 -3
  82. package/vendor/playwright-cli/node_modules/playwright-core/lib/mcpBundle.js +0 -81
  83. package/vendor/playwright-cli/node_modules/playwright-core/lib/mcpBundleImpl/index.js +0 -91
  84. package/vendor/playwright-cli/node_modules/playwright-core/lib/outofprocess.js +0 -76
  85. package/vendor/playwright-cli/node_modules/playwright-core/lib/protocol/serializers.js +0 -197
  86. package/vendor/playwright-cli/node_modules/playwright-core/lib/protocol/validator.js +0 -3034
  87. package/vendor/playwright-cli/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +0 -193
  88. package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightConnection.js +0 -131
  89. package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightPipeServer.js +0 -100
  90. package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightServer.js +0 -339
  91. package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/playwrightWebSocketServer.js +0 -73
  92. package/vendor/playwright-cli/node_modules/playwright-core/lib/remote/serverTransport.js +0 -96
  93. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/android/android.js +0 -465
  94. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/android/backendAdb.js +0 -177
  95. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/artifact.js +0 -127
  96. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +0 -571
  97. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +0 -162
  98. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +0 -213
  99. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiDeserializer.js +0 -116
  100. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +0 -267
  101. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +0 -128
  102. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiInput.js +0 -146
  103. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +0 -411
  104. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +0 -102
  105. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiPage.js +0 -599
  106. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +0 -106
  107. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +0 -22
  108. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +0 -256
  109. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +0 -24
  110. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +0 -180
  111. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +0 -42
  112. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +0 -148
  113. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +0 -261
  114. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/browser.js +0 -223
  115. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/browserContext.js +0 -703
  116. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/browserType.js +0 -338
  117. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/callLog.js +0 -82
  118. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/chromium.js +0 -399
  119. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +0 -104
  120. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crBrowser.js +0 -532
  121. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crConnection.js +0 -197
  122. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crCoverage.js +0 -235
  123. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crDevTools.js +0 -111
  124. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +0 -131
  125. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +0 -146
  126. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crInput.js +0 -187
  127. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +0 -708
  128. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crPage.js +0 -1004
  129. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crPdf.js +0 -121
  130. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +0 -145
  131. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +0 -137
  132. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +0 -162
  133. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/chromium/protocol.d.js +0 -16
  134. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/clock.js +0 -149
  135. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/csharp.js +0 -327
  136. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/java.js +0 -274
  137. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/javascript.js +0 -247
  138. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/jsonl.js +0 -52
  139. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/language.js +0 -132
  140. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/languages.js +0 -68
  141. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/python.js +0 -279
  142. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/codegen/types.js +0 -16
  143. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/console.js +0 -61
  144. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/cookieStore.js +0 -206
  145. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/debugController.js +0 -197
  146. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/debugger.js +0 -120
  147. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/deviceDescriptors.js +0 -39
  148. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dialog.js +0 -116
  149. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +0 -325
  150. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +0 -118
  151. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +0 -381
  152. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +0 -124
  153. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +0 -71
  154. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +0 -47
  155. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +0 -78
  156. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/debuggerDispatcher.js +0 -80
  157. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +0 -47
  158. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +0 -364
  159. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/disposableDispatcher.js +0 -39
  160. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +0 -90
  161. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +0 -181
  162. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +0 -227
  163. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +0 -85
  164. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +0 -58
  165. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +0 -185
  166. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +0 -214
  167. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +0 -434
  168. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +0 -108
  169. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +0 -67
  170. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +0 -68
  171. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -164
  172. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +0 -79
  173. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/disposable.js +0 -41
  174. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/dom.js +0 -823
  175. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/download.js +0 -71
  176. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/electron/electron.js +0 -272
  177. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/electron/loader.js +0 -115
  178. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/errors.js +0 -69
  179. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/fetch.js +0 -621
  180. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/fileChooser.js +0 -43
  181. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/fileUploadUtils.js +0 -84
  182. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +0 -415
  183. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffConnection.js +0 -142
  184. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +0 -150
  185. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffInput.js +0 -175
  186. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +0 -256
  187. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/ffPage.js +0 -495
  188. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/firefox.js +0 -114
  189. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/firefox/protocol.d.js +0 -16
  190. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/formData.js +0 -147
  191. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/frameSelectors.js +0 -160
  192. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/frames.js +0 -1495
  193. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/har/harRecorder.js +0 -147
  194. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/har/harTracer.js +0 -608
  195. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/harBackend.js +0 -157
  196. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/helper.js +0 -96
  197. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/index.js +0 -58
  198. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/input.js +0 -277
  199. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/instrumentation.js +0 -72
  200. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/javascript.js +0 -291
  201. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/launchApp.js +0 -127
  202. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/localUtils.js +0 -214
  203. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/macEditingCommands.js +0 -143
  204. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/network.js +0 -668
  205. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/page.js +0 -884
  206. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/pipeTransport.js +0 -89
  207. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/playwright.js +0 -69
  208. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/progress.js +0 -136
  209. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/protocolError.js +0 -52
  210. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/chat.js +0 -161
  211. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderApp.js +0 -367
  212. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +0 -138
  213. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +0 -83
  214. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +0 -157
  215. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder/throttledFile.js +0 -57
  216. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/recorder.js +0 -540
  217. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/browserFetcher.js +0 -177
  218. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/dependencies.js +0 -371
  219. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/index.js +0 -1395
  220. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/nativeDeps.js +0 -1281
  221. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +0 -127
  222. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/screencast.js +0 -216
  223. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/screenshotter.js +0 -333
  224. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/selectors.js +0 -112
  225. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +0 -383
  226. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/socksInterceptor.js +0 -95
  227. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +0 -147
  228. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +0 -561
  229. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +0 -607
  230. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +0 -244
  231. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/transport.js +0 -181
  232. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/types.js +0 -28
  233. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/usKeyboardLayout.js +0 -152
  234. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/ascii.js +0 -44
  235. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/comparators.js +0 -139
  236. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/crypto.js +0 -216
  237. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/debug.js +0 -42
  238. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/debugLogger.js +0 -122
  239. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/disposable.js +0 -32
  240. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/env.js +0 -73
  241. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/eventsHelper.js +0 -41
  242. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/expectUtils.js +0 -123
  243. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/fileUtils.js +0 -191
  244. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +0 -207
  245. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/hostPlatform.js +0 -123
  246. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/httpServer.js +0 -205
  247. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +0 -89
  248. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +0 -109
  249. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +0 -78
  250. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +0 -102
  251. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/linuxUtils.js +0 -71
  252. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/network.js +0 -244
  253. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/nodePlatform.js +0 -154
  254. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/pipeTransport.js +0 -84
  255. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/processLauncher.js +0 -243
  256. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/profiler.js +0 -65
  257. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/socksProxy.js +0 -511
  258. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/spawnAsync.js +0 -41
  259. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/task.js +0 -51
  260. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/userAgent.js +0 -98
  261. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/wsServer.js +0 -121
  262. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/zipFile.js +0 -74
  263. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/utils/zones.js +0 -57
  264. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/videoRecorder.js +0 -133
  265. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/protocol.d.js +0 -16
  266. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/webkit.js +0 -108
  267. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +0 -331
  268. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkConnection.js +0 -144
  269. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +0 -154
  270. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkInput.js +0 -181
  271. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +0 -197
  272. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkPage.js +0 -1164
  273. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +0 -83
  274. package/vendor/playwright-cli/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +0 -106
  275. package/vendor/playwright-cli/node_modules/playwright-core/lib/third_party/pixelmatch.js +0 -255
  276. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/browserBackend.js +0 -79
  277. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/common.js +0 -63
  278. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/config.js +0 -41
  279. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/console.js +0 -66
  280. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/context.js +0 -290
  281. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/cookies.js +0 -152
  282. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/devtools.js +0 -69
  283. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/dialogs.js +0 -59
  284. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/evaluate.js +0 -64
  285. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/files.js +0 -60
  286. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/form.js +0 -64
  287. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/keyboard.js +0 -155
  288. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/logFile.js +0 -95
  289. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/mouse.js +0 -168
  290. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/navigate.js +0 -106
  291. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/network.js +0 -135
  292. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/pdf.js +0 -48
  293. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/response.js +0 -302
  294. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/route.js +0 -140
  295. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/runCode.js +0 -76
  296. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/screenshot.js +0 -88
  297. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/sessionLog.js +0 -74
  298. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/snapshot.js +0 -208
  299. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/storage.js +0 -67
  300. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tab.js +0 -445
  301. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tabs.js +0 -67
  302. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tool.js +0 -47
  303. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tools.js +0 -102
  304. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/tracing.js +0 -75
  305. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/utils.js +0 -83
  306. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/verify.js +0 -151
  307. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/video.js +0 -89
  308. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/wait.js +0 -63
  309. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/backend/webstorage.js +0 -223
  310. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/command.js +0 -73
  311. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/commands.js +0 -933
  312. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/daemon.js +0 -178
  313. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/helpGenerator.js +0 -173
  314. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/cli-daemon/program.js +0 -118
  315. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/dashboard/dashboardApp.js +0 -286
  316. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/dashboard/dashboardController.js +0 -296
  317. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/exports.js +0 -60
  318. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/browserFactory.js +0 -233
  319. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/cdpRelay.js +0 -356
  320. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/cli-stub.js +0 -7
  321. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/config.d.js +0 -16
  322. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/config.js +0 -401
  323. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/configIni.js +0 -189
  324. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/extensionContextFactory.js +0 -59
  325. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/index.js +0 -62
  326. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/log.js +0 -35
  327. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/program.js +0 -107
  328. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/protocol.js +0 -28
  329. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/mcp/watchdog.js +0 -44
  330. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/installSkill.js +0 -48
  331. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceActions.js +0 -142
  332. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceAttachments.js +0 -69
  333. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceCli.js +0 -80
  334. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceConsole.js +0 -97
  335. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceErrors.js +0 -55
  336. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceOpen.js +0 -69
  337. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceParser.js +0 -96
  338. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceRequests.js +0 -158
  339. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceScreenshot.js +0 -68
  340. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceSnapshot.js +0 -149
  341. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/trace/traceUtils.js +0 -135
  342. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/connect.js +0 -32
  343. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/mcp/http.js +0 -152
  344. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/mcp/server.js +0 -230
  345. package/vendor/playwright-cli/node_modules/playwright-core/lib/tools/utils/mcp/tool.js +0 -47
  346. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +0 -455
  347. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/assert.js +0 -31
  348. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/colors.js +0 -72
  349. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +0 -245
  350. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +0 -1051
  351. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/formatUtils.js +0 -64
  352. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/headers.js +0 -53
  353. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/imageUtils.js +0 -141
  354. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +0 -689
  355. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +0 -176
  356. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +0 -81
  357. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/lruCache.js +0 -51
  358. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +0 -114
  359. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +0 -464
  360. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +0 -80
  361. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +0 -81
  362. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +0 -342
  363. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +0 -43
  364. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +0 -386
  365. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +0 -54
  366. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +0 -158
  367. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +0 -204
  368. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/time.js +0 -49
  369. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +0 -66
  370. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/entries.js +0 -16
  371. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotRenderer.js +0 -502
  372. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotServer.js +0 -120
  373. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotStorage.js +0 -89
  374. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceLoader.js +0 -131
  375. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js +0 -366
  376. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModernizer.js +0 -401
  377. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/traceUtils.js +0 -58
  378. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV3.js +0 -16
  379. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV4.js +0 -16
  380. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV5.js +0 -16
  381. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV6.js +0 -16
  382. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV7.js +0 -16
  383. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV8.js +0 -16
  384. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/types.js +0 -16
  385. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +0 -243
  386. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +0 -262
  387. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils/isomorphic/yaml.js +0 -84
  388. package/vendor/playwright-cli/node_modules/playwright-core/lib/utils.js +0 -113
  389. package/vendor/playwright-cli/node_modules/playwright-core/lib/utilsBundleImpl/index.js +0 -218
  390. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BtGnd8kr.js +0 -32
  391. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-CnvO0fko.js +0 -32
  392. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-BkMbME_o.js +0 -262
  393. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CN3cwLGD.js +0 -262
  394. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.B4dS75f0.css +0 -1
  395. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.DcQiWcKS.css +0 -1
  396. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/index.B2ffe31o.js +0 -2
  397. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/index.Df3uWWXm.js +0 -2
  398. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/uiMode.BZQ54Kgt.css +0 -1
  399. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CmAqMvmy.js +0 -6
  400. package/vendor/playwright-cli/node_modules/playwright-core/lib/vite/traceViewer/uiMode.u9Eas4CP.js +0 -6
  401. package/vendor/playwright-cli/node_modules/playwright-core/lib/zipBundle.js +0 -34
  402. package/vendor/playwright-cli/node_modules/playwright-core/lib/zipBundleImpl.js +0 -5
@@ -858,54 +858,54 @@ var init_imageUtils = __esm({
858
858
  });
859
859
 
860
860
  // packages/isomorphic/jsonSchema.ts
861
- function validate(value2, schema, path59) {
861
+ function validate(value2, schema, path60) {
862
862
  const errors = [];
863
863
  if (schema.oneOf) {
864
864
  let bestErrors;
865
865
  for (const variant of schema.oneOf) {
866
- const variantErrors = validate(value2, variant, path59);
866
+ const variantErrors = validate(value2, variant, path60);
867
867
  if (variantErrors.length === 0)
868
868
  return [];
869
869
  if (!bestErrors || variantErrors.length < bestErrors.length)
870
870
  bestErrors = variantErrors;
871
871
  }
872
- if (bestErrors.length === 1 && bestErrors[0].startsWith(`${path59}: expected `))
873
- return [`${path59}: does not match any of the expected types`];
872
+ if (bestErrors.length === 1 && bestErrors[0].startsWith(`${path60}: expected `))
873
+ return [`${path60}: does not match any of the expected types`];
874
874
  return bestErrors;
875
875
  }
876
876
  if (schema.type === "string") {
877
877
  if (typeof value2 !== "string") {
878
- errors.push(`${path59}: expected string, got ${typeof value2}`);
878
+ errors.push(`${path60}: expected string, got ${typeof value2}`);
879
879
  return errors;
880
880
  }
881
881
  if (schema.pattern && !cachedRegex(schema.pattern).test(value2))
882
- errors.push(schema.patternError || `${path59}: must match pattern "${schema.pattern}"`);
882
+ errors.push(schema.patternError || `${path60}: must match pattern "${schema.pattern}"`);
883
883
  return errors;
884
884
  }
885
885
  if (schema.type === "array") {
886
886
  if (!Array.isArray(value2)) {
887
- errors.push(`${path59}: expected array, got ${typeof value2}`);
887
+ errors.push(`${path60}: expected array, got ${typeof value2}`);
888
888
  return errors;
889
889
  }
890
890
  if (schema.items) {
891
891
  for (let i = 0; i < value2.length; i++)
892
- errors.push(...validate(value2[i], schema.items, `${path59}[${i}]`));
892
+ errors.push(...validate(value2[i], schema.items, `${path60}[${i}]`));
893
893
  }
894
894
  return errors;
895
895
  }
896
896
  if (schema.type === "object") {
897
897
  if (!value2 || typeof value2 !== "object" || Array.isArray(value2)) {
898
- errors.push(`${path59}: expected object, got ${Array.isArray(value2) ? "array" : typeof value2}`);
898
+ errors.push(`${path60}: expected object, got ${Array.isArray(value2) ? "array" : typeof value2}`);
899
899
  return errors;
900
900
  }
901
901
  const obj = value2;
902
902
  for (const key of schema.required || []) {
903
903
  if (obj[key] === void 0)
904
- errors.push(`${path59}.${key}: required`);
904
+ errors.push(`${path60}.${key}: required`);
905
905
  }
906
906
  for (const [key, propSchema] of Object.entries(schema.properties || {})) {
907
907
  if (obj[key] !== void 0)
908
- errors.push(...validate(obj[key], propSchema, `${path59}.${key}`));
908
+ errors.push(...validate(obj[key], propSchema, `${path60}.${key}`));
909
909
  }
910
910
  return errors;
911
911
  }
@@ -3236,10 +3236,10 @@ function belongsToNodeModules(file, pathSeparator) {
3236
3236
  function fileURLToPath(fileUrl, pathSeparator) {
3237
3237
  if (!fileUrl.startsWith("file://"))
3238
3238
  return fileUrl;
3239
- let path59 = decodeURIComponent(fileUrl.slice(7));
3240
- if (path59.startsWith("/") && /^[a-zA-Z]:/.test(path59.slice(1)))
3241
- path59 = path59.slice(1);
3242
- return path59.replace(/\//g, pathSeparator);
3239
+ let path60 = decodeURIComponent(fileUrl.slice(7));
3240
+ if (path60.startsWith("/") && /^[a-zA-Z]:/.test(path60.slice(1)))
3241
+ path60 = path60.slice(1);
3242
+ return path60.replace(/\//g, pathSeparator);
3243
3243
  }
3244
3244
  var re, methodRe;
3245
3245
  var init_stackTrace = __esm({
@@ -3365,11 +3365,11 @@ function isXmlMimeType(mimeType) {
3365
3365
  function isTextualMimeType(mimeType) {
3366
3366
  return !!mimeType.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/);
3367
3367
  }
3368
- function getMimeTypeForPath(path59) {
3369
- const dotIndex = path59.lastIndexOf(".");
3368
+ function getMimeTypeForPath(path60) {
3369
+ const dotIndex = path60.lastIndexOf(".");
3370
3370
  if (dotIndex === -1)
3371
3371
  return null;
3372
- const extension = path59.substring(dotIndex + 1);
3372
+ const extension = path60.substring(dotIndex + 1);
3373
3373
  return types.get(extension) || null;
3374
3374
  }
3375
3375
  function getExtensionForMimeType(contentType) {
@@ -6242,8 +6242,8 @@ var init_traceModel = __esm({
6242
6242
  this.actionCounters.set(action.group, 1 + (this.actionCounters.get(action.group) || 0));
6243
6243
  }
6244
6244
  }
6245
- createRelativeUrl(path59) {
6246
- const url2 = new URL("http://localhost/" + path59);
6245
+ createRelativeUrl(path60) {
6246
+ const url2 = new URL("http://localhost/" + path60);
6247
6247
  url2.searchParams.set("trace", this.traceUri);
6248
6248
  return url2.toString().substring("http://localhost/".length);
6249
6249
  }
@@ -7650,7 +7650,7 @@ var init_fileUtils = __esm({
7650
7650
  import_os2 = __toESM(require("os"));
7651
7651
  import_path2 = __toESM(require("path"));
7652
7652
  init_crypto();
7653
- existsAsync = (path59) => new Promise((resolve) => import_fs2.default.stat(path59, (err) => resolve(!err)));
7653
+ existsAsync = (path60) => new Promise((resolve) => import_fs2.default.stat(path60, (err) => resolve(!err)));
7654
7654
  }
7655
7655
  });
7656
7656
 
@@ -8196,8 +8196,8 @@ var init_httpServer = __esm({
8196
8196
  routePrefix(prefix, handler) {
8197
8197
  this._routes.push({ prefix, handler });
8198
8198
  }
8199
- routePath(path59, handler) {
8200
- this._routes.push({ exact: path59, handler });
8199
+ routePath(path60, handler) {
8200
+ this._routes.push({ exact: path60, handler });
8201
8201
  }
8202
8202
  port() {
8203
8203
  return this._port;
@@ -8491,8 +8491,8 @@ var init_nodePlatform = __esm({
8491
8491
  path: () => import_path4.default,
8492
8492
  pathSeparator: import_path4.default.sep,
8493
8493
  showInternalStackFrames: () => !!process.env.PWDEBUGIMPL,
8494
- async streamFile(path59, stream3) {
8495
- await pipelineAsync(import_fs5.default.createReadStream(path59), stream3);
8494
+ async streamFile(path60, stream3) {
8495
+ await pipelineAsync(import_fs5.default.createReadStream(path60), stream3);
8496
8496
  },
8497
8497
  streamReadable: (channel) => {
8498
8498
  return new ReadableStreamImpl(channel);
@@ -9479,7 +9479,7 @@ var init_wsServer = __esm({
9479
9479
  this._allowedHosts = null;
9480
9480
  this._delegate = delegate;
9481
9481
  }
9482
- async listen(port = 0, hostname, path59) {
9482
+ async listen(port = 0, hostname, path60) {
9483
9483
  debugLogger.log("server", `Server started at ${/* @__PURE__ */ new Date()}`);
9484
9484
  hostname ??= "localhost";
9485
9485
  const server = createHttpServer((request2, response2) => this._onRequest(request2, response2));
@@ -9493,11 +9493,11 @@ var init_wsServer = __esm({
9493
9493
  return;
9494
9494
  }
9495
9495
  if (typeof address === "string") {
9496
- resolve(`${address}${path59}`);
9496
+ resolve(`${address}${path60}`);
9497
9497
  return;
9498
9498
  }
9499
9499
  this._allowedHosts = computeAllowedHosts(hostname, address.address);
9500
- resolve(`ws://${urlHostFromAddress(address)}:${address.port}${path59}`);
9500
+ resolve(`ws://${urlHostFromAddress(address)}:${address.port}${path60}`);
9501
9501
  }).on("error", reject);
9502
9502
  });
9503
9503
  debugLogger.log("server", "Listening at " + wsEndpoint);
@@ -9508,7 +9508,7 @@ var init_wsServer = __esm({
9508
9508
  this._wsServer.on("headers", (headers) => this._delegate.onHeaders(headers));
9509
9509
  server.on("upgrade", (request2, socket, head) => {
9510
9510
  const pathname = new URL("http://localhost" + request2.url).pathname;
9511
- if (pathname !== path59) {
9511
+ if (pathname !== path60) {
9512
9512
  socket.write(`HTTP/${request2.httpVersion} 400 Bad Request\r
9513
9513
  \r
9514
9514
  `);
@@ -9779,24 +9779,24 @@ var init_extractZip = __esm({
9779
9779
  });
9780
9780
 
9781
9781
  // packages/utils/third_party/lockfile.ts
9782
- function probe(file, fs60, callback) {
9783
- const cachedPrecision = fs60[cacheSymbol];
9782
+ function probe(file, fs61, callback) {
9783
+ const cachedPrecision = fs61[cacheSymbol];
9784
9784
  if (cachedPrecision) {
9785
- return fs60.stat(file, (err, stat) => {
9785
+ return fs61.stat(file, (err, stat) => {
9786
9786
  if (err)
9787
9787
  return callback(err);
9788
9788
  callback(null, stat.mtime, cachedPrecision);
9789
9789
  });
9790
9790
  }
9791
9791
  const mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
9792
- fs60.utimes(file, mtime, mtime, (err) => {
9792
+ fs61.utimes(file, mtime, mtime, (err) => {
9793
9793
  if (err)
9794
9794
  return callback(err);
9795
- fs60.stat(file, (err2, stat) => {
9795
+ fs61.stat(file, (err2, stat) => {
9796
9796
  if (err2)
9797
9797
  return callback(err2);
9798
9798
  const precision = stat.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
9799
- Object.defineProperty(fs60, cacheSymbol, { value: precision });
9799
+ Object.defineProperty(fs61, cacheSymbol, { value: precision });
9800
9800
  callback(null, stat.mtime, precision);
9801
9801
  });
9802
9802
  });
@@ -12744,14 +12744,14 @@ function domainMatches(value2, domain) {
12744
12744
  value2 = "." + value2;
12745
12745
  return value2.endsWith(domain);
12746
12746
  }
12747
- function pathMatches(value2, path59) {
12748
- if (value2 === path59)
12747
+ function pathMatches(value2, path60) {
12748
+ if (value2 === path60)
12749
12749
  return true;
12750
12750
  if (!value2.endsWith("/"))
12751
12751
  value2 = value2 + "/";
12752
- if (!path59.endsWith("/"))
12753
- path59 = path59 + "/";
12754
- return value2.startsWith(path59);
12752
+ if (!path60.endsWith("/"))
12753
+ path60 = path60 + "/";
12754
+ return value2.startsWith(path60);
12755
12755
  }
12756
12756
  var Cookie, CookieStore;
12757
12757
  var init_cookieStore = __esm({
@@ -19357,85 +19357,85 @@ var init_validatorPrimitives = __esm({
19357
19357
  ValidationError = class extends Error {
19358
19358
  };
19359
19359
  scheme = {};
19360
- tFloat = (arg, path59, context2) => {
19360
+ tFloat = (arg, path60, context2) => {
19361
19361
  if (arg instanceof Number)
19362
19362
  return arg.valueOf();
19363
19363
  if (typeof arg === "number")
19364
19364
  return arg;
19365
- throw new ValidationError(`${path59}: expected float, got ${typeof arg}`);
19365
+ throw new ValidationError(`${path60}: expected float, got ${typeof arg}`);
19366
19366
  };
19367
- tInt = (arg, path59, context2) => {
19367
+ tInt = (arg, path60, context2) => {
19368
19368
  let value2;
19369
19369
  if (arg instanceof Number)
19370
19370
  value2 = arg.valueOf();
19371
19371
  else if (typeof arg === "number")
19372
19372
  value2 = arg;
19373
19373
  else
19374
- throw new ValidationError(`${path59}: expected integer, got ${typeof arg}`);
19374
+ throw new ValidationError(`${path60}: expected integer, got ${typeof arg}`);
19375
19375
  if (!Number.isInteger(value2))
19376
- throw new ValidationError(`${path59}: expected integer, got float ${value2}`);
19376
+ throw new ValidationError(`${path60}: expected integer, got float ${value2}`);
19377
19377
  return value2;
19378
19378
  };
19379
- tBoolean = (arg, path59, context2) => {
19379
+ tBoolean = (arg, path60, context2) => {
19380
19380
  if (arg instanceof Boolean)
19381
19381
  return arg.valueOf();
19382
19382
  if (typeof arg === "boolean")
19383
19383
  return arg;
19384
- throw new ValidationError(`${path59}: expected boolean, got ${typeof arg}`);
19384
+ throw new ValidationError(`${path60}: expected boolean, got ${typeof arg}`);
19385
19385
  };
19386
- tString = (arg, path59, context2) => {
19386
+ tString = (arg, path60, context2) => {
19387
19387
  if (arg instanceof String)
19388
19388
  return arg.valueOf();
19389
19389
  if (typeof arg === "string")
19390
19390
  return arg;
19391
- throw new ValidationError(`${path59}: expected string, got ${typeof arg}`);
19391
+ throw new ValidationError(`${path60}: expected string, got ${typeof arg}`);
19392
19392
  };
19393
- tBinary = (arg, path59, context2) => {
19393
+ tBinary = (arg, path60, context2) => {
19394
19394
  if (context2.binary === "fromBase64") {
19395
19395
  if (arg instanceof String)
19396
19396
  return Buffer.from(arg.valueOf(), "base64");
19397
19397
  if (typeof arg === "string")
19398
19398
  return Buffer.from(arg, "base64");
19399
- throw new ValidationError(`${path59}: expected base64-encoded buffer, got ${typeof arg}`);
19399
+ throw new ValidationError(`${path60}: expected base64-encoded buffer, got ${typeof arg}`);
19400
19400
  }
19401
19401
  if (context2.binary === "toBase64") {
19402
19402
  if (!(arg instanceof Buffer))
19403
- throw new ValidationError(`${path59}: expected Buffer, got ${typeof arg}`);
19403
+ throw new ValidationError(`${path60}: expected Buffer, got ${typeof arg}`);
19404
19404
  return arg.toString("base64");
19405
19405
  }
19406
19406
  if (context2.binary === "buffer") {
19407
19407
  if (!(arg instanceof Buffer) && !(arg instanceof Object))
19408
- throw new ValidationError(`${path59}: expected Buffer, got ${typeof arg}`);
19408
+ throw new ValidationError(`${path60}: expected Buffer, got ${typeof arg}`);
19409
19409
  return arg;
19410
19410
  }
19411
19411
  throw new ValidationError(`Unsupported binary behavior "${context2.binary}"`);
19412
19412
  };
19413
- tAny = (arg, path59, context2) => {
19413
+ tAny = (arg, path60, context2) => {
19414
19414
  return arg;
19415
19415
  };
19416
19416
  tOptional = (v) => {
19417
- return (arg, path59, context2) => {
19417
+ return (arg, path60, context2) => {
19418
19418
  if (Object.is(arg, void 0))
19419
19419
  return arg;
19420
- return v(arg, path59, context2);
19420
+ return v(arg, path60, context2);
19421
19421
  };
19422
19422
  };
19423
19423
  tArray = (v) => {
19424
- return (arg, path59, context2) => {
19424
+ return (arg, path60, context2) => {
19425
19425
  if (!Array.isArray(arg))
19426
- throw new ValidationError(`${path59}: expected array, got ${typeof arg}`);
19427
- return arg.map((x, index) => v(x, path59 + "[" + index + "]", context2));
19426
+ throw new ValidationError(`${path60}: expected array, got ${typeof arg}`);
19427
+ return arg.map((x, index) => v(x, path60 + "[" + index + "]", context2));
19428
19428
  };
19429
19429
  };
19430
19430
  tObject = (s) => {
19431
- return (arg, path59, context2) => {
19431
+ return (arg, path60, context2) => {
19432
19432
  if (Object.is(arg, null))
19433
- throw new ValidationError(`${path59}: expected object, got null`);
19433
+ throw new ValidationError(`${path60}: expected object, got null`);
19434
19434
  if (typeof arg !== "object")
19435
- throw new ValidationError(`${path59}: expected object, got ${typeof arg}`);
19435
+ throw new ValidationError(`${path60}: expected object, got ${typeof arg}`);
19436
19436
  const result2 = {};
19437
19437
  for (const [key, v] of Object.entries(s)) {
19438
- const value2 = v(arg[key], path59 ? path59 + "." + key : key, context2);
19438
+ const value2 = v(arg[key], path60 ? path60 + "." + key : key, context2);
19439
19439
  if (!Object.is(value2, void 0))
19440
19440
  result2[key] = value2;
19441
19441
  }
@@ -19449,23 +19449,23 @@ var init_validatorPrimitives = __esm({
19449
19449
  };
19450
19450
  };
19451
19451
  tEnum = (e) => {
19452
- return (arg, path59, context2) => {
19452
+ return (arg, path60, context2) => {
19453
19453
  if (!e.includes(arg))
19454
- throw new ValidationError(`${path59}: expected one of (${e.join("|")})`);
19454
+ throw new ValidationError(`${path60}: expected one of (${e.join("|")})`);
19455
19455
  return arg;
19456
19456
  };
19457
19457
  };
19458
19458
  tChannel = (names) => {
19459
- return (arg, path59, context2) => {
19460
- return context2.tChannelImpl(names, arg, path59, context2);
19459
+ return (arg, path60, context2) => {
19460
+ return context2.tChannelImpl(names, arg, path60, context2);
19461
19461
  };
19462
19462
  };
19463
19463
  tType = (name) => {
19464
- return (arg, path59, context2) => {
19464
+ return (arg, path60, context2) => {
19465
19465
  const v = scheme[name];
19466
19466
  if (!v)
19467
- throw new ValidationError(path59 + ': unknown type "' + name + '"');
19468
- return v(arg, path59, context2);
19467
+ throw new ValidationError(path60 + ': unknown type "' + name + '"');
19468
+ return v(arg, path60, context2);
19469
19469
  };
19470
19470
  };
19471
19471
  }
@@ -22655,25 +22655,25 @@ var init_dispatcher = __esm({
22655
22655
  isUnderTest
22656
22656
  };
22657
22657
  }
22658
- _tChannelImplFromWire(names, arg, path59, context2) {
22658
+ _tChannelImplFromWire(names, arg, path60, context2) {
22659
22659
  if (arg && typeof arg === "object" && typeof arg.guid === "string") {
22660
22660
  const guid = arg.guid;
22661
22661
  const dispatcher = this._dispatcherByGuid.get(guid);
22662
22662
  if (!dispatcher)
22663
- throw new ValidationError(`${path59}: no object with guid ${guid}`);
22663
+ throw new ValidationError(`${path60}: no object with guid ${guid}`);
22664
22664
  if (names !== "*" && !names.includes(dispatcher._type))
22665
- throw new ValidationError(`${path59}: object with guid ${guid} has type ${dispatcher._type}, expected ${names.toString()}`);
22665
+ throw new ValidationError(`${path60}: object with guid ${guid} has type ${dispatcher._type}, expected ${names.toString()}`);
22666
22666
  return dispatcher;
22667
22667
  }
22668
- throw new ValidationError(`${path59}: expected guid for ${names.toString()}`);
22668
+ throw new ValidationError(`${path60}: expected guid for ${names.toString()}`);
22669
22669
  }
22670
- _tChannelImplToWire(names, arg, path59, context2) {
22670
+ _tChannelImplToWire(names, arg, path60, context2) {
22671
22671
  if (arg instanceof Dispatcher) {
22672
22672
  if (names !== "*" && !names.includes(arg._type))
22673
- throw new ValidationError(`${path59}: dispatcher with guid ${arg._guid} has type ${arg._type}, expected ${names.toString()}`);
22673
+ throw new ValidationError(`${path60}: dispatcher with guid ${arg._guid} has type ${arg._type}, expected ${names.toString()}`);
22674
22674
  return { guid: arg._guid };
22675
22675
  }
22676
- throw new ValidationError(`${path59}: expected dispatcher ${names.toString()}`);
22676
+ throw new ValidationError(`${path60}: expected dispatcher ${names.toString()}`);
22677
22677
  }
22678
22678
  existingDispatcher(object) {
22679
22679
  return this._dispatcherByObject.get(object);
@@ -32606,10 +32606,10 @@ async function releaseObject(client, objectId) {
32606
32606
  await client.send("Runtime.releaseObject", { objectId }).catch((error) => {
32607
32607
  });
32608
32608
  }
32609
- async function saveProtocolStream(client, handle, path59) {
32609
+ async function saveProtocolStream(client, handle, path60) {
32610
32610
  let eof = false;
32611
- await mkdirIfNeeded(path59);
32612
- const fd = await import_fs23.default.promises.open(path59, "w");
32611
+ await mkdirIfNeeded(path60);
32612
+ const fd = await import_fs23.default.promises.open(path60, "w");
32613
32613
  while (!eof) {
32614
32614
  const response2 = await client.send("IO.read", { handle });
32615
32615
  eof = response2.eof;
@@ -35679,12 +35679,12 @@ var init_crBrowser = __esm({
35679
35679
  async doGetCookies(urls) {
35680
35680
  const { cookies } = await this._browser._session.send("Storage.getCookies", { browserContextId: this._browserContextId });
35681
35681
  return filterCookies(cookies.map((c) => {
35682
- const { name, value: value2, domain, path: path59, expires, httpOnly, secure, sameSite } = c;
35682
+ const { name, value: value2, domain, path: path60, expires, httpOnly, secure, sameSite } = c;
35683
35683
  const copy = {
35684
35684
  name,
35685
35685
  value: value2,
35686
35686
  domain,
35687
- path: path59,
35687
+ path: path60,
35688
35688
  expires,
35689
35689
  httpOnly,
35690
35690
  secure,
@@ -35699,13 +35699,13 @@ var init_crBrowser = __esm({
35699
35699
  }
35700
35700
  async addCookies(cookies) {
35701
35701
  function toChromiumCookie(cookie) {
35702
- const { name, value: value2, url: url2, domain, path: path59, expires, httpOnly, secure, sameSite, partitionKey, _crHasCrossSiteAncestor } = cookie;
35702
+ const { name, value: value2, url: url2, domain, path: path60, expires, httpOnly, secure, sameSite, partitionKey, _crHasCrossSiteAncestor } = cookie;
35703
35703
  const copy = {
35704
35704
  name,
35705
35705
  value: value2,
35706
35706
  url: url2,
35707
35707
  domain,
35708
- path: path59,
35708
+ path: path60,
35709
35709
  expires,
35710
35710
  httpOnly,
35711
35711
  secure,
@@ -36194,7 +36194,7 @@ var init_android = __esm({
36194
36194
  debug3("pw:android")("Written driver bytes: " + success);
36195
36195
  installSocket.close();
36196
36196
  }
36197
- async push(progress2, content, path59, mode = 420) {
36197
+ async push(progress2, content, path60, mode = 420) {
36198
36198
  const socket = await this._open(progress2, `sync:`);
36199
36199
  const sendHeader = async (progress3, command, length) => {
36200
36200
  const buffer = Buffer.alloc(command.length + 4);
@@ -36206,7 +36206,7 @@ var init_android = __esm({
36206
36206
  await sendHeader(progress3, command, data.length);
36207
36207
  await progress3.race(socket.write(data));
36208
36208
  };
36209
- await send(progress2, "SEND", Buffer.from(`${path59},${mode}`));
36209
+ await send(progress2, "SEND", Buffer.from(`${path60},${mode}`));
36210
36210
  const maxChunk = 65535;
36211
36211
  for (let i = 0; i < content.length; i += maxChunk)
36212
36212
  await send(progress2, "DATA", content.slice(i, i + maxChunk));
@@ -42257,12 +42257,12 @@ var init_ffBrowser = __esm({
42257
42257
  async doGetCookies(urls) {
42258
42258
  const { cookies } = await this._browser.session.send("Browser.getCookies", { browserContextId: this._browserContextId });
42259
42259
  return filterCookies(cookies.map((c) => {
42260
- const { name, value: value2, domain, path: path59, expires, httpOnly, secure, sameSite } = c;
42260
+ const { name, value: value2, domain, path: path60, expires, httpOnly, secure, sameSite } = c;
42261
42261
  return {
42262
42262
  name,
42263
42263
  value: value2,
42264
42264
  domain,
42265
- path: path59,
42265
+ path: path60,
42266
42266
  expires,
42267
42267
  httpOnly,
42268
42268
  secure,
@@ -42272,13 +42272,13 @@ var init_ffBrowser = __esm({
42272
42272
  }
42273
42273
  async addCookies(cookies) {
42274
42274
  const cc = rewriteCookies(cookies).map((c) => {
42275
- const { name, value: value2, url: url2, domain, path: path59, expires, httpOnly, secure, sameSite } = c;
42275
+ const { name, value: value2, url: url2, domain, path: path60, expires, httpOnly, secure, sameSite } = c;
42276
42276
  return {
42277
42277
  name,
42278
42278
  value: value2,
42279
42279
  url: url2,
42280
42280
  domain,
42281
- path: path59,
42281
+ path: path60,
42282
42282
  expires: expires === -1 ? void 0 : expires,
42283
42283
  httpOnly,
42284
42284
  secure,
@@ -44118,7 +44118,7 @@ var init_wkPage = __esm({
44118
44118
  const pageProxyId = this._pageProxySession.sessionId;
44119
44119
  const objectId = handle._objectId;
44120
44120
  if (this._browserContext._browser?.options.channel === "webkit-wsl")
44121
- paths = await progress2.race(Promise.all(paths.map((path59) => translatePathToWSL(path59))));
44121
+ paths = await progress2.race(Promise.all(paths.map((path60) => translatePathToWSL(path60))));
44122
44122
  await progress2.race(Promise.all([
44123
44123
  this._pageProxySession.connection.browserSession.send("Playwright.grantFileReadAccess", { pageProxyId, paths }),
44124
44124
  this._session.send("DOM.setInputFiles", { objectId, paths })
@@ -44535,12 +44535,12 @@ var init_wkBrowser = __esm({
44535
44535
  async doGetCookies(urls) {
44536
44536
  const { cookies } = await this._browser._browserSession.send("Playwright.getAllCookies", { browserContextId: this._browserContextId });
44537
44537
  return filterCookies(cookies.map((c) => {
44538
- const { name, value: value2, domain, path: path59, expires, httpOnly, secure, sameSite } = c;
44538
+ const { name, value: value2, domain, path: path60, expires, httpOnly, secure, sameSite } = c;
44539
44539
  const copy = {
44540
44540
  name,
44541
44541
  value: value2,
44542
44542
  domain,
44543
- path: path59,
44543
+ path: path60,
44544
44544
  expires: expires === -1 ? -1 : expires / 1e3,
44545
44545
  httpOnly,
44546
44546
  secure,
@@ -44551,12 +44551,12 @@ var init_wkBrowser = __esm({
44551
44551
  }
44552
44552
  async addCookies(cookies) {
44553
44553
  const cc = rewriteCookies(cookies).map((c) => {
44554
- const { name, value: value2, domain, path: path59, expires, httpOnly, secure, sameSite } = c;
44554
+ const { name, value: value2, domain, path: path60, expires, httpOnly, secure, sameSite } = c;
44555
44555
  const copy = {
44556
44556
  name,
44557
44557
  value: value2,
44558
44558
  domain,
44559
- path: path59,
44559
+ path: path60,
44560
44560
  expires: expires && expires !== -1 ? expires * 1e3 : expires,
44561
44561
  httpOnly,
44562
44562
  secure,
@@ -44649,8 +44649,8 @@ var init_wkBrowser = __esm({
44649
44649
  });
44650
44650
 
44651
44651
  // packages/playwright-core/src/server/webkit/webkit.ts
44652
- async function translatePathToWSL(path59) {
44653
- const { stdout } = await spawnAsync("wsl.exe", ["-d", "playwright", "--cd", "/home/pwuser", "wslpath", path59.replace(/\\/g, "\\\\")]);
44652
+ async function translatePathToWSL(path60) {
44653
+ const { stdout } = await spawnAsync("wsl.exe", ["-d", "playwright", "--cd", "/home/pwuser", "wslpath", path60.replace(/\\/g, "\\\\")]);
44654
44654
  return stdout.toString().trim();
44655
44655
  }
44656
44656
  var import_path29, WebKit;
@@ -46055,7 +46055,7 @@ var init_playwrightWebSocketServer = __esm({
46055
46055
  init_serverTransport();
46056
46056
  init_browser();
46057
46057
  PlaywrightWebSocketServer = class {
46058
- constructor(browser, path59) {
46058
+ constructor(browser, path60) {
46059
46059
  this._browser = browser;
46060
46060
  browser.on(Browser.Events.Disconnected, () => this.close());
46061
46061
  const semaphore = new Semaphore(Infinity);
@@ -46087,8 +46087,8 @@ var init_playwrightWebSocketServer = __esm({
46087
46087
  denyLaunch: true
46088
46088
  };
46089
46089
  }
46090
- async listen(port = 0, hostname, path59) {
46091
- return await this._wsServer.listen(port, hostname, path59 || "/");
46090
+ async listen(port = 0, hostname, path60) {
46091
+ return await this._wsServer.listen(port, hostname, path60 || "/");
46092
46092
  }
46093
46093
  async close() {
46094
46094
  await this._wsServer.close();
@@ -46638,8 +46638,8 @@ var init_artifactDispatcher = __esm({
46638
46638
  return result2 || new _ArtifactDispatcher(parentScope, artifact);
46639
46639
  }
46640
46640
  async pathAfterFinished(params2, progress2) {
46641
- const path59 = await this._object.localPathAfterFinished(progress2);
46642
- return { value: path59 };
46641
+ const path60 = await this._object.localPathAfterFinished(progress2);
46642
+ return { value: path60 };
46643
46643
  }
46644
46644
  async saveAs(params2, progress2) {
46645
46645
  return await progress2.race(new Promise((resolve, reject) => {
@@ -49553,8 +49553,8 @@ var init_jsonPipeDispatcher = __esm({
49553
49553
  });
49554
49554
 
49555
49555
  // packages/playwright-core/src/server/socksInterceptor.ts
49556
- function tChannelForSocks(names, arg, path59, context2) {
49557
- throw new ValidationError(`${path59}: channels are not expected in SocksSupport`);
49556
+ function tChannelForSocks(names, arg, path60, context2) {
49557
+ throw new ValidationError(`${path60}: channels are not expected in SocksSupport`);
49558
49558
  }
49559
49559
  var import_events14, SocksInterceptor;
49560
49560
  var init_socksInterceptor = __esm({
@@ -50684,8 +50684,8 @@ var init_androidServerImpl = __esm({
50684
50684
  if (devices.length > 1)
50685
50685
  throw new Error(`More than one device found. Please specify deviceSerialNumber`);
50686
50686
  const device = devices[0];
50687
- const path59 = options.wsPath ? options.wsPath.startsWith("/") ? options.wsPath : `/${options.wsPath}` : `/${createGuid()}`;
50688
- const server = new PlaywrightServer({ mode: "launchServer", path: path59, maxConnections: 1, preLaunchedAndroidDevice: device });
50687
+ const path60 = options.wsPath ? options.wsPath.startsWith("/") ? options.wsPath : `/${options.wsPath}` : `/${createGuid()}`;
50688
+ const server = new PlaywrightServer({ mode: "launchServer", path: path60, maxConnections: 1, preLaunchedAndroidDevice: device });
50689
50689
  const wsEndpoint = await server.listen(options.port, options.host);
50690
50690
  const browserServer = new import_events15.default();
50691
50691
  browserServer.wsEndpoint = () => wsEndpoint;
@@ -50738,8 +50738,8 @@ var init_browserServerImpl = __esm({
50738
50738
  const playwright2 = createPlaywright({ sdkLanguage: "javascript", isServer: true });
50739
50739
  const metadata = { id: "", startTime: 0, endTime: 0, type: "Internal", method: "", params: {}, log: [], internal: true };
50740
50740
  const validatorContext = {
50741
- tChannelImpl: (names, arg, path60) => {
50742
- throw new ValidationError(`${path60}: channels are not expected in launchServer`);
50741
+ tChannelImpl: (names, arg, path61) => {
50742
+ throw new ValidationError(`${path61}: channels are not expected in launchServer`);
50743
50743
  },
50744
50744
  binary: "buffer",
50745
50745
  isUnderTest
@@ -50771,8 +50771,8 @@ var init_browserServerImpl = __esm({
50771
50771
  rewriteErrorMessage(e, `${e.message} Failed to launch browser.${log2}`);
50772
50772
  throw e;
50773
50773
  }
50774
- const path59 = options.wsPath ? options.wsPath.startsWith("/") ? options.wsPath : `/${options.wsPath}` : `/${createGuid()}`;
50775
- const server = new PlaywrightServer({ mode: options._sharedBrowser ? "launchServerShared" : "launchServer", path: path59, maxConnections: Infinity, preLaunchedBrowser: browser });
50774
+ const path60 = options.wsPath ? options.wsPath.startsWith("/") ? options.wsPath : `/${options.wsPath}` : `/${createGuid()}`;
50775
+ const server = new PlaywrightServer({ mode: options._sharedBrowser ? "launchServerShared" : "launchServer", path: path60, maxConnections: Infinity, preLaunchedBrowser: browser });
50776
50776
  const wsEndpoint = await server.listen(options.port, options.host);
50777
50777
  const browserServer = new import_events16.default();
50778
50778
  browserServer.process = () => browser.options.browserProcess.process;
@@ -51127,10 +51127,10 @@ function logApiCall(platform, logger, message) {
51127
51127
  logger.log("api", "info", message, [], { color: "cyan" });
51128
51128
  platform.log("api", message);
51129
51129
  }
51130
- function tChannelImplToWire(names, arg, path59, context2) {
51130
+ function tChannelImplToWire(names, arg, path60, context2) {
51131
51131
  if (arg._object instanceof ChannelOwner && (names === "*" || names.includes(arg._object._type)))
51132
51132
  return { guid: arg._object._guid };
51133
- throw new ValidationError(`${path59}: expected channel ${names.toString()}`);
51133
+ throw new ValidationError(`${path60}: expected channel ${names.toString()}`);
51134
51134
  }
51135
51135
  var ChannelOwner;
51136
51136
  var init_channelOwner = __esm({
@@ -51361,9 +51361,9 @@ async function evaluationScript(platform, fun, arg, addSourceUrl = true) {
51361
51361
  }
51362
51362
  throw new Error("Either path or content property must be present");
51363
51363
  }
51364
- function addSourceUrlToScript(source8, path59) {
51364
+ function addSourceUrlToScript(source8, path60) {
51365
51365
  return `${source8}
51366
- //# sourceURL=${path59.replace(/\n/g, "")}`;
51366
+ //# sourceURL=${path60.replace(/\n/g, "")}`;
51367
51367
  }
51368
51368
  var init_clientHelper = __esm({
51369
51369
  "packages/playwright-core/src/client/clientHelper.ts"() {
@@ -51768,16 +51768,16 @@ var init_artifact2 = __esm({
51768
51768
  throw new Error(`Path is not available when connecting remotely. Use saveAs() to save a local copy.`);
51769
51769
  return (await this._channel.pathAfterFinished()).value;
51770
51770
  }
51771
- async saveAs(path59) {
51771
+ async saveAs(path60) {
51772
51772
  if (!this._connection.isRemote()) {
51773
- await this._channel.saveAs({ path: path59 });
51773
+ await this._channel.saveAs({ path: path60 });
51774
51774
  return;
51775
51775
  }
51776
51776
  const result2 = await this._channel.saveAsStream();
51777
51777
  const stream3 = Stream.from(result2.stream);
51778
- await mkdirIfNeeded2(this._platform, path59);
51778
+ await mkdirIfNeeded2(this._platform, path60);
51779
51779
  await new Promise((resolve, reject) => {
51780
- stream3.stream().pipe(this._platform.fs().createWriteStream(path59)).on("finish", resolve).on("error", reject);
51780
+ stream3.stream().pipe(this._platform.fs().createWriteStream(path60)).on("finish", resolve).on("error", reject);
51781
51781
  });
51782
51782
  }
51783
51783
  async failure() {
@@ -51908,8 +51908,8 @@ var init_download2 = __esm({
51908
51908
  async path() {
51909
51909
  return await this._artifact.pathAfterFinished();
51910
51910
  }
51911
- async saveAs(path59) {
51912
- return await this._artifact.saveAs(path59);
51911
+ async saveAs(path60) {
51912
+ return await this._artifact.saveAs(path60);
51913
51913
  }
51914
51914
  async failure() {
51915
51915
  return await this._artifact.failure();
@@ -52673,14 +52673,14 @@ var init_tracing2 = __esm({
52673
52673
  await this._channel.tracingStop();
52674
52674
  });
52675
52675
  }
52676
- async startHar(path59, options = {}) {
52676
+ async startHar(path60, options = {}) {
52677
52677
  await this._wrapApiCall(async () => {
52678
52678
  if (this._harId)
52679
52679
  throw new Error("HAR recording has already been started");
52680
- if (options.resourcesDir && path59.endsWith(".zip"))
52680
+ if (options.resourcesDir && path60.endsWith(".zip"))
52681
52681
  throw new Error("resourcesDir option is not compatible with a .zip har file");
52682
- const defaultContent = path59.endsWith(".zip") ? "attach" : "embed";
52683
- this._harId = await this._recordIntoHAR(path59, null, {
52682
+ const defaultContent = path60.endsWith(".zip") ? "attach" : "embed";
52683
+ this._harId = await this._recordIntoHAR(path60, null, {
52684
52684
  url: options.urlFilter,
52685
52685
  updateContent: options.content ?? defaultContent,
52686
52686
  updateMode: options.mode ?? "full",
@@ -54743,10 +54743,10 @@ var init_video = __esm({
54743
54743
  throw new Error("Video recording has not been started.");
54744
54744
  return this._artifact._initializer.absolutePath;
54745
54745
  }
54746
- async saveAs(path59) {
54746
+ async saveAs(path60) {
54747
54747
  if (!this._artifact)
54748
54748
  throw new Error("Video recording has not been started.");
54749
- return await this._artifact.saveAs(path59);
54749
+ return await this._artifact.saveAs(path60);
54750
54750
  }
54751
54751
  async delete() {
54752
54752
  if (this._artifact)
@@ -55651,11 +55651,11 @@ function toAcceptDownloadsProtocol(acceptDownloads) {
55651
55651
  async function toClientCertificatesProtocol(platform, certs) {
55652
55652
  if (!certs)
55653
55653
  return void 0;
55654
- const bufferizeContent = async (value2, path59) => {
55654
+ const bufferizeContent = async (value2, path60) => {
55655
55655
  if (value2)
55656
55656
  return value2;
55657
- if (path59)
55658
- return await platform.fs().promises.readFile(path59);
55657
+ if (path60)
55658
+ return await platform.fs().promises.readFile(path60);
55659
55659
  };
55660
55660
  return await Promise.all(certs.map(async (cert) => ({
55661
55661
  origin: cert.origin,
@@ -56610,8 +56610,8 @@ var init_android2 = __esm({
56610
56610
  async installApk(file, options) {
56611
56611
  await this._channel.installApk({ file: await loadFile(this._platform, file), args: options && options.args });
56612
56612
  }
56613
- async push(file, path59, options) {
56614
- await this._channel.push({ file: await loadFile(this._platform, file), path: path59, mode: options ? options.mode : void 0 });
56613
+ async push(file, path60, options) {
56614
+ await this._channel.push({ file: await loadFile(this._platform, file), path: path60, mode: options ? options.mode : void 0 });
56615
56615
  }
56616
56616
  async launchBrowser(options = {}) {
56617
56617
  const contextOptions = await prepareBrowserContextParams(this._platform, options);
@@ -57239,16 +57239,16 @@ var init_connection = __esm({
57239
57239
  this._callbacks.clear();
57240
57240
  this.emit("close");
57241
57241
  }
57242
- _tChannelImplFromWire(names, arg, path59, context2) {
57242
+ _tChannelImplFromWire(names, arg, path60, context2) {
57243
57243
  if (arg && typeof arg === "object" && typeof arg.guid === "string") {
57244
57244
  const object = this._objects.get(arg.guid);
57245
57245
  if (!object)
57246
57246
  throw new Error(`Object with guid ${arg.guid} was not bound in the connection`);
57247
57247
  if (names !== "*" && !names.includes(object._type))
57248
- throw new ValidationError(`${path59}: expected channel ${names.toString()}`);
57248
+ throw new ValidationError(`${path60}: expected channel ${names.toString()}`);
57249
57249
  return object._channel;
57250
57250
  }
57251
- throw new ValidationError(`${path59}: expected channel ${names.toString()}`);
57251
+ throw new ValidationError(`${path60}: expected channel ${names.toString()}`);
57252
57252
  }
57253
57253
  _createRemoteObject(parentGuid, type3, guid, initializer) {
57254
57254
  const parent = this._objects.get(parentGuid);
@@ -58046,7 +58046,7 @@ var init_tab = __esm({
58046
58046
  await this._initializedPromise;
58047
58047
  await this.page.waitForLoadState(state, options).catch((e) => debug7("pw:tools:error")(e));
58048
58048
  }
58049
- async checkUrlAndNavigate(url2) {
58049
+ async checkUrlAndNavigate(url2, options) {
58050
58050
  try {
58051
58051
  new URL(url2);
58052
58052
  } catch (e) {
@@ -58056,15 +58056,18 @@ var init_tab = __esm({
58056
58056
  url2 = "https://" + url2;
58057
58057
  }
58058
58058
  this.context.checkUrlAllowed(url2);
58059
- await this.navigate(url2);
58059
+ await this.navigate(url2, options);
58060
58060
  return url2;
58061
58061
  }
58062
- async navigate(url2) {
58062
+ async navigate(url2, options) {
58063
58063
  await this._initializedPromise;
58064
58064
  this._clearCollectedArtifacts();
58065
+ const requested = options?.waitUntil ?? "domcontentloaded";
58066
+ const waitUntil = requested === "none" ? "commit" : requested;
58067
+ const timeoutOptions = options?.timeout !== void 0 ? { timeout: options.timeout } : this.navigationTimeoutOptions;
58065
58068
  const { promise: downloadEvent, abort: abortDownloadEvent } = eventWaiter(this.page, "download", 3e3);
58066
58069
  try {
58067
- await this.page.goto(url2, { waitUntil: "domcontentloaded", ...this.navigationTimeoutOptions });
58070
+ await this.page.goto(url2, { waitUntil, ...timeoutOptions });
58068
58071
  abortDownloadEvent();
58069
58072
  } catch (_e) {
58070
58073
  const e = _e;
@@ -58077,6 +58080,8 @@ var init_tab = __esm({
58077
58080
  await new Promise((resolve) => setTimeout(resolve, 500));
58078
58081
  return;
58079
58082
  }
58083
+ if (requested === "none" || requested === "commit")
58084
+ return;
58080
58085
  await this.waitForLoadState("load", { timeout: 5e3 });
58081
58086
  }
58082
58087
  async consoleMessageCount() {
@@ -59828,13 +59833,15 @@ var init_navigate = __esm({
59828
59833
  title: "Navigate to a URL",
59829
59834
  description: "Navigate to a URL",
59830
59835
  inputSchema: z14.object({
59831
- url: z14.string().describe("The URL to navigate to")
59836
+ url: z14.string().describe("The URL to navigate to"),
59837
+ waitUntil: z14.enum(["none", "commit", "domcontentloaded", "load", "networkidle"]).optional().describe("When navigation is considered done (default domcontentloaded). Use none/commit for pages whose network never goes idle."),
59838
+ timeout: z14.number().optional().describe("Navigation timeout in milliseconds.")
59832
59839
  }),
59833
59840
  type: "action"
59834
59841
  },
59835
59842
  handle: async (context2, params2, response2) => {
59836
59843
  const tab2 = await context2.ensureTab();
59837
- const url2 = await tab2.checkUrlAndNavigate(params2.url);
59844
+ const url2 = await tab2.checkUrlAndNavigate(params2.url, { waitUntil: params2.waitUntil, timeout: params2.timeout });
59838
59845
  response2.setIncludeSnapshot();
59839
59846
  response2.addCode(`await page.goto('${url2}');`);
59840
59847
  }
@@ -59998,9 +60005,9 @@ async function renderRequestPart(request2, part, response2, suggestedFilename) {
59998
60005
  await response2.addResult("Response body", text2, { prefix: "response", ext: "txt", suggestedFilename });
59999
60006
  return;
60000
60007
  }
60001
- const path59 = await saveResponseBody(request2, response2, suggestedFilename);
60002
- if (path59 !== void 0)
60003
- response2.addTextResult(path59);
60008
+ const path60 = await saveResponseBody(request2, response2, suggestedFilename);
60009
+ if (path60 !== void 0)
60010
+ response2.addTextResult(path60);
60004
60011
  }
60005
60012
  function renderHeaders(headers) {
60006
60013
  return Object.entries(headers).map(([k, v]) => `${k}: ${v}`).join("\n");
@@ -61237,7 +61244,7 @@ var init_minimist = __esm({
61237
61244
  });
61238
61245
 
61239
61246
  // packages/playwright-core/src/tools/cli-daemon/commands.ts
61240
- var z28, elementTargetDescription2, numberArg, open3, attach, close2, detach, goto, goBack2, goForward2, reload2, pressKey, type2, keydown2, keyup2, mouseMove2, mouseDown2, mouseUp2, mouseWheel2, click2, doubleClick, drag2, drop2, fill, hover2, select, fileUpload, check2, uncheck2, snapshot2, generateLocator2, highlight2, evaluate3, dialogAccept, dialogDismiss, resize2, runCode2, tabList, tabNew, tabClose, tabSelect, stateLoad, stateSave, cookieList2, cookieGet2, cookieSet2, cookieDelete2, cookieClear2, localStorageList2, localStorageGet2, localStorageSet2, localStorageDelete2, localStorageClear2, sessionStorageList2, sessionStorageGet2, sessionStorageSet2, sessionStorageDelete2, sessionStorageClear2, routeMock, routeList2, unroute2, networkStateSet2, screenshot2, pdfSave, consoleList, networkRequests, filenameOption, networkRequest, networkRequestHeaders, networkRequestBody, networkResponseHeaders, networkResponseBody, tracingStart2, tracingStop2, videoStart2, videoStop2, videoChapter2, dashboardShow, resume2, stepOver, pauseAt, sessionList, sessionCloseAll, killAll, deleteData, configPrint, install, installBrowser, tray, commandsArray, commands;
61247
+ var z28, elementTargetDescription2, numberArg, waitUntilArg, navigationOptions, open3, attach, close2, detach, goto, goBack2, goForward2, reload2, pressKey, type2, keydown2, keyup2, mouseMove2, mouseDown2, mouseUp2, mouseWheel2, click2, doubleClick, drag2, drop2, fill, hover2, select, fileUpload, check2, uncheck2, snapshot2, generateLocator2, highlight2, evaluate3, dialogAccept, dialogDismiss, resize2, runCode2, tabList, tabNew, tabClose, tabSelect, stateLoad, stateSave, cookieList2, cookieGet2, cookieSet2, cookieDelete2, cookieClear2, localStorageList2, localStorageGet2, localStorageSet2, localStorageDelete2, localStorageClear2, sessionStorageList2, sessionStorageGet2, sessionStorageSet2, sessionStorageDelete2, sessionStorageClear2, routeMock, routeList2, unroute2, networkStateSet2, screenshot2, pdfSave, consoleList, networkRequests, filenameOption, networkRequest, networkRequestHeaders, networkRequestBody, networkResponseHeaders, networkResponseBody, tracingStart2, tracingStop2, videoStart2, videoStop2, videoChapter2, dashboardShow, resume2, stepOver, pauseAt, sessionList, sessionCloseAll, killAll, deleteData, configPrint, install, installBrowser, tray, commandsArray, commands;
61241
61248
  var init_commands = __esm({
61242
61249
  "packages/playwright-core/src/tools/cli-daemon/commands.ts"() {
61243
61250
  "use strict";
@@ -61255,6 +61262,11 @@ var init_commands = __esm({
61255
61262
  }
61256
61263
  return number;
61257
61264
  }, z28.number());
61265
+ waitUntilArg = z28.enum(["none", "commit", "domcontentloaded", "load", "networkidle"]);
61266
+ navigationOptions = {
61267
+ wait: waitUntilArg.optional().describe("When navigation is considered done: none|commit|domcontentloaded|load|networkidle (default domcontentloaded)."),
61268
+ timeout: numberArg.optional().describe("Navigation timeout in milliseconds.")
61269
+ };
61258
61270
  open3 = declareCommand({
61259
61271
  name: "open",
61260
61272
  description: "Open the browser",
@@ -61267,7 +61279,8 @@ var init_commands = __esm({
61267
61279
  config: z28.string().optional().describe("Path to the configuration file, defaults to .playwright/cli.config.json"),
61268
61280
  headed: z28.boolean().optional().describe("Run browser in headed mode"),
61269
61281
  persistent: z28.boolean().optional().describe("Use persistent browser profile"),
61270
- profile: z28.string().optional().describe("Path to a persistent user data directory.")
61282
+ profile: z28.string().optional().describe("Path to a persistent user data directory."),
61283
+ ...navigationOptions
61271
61284
  }),
61272
61285
  toolName: "",
61273
61286
  toolParams: () => ({})
@@ -61312,8 +61325,11 @@ var init_commands = __esm({
61312
61325
  args: z28.object({
61313
61326
  url: z28.string().describe("The URL to navigate to")
61314
61327
  }),
61328
+ options: z28.object({
61329
+ ...navigationOptions
61330
+ }),
61315
61331
  toolName: "browser_navigate",
61316
- toolParams: ({ url: url2 }) => ({ url: url2 })
61332
+ toolParams: ({ url: url2, wait: wait2, timeout }) => ({ url: url2, waitUntil: wait2, timeout })
61317
61333
  });
61318
61334
  goBack2 = declareCommand({
61319
61335
  name: "go-back",
@@ -61475,7 +61491,7 @@ var init_commands = __esm({
61475
61491
  data: z28.union([z28.string(), z28.array(z28.string())]).optional().transform((v) => v ? Array.isArray(v) ? v : [v] : void 0).describe('Data to drop in "mime/type=value" format, e.g. --data "text/plain=hello" (repeatable)')
61476
61492
  }),
61477
61493
  toolName: "browser_drop",
61478
- toolParams: ({ target, path: path59, data }) => {
61494
+ toolParams: ({ target, path: path60, data }) => {
61479
61495
  let dataMap;
61480
61496
  if (data) {
61481
61497
  dataMap = {};
@@ -61486,7 +61502,7 @@ var init_commands = __esm({
61486
61502
  dataMap[entry.slice(0, idx)] = entry.slice(idx + 1);
61487
61503
  }
61488
61504
  }
61489
- return { target, paths: path59, data: dataMap };
61505
+ return { target, paths: path60, data: dataMap };
61490
61506
  }
61491
61507
  });
61492
61508
  fill = declareCommand({
@@ -61718,7 +61734,7 @@ var init_commands = __esm({
61718
61734
  path: z28.string().optional().describe("Filter cookies by path")
61719
61735
  }),
61720
61736
  toolName: "browser_cookie_list",
61721
- toolParams: ({ domain, path: path59 }) => ({ domain, path: path59 })
61737
+ toolParams: ({ domain, path: path60 }) => ({ domain, path: path60 })
61722
61738
  });
61723
61739
  cookieGet2 = declareCommand({
61724
61740
  name: "cookie-get",
@@ -61748,7 +61764,7 @@ var init_commands = __esm({
61748
61764
  sameSite: z28.enum(["Strict", "Lax", "None"]).optional().describe("Cookie SameSite attribute")
61749
61765
  }),
61750
61766
  toolName: "browser_cookie_set",
61751
- toolParams: ({ name, value: value2, domain, path: path59, expires, httpOnly, secure, sameSite }) => ({ name, value: value2, domain, path: path59, expires, httpOnly, secure, sameSite })
61767
+ toolParams: ({ name, value: value2, domain, path: path60, expires, httpOnly, secure, sameSite }) => ({ name, value: value2, domain, path: path60, expires, httpOnly, secure, sameSite })
61752
61768
  });
61753
61769
  cookieDelete2 = declareCommand({
61754
61770
  name: "cookie-delete",
@@ -62648,13 +62664,13 @@ async function runServer(options) {
62648
62664
  const {
62649
62665
  port,
62650
62666
  host,
62651
- path: path59 = "/",
62667
+ path: path60 = "/",
62652
62668
  maxConnections = Infinity,
62653
62669
  extension,
62654
62670
  artifactsDir,
62655
62671
  unsafe
62656
62672
  } = options;
62657
- const server = new PlaywrightServer({ mode: extension ? "extension" : "default", path: path59, maxConnections, artifactsDir, unsafe });
62673
+ const server = new PlaywrightServer({ mode: extension ? "extension" : "default", path: path60, maxConnections, artifactsDir, unsafe });
62658
62674
  const wsEndpoint = await server.listen(port, host);
62659
62675
  process.on("exit", () => server.close().catch(console.error));
62660
62676
  console.log("Listening on " + wsEndpoint);
@@ -63016,24 +63032,24 @@ async function waitForPage(page, captureOptions) {
63016
63032
  await page.waitForTimeout(parseInt(captureOptions.waitForTimeout, 10));
63017
63033
  }
63018
63034
  }
63019
- async function screenshot3(options, captureOptions, url2, path59) {
63035
+ async function screenshot3(options, captureOptions, url2, path60) {
63020
63036
  const { context: context2 } = await launchContext(options, { headless: true });
63021
63037
  console.log("Navigating to " + url2);
63022
63038
  const page = await openPage(context2, url2);
63023
63039
  await waitForPage(page, captureOptions);
63024
- console.log("Capturing screenshot into " + path59);
63025
- await page.screenshot({ path: path59, fullPage: !!captureOptions.fullPage });
63040
+ console.log("Capturing screenshot into " + path60);
63041
+ await page.screenshot({ path: path60, fullPage: !!captureOptions.fullPage });
63026
63042
  await page.close();
63027
63043
  }
63028
- async function pdf2(options, captureOptions, url2, path59) {
63044
+ async function pdf2(options, captureOptions, url2, path60) {
63029
63045
  if (options.browser !== "chromium")
63030
63046
  throw new Error("PDF creation is only working with Chromium");
63031
63047
  const { context: context2 } = await launchContext({ ...options, browser: "chromium" }, { headless: true });
63032
63048
  console.log("Navigating to " + url2);
63033
63049
  const page = await openPage(context2, url2);
63034
63050
  await waitForPage(page, captureOptions);
63035
- console.log("Saving as pdf into " + path59);
63036
- await page.pdf({ path: path59, format: captureOptions.paperFormat });
63051
+ console.log("Saving as pdf into " + path60);
63052
+ await page.pdf({ path: path60, format: captureOptions.paperFormat });
63037
63053
  await page.close();
63038
63054
  }
63039
63055
  function lookupBrowserType(options) {
@@ -63112,12 +63128,15 @@ async function isPlaywrightExtensionInstalled(userDataDir) {
63112
63128
  async function isExtensionInstalledInProfile(profileDir2) {
63113
63129
  if (await pathExists(import_path45.default.join(profileDir2, "Extensions", playwrightExtensionId)))
63114
63130
  return true;
63115
- try {
63116
- const prefs = await import_fs49.default.promises.readFile(import_path45.default.join(profileDir2, "Preferences"), "utf-8");
63117
- return prefs.includes(`"${playwrightExtensionId}"`);
63118
- } catch {
63119
- return false;
63131
+ for (const prefsFile of ["Preferences", "Secure Preferences"]) {
63132
+ try {
63133
+ const prefs = await import_fs49.default.promises.readFile(import_path45.default.join(profileDir2, prefsFile), "utf-8");
63134
+ if (prefs.includes(`"${playwrightExtensionId}"`))
63135
+ return true;
63136
+ } catch {
63137
+ }
63120
63138
  }
63139
+ return false;
63121
63140
  }
63122
63141
  async function pathExists(p) {
63123
63142
  try {
@@ -63785,11 +63804,12 @@ var init_socketConnection = __esm({
63785
63804
  });
63786
63805
 
63787
63806
  // packages/playwright-core/src/tools/cli-client/session.ts
63788
- var import_child_process4, import_fs52, import_net9, import_os22, import_path49, Session2, SocketConnectionClient;
63807
+ var import_child_process4, import_crypto25, import_fs52, import_net9, import_os22, import_path49, Session2, SocketConnectionClient;
63789
63808
  var init_session = __esm({
63790
63809
  "packages/playwright-core/src/tools/cli-client/session.ts"() {
63791
63810
  "use strict";
63792
63811
  import_child_process4 = require("child_process");
63812
+ import_crypto25 = require("crypto");
63793
63813
  import_fs52 = __toESM(require("fs"));
63794
63814
  import_net9 = __toESM(require("net"));
63795
63815
  import_os22 = __toESM(require("os"));
@@ -63880,8 +63900,8 @@ to start the browser session.`);
63880
63900
  await import_fs52.default.promises.mkdir(clientInfo.daemonProfilesDir, { recursive: true });
63881
63901
  const cliPath = libPath("entry", "cliDaemon.js");
63882
63902
  const sessionName = resolveSessionName(cliArgs.session);
63883
- const errLog = import_path49.default.join(clientInfo.daemonProfilesDir, sessionName + ".err");
63884
- const err = import_fs52.default.openSync(errLog, "w");
63903
+ const errLog = import_path49.default.join(clientInfo.daemonProfilesDir, sessionName + "-" + (0, import_crypto25.randomUUID)() + ".err");
63904
+ const err = import_fs52.default.openSync(errLog, "wx", 384);
63885
63905
  const args = [
63886
63906
  cliPath,
63887
63907
  sessionName
@@ -63911,16 +63931,13 @@ to start the browser session.`);
63911
63931
  // Will be used as root.
63912
63932
  });
63913
63933
  let signalled = false;
63914
- const sigintHandler2 = () => {
63915
- signalled = true;
63916
- child.kill("SIGINT");
63917
- };
63918
- const sigtermHandler2 = () => {
63934
+ const onSignal = () => {
63919
63935
  signalled = true;
63920
- child.kill("SIGTERM");
63936
+ child.unref();
63937
+ process.exit(0);
63921
63938
  };
63922
- process.on("SIGINT", sigintHandler2);
63923
- process.on("SIGTERM", sigtermHandler2);
63939
+ process.on("SIGINT", onSignal);
63940
+ process.on("SIGTERM", onSignal);
63924
63941
  let outLog = "";
63925
63942
  const rejectWithPid = (reject, message) => reject(Object.assign(new Error(`Daemon pid=${child.pid}: ${message}`), { daemonPid: child.pid }));
63926
63943
  await new Promise((resolve, reject) => {
@@ -63945,8 +63962,8 @@ to start the browser session.`);
63945
63962
  }
63946
63963
  });
63947
63964
  });
63948
- process.off("SIGINT", sigintHandler2);
63949
- process.off("SIGTERM", sigtermHandler2);
63965
+ process.off("SIGINT", onSignal);
63966
+ process.off("SIGTERM", onSignal);
63950
63967
  child.stdout.destroy();
63951
63968
  child.unref();
63952
63969
  return { pid: child.pid, sessionName, endpoint: cliArgs.endpoint };
@@ -64091,7 +64108,12 @@ async function program2(options) {
64091
64108
  const { pid } = await startSession(sessionName, registry2, clientInfo, args, "open");
64092
64109
  const newEntry = await registry2.loadEntry(clientInfo, sessionName);
64093
64110
  const params2 = args._.slice(1);
64094
- const toolText = await runInSessionOrStop(newEntry, clientInfo, { _: ["goto", ...params2.length ? params2 : ["about:blank"]] }, output);
64111
+ const gotoArgs = { _: ["goto", ...params2.length ? params2 : ["about:blank"]] };
64112
+ if (args.wait !== void 0)
64113
+ gotoArgs.wait = args.wait;
64114
+ if (args.timeout !== void 0)
64115
+ gotoArgs.timeout = args.timeout;
64116
+ const toolText = await runInSessionOrStop(newEntry, clientInfo, gotoArgs, output);
64095
64117
  output.open(sessionName, pid, toolText);
64096
64118
  return;
64097
64119
  }
@@ -64812,7 +64834,7 @@ async function handleStreamable(serverBackendFactory, req, res, sessions) {
64812
64834
  }
64813
64835
  if (req.method === "POST") {
64814
64836
  const transport = new StreamableHTTPServerTransport({
64815
- sessionIdGenerator: () => import_crypto25.default.randomUUID(),
64837
+ sessionIdGenerator: () => import_crypto26.default.randomUUID(),
64816
64838
  onsessioninitialized: async (sessionId2) => {
64817
64839
  testDebug3(`create http session`);
64818
64840
  await connect(serverBackendFactory, transport, true);
@@ -64831,12 +64853,12 @@ async function handleStreamable(serverBackendFactory, req, res, sessions) {
64831
64853
  res.statusCode = 400;
64832
64854
  res.end("Invalid request");
64833
64855
  }
64834
- var import_assert48, import_crypto25, debug13, SSEServerTransport, StreamableHTTPServerTransport, testDebug3;
64856
+ var import_assert48, import_crypto26, debug13, SSEServerTransport, StreamableHTTPServerTransport, testDebug3;
64835
64857
  var init_http = __esm({
64836
64858
  "packages/playwright-core/src/tools/utils/mcp/http.ts"() {
64837
64859
  "use strict";
64838
64860
  import_assert48 = __toESM(require("assert"));
64839
- import_crypto25 = __toESM(require("crypto"));
64861
+ import_crypto26 = __toESM(require("crypto"));
64840
64862
  init_httpServer();
64841
64863
  init_network();
64842
64864
  init_server2();
@@ -65623,6 +65645,41 @@ var init_config2 = __esm({
65623
65645
  }
65624
65646
  });
65625
65647
 
65648
+ // packages/playwright-core/src/tools/mcp/bridgeAttempt.ts
65649
+ var import_fs55, import_os25, import_path53, import_crypto27, phases, BridgeAttempt;
65650
+ var init_bridgeAttempt = __esm({
65651
+ "packages/playwright-core/src/tools/mcp/bridgeAttempt.ts"() {
65652
+ "use strict";
65653
+ import_fs55 = __toESM(require("fs"));
65654
+ import_os25 = __toESM(require("os"));
65655
+ import_path53 = __toESM(require("path"));
65656
+ import_crypto27 = require("crypto");
65657
+ phases = /* @__PURE__ */ new Set(["launch", "recovery-page", "ws-accepted", "initialized", "timeout", "closed", "launch-failed"]);
65658
+ BridgeAttempt = class {
65659
+ constructor(directory = process.env.PLAYWRIGHT_MCP_BRIDGE_LOG_DIR || import_path53.default.join(import_os25.default.homedir(), ".cache", "ms-playwright", "bridge")) {
65660
+ this.id = (0, import_crypto27.randomUUID)();
65661
+ this._start = Date.now();
65662
+ try {
65663
+ import_fs55.default.mkdirSync(directory, { recursive: true, mode: 448 });
65664
+ this._file = import_path53.default.join(directory, `${this._start}-${this.id}.bridge.jsonl`);
65665
+ import_fs55.default.closeSync(import_fs55.default.openSync(this._file, "wx", 384));
65666
+ } catch {
65667
+ this._file = void 0;
65668
+ }
65669
+ }
65670
+ record(phase) {
65671
+ if (!this._file || !phases.has(phase))
65672
+ return;
65673
+ const now = Date.now();
65674
+ try {
65675
+ import_fs55.default.appendFileSync(this._file, JSON.stringify({ attempt: this.id, pid: process.pid, time: new Date(now).toISOString(), elapsedMs: now - this._start, phase }) + "\n");
65676
+ } catch {
65677
+ }
65678
+ }
65679
+ };
65680
+ }
65681
+ });
65682
+
65626
65683
  // packages/playwright-core/src/tools/mcp/cdpRelayV1.ts
65627
65684
  var ExtensionProtocolV1;
65628
65685
  var init_cdpRelayV1 = __esm({
@@ -65940,20 +65997,21 @@ var init_protocol = __esm({
65940
65997
 
65941
65998
  // packages/playwright-core/src/tools/mcp/cdpRelay.ts
65942
65999
  function defaultChromeUserDataDir() {
65943
- const home = import_os25.default.homedir();
66000
+ const home = import_os26.default.homedir();
65944
66001
  if (process.platform === "darwin")
65945
- return import_path53.default.join(home, "Library", "Application Support", "Google", "Chrome");
66002
+ return import_path54.default.join(home, "Library", "Application Support", "Google", "Chrome");
65946
66003
  if (process.platform === "win32")
65947
- return import_path53.default.join(home, "AppData", "Local", "Google", "Chrome", "User Data");
65948
- return import_path53.default.join(home, ".config", "google-chrome");
66004
+ return import_path54.default.join(home, "AppData", "Local", "Google", "Chrome", "User Data");
66005
+ return import_path54.default.join(home, ".config", "google-chrome");
65949
66006
  }
65950
- var import_child_process6, import_os25, import_path53, debug15, ws2, wsServer3, debugLogger3, CDPRelayServer, ExtensionConnection;
66007
+ var import_child_process6, import_os26, import_path54, debug15, ws2, wsServer3, debugLogger3, extensionConnectionTimeout, CDPRelayServer, ExtensionConnection;
65951
66008
  var init_cdpRelay = __esm({
65952
66009
  "packages/playwright-core/src/tools/mcp/cdpRelay.ts"() {
65953
66010
  "use strict";
65954
66011
  import_child_process6 = require("child_process");
65955
- import_os25 = __toESM(require("os"));
65956
- import_path53 = __toESM(require("path"));
66012
+ init_bridgeAttempt();
66013
+ import_os26 = __toESM(require("os"));
66014
+ import_path54 = __toESM(require("path"));
65957
66015
  init_manualPromise();
65958
66016
  init_registry();
65959
66017
  init_extension();
@@ -65966,8 +66024,14 @@ var init_cdpRelay = __esm({
65966
66024
  ws2 = require("./utilsBundle").ws;
65967
66025
  ({ wsServer: wsServer3 } = require("./utilsBundle"));
65968
66026
  debugLogger3 = debug15("pw:mcp:relay");
66027
+ extensionConnectionTimeout = () => {
66028
+ const configured = Number(process.env.PWMCP_TEST_CONNECTION_TIMEOUT);
66029
+ return Number.isFinite(configured) && configured > 0 ? configured : 3e4;
66030
+ };
65969
66031
  CDPRelayServer = class {
65970
66032
  constructor(server, browserChannel, executablePath) {
66033
+ this._attempt = new BridgeAttempt();
66034
+ this._attemptExpires = 0;
65971
66035
  this._cdpConnection = null;
65972
66036
  this._extensionConnection = null;
65973
66037
  this._extensionConnectionPromise = new ManualPromise();
@@ -65999,13 +66063,40 @@ var init_cdpRelay = __esm({
65999
66063
  }
66000
66064
  async establishExtensionConnection(clientName) {
66001
66065
  debugLogger3("Establishing extension connection");
66066
+ this._attemptExpires = Date.now() + extensionConnectionTimeout();
66067
+ this._attempt.record("launch");
66002
66068
  this._openConnectPageInBrowser(clientName);
66003
66069
  debugLogger3("Waiting for incoming extension connection");
66004
- await this._extensionConnectionPromise;
66005
- await this._handler.ready();
66070
+ const timeout = extensionConnectionTimeout();
66071
+ let established = false;
66072
+ const recoveryTimer = process.env.PLAYWRIGHT_MCP_EXTENSION_TOKEN ? setTimeout(() => {
66073
+ if (!established) {
66074
+ debugLogger3("Retrying extension connection after service worker recovery");
66075
+ this._attempt.record("recovery-page");
66076
+ this._openConnectPageInBrowser(clientName, true);
66077
+ }
66078
+ }, 12e3) : void 0;
66079
+ try {
66080
+ await Promise.race([
66081
+ (async () => {
66082
+ await this._extensionConnectionPromise;
66083
+ await this._handler.ready();
66084
+ })(),
66085
+ new Promise((_, reject) => setTimeout(() => reject(new Error(
66086
+ `Extension connection timeout after ${timeout}ms. Automatic recovery retry failed; reload the Playwright MCP Bridge extension at chrome://extensions and retry.`
66087
+ )), timeout))
66088
+ ]);
66089
+ established = true;
66090
+ this._attempt.record("initialized");
66091
+ } catch (error) {
66092
+ this._attempt.record("timeout");
66093
+ throw error;
66094
+ } finally {
66095
+ clearTimeout(recoveryTimer);
66096
+ }
66006
66097
  debugLogger3("Extension connection established");
66007
66098
  }
66008
- _openConnectPageInBrowser(clientName) {
66099
+ _openConnectPageInBrowser(clientName, recoveryAttempt = false) {
66009
66100
  const mcpRelayEndpoint = `${this._wsHost}${this._extensionPath}`;
66010
66101
  const url2 = new URL(`chrome-extension://${playwrightExtensionId}/connect.html`);
66011
66102
  url2.searchParams.set("mcpRelayUrl", mcpRelayEndpoint);
@@ -66019,12 +66110,19 @@ var init_cdpRelay = __esm({
66019
66110
  };
66020
66111
  url2.searchParams.set("client", JSON.stringify(client));
66021
66112
  url2.searchParams.set("protocolVersion", this._protocolVersion.toString());
66113
+ url2.searchParams.set("attempt", this._attempt.id);
66114
+ url2.searchParams.set("expires", String(this._attemptExpires));
66115
+ if (recoveryAttempt)
66116
+ url2.searchParams.set("recoveryAttempt", "1");
66117
+ if (!recoveryAttempt && process.env.PWMCP_TEST_EXTENSION_HANG_ONCE)
66118
+ url2.searchParams.set("testHangOnce", "1");
66022
66119
  const token = process.env.PLAYWRIGHT_MCP_EXTENSION_TOKEN;
66023
66120
  if (token)
66024
66121
  url2.searchParams.set("token", token);
66025
66122
  const href = url2.toString();
66026
- const channel = registry.isChromiumAlias(this._browserChannel) ? "chromium" : this._browserChannel;
66027
- let executablePath = this._executablePath;
66123
+ const loadExtension = process.env.PLAYWRIGHT_MCP_LOAD_EXTENSION;
66124
+ const channel = loadExtension || registry.isChromiumAlias(this._browserChannel) ? "chromium" : this._browserChannel;
66125
+ let executablePath = loadExtension ? void 0 : this._executablePath;
66028
66126
  if (!executablePath) {
66029
66127
  const executableInfo = registry.findExecutable(channel);
66030
66128
  if (!executableInfo)
@@ -66040,15 +66138,19 @@ var init_cdpRelay = __esm({
66040
66138
  args.push(`--user-data-dir=${userDataDir}`);
66041
66139
  if (profileDirectory)
66042
66140
  args.push(`--profile-directory=${profileDirectory}`);
66043
- if (import_os25.default.platform() === "linux" && channel === "chromium")
66141
+ if (loadExtension) {
66142
+ args.push(`--load-extension=${loadExtension}`, "--disable-features=DisableLoadExtensionCommandLineSwitch");
66143
+ }
66144
+ if (import_os26.default.platform() === "linux" && channel === "chromium")
66044
66145
  args.push("--no-sandbox");
66045
66146
  args.push(href);
66046
- (0, import_child_process6.spawn)(executablePath, args, {
66147
+ const launcher = (0, import_child_process6.spawn)(executablePath, args, {
66047
66148
  windowsHide: true,
66048
66149
  detached: true,
66049
66150
  shell: false,
66050
66151
  stdio: "ignore"
66051
66152
  });
66153
+ launcher.on("error", () => this._attempt.record("launch-failed"));
66052
66154
  }
66053
66155
  stop() {
66054
66156
  this._closeConnections("Server stopped");
@@ -66115,9 +66217,11 @@ ${data.toString()}
66115
66217
  ws3.close(1e3, "Another extension connection already established");
66116
66218
  return;
66117
66219
  }
66220
+ this._attempt.record("ws-accepted");
66118
66221
  this._extensionConnection = new ExtensionConnection(ws3);
66119
66222
  this._extensionConnection.onclose = (reason) => {
66120
66223
  debugLogger3("Extension WebSocket closed:", reason);
66224
+ this._attempt.record("closed");
66121
66225
  this._handler.onExtensionDisconnect(reason);
66122
66226
  this._closeCDPConnection(`Extension disconnected: ${reason}`);
66123
66227
  };
@@ -66405,15 +66509,15 @@ async function createUserDataDir(config, clientInfo) {
66405
66509
  const dir = process.env.PWMCP_PROFILES_DIR_FOR_TEST ?? registryDirectory;
66406
66510
  const browserToken = config.browser.launchOptions?.channel ?? config.browser?.browserName;
66407
66511
  const rootPathToken = createHash(clientInfo.cwd);
66408
- const result2 = import_path54.default.join(dir, `mcp-${browserToken}-${rootPathToken}`);
66409
- await import_fs55.default.promises.mkdir(result2, { recursive: true });
66512
+ const result2 = import_path55.default.join(dir, `mcp-${browserToken}-${rootPathToken}`);
66513
+ await import_fs56.default.promises.mkdir(result2, { recursive: true });
66410
66514
  return result2;
66411
66515
  }
66412
66516
  function createHash(data) {
66413
- return import_crypto26.default.createHash("sha256").update(data).digest("hex").slice(0, 7);
66517
+ return import_crypto28.default.createHash("sha256").update(data).digest("hex").slice(0, 7);
66414
66518
  }
66415
66519
  async function computeTracesDir(config, clientInfo) {
66416
- return import_path54.default.resolve(outputDir({ config, cwd: clientInfo.cwd }), "traces");
66520
+ return import_path55.default.resolve(outputDir({ config, cwd: clientInfo.cwd }), "traces");
66417
66521
  }
66418
66522
  async function isProfileLocked5Times(userDataDir) {
66419
66523
  for (let i = 0; i < 5; i++) {
@@ -66425,18 +66529,18 @@ async function isProfileLocked5Times(userDataDir) {
66425
66529
  }
66426
66530
  function isProfileLocked(userDataDir) {
66427
66531
  const lockFile = process.platform === "win32" ? "lockfile" : "SingletonLock";
66428
- const lockPath = import_path54.default.join(userDataDir, lockFile);
66532
+ const lockPath = import_path55.default.join(userDataDir, lockFile);
66429
66533
  if (process.platform === "win32") {
66430
66534
  try {
66431
- const fd = import_fs55.default.openSync(lockPath, "r+");
66432
- import_fs55.default.closeSync(fd);
66535
+ const fd = import_fs56.default.openSync(lockPath, "r+");
66536
+ import_fs56.default.closeSync(fd);
66433
66537
  return false;
66434
66538
  } catch (e) {
66435
66539
  return e.code !== "ENOENT";
66436
66540
  }
66437
66541
  }
66438
66542
  try {
66439
- const target = import_fs55.default.readlinkSync(lockPath);
66543
+ const target = import_fs56.default.readlinkSync(lockPath);
66440
66544
  const pid = parseInt(target.split("-").pop() || "", 10);
66441
66545
  if (isNaN(pid))
66442
66546
  return false;
@@ -66453,13 +66557,13 @@ function throwBrowserIsNotInstalledError(config) {
66453
66557
  else
66454
66558
  throw new Error(`Browser "${channel}" is not installed. Run \`npx @playwright/mcp install-browser ${channel}\` to install`);
66455
66559
  }
66456
- var import_crypto26, import_fs55, import_path54;
66560
+ var import_crypto28, import_fs56, import_path55;
66457
66561
  var init_browserFactory = __esm({
66458
66562
  "packages/playwright-core/src/tools/mcp/browserFactory.ts"() {
66459
66563
  "use strict";
66460
- import_crypto26 = __toESM(require("crypto"));
66461
- import_fs55 = __toESM(require("fs"));
66462
- import_path54 = __toESM(require("path"));
66564
+ import_crypto28 = __toESM(require("crypto"));
66565
+ import_fs56 = __toESM(require("fs"));
66566
+ import_path55 = __toESM(require("path"));
66463
66567
  init_inprocess();
66464
66568
  init_registry();
66465
66569
  init_log();
@@ -66722,7 +66826,7 @@ var init_helpGenerator = __esm({
66722
66826
  // packages/playwright-core/src/tools/cli-daemon/daemon.ts
66723
66827
  async function socketExists(socketPath) {
66724
66828
  try {
66725
- const stat = await import_fs56.default.promises.stat(socketPath);
66829
+ const stat = await import_fs57.default.promises.stat(socketPath);
66726
66830
  if (stat?.isSocket())
66727
66831
  return true;
66728
66832
  } catch (e) {
@@ -66734,7 +66838,7 @@ async function startCliDaemonServer(sessionName, browserContext, browserInfo2, c
66734
66838
  const { socketPath } = sessionConfig;
66735
66839
  if (process.platform !== "win32" && await socketExists(socketPath)) {
66736
66840
  try {
66737
- await import_fs56.default.promises.unlink(socketPath);
66841
+ await import_fs57.default.promises.unlink(socketPath);
66738
66842
  } catch (error) {
66739
66843
  throw error;
66740
66844
  }
@@ -66787,16 +66891,16 @@ async function startCliDaemonServer(sessionName, browserContext, browserInfo2, c
66787
66891
  return socketPath;
66788
66892
  }
66789
66893
  async function saveSessionFile(clientInfo, sessionConfig) {
66790
- await import_fs56.default.promises.mkdir(clientInfo.daemonProfilesDir, { recursive: true });
66791
- const sessionFile = import_path55.default.join(clientInfo.daemonProfilesDir, `${sessionConfig.name}.session`);
66792
- await import_fs56.default.promises.writeFile(sessionFile, JSON.stringify(sessionConfig, null, 2));
66894
+ await import_fs57.default.promises.mkdir(clientInfo.daemonProfilesDir, { recursive: true });
66895
+ const sessionFile = import_path56.default.join(clientInfo.daemonProfilesDir, `${sessionConfig.name}.session`);
66896
+ await import_fs57.default.promises.writeFile(sessionFile, JSON.stringify(sessionConfig, null, 2));
66793
66897
  }
66794
66898
  async function deleteSessionFile(clientInfo, sessionConfig) {
66795
- await import_fs56.default.promises.unlink(sessionConfig.socketPath).catch(() => {
66899
+ await import_fs57.default.promises.unlink(sessionConfig.socketPath).catch(() => {
66796
66900
  });
66797
66901
  if (!sessionConfig.cli.persistent) {
66798
- const sessionFile = import_path55.default.join(clientInfo.daemonProfilesDir, `${sessionConfig.name}.session`);
66799
- await import_fs56.default.promises.rm(sessionFile).catch(() => {
66902
+ const sessionFile = import_path56.default.join(clientInfo.daemonProfilesDir, `${sessionConfig.name}.session`);
66903
+ await import_fs57.default.promises.rm(sessionFile).catch(() => {
66800
66904
  });
66801
66905
  }
66802
66906
  }
@@ -66830,13 +66934,13 @@ function createSessionConfig(clientInfo, sessionName, browserInfo2, options = {}
66830
66934
  }
66831
66935
  };
66832
66936
  }
66833
- var import_fs56, import_net10, import_path55;
66937
+ var import_fs57, import_net10, import_path56;
66834
66938
  var init_daemon = __esm({
66835
66939
  "packages/playwright-core/src/tools/cli-daemon/daemon.ts"() {
66836
66940
  "use strict";
66837
- import_fs56 = __toESM(require("fs"));
66941
+ import_fs57 = __toESM(require("fs"));
66838
66942
  import_net10 = __toESM(require("net"));
66839
- import_path55 = __toESM(require("path"));
66943
+ import_path56 = __toESM(require("path"));
66840
66944
  init_network();
66841
66945
  init_fileUtils();
66842
66946
  init_processLauncher();
@@ -66884,33 +66988,33 @@ ${message}`);
66884
66988
  });
66885
66989
  }
66886
66990
  function defaultConfigFile() {
66887
- return import_path56.default.resolve(".playwright", "cli.config.json");
66991
+ return import_path57.default.resolve(".playwright", "cli.config.json");
66888
66992
  }
66889
66993
  function globalConfigFile() {
66890
- return import_path56.default.join(process.env["PWTEST_CLI_GLOBAL_CONFIG"] ?? import_os26.default.homedir(), ".playwright", "cli.config.json");
66994
+ return import_path57.default.join(process.env["PWTEST_CLI_GLOBAL_CONFIG"] ?? import_os27.default.homedir(), ".playwright", "cli.config.json");
66891
66995
  }
66892
66996
  async function initWorkspace(initSkills) {
66893
66997
  const cwd = process.cwd();
66894
- const playwrightDir = import_path56.default.join(cwd, ".playwright");
66895
- await import_fs57.default.promises.mkdir(playwrightDir, { recursive: true });
66998
+ const playwrightDir = import_path57.default.join(cwd, ".playwright");
66999
+ await import_fs58.default.promises.mkdir(playwrightDir, { recursive: true });
66896
67000
  console.log(`\u2705 Workspace initialized at \`${cwd}\`.`);
66897
67001
  if (initSkills) {
66898
67002
  const skillSourceDir = libPath("tools", "cli-client", "skill");
66899
67003
  const target = initSkills === "agents" ? "agents" : "claude";
66900
- const skillDestDir = import_path56.default.join(cwd, `.${target}`, "skills", "playwright-cli");
66901
- if (!import_fs57.default.existsSync(skillSourceDir)) {
67004
+ const skillDestDir = import_path57.default.join(cwd, `.${target}`, "skills", "playwright-cli");
67005
+ if (!import_fs58.default.existsSync(skillSourceDir)) {
66902
67006
  console.error("\u274C Skills source directory not found:", skillSourceDir);
66903
67007
  process.exit(1);
66904
67008
  }
66905
- await import_fs57.default.promises.cp(skillSourceDir, skillDestDir, { recursive: true });
66906
- console.log(`\u2705 Skills installed to \`${import_path56.default.relative(cwd, skillDestDir)}\`.`);
67009
+ await import_fs58.default.promises.cp(skillSourceDir, skillDestDir, { recursive: true });
67010
+ console.log(`\u2705 Skills installed to \`${import_path57.default.relative(cwd, skillDestDir)}\`.`);
66907
67011
  }
66908
67012
  await ensureConfiguredBrowserInstalled();
66909
67013
  }
66910
67014
  async function ensureConfiguredBrowserInstalled() {
66911
67015
  if (getAsBooleanFromENV("PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD"))
66912
67016
  return;
66913
- if (import_fs57.default.existsSync(defaultConfigFile()) || import_fs57.default.existsSync(globalConfigFile())) {
67017
+ if (import_fs58.default.existsSync(defaultConfigFile()) || import_fs58.default.existsSync(globalConfigFile())) {
66914
67018
  const clientInfo = createClientInfo();
66915
67019
  const config = await resolveCLIConfigForCLI(clientInfo.daemonProfilesDir, "default", {});
66916
67020
  const browserName = config.browser.browserName;
@@ -66947,16 +67051,16 @@ async function createDefaultConfig(channel) {
66947
67051
  launchOptions: { channel }
66948
67052
  }
66949
67053
  };
66950
- await import_fs57.default.promises.writeFile(defaultConfigFile(), JSON.stringify(config, null, 2));
66951
- console.log(`\u2705 Created default config for ${channel} at ${import_path56.default.relative(process.cwd(), defaultConfigFile())}.`);
67054
+ await import_fs58.default.promises.writeFile(defaultConfigFile(), JSON.stringify(config, null, 2));
67055
+ console.log(`\u2705 Created default config for ${channel} at ${import_path57.default.relative(process.cwd(), defaultConfigFile())}.`);
66952
67056
  }
66953
- var import_fs57, import_os26, import_path56;
67057
+ var import_fs58, import_os27, import_path57;
66954
67058
  var init_program4 = __esm({
66955
67059
  "packages/playwright-core/src/tools/cli-daemon/program.ts"() {
66956
67060
  "use strict";
66957
- import_fs57 = __toESM(require("fs"));
66958
- import_os26 = __toESM(require("os"));
66959
- import_path56 = __toESM(require("path"));
67061
+ import_fs58 = __toESM(require("fs"));
67062
+ import_os27 = __toESM(require("os"));
67063
+ import_path57 = __toESM(require("path"));
66960
67064
  init_env();
66961
67065
  init_processLauncher();
66962
67066
  init_package();
@@ -67011,14 +67115,14 @@ async function faviconUrl(page) {
67011
67115
  const timeout = new Promise((resolve) => setTimeout(() => resolve(void 0), 3e3));
67012
67116
  return await Promise.race([url2, timeout]);
67013
67117
  }
67014
- var import_path57, import_os27, import_fs58, import_crypto27, import_child_process7, DashboardConnection, AttachedPage;
67118
+ var import_path58, import_os28, import_fs59, import_crypto29, import_child_process7, DashboardConnection, AttachedPage;
67015
67119
  var init_dashboardController = __esm({
67016
67120
  "packages/playwright-core/src/tools/dashboard/dashboardController.ts"() {
67017
67121
  "use strict";
67018
- import_path57 = __toESM(require("path"));
67019
- import_os27 = __toESM(require("os"));
67020
- import_fs58 = __toESM(require("fs"));
67021
- import_crypto27 = __toESM(require("crypto"));
67122
+ import_path58 = __toESM(require("path"));
67123
+ import_os28 = __toESM(require("os"));
67124
+ import_fs59 = __toESM(require("fs"));
67125
+ import_crypto29 = __toESM(require("crypto"));
67022
67126
  import_child_process7 = require("child_process");
67023
67127
  init_eventsHelper();
67024
67128
  init_registry2();
@@ -67033,7 +67137,7 @@ var init_dashboardController = __esm({
67033
67137
  this._onclose = onclose;
67034
67138
  this._onconnected = onconnected;
67035
67139
  this._onAnnotationSubmit = onAnnotationSubmit;
67036
- this._recordingDir = import_fs58.default.mkdtempSync(import_path57.default.join(import_os27.default.tmpdir(), "playwright-recordings-"));
67140
+ this._recordingDir = import_fs59.default.mkdtempSync(import_path58.default.join(import_os28.default.tmpdir(), "playwright-recordings-"));
67037
67141
  }
67038
67142
  onconnect() {
67039
67143
  this._provider.on(SessionProviderEvent.SessionsChanged, () => {
@@ -67059,7 +67163,7 @@ var init_dashboardController = __esm({
67059
67163
  this._attachedPage = void 0;
67060
67164
  for (const stream3 of this._streams.values()) {
67061
67165
  void stream3.handle.close().catch(() => {
67062
- }).then(() => import_fs58.default.promises.unlink(stream3.path)).catch(() => {
67166
+ }).then(() => import_fs59.default.promises.unlink(stream3.path)).catch(() => {
67063
67167
  });
67064
67168
  }
67065
67169
  this._streams.clear();
@@ -67135,7 +67239,7 @@ var init_dashboardController = __esm({
67135
67239
  this._onAnnotationSubmit?.([], "");
67136
67240
  }
67137
67241
  async reveal(params2) {
67138
- switch (import_os27.default.platform()) {
67242
+ switch (import_os28.default.platform()) {
67139
67243
  case "darwin":
67140
67244
  (0, import_child_process7.execFile)("open", ["-R", params2.path]);
67141
67245
  break;
@@ -67143,7 +67247,7 @@ var init_dashboardController = __esm({
67143
67247
  (0, import_child_process7.execFile)("explorer", ["/select,", params2.path]);
67144
67248
  break;
67145
67249
  case "linux":
67146
- (0, import_child_process7.execFile)("xdg-open", [import_path57.default.dirname(params2.path)]);
67250
+ (0, import_child_process7.execFile)("xdg-open", [import_path58.default.dirname(params2.path)]);
67147
67251
  break;
67148
67252
  }
67149
67253
  }
@@ -67157,7 +67261,7 @@ var init_dashboardController = __esm({
67157
67261
  this._streams.delete(params2.streamId);
67158
67262
  await stream3.handle.close().catch(() => {
67159
67263
  });
67160
- await import_fs58.default.promises.unlink(stream3.path).catch(() => {
67264
+ await import_fs59.default.promises.unlink(stream3.path).catch(() => {
67161
67265
  });
67162
67266
  return { data: "", eof: true };
67163
67267
  }
@@ -67345,7 +67449,7 @@ var init_dashboardController = __esm({
67345
67449
  }
67346
67450
  async startRecording() {
67347
67451
  const artifactsDir = this._owner.artifactsDirFor(this._page.context());
67348
- this._recordingPath = import_path57.default.join(artifactsDir, `recording-${Date.now()}.webm`);
67452
+ this._recordingPath = import_path58.default.join(artifactsDir, `recording-${Date.now()}.webm`);
67349
67453
  if (this._screencastRunning)
67350
67454
  await this._restartScreencast(this._page);
67351
67455
  }
@@ -67356,8 +67460,8 @@ var init_dashboardController = __esm({
67356
67460
  this._recordingPath = null;
67357
67461
  if (this._screencastRunning)
67358
67462
  await this._restartScreencast(this._page);
67359
- const handle = await import_fs58.default.promises.open(p, "r");
67360
- const streamId = import_crypto27.default.randomUUID();
67463
+ const handle = await import_fs59.default.promises.open(p, "r");
67464
+ const streamId = import_crypto29.default.randomUUID();
67361
67465
  this._owner._streams.set(streamId, { handle, path: p });
67362
67466
  return { streamId };
67363
67467
  }
@@ -67764,7 +67868,7 @@ function attachDashboardStaticServer(httpServer, dashboardDir) {
67764
67868
  httpServer.routePrefix("/", (request2, response2) => {
67765
67869
  const pathname = new URL(request2.url, `http://${request2.headers.host}`).pathname;
67766
67870
  const filePath = pathname === "/" ? "index.html" : pathname.substring(1);
67767
- const resolved = import_path58.default.join(dashboardDir, filePath);
67871
+ const resolved = import_path59.default.join(dashboardDir, filePath);
67768
67872
  if (!resolved.startsWith(dashboardDir))
67769
67873
  return false;
67770
67874
  return httpServer.serveFile(request2, response2, resolved);
@@ -67802,18 +67906,18 @@ async function launchApp2(appName, options) {
67802
67906
  });
67803
67907
  }
67804
67908
  page.on("close", () => options?.onClose?.());
67805
- const image = await import_fs59.default.promises.readFile(libPath("tools", "dashboard", "appIcon.png"));
67909
+ const image = await import_fs60.default.promises.readFile(libPath("tools", "dashboard", "appIcon.png"));
67806
67910
  await page._setDockTile?.(image);
67807
67911
  await syncLocalStorageWithSettings2(page, appName);
67808
67912
  return { context: context2, page };
67809
67913
  }
67810
67914
  async function syncLocalStorageWithSettings2(page, appName) {
67811
- const settingsFile = process.env.PWTEST_DASHBOARD_SETTINGS_FILE ?? import_path58.default.join(registryDirectory, ".settings", `${appName}.json`);
67915
+ const settingsFile = process.env.PWTEST_DASHBOARD_SETTINGS_FILE ?? import_path59.default.join(registryDirectory, ".settings", `${appName}.json`);
67812
67916
  await page.exposeBinding("_saveSerializedSettings", (_, settings2) => {
67813
- import_fs59.default.mkdirSync(import_path58.default.dirname(settingsFile), { recursive: true });
67814
- import_fs59.default.writeFileSync(settingsFile, settings2);
67917
+ import_fs60.default.mkdirSync(import_path59.default.dirname(settingsFile), { recursive: true });
67918
+ import_fs60.default.writeFileSync(settingsFile, settings2);
67815
67919
  });
67816
- const settings = await import_fs59.default.promises.readFile(settingsFile, "utf-8").catch(() => "{}");
67920
+ const settings = await import_fs60.default.promises.readFile(settingsFile, "utf-8").catch(() => "{}");
67817
67921
  await page.addInitScript(
67818
67922
  `(${String((settings2) => {
67819
67923
  if (location && location.protocol === "data:")
@@ -67847,7 +67951,7 @@ function parseOpenArgs() {
67847
67951
  async function acquireSingleton(options) {
67848
67952
  const socketPath = dashboardSocketPath();
67849
67953
  if (process.platform !== "win32")
67850
- await import_fs59.default.promises.mkdir(import_path58.default.dirname(socketPath), { recursive: true });
67954
+ await import_fs60.default.promises.mkdir(import_path59.default.dirname(socketPath), { recursive: true });
67851
67955
  return await new Promise((resolve, reject) => {
67852
67956
  const server = import_net11.default.createServer();
67853
67957
  server.listen(socketPath, () => resolve(server));
@@ -67860,7 +67964,7 @@ async function acquireSingleton(options) {
67860
67964
  });
67861
67965
  client.on("error", () => {
67862
67966
  if (process.platform !== "win32")
67863
- import_fs59.default.unlinkSync(socketPath);
67967
+ import_fs60.default.unlinkSync(socketPath);
67864
67968
  server.listen(socketPath, () => resolve(server));
67865
67969
  });
67866
67970
  });
@@ -68034,12 +68138,12 @@ function selfDestructOnParentGone() {
68034
68138
  gracefullyProcessExitDoNotHang(0);
68035
68139
  });
68036
68140
  }
68037
- var import_fs59, import_path58, import_net11;
68141
+ var import_fs60, import_path59, import_net11;
68038
68142
  var init_dashboardApp = __esm({
68039
68143
  "packages/playwright-core/src/tools/dashboard/dashboardApp.ts"() {
68040
68144
  "use strict";
68041
- import_fs59 = __toESM(require("fs"));
68042
- import_path58 = __toESM(require("path"));
68145
+ import_fs60 = __toESM(require("fs"));
68146
+ import_path59 = __toESM(require("path"));
68043
68147
  import_net11 = __toESM(require("net"));
68044
68148
  init_httpServer();
68045
68149
  init_fileUtils();