@wppconnect-team/wppconnect 2.0.1 → 2.0.3-alpha.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,15 @@
|
|
|
1
|
+
## 2.0.3-alpha.0 (2026-05-07)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- add alpha tag support for npm publish and release process ([ab7603a](https://github.com/wppconnect-team/wppconnect/commit/ab7603a928211762d69a2bdf8a7fb5cbfd94ac58))
|
|
6
|
+
|
|
7
|
+
## 2.0.2 (2026-05-04)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- wa-js and axios version bump ([#2766](https://github.com/wppconnect-team/wppconnect/issues/2766)) ([d0e1421](https://github.com/wppconnect-team/wppconnect/commit/d0e1421a2e6b17e3a837909614fc0a53a17cd7f0))
|
|
12
|
+
|
|
1
13
|
## 2.0.1 (2026-05-04)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
|
@@ -34,7 +34,7 @@ async function downloadFileToBase64(_path, _mines = []) {
|
|
|
34
34
|
const response = await axios_1.default.get(_path, {
|
|
35
35
|
responseType: 'arraybuffer',
|
|
36
36
|
});
|
|
37
|
-
const mimeType = response.headers['content-type'];
|
|
37
|
+
const mimeType = String(response.headers['content-type'] ?? '');
|
|
38
38
|
if (_mines.length) {
|
|
39
39
|
const isValidMime = _mines.some((m) => {
|
|
40
40
|
if (typeof m === 'string') {
|
|
@@ -4,7 +4,6 @@ import { Logger } from 'winston';
|
|
|
4
4
|
import { SessionToken } from '../token-store';
|
|
5
5
|
import { LoadingScreenCallback } from '../api/model';
|
|
6
6
|
import { LogLevel } from '../utils/logger';
|
|
7
|
-
export declare function unregisterServiceWorker(page: Page): Promise<void>;
|
|
8
7
|
/**
|
|
9
8
|
* Força o carregamento de uma versão específica do WhatsApp WEB
|
|
10
9
|
* @param page Página a ser injetada
|
|
@@ -52,7 +52,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
52
52
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
53
53
|
};
|
|
54
54
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
-
exports.unregisterServiceWorker = unregisterServiceWorker;
|
|
56
55
|
exports.setWhatsappVersion = setWhatsappVersion;
|
|
57
56
|
exports.initWhatsapp = initWhatsapp;
|
|
58
57
|
exports.onLoadingScreen = onLoadingScreen;
|
|
@@ -70,26 +69,6 @@ const puppeteer_config_1 = require("../config/puppeteer.config");
|
|
|
70
69
|
const puppeteer_extra_plugin_stealth_1 = __importDefault(require("puppeteer-extra-plugin-stealth"));
|
|
71
70
|
const WAuserAgente_1 = require("../config/WAuserAgente");
|
|
72
71
|
const websocket_1 = require("./websocket");
|
|
73
|
-
async function unregisterServiceWorker(page) {
|
|
74
|
-
await page.evaluateOnNewDocument(() => {
|
|
75
|
-
// Remove existent service worker
|
|
76
|
-
navigator.serviceWorker
|
|
77
|
-
.getRegistrations()
|
|
78
|
-
.then((registrations) => {
|
|
79
|
-
for (let registration of registrations) {
|
|
80
|
-
registration.unregister();
|
|
81
|
-
}
|
|
82
|
-
})
|
|
83
|
-
.catch((err) => null);
|
|
84
|
-
// Disable service worker registration
|
|
85
|
-
// @ts-ignore
|
|
86
|
-
navigator.serviceWorker.register = new Promise(() => { });
|
|
87
|
-
setInterval(() => {
|
|
88
|
-
window.onerror = console.error;
|
|
89
|
-
window.onunhandledrejection = console.error;
|
|
90
|
-
}, 500);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
72
|
/**
|
|
94
73
|
* Força o carregamento de uma versão específica do WhatsApp WEB
|
|
95
74
|
* @param page Página a ser injetada
|
|
@@ -130,7 +109,6 @@ async function initWhatsapp(page, token, clear = true, version, proxy, log) {
|
|
|
130
109
|
});
|
|
131
110
|
}
|
|
132
111
|
await page.setUserAgent(WAuserAgente_1.useragentOverride);
|
|
133
|
-
await unregisterServiceWorker(page);
|
|
134
112
|
if (version) {
|
|
135
113
|
log?.('verbose', `Setting WhatsApp WEB version to ${version}`);
|
|
136
114
|
await setWhatsappVersion(page, version, log);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wppconnect-team/wppconnect",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3-alpha.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,7 +58,7 @@
|
|
|
58
58
|
"@babel/core": "^7.29.0",
|
|
59
59
|
"@babel/eslint-parser": "^7.28.6",
|
|
60
60
|
"@babel/eslint-plugin": "^7.27.1",
|
|
61
|
-
"@babel/preset-env": "^7.29.
|
|
61
|
+
"@babel/preset-env": "^7.29.5",
|
|
62
62
|
"@commitlint/cli": "^20.5.3",
|
|
63
63
|
"@commitlint/config-conventional": "^20.5.3",
|
|
64
64
|
"@commitlint/cz-commitlint": "^20.5.3",
|
|
@@ -94,10 +94,10 @@
|
|
|
94
94
|
"webpack-cli": "^6.0.1"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@wppconnect/wa-js": "^4.
|
|
97
|
+
"@wppconnect/wa-js": "^4.1.0",
|
|
98
98
|
"@wppconnect/wa-version": "^1.5.3829",
|
|
99
99
|
"atob": "^2.1.2",
|
|
100
|
-
"axios": "^1.
|
|
100
|
+
"axios": "^1.16.0",
|
|
101
101
|
"boxen": "^5.1.2",
|
|
102
102
|
"catch-exit": "^2.0.0",
|
|
103
103
|
"chalk": "~4.1.2",
|