• Exports complete sync report to JSON file; downloads all entries and outcomes.

    Parameters

    Returns Promise<void>

    Promise that resolves when export is complete.

    export async function exportSyncReport(report: SyncReport): Promise<void> {
    if (!report) {
    console.warn("[Export] ⚠️ No report to export");
    return;
    }

    console.info(
    `[Export] 📤 Exporting sync report: ${report.totalEntries} total entries`,
    );

    try {
    await exportToJson(
    report as unknown as Record<string, unknown>,
    "anilist-sync-report",
    );
    console.info("[Export] ✅ Successfully exported sync report");
    } catch (error) {
    console.error("[Export] ❌ Failed to export sync report:", error);
    }
    }