diff --git a/lib/Component.js b/lib/Component.js index 04bfe7d02..7be13defd 100644 --- a/lib/Component.js +++ b/lib/Component.js @@ -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; } diff --git a/lib/Project.js b/lib/Project.js index 3dc712a71..e1e61b684 100644 --- a/lib/Project.js +++ b/lib/Project.js @@ -187,7 +187,7 @@ class Project extends SerializerFileSystem { ) } - getAllEndpoints(options) { + getAllEndpoints() { return _.flatten( _.map( this.getAllFunctions(), f => f.getAllEndpoints() ) ); } diff --git a/lib/actions/EventDeploy.js b/lib/actions/EventDeploy.js index 494ca2046..82f2495f5 100644 --- a/lib/actions/EventDeploy.js +++ b/lib/actions/EventDeploy.js @@ -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();