Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
A library for generating dotenv files
The library dotenv
is a simple, convenient mechanism to add configuration to your node application. With simplicity, however, comes drawbacks. Dotenvi (pronounced "dotenvee") attempts to address those drawbacks.
Dotenvi defines all configuration at the root of your package in a yaml file called env.yml
.
Use dotenvi to generate a .env file that plays nicely with dotenv without having to hack on top of dotenv to get it to support your needs.
yarn add --dev dotenvi
Define your configuration in a yaml file at the root of your application:
default_env: &default_env
SERVICE_URL: ${cft:my-stack.ServiceURL} ## Reference to an AWS CFT stack output
SOME_ENV_VARIABLE: ${env:SOME_ENV_VARIABLE} ## Reference to an external environment variable
SOME_CONSTANT: SOME_CONSTANT
development:
<<: *default_env
staging:
<<: *default_env
production:
SOME_CONSTANT: OVERRIDE_FOR_PRODUCTION
<<: *default_env
Then, run yarn dotenvi -s <stage>
to generate a .env
file for the stage desired (e.g., development, staging, production, etc...). Use the generated .env
file in your normal processes using dotenv.
Note that stages are not required in your yaml file - you can also define it without stages, in which case you should not specify a stage with the -s
option when you run dotenvi
.
The main design goals of dotenvi are as follows:
I don't prescribe to the 12-factor application strategy that dotenv is based around, so please understand that this library may not completely follow that strategy.
The reference syntax used in env.yml
is inspired by serverless.
cft
and env
).dotenvi
to replace dotenv
, if desired, by skipping the .env
-generation step.foo-${env:BAR}
--> foo-bar
if BAR=bar)${env:${env:FOO}}
)FAQs
A library for generating dotenv files
We found that dotenvi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.