Plugin Command

This commit is contained in:
Subramanian Venkatesan 2018-09-09 23:07:55 +05:30
parent 8c3ac34fac
commit 74f0d05ca0
3 changed files with 25 additions and 2 deletions

View File

@ -280,7 +280,7 @@ class EmbarkController {
engine.startService("webServer"); engine.startService("webServer");
engine.startService("namingSystem"); engine.startService("namingSystem");
engine.startService("console"); engine.startService("console");
engine.startService("pluginCommand");
return callback(); return callback();
} }

View File

@ -70,7 +70,8 @@ class Engine {
"processManager": this.processManagerService, "processManager": this.processManagerService,
"storage": this.storageService, "storage": this.storageService,
"graph": this.graphService, "graph": this.graphService,
"codeCoverage": this.codeCoverageService "codeCoverage": this.codeCoverageService,
"pluginCommand": this.pluginCommandService
}; };
let service = services[serviceName]; let service = services[serviceName];
@ -130,6 +131,10 @@ class Engine {
this.servicesMonitor.startMonitor(); this.servicesMonitor.startMonitor();
} }
pluginCommandService() {
this.registerModule('plugin_cmd');
}
namingSystem(_options) { namingSystem(_options) {
this.registerModule('ens'); this.registerModule('ens');
} }

View File

@ -0,0 +1,18 @@
class PluginCommand {
constructor(embark) {
console.log(embark);
//this.embark = embark;
//this.registerCommands();
}
registerCommands() {
const self = this;
self.embark.registerConsoleCommand((cmd, _options) => {
return {
match: () => cmd === 'webserver start',
process: (cb) => self.events.request('start-webserver', cb)
};
});
}
}
module.exports = PluginCommand;