()
| 61 | * drive the full reset path. |
| 62 | */ |
| 63 | export const confirmResetState = async (): Promise<boolean> => { |
| 64 | if (process.env.EXECUTOR_TEST_AUTO_CONFIRM_RESET === "1") return true; |
| 65 | const { response } = await dialog.showMessageBox({ |
| 66 | type: "warning", |
| 67 | title: "Reset Executor data?", |
| 68 | message: "Start over with a fresh data directory?", |
| 69 | detail: |
| 70 | "Your current data — integrations, connections, and history — will be moved to " + |
| 71 | "~/.executor/backups (not deleted), and Executor will restart with a clean slate. " + |
| 72 | "Use this when the app can't start because its data is damaged.", |
| 73 | buttons: ["Reset and back up", "Cancel"], |
| 74 | defaultId: 1, |
| 75 | cancelId: 1, |
| 76 | }); |
| 77 | return response === 0; |
| 78 | }; |
| 79 | |
| 80 | /** |
| 81 | * Make the "your data is backed up" promise concrete after a reset: name the |
no outgoing calls
no test coverage detected