@wppconnect-team/wppconnect 1.34.2 → 1.35.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.
- package/CHANGELOG.md +8 -0
- package/dist/api/helpers/download-file.js +2 -2
- package/dist/api/helpers/evaluate-and-return.js +2 -2
- package/dist/api/helpers/file-to-base64.js +2 -2
- package/dist/api/helpers/scrape-img-qr.js +2 -2
- package/dist/api/helpers/scrape-login.js +2 -2
- package/dist/api/helpers/select-sticker.js +2 -2
- package/dist/api/layers/business.layer.js +2 -2
- package/dist/api/layers/catalog.layer.js +2 -2
- package/dist/api/layers/community.layer.js +2 -2
- package/dist/api/layers/controls.layer.js +2 -2
- package/dist/api/layers/group.layer.d.ts +2 -1
- package/dist/api/layers/group.layer.js +4 -3
- package/dist/api/layers/host.layer.d.ts +1 -1
- package/dist/api/layers/host.layer.js +4 -4
- package/dist/api/layers/labels.layer.js +2 -2
- package/dist/api/layers/listener.layer.d.ts +19 -19
- package/dist/api/layers/listener.layer.js +5 -5
- package/dist/api/layers/newsletter.layer.js +2 -2
- package/dist/api/layers/profile.layer.d.ts +5 -0
- package/dist/api/layers/profile.layer.js +9 -2
- package/dist/api/layers/retriever.layer.d.ts +8 -8
- package/dist/api/layers/retriever.layer.js +8 -8
- package/dist/api/layers/sender.layer.d.ts +6 -3
- package/dist/api/layers/sender.layer.js +2 -2
- package/dist/api/layers/status.layer.js +2 -2
- package/dist/api/layers/ui.layer.d.ts +1 -1
- package/dist/api/layers/ui.layer.js +4 -8
- package/dist/api/model/chat.d.ts +6 -0
- package/dist/api/model/get-messages-param.d.ts +7 -8
- package/dist/api/model/group-metadata.d.ts +16 -2
- package/dist/api/model/initializer.d.ts +1 -1
- package/dist/api/model/message.d.ts +2 -0
- package/dist/api/whatsapp.d.ts +4 -4
- package/dist/api/whatsapp.js +7 -7
- package/dist/config/create-config.d.ts +18 -0
- package/dist/config/create-config.js +2 -1
- package/dist/controllers/auth.js +2 -2
- package/dist/controllers/browser.d.ts +5 -1
- package/dist/controllers/browser.js +28 -18
- package/dist/controllers/initializer.js +2 -2
- package/dist/controllers/welcome.js +2 -2
- package/dist/lib/wapi/wapi.js +1 -1
- package/dist/token-store/fileTokenStore.js +2 -2
- package/dist/utils/ffmpeg.js +2 -2
- package/package.json +24 -23
package/dist/api/model/chat.d.ts
CHANGED
|
@@ -9,15 +9,18 @@ export interface Chat {
|
|
|
9
9
|
lastReceivedKey: MessageId;
|
|
10
10
|
t: number;
|
|
11
11
|
unreadCount: number;
|
|
12
|
+
/** whether the message was archived */
|
|
12
13
|
archive: boolean;
|
|
13
14
|
muteExpiration: number;
|
|
14
15
|
name: string;
|
|
16
|
+
/** Whatsapp provides us with built-in spam detection and this is its indicator */
|
|
15
17
|
notSpam: boolean;
|
|
16
18
|
pin: number;
|
|
17
19
|
msgs: null;
|
|
18
20
|
kind: string;
|
|
19
21
|
isAnnounceGrpRestrict: boolean;
|
|
20
22
|
ephemeralDuration: number;
|
|
23
|
+
/** whether the chat is visually open in WhatsApp Web (see `UILayer.openChat()`) */
|
|
21
24
|
hasChatBeenOpened: boolean;
|
|
22
25
|
unreadMentionCount: number;
|
|
23
26
|
hasUnreadMention: boolean;
|
|
@@ -29,4 +32,7 @@ export interface Chat {
|
|
|
29
32
|
contact: Contact;
|
|
30
33
|
groupMetadata: GroupMetadata;
|
|
31
34
|
presence: Presence;
|
|
35
|
+
restricted: boolean;
|
|
36
|
+
/** if you can send messages into the chat without having to be an admin (refers to group chats, see the `isGroup` attribute) */
|
|
37
|
+
hasOpened: boolean;
|
|
32
38
|
}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Parameters for returning messages
|
|
3
3
|
*/
|
|
4
4
|
export interface GetMessagesParam {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Number of messages to return.
|
|
7
|
+
* Set it to `-1` to return everything (may take a while and crash the interface).
|
|
8
8
|
*
|
|
9
9
|
* @default 20
|
|
10
10
|
*/
|
|
11
11
|
count?: number;
|
|
12
12
|
/**
|
|
13
|
-
* ID
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* ID of the last message to continue the search.
|
|
14
|
+
* This works like pagination, so when you get an ID,
|
|
15
|
+
* you can use it to get the next messages from it.
|
|
16
16
|
*/
|
|
17
17
|
id?: string;
|
|
18
18
|
fromMe?: boolean;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
* do ID informado.
|
|
20
|
+
* Whether you want to retrieve the messages before or after the ID entered.
|
|
22
21
|
*
|
|
23
22
|
* @default 'before'
|
|
24
23
|
*/
|
|
@@ -14,6 +14,7 @@ export interface GroupMetadata {
|
|
|
14
14
|
descTime: number;
|
|
15
15
|
descOwner: Wid;
|
|
16
16
|
restrict: boolean;
|
|
17
|
+
/** whether it is an announcement channel of a community */
|
|
17
18
|
announce: boolean;
|
|
18
19
|
noFrequentlyForwarded: boolean;
|
|
19
20
|
ephemeralDuration: number;
|
|
@@ -29,6 +30,8 @@ export interface GroupMetadata {
|
|
|
29
30
|
isLidAddressingMode: boolean;
|
|
30
31
|
isParentGroup: boolean;
|
|
31
32
|
isParentGroupClosed: boolean;
|
|
33
|
+
/** serialized chat ID of the parent group (community) */
|
|
34
|
+
parentGroup: string | undefined;
|
|
32
35
|
defaultSubgroup: boolean;
|
|
33
36
|
generalSubgroup: boolean;
|
|
34
37
|
generalChatAutoAddDisabled: boolean;
|
|
@@ -38,11 +41,22 @@ export interface GroupMetadata {
|
|
|
38
41
|
incognito: boolean;
|
|
39
42
|
hasCapi: boolean;
|
|
40
43
|
displayCadminPromotion: boolean;
|
|
41
|
-
|
|
44
|
+
/** Current members of the group. See `pastParticipants` for former members. */
|
|
45
|
+
participants: {
|
|
46
|
+
id: Wid;
|
|
47
|
+
isAdmin: boolean;
|
|
48
|
+
isSuperAdmin: boolean;
|
|
49
|
+
}[];
|
|
42
50
|
/** members who applied for membership but still need admin approval */
|
|
43
51
|
pendingParticipants: any[];
|
|
44
52
|
/** former members who left the group or were kicked out */
|
|
45
|
-
pastParticipants:
|
|
53
|
+
pastParticipants: {
|
|
54
|
+
id: Wid;
|
|
55
|
+
/** UNIX timestamp in seconds of when the leaving occurred */
|
|
56
|
+
leaveTs: number;
|
|
57
|
+
/** was leaving volumtary (`"Left"`) or forceful (`"Removed"`) */
|
|
58
|
+
leaveReason: 'Left' | 'Removed';
|
|
59
|
+
}[];
|
|
46
60
|
membershipApprovalRequests: any[];
|
|
47
61
|
subgroupSuggestions: any[];
|
|
48
62
|
}
|
|
@@ -21,7 +21,7 @@ export interface CreateOptions extends CreateConfig {
|
|
|
21
21
|
/**
|
|
22
22
|
* You must pass a string type parameter, this parameter will be the name of the client's session. If the parameter is not passed, the section name will be "session".
|
|
23
23
|
*/
|
|
24
|
-
session
|
|
24
|
+
session?: string;
|
|
25
25
|
/**
|
|
26
26
|
* A callback will be received, informing the status of the qrcode
|
|
27
27
|
*/
|
|
@@ -37,6 +37,8 @@ export interface Message {
|
|
|
37
37
|
mediaKeyTimestamp: number;
|
|
38
38
|
width: number;
|
|
39
39
|
height: number;
|
|
40
|
+
/** exists when `type` is set to {@link MessageType.VIDEO} || {@link MessageType.IMAGE} */
|
|
41
|
+
isViewOnce?: boolean;
|
|
40
42
|
broadcast: boolean;
|
|
41
43
|
/** array of the users who were mentioned in this message; given in the serialized format: "xxxxxxxxxx@c.us" / "xxxxxxxxxx@g.us" */
|
|
42
44
|
mentionedJidList: string[];
|
package/dist/api/whatsapp.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare class Whatsapp extends BusinessLayer {
|
|
|
15
15
|
downloadFile(data: string): Promise<string | boolean>;
|
|
16
16
|
/**
|
|
17
17
|
* Download and returns the media content in base64 format
|
|
18
|
-
* @param messageId Message
|
|
18
|
+
* @param messageId Message or id
|
|
19
19
|
* @returns Base64 of media
|
|
20
20
|
*/
|
|
21
21
|
downloadMedia(messageId: string | Message): Promise<string>;
|
|
@@ -37,7 +37,7 @@ export declare class Whatsapp extends BusinessLayer {
|
|
|
37
37
|
*/
|
|
38
38
|
useHere(): Promise<boolean>;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Log out of WhatsApp
|
|
41
41
|
* @returns boolean
|
|
42
42
|
*/
|
|
43
43
|
logout(): Promise<boolean>;
|
|
@@ -52,7 +52,7 @@ export declare class Whatsapp extends BusinessLayer {
|
|
|
52
52
|
*/
|
|
53
53
|
getPID(): number;
|
|
54
54
|
/**
|
|
55
|
-
* Get message by
|
|
55
|
+
* Get a message by its ID
|
|
56
56
|
* @param messageId string
|
|
57
57
|
* @returns Message object
|
|
58
58
|
*/
|
|
@@ -67,7 +67,7 @@ export declare class Whatsapp extends BusinessLayer {
|
|
|
67
67
|
/**
|
|
68
68
|
* Decrypts message file
|
|
69
69
|
* @param message Message object
|
|
70
|
-
* @returns Decrypted file buffer (null otherwise)
|
|
70
|
+
* @returns Decrypted file buffer (`null` otherwise)
|
|
71
71
|
*/
|
|
72
72
|
decryptFile(message: Message): Promise<Buffer>;
|
|
73
73
|
/**
|
package/dist/api/whatsapp.js
CHANGED
|
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
43
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
44
|
-
return g =
|
|
43
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
44
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
45
45
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
46
46
|
function step(op) {
|
|
47
47
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -161,7 +161,7 @@ var Whatsapp = /** @class */ (function (_super) {
|
|
|
161
161
|
};
|
|
162
162
|
/**
|
|
163
163
|
* Download and returns the media content in base64 format
|
|
164
|
-
* @param messageId Message
|
|
164
|
+
* @param messageId Message or id
|
|
165
165
|
* @returns Base64 of media
|
|
166
166
|
*/
|
|
167
167
|
Whatsapp.prototype.downloadMedia = function (messageId) {
|
|
@@ -231,7 +231,7 @@ var Whatsapp = /** @class */ (function (_super) {
|
|
|
231
231
|
});
|
|
232
232
|
};
|
|
233
233
|
/**
|
|
234
|
-
*
|
|
234
|
+
* Log out of WhatsApp
|
|
235
235
|
* @returns boolean
|
|
236
236
|
*/
|
|
237
237
|
Whatsapp.prototype.logout = function () {
|
|
@@ -278,7 +278,7 @@ var Whatsapp = /** @class */ (function (_super) {
|
|
|
278
278
|
return process.pid;
|
|
279
279
|
};
|
|
280
280
|
/**
|
|
281
|
-
* Get message by
|
|
281
|
+
* Get a message by its ID
|
|
282
282
|
* @param messageId string
|
|
283
283
|
* @returns Message object
|
|
284
284
|
*/
|
|
@@ -315,7 +315,7 @@ var Whatsapp = /** @class */ (function (_super) {
|
|
|
315
315
|
/**
|
|
316
316
|
* Decrypts message file
|
|
317
317
|
* @param message Message object
|
|
318
|
-
* @returns Decrypted file buffer (null otherwise)
|
|
318
|
+
* @returns Decrypted file buffer (`null` otherwise)
|
|
319
319
|
*/
|
|
320
320
|
Whatsapp.prototype.decryptFile = function (message) {
|
|
321
321
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -326,7 +326,7 @@ var Whatsapp = /** @class */ (function (_super) {
|
|
|
326
326
|
mediaUrl = message.clientUrl || message.deprecatedMms3Url;
|
|
327
327
|
options = (0, decrypt_1.makeOptions)(WAuserAgente_1.useragentOverride);
|
|
328
328
|
if (!mediaUrl)
|
|
329
|
-
throw new Error('message is missing critical data needed to download the file.');
|
|
329
|
+
throw new Error('message is missing critical data (`mediaUrl`) needed to download the file.');
|
|
330
330
|
haventGottenImageYet = true;
|
|
331
331
|
_a.label = 1;
|
|
332
332
|
case 1:
|
|
@@ -142,5 +142,23 @@ export interface CreateConfig {
|
|
|
142
142
|
* Insert the phone number for connect by link phone, qr code not wil generate
|
|
143
143
|
*/
|
|
144
144
|
phoneNumber?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Define the proxy settings for the connection
|
|
147
|
+
* @default null
|
|
148
|
+
*/
|
|
149
|
+
proxy?: {
|
|
150
|
+
/**
|
|
151
|
+
* The URL of the proxy server
|
|
152
|
+
*/
|
|
153
|
+
url: string;
|
|
154
|
+
/**
|
|
155
|
+
* The username for the proxy server
|
|
156
|
+
*/
|
|
157
|
+
username: string;
|
|
158
|
+
/**
|
|
159
|
+
* The password for the proxy server
|
|
160
|
+
*/
|
|
161
|
+
password: string;
|
|
162
|
+
};
|
|
145
163
|
}
|
|
146
164
|
export declare const defaultOptions: CreateConfig;
|
|
@@ -20,10 +20,11 @@ exports.defaultOptions = {
|
|
|
20
20
|
waitForLogin: true,
|
|
21
21
|
logger: logger_1.defaultLogger,
|
|
22
22
|
tokenStore: 'file',
|
|
23
|
-
whatsappVersion: '2.3000.
|
|
23
|
+
whatsappVersion: '2.3000.10173x',
|
|
24
24
|
deviceName: false,
|
|
25
25
|
linkPreviewApiServers: null,
|
|
26
26
|
disableGoogleAnalytics: true,
|
|
27
27
|
googleAnalyticsId: null,
|
|
28
28
|
poweredBy: 'WPPConnect',
|
|
29
|
+
proxy: null,
|
|
29
30
|
};
|
package/dist/controllers/auth.js
CHANGED
|
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
-
return g =
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
52
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
54
|
function step(op) {
|
|
55
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -11,7 +11,11 @@ export declare function unregisterServiceWorker(page: Page): Promise<void>;
|
|
|
11
11
|
* @param version Versão ou expressão semver
|
|
12
12
|
*/
|
|
13
13
|
export declare function setWhatsappVersion(page: Page, version: string, log?: (level: LogLevel, message: string, meta?: object) => any): Promise<void>;
|
|
14
|
-
export declare function initWhatsapp(page: Page, token?: SessionToken, clear?: boolean, version?: string,
|
|
14
|
+
export declare function initWhatsapp(page: Page, token?: SessionToken, clear?: boolean, version?: string, proxy?: {
|
|
15
|
+
url: string;
|
|
16
|
+
username: string;
|
|
17
|
+
password: string;
|
|
18
|
+
}, log?: (level: LogLevel, message: string, meta?: object) => any): Promise<Page>;
|
|
15
19
|
export declare function onLoadingScreen(page: Page, onLoadingScreenCallBack?: LoadingScreenCallback): Promise<void>;
|
|
16
20
|
export declare function injectApi(page: Page, onLoadingScreenCallBack?: LoadingScreenCallback): Promise<void>;
|
|
17
21
|
/**
|
|
@@ -59,8 +59,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
61
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
62
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
63
|
-
return g =
|
|
62
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
63
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
64
64
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
65
65
|
function step(op) {
|
|
66
66
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -190,30 +190,39 @@ function setWhatsappVersion(page, version, log) {
|
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
function initWhatsapp(page_1, token_1) {
|
|
193
|
-
return __awaiter(this, arguments, void 0, function (page, token, clear, version, log) {
|
|
193
|
+
return __awaiter(this, arguments, void 0, function (page, token, clear, version, proxy, log) {
|
|
194
194
|
if (clear === void 0) { clear = true; }
|
|
195
195
|
return __generator(this, function (_a) {
|
|
196
196
|
switch (_a.label) {
|
|
197
|
-
case 0:
|
|
197
|
+
case 0:
|
|
198
|
+
if (!proxy) return [3 /*break*/, 2];
|
|
199
|
+
return [4 /*yield*/, page.authenticate({
|
|
200
|
+
username: proxy.username,
|
|
201
|
+
password: proxy.password,
|
|
202
|
+
})];
|
|
198
203
|
case 1:
|
|
204
|
+
_a.sent();
|
|
205
|
+
_a.label = 2;
|
|
206
|
+
case 2: return [4 /*yield*/, page.setUserAgent(WAuserAgente_1.useragentOverride)];
|
|
207
|
+
case 3:
|
|
199
208
|
_a.sent();
|
|
200
209
|
return [4 /*yield*/, unregisterServiceWorker(page)];
|
|
201
|
-
case
|
|
210
|
+
case 4:
|
|
202
211
|
_a.sent();
|
|
203
|
-
if (!version) return [3 /*break*/,
|
|
212
|
+
if (!version) return [3 /*break*/, 6];
|
|
204
213
|
log === null || log === void 0 ? void 0 : log('verbose', "Setting WhatsApp WEB version to ".concat(version));
|
|
205
214
|
return [4 /*yield*/, setWhatsappVersion(page, version, log)];
|
|
206
|
-
case
|
|
215
|
+
case 5:
|
|
207
216
|
_a.sent();
|
|
208
|
-
_a.label =
|
|
209
|
-
case
|
|
217
|
+
_a.label = 6;
|
|
218
|
+
case 6:
|
|
210
219
|
log === null || log === void 0 ? void 0 : log('verbose', "Loading WhatsApp WEB");
|
|
211
220
|
return [4 /*yield*/, page.goto(puppeteer_config_1.puppeteerConfig.whatsappUrl, {
|
|
212
221
|
waitUntil: 'load',
|
|
213
222
|
timeout: 0,
|
|
214
223
|
referer: 'https://whatsapp.com/',
|
|
215
224
|
})];
|
|
216
|
-
case
|
|
225
|
+
case 7:
|
|
217
226
|
_a.sent();
|
|
218
227
|
log === null || log === void 0 ? void 0 : log('verbose', 'WhatsApp WEB loaded');
|
|
219
228
|
/*setTimeout(() => {
|
|
@@ -348,7 +357,7 @@ function injectApi(page, onLoadingScreenCallBack) {
|
|
|
348
357
|
*/
|
|
349
358
|
function initBrowser(session, options, logger) {
|
|
350
359
|
return __awaiter(this, void 0, void 0, function () {
|
|
351
|
-
var chromePath, browser, transport, arg, tmpUserDataDir_1;
|
|
360
|
+
var chromePath, browser, transport, args, arg, tmpUserDataDir_1;
|
|
352
361
|
return __generator(this, function (_a) {
|
|
353
362
|
switch (_a.label) {
|
|
354
363
|
case 0:
|
|
@@ -378,14 +387,15 @@ function initBrowser(session, options, logger) {
|
|
|
378
387
|
case 2:
|
|
379
388
|
browser = _a.sent();
|
|
380
389
|
return [3 /*break*/, 5];
|
|
381
|
-
case 3:
|
|
382
|
-
|
|
383
|
-
|
|
390
|
+
case 3:
|
|
391
|
+
args = options.browserArgs
|
|
392
|
+
? options.browserArgs
|
|
393
|
+
: __spreadArray([], puppeteer_config_1.puppeteerConfig.chromiumArgs, true);
|
|
394
|
+
if (options.proxy && options.proxy.url) {
|
|
395
|
+
args.push("--proxy-server=".concat(options.proxy.url));
|
|
396
|
+
}
|
|
397
|
+
return [4 /*yield*/, puppeteer_extra_1.default.launch(__assign({ headless: options.headless, devtools: options.devtools, args: args }, options.puppeteerOptions))];
|
|
384
398
|
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
|
-
*/
|
|
389
399
|
browser = _a.sent();
|
|
390
400
|
// Register an exit callback to remove user-data-dir
|
|
391
401
|
try {
|
|
@@ -59,8 +59,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
61
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
62
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
63
|
-
return g =
|
|
62
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
63
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
64
64
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
65
65
|
function step(op) {
|
|
66
66
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g =
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|