
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
Usage:
prenv --dir . --name developer commands
参数解释
- directory: 环境变量所在目录 例如: . ./ ./src
- name: 环境变量名称 例如: developer test production
- commands: 启动命令 例如: node your-app.js
{
"scripts": {
"test": "prenv --dir . --name developer vitest",
"build": "prenv --dir . --name developer vite build",
"start": "prenv --dir . --name developer node your-app.js"
}
}
效果是从当前目录下(也可以是 ./src 或者其他目录)的 .env .env.developer .env.developer.local 文件中读取环境变量,然后执行 node your-app.js
Usage:
prenv-type --dir . --output ./types
参数解释
- dir: 环境变量所在目录 例如: . ./ ./src
- output: 输出目录 例如: . ./ ./types
{
"scripts": {
"test": "prenv-type --dir . --output ./types"
}
}
效果是从当前目录下(也可以是 ./src 或者其他目录)的 .env .env.developer .env.developer.local 文件中读取环境变量,然后生成 env.d.ts 文件到 ./types 目录下
FAQs
在启动前设置具名环境变量 & 生成环境变量类型到 .d.ts
The npm package prenv receives a total of 8 weekly downloads. As such, prenv popularity was classified as not popular.
We found that prenv 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.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.