maciejtreder / serverless-apigw-binary

Serverless plugin for binary files support in AWS Gateway
MIT License
160 stars 33 forks source link

fix(stage-value): use resolved stage value when stage is NOT passed in as options #32

Closed brianhuangyl closed 7 years ago

brianhuangyl commented 7 years ago

Behavior: When stage is set as a variable like ${opt:stage, 'dev'} in serverless.yml and --stage isn't pass in as options, it would cause this issue #31

Cause: Variable references in the serverless instance are not resolved before a Plugin's constructor is called, so if you need these, make sure to wait to access those from your hooks.

(See https://serverless.com/framework/docs/providers/aws/guide/plugins#serverless-instance)

brianhuangyl commented 7 years ago

Hi @maciejtreder , it would be nice if you can also bump the version and publish to npm registery. Thank you. 👍

maciejtreder commented 7 years ago

Hello @brianhuangyl

You are definetely right :)

Thank you for this fix!

Could you verify if the latest version pushed to the NPM works as expected?

brianhuangyl commented 7 years ago

Hi @maciejtreder , I just tested the latest version, looks good 👍

maciejtreder commented 7 years ago

Great. Thank you for your effort!