11 lines
571 B
TypeScript
11 lines
571 B
TypeScript
import { ipcMain } from 'electron'
|
|||
|
|
import { describeProject, listProjects, restartProject, startProject, stopProject } from '../ddev'
|
||
|
|
|
||
|
|
export function registerProjectsIpc(): void {
|
||
|
|
ipcMain.handle('projects:list', () => listProjects())
|
||
|
|
ipcMain.handle('projects:describe', (_event, name: string) => describeProject(name))
|
||
|
|
ipcMain.handle('projects:start', (_event, name: string) => startProject(name))
|
||
|
|
ipcMain.handle('projects:stop', (_event, name: string) => stopProject(name))
|
||
|
|
ipcMain.handle('projects:restart', (_event, name: string) => restartProject(name))
|
||
|
|
}
|