@ -12,8 +12,8 @@ engine.register(appManager)
engine.register(fsPlugin)
engine.register(gitPlugin)
ipcMain.handle('engine:activatePlugin', async (event, arg) => {
console.log('engine:activatePlugin', arg)
ipcMain.handle('manager:activatePlugin', async (event, arg) => {
console.log('manager:activatePlugin', arg)
if(await appManager.isActive(arg)){
return true
}
@ -10,7 +10,7 @@ const exposedPLugins = ['fs', 'git']
contextBridge.exposeInMainWorld('electronAPI', {
activatePlugin: (name: string) => {
return ipcRenderer.invoke('engine:activatePlugin', name)
return ipcRenderer.invoke('manager:activatePlugin', name)
},
plugins: exposedPLugins.map(name => {
@ -9,6 +9,6 @@ engine.register(appManager)
engine.register(plugin)
//appManager.activatePlugin('fs')
ipcMain.on('engine:activatePlugin', (event, arg) => {
ipcMain.on('manager:activatePlugin', (event, arg) => {
appManager.activatePlugin(arg)
})
@ -7,6 +7,6 @@ console.log('preload.ts')
contextBridge.exposeInMainWorld('api', {
console.log('activatePlugin', name)
ipcRenderer.send('engine:activatePlugin', name)
ipcRenderer.send('manager:activatePlugin', name)