From 45fe5de68b2e7d5ffd29de1e31acb164bb4cf9b3 Mon Sep 17 00:00:00 2001 From: Austen Collins Date: Sat, 12 Dec 2015 10:20:41 -0800 Subject: [PATCH] merge --- lib/ServerlessPlugin.js | 2 +- lib/actions/EndpointDeploy.js | 6 ++++++ lib/utils/index.js | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/ServerlessPlugin.js b/lib/ServerlessPlugin.js index c47917f26..b6e17917b 100644 --- a/lib/ServerlessPlugin.js +++ b/lib/ServerlessPlugin.js @@ -167,7 +167,7 @@ class ServerlessPlugin { // Get Endpoints return SUtils.getEndpoints(cwd, null) .then(function(endpoints) { - + console.log(endpoints) // If no endpoints found, return if (!endpoints.length) { return []; diff --git a/lib/actions/EndpointDeploy.js b/lib/actions/EndpointDeploy.js index bde99cea7..e73451764 100644 --- a/lib/actions/EndpointDeploy.js +++ b/lib/actions/EndpointDeploy.js @@ -171,7 +171,9 @@ class EndpointDeploy extends SPlugin { evt.all ? null : evt.paths) .then(function (endpoints) { + if (!endpoints.length) throw new SError(`No endpoints found`); evt.endpoints = endpoints; + // Delete Paths if (evt.paths) delete evt.paths; return evt; @@ -181,6 +183,8 @@ class EndpointDeploy extends SPlugin { // IF CLI + ALL/paths, get endpoints if (_this.S.cli && (evt.all || evt.paths.length)) { + console.log('here') + return SUtils.getEndpoints( _this.S._projectRootPath, evt.all ? null : evt.paths) @@ -198,6 +202,8 @@ class EndpointDeploy extends SPlugin { // IF CLI + no ALL + no paths - prompt user to select endpoints if (_this.S.cli && !evt.all && !evt.paths.length) { + console.log('here2') + return _this.cliPromptSelectEndpoints( process.cwd(), 'Select the endpoints you wish to deploy:', diff --git a/lib/utils/index.js b/lib/utils/index.js index cd86ab564..da8e51dfc 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -553,7 +553,7 @@ exports.generateResourcesCf = function(projRootPath, projName, projDomain, stage * - If we ever want to get more complicated with log levels we should use winston */ -let debuggerCache = {}; +let debuggerCache = {}; exports.sDebugWithContext = function(context) { if (process.env.DEBUG) { context = `serverless:${context}`;