aws-lambda
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -41,3 +41,3 @@ "use strict"; | ||
var lambda = new aws.Lambda( { apiVersion: "2014-11-11" } ) | ||
var tmpfile = path.join( os.tmpDir(), $config.FunctionName + "-" + new Date().getTime() + ".zip" ) | ||
var tmpfile = path.join( os.tmpdir(), $config.FunctionName + "-" + new Date().getTime() + ".zip" ) | ||
var $configPath = program.split('/').slice(0,-1).join('/') | ||
@@ -63,4 +63,18 @@ //console.log( $configPath ) | ||
var $zipCmd = "zip -r -9 " + tmpfile + ' .' | ||
var zipfileList = '.' | ||
try { | ||
var packageJson = fs.readFileSync( 'package.json', 'utf8' ) | ||
if ( packageJson ) { | ||
var packageJsonFiles = JSON.parse( packageJson ).files | ||
if ( typeof packageJsonFiles === 'object' ) { | ||
var zipfileList = packageJsonFiles.join( ' ' ) | ||
} | ||
} | ||
} catch (e) { } | ||
var $zipCmd = "zip -r -9 " + tmpfile + ' ' + zipfileList | ||
exec( $zipCmd, { maxBuffer: 1024 * 1024 } ,function( err, stdout, stderr ) { | ||
@@ -67,0 +81,0 @@ process.chdir($cwd) |
@@ -11,7 +11,7 @@ { | ||
"lambda", | ||
"aws lambda", | ||
"deploy", | ||
"aws", | ||
"aws lambda" | ||
"deploy lambda" | ||
], | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"homepage": "https://github.com/awspilot/aws-lambda", | ||
@@ -18,0 +18,0 @@ "bugs": "https://github.com/awspilot/aws-lambda/issues", |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
5714
89