Array of backup history entries.
export function getBackupHistory(): BackupHistoryEntry[] {
try {
const historyJson = storage.getItem(STORAGE_KEYS.BACKUP_HISTORY);
if (!historyJson) {
return [];
}
const history: BackupHistoryEntry[] = JSON.parse(historyJson);
// Sort by timestamp descending (newest first)
return history.sort((a, b) => b.timestamp - a.timestamp);
} catch (error) {
console.error("[Backup] Failed to retrieve backup history:", error);
return [];
}
}
Retrieves backup history from storage sorted by timestamp (newest first).