diff --git a/lib/commands/dash.js b/lib/commands/dash.js index b07a36d7d..599aa6c9d 100644 --- a/lib/commands/dash.js +++ b/lib/commands/dash.js @@ -71,6 +71,7 @@ CMD.prototype.run = Promise.method(function() { .then(_this._prepareSummary) .then(_this._renderDash) .then(function(selectedResources) { + _this._resources = selectedResources; if (!_this._resources.length) { return false; diff --git a/lib/commands/tag.js b/lib/commands/tag.js index 19fd0b69a..ddbebec4b 100644 --- a/lib/commands/tag.js +++ b/lib/commands/tag.js @@ -23,6 +23,7 @@ Promise.promisifyAll(fs); */ module.exports.tag = function(type, fullPathToAwsmJson, untag) { + untag = !!(untag); var awsmJsonPath = fullPathToAwsmJson ? fullPathToAwsmJson : path.join(process.cwd(), 'awsm.json'); var awsmJson = require(awsmJsonPath); @@ -60,7 +61,7 @@ module.exports.tagAll = function(JAWS, type, untag) { return JAWS.validateProject() .then(function() { - return utils[findAllFunc](JAWS._meta.projectRootPath); + return utils[findAllFunc](path.join(JAWS._meta.projectRootPath, 'aws_modules')); }) .then(function(awsmJsonPaths) { var tagQueue = []; @@ -84,12 +85,14 @@ module.exports.tagAll = function(JAWS, type, untag) { * @param type * @returns {Promise} */ + module.exports.listAll = function(JAWS, type) { + var findAllFunc = (type == 'lambda') ? 'findAllLambdas' : 'findAllEndpoints'; return JAWS.validateProject() .then(function() { - return utils[findAllFunc](JAWS._meta.projectRootPath); + return utils[findAllFunc](path.join(JAWS._meta.projectRootPath, 'aws_modules')); }) .then(function(lAwsmJsonPaths) { @@ -99,14 +102,12 @@ module.exports.listAll = function(JAWS, type) { var fullPaths = []; var attr = (type == 'lambda') ? 'lambda' : 'apiGateway'; - lAwsmJsonPaths.forEach(function(ljp) { var awsmJson = require(ljp); if (awsmJson[attr] && awsmJson[attr].deploy == true) { fullPaths.push(ljp); } }); - return Promise.all(fullPaths); }); }; \ No newline at end of file