@open-wa/wa-automate 4.46.3 → 4.47.0

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.
@@ -297,6 +297,11 @@ const deleteSessionData = (config) => {
297
297
  logging_1.log.info(l);
298
298
  fs.unlinkSync(sessionjsonpath);
299
299
  }
300
+ const mdDir = config['userDataDir'];
301
+ if (mdDir) {
302
+ logging_1.log.info(`Deleting MD session directory: ${mdDir}`);
303
+ fs.rmdirSync(mdDir, { recursive: true });
304
+ }
300
305
  return true;
301
306
  };
302
307
  exports.deleteSessionData = deleteSessionData;
@@ -93,6 +93,8 @@ function create(config = {}) {
93
93
  config.waitForRipeSession = true;
94
94
  if ((config === null || config === void 0 ? void 0 : config.multiDevice) !== false)
95
95
  config.multiDevice = true;
96
+ if ((config === null || config === void 0 ? void 0 : config.deleteSessionDataOnLogout) !== false)
97
+ config.deleteSessionDataOnLogout = true;
96
98
  if (!(config === null || config === void 0 ? void 0 : config.skipUpdateCheck) || (config === null || config === void 0 ? void 0 : config.keepUpdated)) {
97
99
  notifier = yield (0, update_notifier_1.default)({
98
100
  pkg: exports.pkg,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.46.3",
3
+ "version": "4.47.0",
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",