CLI Testing: some fixes

This commit is contained in:
Eslam A. Hefnawy 2016-03-05 01:45:55 +07:00
parent 037a54e336
commit 76d4cf1a54
3 changed files with 8 additions and 3 deletions

View File

@ -157,6 +157,10 @@ class Component extends SerializerFileSystem {
return _.values( this.functions );
}
getAllEndpoints() {
return _.flatten( _.map( this.getAllFunctions(), f => f.getAllEndpoints() ) );
}
setFunction( func ){
this.functions[ func.name ] = func;
}

View File

@ -187,7 +187,7 @@ class Project extends SerializerFileSystem {
)
}
getAllEndpoints(options) {
getAllEndpoints() {
return _.flatten( _.map( this.getAllFunctions(), f => f.getAllEndpoints() ) );
}

View File

@ -103,7 +103,7 @@ module.exports = function(SPlugin, serverlessPath) {
let region = _this.deployed[Object.keys(_this.deployed)[i]];
SCli.log(Object.keys(_this.deployed)[i] + ' ------------------------');
for (let j = 0; j < region.length; j++) {
SCli.log(' ' + region[j].name);
SCli.log(` ${region[j].name} (${region[j].type} event)`);
}
}
}
@ -258,7 +258,8 @@ module.exports = function(SPlugin, serverlessPath) {
if (!_this.deployed[region]) _this.deployed[region] = [];
_this.deployed[region].push({
function: event._function,
name: event.name
name: event.name,
type: event.type
});
return eCb();