olly-molly 0.3.26 → 0.3.27
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.
- package/bin/cli.js +13 -0
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -494,6 +494,12 @@ function backupUserData(config) {
|
|
|
494
494
|
fs.cpSync(config.CUSTOM_PROFILES_DIR, profilesBackupDir, { recursive: true });
|
|
495
495
|
}
|
|
496
496
|
|
|
497
|
+
// Backup users directory (email-based user data)
|
|
498
|
+
const usersDir = path.join(config.APP_DIR, 'users');
|
|
499
|
+
if (fs.existsSync(usersDir)) {
|
|
500
|
+
fs.cpSync(usersDir, path.join(backupDir, 'users'), { recursive: true });
|
|
501
|
+
}
|
|
502
|
+
|
|
497
503
|
// Backup user config files (ecosystem.config.js, .env, etc.)
|
|
498
504
|
const userConfigFiles = ['ecosystem.config.js', '.env'];
|
|
499
505
|
for (const file of userConfigFiles) {
|
|
@@ -529,6 +535,13 @@ function restoreUserData(backupDir, config) {
|
|
|
529
535
|
}
|
|
530
536
|
}
|
|
531
537
|
|
|
538
|
+
// Restore users directory (email-based user data)
|
|
539
|
+
const usersBackupDir = path.join(backupDir, 'users');
|
|
540
|
+
if (fs.existsSync(usersBackupDir)) {
|
|
541
|
+
const usersDir = path.join(config.APP_DIR, 'users');
|
|
542
|
+
fs.cpSync(usersBackupDir, usersDir, { recursive: true });
|
|
543
|
+
}
|
|
544
|
+
|
|
532
545
|
// Restore user config files (ecosystem.config.js, .env, etc.)
|
|
533
546
|
const userConfigFiles = ['ecosystem.config.js', '.env'];
|
|
534
547
|
for (const file of userConfigFiles) {
|