serverless-step-functions-offline icon indicating copy to clipboard operation
serverless-step-functions-offline copied to clipboard

[BUG] variables, functions, etc are not available if splitted into files

Open AhmedNourJamalElDin opened this issue 4 years ago • 0 comments

Hi, When I split the code into multiple files, this plugin cant recognize them.

How to re-produce: just take the stepFunctionsOffline to its own file, and reference them in serverless.yml like this:

stepFunctionsOffline: ${file(step-functions-offline.yml)}

How to fix: don't use the contructor to get data as you do in this code:

this.functions = this.serverless.service.functions;
this.variables = this.serverless.service.custom.stepFunctionsOffline;

in this line.

AhmedNourJamalElDin avatar Oct 23 '19 18:10 AhmedNourJamalElDin