Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@unifig/env
Advanced tools
npm i @unifig/env
# or
yarn add @unifig/env
# .env
PORT=3000
export class Settings {
@From('PORT')
@IsInt()
port: number;
}
import { Config } from '@unifig/core';
import { EnvConfigAdapter } from '@unifig/env';
async function bootstrap() {
await Config.register({
template: Settings,
adapter: new EnvConfigAdapter(),
});
console.log(Config.get(Settings).port); // output: 3000
}
bootstrap();
Environment variables are mapped to 1D dictionary.
# .env
PORT=3000
DB_HOST=localhost
DB_PORT=4588
// adapter output
{
PORT: 3000,
DB_HOST: 'localhost',
DB_PORT: 4588
}
Property | What it does | Required |
---|---|---|
envFilesPaths | Path to optional environment files to be loaded in given order. Values from them will be overwritten by process envs. | × |
ignoreEnvVars | If "true", environment variables will not be loaded. | × |
expandVariables | See https://www.npmjs.com/package/dotenv-expand. | × |
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Environmental variables adapter for unifig
The npm package @unifig/env receives a total of 0 weekly downloads. As such, @unifig/env popularity was classified as not popular.
We found that @unifig/env 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.