Commit 4f648ff 1 parent ed0a7dd commit 4f648ff Copy full SHA for 4f648ff
File tree 1 file changed +14
-5
lines changed
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
- ' use strict' ;
1
+ " use strict" ;
2
2
3
3
/**
4
4
* Serverless Plugin to add a `RecursiveLoop` property to AWS Lambda functions.
@@ -22,6 +22,19 @@ class ServerlessRecursiveLoopPlugin {
22
22
this . hooks = {
23
23
"package:compileFunctions" : this . addRecursiveLoopProperty . bind ( this ) ,
24
24
} ;
25
+ if (
26
+ this . serverless . configSchemaHandler &&
27
+ this . serverless . configSchemaHandler . defineFunctionProperties
28
+ ) {
29
+ this . serverless . configSchemaHandler . defineFunctionProperties ( "aws" , {
30
+ properties : {
31
+ recursiveLoop : {
32
+ type : "string" ,
33
+ enum : [ "Allow" , "Terminate" ] ,
34
+ } ,
35
+ } ,
36
+ } ) ;
37
+ }
25
38
}
26
39
27
40
/**
@@ -43,10 +56,6 @@ class ServerlessRecursiveLoopPlugin {
43
56
this . provider . naming . getLambdaLogicalId ( functionName )
44
57
] ;
45
58
functionResource . Properties . RecursiveLoop = recursiveLoop ;
46
- } else {
47
- this . serverless . cli . log (
48
- `Invalid RecursiveLoop value in function ${ functionName } . Allowed values are 'Allow' or 'Terminate'.`
49
- ) ;
50
59
}
51
60
}
52
61
}
You can’t perform that action at this time.
0 commit comments