lambda-tester
Advanced tools
Comparing version
@@ -0,1 +1,7 @@ | ||
## 2.5.0 (2016-05-14) | ||
New: | ||
* Added auto generated context values to better simulate Lambda environment | ||
## 2.4.0 (2016-05-11) | ||
@@ -2,0 +8,0 @@ |
@@ -5,2 +5,4 @@ 'use strict'; | ||
const utils = require( './utils' ); | ||
const DEFAULT_TIMEOUT = 3000; // s3 | ||
@@ -25,2 +27,42 @@ | ||
if( !context.functionName ) { | ||
context.functionName = 'testLambda'; | ||
} | ||
if( !context.functionVersion ) { | ||
context.functionVersion = '$LATEST'; | ||
} | ||
if( !context.memoryLimitInMB ) { | ||
context.memoryLimitInMB = '128'; | ||
} | ||
if( !context.logGroupName ) { | ||
context.logGroupName = '/aws/lambda/' + context.functionName; | ||
} | ||
if( !context.logStreamName ) { | ||
context.logStreamName = utils.createLogStreamName( context.functionVersion, new Date() ); | ||
} | ||
if( !context.invokedFunctionArn ) { | ||
context.invokedFunctionArn = utils.createFunctionArn( context.functionName ); | ||
} | ||
if( !context.invokeid ) { | ||
context.invokeid = utils.createId(); | ||
} | ||
if( !context.awsRequestId ) { | ||
context.awsRequestId = context.invokeid; | ||
} | ||
return context; | ||
@@ -27,0 +69,0 @@ } |
{ | ||
"name": "lambda-tester", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Unit/Integration tests for AWS Lambda handlers", | ||
@@ -43,4 +43,5 @@ "main": "lib/index.js", | ||
"dotenv": "^2.0.0", | ||
"lambda-leak": "^1.0.0" | ||
"lambda-leak": "^1.0.0", | ||
"node-uuid": "^1.4.7" | ||
} | ||
} |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
30202
6.73%8
14.29%356
19.46%4
33.33%3
50%+ Added
+ Added