rechrome 1.35.0 → 1.36.0

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 +74 -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 +64 -16
  8. package/rechrome.ts +64 -16
  9. package/scoped-upload.js +165 -0
  10. package/scoped-upload.ts +140 -0
  11. package/serve.js +30 -2
  12. package/serve.ts +30 -2
  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
@@ -1,750 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var network_exports = {};
20
- __export(network_exports, {
21
- RawHeaders: () => RawHeaders,
22
- Request: () => Request,
23
- Response: () => Response,
24
- Route: () => Route,
25
- RouteHandler: () => RouteHandler,
26
- WebSocket: () => WebSocket,
27
- WebSocketRoute: () => WebSocketRoute,
28
- WebSocketRouteHandler: () => WebSocketRouteHandler,
29
- validateHeaders: () => validateHeaders
30
- });
31
- module.exports = __toCommonJS(network_exports);
32
- var import_channelOwner = require("./channelOwner");
33
- var import_errors = require("./errors");
34
- var import_events = require("./events");
35
- var import_fetch = require("./fetch");
36
- var import_frame = require("./frame");
37
- var import_waiter = require("./waiter");
38
- var import_worker = require("./worker");
39
- var import_assert = require("../utils/isomorphic/assert");
40
- var import_headers = require("../utils/isomorphic/headers");
41
- var import_urlMatch = require("../utils/isomorphic/urlMatch");
42
- var import_manualPromise = require("../utils/isomorphic/manualPromise");
43
- var import_multimap = require("../utils/isomorphic/multimap");
44
- var import_rtti = require("../utils/isomorphic/rtti");
45
- var import_stackTrace = require("../utils/isomorphic/stackTrace");
46
- var import_mimeType = require("../utils/isomorphic/mimeType");
47
- class Request extends import_channelOwner.ChannelOwner {
48
- constructor(parent, type, guid, initializer) {
49
- super(parent, type, guid, initializer);
50
- this._redirectedFrom = null;
51
- this._redirectedTo = null;
52
- this._failureText = null;
53
- this._response = null;
54
- this._fallbackOverrides = {};
55
- this._redirectedFrom = Request.fromNullable(initializer.redirectedFrom);
56
- if (this._redirectedFrom)
57
- this._redirectedFrom._redirectedTo = this;
58
- this._provisionalHeaders = new RawHeaders(initializer.headers);
59
- this._timing = {
60
- startTime: 0,
61
- domainLookupStart: -1,
62
- domainLookupEnd: -1,
63
- connectStart: -1,
64
- secureConnectionStart: -1,
65
- connectEnd: -1,
66
- requestStart: -1,
67
- responseStart: -1,
68
- responseEnd: -1
69
- };
70
- }
71
- static from(request) {
72
- return request._object;
73
- }
74
- static fromNullable(request) {
75
- return request ? Request.from(request) : null;
76
- }
77
- url() {
78
- return this._fallbackOverrides.url || this._initializer.url;
79
- }
80
- resourceType() {
81
- return this._initializer.resourceType;
82
- }
83
- method() {
84
- return this._fallbackOverrides.method || this._initializer.method;
85
- }
86
- postData() {
87
- return (this._fallbackOverrides.postDataBuffer || this._initializer.postData)?.toString("utf-8") || null;
88
- }
89
- postDataBuffer() {
90
- return this._fallbackOverrides.postDataBuffer || this._initializer.postData || null;
91
- }
92
- postDataJSON() {
93
- const postData = this.postData();
94
- if (!postData)
95
- return null;
96
- const contentType = this.headers()["content-type"];
97
- if (contentType?.includes("application/x-www-form-urlencoded")) {
98
- const entries = {};
99
- const parsed = new URLSearchParams(postData);
100
- for (const [k, v] of parsed.entries())
101
- entries[k] = v;
102
- return entries;
103
- }
104
- try {
105
- return JSON.parse(postData);
106
- } catch (e) {
107
- throw new Error("POST data is not a valid JSON object: " + postData);
108
- }
109
- }
110
- /**
111
- * @deprecated
112
- */
113
- headers() {
114
- if (this._fallbackOverrides.headers)
115
- return RawHeaders._fromHeadersObjectLossy(this._fallbackOverrides.headers).headers();
116
- return this._provisionalHeaders.headers();
117
- }
118
- async _actualHeaders() {
119
- if (this._fallbackOverrides.headers)
120
- return RawHeaders._fromHeadersObjectLossy(this._fallbackOverrides.headers);
121
- if (!this._actualHeadersPromise) {
122
- this._actualHeadersPromise = this._wrapApiCall(async () => {
123
- return new RawHeaders((await this._channel.rawRequestHeaders()).headers);
124
- }, { internal: true });
125
- }
126
- return await this._actualHeadersPromise;
127
- }
128
- async allHeaders() {
129
- return (await this._actualHeaders()).headers();
130
- }
131
- async headersArray() {
132
- return (await this._actualHeaders()).headersArray();
133
- }
134
- async headerValue(name) {
135
- return (await this._actualHeaders()).get(name);
136
- }
137
- async response() {
138
- return Response.fromNullable((await this._channel.response()).response);
139
- }
140
- async _internalResponse() {
141
- return Response.fromNullable((await this._channel.response()).response);
142
- }
143
- existingResponse() {
144
- return this._response;
145
- }
146
- frame() {
147
- if (!this._initializer.frame) {
148
- (0, import_assert.assert)(this.serviceWorker());
149
- throw new Error("Service Worker requests do not have an associated frame.");
150
- }
151
- const frame = import_frame.Frame.from(this._initializer.frame);
152
- if (!frame._page) {
153
- throw new Error([
154
- "Frame for this navigation request is not available, because the request",
155
- "was issued before the frame is created. You can check whether the request",
156
- "is a navigation request by calling isNavigationRequest() method."
157
- ].join("\n"));
158
- }
159
- return frame;
160
- }
161
- _safePage() {
162
- return import_frame.Frame.fromNullable(this._initializer.frame)?._page || null;
163
- }
164
- serviceWorker() {
165
- return this._initializer.serviceWorker ? import_worker.Worker.from(this._initializer.serviceWorker) : null;
166
- }
167
- isNavigationRequest() {
168
- return this._initializer.isNavigationRequest;
169
- }
170
- redirectedFrom() {
171
- return this._redirectedFrom;
172
- }
173
- redirectedTo() {
174
- return this._redirectedTo;
175
- }
176
- failure() {
177
- if (this._failureText === null)
178
- return null;
179
- return {
180
- errorText: this._failureText
181
- };
182
- }
183
- timing() {
184
- return this._timing;
185
- }
186
- async sizes() {
187
- const response = await this.response();
188
- if (!response)
189
- throw new Error("Unable to fetch sizes for failed request");
190
- return (await response._channel.sizes()).sizes;
191
- }
192
- _setResponseEndTiming(responseEndTiming) {
193
- this._timing.responseEnd = responseEndTiming;
194
- if (this._timing.responseStart === -1)
195
- this._timing.responseStart = responseEndTiming;
196
- }
197
- _finalRequest() {
198
- return this._redirectedTo ? this._redirectedTo._finalRequest() : this;
199
- }
200
- _applyFallbackOverrides(overrides) {
201
- if (overrides.url)
202
- this._fallbackOverrides.url = overrides.url;
203
- if (overrides.method)
204
- this._fallbackOverrides.method = overrides.method;
205
- if (overrides.headers)
206
- this._fallbackOverrides.headers = overrides.headers;
207
- if ((0, import_rtti.isString)(overrides.postData))
208
- this._fallbackOverrides.postDataBuffer = Buffer.from(overrides.postData, "utf-8");
209
- else if (overrides.postData instanceof Buffer)
210
- this._fallbackOverrides.postDataBuffer = overrides.postData;
211
- else if (overrides.postData)
212
- this._fallbackOverrides.postDataBuffer = Buffer.from(JSON.stringify(overrides.postData), "utf-8");
213
- }
214
- _fallbackOverridesForContinue() {
215
- return this._fallbackOverrides;
216
- }
217
- _targetClosedScope() {
218
- return this.serviceWorker()?._closedScope || this._safePage()?._closedOrCrashedScope || new import_manualPromise.LongStandingScope();
219
- }
220
- }
221
- class Route extends import_channelOwner.ChannelOwner {
222
- constructor(parent, type, guid, initializer) {
223
- super(parent, type, guid, initializer);
224
- this._handlingPromise = null;
225
- this._didThrow = false;
226
- }
227
- static from(route) {
228
- return route._object;
229
- }
230
- request() {
231
- return Request.from(this._initializer.request);
232
- }
233
- async _raceWithTargetClose(promise) {
234
- return await this.request()._targetClosedScope().safeRace(promise);
235
- }
236
- async _startHandling() {
237
- this._handlingPromise = new import_manualPromise.ManualPromise();
238
- return await this._handlingPromise;
239
- }
240
- async fallback(options = {}) {
241
- this._checkNotHandled();
242
- this.request()._applyFallbackOverrides(options);
243
- this._reportHandled(false);
244
- }
245
- async abort(errorCode) {
246
- await this._handleRoute(async () => {
247
- await this._raceWithTargetClose(this._channel.abort({ errorCode }));
248
- });
249
- }
250
- async _redirectNavigationRequest(url) {
251
- await this._handleRoute(async () => {
252
- await this._raceWithTargetClose(this._channel.redirectNavigationRequest({ url }));
253
- });
254
- }
255
- async fetch(options = {}) {
256
- return await this._wrapApiCall(async () => {
257
- return await this._context.request._innerFetch({ request: this.request(), data: options.postData, ...options });
258
- });
259
- }
260
- async fulfill(options = {}) {
261
- await this._handleRoute(async () => {
262
- await this._innerFulfill(options);
263
- });
264
- }
265
- async _handleRoute(callback) {
266
- this._checkNotHandled();
267
- try {
268
- await callback();
269
- this._reportHandled(true);
270
- } catch (e) {
271
- this._didThrow = true;
272
- throw e;
273
- }
274
- }
275
- async _innerFulfill(options = {}) {
276
- let fetchResponseUid;
277
- let { status: statusOption, headers: headersOption, body } = options;
278
- if (options.json !== void 0) {
279
- (0, import_assert.assert)(options.body === void 0, "Can specify either body or json parameters");
280
- body = JSON.stringify(options.json);
281
- }
282
- if (options.response instanceof import_fetch.APIResponse) {
283
- statusOption ??= options.response.status();
284
- headersOption ??= options.response.headers();
285
- if (body === void 0 && options.path === void 0) {
286
- if (options.response._request._connection === this._connection)
287
- fetchResponseUid = options.response._fetchUid();
288
- else
289
- body = await options.response.body();
290
- }
291
- }
292
- let isBase64 = false;
293
- let length = 0;
294
- if (options.path) {
295
- const buffer = await this._platform.fs().promises.readFile(options.path);
296
- body = buffer.toString("base64");
297
- isBase64 = true;
298
- length = buffer.length;
299
- } else if ((0, import_rtti.isString)(body)) {
300
- isBase64 = false;
301
- length = Buffer.byteLength(body);
302
- } else if (body) {
303
- length = body.length;
304
- body = body.toString("base64");
305
- isBase64 = true;
306
- }
307
- const headers = {};
308
- for (const header of Object.keys(headersOption || {}))
309
- headers[header.toLowerCase()] = String(headersOption[header]);
310
- if (options.contentType)
311
- headers["content-type"] = String(options.contentType);
312
- else if (options.json)
313
- headers["content-type"] = "application/json";
314
- else if (options.path)
315
- headers["content-type"] = (0, import_mimeType.getMimeTypeForPath)(options.path) || "application/octet-stream";
316
- if (length && !("content-length" in headers))
317
- headers["content-length"] = String(length);
318
- await this._raceWithTargetClose(this._channel.fulfill({
319
- status: statusOption || 200,
320
- headers: (0, import_headers.headersObjectToArray)(headers),
321
- body,
322
- isBase64,
323
- fetchResponseUid
324
- }));
325
- }
326
- async continue(options = {}) {
327
- await this._handleRoute(async () => {
328
- this.request()._applyFallbackOverrides(options);
329
- await this._innerContinue(
330
- false
331
- /* isFallback */
332
- );
333
- });
334
- }
335
- _checkNotHandled() {
336
- if (!this._handlingPromise)
337
- throw new Error("Route is already handled!");
338
- }
339
- _reportHandled(done) {
340
- const chain = this._handlingPromise;
341
- this._handlingPromise = null;
342
- chain.resolve(done);
343
- }
344
- async _innerContinue(isFallback) {
345
- const options = this.request()._fallbackOverridesForContinue();
346
- return await this._raceWithTargetClose(this._channel.continue({
347
- url: options.url,
348
- method: options.method,
349
- headers: options.headers ? (0, import_headers.headersObjectToArray)(options.headers) : void 0,
350
- postData: options.postDataBuffer,
351
- isFallback
352
- }));
353
- }
354
- }
355
- class WebSocketRoute extends import_channelOwner.ChannelOwner {
356
- constructor(parent, type, guid, initializer) {
357
- super(parent, type, guid, initializer);
358
- this._connected = false;
359
- this._server = {
360
- onMessage: (handler) => {
361
- this._onServerMessage = handler;
362
- },
363
- onClose: (handler) => {
364
- this._onServerClose = handler;
365
- },
366
- connectToServer: () => {
367
- throw new Error(`connectToServer must be called on the page-side WebSocketRoute`);
368
- },
369
- url: () => {
370
- return this._initializer.url;
371
- },
372
- close: async (options = {}) => {
373
- await this._channel.closeServer({ ...options, wasClean: true }).catch(() => {
374
- });
375
- },
376
- send: (message) => {
377
- if ((0, import_rtti.isString)(message))
378
- this._channel.sendToServer({ message, isBase64: false }).catch(() => {
379
- });
380
- else
381
- this._channel.sendToServer({ message: message.toString("base64"), isBase64: true }).catch(() => {
382
- });
383
- },
384
- async [Symbol.asyncDispose]() {
385
- await this.close();
386
- }
387
- };
388
- this._channel.on("messageFromPage", ({ message, isBase64 }) => {
389
- if (this._onPageMessage)
390
- this._onPageMessage(isBase64 ? Buffer.from(message, "base64") : message);
391
- else if (this._connected)
392
- this._channel.sendToServer({ message, isBase64 }).catch(() => {
393
- });
394
- });
395
- this._channel.on("messageFromServer", ({ message, isBase64 }) => {
396
- if (this._onServerMessage)
397
- this._onServerMessage(isBase64 ? Buffer.from(message, "base64") : message);
398
- else
399
- this._channel.sendToPage({ message, isBase64 }).catch(() => {
400
- });
401
- });
402
- this._channel.on("closePage", ({ code, reason, wasClean }) => {
403
- if (this._onPageClose)
404
- this._onPageClose(code, reason);
405
- else
406
- this._channel.closeServer({ code, reason, wasClean }).catch(() => {
407
- });
408
- });
409
- this._channel.on("closeServer", ({ code, reason, wasClean }) => {
410
- if (this._onServerClose)
411
- this._onServerClose(code, reason);
412
- else
413
- this._channel.closePage({ code, reason, wasClean }).catch(() => {
414
- });
415
- });
416
- }
417
- static from(route) {
418
- return route._object;
419
- }
420
- url() {
421
- return this._initializer.url;
422
- }
423
- async close(options = {}) {
424
- await this._channel.closePage({ ...options, wasClean: true }).catch(() => {
425
- });
426
- }
427
- connectToServer() {
428
- if (this._connected)
429
- throw new Error("Already connected to the server");
430
- this._connected = true;
431
- this._channel.connect().catch(() => {
432
- });
433
- return this._server;
434
- }
435
- send(message) {
436
- if ((0, import_rtti.isString)(message))
437
- this._channel.sendToPage({ message, isBase64: false }).catch(() => {
438
- });
439
- else
440
- this._channel.sendToPage({ message: message.toString("base64"), isBase64: true }).catch(() => {
441
- });
442
- }
443
- onMessage(handler) {
444
- this._onPageMessage = handler;
445
- }
446
- onClose(handler) {
447
- this._onPageClose = handler;
448
- }
449
- async [Symbol.asyncDispose]() {
450
- await this.close();
451
- }
452
- async _afterHandle() {
453
- if (this._connected)
454
- return;
455
- await this._channel.ensureOpened().catch(() => {
456
- });
457
- }
458
- }
459
- class WebSocketRouteHandler {
460
- constructor(baseURL, url, handler) {
461
- this._baseURL = baseURL;
462
- this.url = url;
463
- this.handler = handler;
464
- }
465
- static prepareInterceptionPatterns(handlers) {
466
- const patterns = [];
467
- let all = false;
468
- for (const handler of handlers) {
469
- const serialized = (0, import_urlMatch.serializeURLMatch)(handler.url);
470
- if (serialized)
471
- patterns.push(serialized);
472
- else
473
- all = true;
474
- }
475
- if (all)
476
- return [{ glob: "**/*" }];
477
- return patterns;
478
- }
479
- matches(wsURL) {
480
- return (0, import_urlMatch.urlMatches)(this._baseURL, wsURL, this.url, true);
481
- }
482
- async handle(webSocketRoute) {
483
- const handler = this.handler;
484
- await handler(webSocketRoute);
485
- await webSocketRoute._afterHandle();
486
- }
487
- }
488
- class Response extends import_channelOwner.ChannelOwner {
489
- constructor(parent, type, guid, initializer) {
490
- super(parent, type, guid, initializer);
491
- this._finishedPromise = new import_manualPromise.ManualPromise();
492
- this._provisionalHeaders = new RawHeaders(initializer.headers);
493
- this._request = Request.from(this._initializer.request);
494
- this._request._response = this;
495
- Object.assign(this._request._timing, this._initializer.timing);
496
- }
497
- static from(response) {
498
- return response._object;
499
- }
500
- static fromNullable(response) {
501
- return response ? Response.from(response) : null;
502
- }
503
- url() {
504
- return this._initializer.url;
505
- }
506
- ok() {
507
- return this._initializer.status === 0 || this._initializer.status >= 200 && this._initializer.status <= 299;
508
- }
509
- status() {
510
- return this._initializer.status;
511
- }
512
- statusText() {
513
- return this._initializer.statusText;
514
- }
515
- fromServiceWorker() {
516
- return this._initializer.fromServiceWorker;
517
- }
518
- /**
519
- * @deprecated
520
- */
521
- headers() {
522
- return this._provisionalHeaders.headers();
523
- }
524
- async _actualHeaders() {
525
- if (!this._actualHeadersPromise) {
526
- this._actualHeadersPromise = (async () => {
527
- return new RawHeaders((await this._channel.rawResponseHeaders()).headers);
528
- })();
529
- }
530
- return await this._actualHeadersPromise;
531
- }
532
- async allHeaders() {
533
- return (await this._actualHeaders()).headers();
534
- }
535
- async headersArray() {
536
- return (await this._actualHeaders()).headersArray().slice();
537
- }
538
- async headerValue(name) {
539
- return (await this._actualHeaders()).get(name);
540
- }
541
- async headerValues(name) {
542
- return (await this._actualHeaders()).getAll(name);
543
- }
544
- async finished() {
545
- return await this.request()._targetClosedScope().race(this._finishedPromise);
546
- }
547
- async body() {
548
- return (await this._channel.body()).binary;
549
- }
550
- async text() {
551
- const content = await this.body();
552
- return content.toString("utf8");
553
- }
554
- async json() {
555
- const content = await this.text();
556
- return JSON.parse(content);
557
- }
558
- request() {
559
- return this._request;
560
- }
561
- frame() {
562
- return this._request.frame();
563
- }
564
- async serverAddr() {
565
- return (await this._channel.serverAddr()).value || null;
566
- }
567
- async securityDetails() {
568
- return (await this._channel.securityDetails()).value || null;
569
- }
570
- async httpVersion() {
571
- return (await this._channel.httpVersion()).value;
572
- }
573
- }
574
- class WebSocket extends import_channelOwner.ChannelOwner {
575
- static from(webSocket) {
576
- return webSocket._object;
577
- }
578
- constructor(parent, type, guid, initializer) {
579
- super(parent, type, guid, initializer);
580
- this._isClosed = false;
581
- this._page = parent;
582
- this._channel.on("frameSent", (event) => {
583
- if (event.opcode === 1)
584
- this.emit(import_events.Events.WebSocket.FrameSent, { payload: event.data });
585
- else if (event.opcode === 2)
586
- this.emit(import_events.Events.WebSocket.FrameSent, { payload: Buffer.from(event.data, "base64") });
587
- });
588
- this._channel.on("frameReceived", (event) => {
589
- if (event.opcode === 1)
590
- this.emit(import_events.Events.WebSocket.FrameReceived, { payload: event.data });
591
- else if (event.opcode === 2)
592
- this.emit(import_events.Events.WebSocket.FrameReceived, { payload: Buffer.from(event.data, "base64") });
593
- });
594
- this._channel.on("socketError", ({ error }) => this.emit(import_events.Events.WebSocket.Error, error));
595
- this._channel.on("close", () => {
596
- this._isClosed = true;
597
- this.emit(import_events.Events.WebSocket.Close, this);
598
- });
599
- }
600
- url() {
601
- return this._initializer.url;
602
- }
603
- isClosed() {
604
- return this._isClosed;
605
- }
606
- async waitForEvent(event, optionsOrPredicate = {}) {
607
- return await this._wrapApiCall(async () => {
608
- const timeout = this._page._timeoutSettings.timeout(typeof optionsOrPredicate === "function" ? {} : optionsOrPredicate);
609
- const predicate = typeof optionsOrPredicate === "function" ? optionsOrPredicate : optionsOrPredicate.predicate;
610
- const waiter = import_waiter.Waiter.createForEvent(this, event);
611
- waiter.rejectOnTimeout(timeout, `Timeout ${timeout}ms exceeded while waiting for event "${event}"`);
612
- if (event !== import_events.Events.WebSocket.Error)
613
- waiter.rejectOnEvent(this, import_events.Events.WebSocket.Error, new Error("Socket error"));
614
- if (event !== import_events.Events.WebSocket.Close)
615
- waiter.rejectOnEvent(this, import_events.Events.WebSocket.Close, new Error("Socket closed"));
616
- waiter.rejectOnEvent(this._page, import_events.Events.Page.Close, () => this._page._closeErrorWithReason());
617
- const result = await waiter.waitForEvent(this, event, predicate);
618
- waiter.dispose();
619
- return result;
620
- });
621
- }
622
- }
623
- function validateHeaders(headers) {
624
- for (const key of Object.keys(headers)) {
625
- const value = headers[key];
626
- if (!Object.is(value, void 0) && !(0, import_rtti.isString)(value))
627
- throw new Error(`Expected value of header "${key}" to be String, but "${typeof value}" is found.`);
628
- }
629
- }
630
- class RouteHandler {
631
- constructor(platform, baseURL, url, handler, times = Number.MAX_SAFE_INTEGER) {
632
- this.handledCount = 0;
633
- this._ignoreException = false;
634
- this._activeInvocations = /* @__PURE__ */ new Set();
635
- this._baseURL = baseURL;
636
- this._times = times;
637
- this.url = url;
638
- this.handler = handler;
639
- this._savedZone = platform.zones.current().pop();
640
- }
641
- static prepareInterceptionPatterns(handlers) {
642
- const patterns = [];
643
- let all = false;
644
- for (const handler of handlers) {
645
- const serialized = (0, import_urlMatch.serializeURLMatch)(handler.url);
646
- if (serialized)
647
- patterns.push(serialized);
648
- else
649
- all = true;
650
- }
651
- if (all)
652
- return [{ glob: "**/*" }];
653
- return patterns;
654
- }
655
- matches(requestURL) {
656
- return (0, import_urlMatch.urlMatches)(this._baseURL, requestURL, this.url);
657
- }
658
- async handle(route) {
659
- return await this._savedZone.run(async () => this._handleImpl(route));
660
- }
661
- async _handleImpl(route) {
662
- const handlerInvocation = { complete: new import_manualPromise.ManualPromise(), route };
663
- this._activeInvocations.add(handlerInvocation);
664
- try {
665
- return await this._handleInternal(route);
666
- } catch (e) {
667
- if (this._ignoreException)
668
- return false;
669
- if ((0, import_errors.isTargetClosedError)(e)) {
670
- (0, import_stackTrace.rewriteErrorMessage)(e, `"${e.message}" while running route callback.
671
- Consider awaiting \`await page.unrouteAll({ behavior: 'ignoreErrors' })\`
672
- before the end of the test to ignore remaining routes in flight.`);
673
- }
674
- throw e;
675
- } finally {
676
- handlerInvocation.complete.resolve();
677
- this._activeInvocations.delete(handlerInvocation);
678
- }
679
- }
680
- async stop(behavior) {
681
- if (behavior === "ignoreErrors") {
682
- this._ignoreException = true;
683
- } else {
684
- const promises = [];
685
- for (const activation of this._activeInvocations) {
686
- if (!activation.route._didThrow)
687
- promises.push(activation.complete);
688
- }
689
- await Promise.all(promises);
690
- }
691
- }
692
- async _handleInternal(route) {
693
- ++this.handledCount;
694
- const handledPromise = route._startHandling();
695
- const handler = this.handler;
696
- const [handled] = await Promise.all([
697
- handledPromise,
698
- handler(route, route.request())
699
- ]);
700
- return handled;
701
- }
702
- willExpire() {
703
- return this.handledCount + 1 >= this._times;
704
- }
705
- }
706
- class RawHeaders {
707
- constructor(headers) {
708
- this._headersMap = new import_multimap.MultiMap();
709
- this._headersArray = headers;
710
- for (const header of headers)
711
- this._headersMap.set(header.name.toLowerCase(), header.value);
712
- }
713
- static _fromHeadersObjectLossy(headers) {
714
- const headersArray = Object.entries(headers).map(([name, value]) => ({
715
- name,
716
- value
717
- })).filter((header) => header.value !== void 0);
718
- return new RawHeaders(headersArray);
719
- }
720
- get(name) {
721
- const values = this.getAll(name);
722
- if (!values || !values.length)
723
- return null;
724
- return values.join(name.toLowerCase() === "set-cookie" ? "\n" : ", ");
725
- }
726
- getAll(name) {
727
- return [...this._headersMap.get(name.toLowerCase())];
728
- }
729
- headers() {
730
- const result = {};
731
- for (const name of this._headersMap.keys())
732
- result[name] = this.get(name);
733
- return result;
734
- }
735
- headersArray() {
736
- return this._headersArray;
737
- }
738
- }
739
- // Annotate the CommonJS export names for ESM import in node:
740
- 0 && (module.exports = {
741
- RawHeaders,
742
- Request,
743
- Response,
744
- Route,
745
- RouteHandler,
746
- WebSocket,
747
- WebSocketRoute,
748
- WebSocketRouteHandler,
749
- validateHeaders
750
- });