Provide a rebuild option (restart w/ re-install node modules)

This commit is contained in:
Will Chen
2025-04-21 16:46:10 -07:00
parent 09b3bf3fee
commit ee3d2e7f4e
5 changed files with 125 additions and 57 deletions

View File

@@ -317,10 +317,14 @@ export class IpcClient {
// Restart a running app
public async restartApp(
appId: number,
onOutput: (output: AppOutput) => void
onOutput: (output: AppOutput) => void,
removeNodeModules?: boolean
): Promise<{ success: boolean }> {
try {
const result = await this.ipcRenderer.invoke("restart-app", { appId });
const result = await this.ipcRenderer.invoke("restart-app", {
appId,
removeNodeModules,
});
this.appStreams.set(appId, { onOutput });
return result;
} catch (error) {