parent
171518f49a
commit
93973004e9
@ -0,0 +1,19 @@ |
||||
import { Engine, PluginManager, Plugin, PluginConnector } from '@remixproject/engine'; |
||||
import { Message, Profile } from '@remixproject/plugin-utils'; |
||||
import { ElectronPluginConnector } from './lib/electronPluginConnector'; |
||||
|
||||
export class fsPlugin extends ElectronPluginConnector { |
||||
|
||||
constructor(){ |
||||
super({ |
||||
displayName: 'fs', |
||||
name: 'fs', |
||||
description: 'fs', |
||||
}, { |
||||
sendAPI: window.api.sendToFS, |
||||
receiveAPI: window.api.receiveFromFS |
||||
}) |
||||
this.methods = ['readdir', 'readFile', 'writeFile', 'mkdir', 'rmdir', 'unlink', 'rename', 'stat', 'exists'] |
||||
} |
||||
|
||||
} |
@ -0,0 +1,17 @@ |
||||
import { Engine, PluginManager, Plugin, PluginConnector } from '@remixproject/engine'; |
||||
import { Message, Profile } from '@remixproject/plugin-utils'; |
||||
import { ElectronPluginConnector } from './lib/electronPluginConnector'; |
||||
|
||||
export class gitPlugin extends ElectronPluginConnector { |
||||
constructor(){ |
||||
super({ |
||||
displayName: 'git', |
||||
name: 'git', |
||||
description: 'git', |
||||
},{ |
||||
sendAPI: window.api.sendToGit, |
||||
receiveAPI: window.api.receiveFromGit |
||||
}) |
||||
this.methods = ['log', 'status', 'add', 'commit', 'push', 'pull', 'clone', 'checkout', 'branch', 'merge', 'reset', 'revert', 'diff', 'stash', 'apply', 'cherryPick', 'rebase', 'tag', 'fetch', 'remote', 'config', 'show', 'init', 'help', 'version'] |
||||
} |
||||
} |
@ -1,36 +0,0 @@ |
||||
import { Engine, PluginManager, Plugin, PluginConnector } from '@remixproject/engine'; |
||||
import { Message, Profile } from '@remixproject/plugin-utils'; |
||||
import { ElectronPluginConnector } from './electronPluginConnector'; |
||||
|
||||
export class fsPlugin extends ElectronPluginConnector { |
||||
constructor(){ |
||||
super({ |
||||
displayName: 'fs', |
||||
name: 'fs', |
||||
description: 'fs', |
||||
}) |
||||
} |
||||
|
||||
onActivation(): void { |
||||
console.log('fsPlugin onActivation') |
||||
//window.api.activatePlugin('fs')
|
||||
} |
||||
|
||||
protected connect(name: string) { |
||||
console.log('fsPlugin connect', name) |
||||
window.api.activatePlugin(name) |
||||
window.api.receiveFromFS((event: any, message: any) => { |
||||
console.log('fsPlugin fsClientSend message received', message) |
||||
this.getMessage(message) |
||||
}) |
||||
} |
||||
|
||||
protected send(message: Partial<Message>): void { |
||||
console.log('fsPlugin send', message) |
||||
window.api.sendToFS(message) |
||||
} |
||||
|
||||
protected disconnect() { |
||||
console.log('fsPlugin disconnect') |
||||
} |
||||
} |
@ -1,36 +0,0 @@ |
||||
import { Engine, PluginManager, Plugin, PluginConnector } from '@remixproject/engine'; |
||||
import { Message, Profile } from '@remixproject/plugin-utils'; |
||||
import { ElectronPluginConnector } from './electronPluginConnector'; |
||||
|
||||
export class gitPlugin extends ElectronPluginConnector { |
||||
constructor(){ |
||||
super({ |
||||
displayName: 'git', |
||||
name: 'git', |
||||
description: 'git', |
||||
}) |
||||
} |
||||
|
||||
onActivation(): void { |
||||
console.log('git onActivation') |
||||
//window.api.activatePlugin('fs')
|
||||
} |
||||
|
||||
protected connect(name: string) { |
||||
console.log('git connect', name) |
||||
window.api.activatePlugin(name) |
||||
window.api.receiveFromGit((event: any, message: any) => { |
||||
console.log('git fsClientSend message received', message) |
||||
this.getMessage(message) |
||||
}) |
||||
} |
||||
|
||||
protected send(message: Partial<Message>): void { |
||||
console.log('git send', message) |
||||
window.api.sendToGit(message) |
||||
} |
||||
|
||||
protected disconnect() { |
||||
console.log('git disconnect') |
||||
} |
||||
} |
Loading…
Reference in new issue