remove legacy events

This commit is contained in:
Iuri Matias 2018-05-22 15:00:46 -04:00
parent 742632eccf
commit 8cc86e0b0f
2 changed files with 1 additions and 34 deletions

View File

@ -43,39 +43,6 @@ class CodeGenerator {
cb(providerCode);
});
// deprecated events; to remove in embark 2.7.0
this.events.setCommandHandlerOnce('abi-vanila', function(cb) {
this.events.request("contracts:list", (contractsList) => {
let vanillaABI = self.generateABI(contractsList, {useEmbarkJS: false});
let contractsJSON = self.generateContractsJSON(contractsList);
cb(vanillaABI, contractsJSON);
});
});
this.events.setCommandHandlerOnce('abi', function(cb) {
this.events.request("contracts:list", (contractsList) => {
let embarkJSABI = self.generateABI(contractsList, {useEmbarkJS: true});
let contractsJSON = self.generateContractsJSON(contractsList);
cb(embarkJSABI, contractsJSON);
});
});
this.events.setCommandHandlerOnce('abi-contracts-vanila', function(cb) {
self.events.request("contracts:list", (contractsList) => {
let vanillaContractsABI = self.generateContracts(contractsList, false, true, false);
let contractsJSON = self.generateContractsJSON(contractsList);
cb(vanillaContractsABI, contractsJSON);
});
});
this.events.setCommandHandlerOnce('abi-vanila-deployment', function(cb) {
self.events.request("contracts:list", (contractsList) => {
let vanillaABI = self.generateABI(contractsList, {useEmbarkJS: false, deployment: true});
let contractsJSON = self.generateContractsJSON(contractsList);
cb(vanillaABI, contractsJSON);
});
});
// new events
this.events.setCommandHandlerOnce('code-vanila', function(cb) {
self.events.request("contracts:list", (contractsList) => {

View File

@ -1,7 +1,7 @@
var EventEmitter = require('events');
function warnIfLegacy(eventName) {
const legacyEvents = ['abi-vanila', 'abi', 'abi-contracts-vanila', 'abi-vanila-deployment'];
const legacyEvents = [];
if (legacyEvents.indexOf(eventName) >= 0) {
console.info(__("this event is deprecated and will be removed in future versions %s", eventName));
}