playwright-core 1.57.0-alpha-2025-11-20 → 1.58.0-alpha-2025-11-21
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/browsers.json +5 -5
- package/lib/client/network.js +0 -12
- package/lib/protocol/validator.js +0 -4
- package/lib/server/bidi/bidiBrowser.js +12 -0
- package/lib/server/bidi/bidiPage.js +2 -3
- package/lib/server/deviceDescriptorsSource.json +2 -2
- package/lib/server/dispatchers/networkDispatchers.js +0 -4
- package/lib/server/electron/electron.js +5 -2
- package/lib/utils/isomorphic/protocolMetainfo.js +0 -1
- package/lib/vite/htmlReport/index.html +1 -1
- package/lib/vite/traceViewer/assets/{codeMirrorModule-ou4i_sJZ.js → codeMirrorModule-Bucv2d7q.js} +1 -1
- package/lib/vite/traceViewer/assets/{defaultSettingsView-DpEoba28.js → defaultSettingsView-BEpdCv1S.js} +3 -3
- package/lib/vite/traceViewer/{index.grycPPT7.js → index.BufYBuyN.js} +1 -1
- package/lib/vite/traceViewer/index.html +2 -2
- package/lib/vite/traceViewer/{uiMode.BMFxBoQ6.js → uiMode.BWTwXl41.js} +1 -1
- package/lib/vite/traceViewer/uiMode.html +2 -2
- package/package.json +1 -1
- package/types/types.d.ts +5 -27
package/browsers.json
CHANGED
|
@@ -27,19 +27,19 @@
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"name": "firefox",
|
|
30
|
-
"revision": "
|
|
30
|
+
"revision": "1497",
|
|
31
31
|
"installByDefault": true,
|
|
32
|
-
"browserVersion": "
|
|
32
|
+
"browserVersion": "144.0.2"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"name": "firefox-beta",
|
|
36
|
-
"revision": "
|
|
36
|
+
"revision": "1493",
|
|
37
37
|
"installByDefault": false,
|
|
38
|
-
"browserVersion": "
|
|
38
|
+
"browserVersion": "145.0b10"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"name": "webkit",
|
|
42
|
-
"revision": "
|
|
42
|
+
"revision": "2229",
|
|
43
43
|
"installByDefault": true,
|
|
44
44
|
"revisionOverrides": {
|
|
45
45
|
"debian11-x64": "2105",
|
package/lib/client/network.js
CHANGED
|
@@ -85,15 +85,6 @@ class Request extends import_channelOwner.ChannelOwner {
|
|
|
85
85
|
method() {
|
|
86
86
|
return this._fallbackOverrides.method || this._initializer.method;
|
|
87
87
|
}
|
|
88
|
-
async body() {
|
|
89
|
-
return (this._fallbackOverrides.postDataBuffer || (await this._channel.body()).body)?.toString("utf-8") || null;
|
|
90
|
-
}
|
|
91
|
-
async bodyBuffer() {
|
|
92
|
-
return this._fallbackOverrides.postDataBuffer || (await this._channel.body()).body || null;
|
|
93
|
-
}
|
|
94
|
-
async bodyJSON() {
|
|
95
|
-
return this._postDataJSON(await this.body());
|
|
96
|
-
}
|
|
97
88
|
postData() {
|
|
98
89
|
return (this._fallbackOverrides.postDataBuffer || this._initializer.postData)?.toString("utf-8") || null;
|
|
99
90
|
}
|
|
@@ -102,9 +93,6 @@ class Request extends import_channelOwner.ChannelOwner {
|
|
|
102
93
|
}
|
|
103
94
|
postDataJSON() {
|
|
104
95
|
const postData = this.postData();
|
|
105
|
-
return this._postDataJSON(postData);
|
|
106
|
-
}
|
|
107
|
-
_postDataJSON(postData) {
|
|
108
96
|
if (!postData)
|
|
109
97
|
return null;
|
|
110
98
|
const contentType = this.headers()["content-type"];
|
|
@@ -2237,10 +2237,6 @@ import_validatorPrimitives.scheme.RequestInitializer = (0, import_validatorPrimi
|
|
|
2237
2237
|
hasResponse: import_validatorPrimitives.tBoolean
|
|
2238
2238
|
});
|
|
2239
2239
|
import_validatorPrimitives.scheme.RequestResponseEvent = (0, import_validatorPrimitives.tOptional)((0, import_validatorPrimitives.tObject)({}));
|
|
2240
|
-
import_validatorPrimitives.scheme.RequestBodyParams = (0, import_validatorPrimitives.tOptional)((0, import_validatorPrimitives.tObject)({}));
|
|
2241
|
-
import_validatorPrimitives.scheme.RequestBodyResult = (0, import_validatorPrimitives.tObject)({
|
|
2242
|
-
body: (0, import_validatorPrimitives.tOptional)(import_validatorPrimitives.tBinary)
|
|
2243
|
-
});
|
|
2244
2240
|
import_validatorPrimitives.scheme.RequestResponseParams = (0, import_validatorPrimitives.tOptional)((0, import_validatorPrimitives.tObject)({}));
|
|
2245
2241
|
import_validatorPrimitives.scheme.RequestResponseResult = (0, import_validatorPrimitives.tObject)({
|
|
2246
2242
|
response: (0, import_validatorPrimitives.tOptional)((0, import_validatorPrimitives.tChannel)(["Response"]))
|
|
@@ -349,6 +349,18 @@ class BidiBrowserContext extends import_browserContext.BrowserContext {
|
|
|
349
349
|
await Promise.all(ids.map((script) => this._browser._browserSession.send("script.removePreloadScript", { script })));
|
|
350
350
|
}
|
|
351
351
|
async doUpdateRequestInterception() {
|
|
352
|
+
if (this.requestInterceptors.length > 0 && !this._interceptId) {
|
|
353
|
+
const { intercept } = await this._browser._browserSession.send("network.addIntercept", {
|
|
354
|
+
phases: [bidi.Network.InterceptPhase.BeforeRequestSent],
|
|
355
|
+
urlPatterns: [{ type: "pattern" }]
|
|
356
|
+
});
|
|
357
|
+
this._interceptId = intercept;
|
|
358
|
+
}
|
|
359
|
+
if (this.requestInterceptors.length === 0 && this._interceptId) {
|
|
360
|
+
const intercept = this._interceptId;
|
|
361
|
+
this._interceptId = void 0;
|
|
362
|
+
await this._browser._browserSession.send("network.removeIntercept", { intercept });
|
|
363
|
+
}
|
|
352
364
|
}
|
|
353
365
|
async doUpdateDefaultViewport() {
|
|
354
366
|
if (!this._options.viewport)
|
|
@@ -87,8 +87,7 @@ class BidiPage {
|
|
|
87
87
|
async _initialize() {
|
|
88
88
|
this._onFrameAttached(this._session.sessionId, null);
|
|
89
89
|
await Promise.all([
|
|
90
|
-
this.updateHttpCredentials()
|
|
91
|
-
this.updateRequestInterception()
|
|
90
|
+
this.updateHttpCredentials()
|
|
92
91
|
// If the page is created by the Playwright client's call, some initialization
|
|
93
92
|
// may be pending. Wait for it to complete before reporting the page as new.
|
|
94
93
|
]);
|
|
@@ -323,7 +322,7 @@ ${params.stackTrace?.callFrames.map((f) => {
|
|
|
323
322
|
]);
|
|
324
323
|
}
|
|
325
324
|
async updateRequestInterception() {
|
|
326
|
-
await this._networkManager.setRequestInterception(this._page.
|
|
325
|
+
await this._networkManager.setRequestInterception(this._page.requestInterceptors.length > 0);
|
|
327
326
|
}
|
|
328
327
|
async updateOffline() {
|
|
329
328
|
}
|
|
@@ -1702,7 +1702,7 @@
|
|
|
1702
1702
|
"defaultBrowserType": "chromium"
|
|
1703
1703
|
},
|
|
1704
1704
|
"Desktop Firefox HiDPI": {
|
|
1705
|
-
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:
|
|
1705
|
+
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0.2) Gecko/20100101 Firefox/144.0.2",
|
|
1706
1706
|
"screen": {
|
|
1707
1707
|
"width": 1792,
|
|
1708
1708
|
"height": 1120
|
|
@@ -1762,7 +1762,7 @@
|
|
|
1762
1762
|
"defaultBrowserType": "chromium"
|
|
1763
1763
|
},
|
|
1764
1764
|
"Desktop Firefox": {
|
|
1765
|
-
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:
|
|
1765
|
+
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0.2) Gecko/20100101 Firefox/144.0.2",
|
|
1766
1766
|
"screen": {
|
|
1767
1767
|
"width": 1920,
|
|
1768
1768
|
"height": 1080
|
|
@@ -61,10 +61,6 @@ class RequestDispatcher extends import_dispatcher.Dispatcher {
|
|
|
61
61
|
this._browserContextDispatcher = scope;
|
|
62
62
|
this.addObjectListener(import_network2.Request.Events.Response, () => this._dispatchEvent("response", {}));
|
|
63
63
|
}
|
|
64
|
-
async body(params, progress) {
|
|
65
|
-
const postData = this._object.postDataBuffer();
|
|
66
|
-
return { body: postData === null ? void 0 : postData };
|
|
67
|
-
}
|
|
68
64
|
async rawRequestHeaders(params, progress) {
|
|
69
65
|
return { headers: await progress.race(this._object.rawRequestHeaders()) };
|
|
70
66
|
}
|
|
@@ -158,8 +158,8 @@ class Electron extends import_instrumentation.SdkObject {
|
|
|
158
158
|
let shell = false;
|
|
159
159
|
if (process.platform === "win32") {
|
|
160
160
|
shell = true;
|
|
161
|
-
command = `"${
|
|
162
|
-
electronArguments =
|
|
161
|
+
command = [command, ...electronArguments].map((arg) => `"${escapeWinCmdArg(arg)}"`).join(" ");
|
|
162
|
+
electronArguments = [];
|
|
163
163
|
}
|
|
164
164
|
delete env.NODE_OPTIONS;
|
|
165
165
|
const { launchedProcess, gracefullyClose, kill } = await (0, import_processLauncher.launchProcess)({
|
|
@@ -263,6 +263,9 @@ async function waitForLine(progress, process2, regex) {
|
|
|
263
263
|
import_eventsHelper.eventsHelper.removeEventListeners(listeners);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
+
function escapeWinCmdArg(str) {
|
|
267
|
+
return str.replace(/"/g, '\\"').replace(/%([^%].)/g, "%^$1");
|
|
268
|
+
}
|
|
266
269
|
// Annotate the CommonJS export names for ESM import in node:
|
|
267
270
|
0 && (module.exports = {
|
|
268
271
|
Electron,
|
|
@@ -241,7 +241,6 @@ const methodMetainfo = /* @__PURE__ */ new Map([
|
|
|
241
241
|
["ElementHandle.uncheck", { title: "Uncheck", slowMo: true, snapshot: true, pausesBeforeInput: true }],
|
|
242
242
|
["ElementHandle.waitForElementState", { title: "Wait for state", snapshot: true, pausesBeforeAction: true }],
|
|
243
243
|
["ElementHandle.waitForSelector", { title: "Wait for selector", snapshot: true }],
|
|
244
|
-
["Request.body", { title: "Get request body", group: "getter" }],
|
|
245
244
|
["Request.response", { internal: true }],
|
|
246
245
|
["Request.rawRequestHeaders", { internal: true }],
|
|
247
246
|
["Route.redirectNavigationRequest", { internal: true }],
|