@wppconnect-team/wppconnect 1.27.0 → 1.27.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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.27.2 (2023-06-05)
2
+
3
+ ## 1.27.1 (2023-06-04)
4
+
5
+ ### Bug Fixes
6
+
7
+ - Reverting to previous fix as a temporary workaround ([#1718](https://github.com/wppconnect-team/wppconnect/issues/1718)) ([a0375b6](https://github.com/wppconnect-team/wppconnect/commit/a0375b6086507882600b4d24e12be23add1c4e29))
8
+
1
9
  # 1.27.0 (2023-06-02)
2
10
 
3
11
  ### Bug Fixes
@@ -46,28 +46,28 @@ export declare class RetrieverLayer extends SenderLayer {
46
46
  * * @example
47
47
  * ```javascript
48
48
  * // All chats
49
- * const chats = await client.chatList();
49
+ * const chats = await client.listChats();
50
50
  *
51
51
  * // Some chats
52
- * const chats = client.chatList({count: 20});
52
+ * const chats = client.listChats({count: 20});
53
53
  *
54
54
  * // 20 chats before specific chat
55
- * const chats = client.chatList({count: 20, direction: 'before', id: '[number]@c.us'});
55
+ * const chats = client.listChats({count: 20, direction: 'before', id: '[number]@c.us'});
56
56
  *
57
57
  * // Only users chats
58
- * const chats = await client.chatList({onlyUsers: true});
58
+ * const chats = await client.listChats({onlyUsers: true});
59
59
  *
60
60
  * // Only groups chats
61
- * const chats = await client.chatList({onlyGroups: true});
61
+ * const chats = await client.listChats({onlyGroups: true});
62
62
  *
63
63
  * // Only with label Text
64
- * const chats = await client.chatList({withLabels: ['Test']});
64
+ * const chats = await client.listChats({withLabels: ['Test']});
65
65
  *
66
66
  * // Only with label id
67
- * const chats = await client.chatList({withLabels: ['1']});
67
+ * const chats = await client.listChats({withLabels: ['1']});
68
68
  *
69
69
  * // Only with label with one of text or id
70
- * const chats = await client.chatList({withLabels: ['Alfa','5']});
70
+ * const chats = await client.listChats({withLabels: ['Alfa','5']});
71
71
  * ```
72
72
  * @category Chat
73
73
  * @returns array of [Chat]
@@ -189,7 +189,7 @@ var RetrieverLayer = /** @class */ (function (_super) {
189
189
  if (withNewMessageOnly === void 0) { withNewMessageOnly = false; }
190
190
  return __awaiter(this, void 0, void 0, function () {
191
191
  return __generator(this, function (_a) {
192
- this.logger.warn('Deprecated: This function [getAllChats] is deprecated in favor of the getList function. Please update your code accordingly.');
192
+ this.logger.warn('Deprecated: This function [getAllChats] is deprecated in favor of the listChats function. Please update your code accordingly.');
193
193
  if (withNewMessageOnly) {
194
194
  return [2 /*return*/, (0, helpers_1.evaluateAndReturn)(this.page, function () { return WAPI.getAllChatsWithNewMsg(); })];
195
195
  }
@@ -205,28 +205,28 @@ var RetrieverLayer = /** @class */ (function (_super) {
205
205
  * * @example
206
206
  * ```javascript
207
207
  * // All chats
208
- * const chats = await client.chatList();
208
+ * const chats = await client.listChats();
209
209
  *
210
210
  * // Some chats
211
- * const chats = client.chatList({count: 20});
211
+ * const chats = client.listChats({count: 20});
212
212
  *
213
213
  * // 20 chats before specific chat
214
- * const chats = client.chatList({count: 20, direction: 'before', id: '[number]@c.us'});
214
+ * const chats = client.listChats({count: 20, direction: 'before', id: '[number]@c.us'});
215
215
  *
216
216
  * // Only users chats
217
- * const chats = await client.chatList({onlyUsers: true});
217
+ * const chats = await client.listChats({onlyUsers: true});
218
218
  *
219
219
  * // Only groups chats
220
- * const chats = await client.chatList({onlyGroups: true});
220
+ * const chats = await client.listChats({onlyGroups: true});
221
221
  *
222
222
  * // Only with label Text
223
- * const chats = await client.chatList({withLabels: ['Test']});
223
+ * const chats = await client.listChats({withLabels: ['Test']});
224
224
  *
225
225
  * // Only with label id
226
- * const chats = await client.chatList({withLabels: ['1']});
226
+ * const chats = await client.listChats({withLabels: ['1']});
227
227
  *
228
228
  * // Only with label with one of text or id
229
- * const chats = await client.chatList({withLabels: ['Alfa','5']});
229
+ * const chats = await client.listChats({withLabels: ['Alfa','5']});
230
230
  * ```
231
231
  * @category Chat
232
232
  * @returns array of [Chat]
@@ -284,7 +284,7 @@ var RetrieverLayer = /** @class */ (function (_super) {
284
284
  if (withNewMessageOnly === void 0) { withNewMessageOnly = false; }
285
285
  return __awaiter(this, void 0, void 0, function () {
286
286
  return __generator(this, function (_a) {
287
- this.logger.warn('Deprecated: This function [getAllChatsWithMessages] is deprecated in favor of the getList function. Please update your code accordingly.');
287
+ this.logger.warn('Deprecated: This function [getAllChatsWithMessages] is deprecated in favor of the listChats function. Please update your code accordingly.');
288
288
  return [2 /*return*/, (0, helpers_1.evaluateAndReturn)(this.page, function (withNewMessageOnly) {
289
289
  return WAPI.getAllChatsWithMessages(withNewMessageOnly);
290
290
  }, withNewMessageOnly)];
@@ -306,7 +306,7 @@ var RetrieverLayer = /** @class */ (function (_super) {
306
306
  return __generator(this, function (_a) {
307
307
  switch (_a.label) {
308
308
  case 0:
309
- this.logger.warn('Deprecated: This function [getAllGroups] is deprecated in favor of the getList function. Please update your code accordingly.');
309
+ this.logger.warn('Deprecated: This function [getAllGroups] is deprecated in favor of the listChats function. Please update your code accordingly.');
310
310
  return [4 /*yield*/, (0, helpers_1.evaluateAndReturn)(this.page, function (_a) {
311
311
  var withNewMessagesOnly = _a.withNewMessagesOnly;
312
312
  return __awaiter(_this, void 0, void 0, function () {
@@ -378,10 +378,14 @@ function initBrowser(session, options, logger) {
378
378
  case 2:
379
379
  browser = _a.sent();
380
380
  return [3 /*break*/, 5];
381
- case 3: return [4 /*yield*/, puppeteer_extra_1.default.launch(__assign({ headless: options.headless ? 'new' : false, devtools: options.devtools, args: options.browserArgs
381
+ case 3: return [4 /*yield*/, puppeteer_extra_1.default.launch(__assign({ headless: options.headless, devtools: options.devtools, args: options.browserArgs
382
382
  ? options.browserArgs
383
383
  : __spreadArray([], puppeteer_config_1.puppeteerConfig.chromiumArgs, true) }, options.puppeteerOptions))];
384
384
  case 4:
385
+ /**
386
+ * Setting the headless mode to the old Puppeteer mode, when using the 'new' mode, results in an error on CentOS7 and Debian11.
387
+ * Temporary fix.
388
+ */
385
389
  browser = _a.sent();
386
390
  // Register an exit callback to remove user-data-dir
387
391
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wppconnect-team/wppconnect",
3
- "version": "1.27.0",
3
+ "version": "1.27.2",
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",
@@ -77,7 +77,7 @@
77
77
  "commitizen": "^4.3.0",
78
78
  "concurrently": "^8.1.0",
79
79
  "conventional-changelog-cli": "^2.2.2",
80
- "eslint": "^8.41.0",
80
+ "eslint": "^8.42.0",
81
81
  "eslint-config-prettier": "^8.8.0",
82
82
  "eslint-plugin-header": "^3.1.1",
83
83
  "eslint-plugin-prettier": "^4.2.1",
@@ -86,7 +86,7 @@
86
86
  "prettier": "^2.8.8",
87
87
  "pretty-quick": "^3.1.3",
88
88
  "regenerator-runtime": "^0.13.11",
89
- "release-it": "^15.10.3",
89
+ "release-it": "^15.10.5",
90
90
  "shx": "^0.3.4",
91
91
  "ts-node": "^10.9.1",
92
92
  "typedoc": "^0.23.28",