Closed YifengZhong closed 4 years ago
Thanks for the PR. Can you provide some more information on what you're trying to accomplish here?
I've been away from the serverless ecosystem so I'm not quite sure what this.serverless.processedInput.options
is used for.
Thanks for the PR. Can you provide some more information on what you're trying to accomplish here? I've been away from the serverless ecosystem so I'm not quite sure what
this.serverless.processedInput.options
is used for.
Yes, I can. In our current project, we use sls offline start --owner $OWNER --aws_account $AWS_ACCOUNT --env $ENV ... to start local serverless server. The part --aws, --owner, --env,... are the options. When going into _executeFunction These options are save in this.serverless.processedInput.options as an object. this object is need to be extracted to options, then pass to serverless invoke local.
Would love to see this make it in. I think its fairly common to have required sls options in order to properly parse the serverless.yml file.
I'd like to see this in too. I've tested it locally on a large project with several scheduled lambdas and it all seems to be working without issue.
Sorry for not getting back to you sooner on this. This has been implemented in #40 and will be published to npm shortly. Thanks @YifengZhong for bringing this up and providing the POC
. Add options to load ${opt:some_option} if there are options. . Add null check for option --data.