Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
angular-cli-env
Advanced tools
Angular CLI Env Addon
Inspired by Twelve-Factor App
This addon can generate a constant file from env.json
so that your environment variable is scalable. For now it only supports generating TypeScript constant exporting file.
This addon has the following prerequisites:
Run this inside your Angular CLI project:
npm install --save-dev angular-cli-env
First, you need to initialize things needed for env generation by running:
ng env:init
It'll generate 2 files:
You only need to this once.
Next, you can generate the constant file by running:
ng env
It'll generate the constant file at src/app/shared/env.ts
, and this file can be git-ignored as you like.
By default, it will generate a constant file with static type AppEnv
. If you prefer to not use type at all, you can add --typeless
flag when generating.
You can also custom the path and name using --path
and --name
flags.
When changing path, you need to adjust your app interface's path accordingly
FAQs
Scalable environment variable for Angular CLI projects
We found that angular-cli-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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.