refactor(front end): login fixes to account for the forced password change
This commit is contained in:
34
scripts/lstAppMoves.mjs
Normal file
34
scripts/lstAppMoves.mjs
Normal file
@@ -0,0 +1,34 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
const src_views = path.resolve("app/src/pkg/utils/mail/views");
|
||||
const dest_views = path.resolve("dist/src/pkg/utils/mail/views");
|
||||
|
||||
const src_settings = path.resolve(
|
||||
"app/src/internal/system/controller/settings/settings.json",
|
||||
);
|
||||
const dest_settings = path.resolve(
|
||||
"dist/src/internal/system/controller/settings/settings.json",
|
||||
);
|
||||
|
||||
// Delete old views if they exist
|
||||
if (fs.existsSync(dest_views)) {
|
||||
fs.rmSync(dest_views, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
// Delete old settings file if it exists
|
||||
if (fs.existsSync(dest_settings)) {
|
||||
fs.rmSync(dest_settings, { force: true }); // for single files we dont need the recursive
|
||||
}
|
||||
|
||||
// Ensure the destination directory exists for settings.json
|
||||
const dest_settings_dir = path.dirname(dest_settings);
|
||||
if (!fs.existsSync(dest_settings_dir)) {
|
||||
fs.mkdirSync(dest_settings_dir, { recursive: true });
|
||||
}
|
||||
|
||||
// Copy files
|
||||
fs.copyFileSync(src_settings, dest_settings);
|
||||
fs.cpSync(src_views, dest_views, { recursive: true });
|
||||
|
||||
console.log(`All files copied`);
|
||||
Reference in New Issue
Block a user