From 88e584ce6d8520af19a2d3dd44400cefacc40222 Mon Sep 17 00:00:00 2001 From: Steven White Date: Fri, 10 Feb 2017 10:09:36 -0500 Subject: [PATCH 1/2] Make default excludes apply to root only --- lib/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/main.js b/lib/main.js index 3f43f941..f7f888e1 100644 --- a/lib/main.js +++ b/lib/main.js @@ -146,7 +146,7 @@ Lambda.prototype._params = function (program, buffer) { Variables: config } } - + return params; }; @@ -162,14 +162,14 @@ Lambda.prototype._zipfileTmpPath = function (program) { }; Lambda.prototype._rsync = function (program, src, dest, excludeNodeModules, callback) { - var excludes = ['.git*', '*.swp', '.editorconfig', 'deploy.env', '*.log', 'build/'], + var excludes = ['.git*', '*.swp', '.editorconfig', 'deploy.env', '*.log', '/build/'], excludeGlobs = []; if (program.excludeGlobs) { excludeGlobs = program.excludeGlobs.split(' '); } var excludeArgs = excludeGlobs .concat(excludes) - .concat(excludeNodeModules ? ['node_modules'] : []) + .concat(excludeNodeModules ? ['/node_modules'] : []) .map(function (exclude) { return '--exclude=' + exclude; }).join(' '); From 53bcca8285fd4315370ec621d1efb3efe90419c2 Mon Sep 17 00:00:00 2001 From: Steven White Date: Fri, 10 Feb 2017 10:13:28 -0500 Subject: [PATCH 2/2] Fix reference error --- lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/main.js b/lib/main.js index f7f888e1..ec0b422b 100644 --- a/lib/main.js +++ b/lib/main.js @@ -96,7 +96,7 @@ Lambda.prototype._runHandler = function (handler, event, program, context) { return timeout - (currentTime - startTime); }; - switch(runtime) { + switch(program.runtime) { case "nodejs": handler(event, context); break;