Skip to content

Commit 7ef2b15

Browse files
committed
Add wrapLambda option to decorate all loaded lambda functions
1 parent fb766f4 commit 7ef2b15

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ module.exports = function(options) {
1919
for (let funcId in slsConf.functions) {
2020
const funcConf = slsConf.functions[funcId];
2121
let func = getObjectPath(funcConf.handler, slsHandlers);
22+
if (options.wrapLambda) {
23+
func = options.wrapLambda(func);
24+
}
2225
service[funcId] = func;
2326
// http
2427
const events = (funcConf.events || []).map(e => e.http).filter(e => !!e);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverlessify",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Utility to simulate AWS Lambda event sources and write a server for Serverless functions",
55
"main": "index.js",
66
"engines": {

0 commit comments

Comments
 (0)