@open-wa/wa-automate 4.47.1 → 4.47.3

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.
@@ -486,6 +486,10 @@ export declare class Client {
486
486
  */
487
487
  testButtons(chatId: ChatId): Promise<any>;
488
488
  private link;
489
+ /**
490
+ * Generate a license link
491
+ */
492
+ getLicenseLink(params?: string): Promise<string>;
489
493
  /**
490
494
  *
491
495
  * {@license:restricted@}
@@ -541,7 +545,7 @@ export declare class Client {
541
545
  *
542
546
  * Button messages are being progressively handicapped by recipient mobile devices. Some recipients may not see some types of button messages even though their devices will receive them.
543
547
  *
544
- * :::
548
+ * :::
545
549
  *
546
550
  * Body can be location, image, video or document. Buttons can be quick reply, url or call buttons.
547
551
  *
@@ -1301,6 +1301,14 @@ class Client {
1301
1301
  return `https://get.openwa.dev/l/${yield this.getHostNumber()}${_p ? `?${_p}` : ''}`;
1302
1302
  });
1303
1303
  }
1304
+ /**
1305
+ * Generate a license link
1306
+ */
1307
+ getLicenseLink(params) {
1308
+ return __awaiter(this, void 0, void 0, function* () {
1309
+ return yield this.link(params);
1310
+ });
1311
+ }
1304
1312
  /**
1305
1313
  *
1306
1314
  * {@license:restricted@}
@@ -1403,7 +1411,7 @@ class Client {
1403
1411
  *
1404
1412
  * Button messages are being progressively handicapped by recipient mobile devices. Some recipients may not see some types of button messages even though their devices will receive them.
1405
1413
  *
1406
- * :::
1414
+ * :::
1407
1415
  *
1408
1416
  * Body can be location, image, video or document. Buttons can be quick reply, url or call buttons.
1409
1417
  *
@@ -61,6 +61,7 @@ const tryOpenFileAsObject = (fileLocation, needArray = false) => __awaiter(void
61
61
  else
62
62
  return;
63
63
  logging_1.log.info(`${fp} is ${res ? 'valid' : 'invalid'}`);
64
+ logging_1.log.info(`contents: ${JSON.stringify(res)}`);
64
65
  return res && Object.assign(Object.assign({}, (res || {})), { confPath: fp });
65
66
  });
66
67
  exports.tryOpenFileAsObject = tryOpenFileAsObject;
package/dist/cli/index.js CHANGED
@@ -223,6 +223,8 @@ function start() {
223
223
  if (cliConfig.emitUnread) {
224
224
  yield client.emitUnreadMessages();
225
225
  }
226
+ if (!createConfig.licenseKey)
227
+ spinner.succeed(`Use this link to get a license: ${yield client.getLicenseLink()}`);
226
228
  }
227
229
  catch (e) {
228
230
  spinner.fail(`Error ${e.message} ${e}`);
package/dist/cli/setup.js CHANGED
@@ -160,7 +160,7 @@ const configFile = (config) => __awaiter(void 0, void 0, void 0, function* () {
160
160
  yield backup();
161
161
  }
162
162
  else
163
- attempt(conf);
163
+ yield attempt(conf);
164
164
  if (!confFile)
165
165
  console.error(`Unable to read config file json: ${conf}`);
166
166
  }
@@ -441,6 +441,8 @@ function create(config = {}) {
441
441
  console.log((0, boxen_1.default)("Use the link below to easily report issues:👇👇👇", { padding: 1, borderColor: 'red' }));
442
442
  spinner.succeed(issueLink);
443
443
  spinner.succeed(`🚀 @OPEN-WA ready for account: ${me.user.slice(-4)}`);
444
+ if (!debugInfo.CLI && !config.licenseKey)
445
+ spinner.succeed(`Use this link to get a license: ${yield client.getLicenseLink()}`);
444
446
  spinner.emit('SUCCESS');
445
447
  spinner.remove();
446
448
  return client;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.47.1",
3
+ "version": "4.47.3",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",