rebrowser-playwright-core 1.49.1 → 1.52.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 (372) hide show
  1. package/ThirdPartyNotices.txt +381 -55
  2. package/bin/reinstall_msedge_beta_linux.sh +6 -0
  3. package/bin/reinstall_msedge_dev_linux.sh +6 -0
  4. package/bin/reinstall_msedge_stable_linux.sh +6 -0
  5. package/browsers.json +28 -13
  6. package/index.js +0 -1
  7. package/lib/androidServerImpl.js +42 -48
  8. package/lib/browserServerImpl.js +60 -64
  9. package/lib/cli/driver.js +71 -69
  10. package/lib/cli/program.js +314 -354
  11. package/lib/cli/programWithTestStub.js +51 -44
  12. package/lib/client/accessibility.js +31 -32
  13. package/lib/client/android.js +146 -254
  14. package/lib/client/api.js +135 -283
  15. package/lib/client/artifact.js +39 -39
  16. package/lib/client/browser.js +59 -68
  17. package/lib/client/browserContext.js +302 -322
  18. package/lib/client/browserType.js +95 -143
  19. package/lib/client/cdpSession.js +29 -31
  20. package/lib/client/channelOwner.js +109 -139
  21. package/lib/client/clientHelper.js +49 -42
  22. package/lib/client/clientInstrumentation.js +40 -35
  23. package/lib/client/clientStackTrace.js +69 -0
  24. package/lib/client/clock.js +36 -36
  25. package/lib/client/connection.js +203 -218
  26. package/lib/client/consoleMessage.js +33 -33
  27. package/lib/client/coverage.js +25 -22
  28. package/lib/client/dialog.js +30 -31
  29. package/lib/client/download.js +25 -25
  30. package/lib/client/electron.js +74 -76
  31. package/lib/client/elementHandle.js +126 -163
  32. package/lib/client/errors.js +53 -53
  33. package/lib/client/eventEmitter.js +127 -127
  34. package/lib/client/events.js +72 -68
  35. package/lib/client/fetch.js +154 -178
  36. package/lib/client/fileChooser.js +25 -24
  37. package/lib/client/fileUtils.js +34 -0
  38. package/lib/client/frame.js +189 -307
  39. package/lib/client/harRouter.js +44 -56
  40. package/lib/client/input.js +40 -69
  41. package/lib/client/jsHandle.js +55 -71
  42. package/lib/client/jsonPipe.js +27 -23
  43. package/lib/client/localUtils.js +53 -28
  44. package/lib/client/locator.js +144 -230
  45. package/lib/client/network.js +285 -301
  46. package/lib/client/page.js +273 -312
  47. package/lib/client/platform.js +74 -0
  48. package/lib/client/playwright.js +62 -57
  49. package/lib/client/selectors.js +51 -43
  50. package/lib/client/stream.js +30 -45
  51. package/lib/client/timeoutSettings.js +75 -0
  52. package/lib/client/tracing.js +49 -82
  53. package/lib/client/types.js +26 -22
  54. package/lib/client/video.js +35 -27
  55. package/lib/client/waiter.js +71 -91
  56. package/lib/client/webError.js +25 -23
  57. package/lib/client/webSocket.js +111 -0
  58. package/lib/client/worker.js +48 -56
  59. package/lib/client/writableStream.js +28 -43
  60. package/lib/generated/clockSource.js +26 -5
  61. package/lib/generated/consoleApiSource.js +26 -5
  62. package/lib/generated/injectedScriptSource.js +26 -5
  63. package/lib/generated/pollingRecorderSource.js +26 -5
  64. package/lib/generated/utilityScriptSource.js +26 -5
  65. package/lib/generated/webSocketMockSource.js +375 -4
  66. package/lib/inProcessFactory.js +53 -48
  67. package/lib/inprocess.js +2 -19
  68. package/lib/outofprocess.js +53 -42
  69. package/lib/protocol/debug.js +209 -25
  70. package/lib/protocol/serializers.js +153 -134
  71. package/lib/protocol/validator.js +2712 -2667
  72. package/lib/protocol/validatorPrimitives.js +115 -75
  73. package/lib/remote/playwrightConnection.js +144 -152
  74. package/lib/remote/playwrightServer.js +106 -77
  75. package/lib/server/accessibility.js +44 -37
  76. package/lib/server/android/android.js +216 -206
  77. package/lib/server/android/backendAdb.js +89 -82
  78. package/lib/server/artifact.js +78 -55
  79. package/lib/server/bidi/bidiBrowser.js +227 -158
  80. package/lib/server/bidi/bidiChromium.js +106 -78
  81. package/lib/server/bidi/bidiConnection.js +66 -83
  82. package/lib/server/bidi/bidiExecutionContext.js +161 -97
  83. package/lib/server/bidi/bidiFirefox.js +76 -68
  84. package/lib/server/bidi/bidiInput.js +90 -102
  85. package/lib/server/bidi/bidiNetworkManager.js +141 -159
  86. package/lib/server/bidi/bidiOverCdp.js +57 -58
  87. package/lib/server/bidi/bidiPage.js +262 -261
  88. package/lib/server/bidi/bidiPdf.js +52 -86
  89. package/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
  90. package/lib/server/bidi/third_party/bidiDeserializer.js +55 -50
  91. package/lib/server/bidi/third_party/bidiKeyboard.js +241 -223
  92. package/lib/server/bidi/third_party/bidiProtocol.js +144 -131
  93. package/lib/server/bidi/third_party/bidiSerializer.js +67 -63
  94. package/lib/server/bidi/third_party/firefoxPrefs.js +149 -111
  95. package/lib/server/browser.js +76 -84
  96. package/lib/server/browserContext.js +343 -360
  97. package/lib/server/browserType.js +169 -181
  98. package/lib/server/callLog.js +82 -0
  99. package/lib/server/chromium/chromium.js +212 -190
  100. package/lib/server/chromium/chromiumSwitches.js +99 -44
  101. package/lib/server/chromium/crAccessibility.js +157 -131
  102. package/lib/server/chromium/crBrowser.js +262 -280
  103. package/lib/server/chromium/crConnection.js +121 -178
  104. package/lib/server/chromium/crCoverage.js +113 -127
  105. package/lib/server/chromium/crDevTools.js +64 -55
  106. package/lib/server/chromium/crDragDrop.js +62 -79
  107. package/lib/server/chromium/crExecutionContext.js +100 -91
  108. package/lib/server/chromium/crInput.js +101 -88
  109. package/lib/server/chromium/crNetworkManager.js +269 -370
  110. package/lib/server/chromium/crPage.js +509 -597
  111. package/lib/server/chromium/crPdf.js +54 -86
  112. package/lib/server/chromium/crProtocolHelper.js +92 -80
  113. package/lib/server/chromium/crServiceWorker.js +85 -69
  114. package/lib/server/chromium/defaultFontFamilies.js +152 -135
  115. package/lib/server/chromium/protocol.d.js +16 -0
  116. package/lib/server/chromium/videoRecorder.js +65 -99
  117. package/lib/server/clock.js +58 -46
  118. package/lib/server/codegen/csharp.js +191 -156
  119. package/lib/server/codegen/java.js +163 -125
  120. package/lib/server/codegen/javascript.js +166 -143
  121. package/lib/server/codegen/jsonl.js +33 -29
  122. package/lib/server/codegen/language.js +75 -52
  123. package/lib/server/codegen/languages.js +65 -27
  124. package/lib/server/codegen/python.js +141 -125
  125. package/lib/server/codegen/types.js +15 -4
  126. package/lib/server/console.js +28 -32
  127. package/lib/server/cookieStore.js +105 -86
  128. package/lib/server/debugController.js +102 -154
  129. package/lib/server/debugger.js +82 -78
  130. package/lib/server/deviceDescriptors.js +37 -24
  131. package/lib/server/deviceDescriptorsSource.json +131 -131
  132. package/lib/server/dialog.js +36 -35
  133. package/lib/server/dispatchers/androidDispatcher.js +196 -107
  134. package/lib/server/dispatchers/artifactDispatcher.js +62 -62
  135. package/lib/server/dispatchers/browserContextDispatcher.js +177 -217
  136. package/lib/server/dispatchers/browserDispatcher.js +78 -97
  137. package/lib/server/dispatchers/browserTypeDispatcher.js +35 -35
  138. package/lib/server/dispatchers/cdpSessionDispatcher.js +32 -36
  139. package/lib/server/dispatchers/debugControllerDispatcher.js +48 -64
  140. package/lib/server/dispatchers/dialogDispatcher.js +30 -27
  141. package/lib/server/dispatchers/dispatcher.js +180 -229
  142. package/lib/server/dispatchers/electronDispatcher.js +54 -57
  143. package/lib/server/dispatchers/elementHandlerDispatcher.js +79 -116
  144. package/lib/server/dispatchers/frameDispatcher.js +93 -162
  145. package/lib/server/dispatchers/jsHandleDispatcher.js +49 -66
  146. package/lib/server/dispatchers/jsonPipeDispatcher.js +35 -36
  147. package/lib/server/dispatchers/localUtilsDispatcher.js +107 -365
  148. package/lib/server/dispatchers/networkDispatchers.js +92 -109
  149. package/lib/server/dispatchers/pageDispatcher.js +130 -169
  150. package/lib/server/dispatchers/playwrightDispatcher.js +69 -76
  151. package/lib/server/dispatchers/selectorsDispatcher.js +28 -24
  152. package/lib/server/dispatchers/streamDispatcher.js +42 -44
  153. package/lib/server/dispatchers/tracingDispatcher.js +36 -41
  154. package/lib/server/dispatchers/webSocketRouteDispatcher.js +100 -135
  155. package/lib/server/dispatchers/writableStreamDispatcher.js +54 -39
  156. package/lib/server/dom.js +424 -443
  157. package/lib/server/download.js +45 -35
  158. package/lib/server/electron/electron.js +156 -175
  159. package/lib/server/electron/loader.js +8 -36
  160. package/lib/server/errors.js +47 -46
  161. package/lib/server/fetch.js +302 -331
  162. package/lib/server/fileChooser.js +25 -24
  163. package/lib/server/fileUploadUtils.js +66 -57
  164. package/lib/server/firefox/ffAccessibility.js +153 -131
  165. package/lib/server/firefox/ffBrowser.js +218 -274
  166. package/lib/server/firefox/ffConnection.js +63 -84
  167. package/lib/server/firefox/ffExecutionContext.js +103 -77
  168. package/lib/server/firefox/ffInput.js +72 -63
  169. package/lib/server/firefox/ffNetworkManager.js +131 -110
  170. package/lib/server/firefox/ffPage.js +244 -302
  171. package/lib/server/firefox/firefox.js +76 -69
  172. package/lib/server/firefox/protocol.d.js +16 -0
  173. package/lib/server/formData.js +107 -35
  174. package/lib/server/frameSelectors.js +77 -111
  175. package/lib/server/frames.js +719 -855
  176. package/lib/server/har/harRecorder.js +85 -77
  177. package/lib/server/har/harTracer.js +288 -224
  178. package/lib/server/harBackend.js +157 -0
  179. package/lib/server/helper.js +56 -59
  180. package/lib/server/index.js +59 -106
  181. package/lib/server/input.js +136 -166
  182. package/lib/server/instrumentation.js +49 -44
  183. package/lib/server/javascript.js +157 -151
  184. package/lib/server/launchApp.js +92 -73
  185. package/lib/server/localUtils.js +211 -0
  186. package/lib/server/macEditingCommands.js +141 -137
  187. package/lib/server/network.js +263 -297
  188. package/lib/server/page.js +351 -434
  189. package/lib/server/pageBinding.js +88 -0
  190. package/lib/server/pipeTransport.js +49 -45
  191. package/lib/server/playwright.js +60 -67
  192. package/lib/server/progress.js +56 -51
  193. package/lib/server/protocolError.js +34 -31
  194. package/lib/server/recorder/chat.js +161 -0
  195. package/lib/server/recorder/contextRecorder.js +135 -148
  196. package/lib/server/recorder/recorderApp.js +129 -132
  197. package/lib/server/recorder/recorderCollection.js +57 -57
  198. package/lib/server/recorder/recorderFrontend.js +15 -4
  199. package/lib/server/recorder/recorderRunner.js +80 -100
  200. package/lib/server/recorder/recorderUtils.js +59 -72
  201. package/lib/server/recorder/throttledFile.js +42 -31
  202. package/lib/server/recorder.js +186 -190
  203. package/lib/server/registry/browserFetcher.js +107 -100
  204. package/lib/server/registry/dependencies.js +247 -198
  205. package/lib/server/registry/index.js +928 -709
  206. package/lib/server/registry/nativeDeps.js +1073 -461
  207. package/lib/server/registry/oopDownloadBrowserMain.js +57 -75
  208. package/lib/server/screenshotter.js +166 -182
  209. package/lib/server/selectors.js +85 -46
  210. package/lib/server/socksClientCertificatesInterceptor.js +166 -185
  211. package/lib/server/socksInterceptor.js +62 -67
  212. package/lib/server/storageScript.js +154 -0
  213. package/lib/server/timeoutSettings.js +89 -0
  214. package/lib/server/trace/recorder/snapshotter.js +70 -88
  215. package/lib/server/trace/recorder/snapshotterInjected.js +246 -218
  216. package/lib/server/trace/recorder/tracing.js +324 -327
  217. package/lib/server/trace/test/inMemorySnapshotter.js +46 -52
  218. package/lib/server/trace/viewer/traceViewer.js +172 -137
  219. package/lib/server/transport.js +125 -133
  220. package/lib/server/types.js +26 -22
  221. package/lib/server/usKeyboardLayout.js +135 -545
  222. package/lib/server/utils/ascii.js +44 -0
  223. package/lib/server/utils/comparators.js +161 -0
  224. package/lib/server/utils/crypto.js +216 -0
  225. package/lib/server/utils/debug.js +47 -0
  226. package/lib/server/utils/debugLogger.js +114 -0
  227. package/lib/server/utils/env.js +68 -0
  228. package/lib/server/utils/eventsHelper.js +39 -0
  229. package/lib/server/utils/expectUtils.js +38 -0
  230. package/lib/server/utils/fileUtils.js +191 -0
  231. package/lib/server/utils/happyEyeballs.js +207 -0
  232. package/lib/server/utils/hostPlatform.js +109 -0
  233. package/lib/server/utils/httpServer.js +218 -0
  234. package/lib/server/utils/image_tools/colorUtils.js +89 -0
  235. package/lib/{image_tools → server/utils/image_tools}/compare.js +44 -43
  236. package/lib/server/utils/image_tools/imageChannel.js +78 -0
  237. package/lib/{image_tools → server/utils/image_tools}/stats.js +40 -40
  238. package/lib/server/utils/linuxUtils.js +71 -0
  239. package/lib/server/utils/network.js +217 -0
  240. package/lib/server/utils/nodePlatform.js +148 -0
  241. package/lib/server/utils/pipeTransport.js +84 -0
  242. package/lib/server/utils/processLauncher.js +238 -0
  243. package/lib/server/utils/profiler.js +65 -0
  244. package/lib/server/utils/socksProxy.js +511 -0
  245. package/lib/server/utils/spawnAsync.js +41 -0
  246. package/lib/server/utils/task.js +51 -0
  247. package/lib/server/utils/userAgent.js +98 -0
  248. package/lib/server/utils/wsServer.js +132 -0
  249. package/lib/server/utils/zipFile.js +74 -0
  250. package/lib/server/utils/zones.js +57 -0
  251. package/lib/server/webkit/protocol.d.js +16 -0
  252. package/lib/server/webkit/webkit.js +76 -63
  253. package/lib/server/webkit/wkAccessibility.js +161 -118
  254. package/lib/server/webkit/wkBrowser.js +163 -180
  255. package/lib/server/webkit/wkConnection.js +59 -83
  256. package/lib/server/webkit/wkExecutionContext.js +96 -73
  257. package/lib/server/webkit/wkInput.js +87 -75
  258. package/lib/server/webkit/wkInterceptableRequest.js +102 -95
  259. package/lib/server/webkit/wkPage.js +536 -647
  260. package/lib/server/webkit/wkProvisionalPage.js +45 -56
  261. package/lib/server/webkit/wkWorkers.js +77 -77
  262. package/lib/utils/isomorphic/ariaSnapshot.js +245 -128
  263. package/lib/utils/isomorphic/assert.js +31 -0
  264. package/lib/utils/isomorphic/builtins.js +90 -0
  265. package/lib/utils/isomorphic/colors.js +72 -0
  266. package/lib/utils/isomorphic/cssParser.js +123 -127
  267. package/lib/utils/isomorphic/cssTokenizer.js +436 -364
  268. package/lib/utils/isomorphic/headers.js +53 -0
  269. package/lib/utils/isomorphic/locatorGenerators.js +344 -349
  270. package/lib/utils/isomorphic/locatorParser.js +103 -106
  271. package/lib/utils/isomorphic/locatorUtils.js +63 -44
  272. package/lib/utils/isomorphic/manualPromise.js +115 -0
  273. package/lib/utils/isomorphic/mimeType.js +453 -22
  274. package/lib/utils/isomorphic/multimap.js +81 -0
  275. package/lib/utils/isomorphic/rtti.js +43 -0
  276. package/lib/utils/isomorphic/selectorParser.js +183 -193
  277. package/lib/utils/isomorphic/semaphore.js +54 -0
  278. package/lib/utils/isomorphic/stackTrace.js +158 -0
  279. package/lib/utils/isomorphic/stringUtils.js +113 -106
  280. package/lib/utils/isomorphic/time.js +44 -0
  281. package/lib/utils/isomorphic/timeoutRunner.js +67 -0
  282. package/lib/utils/isomorphic/traceUtils.js +52 -32
  283. package/lib/utils/isomorphic/types.js +16 -0
  284. package/lib/utils/isomorphic/urlMatch.js +114 -71
  285. package/lib/utils/isomorphic/utilityScriptSerializers.js +248 -0
  286. package/lib/utils.js +101 -0
  287. package/lib/utilsBundle.js +101 -76
  288. package/lib/utilsBundleImpl/index.js +114 -116
  289. package/lib/vite/htmlReport/index.html +26 -20
  290. package/lib/vite/recorder/assets/{codeMirrorModule-C5j27SYZ.js → codeMirrorModule-DVQi6prl.js} +13 -13
  291. package/lib/vite/recorder/assets/index-97EUAAbk.js +184 -0
  292. package/lib/vite/recorder/assets/{index-iA1aAGZg.css → index-eHBmevrY.css} +1 -1
  293. package/lib/vite/recorder/index.html +2 -2
  294. package/lib/vite/traceViewer/assets/codeMirrorModule-DwAiTpyC.js +24 -0
  295. package/lib/vite/traceViewer/assets/defaultSettingsView-DkkRvn5X.js +265 -0
  296. package/lib/vite/traceViewer/assets/{xtermModule-BeNbaIVa.js → xtermModule-BoAIEibi.js} +7 -7
  297. package/lib/vite/traceViewer/defaultSettingsView.QdHITyLI.css +1 -0
  298. package/lib/vite/traceViewer/index.DvtSwn6E.js +2 -0
  299. package/lib/vite/traceViewer/index.html +4 -7
  300. package/lib/vite/traceViewer/sw.bundle.js +3 -3
  301. package/lib/vite/traceViewer/{uiMode.voC1ZiOQ.css → uiMode.BatfzHMG.css} +1 -1
  302. package/lib/vite/traceViewer/uiMode.Sdytl9wc.js +5 -0
  303. package/lib/vite/traceViewer/uiMode.html +4 -7
  304. package/lib/zipBundle.js +32 -23
  305. package/lib/zipBundleImpl.js +4 -4
  306. package/package.json +7 -7
  307. package/types/protocol.d.ts +819 -127
  308. package/types/types.d.ts +181 -69
  309. package/bin/PrintDeps.exe +0 -0
  310. package/bin/README.md +0 -2
  311. package/lib/common/socksProxy.js +0 -569
  312. package/lib/common/timeoutSettings.js +0 -73
  313. package/lib/common/types.js +0 -5
  314. package/lib/image_tools/colorUtils.js +0 -98
  315. package/lib/image_tools/imageChannel.js +0 -70
  316. package/lib/protocol/transport.js +0 -82
  317. package/lib/server/ariaSnapshot.js +0 -33
  318. package/lib/server/isomorphic/utilityScriptSerializers.js +0 -226
  319. package/lib/server/recorder/recorderInTraceViewer.js +0 -144
  320. package/lib/utils/ascii.js +0 -31
  321. package/lib/utils/comparators.js +0 -153
  322. package/lib/utils/crypto.js +0 -171
  323. package/lib/utils/debug.js +0 -46
  324. package/lib/utils/debugLogger.js +0 -91
  325. package/lib/utils/env.js +0 -49
  326. package/lib/utils/eventsHelper.js +0 -38
  327. package/lib/utils/expectUtils.js +0 -33
  328. package/lib/utils/fileUtils.js +0 -205
  329. package/lib/utils/happy-eyeballs.js +0 -194
  330. package/lib/utils/headers.js +0 -52
  331. package/lib/utils/hostPlatform.js +0 -139
  332. package/lib/utils/httpServer.js +0 -237
  333. package/lib/utils/index.js +0 -368
  334. package/lib/utils/isomorphic/recorderUtils.js +0 -227
  335. package/lib/utils/linuxUtils.js +0 -78
  336. package/lib/utils/manualPromise.js +0 -109
  337. package/lib/utils/multimap.js +0 -75
  338. package/lib/utils/network.js +0 -160
  339. package/lib/utils/processLauncher.js +0 -248
  340. package/lib/utils/profiler.js +0 -53
  341. package/lib/utils/rtti.js +0 -44
  342. package/lib/utils/semaphore.js +0 -51
  343. package/lib/utils/sequence.js +0 -64
  344. package/lib/utils/spawnAsync.js +0 -45
  345. package/lib/utils/stackTrace.js +0 -134
  346. package/lib/utils/task.js +0 -58
  347. package/lib/utils/time.js +0 -37
  348. package/lib/utils/timeoutRunner.js +0 -66
  349. package/lib/utils/traceUtils.js +0 -44
  350. package/lib/utils/userAgent.js +0 -105
  351. package/lib/utils/wsServer.js +0 -127
  352. package/lib/utils/zipFile.js +0 -75
  353. package/lib/utils/zones.js +0 -71
  354. package/lib/vite/recorder/assets/index-m0XdVJHe.js +0 -184
  355. package/lib/vite/traceViewer/assets/codeMirrorModule-BBCX0spr.js +0 -24
  356. package/lib/vite/traceViewer/assets/inspectorTab-B4Iw34Ow.js +0 -68
  357. package/lib/vite/traceViewer/assets/testServerConnection-DeE2kSzz.js +0 -1
  358. package/lib/vite/traceViewer/assets/workbench-DFlGYqou.js +0 -9
  359. package/lib/vite/traceViewer/embedded.CmarehFk.js +0 -2
  360. package/lib/vite/traceViewer/embedded.html +0 -18
  361. package/lib/vite/traceViewer/embedded.w7WN2u1R.css +0 -1
  362. package/lib/vite/traceViewer/index.FBucu_gE.js +0 -2
  363. package/lib/vite/traceViewer/inspectorTab.DEOUW62d.css +0 -1
  364. package/lib/vite/traceViewer/recorder.B_SY1GJM.css +0 -0
  365. package/lib/vite/traceViewer/recorder.CW_rzcEp.js +0 -2
  366. package/lib/vite/traceViewer/recorder.html +0 -17
  367. package/lib/vite/traceViewer/uiMode.CDUVjusr.js +0 -5
  368. package/lib/vite/traceViewer/workbench.C-zR9ysA.css +0 -1
  369. /package/lib/vite/recorder/assets/{codeMirrorModule-ez37Vkbh.css → codeMirrorModule-C3UTv-Ge.css} +0 -0
  370. /package/lib/vite/traceViewer/{codeMirrorModule.ez37Vkbh.css → codeMirrorModule.C3UTv-Ge.css} +0 -0
  371. /package/lib/vite/traceViewer/{index.CrbWWHbf.css → index.CFOW-Ezb.css} +0 -0
  372. /package/lib/vite/traceViewer/{xtermModule.DSXBckUd.css → xtermModule.Beg8tuEN.css} +0 -0
