@open-wa/wa-automate 4.54.6 → 4.55.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  import { Client } from '../api/Client';
2
2
  import { AdvancedConfig, ConfigObject } from '../api/model/index';
3
- export declare const pkg: any, configWithCases: any, timeout: (ms: number) => Promise<unknown>;
3
+ export declare const pkg: any, configWithCases: any, timeout: (ms: number) => Promise<string>;
4
4
  export declare let screenshot: any;
5
5
  /**
6
6
  * Used to initialize the client session.
@@ -271,7 +271,10 @@ function create(config = {}) {
271
271
  _serialized: earlyWid
272
272
  }, debugInfo, spinner);
273
273
  if (authenticated == 'timeout') {
274
- const outOfReach = yield Promise.race([(0, auth_1.phoneIsOutOfReach)(waPage), (0, exports.timeout)(20 * 1000)]);
274
+ const oorProms = [(0, auth_1.phoneIsOutOfReach)(waPage)];
275
+ if ((config === null || config === void 0 ? void 0 : config.oorTimeout) !== 0)
276
+ oorProms.push((0, exports.timeout)(((config === null || config === void 0 ? void 0 : config.oorTimeout) || 60) * 1000));
277
+ const outOfReach = yield Promise.race(oorProms);
275
278
  spinner.emit(outOfReach && outOfReach !== 'timeout' ? 'appOffline' : 'authTimeout');
276
279
  spinner.fail(outOfReach && outOfReach !== 'timeout' ? 'Authentication timed out. Please open the app on the phone. Shutting down' : 'Authentication timed out. Shutting down. Consider increasing authTimeout config variable: https://open-wa.github.io/wa-automate-nodejs/interfaces/configobject.html#authtimeout');
277
280
  yield (0, browser_1.kill)(waPage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.54.6",
3
+ "version": "4.55.1",
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",