@wppconnect-team/wppconnect 1.10.2 → 1.12.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.
@@ -30,7 +30,7 @@ exports.formatLabelSession = (0, winston_1.format)(function (info, opts) {
30
30
  }
31
31
  if (parts.length) {
32
32
  var prefix = parts.join(':');
33
- info.message = "[" + prefix + "] " + info.message;
33
+ info.message = "[".concat(prefix, "] ").concat(info.message);
34
34
  }
35
35
  return info;
36
36
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wppconnect-team/wppconnect",
3
- "version": "1.10.2",
3
+ "version": "1.12.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",
@@ -58,62 +58,61 @@
58
58
  },
59
59
  "homepage": "https://github.com/wppconnect-team/wppconnect#readme",
60
60
  "devDependencies": {
61
- "@babel/core": "^7.16.0",
62
- "@babel/eslint-parser": "^7.16.3",
63
- "@babel/eslint-plugin": "^7.14.5",
64
- "@babel/preset-env": "^7.16.0",
65
- "@commitlint/cli": "^14.1.0",
66
- "@commitlint/config-conventional": "^14.1.0",
67
- "@commitlint/cz-commitlint": "^14.1.0",
61
+ "@babel/core": "^7.16.7",
62
+ "@babel/eslint-parser": "^7.16.5",
63
+ "@babel/eslint-plugin": "^7.16.5",
64
+ "@babel/preset-env": "^7.16.7",
65
+ "@commitlint/cli": "^16.0.1",
66
+ "@commitlint/config-conventional": "^16.0.0",
67
+ "@commitlint/cz-commitlint": "^16.0.0",
68
68
  "@types/atob": "^2.1.2",
69
69
  "@types/mime-types": "^2.1.0",
70
70
  "@types/mocha": "^9.0.0",
71
- "@types/node": "^14.17.33",
71
+ "@types/node": "^14.18.5",
72
72
  "@types/rimraf": "^3.0.0",
73
- "@types/sharp": "^0.29.3",
74
- "@types/shelljs": "^0.8.8",
75
- "@types/tmp": "^0.2.2",
76
- "@types/ws": "^8.2.0",
77
- "@typescript-eslint/eslint-plugin": "^5.3.1",
78
- "@typescript-eslint/parser": "^4.33.0",
79
- "@wppconnect-team/loader": "^1.0.5",
73
+ "@types/sharp": "^0.29.5",
74
+ "@types/shelljs": "^0.8.10",
75
+ "@types/tmp": "^0.2.3",
76
+ "@types/ws": "^8.2.2",
77
+ "@typescript-eslint/eslint-plugin": "^5.9.0",
78
+ "@typescript-eslint/parser": "^5.9.0",
80
79
  "babel-loader": "^8.2.3",
81
80
  "commitizen": "^4.2.3",
82
- "concurrently": "^6.4.0",
83
- "conventional-changelog-cli": "^2.1.1",
84
- "copy-webpack-plugin": "^9.1.0",
85
- "eslint": "^8.2.0",
81
+ "concurrently": "^7.0.0",
82
+ "conventional-changelog-cli": "^2.2.2",
83
+ "copy-webpack-plugin": "^10.2.0",
84
+ "eslint": "^8.6.0",
86
85
  "eslint-config-prettier": "^8.1.0",
87
86
  "eslint-plugin-prettier": "^4.0.0",
88
87
  "gulp": "^4.0.2",
89
88
  "husky": "^7.0.4",
90
89
  "license-check-and-add": "^4.0.3",
91
90
  "mocha": "^9.1.3",
92
- "prettier": "^2.3.0",
93
- "pretty-quick": "^3.1.0",
91
+ "prettier": "^2.5.1",
92
+ "pretty-quick": "^3.1.3",
94
93
  "regenerator-runtime": "^0.13.7",
95
- "release-it": "^14.11.7",
94
+ "release-it": "^14.11.8",
96
95
  "shx": "^0.3.3",
97
96
  "ts-node": "^10.4.0",
98
97
  "typedoc": "^0.21.0",
99
98
  "typedoc-plugin-pages": "^1.1.0",
100
- "typescript": "^4.4.4",
101
- "webpack": "^5.64.0",
99
+ "typescript": "^4.5.4",
100
+ "webpack": "^5.65.0",
102
101
  "webpack-cli": "^4.9.1"
103
102
  },
