@wppconnect-team/wppconnect 1.31.1 → 1.32.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.32.0 (2024-06-12)
2
+
3
+ - fix: Improovment whatsappVersion to 2.3000.10139x ([d246c58](https://github.com/wppconnect-team/wppconnect/commit/d246c58))
4
+
1
5
  ## 1.31.1 (2024-06-12)
2
6
 
3
7
  ### Bug Fixes
@@ -144,6 +144,7 @@ var HostLayer = /** @class */ (function () {
144
144
  .catch(function (e) {
145
145
  console.log(e);
146
146
  _this.log('verbose', 'wapi.js failed');
147
+ _this.log('error', e);
147
148
  })];
148
149
  case 2:
149
150
  _a.sent();
@@ -20,7 +20,7 @@ exports.defaultOptions = {
20
20
  waitForLogin: true,
21
21
  logger: logger_1.defaultLogger,
22
22
  tokenStore: 'file',
23
- whatsappVersion: '2.2413.x',
23
+ whatsappVersion: '2.3000.10139x',
24
24
  deviceName: false,
25
25
  linkPreviewApiServers: null,
26
26
  disableGoogleAnalytics: true,
@@ -110,7 +110,6 @@ var puppeteer_config_1 = require("../config/puppeteer.config");
110
110
  var puppeteer_extra_plugin_stealth_1 = __importDefault(require("puppeteer-extra-plugin-stealth"));
111
111
  var WAuserAgente_1 = require("../config/WAuserAgente");
112
112
  var websocket_1 = require("./websocket");
113
- var sleep_1 = require("../utils/sleep");
114
113
  function unregisterServiceWorker(page) {
115
114
  return __awaiter(this, void 0, void 0, function () {
116
115
  return __generator(this, function (_a) {
@@ -306,48 +305,23 @@ function injectApi(page, onLoadingScreenCallBack) {
306
305
  if (injected) {
307
306
  return [2 /*return*/];
308
307
  }
309
- // Wait for some loaded modules
310
- return [4 /*yield*/, page
311
- .waitForFunction(function () { var _a; return (((_a = window === null || window === void 0 ? void 0 : window.webpackChunkwhatsapp_web_client) === null || _a === void 0 ? void 0 : _a.length) || 0) > 3; })
312
- .catch(function () { return null; })];
313
- case 2:
314
- // Wait for some loaded modules
315
- _a.sent();
316
- return [4 /*yield*/, (0, sleep_1.sleep)(100)];
317
- case 3:
318
- _a.sent();
319
308
  return [4 /*yield*/, page.addScriptTag({
320
309
  path: require.resolve('@wppconnect/wa-js'),
321
310
  })];
322
- case 4:
311
+ case 2:
323
312
  _a.sent();
324
- return [4 /*yield*/, page
325
- .evaluate(function () {
313
+ return [4 /*yield*/, page.evaluate(function () {
326
314
  WPP.chat.defaultSendMessageOptions.createChat = true;
327
315
  WPP.conn.setKeepAlive(true);
328
- })
329
- .catch(function () { return false; })];
330
- case 5:
316
+ })];
317
+ case 3:
331
318
  _a.sent();
332
319
  return [4 /*yield*/, page.addScriptTag({
333
320
  path: require.resolve(path.join(__dirname, '../../dist/lib/wapi', 'wapi.js')),
334
321
  })];
335
- case 6:
336
- _a.sent();
337
- return [4 /*yield*/, onLoadingScreen(page, onLoadingScreenCallBack)];
338
- case 7:
339
- _a.sent();
340
- // Make sure WAPI is initialized
341
- return [4 /*yield*/, page
342
- .waitForFunction(function () {
343
- return (typeof window.WAPI !== 'undefined' &&
344
- typeof window.Store !== 'undefined' &&
345
- window.WPP.isReady);
346
- })
347
- .catch(function () { return false; })];
348
- case 8:
349
- // Make sure WAPI is initialized
322
+ case 4:
350
323
  _a.sent();
324
+ onLoadingScreen(page, onLoadingScreenCallBack);
351
325
  return [2 /*return*/];
352
326
  }
353
327
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wppconnect-team/wppconnect",
3
- "version": "1.31.1",
3
+ "version": "1.32.0",
4
4
  "description": "WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination... 😀🤔💭",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -75,7 +75,7 @@
75
75
  "babel-loader": "^9.1.3",
76
76
  "commitizen": "^4.3.0",
77
77
  "concurrently": "^8.2.2",
78
- "conventional-changelog-cli": "^4.1.0",
78
+ "conventional-changelog-cli": "^5.0.0",
79
79
  "eslint": "^8.57.0",
80
80
  "eslint-config-prettier": "^9.1.0",
81
81
  "eslint-plugin-header": "^3.1.1",
@@ -90,12 +90,12 @@
90
90
  "ts-node": "^10.9.2",
91
91
  "typedoc": "^0.25.13",
92
92
  "typescript": "^5.4.5",
93
- "webpack": "^5.91.0",
93
+ "webpack": "^5.92.0",
94
94
  "webpack-cli": "^5.1.4"
95
95
  },
96
96
  "dependencies": {
97
97
  "@wppconnect/wa-js": "^3.3.1",
98
- "@wppconnect/wa-version": "^1.4.213",
98
+ "@wppconnect/wa-version": "^1.5.0",
99
99
  "atob": "^2.1.2",
100
100
  "axios": "^1.7.2",
101
101
  "boxen": "^5.1.2",
@@ -109,7 +109,7 @@
109
109
  "logform": "^2.6.0",
110
110
  "lookpath": "^1.2.2",
111
111
  "mime-types": "^2.1.35",
112
- "puppeteer": "^22.10.0",
112
+ "puppeteer": "^22.11.0",
113
113
  "puppeteer-extra": "^3.3.6",
114
114
  "puppeteer-extra-plugin-stealth": "^2.11.2",
115
115
  "puppeteer-extra-plugin-user-data-dir": "^2.4.1",