@open-wa/wa-automate 4.41.0 → 4.41.1

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.
@@ -67,7 +67,13 @@ function initPage(sessionId, config, qrManager, customUserAgent, spinner, _page,
67
67
  spinner === null || spinner === void 0 ? void 0 : spinner.info(`Browser launched: ${((0, tools_1.now)() - startBrowser).toFixed(0)}ms`);
68
68
  waPage = yield getWAPage(browser);
69
69
  }
70
- yield waPage._client().send('Network.setBypassServiceWorker', { bypass: true });
70
+ const pageCDPClient = yield waPage.target().createCDPSession();
71
+ yield pageCDPClient.send('Network.setBypassServiceWorker', { bypass: true });
72
+ if (waPage._client) {
73
+ const cl = (typeof waPage._client === 'function' ? waPage._client() : waPage._client);
74
+ if (cl.send)
75
+ yield cl.send('Network.setBypassServiceWorker', { bypass: true });
76
+ }
71
77
  const postBrowserLaunchTs = (0, tools_1.now)();
72
78
  waPage.on("framenavigated", (frame) => __awaiter(this, void 0, void 0, function* () {
73
79
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.41.0",
3
+ "version": "4.41.1",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",