@open-wa/wa-automate 4.33.0 → 4.33.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.
@@ -399,9 +399,10 @@ function create(config = {}) {
|
|
399
399
|
if (metrics.isMd && !(config === null || config === void 0 ? void 0 : config.multiDevice))
|
400
400
|
spinner.info("!!!Please set multiDevice: true in the config or use the --mutli-Device flag!!!");
|
401
401
|
spinner.succeed(`Client loaded for ${metrics.isBiz ? "business" : "normal"} account ${metrics.isMd && "[MD] " || ''}with ${metrics.contacts} contacts, ${metrics.chats} chats & ${metrics.messages} messages ${purgedMessage ? `+ purged ${purgedMessage} ` : ``}in ${LAUNCH_TIME_MS / 1000}s`);
|
402
|
+
debugInfo.ACC_TYPE = metrics.isBiz ? "BUSINESS" : "PERSONAL";
|
402
403
|
if ((config === null || config === void 0 ? void 0 : config.deleteSessionDataOnLogout) || (config === null || config === void 0 ? void 0 : config.killClientOnLogout))
|
403
404
|
config.eventMode = true;
|
404
|
-
const client = new Client_1.Client(waPage, config, debugInfo);
|
405
|
+
const client = new Client_1.Client(waPage, config, Object.assign(Object.assign({}, debugInfo), metrics));
|
405
406
|
const { me } = yield client.getMe();
|
406
407
|
const licIndex = process.argv.findIndex(arg => arg === "--license-key" || arg === "-l");
|
407
408
|
config.licenseKey = config.licenseKey || licIndex !== -1 && process.argv[licIndex + 1];
|
@@ -417,6 +418,9 @@ function create(config = {}) {
|
|
417
418
|
yield client.refresh();
|
418
419
|
spinner.info("Session refreshed.");
|
419
420
|
}
|
421
|
+
const issueLink = yield client.getIssueLink();
|
422
|
+
console.log((0, boxen_1.default)("Use the link below to easily report issues:👇👇👇", { padding: 1, borderColor: 'red' }));
|
423
|
+
spinner.succeed(issueLink);
|
420
424
|
spinner.succeed(`🚀 @OPEN-WA ready for account: ${me.user.slice(-4)}`);
|
421
425
|
spinner.emit('SUCCESS');
|
422
426
|
spinner.remove();
|
package/dist/utils/tools.d.ts
CHANGED
@@ -19,7 +19,6 @@ export declare const isDataURL: (s: string) => boolean;
|
|
19
19
|
* A convinience method to download the [[DataURL]] of a file
|
20
20
|
* @param url The url
|
21
21
|
* @param optionsOverride You can use this to override the [axios request config](https://github.com/axios/axios#request-config)
|
22
|
-
* @returns Promise<DataURL>
|
23
22
|
*/
|
24
23
|
export declare const getDUrl: (url: string, optionsOverride?: AxiosRequestConfig) => Promise<DataURL>;
|
25
24
|
/**
|
package/dist/utils/tools.js
CHANGED
@@ -97,7 +97,6 @@ exports.isDataURL = isDataURL;
|
|
97
97
|
* A convinience method to download the [[DataURL]] of a file
|
98
98
|
* @param url The url
|
99
99
|
* @param optionsOverride You can use this to override the [axios request config](https://github.com/axios/axios#request-config)
|
100
|
-
* @returns Promise<DataURL>
|
101
100
|
*/
|
102
101
|
const getDUrl = (url, optionsOverride = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
103
102
|
// eslint-disable-next-line no-useless-catch
|
@@ -172,9 +171,10 @@ const generateGHIssueLink = (config, sessionInfo, extras = {}) => {
|
|
172
171
|
if (sessionInfo.ACC_TYPE === 'PERSONAL')
|
173
172
|
labels.push('PHA');
|
174
173
|
const qp = Object.assign({ "template": "bug_report.yaml",
|
174
|
+
//@ts-ignore
|
175
175
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
176
176
|
"d_info": `${encodeURI(JSON.stringify(((_a) => {
|
177
|
-
var { OS, PAGE_UA } = _a, o = __rest(_a, ["OS", "PAGE_UA"]);
|
177
|
+
var { OS, purged, PAGE_UA, OW_KEY, NUM, NUM_HASH } = _a, o = __rest(_a, ["OS", "purged", "PAGE_UA", "OW_KEY", "NUM", "NUM_HASH"]);
|
178
178
|
return o;
|
179
179
|
})(sessionInfo), null, 2))}`, "enviro": `${`-%20OS:%20${encodeURI(sessionInfo.OS)}%0A-%20Node:%20${encodeURI(process.versions.node)}%0A-%20npm:%20${(String(npm_ver)).replace(/\s/g, '')}`}`, "labels": labels.join(',') }, extras);
|
180
180
|
return `https://github.com/open-wa/wa-automate-nodejs/issues/new?${Object.keys(qp).map(k => `${k}=${qp[k]}`).join('&')}`;
|
package/package.json
CHANGED