@lvce-editor/test-with-playwright-worker 22.33.0 → 22.34.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.
@@ -43,10 +43,18 @@ const upstreamFix = ` _onWebSocketOpened(event) {
43
43
  this._page.frameManager.onWebSocketRequest(socketId, request2);
44
44
  this._page.frameManager.onWebSocketResponse(socketId, response2);
45
45
  }`;
46
+ const useRequestObjects = content => {
47
+ return content.replace('request2.headers', 'request2').replace('response2.status, response2.statusText, response2.headers', 'response2');
48
+ };
49
+ const beforeWithRequestObjects = useRequestObjects(before);
50
+ const afterWithRequestObjects = useRequestObjects(after);
46
51
  const patchCoreBundleContent = content => {
47
- if (content.includes(after) || content.includes(upstreamFix)) {
52
+ if (content.includes(after) || content.includes(afterWithRequestObjects) || content.includes(upstreamFix)) {
48
53
  return content;
49
54
  }
55
+ if (content.includes(beforeWithRequestObjects)) {
56
+ return content.split(beforeWithRequestObjects).join(afterWithRequestObjects);
57
+ }
50
58
  if (!content.includes(before)) {
51
59
  throw new Error('Could not patch Playwright Firefox worker WebSocket handler');
52
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-with-playwright-worker",
3
- "version": "22.33.0",
3
+ "version": "22.34.0",
4
4
  "description": "Worker package for test-with-playwright",
5
5
  "repository": {
6
6
  "type": "git",