104
103
  "dependencies": {
105
- "@wppconnect/wa-js": "^1.0.11",
106
- "@wppconnect/wa-version": "^1.1.21",
104
+ "@wppconnect/wa-js": "^1.1.3",
105
+ "@wppconnect/wa-version": "^1.1.26",
107
106
  "atob": "^2.1.2",
108
107
  "axios": "^0.24.0",
109
108
  "boxen": "^5.1.2",
110
109
  "catch-exit": "^1.1.0",
111
- "chalk": "^4.0.0",
110
+ "chalk": "~4.1.2",
112
111
  "chrome-launcher": "^0.15.0",
113
112
  "execa": "^5.0.0",
114
- "file-type": "^16.5.3",
113
+ "file-type": "~16.5.3",
115
114
  "fsevents": "^2.3.1",
116
- "futoin-hkdf": "^1.3.2",
115
+ "futoin-hkdf": "^1.4.3",
117
116
  "latest-version": "^5.1.0",
118
117
  "logform": "^2.3.0",
119
118
  "lookpath": "^1.2.0",
@@ -131,7 +130,7 @@
131
130
  "tmp": "^0.2.1",
132
131
  "tree-kill": "^1.2.2",
133
132
  "winston": "^3.3.3",
134
- "ws": "^8.2.3"
133
+ "ws": "^8.4.0"
135
134
  },
136
135
  "optionalDependencies": {
137
136
  "fsevents": "^2.3.1"
@@ -1,7 +0,0 @@
1
- import { Page } from 'puppeteer';
2
- declare global {
3
- interface Window {
4
- Store: any;
5
- }
6
- }
7
- export declare function scrapeDesconnected(page: Page): Promise<boolean>;
@@ -1,78 +0,0 @@
1
- "use strict";
2
- /*
3
- * This file is part of WPPConnect.
4
- *
5
- * WPPConnect is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU Lesser General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * WPPConnect is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU Lesser General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Lesser General Public License
16
- * along with WPPConnect. If not, see <https://www.gnu.org/licenses/>.
17
- */
18
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
19
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
20
- return new (P || (P = Promise))(function (resolve, reject) {
21
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
22
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
23
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
24
- step((generator = generator.apply(thisArg, _arguments || [])).next());
25
- });
26
- };
27
- var __generator = (this && this.__generator) || function (thisArg, body) {
28
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
29
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
30
- function verb(n) { return function (v) { return step([n, v]); }; }
31
- function step(op) {
32
- if (f) throw new TypeError("Generator is already executing.");
33
- while (_) try {
34
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
35
- if (y = 0, t) op = [op[0] & 2, t.value];
36
- switch (op[0]) {
37
- case 0: case 1: t = op; break;
38
- case 4: _.label++; return { value: op[1], done: false };
39
- case 5: _.label++; y = op[1]; op = [0]; continue;
40
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
41
- default:
42
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
43
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
44
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
45
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
46
- if (t[2]) _.ops.pop();
47
- _.trys.pop(); continue;
48
- }
49
- op = body.call(thisArg, _);
50
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
51
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
52
- }
53
- };
54
- Object.defineProperty(exports, "__esModule", { value: true });
55
- exports.scrapeDesconnected = void 0;
56
- function scrapeDesconnected(page) {
57
- return __awaiter(this, void 0, void 0, function () {
58
- var result;
59
- return __generator(this, function (_a) {
60
- switch (_a.label) {
61
- case 0: return [4 /*yield*/, page.evaluate(function () {
62
- var scrape = window.Store.State.default.on('change:state');
63
- if (scrape.__x_stream === 'DISCONNECTED' &&
64
- scrape.__x_state === 'CONNECTED') {
65
- return true;
66
- }
67
- else {
68
- return false;
69
- }
70
- })];
71
- case 1:
72
- result = _a.sent();
73
- return [2 /*return*/, result];
74
- }
75
- });
76
- });
77
- }
78
- exports.scrapeDesconnected = scrapeDesconnected;