function level secrets have function name as key in .serverless-secrets.json
serverless resolves variables after loading the plugins. This is causing issues when function definitions are coming from a file or secret values are using variables. This has been resolved by loading config.environments in lifecycle event "before:package:initialize".
Fixes issues reported in https://github.com/trek10inc/serverless-secrets/issues/31.
What is changed