@@ -1,647 +1,792 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Registry = void 0;
7
- exports.browserDirectoryToMarkerFilePath = browserDirectoryToMarkerFilePath;
8
- exports.buildPlaywrightCLICommand = buildPlaywrightCLICommand;
9
- exports.findChromiumChannel = findChromiumChannel;
10
- exports.installBrowsersForNpmInstall = installBrowsersForNpmInstall;
11
- exports.registryDirectory = exports.registry = void 0;
12
- Object.defineProperty(exports, "writeDockerVersion", {
13
- enumerable: true,
14
- get: function () {
15
- return _dependencies.writeDockerVersion;
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
17
  }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var registry_exports = {};
30
+ __export(registry_exports, {
31
+ Registry: () => Registry,
32
+ browserDirectoryToMarkerFilePath: () => browserDirectoryToMarkerFilePath,
33
+ buildPlaywrightCLICommand: () => buildPlaywrightCLICommand,
34
+ findChromiumChannel: () => findChromiumChannel,
35
+ installBrowsersForNpmInstall: () => installBrowsersForNpmInstall,
36
+ registry: () => registry,
37
+ registryDirectory: () => registryDirectory,
38
+ writeDockerVersion: () => import_dependencies3.writeDockerVersion
17
39
  });
18
- var os = _interopRequireWildcard(require("os"));
19
- var _path = _interopRequireDefault(require("path"));
20
- var util = _interopRequireWildcard(require("util"));
21
- var fs = _interopRequireWildcard(require("fs"));
22
- var _utilsBundle = require("../../utilsBundle");
23
- var _network = require("../../utils/network");
24
- var _userAgent = require("../../utils/userAgent");
25
- var _utils = require("../../utils");
26
- var _fileUtils = require("../../utils/fileUtils");
27
- var _hostPlatform = require("../../utils/hostPlatform");
28
- var _spawnAsync = require("../../utils/spawnAsync");
29
- var _dependencies = require("./dependencies");
30
- var _browserFetcher = require("./browserFetcher");
31
- var _debugLogger = require("../../utils/debugLogger");
32
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
34
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
35
- /**
36
- * Copyright 2017 Google Inc. All rights reserved.
37
- * Modifications copyright (c) Microsoft Corporation.
38
- *
39
- * Licensed under the Apache License, Version 2.0 (the "License");
40
- * you may not use this file except in compliance with the License.
41
- * You may obtain a copy of the License at
42
- *
43
- * http://www.apache.org/licenses/LICENSE-2.0
44
- *
45
- * Unless required by applicable law or agreed to in writing, software
46
- * distributed under the License is distributed on an "AS IS" BASIS,
47
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
48
- * See the License for the specific language governing permissions and
49
- * limitations under the License.
50
- */
51
-
52
- const PACKAGE_PATH = _path.default.join(__dirname, '..', '..', '..');
53
- const BIN_PATH = _path.default.join(__dirname, '..', '..', '..', 'bin');
54
- const PLAYWRIGHT_CDN_MIRRORS = ['https://playwright.azureedge.net', 'https://playwright-akamai.azureedge.net', 'https://playwright-verizon.azureedge.net'];
40
+ module.exports = __toCommonJS(registry_exports);
41
+ var import_fs = __toESM(require("fs"));
42
+ var import_os = __toESM(require("os"));
43
+ var import_path = __toESM(require("path"));
44
+ var util = __toESM(require("util"));
45
+ var import_browserFetcher = require("./browserFetcher");
46
+ var import_dependencies = require("./dependencies");
47
+ var import_dependencies2 = require("./dependencies");
48
+ var import_utils = require("../../utils");
49
+ var import_ascii = require("../utils/ascii");
50
+ var import_debugLogger = require("../utils/debugLogger");
51
+ var import_hostPlatform = require("../utils/hostPlatform");
52
+ var import_network = require("../utils/network");
53
+ var import_spawnAsync = require("../utils/spawnAsync");
54
+ var import_userAgent = require("../utils/userAgent");
55
+ var import_utilsBundle = require("../../utilsBundle");
56
+ var import_fileUtils = require("../utils/fileUtils");
57
+ var import_dependencies3 = require("./dependencies");
58
+ const PACKAGE_PATH = import_path.default.join(__dirname, "..", "..", "..");
59
+ const BIN_PATH = import_path.default.join(__dirname, "..", "..", "..", "bin");
60
+ const PLAYWRIGHT_CDN_MIRRORS = [
61
+ "https://cdn.playwright.dev/dbazure/download/playwright",
62
+ // ESRP CDN
63
+ "https://playwright.download.prss.microsoft.com/dbazure/download/playwright",
64
+ // Directly hit ESRP CDN
65
+ "https://cdn.playwright.dev"
66
+ // Hit the Storage Bucket directly
67
+ ];
55
68
  if (process.env.PW_TEST_CDN_THAT_SHOULD_WORK) {
56
69
  for (let i = 0; i < PLAYWRIGHT_CDN_MIRRORS.length; i++) {
57
70
  const cdn = PLAYWRIGHT_CDN_MIRRORS[i];
58
- if (cdn !== process.env.PW_TEST_CDN_THAT_SHOULD_WORK) PLAYWRIGHT_CDN_MIRRORS[i] = cdn + '.does-not-resolve.playwright.dev';
71
+ if (cdn !== process.env.PW_TEST_CDN_THAT_SHOULD_WORK) {
72
+ const parsedCDN = new URL(cdn);
73
+ parsedCDN.hostname = parsedCDN.hostname + ".does-not-resolve.playwright.dev";
74
+ PLAYWRIGHT_CDN_MIRRORS[i] = parsedCDN.toString();
75
+ }
59
76
  }
60
77
  }
61
78
  const EXECUTABLE_PATHS = {
62
- 'chromium': {
63
- 'linux': ['chrome-linux', 'chrome'],
64
- 'mac': ['chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium'],
65
- 'win': ['chrome-win', 'chrome.exe']
79
+ "chromium": {
80
+ "linux": ["chrome-linux", "chrome"],
81
+ "mac": ["chrome-mac", "Chromium.app", "Contents", "MacOS", "Chromium"],
82
+ "win": ["chrome-win", "chrome.exe"]
66
83
  },
67
- 'chromium-headless-shell': {
68
- 'linux': ['chrome-linux', 'headless_shell'],
69
- 'mac': ['chrome-mac', 'headless_shell'],
70
- 'win': ['chrome-win', 'headless_shell.exe']
84
+ "chromium-headless-shell": {
85
+ "linux": ["chrome-linux", "headless_shell"],
86
+ "mac": ["chrome-mac", "headless_shell"],
87
+ "win": ["chrome-win", "headless_shell.exe"]
71
88
  },
72
- 'firefox': {
73
- 'linux': ['firefox', 'firefox'],
74
- 'mac': ['firefox', 'Nightly.app', 'Contents', 'MacOS', 'firefox'],
75
- 'win': ['firefox', 'firefox.exe']
89
+ "firefox": {
90
+ "linux": ["firefox", "firefox"],
91
+ "mac": ["firefox", "Nightly.app", "Contents", "MacOS", "firefox"],
92
+ "win": ["firefox", "firefox.exe"]
76
93
  },
77
- 'webkit': {
78
- 'linux': ['pw_run.sh'],
79
- 'mac': ['pw_run.sh'],
80
- 'win': ['Playwright.exe']
94
+ "webkit": {
95
+ "linux": ["pw_run.sh"],
96
+ "mac": ["pw_run.sh"],
97
+ "win": ["Playwright.exe"]
81
98
  },
82
- 'ffmpeg': {
83
- 'linux': ['ffmpeg-linux'],
84
- 'mac': ['ffmpeg-mac'],
85
- 'win': ['ffmpeg-win64.exe']
99
+ "ffmpeg": {
100
+ "linux": ["ffmpeg-linux"],
101
+ "mac": ["ffmpeg-mac"],
102
+ "win": ["ffmpeg-win64.exe"]
103
+ },
104
+ "winldd": {
105
+ "linux": void 0,
106
+ "mac": void 0,
107
+ "win": ["PrintDeps.exe"]
86
108
  }
87
109
  };
88
110
  const DOWNLOAD_PATHS = {
89
- 'chromium': {
90
- '<unknown>': undefined,
91
- 'ubuntu18.04-x64': undefined,
92
- 'ubuntu20.04-x64': 'builds/chromium/%s/chromium-linux.zip',
93
- 'ubuntu22.04-x64': 'builds/chromium/%s/chromium-linux.zip',
94
- 'ubuntu24.04-x64': 'builds/chromium/%s/chromium-linux.zip',
95
- 'ubuntu18.04-arm64': undefined,
96
- 'ubuntu20.04-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
97
- 'ubuntu22.04-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
98
- 'ubuntu24.04-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
99
- 'debian11-x64': 'builds/chromium/%s/chromium-linux.zip',
100
- 'debian11-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
101
- 'debian12-x64': 'builds/chromium/%s/chromium-linux.zip',
102
- 'debian12-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
103
- 'mac10.13': 'builds/chromium/%s/chromium-mac.zip',
104
- 'mac10.14': 'builds/chromium/%s/chromium-mac.zip',
105
- 'mac10.15': 'builds/chromium/%s/chromium-mac.zip',
106
- 'mac11': 'builds/chromium/%s/chromium-mac.zip',
107
- 'mac11-arm64': 'builds/chromium/%s/chromium-mac-arm64.zip',
108
- 'mac12': 'builds/chromium/%s/chromium-mac.zip',
109
- 'mac12-arm64': 'builds/chromium/%s/chromium-mac-arm64.zip',
110
- 'mac13': 'builds/chromium/%s/chromium-mac.zip',
111
- 'mac13-arm64': 'builds/chromium/%s/chromium-mac-arm64.zip',
112
- 'mac14': 'builds/chromium/%s/chromium-mac.zip',
113
- 'mac14-arm64': 'builds/chromium/%s/chromium-mac-arm64.zip',
114
- 'mac15': 'builds/chromium/%s/chromium-mac.zip',
115
- 'mac15-arm64': 'builds/chromium/%s/chromium-mac-arm64.zip',
116
- 'win64': 'builds/chromium/%s/chromium-win64.zip'
111
+ "chromium": {
112
+ "<unknown>": void 0,
113
+ "ubuntu18.04-x64": void 0,
114
+ "ubuntu20.04-x64": "builds/chromium/%s/chromium-linux.zip",
115
+ "ubuntu22.04-x64": "builds/chromium/%s/chromium-linux.zip",
116
+ "ubuntu24.04-x64": "builds/chromium/%s/chromium-linux.zip",
117
+ "ubuntu18.04-arm64": void 0,
118
+ "ubuntu20.04-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
119
+ "ubuntu22.04-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
120
+ "ubuntu24.04-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
121
+ "debian11-x64": "builds/chromium/%s/chromium-linux.zip",
122
+ "debian11-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
123
+ "debian12-x64": "builds/chromium/%s/chromium-linux.zip",
124
+ "debian12-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
125
+ "mac10.13": "builds/chromium/%s/chromium-mac.zip",
126
+ "mac10.14": "builds/chromium/%s/chromium-mac.zip",
127
+ "mac10.15": "builds/chromium/%s/chromium-mac.zip",
128
+ "mac11": "builds/chromium/%s/chromium-mac.zip",
129
+ "mac11-arm64": "builds/chromium/%s/chromium-mac-arm64.zip",
130
+ "mac12": "builds/chromium/%s/chromium-mac.zip",
131
+ "mac12-arm64": "builds/chromium/%s/chromium-mac-arm64.zip",
132
+ "mac13": "builds/chromium/%s/chromium-mac.zip",
133
+ "mac13-arm64": "builds/chromium/%s/chromium-mac-arm64.zip",
134
+ "mac14": "builds/chromium/%s/chromium-mac.zip",
135
+ "mac14-arm64": "builds/chromium/%s/chromium-mac-arm64.zip",
136
+ "mac15": "builds/chromium/%s/chromium-mac.zip",
137
+ "mac15-arm64": "builds/chromium/%s/chromium-mac-arm64.zip",
138
+ "win64": "builds/chromium/%s/chromium-win64.zip"
139
+ },
140
+ "chromium-headless-shell": {
141
+ "<unknown>": void 0,
142
+ "ubuntu18.04-x64": void 0,
143
+ "ubuntu20.04-x64": "builds/chromium/%s/chromium-headless-shell-linux.zip",
144
+ "ubuntu22.04-x64": "builds/chromium/%s/chromium-headless-shell-linux.zip",
145
+ "ubuntu24.04-x64": "builds/chromium/%s/chromium-headless-shell-linux.zip",
146
+ "ubuntu18.04-arm64": void 0,
147
+ "ubuntu20.04-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
148
+ "ubuntu22.04-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
149
+ "ubuntu24.04-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
150
+ "debian11-x64": "builds/chromium/%s/chromium-headless-shell-linux.zip",
151
+ "debian11-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
152
+ "debian12-x64": "builds/chromium/%s/chromium-headless-shell-linux.zip",
153
+ "debian12-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
154
+ "mac10.13": void 0,
155
+ "mac10.14": void 0,
156
+ "mac10.15": void 0,
157
+ "mac11": "builds/chromium/%s/chromium-headless-shell-mac.zip",
158
+ "mac11-arm64": "builds/chromium/%s/chromium-headless-shell-mac-arm64.zip",
159
+ "mac12": "builds/chromium/%s/chromium-headless-shell-mac.zip",
160
+ "mac12-arm64": "builds/chromium/%s/chromium-headless-shell-mac-arm64.zip",
161
+ "mac13": "builds/chromium/%s/chromium-headless-shell-mac.zip",
162
+ "mac13-arm64": "builds/chromium/%s/chromium-headless-shell-mac-arm64.zip",
163
+ "mac14": "builds/chromium/%s/chromium-headless-shell-mac.zip",
164
+ "mac14-arm64": "builds/chromium/%s/chromium-headless-shell-mac-arm64.zip",
165
+ "mac15": "builds/chromium/%s/chromium-headless-shell-mac.zip",
166
+ "mac15-arm64": "builds/chromium/%s/chromium-headless-shell-mac-arm64.zip",
167
+ "win64": "builds/chromium/%s/chromium-headless-shell-win64.zip"
117
168
  },
118
- 'chromium-headless-shell': {
119
- '<unknown>': undefined,
120
- 'ubuntu18.04-x64': undefined,
121
- 'ubuntu20.04-x64': 'builds/chromium/%s/chromium-headless-shell-linux.zip',
122
- 'ubuntu22.04-x64': 'builds/chromium/%s/chromium-headless-shell-linux.zip',
123
- 'ubuntu24.04-x64': 'builds/chromium/%s/chromium-headless-shell-linux.zip',
124
- 'ubuntu18.04-arm64': undefined,
125
- 'ubuntu20.04-arm64': 'builds/chromium/%s/chromium-headless-shell-linux-arm64.zip',
126
- 'ubuntu22.04-arm64': 'builds/chromium/%s/chromium-headless-shell-linux-arm64.zip',
127
- 'ubuntu24.04-arm64': 'builds/chromium/%s/chromium-headless-shell-linux-arm64.zip',
128
- 'debian11-x64': 'builds/chromium/%s/chromium-headless-shell-linux.zip',
129
- 'debian11-arm64': 'builds/chromium/%s/chromium-headless-shell-linux-arm64.zip',
130
- 'debian12-x64': 'builds/chromium/%s/chromium-headless-shell-linux.zip',
131
- 'debian12-arm64': 'builds/chromium/%s/chromium-headless-shell-linux-arm64.zip',
132
- 'mac10.13': undefined,
133
- 'mac10.14': undefined,
134
- 'mac10.15': undefined,
135
- 'mac11': 'builds/chromium/%s/chromium-headless-shell-mac.zip',
136
- 'mac11-arm64': 'builds/chromium/%s/chromium-headless-shell-mac-arm64.zip',
137
- 'mac12': 'builds/chromium/%s/chromium-headless-shell-mac.zip',
138
- 'mac12-arm64': 'builds/chromium/%s/chromium-headless-shell-mac-arm64.zip',
139
- 'mac13': 'builds/chromium/%s/chromium-headless-shell-mac.zip',
140
- 'mac13-arm64': 'builds/chromium/%s/chromium-headless-shell-mac-arm64.zip',
141
- 'mac14': 'builds/chromium/%s/chromium-headless-shell-mac.zip',
142
- 'mac14-arm64': 'builds/chromium/%s/chromium-headless-shell-mac-arm64.zip',
143
- 'mac15': 'builds/chromium/%s/chromium-headless-shell-mac.zip',
144
- 'mac15-arm64': 'builds/chromium/%s/chromium-headless-shell-mac-arm64.zip',
145
- 'win64': 'builds/chromium/%s/chromium-headless-shell-win64.zip'
169
+ "chromium-tip-of-tree": {
170
+ "<unknown>": void 0,
171
+ "ubuntu18.04-x64": void 0,
172
+ "ubuntu20.04-x64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip",
173
+ "ubuntu22.04-x64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip",
174
+ "ubuntu24.04-x64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip",
175
+ "ubuntu18.04-arm64": void 0,
176
+ "ubuntu20.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
177
+ "ubuntu22.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
178
+ "ubuntu24.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
179
+ "debian11-x64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip",
180
+ "debian11-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
181
+ "debian12-x64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip",
182
+ "debian12-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
183
+ "mac10.13": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip",
184
+ "mac10.14": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip",
185
+ "mac10.15": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip",
186
+ "mac11": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip",
187
+ "mac11-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip",
188
+ "mac12": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip",
189
+ "mac12-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip",
190
+ "mac13": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip",
191
+ "mac13-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip",
192
+ "mac14": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip",
193
+ "mac14-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip",
194
+ "mac15": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip",
195
+ "mac15-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip",
196
+ "win64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-win64.zip"
146
197
  },
147
- 'chromium-tip-of-tree': {
148
- '<unknown>': undefined,
149
- 'ubuntu18.04-x64': undefined,
150
- 'ubuntu20.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
151
- 'ubuntu22.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
152
- 'ubuntu24.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
153
- 'ubuntu18.04-arm64': undefined,
154
- 'ubuntu20.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
155
- 'ubuntu22.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
156
- 'ubuntu24.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
157
- 'debian11-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
158
- 'debian11-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
159
- 'debian12-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
160
- 'debian12-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
161
- 'mac10.13': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
162
- 'mac10.14': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
163
- 'mac10.15': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
164
- 'mac11': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
165
- 'mac11-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip',
166
- 'mac12': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
167
- 'mac12-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip',
168
- 'mac13': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
169
- 'mac13-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip',
170
- 'mac14': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
171
- 'mac14-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip',
172
- 'mac15': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
173
- 'mac15-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac-arm64.zip',
174
- 'win64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-win64.zip'
198
+ "chromium-tip-of-tree-headless-shell": {
199
+ "<unknown>": void 0,
200
+ "ubuntu18.04-x64": void 0,
201
+ "ubuntu20.04-x64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip",
202
+ "ubuntu22.04-x64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip",
203
+ "ubuntu24.04-x64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip",
204
+ "ubuntu18.04-arm64": void 0,
205
+ "ubuntu20.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
206
+ "ubuntu22.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
207
+ "ubuntu24.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
208
+ "debian11-x64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip",
209
+ "debian11-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
210
+ "debian12-x64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux.zip",
211
+ "debian12-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
212
+ "mac10.13": void 0,
213
+ "mac10.14": void 0,
214
+ "mac10.15": void 0,
215
+ "mac11": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac.zip",
216
+ "mac11-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac-arm64.zip",
217
+ "mac12": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac.zip",
218
+ "mac12-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac-arm64.zip",
219
+ "mac13": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac.zip",
220
+ "mac13-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac-arm64.zip",
221
+ "mac14": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac.zip",
222
+ "mac14-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac-arm64.zip",
223
+ "mac15": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac.zip",
224
+ "mac15-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-mac-arm64.zip",
225
+ "win64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-win64.zip"
175
226
  },
176
- 'firefox': {
177
- '<unknown>': undefined,
178
- 'ubuntu18.04-x64': undefined,
179
- 'ubuntu20.04-x64': 'builds/firefox/%s/firefox-ubuntu-20.04.zip',
180
- 'ubuntu22.04-x64': 'builds/firefox/%s/firefox-ubuntu-22.04.zip',
181
- 'ubuntu24.04-x64': 'builds/firefox/%s/firefox-ubuntu-24.04.zip',
182
- 'ubuntu18.04-arm64': undefined,
183
- 'ubuntu20.04-arm64': 'builds/firefox/%s/firefox-ubuntu-20.04-arm64.zip',
184
- 'ubuntu22.04-arm64': 'builds/firefox/%s/firefox-ubuntu-22.04-arm64.zip',
185
- 'ubuntu24.04-arm64': 'builds/firefox/%s/firefox-ubuntu-24.04-arm64.zip',
186
- 'debian11-x64': 'builds/firefox/%s/firefox-debian-11.zip',
187
- 'debian11-arm64': 'builds/firefox/%s/firefox-debian-11-arm64.zip',
188
- 'debian12-x64': 'builds/firefox/%s/firefox-debian-12.zip',
189
- 'debian12-arm64': 'builds/firefox/%s/firefox-debian-12-arm64.zip',
190
- 'mac10.13': 'builds/firefox/%s/firefox-mac.zip',
191
- 'mac10.14': 'builds/firefox/%s/firefox-mac.zip',
192
- 'mac10.15': 'builds/firefox/%s/firefox-mac.zip',
193
- 'mac11': 'builds/firefox/%s/firefox-mac.zip',
194
- 'mac11-arm64': 'builds/firefox/%s/firefox-mac-arm64.zip',
195
- 'mac12': 'builds/firefox/%s/firefox-mac.zip',
196
- 'mac12-arm64': 'builds/firefox/%s/firefox-mac-arm64.zip',
197
- 'mac13': 'builds/firefox/%s/firefox-mac.zip',
198
- 'mac13-arm64': 'builds/firefox/%s/firefox-mac-arm64.zip',
199
- 'mac14': 'builds/firefox/%s/firefox-mac.zip',
200
- 'mac14-arm64': 'builds/firefox/%s/firefox-mac-arm64.zip',
201
- 'mac15': 'builds/firefox/%s/firefox-mac.zip',
202
- 'mac15-arm64': 'builds/firefox/%s/firefox-mac-arm64.zip',
203
- 'win64': 'builds/firefox/%s/firefox-win64.zip'
227
+ "firefox": {
228
+ "<unknown>": void 0,
229
+ "ubuntu18.04-x64": void 0,
230
+ "ubuntu20.04-x64": "builds/firefox/%s/firefox-ubuntu-20.04.zip",
231
+ "ubuntu22.04-x64": "builds/firefox/%s/firefox-ubuntu-22.04.zip",
232
+ "ubuntu24.04-x64": "builds/firefox/%s/firefox-ubuntu-24.04.zip",
233
+ "ubuntu18.04-arm64": void 0,
234
+ "ubuntu20.04-arm64": "builds/firefox/%s/firefox-ubuntu-20.04-arm64.zip",
235
+ "ubuntu22.04-arm64": "builds/firefox/%s/firefox-ubuntu-22.04-arm64.zip",
236
+ "ubuntu24.04-arm64": "builds/firefox/%s/firefox-ubuntu-24.04-arm64.zip",
237
+ "debian11-x64": "builds/firefox/%s/firefox-debian-11.zip",
238
+ "debian11-arm64": "builds/firefox/%s/firefox-debian-11-arm64.zip",
239
+ "debian12-x64": "builds/firefox/%s/firefox-debian-12.zip",
240
+ "debian12-arm64": "builds/firefox/%s/firefox-debian-12-arm64.zip",
241
+ "mac10.13": "builds/firefox/%s/firefox-mac.zip",
242
+ "mac10.14": "builds/firefox/%s/firefox-mac.zip",
243
+ "mac10.15": "builds/firefox/%s/firefox-mac.zip",
244
+ "mac11": "builds/firefox/%s/firefox-mac.zip",
245
+ "mac11-arm64": "builds/firefox/%s/firefox-mac-arm64.zip",
246
+ "mac12": "builds/firefox/%s/firefox-mac.zip",
247
+ "mac12-arm64": "builds/firefox/%s/firefox-mac-arm64.zip",
248
+ "mac13": "builds/firefox/%s/firefox-mac.zip",
249
+ "mac13-arm64": "builds/firefox/%s/firefox-mac-arm64.zip",
250
+ "mac14": "builds/firefox/%s/firefox-mac.zip",
251
+ "mac14-arm64": "builds/firefox/%s/firefox-mac-arm64.zip",
252
+ "mac15": "builds/firefox/%s/firefox-mac.zip",
253
+ "mac15-arm64": "builds/firefox/%s/firefox-mac-arm64.zip",
254
+ "win64": "builds/firefox/%s/firefox-win64.zip"
204
255
  },
205
- 'firefox-beta': {
206
- '<unknown>': undefined,
207
- 'ubuntu18.04-x64': undefined,
208
- 'ubuntu20.04-x64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-20.04.zip',
209
- 'ubuntu22.04-x64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-22.04.zip',
210
- 'ubuntu24.04-x64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-24.04.zip',
211
- 'ubuntu18.04-arm64': undefined,
212
- 'ubuntu20.04-arm64': undefined,
213
- 'ubuntu22.04-arm64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-22.04-arm64.zip',
214
- 'ubuntu24.04-arm64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-24.04-arm64.zip',
215
- 'debian11-x64': 'builds/firefox-beta/%s/firefox-beta-debian-11.zip',
216
- 'debian11-arm64': 'builds/firefox-beta/%s/firefox-beta-debian-11-arm64.zip',
217
- 'debian12-x64': 'builds/firefox-beta/%s/firefox-beta-debian-12.zip',
218
- 'debian12-arm64': 'builds/firefox-beta/%s/firefox-beta-debian-12-arm64.zip',
219
- 'mac10.13': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
220
- 'mac10.14': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
221
- 'mac10.15': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
222
- 'mac11': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
223
- 'mac11-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-arm64.zip',
224
- 'mac12': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
225
- 'mac12-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-arm64.zip',
226
- 'mac13': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
227
- 'mac13-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-arm64.zip',
228
- 'mac14': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
229
- 'mac14-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-arm64.zip',
230
- 'mac15': 'builds/firefox-beta/%s/firefox-beta-mac.zip',
231
- 'mac15-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-arm64.zip',
232
- 'win64': 'builds/firefox-beta/%s/firefox-beta-win64.zip'
256
+ "firefox-beta": {
257
+ "<unknown>": void 0,
258
+ "ubuntu18.04-x64": void 0,
259
+ "ubuntu20.04-x64": "builds/firefox-beta/%s/firefox-beta-ubuntu-20.04.zip",
260
+ "ubuntu22.04-x64": "builds/firefox-beta/%s/firefox-beta-ubuntu-22.04.zip",
261
+ "ubuntu24.04-x64": "builds/firefox-beta/%s/firefox-beta-ubuntu-24.04.zip",
262
+ "ubuntu18.04-arm64": void 0,
263
+ "ubuntu20.04-arm64": void 0,
264
+ "ubuntu22.04-arm64": "builds/firefox-beta/%s/firefox-beta-ubuntu-22.04-arm64.zip",
265
+ "ubuntu24.04-arm64": "builds/firefox-beta/%s/firefox-beta-ubuntu-24.04-arm64.zip",
266
+ "debian11-x64": "builds/firefox-beta/%s/firefox-beta-debian-11.zip",
267
+ "debian11-arm64": "builds/firefox-beta/%s/firefox-beta-debian-11-arm64.zip",
268
+ "debian12-x64": "builds/firefox-beta/%s/firefox-beta-debian-12.zip",
269
+ "debian12-arm64": "builds/firefox-beta/%s/firefox-beta-debian-12-arm64.zip",
270
+ "mac10.13": "builds/firefox-beta/%s/firefox-beta-mac.zip",
271
+ "mac10.14": "builds/firefox-beta/%s/firefox-beta-mac.zip",
272
+ "mac10.15": "builds/firefox-beta/%s/firefox-beta-mac.zip",
273
+ "mac11": "builds/firefox-beta/%s/firefox-beta-mac.zip",
274
+ "mac11-arm64": "builds/firefox-beta/%s/firefox-beta-mac-arm64.zip",
275
+ "mac12": "builds/firefox-beta/%s/firefox-beta-mac.zip",
276
+ "mac12-arm64": "builds/firefox-beta/%s/firefox-beta-mac-arm64.zip",
277
+ "mac13": "builds/firefox-beta/%s/firefox-beta-mac.zip",
278
+ "mac13-arm64": "builds/firefox-beta/%s/firefox-beta-mac-arm64.zip",
279
+ "mac14": "builds/firefox-beta/%s/firefox-beta-mac.zip",
280
+ "mac14-arm64": "builds/firefox-beta/%s/firefox-beta-mac-arm64.zip",
281
+ "mac15": "builds/firefox-beta/%s/firefox-beta-mac.zip",
282
+ "mac15-arm64": "builds/firefox-beta/%s/firefox-beta-mac-arm64.zip",
283
+ "win64": "builds/firefox-beta/%s/firefox-beta-win64.zip"
233
284
  },
234
- 'webkit': {
235
- '<unknown>': undefined,
236
- 'ubuntu18.04-x64': undefined,
237
- 'ubuntu20.04-x64': 'builds/webkit/%s/webkit-ubuntu-20.04.zip',
238
- 'ubuntu22.04-x64': 'builds/webkit/%s/webkit-ubuntu-22.04.zip',
239
- 'ubuntu24.04-x64': 'builds/webkit/%s/webkit-ubuntu-24.04.zip',
240
- 'ubuntu18.04-arm64': undefined,
241
- 'ubuntu20.04-arm64': 'builds/webkit/%s/webkit-ubuntu-20.04-arm64.zip',
242
- 'ubuntu22.04-arm64': 'builds/webkit/%s/webkit-ubuntu-22.04-arm64.zip',
243
- 'ubuntu24.04-arm64': 'builds/webkit/%s/webkit-ubuntu-24.04-arm64.zip',
244
- 'debian11-x64': 'builds/webkit/%s/webkit-debian-11.zip',
245
- 'debian11-arm64': 'builds/webkit/%s/webkit-debian-11-arm64.zip',
246
- 'debian12-x64': 'builds/webkit/%s/webkit-debian-12.zip',
247
- 'debian12-arm64': 'builds/webkit/%s/webkit-debian-12-arm64.zip',
248
- 'mac10.13': undefined,
249
- 'mac10.14': 'builds/deprecated-webkit-mac-10.14/%s/deprecated-webkit-mac-10.14.zip',
250
- 'mac10.15': 'builds/deprecated-webkit-mac-10.15/%s/deprecated-webkit-mac-10.15.zip',
251
- 'mac11': 'builds/webkit/%s/webkit-mac-11.zip',
252
- 'mac11-arm64': 'builds/webkit/%s/webkit-mac-11-arm64.zip',
253
- 'mac12': 'builds/webkit/%s/webkit-mac-12.zip',
254
- 'mac12-arm64': 'builds/webkit/%s/webkit-mac-12-arm64.zip',
255
- 'mac13': 'builds/webkit/%s/webkit-mac-13.zip',
256
- 'mac13-arm64': 'builds/webkit/%s/webkit-mac-13-arm64.zip',
257
- 'mac14': 'builds/webkit/%s/webkit-mac-14.zip',
258
- 'mac14-arm64': 'builds/webkit/%s/webkit-mac-14-arm64.zip',
259
- 'mac15': 'builds/webkit/%s/webkit-mac-15.zip',
260
- 'mac15-arm64': 'builds/webkit/%s/webkit-mac-15-arm64.zip',
261
- 'win64': 'builds/webkit/%s/webkit-win64.zip'
285
+ "webkit": {
286
+ "<unknown>": void 0,
287
+ "ubuntu18.04-x64": void 0,
288
+ "ubuntu20.04-x64": "builds/webkit/%s/webkit-ubuntu-20.04.zip",
289
+ "ubuntu22.04-x64": "builds/webkit/%s/webkit-ubuntu-22.04.zip",
290
+ "ubuntu24.04-x64": "builds/webkit/%s/webkit-ubuntu-24.04.zip",
291
+ "ubuntu18.04-arm64": void 0,
292
+ "ubuntu20.04-arm64": "builds/webkit/%s/webkit-ubuntu-20.04-arm64.zip",
293
+ "ubuntu22.04-arm64": "builds/webkit/%s/webkit-ubuntu-22.04-arm64.zip",
294
+ "ubuntu24.04-arm64": "builds/webkit/%s/webkit-ubuntu-24.04-arm64.zip",
295
+ "debian11-x64": "builds/webkit/%s/webkit-debian-11.zip",
296
+ "debian11-arm64": "builds/webkit/%s/webkit-debian-11-arm64.zip",
297
+ "debian12-x64": "builds/webkit/%s/webkit-debian-12.zip",
298
+ "debian12-arm64": "builds/webkit/%s/webkit-debian-12-arm64.zip",
299
+ "mac10.13": void 0,
300
+ "mac10.14": "builds/deprecated-webkit-mac-10.14/%s/deprecated-webkit-mac-10.14.zip",
301
+ "mac10.15": "builds/deprecated-webkit-mac-10.15/%s/deprecated-webkit-mac-10.15.zip",
302
+ "mac11": "builds/webkit/%s/webkit-mac-11.zip",
303
+ "mac11-arm64": "builds/webkit/%s/webkit-mac-11-arm64.zip",
304
+ "mac12": "builds/webkit/%s/webkit-mac-12.zip",
305
+ "mac12-arm64": "builds/webkit/%s/webkit-mac-12-arm64.zip",
306
+ "mac13": "builds/webkit/%s/webkit-mac-13.zip",
307
+ "mac13-arm64": "builds/webkit/%s/webkit-mac-13-arm64.zip",
308
+ "mac14": "builds/webkit/%s/webkit-mac-14.zip",
309
+ "mac14-arm64": "builds/webkit/%s/webkit-mac-14-arm64.zip",
310
+ "mac15": "builds/webkit/%s/webkit-mac-15.zip",
311
+ "mac15-arm64": "builds/webkit/%s/webkit-mac-15-arm64.zip",
312
+ "win64": "builds/webkit/%s/webkit-win64.zip"
262
313
  },
263
- 'ffmpeg': {
264
- '<unknown>': undefined,
265
- 'ubuntu18.04-x64': undefined,
266
- 'ubuntu20.04-x64': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
267
- 'ubuntu22.04-x64': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
268
- 'ubuntu24.04-x64': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
269
- 'ubuntu18.04-arm64': undefined,
270
- 'ubuntu20.04-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
271
- 'ubuntu22.04-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
272
- 'ubuntu24.04-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
273
- 'debian11-x64': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
274
- 'debian11-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
275
- 'debian12-x64': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
276
- 'debian12-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
277
- 'mac10.13': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
278
- 'mac10.14': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
279
- 'mac10.15': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
280
- 'mac11': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
281
- 'mac11-arm64': 'builds/ffmpeg/%s/ffmpeg-mac-arm64.zip',
282
- 'mac12': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
283
- 'mac12-arm64': 'builds/ffmpeg/%s/ffmpeg-mac-arm64.zip',
284
- 'mac13': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
285
- 'mac13-arm64': 'builds/ffmpeg/%s/ffmpeg-mac-arm64.zip',
286
- 'mac14': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
287
- 'mac14-arm64': 'builds/ffmpeg/%s/ffmpeg-mac-arm64.zip',
288
- 'mac15': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
289
- 'mac15-arm64': 'builds/ffmpeg/%s/ffmpeg-mac-arm64.zip',
290
- 'win64': 'builds/ffmpeg/%s/ffmpeg-win64.zip'
314
+ "ffmpeg": {
315
+ "<unknown>": void 0,
316
+ "ubuntu18.04-x64": void 0,
317
+ "ubuntu20.04-x64": "builds/ffmpeg/%s/ffmpeg-linux.zip",
318
+ "ubuntu22.04-x64": "builds/ffmpeg/%s/ffmpeg-linux.zip",
319
+ "ubuntu24.04-x64": "builds/ffmpeg/%s/ffmpeg-linux.zip",
320
+ "ubuntu18.04-arm64": void 0,
321
+ "ubuntu20.04-arm64": "builds/ffmpeg/%s/ffmpeg-linux-arm64.zip",
322
+ "ubuntu22.04-arm64": "builds/ffmpeg/%s/ffmpeg-linux-arm64.zip",
323
+ "ubuntu24.04-arm64": "builds/ffmpeg/%s/ffmpeg-linux-arm64.zip",
324
+ "debian11-x64": "builds/ffmpeg/%s/ffmpeg-linux.zip",
325
+ "debian11-arm64": "builds/ffmpeg/%s/ffmpeg-linux-arm64.zip",
326
+ "debian12-x64": "builds/ffmpeg/%s/ffmpeg-linux.zip",
327
+ "debian12-arm64": "builds/ffmpeg/%s/ffmpeg-linux-arm64.zip",
328
+ "mac10.13": "builds/ffmpeg/%s/ffmpeg-mac.zip",
329
+ "mac10.14": "builds/ffmpeg/%s/ffmpeg-mac.zip",
330
+ "mac10.15": "builds/ffmpeg/%s/ffmpeg-mac.zip",
331
+ "mac11": "builds/ffmpeg/%s/ffmpeg-mac.zip",
332
+ "mac11-arm64": "builds/ffmpeg/%s/ffmpeg-mac-arm64.zip",
333
+ "mac12": "builds/ffmpeg/%s/ffmpeg-mac.zip",
334
+ "mac12-arm64": "builds/ffmpeg/%s/ffmpeg-mac-arm64.zip",
335
+ "mac13": "builds/ffmpeg/%s/ffmpeg-mac.zip",
336
+ "mac13-arm64": "builds/ffmpeg/%s/ffmpeg-mac-arm64.zip",
337
+ "mac14": "builds/ffmpeg/%s/ffmpeg-mac.zip",
338
+ "mac14-arm64": "builds/ffmpeg/%s/ffmpeg-mac-arm64.zip",
339
+ "mac15": "builds/ffmpeg/%s/ffmpeg-mac.zip",
340
+ "mac15-arm64": "builds/ffmpeg/%s/ffmpeg-mac-arm64.zip",
341
+ "win64": "builds/ffmpeg/%s/ffmpeg-win64.zip"
291
342
  },
292
- 'android': {
293
- '<unknown>': 'builds/android/%s/android.zip',
294
- 'ubuntu18.04-x64': undefined,
295
- 'ubuntu20.04-x64': 'builds/android/%s/android.zip',
296
- 'ubuntu22.04-x64': 'builds/android/%s/android.zip',
297
- 'ubuntu24.04-x64': 'builds/android/%s/android.zip',
298
- 'ubuntu18.04-arm64': undefined,
299
- 'ubuntu20.04-arm64': 'builds/android/%s/android.zip',
300
- 'ubuntu22.04-arm64': 'builds/android/%s/android.zip',
301
- 'ubuntu24.04-arm64': 'builds/android/%s/android.zip',
302
- 'debian11-x64': 'builds/android/%s/android.zip',
303
- 'debian11-arm64': 'builds/android/%s/android.zip',
304
- 'debian12-x64': 'builds/android/%s/android.zip',
305
- 'debian12-arm64': 'builds/android/%s/android.zip',
306
- 'mac10.13': 'builds/android/%s/android.zip',
307
- 'mac10.14': 'builds/android/%s/android.zip',
308
- 'mac10.15': 'builds/android/%s/android.zip',
309
- 'mac11': 'builds/android/%s/android.zip',
310
- 'mac11-arm64': 'builds/android/%s/android.zip',
311
- 'mac12': 'builds/android/%s/android.zip',
312
- 'mac12-arm64': 'builds/android/%s/android.zip',
313
- 'mac13': 'builds/android/%s/android.zip',
314
- 'mac13-arm64': 'builds/android/%s/android.zip',
315
- 'mac14': 'builds/android/%s/android.zip',
316
- 'mac14-arm64': 'builds/android/%s/android.zip',
317
- 'mac15': 'builds/android/%s/android.zip',
318
- 'mac15-arm64': 'builds/android/%s/android.zip',
319
- 'win64': 'builds/android/%s/android.zip'
343
+ "winldd": {
344
+ "<unknown>": void 0,
345
+ "ubuntu18.04-x64": void 0,
346
+ "ubuntu20.04-x64": void 0,
347
+ "ubuntu22.04-x64": void 0,
348
+ "ubuntu24.04-x64": void 0,
349
+ "ubuntu18.04-arm64": void 0,
350
+ "ubuntu20.04-arm64": void 0,
351
+ "ubuntu22.04-arm64": void 0,
352
+ "ubuntu24.04-arm64": void 0,
353
+ "debian11-x64": void 0,
354
+ "debian11-arm64": void 0,
355
+ "debian12-x64": void 0,
356
+ "debian12-arm64": void 0,
357
+ "mac10.13": void 0,
358
+ "mac10.14": void 0,
359
+ "mac10.15": void 0,
360
+ "mac11": void 0,
361
+ "mac11-arm64": void 0,
362
+ "mac12": void 0,
363
+ "mac12-arm64": void 0,
364
+ "mac13": void 0,
365
+ "mac13-arm64": void 0,
366
+ "mac14": void 0,
367
+ "mac14-arm64": void 0,
368
+ "mac15": void 0,
369
+ "mac15-arm64": void 0,
370
+ "win64": "builds/winldd/%s/winldd-win64.zip"
371
+ },
372
+ "android": {
373
+ "<unknown>": "builds/android/%s/android.zip",
374
+ "ubuntu18.04-x64": void 0,
375
+ "ubuntu20.04-x64": "builds/android/%s/android.zip",
376
+ "ubuntu22.04-x64": "builds/android/%s/android.zip",
377
+ "ubuntu24.04-x64": "builds/android/%s/android.zip",
378
+ "ubuntu18.04-arm64": void 0,
379
+ "ubuntu20.04-arm64": "builds/android/%s/android.zip",
380
+ "ubuntu22.04-arm64": "builds/android/%s/android.zip",
381
+ "ubuntu24.04-arm64": "builds/android/%s/android.zip",
382
+ "debian11-x64": "builds/android/%s/android.zip",
383
+ "debian11-arm64": "builds/android/%s/android.zip",
384
+ "debian12-x64": "builds/android/%s/android.zip",
385
+ "debian12-arm64": "builds/android/%s/android.zip",
386
+ "mac10.13": "builds/android/%s/android.zip",
387
+ "mac10.14": "builds/android/%s/android.zip",
388
+ "mac10.15": "builds/android/%s/android.zip",
389
+ "mac11": "builds/android/%s/android.zip",
390
+ "mac11-arm64": "builds/android/%s/android.zip",
391
+ "mac12": "builds/android/%s/android.zip",
392
+ "mac12-arm64": "builds/android/%s/android.zip",
393
+ "mac13": "builds/android/%s/android.zip",
394
+ "mac13-arm64": "builds/android/%s/android.zip",
395
+ "mac14": "builds/android/%s/android.zip",
396
+ "mac14-arm64": "builds/android/%s/android.zip",
397
+ "mac15": "builds/android/%s/android.zip",
398
+ "mac15-arm64": "builds/android/%s/android.zip",
399
+ "win64": "builds/android/%s/android.zip"
320
400
  },
321
401
  // TODO(bidi): implement downloads.
322
- 'bidi': {}
402
+ "bidi": {}
323
403
  };
324
- const registryDirectory = exports.registryDirectory = (() => {
404
+ const registryDirectory = (() => {
325
405
  let result;
326
- const envDefined = (0, _utils.getFromENV)('PLAYWRIGHT_BROWSERS_PATH');
327
- if (envDefined === '0') {
328
- result = _path.default.join(__dirname, '..', '..', '..', '.local-browsers');
406
+ const envDefined = (0, import_utils.getFromENV)("PLAYWRIGHT_BROWSERS_PATH");
407
+ if (envDefined === "0") {
408
+ result = import_path.default.join(__dirname, "..", "..", "..", ".local-browsers");
329
409
  } else if (envDefined) {
330
410
  result = envDefined;
331
411
  } else {
332
412
  let cacheDirectory;
333
- if (process.platform === 'linux') cacheDirectory = process.env.XDG_CACHE_HOME || _path.default.join(os.homedir(), '.cache');else if (process.platform === 'darwin') cacheDirectory = _path.default.join(os.homedir(), 'Library', 'Caches');else if (process.platform === 'win32') cacheDirectory = process.env.LOCALAPPDATA || _path.default.join(os.homedir(), 'AppData', 'Local');else throw new Error('Unsupported platform: ' + process.platform);
334
- result = _path.default.join(cacheDirectory, 'ms-playwright');
413
+ if (process.platform === "linux")
414
+ cacheDirectory = process.env.XDG_CACHE_HOME || import_path.default.join(import_os.default.homedir(), ".cache");
415
+ else if (process.platform === "darwin")
416
+ cacheDirectory = import_path.default.join(import_os.default.homedir(), "Library", "Caches");
417
+ else if (process.platform === "win32")
418
+ cacheDirectory = process.env.LOCALAPPDATA || import_path.default.join(import_os.default.homedir(), "AppData", "Local");
419
+ else
420
+ throw new Error("Unsupported platform: " + process.platform);
421
+ result = import_path.default.join(cacheDirectory, "ms-playwright");
335
422
  }
336
- if (!_path.default.isAbsolute(result)) {
337
- // It is important to resolve to the absolute path:
338
- // - for unzipping to work correctly;
339
- // - so that registry directory matches between installation and execution.
340
- // INIT_CWD points to the root of `npm/yarn install` and is probably what
341
- // the user meant when typing the relative path.
342
- result = _path.default.resolve((0, _utils.getFromENV)('INIT_CWD') || process.cwd(), result);
423
+ if (!import_path.default.isAbsolute(result)) {
424
+ result = import_path.default.resolve((0, import_utils.getFromENV)("INIT_CWD") || process.cwd(), result);
343
425
  }
344
426
  return result;
345
427
  })();
346
428
  function isBrowserDirectory(browserDirectory) {
347
- const baseName = _path.default.basename(browserDirectory);
429
+ const baseName = import_path.default.basename(browserDirectory);
348
430
  for (const browserName of allDownloadable) {
349
- if (baseName.startsWith(browserName.replace(/-/g, '_') + '-')) return true;
431
+ if (baseName.startsWith(browserName.replace(/-/g, "_") + "-"))
432
+ return true;
350
433
  }
351
434
  return false;
352
435
  }
353
436
  function readDescriptors(browsersJSON) {
354
- return browsersJSON['browsers'].map(obj => {
437
+ return browsersJSON["browsers"].map((obj) => {
355
438
  const name = obj.name;
356
- const revisionOverride = (obj.revisionOverrides || {})[_hostPlatform.hostPlatform];
439
+ const revisionOverride = (obj.revisionOverrides || {})[import_hostPlatform.hostPlatform];
357
440
  const revision = revisionOverride || obj.revision;
358
- const browserDirectoryPrefix = revisionOverride ? `${name}_${_hostPlatform.hostPlatform}_special` : `${name}`;
441
+ const browserDirectoryPrefix = revisionOverride ? `${name}_${import_hostPlatform.hostPlatform}_special` : `${name}`;
359
442
  const descriptor = {
360
443
  name,
361
444
  revision,
362
445
  hasRevisionOverride: !!revisionOverride,
363
446
  // We only put browser version for the supported operating systems.
364
- browserVersion: revisionOverride ? undefined : obj.browserVersion,
447
+ browserVersion: revisionOverride ? void 0 : obj.browserVersion,
365
448
  installByDefault: !!obj.installByDefault,
366
449
  // Method `isBrowserDirectory` determines directory to be browser iff
367
450
  // it starts with some browser name followed by '-'. Some browser names
368
451
  // are prefixes of others, e.g. 'webkit' is a prefix of `webkit-technology-preview`.
369
452
  // To avoid older registries erroneously removing 'webkit-technology-preview', we have to
370
453
  // ensure that browser folders to never include dashes inside.
371
- dir: _path.default.join(registryDirectory, browserDirectoryPrefix.replace(/-/g, '_') + '-' + revision)
454
+ dir: import_path.default.join(registryDirectory, browserDirectoryPrefix.replace(/-/g, "_") + "-" + revision)
372
455
  };
373
456
  return descriptor;
374
457
  });
375
458
  }
376
- const allDownloadable = ['android', 'chromium', 'firefox', 'webkit', 'ffmpeg', 'firefox-beta', 'chromium-tip-of-tree', 'chromium-headless-shell'];
459
+ const allDownloadable = ["android", "chromium", "firefox", "webkit", "ffmpeg", "firefox-beta", "chromium-tip-of-tree", "chromium-headless-shell", "chromium-tip-of-tree-headless-shell"];
377
460
  class Registry {
378
461
  constructor(browsersJSON) {
379
- this._executables = void 0;
380
462
  const descriptors = readDescriptors(browsersJSON);
381
463
  const findExecutablePath = (dir, name) => {
382
- let tokens = undefined;
383
- if (process.platform === 'linux') tokens = EXECUTABLE_PATHS[name]['linux'];else if (process.platform === 'darwin') tokens = EXECUTABLE_PATHS[name]['mac'];else if (process.platform === 'win32') tokens = EXECUTABLE_PATHS[name]['win'];
384
- return tokens ? _path.default.join(dir, ...tokens) : undefined;
464
+ let tokens = void 0;
465
+ if (process.platform === "linux")
466
+ tokens = EXECUTABLE_PATHS[name]["linux"];
467
+ else if (process.platform === "darwin")
468
+ tokens = EXECUTABLE_PATHS[name]["mac"];
469
+ else if (process.platform === "win32")
470
+ tokens = EXECUTABLE_PATHS[name]["win"];
471
+ return tokens ? import_path.default.join(dir, ...tokens) : void 0;
385
472
  };
386
473
  const executablePathOrDie = (name, e, installByDefault, sdkLanguage) => {
387
- if (!e) throw new Error(`${name} is not supported on ${_hostPlatform.hostPlatform}`);
388
- const installCommand = buildPlaywrightCLICommand(sdkLanguage, `install${installByDefault ? '' : ' ' + name}`);
389
- if (!(0, _fileUtils.canAccessFile)(e)) {
390
- const currentDockerVersion = (0, _dependencies.readDockerVersionSync)();
391
- const preferredDockerVersion = currentDockerVersion ? (0, _dependencies.dockerVersion)(currentDockerVersion.dockerImageNameTemplate) : null;
474
+ if (!e)
475
+ throw new Error(`${name} is not supported on ${import_hostPlatform.hostPlatform}`);
476
+ const installCommand = buildPlaywrightCLICommand(sdkLanguage, `install${installByDefault ? "" : " " + name}`);
477
+ if (!(0, import_fileUtils.canAccessFile)(e)) {
478
+ const currentDockerVersion = (0, import_dependencies.readDockerVersionSync)();
479
+ const preferredDockerVersion = currentDockerVersion ? (0, import_dependencies.dockerVersion)(currentDockerVersion.dockerImageNameTemplate) : null;
392
480
  const isOutdatedDockerImage = currentDockerVersion && preferredDockerVersion && currentDockerVersion.dockerImageName !== preferredDockerVersion.dockerImageName;
393
- const prettyMessage = isOutdatedDockerImage ? [`Looks like ${sdkLanguage === 'javascript' ? 'Playwright Test or ' : ''}Playwright was just updated to ${preferredDockerVersion.driverVersion}.`, `Please update docker image as well.`, `- current: ${currentDockerVersion.dockerImageName}`, `- required: ${preferredDockerVersion.dockerImageName}`, ``, `<3 Playwright Team`].join('\n') : [`Looks like ${sdkLanguage === 'javascript' ? 'Playwright Test or ' : ''}Playwright was just installed or updated.`, `Please run the following command to download new browser${installByDefault ? 's' : ''}:`, ``, ` ${installCommand}`, ``, `<3 Playwright Team`].join('\n');
394
- throw new Error(`Executable doesn't exist at ${e}\n${(0, _utils.wrapInASCIIBox)(prettyMessage, 1)}`);
481
+ const prettyMessage = isOutdatedDockerImage ? [
482
+ `Looks like ${sdkLanguage === "javascript" ? "Playwright Test or " : ""}Playwright was just updated to ${preferredDockerVersion.driverVersion}.`,
483
+ `Please update docker image as well.`,
484
+ `- current: ${currentDockerVersion.dockerImageName}`,
485
+ `- required: ${preferredDockerVersion.dockerImageName}`,
486
+ ``,
487
+ `<3 Playwright Team`
488
+ ].join("\n") : [
489
+ `Looks like ${sdkLanguage === "javascript" ? "Playwright Test or " : ""}Playwright was just installed or updated.`,
490
+ `Please run the following command to download new browser${installByDefault ? "s" : ""}:`,
491
+ ``,
492
+ ` ${installCommand}`,
493
+ ``,
494
+ `<3 Playwright Team`
495
+ ].join("\n");
496
+ throw new Error(`Executable doesn't exist at ${e}
497
+ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
395
498
  }
396
499
  return e;
397
500
  };
398
501
  this._executables = [];
399
- const chromium = descriptors.find(d => d.name === 'chromium');
400
- const chromiumExecutable = findExecutablePath(chromium.dir, 'chromium');
502
+ const chromium = descriptors.find((d) => d.name === "chromium");
503
+ const chromiumExecutable = findExecutablePath(chromium.dir, "chromium");
401
504
  this._executables.push({
402
- type: 'browser',
403
- name: 'chromium',
404
- browserName: 'chromium',
505
+ type: "browser",
506
+ name: "chromium",
507
+ browserName: "chromium",
405
508
  directory: chromium.dir,
406
509
  executablePath: () => chromiumExecutable,
407
- executablePathOrDie: sdkLanguage => executablePathOrDie('chromium', chromiumExecutable, chromium.installByDefault, sdkLanguage),
408
- installType: chromium.installByDefault ? 'download-by-default' : 'download-on-demand',
409
- _validateHostRequirements: sdkLanguage => this._validateHostRequirements(sdkLanguage, chromium.dir, ['chrome-linux'], [], ['chrome-win']),
510
+ executablePathOrDie: (sdkLanguage) => executablePathOrDie("chromium", chromiumExecutable, chromium.installByDefault, sdkLanguage),
511
+ installType: chromium.installByDefault ? "download-by-default" : "download-on-demand",
512
+ _validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, chromium.dir, ["chrome-linux"], [], ["chrome-win"]),
410
513
  downloadURLs: this._downloadURLs(chromium),
411
514
  browserVersion: chromium.browserVersion,
412
515
  _install: () => this._downloadExecutable(chromium, chromiumExecutable),
413
- _dependencyGroup: 'chromium',
516
+ _dependencyGroup: "chromium",
414
517
  _isHermeticInstallation: true
415
518
  });
416
- const chromiumHeadlessShell = descriptors.find(d => d.name === 'chromium-headless-shell');
417
- const chromiumHeadlessShellExecutable = findExecutablePath(chromiumHeadlessShell.dir, 'chromium-headless-shell');
519
+ const chromiumHeadlessShell = descriptors.find((d) => d.name === "chromium-headless-shell");
520
+ const chromiumHeadlessShellExecutable = findExecutablePath(chromiumHeadlessShell.dir, "chromium-headless-shell");
418
521
  this._executables.push({
419
- type: 'channel',
420
- name: 'chromium-headless-shell',
421
- browserName: 'chromium',
522
+ type: "channel",
523
+ name: "chromium-headless-shell",
524
+ browserName: "chromium",
422
525
  directory: chromiumHeadlessShell.dir,
423
526
  executablePath: () => chromiumHeadlessShellExecutable,
424
- executablePathOrDie: sdkLanguage => executablePathOrDie('chromium', chromiumHeadlessShellExecutable, chromiumHeadlessShell.installByDefault, sdkLanguage),
425
- installType: chromiumHeadlessShell.installByDefault ? 'download-by-default' : 'download-on-demand',
426
- _validateHostRequirements: sdkLanguage => this._validateHostRequirements(sdkLanguage, chromiumHeadlessShell.dir, ['chrome-linux'], [], ['chrome-win']),
527
+ executablePathOrDie: (sdkLanguage) => executablePathOrDie("chromium", chromiumHeadlessShellExecutable, chromiumHeadlessShell.installByDefault, sdkLanguage),
528
+ installType: chromiumHeadlessShell.installByDefault ? "download-by-default" : "download-on-demand",
529
+ _validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, chromiumHeadlessShell.dir, ["chrome-linux"], [], ["chrome-win"]),
427
530
  downloadURLs: this._downloadURLs(chromiumHeadlessShell),
428
531
  browserVersion: chromium.browserVersion,
429
532
  _install: () => this._downloadExecutable(chromiumHeadlessShell, chromiumHeadlessShellExecutable),
430
- _dependencyGroup: 'chromium',
533
+ _dependencyGroup: "chromium",
534
+ _isHermeticInstallation: true
535
+ });
536
+ const chromiumTipOfTreeHeadlessShell = descriptors.find((d) => d.name === "chromium-tip-of-tree-headless-shell");
537
+ const chromiumTipOfTreeHeadlessShellExecutable = findExecutablePath(chromiumTipOfTreeHeadlessShell.dir, "chromium-headless-shell");
538
+ this._executables.push({
539
+ type: "channel",
540
+ name: "chromium-tip-of-tree-headless-shell",
541
+ browserName: "chromium",
542
+ directory: chromiumTipOfTreeHeadlessShell.dir,
543
+ executablePath: () => chromiumTipOfTreeHeadlessShellExecutable,
544
+ executablePathOrDie: (sdkLanguage) => executablePathOrDie("chromium", chromiumTipOfTreeHeadlessShellExecutable, chromiumTipOfTreeHeadlessShell.installByDefault, sdkLanguage),
545
+ installType: chromiumTipOfTreeHeadlessShell.installByDefault ? "download-by-default" : "download-on-demand",
546
+ _validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, chromiumTipOfTreeHeadlessShell.dir, ["chrome-linux"], [], ["chrome-win"]),
547
+ downloadURLs: this._downloadURLs(chromiumTipOfTreeHeadlessShell),
548
+ browserVersion: chromium.browserVersion,
549
+ _install: () => this._downloadExecutable(chromiumTipOfTreeHeadlessShell, chromiumTipOfTreeHeadlessShellExecutable),
550
+ _dependencyGroup: "chromium",
431
551
  _isHermeticInstallation: true
432
552
  });
433
- const chromiumTipOfTree = descriptors.find(d => d.name === 'chromium-tip-of-tree');
434
- const chromiumTipOfTreeExecutable = findExecutablePath(chromiumTipOfTree.dir, 'chromium');
553
+ const chromiumTipOfTree = descriptors.find((d) => d.name === "chromium-tip-of-tree");
554
+ const chromiumTipOfTreeExecutable = findExecutablePath(chromiumTipOfTree.dir, "chromium");
435
555
  this._executables.push({
436
- type: 'tool',
437
- name: 'chromium-tip-of-tree',
438
- browserName: 'chromium',
556
+ type: "tool",
557
+ name: "chromium-tip-of-tree",
558
+ browserName: "chromium",
439
559
  directory: chromiumTipOfTree.dir,
440
560
  executablePath: () => chromiumTipOfTreeExecutable,
441
- executablePathOrDie: sdkLanguage => executablePathOrDie('chromium-tip-of-tree', chromiumTipOfTreeExecutable, chromiumTipOfTree.installByDefault, sdkLanguage),
442
- installType: chromiumTipOfTree.installByDefault ? 'download-by-default' : 'download-on-demand',
443
- _validateHostRequirements: sdkLanguage => this._validateHostRequirements(sdkLanguage, chromiumTipOfTree.dir, ['chrome-linux'], [], ['chrome-win']),
561
+ executablePathOrDie: (sdkLanguage) => executablePathOrDie("chromium-tip-of-tree", chromiumTipOfTreeExecutable, chromiumTipOfTree.installByDefault, sdkLanguage),
562
+ installType: chromiumTipOfTree.installByDefault ? "download-by-default" : "download-on-demand",
563
+ _validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, chromiumTipOfTree.dir, ["chrome-linux"], [], ["chrome-win"]),
444
564
  downloadURLs: this._downloadURLs(chromiumTipOfTree),
445
565
  browserVersion: chromiumTipOfTree.browserVersion,
446
566
  _install: () => this._downloadExecutable(chromiumTipOfTree, chromiumTipOfTreeExecutable),
447
- _dependencyGroup: 'chromium',
567
+ _dependencyGroup: "chromium",
448
568
  _isHermeticInstallation: true
449
569
  });
450
- this._executables.push(this._createChromiumChannel('chrome', {
451
- 'linux': '/opt/google/chrome/chrome',
452
- 'darwin': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
453
- 'win32': `\\Google\\Chrome\\Application\\chrome.exe`
454
- }, () => this._installChromiumChannel('chrome', {
455
- 'linux': 'reinstall_chrome_stable_linux.sh',
456
- 'darwin': 'reinstall_chrome_stable_mac.sh',
457
- 'win32': 'reinstall_chrome_stable_win.ps1'
570
+ this._executables.push(this._createChromiumChannel("chrome", {
571
+ "linux": "/opt/google/chrome/chrome",
572
+ "darwin": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
573
+ "win32": `\\Google\\Chrome\\Application\\chrome.exe`
574
+ }, () => this._installChromiumChannel("chrome", {
575
+ "linux": "reinstall_chrome_stable_linux.sh",
576
+ "darwin": "reinstall_chrome_stable_mac.sh",
577
+ "win32": "reinstall_chrome_stable_win.ps1"
458
578
  })));
459
- this._executables.push(this._createChromiumChannel('chrome-beta', {
460
- 'linux': '/opt/google/chrome-beta/chrome',
461
- 'darwin': '/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta',
462
- 'win32': `\\Google\\Chrome Beta\\Application\\chrome.exe`
463
- }, () => this._installChromiumChannel('chrome-beta', {
464
- 'linux': 'reinstall_chrome_beta_linux.sh',
465
- 'darwin': 'reinstall_chrome_beta_mac.sh',
466
- 'win32': 'reinstall_chrome_beta_win.ps1'
579
+ this._executables.push(this._createChromiumChannel("chrome-beta", {
580
+ "linux": "/opt/google/chrome-beta/chrome",
581
+ "darwin": "/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta",
582
+ "win32": `\\Google\\Chrome Beta\\Application\\chrome.exe`
583
+ }, () => this._installChromiumChannel("chrome-beta", {
584
+ "linux": "reinstall_chrome_beta_linux.sh",
585
+ "darwin": "reinstall_chrome_beta_mac.sh",
586
+ "win32": "reinstall_chrome_beta_win.ps1"
467
587
  })));
468
- this._executables.push(this._createChromiumChannel('chrome-dev', {
469
- 'linux': '/opt/google/chrome-unstable/chrome',
470
- 'darwin': '/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev',
471
- 'win32': `\\Google\\Chrome Dev\\Application\\chrome.exe`
588
+ this._executables.push(this._createChromiumChannel("chrome-dev", {
589
+ "linux": "/opt/google/chrome-unstable/chrome",
590
+ "darwin": "/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev",
591
+ "win32": `\\Google\\Chrome Dev\\Application\\chrome.exe`
472
592
  }));
473
- this._executables.push(this._createChromiumChannel('chrome-canary', {
474
- 'linux': '',
475
- 'darwin': '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary',
476
- 'win32': `\\Google\\Chrome SxS\\Application\\chrome.exe`
593
+ this._executables.push(this._createChromiumChannel("chrome-canary", {
594
+ "linux": "",
595
+ "darwin": "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary",
596
+ "win32": `\\Google\\Chrome SxS\\Application\\chrome.exe`
477
597
  }));
478
- this._executables.push(this._createChromiumChannel('msedge', {
479
- 'linux': '/opt/microsoft/msedge/msedge',
480
- 'darwin': '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
481
- 'win32': `\\Microsoft\\Edge\\Application\\msedge.exe`
482
- }, () => this._installMSEdgeChannel('msedge', {
483
- 'linux': 'reinstall_msedge_stable_linux.sh',
484
- 'darwin': 'reinstall_msedge_stable_mac.sh',
485
- 'win32': 'reinstall_msedge_stable_win.ps1'
598
+ this._executables.push(this._createChromiumChannel("msedge", {
599
+ "linux": "/opt/microsoft/msedge/msedge",
600
+ "darwin": "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",
601
+ "win32": `\\Microsoft\\Edge\\Application\\msedge.exe`
602
+ }, () => this._installMSEdgeChannel("msedge", {
603
+ "linux": "reinstall_msedge_stable_linux.sh",
604
+ "darwin": "reinstall_msedge_stable_mac.sh",
605
+ "win32": "reinstall_msedge_stable_win.ps1"
486
606
  })));
487
- this._executables.push(this._createChromiumChannel('msedge-beta', {
488
- 'linux': '/opt/microsoft/msedge-beta/msedge',
489
- 'darwin': '/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta',
490
- 'win32': `\\Microsoft\\Edge Beta\\Application\\msedge.exe`
491
- }, () => this._installMSEdgeChannel('msedge-beta', {
492
- 'darwin': 'reinstall_msedge_beta_mac.sh',
493
- 'linux': 'reinstall_msedge_beta_linux.sh',
494
- 'win32': 'reinstall_msedge_beta_win.ps1'
607
+ this._executables.push(this._createChromiumChannel("msedge-beta", {
608
+ "linux": "/opt/microsoft/msedge-beta/msedge",
609
+ "darwin": "/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta",
610
+ "win32": `\\Microsoft\\Edge Beta\\Application\\msedge.exe`
611
+ }, () => this._installMSEdgeChannel("msedge-beta", {
612
+ "darwin": "reinstall_msedge_beta_mac.sh",
613
+ "linux": "reinstall_msedge_beta_linux.sh",
614
+ "win32": "reinstall_msedge_beta_win.ps1"
495
615
  })));
496
- this._executables.push(this._createChromiumChannel('msedge-dev', {
497
- 'linux': '/opt/microsoft/msedge-dev/msedge',
498
- 'darwin': '/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev',
499
- 'win32': `\\Microsoft\\Edge Dev\\Application\\msedge.exe`
500
- }, () => this._installMSEdgeChannel('msedge-dev', {
501
- 'darwin': 'reinstall_msedge_dev_mac.sh',
502
- 'linux': 'reinstall_msedge_dev_linux.sh',
503
- 'win32': 'reinstall_msedge_dev_win.ps1'
616
+ this._executables.push(this._createChromiumChannel("msedge-dev", {
617
+ "linux": "/opt/microsoft/msedge-dev/msedge",
618
+ "darwin": "/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev",
619
+ "win32": `\\Microsoft\\Edge Dev\\Application\\msedge.exe`
620
+ }, () => this._installMSEdgeChannel("msedge-dev", {
621
+ "darwin": "reinstall_msedge_dev_mac.sh",
622
+ "linux": "reinstall_msedge_dev_linux.sh",
623
+ "win32": "reinstall_msedge_dev_win.ps1"
504
624
  })));
505
- this._executables.push(this._createChromiumChannel('msedge-canary', {
506
- 'linux': '',
507
- 'darwin': '/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary',
508
- 'win32': `\\Microsoft\\Edge SxS\\Application\\msedge.exe`
625
+ this._executables.push(this._createChromiumChannel("msedge-canary", {
626
+ "linux": "",
627
+ "darwin": "/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary",
628
+ "win32": `\\Microsoft\\Edge SxS\\Application\\msedge.exe`
509
629
  }));
510
- this._executables.push(this._createBidiFirefoxChannel('bidi-firefox-stable', {
511
- 'linux': '/firefox/firefox',
512
- 'darwin': '/Firefox.app/Contents/MacOS/firefox',
513
- 'win32': '\\core\\firefox.exe'
630
+ this._executables.push(this._createBidiFirefoxChannel("moz-firefox", {
631
+ "linux": "/snap/bin/firefox",
632
+ "darwin": "/Applications/Firefox.app/Contents/MacOS/firefox",
633
+ "win32": "\\Mozilla Firefox\\firefox.exe"
514
634
  }));
515
- this._executables.push(this._createBidiFirefoxChannel('bidi-firefox-beta', {
516
- 'linux': '/firefox/firefox',
517
- 'darwin': '/Firefox.app/Contents/MacOS/firefox',
518
- 'win32': '\\core\\firefox.exe'
635
+ this._executables.push(this._createBidiFirefoxChannel("moz-firefox-beta", {
636
+ "linux": "/opt/firefox-beta/firefox",
637
+ "darwin": "/Applications/Firefox.app/Contents/MacOS/firefox",
638
+ "win32": "\\Mozilla Firefox\\firefox.exe"
519
639
  }));
520
- this._executables.push(this._createBidiFirefoxChannel('bidi-firefox-nightly', {
521
- 'linux': '/firefox/firefox',
522
- 'darwin': '/Firefox Nightly.app/Contents/MacOS/firefox',
523
- 'win32': '\\firefox\\firefox.exe'
640
+ this._executables.push(this._createBidiFirefoxChannel("moz-firefox-nightly", {
641
+ "linux": "/opt/firefox-nightly/firefox",
642
+ "darwin": "/Applications/Firefox Nightly.app/Contents/MacOS/firefox",
643
+ "win32": "\\Mozilla Firefox\\firefox.exe"
524
644
  }));
525
- this._executables.push(this._createBidiChannel('bidi-chrome-stable', {
526
- 'linux': '/opt/google/chrome/chrome',
527
- 'darwin': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
528
- 'win32': `\\Google\\Chrome\\Application\\chrome.exe`
645
+ this._executables.push(this._createBidiChromiumChannel("bidi-chrome-stable", {
646
+ "linux": "/opt/google/chrome/chrome",
647
+ "darwin": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
648
+ "win32": `\\Google\\Chrome\\Application\\chrome.exe`
529
649
  }));
530
- this._executables.push(this._createBidiChannel('bidi-chrome-canary', {
531
- 'linux': '',
532
- 'darwin': '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary',
533
- 'win32': `\\Google\\Chrome SxS\\Application\\chrome.exe`
650
+ this._executables.push(this._createBidiChromiumChannel("bidi-chrome-canary", {
651
+ "linux": "",
652
+ "darwin": "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary",
653
+ "win32": `\\Google\\Chrome SxS\\Application\\chrome.exe`
534
654
  }));
535
655
  this._executables.push({
536
- type: 'browser',
537
- name: 'bidi-chromium',
538
- browserName: 'bidi',
656
+ type: "browser",
657
+ name: "bidi-chromium",
658
+ browserName: "bidi",
539
659
  directory: chromium.dir,
540
660
  executablePath: () => chromiumExecutable,
541
- executablePathOrDie: sdkLanguage => executablePathOrDie('chromium', chromiumExecutable, chromium.installByDefault, sdkLanguage),
542
- installType: 'download-on-demand',
543
- _validateHostRequirements: sdkLanguage => this._validateHostRequirements(sdkLanguage, chromium.dir, ['chrome-linux'], [], ['chrome-win']),
661
+ executablePathOrDie: (sdkLanguage) => executablePathOrDie("chromium", chromiumExecutable, chromium.installByDefault, sdkLanguage),
662
+ installType: "download-on-demand",
663
+ _validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, chromium.dir, ["chrome-linux"], [], ["chrome-win"]),
544
664
  downloadURLs: this._downloadURLs(chromium),
545
665
  browserVersion: chromium.browserVersion,
546
666
  _install: () => this._downloadExecutable(chromium, chromiumExecutable),
547
- _dependencyGroup: 'chromium',
667
+ _dependencyGroup: "chromium",
548
668
  _isHermeticInstallation: true
549
669
  });
550
- const firefox = descriptors.find(d => d.name === 'firefox');
551
- const firefoxExecutable = findExecutablePath(firefox.dir, 'firefox');
670
+ const firefox = descriptors.find((d) => d.name === "firefox");
671
+ const firefoxExecutable = findExecutablePath(firefox.dir, "firefox");
552
672
  this._executables.push({
553
- type: 'browser',
554
- name: 'firefox',
555
- browserName: 'firefox',
673
+ type: "browser",
674
+ name: "firefox",
675
+ browserName: "firefox",
556
676
  directory: firefox.dir,
557
677
  executablePath: () => firefoxExecutable,
558
- executablePathOrDie: sdkLanguage => executablePathOrDie('firefox', firefoxExecutable, firefox.installByDefault, sdkLanguage),
559
- installType: firefox.installByDefault ? 'download-by-default' : 'download-on-demand',
560
- _validateHostRequirements: sdkLanguage => this._validateHostRequirements(sdkLanguage, firefox.dir, ['firefox'], [], ['firefox']),
678
+ executablePathOrDie: (sdkLanguage) => executablePathOrDie("firefox", firefoxExecutable, firefox.installByDefault, sdkLanguage),
679
+ installType: firefox.installByDefault ? "download-by-default" : "download-on-demand",
680
+ _validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, firefox.dir, ["firefox"], [], ["firefox"]),
561
681
  downloadURLs: this._downloadURLs(firefox),
562
682
  browserVersion: firefox.browserVersion,
563
683
  _install: () => this._downloadExecutable(firefox, firefoxExecutable),
564
- _dependencyGroup: 'firefox',
684
+ _dependencyGroup: "firefox",
565
685
  _isHermeticInstallation: true
566
686
  });
567
- const firefoxBeta = descriptors.find(d => d.name === 'firefox-beta');
568
- const firefoxBetaExecutable = findExecutablePath(firefoxBeta.dir, 'firefox');
687
+ const firefoxBeta = descriptors.find((d) => d.name === "firefox-beta");
688
+ const firefoxBetaExecutable = findExecutablePath(firefoxBeta.dir, "firefox");
569
689
  this._executables.push({
570
- type: 'tool',
571
- name: 'firefox-beta',
572
- browserName: 'firefox',
690
+ type: "tool",
691
+ name: "firefox-beta",
692
+ browserName: "firefox",
573
693
  directory: firefoxBeta.dir,
574
694
  executablePath: () => firefoxBetaExecutable,
575
- executablePathOrDie: sdkLanguage => executablePathOrDie('firefox-beta', firefoxBetaExecutable, firefoxBeta.installByDefault, sdkLanguage),
576
- installType: firefoxBeta.installByDefault ? 'download-by-default' : 'download-on-demand',
577
- _validateHostRequirements: sdkLanguage => this._validateHostRequirements(sdkLanguage, firefoxBeta.dir, ['firefox'], [], ['firefox']),
695
+ executablePathOrDie: (sdkLanguage) => executablePathOrDie("firefox-beta", firefoxBetaExecutable, firefoxBeta.installByDefault, sdkLanguage),
696
+ installType: firefoxBeta.installByDefault ? "download-by-default" : "download-on-demand",
697
+ _validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, firefoxBeta.dir, ["firefox"], [], ["firefox"]),
578
698
  downloadURLs: this._downloadURLs(firefoxBeta),
579
699
  browserVersion: firefoxBeta.browserVersion,
580
700
  _install: () => this._downloadExecutable(firefoxBeta, firefoxBetaExecutable),
581
- _dependencyGroup: 'firefox',
701
+ _dependencyGroup: "firefox",
582
702
  _isHermeticInstallation: true
583
703
  });
584
- const webkit = descriptors.find(d => d.name === 'webkit');
585
- const webkitExecutable = findExecutablePath(webkit.dir, 'webkit');
586
- const webkitLinuxLddDirectories = [_path.default.join('minibrowser-gtk'), _path.default.join('minibrowser-gtk', 'bin'), _path.default.join('minibrowser-gtk', 'lib'), _path.default.join('minibrowser-gtk', 'sys', 'lib'), _path.default.join('minibrowser-wpe'), _path.default.join('minibrowser-wpe', 'bin'), _path.default.join('minibrowser-wpe', 'lib'), _path.default.join('minibrowser-wpe', 'sys', 'lib')];
704
+ const webkit = descriptors.find((d) => d.name === "webkit");
705
+ const webkitExecutable = findExecutablePath(webkit.dir, "webkit");
706
+ const webkitLinuxLddDirectories = [
707
+ import_path.default.join("minibrowser-gtk"),
708
+ import_path.default.join("minibrowser-gtk", "bin"),
709
+ import_path.default.join("minibrowser-gtk", "lib"),
710
+ import_path.default.join("minibrowser-gtk", "sys", "lib"),
711
+ import_path.default.join("minibrowser-wpe"),
712
+ import_path.default.join("minibrowser-wpe", "bin"),
713
+ import_path.default.join("minibrowser-wpe", "lib"),
714
+ import_path.default.join("minibrowser-wpe", "sys", "lib")
715
+ ];
587
716
  this._executables.push({
588
- type: 'browser',
589
- name: 'webkit',
590
- browserName: 'webkit',
717
+ type: "browser",
718
+ name: "webkit",
719
+ browserName: "webkit",
591
720
  directory: webkit.dir,
592
721
  executablePath: () => webkitExecutable,
593
- executablePathOrDie: sdkLanguage => executablePathOrDie('webkit', webkitExecutable, webkit.installByDefault, sdkLanguage),
594
- installType: webkit.installByDefault ? 'download-by-default' : 'download-on-demand',
595
- _validateHostRequirements: sdkLanguage => this._validateHostRequirements(sdkLanguage, webkit.dir, webkitLinuxLddDirectories, ['libGLESv2.so.2', 'libx264.so'], ['']),
722
+ executablePathOrDie: (sdkLanguage) => executablePathOrDie("webkit", webkitExecutable, webkit.installByDefault, sdkLanguage),
723
+ installType: webkit.installByDefault ? "download-by-default" : "download-on-demand",
724
+ _validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, webkit.dir, webkitLinuxLddDirectories, ["libGLESv2.so.2", "libx264.so"], [""]),
596
725
  downloadURLs: this._downloadURLs(webkit),
597
726
  browserVersion: webkit.browserVersion,
598
727
  _install: () => this._downloadExecutable(webkit, webkitExecutable),
599
- _dependencyGroup: 'webkit',
728
+ _dependencyGroup: "webkit",
600
729
  _isHermeticInstallation: true
601
730
  });
602
- const ffmpeg = descriptors.find(d => d.name === 'ffmpeg');
603
- const ffmpegExecutable = findExecutablePath(ffmpeg.dir, 'ffmpeg');
731
+ const ffmpeg = descriptors.find((d) => d.name === "ffmpeg");
732
+ const ffmpegExecutable = findExecutablePath(ffmpeg.dir, "ffmpeg");
604
733
  this._executables.push({
605
- type: 'tool',
606
- name: 'ffmpeg',
607
- browserName: undefined,
734
+ type: "tool",
735
+ name: "ffmpeg",
736
+ browserName: void 0,
608
737
  directory: ffmpeg.dir,
609
738
  executablePath: () => ffmpegExecutable,
610
- executablePathOrDie: sdkLanguage => executablePathOrDie('ffmpeg', ffmpegExecutable, ffmpeg.installByDefault, sdkLanguage),
611
- installType: ffmpeg.installByDefault ? 'download-by-default' : 'download-on-demand',
739
+ executablePathOrDie: (sdkLanguage) => executablePathOrDie("ffmpeg", ffmpegExecutable, ffmpeg.installByDefault, sdkLanguage),
740
+ installType: ffmpeg.installByDefault ? "download-by-default" : "download-on-demand",
612
741
  _validateHostRequirements: () => Promise.resolve(),
613
742
  downloadURLs: this._downloadURLs(ffmpeg),
614
743
  _install: () => this._downloadExecutable(ffmpeg, ffmpegExecutable),
615
- _dependencyGroup: 'tools',
744
+ _dependencyGroup: "tools",
745
+ _isHermeticInstallation: true
746
+ });
747
+ const winldd = descriptors.find((d) => d.name === "winldd");
748
+ const winlddExecutable = findExecutablePath(winldd.dir, "winldd");
749
+ this._executables.push({
750
+ type: "tool",
751
+ name: "winldd",
752
+ browserName: void 0,
753
+ directory: winldd.dir,
754
+ executablePath: () => winlddExecutable,
755
+ executablePathOrDie: (sdkLanguage) => executablePathOrDie("winldd", winlddExecutable, winldd.installByDefault, sdkLanguage),
756
+ installType: process.platform === "win32" ? "download-by-default" : "none",
757
+ _validateHostRequirements: () => Promise.resolve(),
758
+ downloadURLs: this._downloadURLs(winldd),
759
+ _install: () => this._downloadExecutable(winldd, winlddExecutable),
760
+ _dependencyGroup: "tools",
616
761
  _isHermeticInstallation: true
617
762
  });
618
- const android = descriptors.find(d => d.name === 'android');
763
+ const android = descriptors.find((d) => d.name === "android");
619
764
  this._executables.push({
620
- type: 'tool',
621
- name: 'android',
622
- browserName: undefined,
765
+ type: "tool",
766
+ name: "android",
767
+ browserName: void 0,
623
768
  directory: android.dir,
624
- executablePath: () => undefined,
625
- executablePathOrDie: () => '',
626
- installType: 'download-on-demand',
769
+ executablePath: () => void 0,
770
+ executablePathOrDie: () => "",
771
+ installType: "download-on-demand",
627
772
  _validateHostRequirements: () => Promise.resolve(),
628
773
  downloadURLs: this._downloadURLs(android),
629
774
  _install: () => this._downloadExecutable(android),
630
- _dependencyGroup: 'tools',
775
+ _dependencyGroup: "tools",
631
776
  _isHermeticInstallation: true
632
777
  });
633
778
  this._executables.push({
634
- type: 'browser',
635
- name: 'bidi',
636
- browserName: 'bidi',
637
- directory: undefined,
638
- executablePath: () => undefined,
639
- executablePathOrDie: () => '',
640
- installType: 'none',
779
+ type: "browser",
780
+ name: "bidi",
781
+ browserName: "bidi",
782
+ directory: void 0,
783
+ executablePath: () => void 0,
784
+ executablePathOrDie: () => "",
785
+ installType: "none",
641
786
  _validateHostRequirements: () => Promise.resolve(),
642
787
  downloadURLs: [],
643
788
  _install: () => Promise.resolve(),
644
- _dependencyGroup: 'tools',
789
+ _dependencyGroup: "tools",
645
790
  _isHermeticInstallation: true
646
791
  });
647
792
  }
@@ -649,27 +794,38 @@ class Registry {
649
794
  const executablePath = (sdkLanguage, shouldThrow) => {
650
795
  const suffix = lookAt[process.platform];
651
796
  if (!suffix) {
652
- if (shouldThrow) throw new Error(`Chromium distribution '${name}' is not supported on ${process.platform}`);
653
- return undefined;
797
+ if (shouldThrow)
798
+ throw new Error(`Chromium distribution '${name}' is not supported on ${process.platform}`);
799
+ return void 0;
654
800
  }
655
- const prefixes = process.platform === 'win32' ? [process.env.LOCALAPPDATA, process.env.PROGRAMFILES, process.env['PROGRAMFILES(X86)']].filter(Boolean) : [''];
801
+ const prefixes = process.platform === "win32" ? [
802
+ process.env.LOCALAPPDATA,
803
+ process.env.PROGRAMFILES,
804
+ process.env["PROGRAMFILES(X86)"],
805
+ // In some cases there is no PROGRAMFILES/(86) env var set but HOMEDRIVE is set.
806
+ process.env.HOMEDRIVE + "\\Program Files",
807
+ process.env.HOMEDRIVE + "\\Program Files (x86)"
808
+ ].filter(Boolean) : [""];
656
809
  for (const prefix of prefixes) {
657
- const executablePath = _path.default.join(prefix, suffix);
658
- if ((0, _fileUtils.canAccessFile)(executablePath)) return executablePath;
810
+ const executablePath2 = import_path.default.join(prefix, suffix);
811
+ if ((0, import_fileUtils.canAccessFile)(executablePath2))
812
+ return executablePath2;
659
813
  }
660
- if (!shouldThrow) return undefined;
661
- const location = prefixes.length ? ` at ${_path.default.join(prefixes[0], suffix)}` : ``;
662
- const installation = install ? `\nRun "${buildPlaywrightCLICommand(sdkLanguage, 'install ' + name)}"` : '';
814
+ if (!shouldThrow)
815
+ return void 0;
816
+ const location = prefixes.length ? ` at ${import_path.default.join(prefixes[0], suffix)}` : ``;
817
+ const installation = install ? `
818
+ Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
663
819
  throw new Error(`Chromium distribution '${name}' is not found${location}${installation}`);
664
820
  };
665
821
  return {
666
- type: 'channel',
822
+ type: "channel",
667
823
  name,
668
- browserName: 'chromium',
669
- directory: undefined,
670
- executablePath: sdkLanguage => executablePath(sdkLanguage, false),
671
- executablePathOrDie: sdkLanguage => executablePath(sdkLanguage, true),
672
- installType: install ? 'install-script' : 'none',
824
+ browserName: "chromium",
825
+ directory: void 0,
826
+ executablePath: (sdkLanguage) => executablePath(sdkLanguage, false),
827
+ executablePathOrDie: (sdkLanguage) => executablePath(sdkLanguage, true),
828
+ installType: install ? "install-script" : "none",
673
829
  _validateHostRequirements: () => Promise.resolve(),
674
830
  _isHermeticInstallation: false,
675
831
  _install: install
@@ -679,59 +835,76 @@ class Registry {
679
835
  const executablePath = (sdkLanguage, shouldThrow) => {
680
836
  const suffix = lookAt[process.platform];
681
837
  if (!suffix) {
682
- if (shouldThrow) throw new Error(`Firefox distribution '${name}' is not supported on ${process.platform}`);
683
- return undefined;
838
+ if (shouldThrow)
839
+ throw new Error(`Firefox distribution '${name}' is not supported on ${process.platform}`);
840
+ return void 0;
684
841
  }
685
- const folder = _path.default.resolve('firefox');
686
- let channelName = 'stable';
687
- if (name.includes('beta')) channelName = 'beta';else if (name.includes('nightly')) channelName = 'nightly';
688
- const installedVersions = fs.readdirSync(folder);
689
- const found = installedVersions.filter(e => e.includes(channelName));
690
- if (found.length === 1) return _path.default.join(folder, found[0], suffix);
691
- if (found.length > 1) {
692
- if (shouldThrow) throw new Error(`Multiple Firefox installations found for channel '${name}': ${found.join(', ')}`);else return undefined;
842
+ const prefixes = process.platform === "win32" ? [
843
+ process.env.LOCALAPPDATA,
844
+ process.env.PROGRAMFILES,
845
+ process.env["PROGRAMFILES(X86)"],
846
+ // In some cases there is no PROGRAMFILES/(86) env var set but HOMEDRIVE is set.
847
+ process.env.HOMEDRIVE + "\\Program Files",
848
+ process.env.HOMEDRIVE + "\\Program Files (x86)"
849
+ ].filter(Boolean) : [""];
850
+ for (const prefix of prefixes) {
851
+ const executablePath2 = import_path.default.join(prefix, suffix);
852
+ if ((0, import_fileUtils.canAccessFile)(executablePath2))
853
+ return executablePath2;
693
854
  }
694
- if (shouldThrow) throw new Error(`Cannot find Firefox installation for channel '${name}' under ${folder}`);
695
- return undefined;
855
+ if (shouldThrow)
856
+ throw new Error(`Cannot find Firefox installation for channel '${name}' at the standard system paths.`);
857
+ return void 0;
696
858
  };
697
859
  return {
698
- type: 'channel',
860
+ type: "channel",
699
861
  name,
700
- browserName: 'bidi',
701
- directory: undefined,
702
- executablePath: sdkLanguage => executablePath(sdkLanguage, false),
703
- executablePathOrDie: sdkLanguage => executablePath(sdkLanguage, true),
704
- installType: 'none',
862
+ browserName: "bidi",
863
+ directory: void 0,
864
+ executablePath: (sdkLanguage) => executablePath(sdkLanguage, false),
865
+ executablePathOrDie: (sdkLanguage) => executablePath(sdkLanguage, true),
866
+ installType: "none",
705
867
  _validateHostRequirements: () => Promise.resolve(),
706
868
  _isHermeticInstallation: true,
707
869
  _install: install
708
870
  };
709
871
  }
710
- _createBidiChannel(name, lookAt, install) {
872
+ _createBidiChromiumChannel(name, lookAt, install) {
711
873
  const executablePath = (sdkLanguage, shouldThrow) => {
712
874
  const suffix = lookAt[process.platform];
713
875
  if (!suffix) {
714
- if (shouldThrow) throw new Error(`Firefox distribution '${name}' is not supported on ${process.platform}`);
715
- return undefined;
876
+ if (shouldThrow)
877
+ throw new Error(`Firefox distribution '${name}' is not supported on ${process.platform}`);
878
+ return void 0;
716
879
  }
717
- const prefixes = process.platform === 'win32' ? [process.env.LOCALAPPDATA, process.env.PROGRAMFILES, process.env['PROGRAMFILES(X86)']].filter(Boolean) : [''];
880
+ const prefixes = process.platform === "win32" ? [
881
+ process.env.LOCALAPPDATA,
882
+ process.env.PROGRAMFILES,
883
+ process.env["PROGRAMFILES(X86)"],
884
+ // In some cases there is no PROGRAMFILES/(86) env var set but HOMEDRIVE is set.
885
+ process.env.HOMEDRIVE + "\\Program Files",
886
+ process.env.HOMEDRIVE + "\\Program Files (x86)"
887
+ ].filter(Boolean) : [""];
718
888
  for (const prefix of prefixes) {
719
- const executablePath = _path.default.join(prefix, suffix);
720
- if ((0, _fileUtils.canAccessFile)(executablePath)) return executablePath;
889
+ const executablePath2 = import_path.default.join(prefix, suffix);
890
+ if ((0, import_fileUtils.canAccessFile)(executablePath2))
891
+ return executablePath2;
721
892
  }
722
- if (!shouldThrow) return undefined;
723
- const location = prefixes.length ? ` at ${_path.default.join(prefixes[0], suffix)}` : ``;
724
- const installation = install ? `\nRun "${buildPlaywrightCLICommand(sdkLanguage, 'install ' + name)}"` : '';
725
- throw new Error(`Firefox distribution '${name}' is not found${location}${installation}`);
893
+ if (!shouldThrow)
894
+ return void 0;
895
+ const location = prefixes.length ? ` at ${import_path.default.join(prefixes[0], suffix)}` : ``;
896
+ const installation = install ? `
897
+ Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
898
+ throw new Error(`Chromium distribution '${name}' is not found${location}${installation}`);
726
899
  };
727
900
  return {
728
- type: 'channel',
901
+ type: "channel",
729
902
  name,
730
- browserName: 'bidi',
731
- directory: undefined,
732
- executablePath: sdkLanguage => executablePath(sdkLanguage, false),
733
- executablePathOrDie: sdkLanguage => executablePath(sdkLanguage, true),
734
- installType: install ? 'install-script' : 'none',
903
+ browserName: "bidi",
904
+ directory: void 0,
905
+ executablePath: (sdkLanguage) => executablePath(sdkLanguage, false),
906
+ executablePathOrDie: (sdkLanguage) => executablePath(sdkLanguage, true),
907
+ installType: install ? "install-script" : "none",
735
908
  _validateHostRequirements: () => Promise.resolve(),
736
909
  _isHermeticInstallation: false,
737
910
  _install: install
@@ -741,38 +914,41 @@ class Registry {
741
914
  return this._executables;
742
915
  }
743
916
  findExecutable(name) {
744
- return this._executables.find(b => b.name === name);
917
+ return this._executables.find((b) => b.name === name);
745
918
  }
746
919
  defaultExecutables() {
747
- return this._executables.filter(e => e.installType === 'download-by-default');
920
+ return this._executables.filter((e) => e.installType === "download-by-default");
748
921
  }
749
922
  _dedupe(executables) {
750
923
  return Array.from(new Set(executables));
751
924
  }
752
925
  async _validateHostRequirements(sdkLanguage, browserDirectory, linuxLddDirectories, dlOpenLibraries, windowsExeAndDllDirectories) {
753
- if (os.platform() === 'linux') return await (0, _dependencies.validateDependenciesLinux)(sdkLanguage, linuxLddDirectories.map(d => _path.default.join(browserDirectory, d)), dlOpenLibraries);
754
- if (os.platform() === 'win32' && os.arch() === 'x64') return await (0, _dependencies.validateDependenciesWindows)(windowsExeAndDllDirectories.map(d => _path.default.join(browserDirectory, d)));
926
+ if (import_os.default.platform() === "linux")
927
+ return await (0, import_dependencies2.validateDependenciesLinux)(sdkLanguage, linuxLddDirectories.map((d) => import_path.default.join(browserDirectory, d)), dlOpenLibraries);
928
+ if (import_os.default.platform() === "win32" && import_os.default.arch() === "x64")
929
+ return await (0, import_dependencies2.validateDependenciesWindows)(sdkLanguage, windowsExeAndDllDirectories.map((d) => import_path.default.join(browserDirectory, d)));
755
930
  }
756
931
  async installDeps(executablesToInstallDeps, dryRun) {
757
932
  const executables = this._dedupe(executablesToInstallDeps);
758
- const targets = new Set();
933
+ const targets = /* @__PURE__ */ new Set();
759
934
  for (const executable of executables) {
760
- if (executable._dependencyGroup) targets.add(executable._dependencyGroup);
935
+ if (executable._dependencyGroup)
936
+ targets.add(executable._dependencyGroup);
761
937
  }
762
- targets.add('tools');
763
- if (os.platform() === 'win32') return await (0, _dependencies.installDependenciesWindows)(targets, dryRun);
764
- if (os.platform() === 'linux') return await (0, _dependencies.installDependenciesLinux)(targets, dryRun);
938
+ targets.add("tools");
939
+ if (import_os.default.platform() === "win32")
940
+ return await (0, import_dependencies2.installDependenciesWindows)(targets, dryRun);
941
+ if (import_os.default.platform() === "linux")
942
+ return await (0, import_dependencies2.installDependenciesLinux)(targets, dryRun);
765
943
  }
766
944
  async install(executablesToInstall, forceReinstall) {
767
945
  const executables = this._dedupe(executablesToInstall);
768
- await fs.promises.mkdir(registryDirectory, {
769
- recursive: true
770
- });
771
- const lockfilePath = _path.default.join(registryDirectory, '__dirlock');
772
- const linksDir = _path.default.join(registryDirectory, '.links');
946
+ await import_fs.default.promises.mkdir(registryDirectory, { recursive: true });
947
+ const lockfilePath = import_path.default.join(registryDirectory, "__dirlock");
948
+ const linksDir = import_path.default.join(registryDirectory, ".links");
773
949
  let releaseLock;
774
950
  try {
775
- releaseLock = await _utilsBundle.lockfile.lock(registryDirectory, {
951
+ releaseLock = await import_utilsBundle.lockfile.lock(registryDirectory, {
776
952
  retries: {
777
953
  // Retry 20 times during 10 minutes with
778
954
  // exponential back-off.
@@ -780,273 +956,316 @@ class Registry {
780
956
  retries: 20,
781
957
  factor: 1.27579
782
958
  },
783
- onCompromised: err => {
959
+ onCompromised: (err) => {
784
960
  throw new Error(`${err.message} Path: ${lockfilePath}`);
785
961
  },
786
962
  lockfilePath
787
963
  });
788
- // Create a link first, so that cache validation does not remove our own browsers.
789
- await fs.promises.mkdir(linksDir, {
790
- recursive: true
791
- });
792
- await fs.promises.writeFile(_path.default.join(linksDir, (0, _utils.calculateSha1)(PACKAGE_PATH)), PACKAGE_PATH);
793
-
794
- // Remove stale browsers.
964
+ await import_fs.default.promises.mkdir(linksDir, { recursive: true });
965
+ await import_fs.default.promises.writeFile(import_path.default.join(linksDir, (0, import_utils.calculateSha1)(PACKAGE_PATH)), PACKAGE_PATH);
795
966
  await this._validateInstallationCache(linksDir);
796
-
797
- // Install browsers for this package.
798
967
  for (const executable of executables) {
799
- if (!executable._install) throw new Error(`ERROR: Playwright does not support installing ${executable.name}`);
800
- const {
801
- embedderName
802
- } = (0, _userAgent.getEmbedderName)();
803
- if (!(0, _utils.getAsBooleanFromENV)('CI') && !executable._isHermeticInstallation && !forceReinstall && executable.executablePath(embedderName)) {
804
- const command = buildPlaywrightCLICommand(embedderName, 'install --force ' + executable.name);
805
- throw new Error('\n' + (0, _utils.wrapInASCIIBox)([`ATTENTION: "${executable.name}" is already installed on the system!`, ``, `"${executable.name}" installation is not hermetic; installing newer version`, `requires *removal* of a current installation first.`, ``, `To *uninstall* current version and re-install latest "${executable.name}":`, ``, `- Close all running instances of "${executable.name}", if any`, `- Use "--force" to install browser:`, ``, ` ${command}`, ``, `<3 Playwright Team`].join('\n'), 1));
968
+ if (!executable._install)
969
+ throw new Error(`ERROR: Playwright does not support installing ${executable.name}`);
970
+ const { embedderName } = (0, import_userAgent.getEmbedderName)();
971
+ if (!(0, import_utils.getAsBooleanFromENV)("CI") && !executable._isHermeticInstallation && !forceReinstall && executable.executablePath(embedderName)) {
972
+ const command = buildPlaywrightCLICommand(embedderName, "install --force " + executable.name);
973
+ throw new Error("\n" + (0, import_ascii.wrapInASCIIBox)([
974
+ `ATTENTION: "${executable.name}" is already installed on the system!`,
975
+ ``,
976
+ `"${executable.name}" installation is not hermetic; installing newer version`,
977
+ `requires *removal* of a current installation first.`,
978
+ ``,
979
+ `To *uninstall* current version and re-install latest "${executable.name}":`,
980
+ ``,
981
+ `- Close all running instances of "${executable.name}", if any`,
982
+ `- Use "--force" to install browser:`,
983
+ ``,
984
+ ` ${command}`,
985
+ ``,
986
+ `<3 Playwright Team`
987
+ ].join("\n"), 1));
806
988
  }
807
989
  await executable._install();
808
990
  }
809
991
  } catch (e) {
810
- if (e.code === 'ELOCKED') {
811
- const rmCommand = process.platform === 'win32' ? 'rm -R' : 'rm -rf';
812
- throw new Error('\n' + (0, _utils.wrapInASCIIBox)([`An active lockfile is found at:`, ``, ` ${lockfilePath}`, ``, `Either:`, `- wait a few minutes if other Playwright is installing browsers in parallel`, `- remove lock manually with:`, ``, ` ${rmCommand} ${lockfilePath}`, ``, `<3 Playwright Team`].join('\n'), 1));
992
+ if (e.code === "ELOCKED") {
993
+ const rmCommand = process.platform === "win32" ? "rm -R" : "rm -rf";
994
+ throw new Error("\n" + (0, import_ascii.wrapInASCIIBox)([
995
+ `An active lockfile is found at:`,
996
+ ``,
997
+ ` ${lockfilePath}`,
998
+ ``,
999
+ `Either:`,
1000
+ `- wait a few minutes if other Playwright is installing browsers in parallel`,
1001
+ `- remove lock manually with:`,
1002
+ ``,
1003
+ ` ${rmCommand} ${lockfilePath}`,
1004
+ ``,
1005
+ `<3 Playwright Team`
1006
+ ].join("\n"), 1));
813
1007
  } else {
814
1008
  throw e;
815
1009
  }
816
1010
  } finally {
817
- if (releaseLock) await releaseLock();
1011
+ if (releaseLock)
1012
+ await releaseLock();
818
1013
  }
819
1014
  }
820
1015
  async uninstall(all) {
821
- const linksDir = _path.default.join(registryDirectory, '.links');
1016
+ const linksDir = import_path.default.join(registryDirectory, ".links");
822
1017
  if (all) {
823
- const links = await fs.promises.readdir(linksDir).catch(() => []);
824
- for (const link of links) await fs.promises.unlink(_path.default.join(linksDir, link));
1018
+ const links = await import_fs.default.promises.readdir(linksDir).catch(() => []);
1019
+ for (const link of links)
1020
+ await import_fs.default.promises.unlink(import_path.default.join(linksDir, link));
825
1021
  } else {
826
- await fs.promises.unlink(_path.default.join(linksDir, (0, _utils.calculateSha1)(PACKAGE_PATH))).catch(() => {});
1022
+ await import_fs.default.promises.unlink(import_path.default.join(linksDir, (0, import_utils.calculateSha1)(PACKAGE_PATH))).catch(() => {
1023
+ });
827
1024
  }
828
-
829
- // Remove stale browsers.
830
1025
  await this._validateInstallationCache(linksDir);
831
1026
  return {
832
- numberOfBrowsersLeft: (await fs.promises.readdir(registryDirectory).catch(() => [])).filter(browserDirectory => isBrowserDirectory(browserDirectory)).length
1027
+ numberOfBrowsersLeft: (await import_fs.default.promises.readdir(registryDirectory).catch(() => [])).filter((browserDirectory) => isBrowserDirectory(browserDirectory)).length
833
1028
  };
834
1029
  }
835
1030
  async validateHostRequirementsForExecutablesIfNeeded(executables, sdkLanguage) {
836
- if ((0, _utils.getAsBooleanFromENV)('PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS')) {
837
- process.stderr.write('Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.\n');
1031
+ if ((0, import_utils.getAsBooleanFromENV)("PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS")) {
1032
+ process.stderr.write("Skipping host requirements validation logic because `PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS` env variable is set.\n");
838
1033
  return;
839
1034
  }
840
- for (const executable of executables) await this._validateHostRequirementsForExecutableIfNeeded(executable, sdkLanguage);
1035
+ for (const executable of executables)
1036
+ await this._validateHostRequirementsForExecutableIfNeeded(executable, sdkLanguage);
841
1037
  }
842
1038
  async _validateHostRequirementsForExecutableIfNeeded(executable, sdkLanguage) {
843
- const kMaximumReValidationPeriod = 30 * 24 * 60 * 60 * 1000; // 30 days
844
- // Executable does not require validation.
845
- if (!executable.directory) return;
846
- const markerFile = _path.default.join(executable.directory, 'DEPENDENCIES_VALIDATED');
847
- // Executable is already validated.
848
- if (await fs.promises.stat(markerFile).then(stat => Date.now() - stat.mtime.getTime() < kMaximumReValidationPeriod).catch(() => false)) return;
849
- _debugLogger.debugLogger.log('install', `validating host requirements for "${executable.name}"`);
1039
+ const kMaximumReValidationPeriod = 30 * 24 * 60 * 60 * 1e3;
1040
+ if (!executable.directory)
1041
+ return;
1042
+ const markerFile = import_path.default.join(executable.directory, "DEPENDENCIES_VALIDATED");
1043
+ if (await import_fs.default.promises.stat(markerFile).then((stat) => Date.now() - stat.mtime.getTime() < kMaximumReValidationPeriod).catch(() => false))
1044
+ return;
1045
+ import_debugLogger.debugLogger.log("install", `validating host requirements for "${executable.name}"`);
850
1046
  try {
851
1047
  await executable._validateHostRequirements(sdkLanguage);
852
- _debugLogger.debugLogger.log('install', `validation passed for ${executable.name}`);
1048
+ import_debugLogger.debugLogger.log("install", `validation passed for ${executable.name}`);
853
1049
  } catch (error) {
854
- _debugLogger.debugLogger.log('install', `validation failed for ${executable.name}`);
1050
+ import_debugLogger.debugLogger.log("install", `validation failed for ${executable.name}`);
855
1051
  throw error;
856
1052
  }
857
- await fs.promises.writeFile(markerFile, '').catch(() => {});
1053
+ await import_fs.default.promises.writeFile(markerFile, "").catch(() => {
1054
+ });
858
1055
  }
859
1056
  _downloadURLs(descriptor) {
860
1057
  const paths = DOWNLOAD_PATHS[descriptor.name];
861
- const downloadPathTemplate = paths[_hostPlatform.hostPlatform] || paths['<unknown>'];
862
- if (!downloadPathTemplate) return [];
1058
+ const downloadPathTemplate = paths[import_hostPlatform.hostPlatform] || paths["<unknown>"];
1059
+ if (!downloadPathTemplate)
1060
+ return [];
863
1061
  const downloadPath = util.format(downloadPathTemplate, descriptor.revision);
864
- let downloadURLs = PLAYWRIGHT_CDN_MIRRORS.map(mirror => `${mirror}/${downloadPath}`);
1062
+ let downloadURLs = PLAYWRIGHT_CDN_MIRRORS.map((mirror) => `${mirror}/${downloadPath}`);
865
1063
  let downloadHostEnv;
866
- if (descriptor.name.startsWith('chromium')) downloadHostEnv = 'PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST';else if (descriptor.name.startsWith('firefox')) downloadHostEnv = 'PLAYWRIGHT_FIREFOX_DOWNLOAD_HOST';else if (descriptor.name.startsWith('webkit')) downloadHostEnv = 'PLAYWRIGHT_WEBKIT_DOWNLOAD_HOST';
867
- const customHostOverride = downloadHostEnv && (0, _utils.getFromENV)(downloadHostEnv) || (0, _utils.getFromENV)('PLAYWRIGHT_DOWNLOAD_HOST');
868
- if (customHostOverride) downloadURLs = [`${customHostOverride}/${downloadPath}`];
1064
+ if (descriptor.name.startsWith("chromium"))
1065
+ downloadHostEnv = "PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST";
1066
+ else if (descriptor.name.startsWith("firefox"))
1067
+ downloadHostEnv = "PLAYWRIGHT_FIREFOX_DOWNLOAD_HOST";
1068
+ else if (descriptor.name.startsWith("webkit"))
1069
+ downloadHostEnv = "PLAYWRIGHT_WEBKIT_DOWNLOAD_HOST";
1070
+ const customHostOverride = downloadHostEnv && (0, import_utils.getFromENV)(downloadHostEnv) || (0, import_utils.getFromENV)("PLAYWRIGHT_DOWNLOAD_HOST");
1071
+ if (customHostOverride)
1072
+ downloadURLs = [`${customHostOverride}/${downloadPath}`];
869
1073
  return downloadURLs;
870
1074
  }
871
1075
  async _downloadExecutable(descriptor, executablePath) {
872
1076
  const downloadURLs = this._downloadURLs(descriptor);
873
- if (!downloadURLs.length) throw new Error(`ERROR: Playwright does not support ${descriptor.name} on ${_hostPlatform.hostPlatform}`);
874
- if (!_hostPlatform.isOfficiallySupportedPlatform) (0, _browserFetcher.logPolitely)(`BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ${_hostPlatform.hostPlatform}.`);
1077
+ if (!downloadURLs.length)
1078
+ throw new Error(`ERROR: Playwright does not support ${descriptor.name} on ${import_hostPlatform.hostPlatform}`);
1079
+ if (!import_hostPlatform.isOfficiallySupportedPlatform)
1080
+ (0, import_browserFetcher.logPolitely)(`BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ${import_hostPlatform.hostPlatform}.`);
875
1081
  if (descriptor.hasRevisionOverride) {
876
- const message = `You are using a frozen ${descriptor.name} browser which does not receive updates anymore on ${_hostPlatform.hostPlatform}. Please update to the latest version of your operating system to test up-to-date browsers.`;
877
- if (process.env.GITHUB_ACTIONS) console.log(`::warning title=Playwright::${message}`); // eslint-disable-line no-console
878
- else (0, _browserFetcher.logPolitely)(message);
1082
+ const message = `You are using a frozen ${descriptor.name} browser which does not receive updates anymore on ${import_hostPlatform.hostPlatform}. Please update to the latest version of your operating system to test up-to-date browsers.`;
1083
+ if (process.env.GITHUB_ACTIONS)
1084
+ console.log(`::warning title=Playwright::${message}`);
1085
+ else
1086
+ (0, import_browserFetcher.logPolitely)(message);
879
1087
  }
880
- const displayName = descriptor.name.split('-').map(word => {
881
- return word === 'ffmpeg' ? 'FFMPEG' : word.charAt(0).toUpperCase() + word.slice(1);
882
- }).join(' ');
1088
+ const displayName = descriptor.name.split("-").map((word) => {
1089
+ return word === "ffmpeg" ? "FFMPEG" : word.charAt(0).toUpperCase() + word.slice(1);
1090
+ }).join(" ");
883
1091
  const title = descriptor.browserVersion ? `${displayName} ${descriptor.browserVersion} (playwright build v${descriptor.revision})` : `${displayName} playwright build v${descriptor.revision}`;
884
- const downloadFileName = `playwright-download-${descriptor.name}-${_hostPlatform.hostPlatform}-${descriptor.revision}.zip`;
885
- const downloadConnectionTimeoutEnv = (0, _utils.getFromENV)('PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT');
886
- const downloadConnectionTimeout = +(downloadConnectionTimeoutEnv || '0') || 30_000;
887
- await (0, _browserFetcher.downloadBrowserWithProgressBar)(title, descriptor.dir, executablePath, downloadURLs, downloadFileName, downloadConnectionTimeout).catch(e => {
888
- throw new Error(`Failed to download ${title}, caused by\n${e.stack}`);
1092
+ const downloadFileName = `playwright-download-${descriptor.name}-${import_hostPlatform.hostPlatform}-${descriptor.revision}.zip`;
1093
+ const downloadSocketTimeoutEnv = (0, import_utils.getFromENV)("PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT");
1094
+ const downloadSocketTimeout = +(downloadSocketTimeoutEnv || "0") || 3e4;
1095
+ await (0, import_browserFetcher.downloadBrowserWithProgressBar)(title, descriptor.dir, executablePath, downloadURLs, downloadFileName, downloadSocketTimeout).catch((e) => {
1096
+ throw new Error(`Failed to download ${title}, caused by
1097
+ ${e.stack}`);
889
1098
  });
890
1099
  }
891
1100
  async _installMSEdgeChannel(channel, scripts) {
892
1101
  const scriptArgs = [];
893
- if (process.platform !== 'linux') {
894
- const products = lowercaseAllKeys(JSON.parse(await (0, _network.fetchData)({
895
- url: 'https://edgeupdates.microsoft.com/api/products'
896
- })));
1102
+ if (process.platform !== "linux") {
1103
+ const products = lowercaseAllKeys(JSON.parse(await (0, import_network.fetchData)({ url: "https://edgeupdates.microsoft.com/api/products" })));
897
1104
  const productName = {
898
- 'msedge': 'Stable',
899
- 'msedge-beta': 'Beta',
900
- 'msedge-dev': 'Dev'
1105
+ "msedge": "Stable",
1106
+ "msedge-beta": "Beta",
1107
+ "msedge-dev": "Dev"
901
1108
  }[channel];
902
- const product = products.find(product => product.product === productName);
1109
+ const product = products.find((product2) => product2.product === productName);
903
1110
  const searchConfig = {
904
- darwin: {
905
- platform: 'MacOS',
906
- arch: 'universal',
907
- artifact: 'pkg'
908
- },
909
- win32: {
910
- platform: 'Windows',
911
- arch: 'x64',
912
- artifact: 'msi'
913
- }
1111
+ darwin: { platform: "MacOS", arch: "universal", artifact: "pkg" },
1112
+ win32: { platform: "Windows", arch: "x64", artifact: "msi" }
914
1113
  }[process.platform];
915
- const release = searchConfig ? product.releases.find(release => release.platform === searchConfig.platform && release.architecture === searchConfig.arch && release.artifacts.length > 0) : null;
916
- const artifact = release ? release.artifacts.find(artifact => artifact.artifactname === searchConfig.artifact) : null;
917
- if (artifact) scriptArgs.push(artifact.location /* url */);else throw new Error(`Cannot install ${channel} on ${process.platform}`);
1114
+ const release = searchConfig ? product.releases.find((release2) => release2.platform === searchConfig.platform && release2.architecture === searchConfig.arch && release2.artifacts.length > 0) : null;
1115
+ const artifact = release ? release.artifacts.find((artifact2) => artifact2.artifactname === searchConfig.artifact) : null;
1116
+ if (artifact)
1117
+ scriptArgs.push(
1118
+ artifact.location
1119
+ /* url */
1120
+ );
1121
+ else
1122
+ throw new Error(`Cannot install ${channel} on ${process.platform}`);
918
1123
  }
919
1124
  await this._installChromiumChannel(channel, scripts, scriptArgs);
920
1125
  }
921
1126
  async _installChromiumChannel(channel, scripts, scriptArgs = []) {
922
1127
  const scriptName = scripts[process.platform];
923
- if (!scriptName) throw new Error(`Cannot install ${channel} on ${process.platform}`);
1128
+ if (!scriptName)
1129
+ throw new Error(`Cannot install ${channel} on ${process.platform}`);
924
1130
  const cwd = BIN_PATH;
925
- const isPowerShell = scriptName.endsWith('.ps1');
1131
+ const isPowerShell = scriptName.endsWith(".ps1");
926
1132
  if (isPowerShell) {
927
- const args = ['-ExecutionPolicy', 'Bypass', '-File', _path.default.join(BIN_PATH, scriptName), ...scriptArgs];
928
- const {
929
- code
930
- } = await (0, _spawnAsync.spawnAsync)('powershell.exe', args, {
931
- cwd,
932
- stdio: 'inherit'
933
- });
934
- if (code !== 0) throw new Error(`Failed to install ${channel}`);
1133
+ const args = [
1134
+ "-ExecutionPolicy",
1135
+ "Bypass",
1136
+ "-File",
1137
+ import_path.default.join(BIN_PATH, scriptName),
1138
+ ...scriptArgs
1139
+ ];
1140
+ const { code } = await (0, import_spawnAsync.spawnAsync)("powershell.exe", args, { cwd, stdio: "inherit" });
1141
+ if (code !== 0)
1142
+ throw new Error(`Failed to install ${channel}`);
935
1143
  } else {
936
- const {
937
- command,
938
- args,
939
- elevatedPermissions
940
- } = await (0, _dependencies.transformCommandsForRoot)([`bash "${_path.default.join(BIN_PATH, scriptName)}" ${scriptArgs.join('')}`]);
941
- if (elevatedPermissions) console.log('Switching to root user to install dependencies...'); // eslint-disable-line no-console
942
- const {
943
- code
944
- } = await (0, _spawnAsync.spawnAsync)(command, args, {
945
- cwd,
946
- stdio: 'inherit'
947
- });
948
- if (code !== 0) throw new Error(`Failed to install ${channel}`);
1144
+ const { command, args, elevatedPermissions } = await (0, import_dependencies.transformCommandsForRoot)([`bash "${import_path.default.join(BIN_PATH, scriptName)}" ${scriptArgs.join("")}`]);
1145
+ if (elevatedPermissions)
1146
+ console.log("Switching to root user to install dependencies...");
1147
+ const { code } = await (0, import_spawnAsync.spawnAsync)(command, args, { cwd, stdio: "inherit" });
1148
+ if (code !== 0)
1149
+ throw new Error(`Failed to install ${channel}`);
949
1150
  }
950
1151
  }
951
1152
  async _validateInstallationCache(linksDir) {
952
- // 1. Collect used downloads and package descriptors.
953
- const usedBrowserPaths = new Set();
954
- for (const fileName of await fs.promises.readdir(linksDir)) {
955
- const linkPath = _path.default.join(linksDir, fileName);
956
- let linkTarget = '';
1153
+ const usedBrowserPaths = /* @__PURE__ */ new Set();
1154
+ for (const fileName of await import_fs.default.promises.readdir(linksDir)) {
1155
+ const linkPath = import_path.default.join(linksDir, fileName);
1156
+ let linkTarget = "";
957
1157
  try {
958
- linkTarget = (await fs.promises.readFile(linkPath)).toString();
959
- const browsersJSON = require(_path.default.join(linkTarget, 'browsers.json'));
1158
+ linkTarget = (await import_fs.default.promises.readFile(linkPath)).toString();
1159
+ const browsersJSON = require(import_path.default.join(linkTarget, "browsers.json"));
960
1160
  const descriptors = readDescriptors(browsersJSON);
961
1161
  for (const browserName of allDownloadable) {
962
- // We retain browsers if they are found in the descriptor.
963
- // Note, however, that there are older versions out in the wild that rely on
964
- // the "download" field in the browser descriptor and use its value
965
- // to retain and download browsers.
966
- // As of v1.10, we decided to abandon "download" field.
967
- const descriptor = descriptors.find(d => d.name === browserName);
968
- if (!descriptor) continue;
1162
+ const descriptor = descriptors.find((d) => d.name === browserName);
1163
+ if (!descriptor)
1164
+ continue;
969
1165
  const usedBrowserPath = descriptor.dir;
970
1166
  const browserRevision = parseInt(descriptor.revision, 10);
971
- // Old browser installations don't have marker file.
972
- // We switched chromium from 999999 to 1000, 300000 is the new Y2K.
973
- const shouldHaveMarkerFile = browserName === 'chromium' && (browserRevision >= 786218 || browserRevision < 300000) || browserName === 'firefox' && browserRevision >= 1128 || browserName === 'webkit' && browserRevision >= 1307 ||
974
- // All new applications have a marker file right away.
975
- browserName !== 'firefox' && browserName !== 'chromium' && browserName !== 'webkit';
976
- if (!shouldHaveMarkerFile || (await (0, _fileUtils.existsAsync)(browserDirectoryToMarkerFilePath(usedBrowserPath)))) usedBrowserPaths.add(usedBrowserPath);
1167
+ const shouldHaveMarkerFile = browserName === "chromium" && (browserRevision >= 786218 || browserRevision < 3e5) || browserName === "firefox" && browserRevision >= 1128 || browserName === "webkit" && browserRevision >= 1307 || // All new applications have a marker file right away.
1168
+ browserName !== "firefox" && browserName !== "chromium" && browserName !== "webkit";
1169
+ if (!shouldHaveMarkerFile || await (0, import_fileUtils.existsAsync)(browserDirectoryToMarkerFilePath(usedBrowserPath)))
1170
+ usedBrowserPaths.add(usedBrowserPath);
977
1171
  }
978
1172
  } catch (e) {
979
- await fs.promises.unlink(linkPath).catch(e => {});
1173
+ await import_fs.default.promises.unlink(linkPath).catch((e2) => {
1174
+ });
980
1175
  }
981
1176
  }
982
-
983
- // 2. Delete all unused browsers.
984
- if (!(0, _utils.getAsBooleanFromENV)('PLAYWRIGHT_SKIP_BROWSER_GC')) {
985
- let downloadedBrowsers = (await fs.promises.readdir(registryDirectory)).map(file => _path.default.join(registryDirectory, file));
986
- downloadedBrowsers = downloadedBrowsers.filter(file => isBrowserDirectory(file));
1177
+ if (!(0, import_utils.getAsBooleanFromENV)("PLAYWRIGHT_SKIP_BROWSER_GC")) {
1178
+ let downloadedBrowsers = (await import_fs.default.promises.readdir(registryDirectory)).map((file) => import_path.default.join(registryDirectory, file));
1179
+ downloadedBrowsers = downloadedBrowsers.filter((file) => isBrowserDirectory(file));
987
1180
  const directories = new Set(downloadedBrowsers);
988
- for (const browserDirectory of usedBrowserPaths) directories.delete(browserDirectory);
989
- for (const directory of directories) (0, _browserFetcher.logPolitely)('Removing unused browser at ' + directory);
990
- await (0, _fileUtils.removeFolders)([...directories]);
1181
+ for (const browserDirectory of usedBrowserPaths)
1182
+ directories.delete(browserDirectory);
1183
+ for (const directory of directories)
1184
+ (0, import_browserFetcher.logPolitely)("Removing unused browser at " + directory);
1185
+ await (0, import_fileUtils.removeFolders)([...directories]);
991
1186
  }
992
1187
  }
993
1188
  }
994
- exports.Registry = Registry;
995
1189
  function browserDirectoryToMarkerFilePath(browserDirectory) {
996
- return _path.default.join(browserDirectory, 'INSTALLATION_COMPLETE');
1190
+ return import_path.default.join(browserDirectory, "INSTALLATION_COMPLETE");
997
1191
  }
998
1192
  function buildPlaywrightCLICommand(sdkLanguage, parameters) {
999
1193
  switch (sdkLanguage) {
1000
- case 'python':
1194
+ case "python":
1001
1195
  return `playwright ${parameters}`;
1002
- case 'java':
1196
+ case "java":
1003
1197
  return `mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="${parameters}"`;
1004
- case 'csharp':
1198
+ case "csharp":
1005
1199
  return `pwsh bin/Debug/netX/playwright.ps1 ${parameters}`;
1006
- default:
1007
- {
1008
- const packageManagerCommand = (0, _utils.getPackageManagerExecCommand)();
1009
- return `${packageManagerCommand} playwright ${parameters}`;
1010
- }
1200
+ default: {
1201
+ const packageManagerCommand = (0, import_utils.getPackageManagerExecCommand)();
1202
+ return `${packageManagerCommand} playwright ${parameters}`;
1203
+ }
1011
1204
  }
1012
1205
  }
1013
1206
  async function installBrowsersForNpmInstall(browsers) {
1014
- // PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD should have a value of 0 or 1
1015
- if ((0, _utils.getAsBooleanFromENV)('PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD')) {
1016
- (0, _browserFetcher.logPolitely)('Skipping browsers download because `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` env variable is set');
1207
+ if ((0, import_utils.getAsBooleanFromENV)("PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD")) {
1208
+ (0, import_browserFetcher.logPolitely)("Skipping browsers download because `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` env variable is set");
1017
1209
  return false;
1018
1210
  }
1019
1211
  const executables = [];
1212
+ if (process.platform === "win32")
1213
+ executables.push(registry.findExecutable("winldd"));
1020
1214
  for (const browserName of browsers) {
1021
1215
  const executable = registry.findExecutable(browserName);
1022
- if (!executable || executable.installType === 'none') throw new Error(`Cannot install ${browserName}`);
1216
+ if (!executable || executable.installType === "none")
1217
+ throw new Error(`Cannot install ${browserName}`);
1023
1218
  executables.push(executable);
1024
1219
  }
1025
- await registry.install(executables, false /* forceReinstall */);
1220
+ await registry.install(
1221
+ executables,
1222
+ false
1223
+ /* forceReinstall */
1224
+ );
1026
1225
  }
1027
1226
  function findChromiumChannel(sdkLanguage) {
1028
- // Fall back to the stable channels of popular vendors to work out of the box.
1029
- // Null means no installation and no channels found.
1030
1227
  let channel = null;
1031
- for (const name of ['chromium', 'chrome', 'msedge']) {
1228
+ for (const name of ["chromium", "chrome", "msedge"]) {
1032
1229
  try {
1033
1230
  registry.findExecutable(name).executablePathOrDie(sdkLanguage);
1034
- channel = name === 'chromium' ? undefined : name;
1231
+ channel = name === "chromium" ? void 0 : name;
1035
1232
  break;
1036
- } catch (e) {}
1233
+ } catch (e) {
1234
+ }
1037
1235
  }
1038
1236
  if (channel === null) {
1039
1237
  const installCommand = buildPlaywrightCLICommand(sdkLanguage, `install chromium`);
1040
- const prettyMessage = [`No chromium-based browser found on the system.`, `Please run the following command to download one:`, ``, ` ${installCommand}`, ``, `<3 Playwright Team`].join('\n');
1041
- throw new Error('\n' + (0, _utils.wrapInASCIIBox)(prettyMessage, 1));
1238
+ const prettyMessage = [
1239
+ `No chromium-based browser found on the system.`,
1240
+ `Please run the following command to download one:`,
1241
+ ``,
1242
+ ` ${installCommand}`,
1243
+ ``,
1244
+ `<3 Playwright Team`
1245
+ ].join("\n");
1246
+ throw new Error("\n" + (0, import_ascii.wrapInASCIIBox)(prettyMessage, 1));
1042
1247
  }
1043
1248
  return channel;
1044
1249
  }
1045
1250
  function lowercaseAllKeys(json) {
1046
- if (typeof json !== 'object' || !json) return json;
1047
- if (Array.isArray(json)) return json.map(lowercaseAllKeys);
1251
+ if (typeof json !== "object" || !json)
1252
+ return json;
1253
+ if (Array.isArray(json))
1254
+ return json.map(lowercaseAllKeys);
1048
1255
  const result = {};
1049
- for (const [key, value] of Object.entries(json)) result[key.toLowerCase()] = lowercaseAllKeys(value);
1256
+ for (const [key, value] of Object.entries(json))
1257
+ result[key.toLowerCase()] = lowercaseAllKeys(value);
1050
1258
  return result;
1051
1259
  }
1052
- const registry = exports.registry = new Registry(require('../../../browsers.json'));
1260
+ const registry = new Registry(require("../../../browsers.json"));
1261
+ // Annotate the CommonJS export names for ESM import in node:
1262
+ 0 && (module.exports = {
1263
+ Registry,
1264
+ browserDirectoryToMarkerFilePath,
1265
+ buildPlaywrightCLICommand,
1266
+ findChromiumChannel,
1267
+ installBrowsersForNpmInstall,
1268
+ registry,
1269
+ registryDirectory,
1270
+ writeDockerVersion
1271
+ });