npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@antares-core/devtools

v2.5.3

Published

L4 工具链:CLI(lint:gatebind / bench / openapi)+ 测试工具集。devDependency,产物剥离

Readme

@antares-core/devtools

L4 开发工具链:altair CLI——契约埋点扫描、并发压测基线、OpenAPI 生成、SBOM、灾备演练、CRUD 脚手架、可视化面板等开发期命令。

仅用于开发 / CI 环境,作为 devDependency 安装,生产构建产物自动剥离。

安装

npm install -D @antares-core/devtools
# 或全局安装直接使用 altair 命令
npm install -g @antares-core/devtools

命令总览

altair --help   # 查看全部命令与选项

契约埋点扫描(lint:gatebind)

扫描 Controller 中缺少 @GateBind() 契约注解的接口,防止漏埋点上线:

altair lint:gatebind --dir=src --strict
# --strict:存在遗漏时非零码退出,推荐接入 CI
# --dir:扫描目录,可重复指定,默认 src

并发压测(bench)

# 单点压测:200 并发持续 60 秒
altair bench --url=http://localhost:3000/user/public --concurrency=200 --duration=60000

# 并发梯度矩阵:输出基线表并写入 bench-baseline.json
altair bench --url=http://localhost:3000/user/public --matrix --levels=1,10,50,100,200

矩阵模式输出示例(单进程,完整中间件链):

  压测基线表(单进程,文档 13.2)
  ┌────────┬────────┬─────────┬─────────┬────────┐
  │ 并发数 │ QPS    │ P50(ms) │ P99(ms) │ 失败率 │
  ├────────┼────────┼─────────┼─────────┼────────┤
  │ 1      │ 2806   │ 0.3     │ 1.8     │ 0.00%  │
  │ 10     │ 7090   │ 1       │ 5.1     │ 0.00%  │
  │ 100    │ 7295   │ 12.9    │ 26.4    │ 0.00%  │
  │ 200    │ 6109   │ 27.8    │ 145.1   │ 0.00%  │
  └────────┴────────┴─────────┴─────────┴────────┘
  容量换算:总 QPS = 单进程 QPS × 副本数 × 0.85

其他命令

| 命令 | 说明 | |---|---| | openapi --dir=src --out=openapi.json | 扫描 Controller 生成 OpenAPI 文档 | | sbom --dir=. --out=sbom.json | 生成 CycloneDX 软件物料清单(SBOM) | | gen:crud --name=Product --columns=title:string,price:number | CRUD 模块脚手架 | | gen:deploy --app=myapp --port=3000 --replicas=2 | 生成 Dockerfile / K8s 部署清单 | | build --entry=dist/main.js | 单文件打包(含完整性校验) | | bundle --entry=dist/main.js --out=bundle.js | bundle 构建 | | migrate:build / migrate:show | 数据库迁移构建与查看 | | backup --kind=pg --target=<conn> | 数据库 / 文件备份 | | backup:rpo --rpo=1440 | RPO(恢复点目标)校验 | | drill --kind=pg --backup=xx.dump --target=<conn> | 灾备恢复演练(RTO 计时) | | api:report --pkg=packages/core | 包 API 面积报告 | | gui --port=4200 | 可视化面板(Web 版) |

CI 接入示例

# GitHub Actions
- name: 契约埋点扫描
  run: npx altair lint:gatebind --dir=src --strict
- name: 生成 SBOM
  run: npx altair sbom --out=sbom.json

相关包

License

MIT — 详见本包根目录的 LICENSE 文件。