@open-wa/wa-automate 4.51.1 → 4.51.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -446,7 +446,7 @@ function initBrowser(sessionId, config = {}, spinner) {
446
446
  let args = [...puppeteer_config_1.puppeteerConfig.chromiumArgs, ...((config === null || config === void 0 ? void 0 : config.chromiumArgs) || [])];
447
447
  if (config === null || config === void 0 ? void 0 : config.multiDevice) {
448
448
  args = args.filter(x => x != '--incognito');
449
- config["userDataDir"] = config["userDataDir"] || `${(config === null || config === void 0 ? void 0 : config.inDocker) ? '/sessions' : (config === null || config === void 0 ? void 0 : config.sessionDataPath) || '.'}/_IGNORE_${(config === null || config === void 0 ? void 0 : config.sessionId) || 'session'}`;
449
+ config["userDataDir"] = config["userDataDir"] || `${(config === null || config === void 0 ? void 0 : config.sessionDataPath) || (config === null || config === void 0 ? void 0 : config.inDocker) ? '/sessions' : (config === null || config === void 0 ? void 0 : config.sessionDataPath) || '.'}/_IGNORE_${(config === null || config === void 0 ? void 0 : config.sessionId) || 'session'}`;
450
450
  spinner === null || spinner === void 0 ? void 0 : spinner.info('MD Enabled, turning off incognito mode.');
451
451
  spinner === null || spinner === void 0 ? void 0 : spinner.info(`Data dir: ${config["userDataDir"]}`);
452
452
  }
@@ -63,6 +63,12 @@ const os_2 = require("os");
63
63
  const stream_1 = require("stream");
64
64
  const logging_1 = require("../logging/logging");
65
65
  const import_1 = require("@brillout/import");
66
+ const fsconstants = fsp.constants || {
67
+ F_OK: 0,
68
+ R_OK: 4,
69
+ W_OK: 2,
70
+ X_OK: 1
71
+ };
66
72
  const IGNORE_FILE_EXTS = [
67
73
  'mpga'
68
74
  ];
@@ -451,7 +457,7 @@ exports.assertFile = assertFile;
451
457
  const pathExists = (_path, failSilent) => __awaiter(void 0, void 0, void 0, function* () {
452
458
  _path = (0, exports.fixPath)(_path);
453
459
  try {
454
- yield fsp.access(_path, fsp.constants.R_OK | fsp.constants.W_OK);
460
+ yield fsp.access(_path, fsconstants.R_OK | fsconstants.W_OK);
455
461
  return _path;
456
462
  }
457
463
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.51.1",
3
+ "version": "4.51.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",