Releases: arabold/serverless-export-env
Releases · arabold/serverless-export-env
v2.2.0
v2.1.0
v2.0.0
- Complete rewrite of the variable resolver. We use the amazing cfn-resolver-lib lib now. This allows us to support not only
Ref
andFn::ImportValue
as in previous releases, but we're able to resolve the most commonly used intrinsic functions automatically now. - Customize the resolution of
Ref
,Fn::GetAtt
andFn::ImportValue
using configuration options. - Added
--all
command line parameter to merge the environment variables of all functions into a single.env
file. Please note that the behavior is undefined if functions use conflicting values for the same environment variable name.
v2.0.0-alpha.1
2.0.0-alpha.1
v2.0.0-alpha.0
Complete rewrite of the variable resolver. We use the amazing cfn-resolver-lib lib now. This allows us to support not only Ref
and Fn::ImportValue
as in previous releases, but we're able to resolve the most commonly used intrinsic functions automatically now.
Migrating from 1.x to 2.x
- Running
sls invoke local
orsls offline start
will no longer create or update your.env
file. If you want to create an.env
file, simply runsls export-env
instead. - By default the plugin will no longer overwrite any existing
.env
file. To enable overwriting existing files either specific--overwrite
in the command line or set thecustom.export-env.overwrite
configuration option. - Resource
Outputs
values (resources.Resources.Outputs.*
) are no longer exported automatically. This has always been a workaround and causes more problems than it actually solved. The plugin will try its best to resolveFn::GetAtt
and other references for you now, so there should be little need for the old behavior anymore. Add the desired value new environment variable toprovider.environment
instead. - Running
sls export-env
will no longer merge the environment variables of all functions into a single.env
file. Instead pass the name of the desired function as--function
argument to the command line. If no function is specified, only global environment variables will be exported. - The configuration options
filename
andpathFromRoot
have been merged tofilename
now. You can specify relative paths infilename
now such as./dist/.env
. Make sure the target folder exists!
v1.4.4
- Reverted changes in 1.4.1. Unfortunately we broke the semver contract by introducing a breaking feature in a patch update. This feature needs to be rethought and added back in a 1.5.x release as optional. Until then, I had to remove it again.
- Fixed some compatibility issues with the latest Serverless framework release. Thanks to pgrzesik for the necessary updates.
v1.4.1
- Disabled calls to the real aws infrastructure when running with Serverless Offline. Thanks to marooned071 for the contribution.
v1.4.0
- Collect and set resource values from actual Cloud Formation stack output. Thanks to andersquist for his contribution!