@@ -29,6 +29,7 @@ export interface ElectronAPI {
2929 readFile : ( filePath : string ) => Promise < { success : boolean ; data ?: string ; error ?: string } >
3030 selectDirectory : ( ) => Promise < string | null >
3131 getAppPath : ( ) => Promise < string >
32+ getAppVersion : ( ) => Promise < string >
3233 // HTTP requests
3334 sendHttpRequest : ( opts : HttpRequestOptions ) => Promise < HttpResponse >
3435 // Remote DB management
@@ -46,6 +47,7 @@ export interface ElectronAPI {
4647 deployToVercel : ( params : { databaseUrl : string , adminToken ?: string , projectId : string , projectName : string } ) => Promise < { success : boolean ; url ?: string ; error ?: string } >
4748 deleteVercelProject : ( params : { projectId : string , projectName : string } ) => Promise < { success : boolean ; error ?: string } >
4849 onDeployOutput : ( callback : ( data : string ) => void ) => ( ) => void
50+ restartApp : ( ) => Promise < void >
4951 // Updates
5052 onUpdateStatus : ( callback : ( status : string , version ?: string ) => void ) => ( ) => void
5153 onUpdateProgress : ( callback : ( percent : number ) => void ) => ( ) => void
@@ -62,6 +64,7 @@ const electronAPI: ElectronAPI = {
6264 readFile : ( filePath ) => ipcRenderer . invoke ( 'read-file' , filePath ) ,
6365 selectDirectory : ( ) => ipcRenderer . invoke ( 'select-directory' ) ,
6466 getAppPath : ( ) => ipcRenderer . invoke ( 'get-app-path' ) ,
67+ getAppVersion : ( ) => ipcRenderer . invoke ( 'get-app-version' ) ,
6568 sendHttpRequest : ( opts ) => ipcRenderer . invoke ( 'send-http-request' , opts ) ,
6669 testDbConnection : ( url ) => ipcRenderer . invoke ( 'test-db-connection' , url ) ,
6770 createRemoteTables : ( url ) => ipcRenderer . invoke ( 'create-remote-tables' , url ) ,
@@ -76,6 +79,7 @@ const electronAPI: ElectronAPI = {
7679 // Deployment
7780 deployToVercel : ( params ) => ipcRenderer . invoke ( 'deploy-to-vercel' , params ) ,
7881 deleteVercelProject : ( params ) => ipcRenderer . invoke ( 'delete-vercel-project' , params ) ,
82+ restartApp : ( ) => ipcRenderer . invoke ( 'restart-app' ) ,
7983 onDeployOutput : ( callback ) => {
8084 const subscription = ( _event : any , data : string ) => callback ( data )
8185 ipcRenderer . on ( 'deploy-output' , subscription )
0 commit comments