patchright-core 1.57.0 → 1.58.2
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.
- package/ThirdPartyNotices.txt +3223 -308
- package/browsers.json +21 -22
- package/lib/cli/program.js +4 -5
- package/lib/client/api.js +3 -0
- package/lib/client/browser.js +3 -5
- package/lib/client/browserContext.js +40 -4
- package/lib/client/browserType.js +4 -3
- package/lib/client/connection.js +4 -0
- package/lib/client/elementHandle.js +3 -0
- package/lib/client/events.js +3 -0
- package/lib/client/fetch.js +3 -4
- package/lib/client/frame.js +10 -1
- package/lib/client/locator.js +8 -0
- package/lib/client/network.js +5 -1
- package/lib/client/page.js +29 -1
- package/lib/client/pageAgent.js +64 -0
- package/lib/client/platform.js +3 -0
- package/lib/client/tracing.js +1 -1
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/generated/pollingRecorderSource.js +1 -1
- package/lib/mcpBundle.js +84 -0
- package/lib/mcpBundleImpl/index.js +147 -0
- package/lib/protocol/serializers.js +5 -0
- package/lib/protocol/validator.js +88 -4
- package/lib/remote/playwrightServer.js +1 -2
- package/lib/server/agent/actionRunner.js +335 -0
- package/lib/server/agent/actions.js +128 -0
- package/lib/server/agent/codegen.js +111 -0
- package/lib/server/agent/context.js +150 -0
- package/lib/server/agent/expectTools.js +156 -0
- package/lib/server/agent/pageAgent.js +204 -0
- package/lib/server/agent/performTools.js +262 -0
- package/lib/server/agent/tool.js +109 -0
- package/lib/server/artifact.js +1 -1
- package/lib/server/bidi/bidiBrowser.js +56 -12
- package/lib/server/bidi/bidiChromium.js +8 -12
- package/lib/server/bidi/bidiConnection.js +1 -0
- package/lib/server/bidi/bidiDeserializer.js +116 -0
- package/lib/server/bidi/bidiExecutionContext.js +75 -29
- package/lib/server/bidi/bidiFirefox.js +6 -8
- package/lib/server/bidi/bidiNetworkManager.js +1 -1
- package/lib/server/bidi/bidiPage.js +39 -28
- package/lib/server/bidi/third_party/bidiProtocolCore.js +1 -0
- package/lib/server/browserContext.js +34 -26
- package/lib/server/browserType.js +12 -4
- package/lib/server/chromium/chromium.js +14 -20
- package/lib/server/chromium/chromiumSwitches.js +2 -2
- package/lib/server/chromium/crBrowser.js +22 -12
- package/lib/server/chromium/crConnection.js +0 -5
- package/lib/server/chromium/crCoverage.js +13 -1
- package/lib/server/chromium/crDevTools.js +0 -2
- package/lib/server/chromium/crNetworkManager.js +92 -12
- package/lib/server/chromium/crPage.js +62 -116
- package/lib/server/codegen/javascript.js +6 -29
- package/lib/server/deviceDescriptorsSource.json +56 -56
- package/lib/server/dispatchers/browserContextDispatcher.js +3 -2
- package/lib/server/dispatchers/dispatcher.js +6 -13
- package/lib/server/dispatchers/frameDispatcher.js +1 -1
- package/lib/server/dispatchers/jsHandleDispatcher.js +2 -2
- package/lib/server/dispatchers/pageAgentDispatcher.js +96 -0
- package/lib/server/dispatchers/pageDispatcher.js +4 -0
- package/lib/server/dom.js +12 -3
- package/lib/server/electron/electron.js +5 -2
- package/lib/server/firefox/ffBrowser.js +10 -20
- package/lib/server/firefox/ffConnection.js +0 -5
- package/lib/server/firefox/ffNetworkManager.js +2 -2
- package/lib/server/firefox/ffPage.js +15 -18
- package/lib/server/firefox/firefox.js +6 -8
- package/lib/server/frameSelectors.js +16 -4
- package/lib/server/frames.js +251 -86
- package/lib/server/instrumentation.js +3 -0
- package/lib/server/javascript.js +8 -4
- package/lib/server/launchApp.js +2 -1
- package/lib/server/network.js +50 -12
- package/lib/server/page.js +61 -91
- package/lib/server/progress.js +26 -6
- package/lib/server/recorder/recorderApp.js +79 -100
- package/lib/server/registry/browserFetcher.js +6 -4
- package/lib/server/registry/index.js +172 -149
- package/lib/server/registry/oopDownloadBrowserMain.js +3 -0
- package/lib/server/screencast.js +190 -0
- package/lib/server/screenshotter.js +6 -0
- package/lib/server/trace/recorder/snapshotter.js +17 -8
- package/lib/server/trace/recorder/snapshotterInjected.js +30 -72
- package/lib/server/trace/recorder/tracing.js +29 -21
- package/lib/server/trace/viewer/traceParser.js +72 -0
- package/lib/server/trace/viewer/traceViewer.js +21 -17
- package/lib/server/utils/expectUtils.js +87 -2
- package/lib/server/utils/hostPlatform.js +15 -0
- package/lib/server/utils/httpServer.js +5 -20
- package/lib/server/utils/network.js +37 -28
- package/lib/server/utils/nodePlatform.js +6 -0
- package/lib/server/{chromium/videoRecorder.js → videoRecorder.js} +22 -13
- package/lib/server/webkit/webkit.js +4 -6
- package/lib/server/webkit/wkBrowser.js +2 -6
- package/lib/server/webkit/wkConnection.js +1 -6
- package/lib/server/webkit/wkInterceptableRequest.js +29 -1
- package/lib/server/webkit/wkPage.js +75 -46
- package/lib/utils/isomorphic/ariaSnapshot.js +60 -2
- package/lib/utils/isomorphic/lruCache.js +51 -0
- package/lib/utils/isomorphic/protocolMetainfo.js +9 -1
- package/lib/utils/isomorphic/stringUtils.js +49 -0
- package/lib/utils/isomorphic/trace/entries.js +16 -0
- package/lib/utils/isomorphic/trace/snapshotRenderer.js +499 -0
- package/lib/utils/isomorphic/trace/snapshotServer.js +120 -0
- package/lib/utils/isomorphic/trace/snapshotStorage.js +89 -0
- package/lib/utils/isomorphic/trace/traceLoader.js +131 -0
- package/lib/utils/isomorphic/trace/traceModel.js +365 -0
- package/lib/utils/isomorphic/trace/traceModernizer.js +400 -0
- package/lib/utils/isomorphic/trace/versions/traceV3.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV4.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV5.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV6.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV7.js +16 -0
- package/lib/utils/isomorphic/trace/versions/traceV8.js +16 -0
- package/lib/utils/isomorphic/yaml.js +84 -0
- package/lib/utils.js +2 -0
- package/lib/utilsBundle.js +2 -5
- package/lib/utilsBundleImpl/index.js +165 -165
- package/lib/vite/htmlReport/index.html +21 -21
- package/lib/vite/recorder/assets/codeMirrorModule-CFUTFUO7.js +32 -0
- package/lib/vite/{traceViewer/codeMirrorModule.C3UTv-Ge.css → recorder/assets/codeMirrorModule-DYBRYzYX.css} +1 -1
- package/lib/vite/recorder/assets/{index-Ri0uHF7I.css → index-BSjZa4pk.css} +1 -1
- package/lib/vite/recorder/assets/index-CVkBxsGf.js +193 -0
- package/lib/vite/recorder/index.html +2 -2
- package/lib/vite/traceViewer/assets/codeMirrorModule-BVA4h_ZY.js +32 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-CjfmcdOz.js +266 -0
- package/lib/vite/{recorder/assets/codeMirrorModule-C3UTv-Ge.css → traceViewer/codeMirrorModule.DYBRYzYX.css} +1 -1
- package/lib/vite/traceViewer/defaultSettingsView.7ch9cixO.css +1 -0
- package/lib/vite/traceViewer/index.BVu7tZDe.css +1 -0
- package/lib/vite/traceViewer/index.BtyWtaE-.js +2 -0
- package/lib/vite/traceViewer/index.html +4 -4
- package/lib/vite/traceViewer/sw.bundle.js +5 -3
- package/lib/vite/traceViewer/uiMode.fyrXARf2.js +5 -0
- package/lib/vite/traceViewer/uiMode.html +3 -3
- package/package.json +2 -1
- package/types/protocol.d.ts +738 -159
- package/types/types.d.ts +25 -38
- package/lib/server/bidi/third_party/bidiDeserializer.js +0 -98
- package/lib/server/trace/test/inMemorySnapshotter.js +0 -87
- package/lib/vite/recorder/assets/codeMirrorModule-CBbSe-ZI.js +0 -25
- package/lib/vite/recorder/assets/index-CpZVd2nA.js +0 -193
- package/lib/vite/traceViewer/assets/codeMirrorModule-DHz0wP2C.js +0 -25
- package/lib/vite/traceViewer/assets/defaultSettingsView-WsZP88O6.js +0 -266
- package/lib/vite/traceViewer/defaultSettingsView.ConWv5KN.css +0 -1
- package/lib/vite/traceViewer/index.C4Y3Aw8n.css +0 -1
- package/lib/vite/traceViewer/index.C8xAeo93.js +0 -2
- package/lib/vite/traceViewer/uiMode.BltraIJB.js +0 -5
|
@@ -145,130 +145,140 @@ const EXECUTABLE_PATHS = {
|
|
|
145
145
|
"win-x64": ["PrintDeps.exe"]
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
|
+
function cftUrl(suffix) {
|
|
149
|
+
return ({ browserVersion }) => {
|
|
150
|
+
return {
|
|
151
|
+
path: `builds/cft/${browserVersion}/${suffix}`,
|
|
152
|
+
mirrors: [
|
|
153
|
+
"https://cdn.playwright.dev"
|
|
154
|
+
]
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
}
|
|
148
158
|
const DOWNLOAD_PATHS = {
|
|
149
159
|
"chromium": {
|
|
150
160
|
"<unknown>": void 0,
|
|
151
161
|
"ubuntu18.04-x64": void 0,
|
|
152
|
-
"ubuntu20.04-x64": "
|
|
153
|
-
"ubuntu22.04-x64": "
|
|
154
|
-
"ubuntu24.04-x64": "
|
|
162
|
+
"ubuntu20.04-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
163
|
+
"ubuntu22.04-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
164
|
+
"ubuntu24.04-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
155
165
|
"ubuntu18.04-arm64": void 0,
|
|
156
166
|
"ubuntu20.04-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
|
|
157
167
|
"ubuntu22.04-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
|
|
158
168
|
"ubuntu24.04-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
|
|
159
|
-
"debian11-x64": "
|
|
169
|
+
"debian11-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
160
170
|
"debian11-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
|
|
161
|
-
"debian12-x64": "
|
|
171
|
+
"debian12-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
162
172
|
"debian12-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
|
|
163
|
-
"debian13-x64": "
|
|
173
|
+
"debian13-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
164
174
|
"debian13-arm64": "builds/chromium/%s/chromium-linux-arm64.zip",
|
|
165
|
-
"mac10.13": "
|
|
166
|
-
"mac10.14": "
|
|
167
|
-
"mac10.15": "
|
|
168
|
-
"mac11": "
|
|
169
|
-
"mac11-arm64": "
|
|
170
|
-
"mac12": "
|
|
171
|
-
"mac12-arm64": "
|
|
172
|
-
"mac13": "
|
|
173
|
-
"mac13-arm64": "
|
|
174
|
-
"mac14": "
|
|
175
|
-
"mac14-arm64": "
|
|
176
|
-
"mac15": "
|
|
177
|
-
"mac15-arm64": "
|
|
178
|
-
"win64": "
|
|
175
|
+
"mac10.13": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
176
|
+
"mac10.14": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
177
|
+
"mac10.15": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
178
|
+
"mac11": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
179
|
+
"mac11-arm64": cftUrl("mac-arm64/chrome-mac-arm64.zip"),
|
|
180
|
+
"mac12": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
181
|
+
"mac12-arm64": cftUrl("mac-arm64/chrome-mac-arm64.zip"),
|
|
182
|
+
"mac13": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
183
|
+
"mac13-arm64": cftUrl("mac-arm64/chrome-mac-arm64.zip"),
|
|
184
|
+
"mac14": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
185
|
+
"mac14-arm64": cftUrl("mac-arm64/chrome-mac-arm64.zip"),
|
|
186
|
+
"mac15": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
187
|
+
"mac15-arm64": cftUrl("mac-arm64/chrome-mac-arm64.zip"),
|
|
188
|
+
"win64": cftUrl("win64/chrome-win64.zip")
|
|
179
189
|
},
|
|
180
190
|
"chromium-headless-shell": {
|
|
181
191
|
"<unknown>": void 0,
|
|
182
192
|
"ubuntu18.04-x64": void 0,
|
|
183
|
-
"ubuntu20.04-x64": "
|
|
184
|
-
"ubuntu22.04-x64": "
|
|
185
|
-
"ubuntu24.04-x64": "
|
|
193
|
+
"ubuntu20.04-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
194
|
+
"ubuntu22.04-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
195
|
+
"ubuntu24.04-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
186
196
|
"ubuntu18.04-arm64": void 0,
|
|
187
197
|
"ubuntu20.04-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
|
|
188
198
|
"ubuntu22.04-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
|
|
189
199
|
"ubuntu24.04-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
|
|
190
|
-
"debian11-x64": "
|
|
200
|
+
"debian11-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
191
201
|
"debian11-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
|
|
192
|
-
"debian12-x64": "
|
|
202
|
+
"debian12-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
193
203
|
"debian12-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
|
|
194
|
-
"debian13-x64": "
|
|
204
|
+
"debian13-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
195
205
|
"debian13-arm64": "builds/chromium/%s/chromium-headless-shell-linux-arm64.zip",
|
|
196
206
|
"mac10.13": void 0,
|
|
197
207
|
"mac10.14": void 0,
|
|
198
208
|
"mac10.15": void 0,
|
|
199
|
-
"mac11": "
|
|
200
|
-
"mac11-arm64": "
|
|
201
|
-
"mac12": "
|
|
202
|
-
"mac12-arm64": "
|
|
203
|
-
"mac13": "
|
|
204
|
-
"mac13-arm64": "
|
|
205
|
-
"mac14": "
|
|
206
|
-
"mac14-arm64": "
|
|
207
|
-
"mac15": "
|
|
208
|
-
"mac15-arm64": "
|
|
209
|
-
"win64": "
|
|
209
|
+
"mac11": cftUrl("mac-x64/chrome-headless-shell-mac-x64.zip"),
|
|
210
|
+
"mac11-arm64": cftUrl("mac-arm64/chrome-headless-shell-mac-arm64.zip"),
|
|
211
|
+
"mac12": cftUrl("mac-x64/chrome-headless-shell-mac-x64.zip"),
|
|
212
|
+
"mac12-arm64": cftUrl("mac-arm64/chrome-headless-shell-mac-arm64.zip"),
|
|
213
|
+
"mac13": cftUrl("mac-x64/chrome-headless-shell-mac-x64.zip"),
|
|
214
|
+
"mac13-arm64": cftUrl("mac-arm64/chrome-headless-shell-mac-arm64.zip"),
|
|
215
|
+
"mac14": cftUrl("mac-x64/chrome-headless-shell-mac-x64.zip"),
|
|
216
|
+
"mac14-arm64": cftUrl("mac-arm64/chrome-headless-shell-mac-arm64.zip"),
|
|
217
|
+
"mac15": cftUrl("mac-x64/chrome-headless-shell-mac-x64.zip"),
|
|
218
|
+
"mac15-arm64": cftUrl("mac-arm64/chrome-headless-shell-mac-arm64.zip"),
|
|
219
|
+
"win64": cftUrl("win64/chrome-headless-shell-win64.zip")
|
|
210
220
|
},
|
|
211
221
|
"chromium-tip-of-tree": {
|
|
212
222
|
"<unknown>": void 0,
|
|
213
223
|
"ubuntu18.04-x64": void 0,
|
|
214
|
-
"ubuntu20.04-x64": "
|
|
215
|
-
"ubuntu22.04-x64": "
|
|
216
|
-
"ubuntu24.04-x64": "
|
|
224
|
+
"ubuntu20.04-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
225
|
+
"ubuntu22.04-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
226
|
+
"ubuntu24.04-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
217
227
|
"ubuntu18.04-arm64": void 0,
|
|
218
228
|
"ubuntu20.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
|
|
219
229
|
"ubuntu22.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
|
|
220
230
|
"ubuntu24.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
|
|
221
|
-
"debian11-x64": "
|
|
231
|
+
"debian11-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
222
232
|
"debian11-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
|
|
223
|
-
"debian12-x64": "
|
|
233
|
+
"debian12-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
224
234
|
"debian12-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
|
|
225
|
-
"debian13-x64": "
|
|
235
|
+
"debian13-x64": cftUrl("linux64/chrome-linux64.zip"),
|
|
226
236
|
"debian13-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip",
|
|
227
|
-
"mac10.13": "
|
|
228
|
-
"mac10.14": "
|
|
229
|
-
"mac10.15": "
|
|
230
|
-
"mac11": "
|
|
231
|
-
"mac11-arm64": "
|
|
232
|
-
"mac12": "
|
|
233
|
-
"mac12-arm64": "
|
|
234
|
-
"mac13": "
|
|
235
|
-
"mac13-arm64": "
|
|
236
|
-
"mac14": "
|
|
237
|
-
"mac14-arm64": "
|
|
238
|
-
"mac15": "
|
|
239
|
-
"mac15-arm64": "
|
|
240
|
-
"win64": "
|
|
237
|
+
"mac10.13": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
238
|
+
"mac10.14": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
239
|
+
"mac10.15": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
240
|
+
"mac11": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
241
|
+
"mac11-arm64": cftUrl("mac-arm64/chrome-mac-arm64.zip"),
|
|
242
|
+
"mac12": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
243
|
+
"mac12-arm64": cftUrl("mac-arm64/chrome-mac-arm64.zip"),
|
|
244
|
+
"mac13": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
245
|
+
"mac13-arm64": cftUrl("mac-arm64/chrome-mac-arm64.zip"),
|
|
246
|
+
"mac14": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
247
|
+
"mac14-arm64": cftUrl("mac-arm64/chrome-mac-arm64.zip"),
|
|
248
|
+
"mac15": cftUrl("mac-x64/chrome-mac-x64.zip"),
|
|
249
|
+
"mac15-arm64": cftUrl("mac-arm64/chrome-mac-arm64.zip"),
|
|
250
|
+
"win64": cftUrl("win64/chrome-win64.zip")
|
|
241
251
|
},
|
|
242
252
|
"chromium-tip-of-tree-headless-shell": {
|
|
243
253
|
"<unknown>": void 0,
|
|
244
254
|
"ubuntu18.04-x64": void 0,
|
|
245
|
-
"ubuntu20.04-x64": "
|
|
246
|
-
"ubuntu22.04-x64": "
|
|
247
|
-
"ubuntu24.04-x64": "
|
|
255
|
+
"ubuntu20.04-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
256
|
+
"ubuntu22.04-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
257
|
+
"ubuntu24.04-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
248
258
|
"ubuntu18.04-arm64": void 0,
|
|
249
259
|
"ubuntu20.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
|
|
250
260
|
"ubuntu22.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
|
|
251
261
|
"ubuntu24.04-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
|
|
252
|
-
"debian11-x64": "
|
|
262
|
+
"debian11-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
253
263
|
"debian11-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
|
|
254
|
-
"debian12-x64": "
|
|
264
|
+
"debian12-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
255
265
|
"debian12-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
|
|
256
|
-
"debian13-x64": "
|
|
266
|
+
"debian13-x64": cftUrl("linux64/chrome-headless-shell-linux64.zip"),
|
|
257
267
|
"debian13-arm64": "builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-headless-shell-linux-arm64.zip",
|
|
258
268
|
"mac10.13": void 0,
|
|
259
269
|
"mac10.14": void 0,
|
|
260
270
|
"mac10.15": void 0,
|
|
261
|
-
"mac11": "
|
|
262
|
-
"mac11-arm64": "
|
|
263
|
-
"mac12": "
|
|
264
|
-
"mac12-arm64": "
|
|
265
|
-
"mac13": "
|
|
266
|
-
"mac13-arm64": "
|
|
267
|
-
"mac14": "
|
|
268
|
-
"mac14-arm64": "
|
|
269
|
-
"mac15": "
|
|
270
|
-
"mac15-arm64": "
|
|
271
|
-
"win64": "
|
|
271
|
+
"mac11": cftUrl("mac-x64/chrome-headless-shell-mac-x64.zip"),
|
|
272
|
+
"mac11-arm64": cftUrl("mac-arm64/chrome-headless-shell-mac-arm64.zip"),
|
|
273
|
+
"mac12": cftUrl("mac-x64/chrome-headless-shell-mac-x64.zip"),
|
|
274
|
+
"mac12-arm64": cftUrl("mac-arm64/chrome-headless-shell-mac-arm64.zip"),
|
|
275
|
+
"mac13": cftUrl("mac-x64/chrome-headless-shell-mac-x64.zip"),
|
|
276
|
+
"mac13-arm64": cftUrl("mac-arm64/chrome-headless-shell-mac-arm64.zip"),
|
|
277
|
+
"mac14": cftUrl("mac-x64/chrome-headless-shell-mac-x64.zip"),
|
|
278
|
+
"mac14-arm64": cftUrl("mac-arm64/chrome-headless-shell-mac-arm64.zip"),
|
|
279
|
+
"mac15": cftUrl("mac-x64/chrome-headless-shell-mac-x64.zip"),
|
|
280
|
+
"mac15-arm64": cftUrl("mac-arm64/chrome-headless-shell-mac-arm64.zip"),
|
|
281
|
+
"win64": cftUrl("win64/chrome-headless-shell-win64.zip")
|
|
272
282
|
},
|
|
273
283
|
"firefox": {
|
|
274
284
|
"<unknown>": void 0,
|
|
@@ -349,14 +359,14 @@ const DOWNLOAD_PATHS = {
|
|
|
349
359
|
"debian13-x64": "builds/webkit/%s/webkit-debian-13.zip",
|
|
350
360
|
"debian13-arm64": "builds/webkit/%s/webkit-debian-13-arm64.zip",
|
|
351
361
|
"mac10.13": void 0,
|
|
352
|
-
"mac10.14":
|
|
353
|
-
"mac10.15":
|
|
354
|
-
"mac11":
|
|
355
|
-
"mac11-arm64":
|
|
356
|
-
"mac12":
|
|
357
|
-
"mac12-arm64":
|
|
358
|
-
"mac13":
|
|
359
|
-
"mac13-arm64":
|
|
362
|
+
"mac10.14": void 0,
|
|
363
|
+
"mac10.15": void 0,
|
|
364
|
+
"mac11": void 0,
|
|
365
|
+
"mac11-arm64": void 0,
|
|
366
|
+
"mac12": void 0,
|
|
367
|
+
"mac12-arm64": void 0,
|
|
368
|
+
"mac13": void 0,
|
|
369
|
+
"mac13-arm64": void 0,
|
|
360
370
|
"mac14": "builds/webkit/%s/webkit-mac-14.zip",
|
|
361
371
|
"mac14-arm64": "builds/webkit/%s/webkit-mac-14-arm64.zip",
|
|
362
372
|
"mac15": "builds/webkit/%s/webkit-mac-15.zip",
|
|
@@ -483,7 +493,7 @@ const registryDirectory = (() => {
|
|
|
483
493
|
})();
|
|
484
494
|
function isBrowserDirectory(browserDirectory) {
|
|
485
495
|
const baseName = import_path.default.basename(browserDirectory);
|
|
486
|
-
for (const browserName of
|
|
496
|
+
for (const browserName of allDownloadableDirectoriesThatEverExisted) {
|
|
487
497
|
if (baseName.startsWith(browserName.replace(/-/g, "_") + "-"))
|
|
488
498
|
return true;
|
|
489
499
|
}
|
|
@@ -501,6 +511,7 @@ function readDescriptors(browsersJSON) {
|
|
|
501
511
|
hasRevisionOverride: !!revisionOverride,
|
|
502
512
|
// We only put browser version for the supported operating systems.
|
|
503
513
|
browserVersion: revisionOverride ? void 0 : obj.browserVersion,
|
|
514
|
+
title: obj["title"],
|
|
504
515
|
installByDefault: !!obj.installByDefault,
|
|
505
516
|
// Method `isBrowserDirectory` determines directory to be browser iff
|
|
506
517
|
// it starts with some browser name followed by '-'. Some browser names
|
|
@@ -512,7 +523,8 @@ function readDescriptors(browsersJSON) {
|
|
|
512
523
|
return descriptor;
|
|
513
524
|
});
|
|
514
525
|
}
|
|
515
|
-
const
|
|
526
|
+
const allDownloadableDirectoriesThatEverExisted = ["android", "chromium", "firefox", "webkit", "ffmpeg", "firefox-beta", "chromium-tip-of-tree", "chromium-headless-shell", "chromium-tip-of-tree-headless-shell", "winldd"];
|
|
527
|
+
const chromiumAliases = ["bidi-chromium", "chrome-for-testing"];
|
|
516
528
|
class Registry {
|
|
517
529
|
constructor(browsersJSON) {
|
|
518
530
|
const descriptors = readDescriptors(browsersJSON);
|
|
@@ -552,7 +564,6 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
552
564
|
const chromium = descriptors.find((d) => d.name === "chromium");
|
|
553
565
|
const chromiumExecutable = findExecutablePath(chromium.dir, "chromium");
|
|
554
566
|
this._executables.push({
|
|
555
|
-
type: "browser",
|
|
556
567
|
name: "chromium",
|
|
557
568
|
browserName: "chromium",
|
|
558
569
|
directory: chromium.dir,
|
|
@@ -561,15 +572,16 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
561
572
|
installType: chromium.installByDefault ? "download-by-default" : "download-on-demand",
|
|
562
573
|
_validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, chromium.dir, ["chrome-linux"], [], ["chrome-win"]),
|
|
563
574
|
downloadURLs: this._downloadURLs(chromium),
|
|
575
|
+
title: chromium.title,
|
|
576
|
+
revision: chromium.revision,
|
|
564
577
|
browserVersion: chromium.browserVersion,
|
|
565
|
-
_install: () => this._downloadExecutable(chromium, chromiumExecutable),
|
|
578
|
+
_install: (force) => this._downloadExecutable(chromium, force, chromiumExecutable),
|
|
566
579
|
_dependencyGroup: "chromium",
|
|
567
580
|
_isHermeticInstallation: true
|
|
568
581
|
});
|
|
569
582
|
const chromiumHeadlessShell = descriptors.find((d) => d.name === "chromium-headless-shell");
|
|
570
583
|
const chromiumHeadlessShellExecutable = findExecutablePath(chromiumHeadlessShell.dir, "chromium-headless-shell");
|
|
571
584
|
this._executables.push({
|
|
572
|
-
type: "channel",
|
|
573
585
|
name: "chromium-headless-shell",
|
|
574
586
|
browserName: "chromium",
|
|
575
587
|
directory: chromiumHeadlessShell.dir,
|
|
@@ -578,15 +590,16 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
578
590
|
installType: chromiumHeadlessShell.installByDefault ? "download-by-default" : "download-on-demand",
|
|
579
591
|
_validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, chromiumHeadlessShell.dir, ["chrome-linux"], [], ["chrome-win"]),
|
|
580
592
|
downloadURLs: this._downloadURLs(chromiumHeadlessShell),
|
|
581
|
-
|
|
582
|
-
|
|
593
|
+
title: chromiumHeadlessShell.title,
|
|
594
|
+
revision: chromiumHeadlessShell.revision,
|
|
595
|
+
browserVersion: chromiumHeadlessShell.browserVersion,
|
|
596
|
+
_install: (force) => this._downloadExecutable(chromiumHeadlessShell, force, chromiumHeadlessShellExecutable),
|
|
583
597
|
_dependencyGroup: "chromium",
|
|
584
598
|
_isHermeticInstallation: true
|
|
585
599
|
});
|
|
586
600
|
const chromiumTipOfTreeHeadlessShell = descriptors.find((d) => d.name === "chromium-tip-of-tree-headless-shell");
|
|
587
601
|
const chromiumTipOfTreeHeadlessShellExecutable = findExecutablePath(chromiumTipOfTreeHeadlessShell.dir, "chromium-tip-of-tree-headless-shell");
|
|
588
602
|
this._executables.push({
|
|
589
|
-
type: "channel",
|
|
590
603
|
name: "chromium-tip-of-tree-headless-shell",
|
|
591
604
|
browserName: "chromium",
|
|
592
605
|
directory: chromiumTipOfTreeHeadlessShell.dir,
|
|
@@ -595,15 +608,16 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
595
608
|
installType: chromiumTipOfTreeHeadlessShell.installByDefault ? "download-by-default" : "download-on-demand",
|
|
596
609
|
_validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, chromiumTipOfTreeHeadlessShell.dir, ["chrome-linux"], [], ["chrome-win"]),
|
|
597
610
|
downloadURLs: this._downloadURLs(chromiumTipOfTreeHeadlessShell),
|
|
598
|
-
|
|
599
|
-
|
|
611
|
+
title: chromiumTipOfTreeHeadlessShell.title,
|
|
612
|
+
revision: chromiumTipOfTreeHeadlessShell.revision,
|
|
613
|
+
browserVersion: chromiumTipOfTreeHeadlessShell.browserVersion,
|
|
614
|
+
_install: (force) => this._downloadExecutable(chromiumTipOfTreeHeadlessShell, force, chromiumTipOfTreeHeadlessShellExecutable),
|
|
600
615
|
_dependencyGroup: "chromium",
|
|
601
616
|
_isHermeticInstallation: true
|
|
602
617
|
});
|
|
603
618
|
const chromiumTipOfTree = descriptors.find((d) => d.name === "chromium-tip-of-tree");
|
|
604
619
|
const chromiumTipOfTreeExecutable = findExecutablePath(chromiumTipOfTree.dir, "chromium-tip-of-tree");
|
|
605
620
|
this._executables.push({
|
|
606
|
-
type: "tool",
|
|
607
621
|
name: "chromium-tip-of-tree",
|
|
608
622
|
browserName: "chromium",
|
|
609
623
|
directory: chromiumTipOfTree.dir,
|
|
@@ -612,8 +626,10 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
612
626
|
installType: chromiumTipOfTree.installByDefault ? "download-by-default" : "download-on-demand",
|
|
613
627
|
_validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, chromiumTipOfTree.dir, ["chrome-linux"], [], ["chrome-win"]),
|
|
614
628
|
downloadURLs: this._downloadURLs(chromiumTipOfTree),
|
|
629
|
+
title: chromiumTipOfTree.title,
|
|
630
|
+
revision: chromiumTipOfTree.revision,
|
|
615
631
|
browserVersion: chromiumTipOfTree.browserVersion,
|
|
616
|
-
_install: () => this._downloadExecutable(chromiumTipOfTree, chromiumTipOfTreeExecutable),
|
|
632
|
+
_install: (force) => this._downloadExecutable(chromiumTipOfTree, force, chromiumTipOfTreeExecutable),
|
|
617
633
|
_dependencyGroup: "chromium",
|
|
618
634
|
_isHermeticInstallation: true
|
|
619
635
|
});
|
|
@@ -702,25 +718,9 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
702
718
|
"darwin": "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary",
|
|
703
719
|
"win32": `\\Google\\Chrome SxS\\Application\\chrome.exe`
|
|
704
720
|
}));
|
|
705
|
-
this._executables.push({
|
|
706
|
-
type: "channel",
|
|
707
|
-
name: "bidi-chromium",
|
|
708
|
-
browserName: "chromium",
|
|
709
|
-
directory: chromium.dir,
|
|
710
|
-
executablePath: () => chromiumExecutable,
|
|
711
|
-
executablePathOrDie: (sdkLanguage) => executablePathOrDie("chromium", chromiumExecutable, chromium.installByDefault, sdkLanguage),
|
|
712
|
-
installType: "download-on-demand",
|
|
713
|
-
_validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, chromium.dir, ["chrome-linux"], [], ["chrome-win"]),
|
|
714
|
-
downloadURLs: this._downloadURLs(chromium),
|
|
715
|
-
browserVersion: chromium.browserVersion,
|
|
716
|
-
_install: () => this._downloadExecutable(chromium, chromiumExecutable),
|
|
717
|
-
_dependencyGroup: "chromium",
|
|
718
|
-
_isHermeticInstallation: true
|
|
719
|
-
});
|
|
720
721
|
const firefox = descriptors.find((d) => d.name === "firefox");
|
|
721
722
|
const firefoxExecutable = findExecutablePath(firefox.dir, "firefox");
|
|
722
723
|
this._executables.push({
|
|
723
|
-
type: "browser",
|
|
724
724
|
name: "firefox",
|
|
725
725
|
browserName: "firefox",
|
|
726
726
|
directory: firefox.dir,
|
|
@@ -729,15 +729,16 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
729
729
|
installType: firefox.installByDefault ? "download-by-default" : "download-on-demand",
|
|
730
730
|
_validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, firefox.dir, ["firefox"], [], ["firefox"]),
|
|
731
731
|
downloadURLs: this._downloadURLs(firefox),
|
|
732
|
+
title: firefox.title,
|
|
733
|
+
revision: firefox.revision,
|
|
732
734
|
browserVersion: firefox.browserVersion,
|
|
733
|
-
_install: () => this._downloadExecutable(firefox, firefoxExecutable),
|
|
735
|
+
_install: (force) => this._downloadExecutable(firefox, force, firefoxExecutable),
|
|
734
736
|
_dependencyGroup: "firefox",
|
|
735
737
|
_isHermeticInstallation: true
|
|
736
738
|
});
|
|
737
739
|
const firefoxBeta = descriptors.find((d) => d.name === "firefox-beta");
|
|
738
740
|
const firefoxBetaExecutable = findExecutablePath(firefoxBeta.dir, "firefox");
|
|
739
741
|
this._executables.push({
|
|
740
|
-
type: "tool",
|
|
741
742
|
name: "firefox-beta",
|
|
742
743
|
browserName: "firefox",
|
|
743
744
|
directory: firefoxBeta.dir,
|
|
@@ -746,8 +747,10 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
746
747
|
installType: firefoxBeta.installByDefault ? "download-by-default" : "download-on-demand",
|
|
747
748
|
_validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, firefoxBeta.dir, ["firefox"], [], ["firefox"]),
|
|
748
749
|
downloadURLs: this._downloadURLs(firefoxBeta),
|
|
750
|
+
title: firefoxBeta.title,
|
|
751
|
+
revision: firefoxBeta.revision,
|
|
749
752
|
browserVersion: firefoxBeta.browserVersion,
|
|
750
|
-
_install: () => this._downloadExecutable(firefoxBeta, firefoxBetaExecutable),
|
|
753
|
+
_install: (force) => this._downloadExecutable(firefoxBeta, force, firefoxBetaExecutable),
|
|
751
754
|
_dependencyGroup: "firefox",
|
|
752
755
|
_isHermeticInstallation: true
|
|
753
756
|
});
|
|
@@ -764,7 +767,6 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
764
767
|
import_path.default.join("minibrowser-wpe", "sys", "lib")
|
|
765
768
|
];
|
|
766
769
|
this._executables.push({
|
|
767
|
-
type: "browser",
|
|
768
770
|
name: "webkit",
|
|
769
771
|
browserName: "webkit",
|
|
770
772
|
directory: webkit.dir,
|
|
@@ -773,19 +775,21 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
773
775
|
installType: webkit.installByDefault ? "download-by-default" : "download-on-demand",
|
|
774
776
|
_validateHostRequirements: (sdkLanguage) => this._validateHostRequirements(sdkLanguage, webkit.dir, webkitLinuxLddDirectories, ["libGLESv2.so.2", "libx264.so"], [""]),
|
|
775
777
|
downloadURLs: this._downloadURLs(webkit),
|
|
778
|
+
title: webkit.title,
|
|
779
|
+
revision: webkit.revision,
|
|
776
780
|
browserVersion: webkit.browserVersion,
|
|
777
|
-
_install: () => this._downloadExecutable(webkit, webkitExecutable),
|
|
781
|
+
_install: (force) => this._downloadExecutable(webkit, force, webkitExecutable),
|
|
778
782
|
_dependencyGroup: "webkit",
|
|
779
783
|
_isHermeticInstallation: true
|
|
780
784
|
});
|
|
781
785
|
this._executables.push({
|
|
782
|
-
type: "channel",
|
|
783
786
|
name: "webkit-wsl",
|
|
784
787
|
browserName: "webkit",
|
|
785
788
|
directory: webkit.dir,
|
|
786
789
|
executablePath: () => webkitExecutable,
|
|
787
790
|
executablePathOrDie: (sdkLanguage) => executablePathOrDie("webkit", webkitExecutable, webkit.installByDefault, sdkLanguage),
|
|
788
791
|
installType: "download-on-demand",
|
|
792
|
+
title: "Webkit in WSL",
|
|
789
793
|
_validateHostRequirements: (sdkLanguage) => Promise.resolve(),
|
|
790
794
|
_isHermeticInstallation: true,
|
|
791
795
|
_install: async () => {
|
|
@@ -807,7 +811,6 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
807
811
|
const ffmpeg = descriptors.find((d) => d.name === "ffmpeg");
|
|
808
812
|
const ffmpegExecutable = findExecutablePath(ffmpeg.dir, "ffmpeg");
|
|
809
813
|
this._executables.push({
|
|
810
|
-
type: "tool",
|
|
811
814
|
name: "ffmpeg",
|
|
812
815
|
browserName: void 0,
|
|
813
816
|
directory: ffmpeg.dir,
|
|
@@ -816,14 +819,15 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
816
819
|
installType: ffmpeg.installByDefault ? "download-by-default" : "download-on-demand",
|
|
817
820
|
_validateHostRequirements: () => Promise.resolve(),
|
|
818
821
|
downloadURLs: this._downloadURLs(ffmpeg),
|
|
819
|
-
|
|
822
|
+
title: ffmpeg.title,
|
|
823
|
+
revision: ffmpeg.revision,
|
|
824
|
+
_install: (force) => this._downloadExecutable(ffmpeg, force, ffmpegExecutable),
|
|
820
825
|
_dependencyGroup: "tools",
|
|
821
826
|
_isHermeticInstallation: true
|
|
822
827
|
});
|
|
823
828
|
const winldd = descriptors.find((d) => d.name === "winldd");
|
|
824
829
|
const winlddExecutable = findExecutablePath(winldd.dir, "winldd");
|
|
825
830
|
this._executables.push({
|
|
826
|
-
type: "tool",
|
|
827
831
|
name: "winldd",
|
|
828
832
|
browserName: void 0,
|
|
829
833
|
directory: winldd.dir,
|
|
@@ -832,13 +836,14 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
832
836
|
installType: process.platform === "win32" ? "download-by-default" : "none",
|
|
833
837
|
_validateHostRequirements: () => Promise.resolve(),
|
|
834
838
|
downloadURLs: this._downloadURLs(winldd),
|
|
835
|
-
|
|
839
|
+
title: winldd.title,
|
|
840
|
+
revision: winldd.revision,
|
|
841
|
+
_install: (force) => this._downloadExecutable(winldd, force, winlddExecutable),
|
|
836
842
|
_dependencyGroup: "tools",
|
|
837
843
|
_isHermeticInstallation: true
|
|
838
844
|
});
|
|
839
845
|
const android = descriptors.find((d) => d.name === "android");
|
|
840
846
|
this._executables.push({
|
|
841
|
-
type: "tool",
|
|
842
847
|
name: "android",
|
|
843
848
|
browserName: void 0,
|
|
844
849
|
directory: android.dir,
|
|
@@ -847,7 +852,9 @@ ${(0, import_ascii.wrapInASCIIBox)(prettyMessage, 1)}`);
|
|
|
847
852
|
installType: "download-on-demand",
|
|
848
853
|
_validateHostRequirements: () => Promise.resolve(),
|
|
849
854
|
downloadURLs: this._downloadURLs(android),
|
|
850
|
-
|
|
855
|
+
title: android.title,
|
|
856
|
+
revision: android.revision,
|
|
857
|
+
_install: (force) => this._downloadExecutable(android, force),
|
|
851
858
|
_dependencyGroup: "tools",
|
|
852
859
|
_isHermeticInstallation: true
|
|
853
860
|
});
|
|
@@ -881,7 +888,6 @@ Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
|
|
|
881
888
|
throw new Error(`Chromium distribution '${name}' is not found${location}${installation}`);
|
|
882
889
|
};
|
|
883
890
|
return {
|
|
884
|
-
type: "channel",
|
|
885
891
|
name,
|
|
886
892
|
browserName: "chromium",
|
|
887
893
|
directory: void 0,
|
|
@@ -920,7 +926,6 @@ Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
|
|
|
920
926
|
return void 0;
|
|
921
927
|
};
|
|
922
928
|
return {
|
|
923
|
-
type: "channel",
|
|
924
929
|
name,
|
|
925
930
|
browserName: "firefox",
|
|
926
931
|
directory: void 0,
|
|
@@ -932,7 +937,7 @@ Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
|
|
|
932
937
|
_install: install
|
|
933
938
|
};
|
|
934
939
|
}
|
|
935
|
-
_createBidiChromiumChannel(name, lookAt
|
|
940
|
+
_createBidiChromiumChannel(name, lookAt) {
|
|
936
941
|
const executablePath = (sdkLanguage, shouldThrow) => {
|
|
937
942
|
const suffix = lookAt[process.platform];
|
|
938
943
|
if (!suffix) {
|
|
@@ -956,21 +961,17 @@ Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
|
|
|
956
961
|
if (!shouldThrow)
|
|
957
962
|
return void 0;
|
|
958
963
|
const location = prefixes.length ? ` at ${import_path.default.join(prefixes[0], suffix)}` : ``;
|
|
959
|
-
|
|
960
|
-
Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
|
|
961
|
-
throw new Error(`Chromium distribution '${name}' is not found${location}${installation}`);
|
|
964
|
+
throw new Error(`Chromium distribution '${name}' is not found${location}`);
|
|
962
965
|
};
|
|
963
966
|
return {
|
|
964
|
-
type: "channel",
|
|
965
967
|
name,
|
|
966
968
|
browserName: "chromium",
|
|
967
969
|
directory: void 0,
|
|
968
970
|
executablePath: (sdkLanguage) => executablePath(sdkLanguage, false),
|
|
969
971
|
executablePathOrDie: (sdkLanguage) => executablePath(sdkLanguage, true),
|
|
970
|
-
installType:
|
|
972
|
+
installType: "none",
|
|
971
973
|
_validateHostRequirements: () => Promise.resolve(),
|
|
972
|
-
_isHermeticInstallation: false
|
|
973
|
-
_install: install
|
|
974
|
+
_isHermeticInstallation: false
|
|
974
975
|
};
|
|
975
976
|
}
|
|
976
977
|
executables() {
|
|
@@ -1051,7 +1052,7 @@ Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
|
|
|
1051
1052
|
].join("\n"), 1) + "\n\n");
|
|
1052
1053
|
return;
|
|
1053
1054
|
}
|
|
1054
|
-
await executable._install();
|
|
1055
|
+
await executable._install(!!options?.force);
|
|
1055
1056
|
}
|
|
1056
1057
|
} catch (e) {
|
|
1057
1058
|
if (e.code === "ELOCKED") {
|
|
@@ -1123,8 +1124,16 @@ Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
|
|
|
1123
1124
|
const downloadPathTemplate = paths[import_hostPlatform.hostPlatform] || paths["<unknown>"];
|
|
1124
1125
|
if (!downloadPathTemplate)
|
|
1125
1126
|
return [];
|
|
1126
|
-
|
|
1127
|
-
let
|
|
1127
|
+
let downloadPath;
|
|
1128
|
+
let mirrors;
|
|
1129
|
+
if (typeof downloadPathTemplate === "function") {
|
|
1130
|
+
const result = downloadPathTemplate(descriptor);
|
|
1131
|
+
downloadPath = result.path;
|
|
1132
|
+
mirrors = result.mirrors;
|
|
1133
|
+
} else {
|
|
1134
|
+
downloadPath = util.format(downloadPathTemplate, descriptor.revision);
|
|
1135
|
+
mirrors = PLAYWRIGHT_CDN_MIRRORS;
|
|
1136
|
+
}
|
|
1128
1137
|
let downloadHostEnv;
|
|
1129
1138
|
if (descriptor.name.startsWith("chromium"))
|
|
1130
1139
|
downloadHostEnv = "PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST";
|
|
@@ -1134,10 +1143,10 @@ Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
|
|
|
1134
1143
|
downloadHostEnv = "PLAYWRIGHT_WEBKIT_DOWNLOAD_HOST";
|
|
1135
1144
|
const customHostOverride = downloadHostEnv && (0, import_utils.getFromENV)(downloadHostEnv) || (0, import_utils.getFromENV)("PLAYWRIGHT_DOWNLOAD_HOST");
|
|
1136
1145
|
if (customHostOverride)
|
|
1137
|
-
|
|
1138
|
-
return
|
|
1146
|
+
mirrors = [customHostOverride];
|
|
1147
|
+
return mirrors.map((mirror) => `${mirror}/${downloadPath}`);
|
|
1139
1148
|
}
|
|
1140
|
-
async _downloadExecutable(descriptor, executablePath) {
|
|
1149
|
+
async _downloadExecutable(descriptor, force, executablePath) {
|
|
1141
1150
|
const downloadURLs = this._downloadURLs(descriptor);
|
|
1142
1151
|
if (!downloadURLs.length)
|
|
1143
1152
|
throw new Error(`ERROR: Playwright does not support ${descriptor.name} on ${import_hostPlatform.hostPlatform}`);
|
|
@@ -1150,18 +1159,22 @@ Run "${buildPlaywrightCLICommand(sdkLanguage, "install " + name)}"` : "";
|
|
|
1150
1159
|
else
|
|
1151
1160
|
(0, import_browserFetcher.logPolitely)(message);
|
|
1152
1161
|
}
|
|
1153
|
-
const
|
|
1154
|
-
return word === "ffmpeg" ? "FFMPEG" : word.charAt(0).toUpperCase() + word.slice(1);
|
|
1155
|
-
}).join(" ");
|
|
1156
|
-
const title = descriptor.browserVersion ? `${displayName} ${descriptor.browserVersion} (playwright build v${descriptor.revision})` : `${displayName} playwright build v${descriptor.revision}`;
|
|
1162
|
+
const title = this.calculateDownloadTitle(descriptor);
|
|
1157
1163
|
const downloadFileName = `playwright-download-${descriptor.name}-${import_hostPlatform.hostPlatform}-${descriptor.revision}.zip`;
|
|
1158
1164
|
const downloadSocketTimeoutEnv = (0, import_utils.getFromENV)("PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT");
|
|
1159
1165
|
const downloadSocketTimeout = +(downloadSocketTimeoutEnv || "0") || import_network.NET_DEFAULT_TIMEOUT;
|
|
1160
|
-
await (0, import_browserFetcher.downloadBrowserWithProgressBar)(title, descriptor.dir, executablePath, downloadURLs, downloadFileName, downloadSocketTimeout).catch((e) => {
|
|
1166
|
+
await (0, import_browserFetcher.downloadBrowserWithProgressBar)(title, descriptor.dir, executablePath, downloadURLs, downloadFileName, downloadSocketTimeout, force).catch((e) => {
|
|
1161
1167
|
throw new Error(`Failed to download ${title}, caused by
|
|
1162
1168
|
${e.stack}`);
|
|
1163
1169
|
});
|
|
1164
1170
|
}
|
|
1171
|
+
calculateDownloadTitle(descriptor) {
|
|
1172
|
+
const title = descriptor.title ?? descriptor.name.split("-").map((word) => {
|
|
1173
|
+
return word === "ffmpeg" ? "FFmpeg" : word.charAt(0).toUpperCase() + word.slice(1);
|
|
1174
|
+
}).join(" ");
|
|
1175
|
+
const version = descriptor.browserVersion ? " " + descriptor.browserVersion : "";
|
|
1176
|
+
return `${title}${version} (playwright ${descriptor.name} v${descriptor.revision})`;
|
|
1177
|
+
}
|
|
1165
1178
|
async _installMSEdgeChannel(channel, scripts) {
|
|
1166
1179
|
const scriptArgs = [];
|
|
1167
1180
|
if (process.platform !== "linux") {
|
|
@@ -1234,7 +1247,7 @@ ${e.stack}`);
|
|
|
1234
1247
|
linkTarget = (await import_fs.default.promises.readFile(linkPath)).toString();
|
|
1235
1248
|
const browsersJSON = require(import_path.default.join(linkTarget, "browsers.json"));
|
|
1236
1249
|
const descriptors = readDescriptors(browsersJSON);
|
|
1237
|
-
for (const browserName of
|
|
1250
|
+
for (const browserName of allDownloadableDirectoriesThatEverExisted) {
|
|
1238
1251
|
const descriptor = descriptors.find((d) => d.name === browserName);
|
|
1239
1252
|
if (!descriptor)
|
|
1240
1253
|
continue;
|
|
@@ -1279,13 +1292,18 @@ ${e.stack}`);
|
|
|
1279
1292
|
_defaultBrowsersToInstall(options) {
|
|
1280
1293
|
let executables = this.defaultExecutables();
|
|
1281
1294
|
if (options.shell === "no")
|
|
1282
|
-
executables = executables.filter((e) => e.name !== "chromium-headless-shell");
|
|
1295
|
+
executables = executables.filter((e) => e.name !== "chromium-headless-shell" && e.name !== "chromium-tip-of-tree-headless-shell");
|
|
1283
1296
|
if (options.shell === "only")
|
|
1284
|
-
executables = executables.filter((e) => e.name !== "chromium");
|
|
1297
|
+
executables = executables.filter((e) => e.name !== "chromium" && e.name !== "chromium-tip-of-tree");
|
|
1285
1298
|
return executables;
|
|
1286
1299
|
}
|
|
1287
1300
|
suggestedBrowsersToInstall() {
|
|
1288
|
-
|
|
1301
|
+
const names = this.executables().filter((e) => e.installType !== "none").map((e) => e.name);
|
|
1302
|
+
names.push(...chromiumAliases);
|
|
1303
|
+
return names.sort().join(", ");
|
|
1304
|
+
}
|
|
1305
|
+
isChromiumAlias(name) {
|
|
1306
|
+
return chromiumAliases.includes(name);
|
|
1289
1307
|
}
|
|
1290
1308
|
resolveBrowsers(aliases, options) {
|
|
1291
1309
|
if (aliases.length === 0)
|
|
@@ -1298,15 +1316,20 @@ ${e.stack}`);
|
|
|
1298
1316
|
faultyArguments.push(arg);
|
|
1299
1317
|
else
|
|
1300
1318
|
executables.push(executable);
|
|
1301
|
-
if (executable?.browserName
|
|
1319
|
+
if (executable?.browserName)
|
|
1302
1320
|
executables.push(this.findExecutable("ffmpeg"));
|
|
1303
1321
|
};
|
|
1304
1322
|
for (const alias of aliases) {
|
|
1305
|
-
if (alias === "chromium") {
|
|
1323
|
+
if (alias === "chromium" || chromiumAliases.includes(alias)) {
|
|
1306
1324
|
if (options.shell !== "only")
|
|
1307
1325
|
handleArgument("chromium");
|
|
1308
1326
|
if (options.shell !== "no")
|
|
1309
1327
|
handleArgument("chromium-headless-shell");
|
|
1328
|
+
} else if (alias === "chromium-tip-of-tree") {
|
|
1329
|
+
if (options.shell !== "only")
|
|
1330
|
+
handleArgument("chromium-tip-of-tree");
|
|
1331
|
+
if (options.shell !== "no")
|
|
1332
|
+
handleArgument("chromium-tip-of-tree-headless-shell");
|
|
1310
1333
|
} else {
|
|
1311
1334
|
handleArgument(alias);
|
|
1312
1335
|
}
|