fix(backup): verify scheduled export destinations before writing
This commit is contained in:
1 parent
a8f966dcfd
commit
4ce27f8ae5
12 files changed
+652
-7
No files matched your search
@@ -416,6 +416,7 @@ export const releaseTableImportSource = forward("releaseTableImportSource");
|
||||
export const beginDatabaseBackupSnapshot = forward("beginDatabaseBackupSnapshot");
|
||||
export const exportDatabaseSql = forward("exportDatabaseSql");
|
||||
export const cancelDatabaseExport = forward("cancelDatabaseExport");
|
||||
export const recordDatabaseExportDestination = forward("recordDatabaseExportDestination");
|
||||
export const exportQueryResultCsv = forward("exportQueryResultCsv");
|
||||
export const exportTableDataCsv = forward("exportTableDataCsv");
|
||||
export const exportQueryResultXlsx = forward("exportQueryResultXlsx");
|
||||
|
||||
@@ -2224,6 +2224,10 @@ export async function cancelDatabaseExport(exportId: string): Promise<void> {
|
||||
await post("/api/export/database/cancel", { exportId });
|
||||
}
|
||||
|
||||
export async function recordDatabaseExportDestination(_directory: string): Promise<void> {
|
||||
throw new Error("Scheduled database backups are only available in the desktop app.");
|
||||
}
|
||||
|
||||
// --- Table Export ---
|
||||
|
||||
export async function startTableExport(request: TableExportRequest, onProgress: (progress: TableExportProgress) => void): Promise<TableExportProgress> {
|
||||
|
||||
@@ -4405,6 +4405,10 @@ export async function cancelDatabaseExport(exportId: string): Promise<void> {
|
||||
await invoke("cancel_database_export", { exportId });
|
||||
}
|
||||
|
||||
export async function recordDatabaseExportDestination(directory: string): Promise<void> {
|
||||
await invoke("record_database_export_destination", { directory });
|
||||
}
|
||||
|
||||
export async function exportQueryResultCsv(filePath: string, columns: string[], rows: readonly (readonly XlsxCellValue[])[]): Promise<void> {
|
||||
return invoke("export_query_result_csv", {
|
||||
request: {
|
||||
|
||||
Reference in new issue
Block a user