minor v1.3.0 #58

Merged
jkeffects merged 29 commits from develop into main 2025-02-03 12:52:06 +00:00
Showing only changes of commit 9a1f4a2985 - Show all commits

View file

@ -21,8 +21,7 @@ export type BackupSectionRefered = {
};
export type BackupFileContent = { [key in BackupSection]?: BackupFileContentSection } & {
collectIds: boolean;
version: 1;
backup_file_details: { collectIds: boolean; createdAt: Date; version: 1 };
};
export type BackupFileContentSection = Array<any> | { [key: string]: Array<any> };
@ -90,7 +89,7 @@ export default abstract class BackupHelper {
filename = new Date().toISOString().split("T")[0];
}
let json: BackupFileContent = { collectIds, version: 1 };
let json: BackupFileContent = { backup_file_details: { collectIds, createdAt: new Date(), version: 1 } };
for (const section of this.backupSection) {
json[section.type] = await this.getSectionData(section.type, collectIds);
}
@ -131,7 +130,7 @@ export default abstract class BackupHelper {
for (const section of sections
.filter((s) => Object.keys(backup).includes(s.type))
.sort((a, b) => a.orderOnInsert - b.orderOnInsert)) {
await this.setSectionData(section.type, backup[section.type], backup.collectIds ?? false);
await this.setSectionData(section.type, backup[section.type], backup.backup_file_details.collectIds ?? false);
}
this.transactionManager = undefined;