@open-wa/wa-automate 4.51.1 → 4.51.2
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.
@@ -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
|
}
|
package/dist/utils/tools.js
CHANGED
@@ -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,
|
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