This commit is contained in:
Austen Collins 2015-12-12 10:20:41 -08:00
parent 2d8b2fcbc5
commit 45fe5de68b
3 changed files with 8 additions and 2 deletions

View File

@ -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 [];

View File

@ -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:',

View File

@ -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}`;