Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
analysis-tool
Advanced tools
analyze-tool
将从package-lock.json
文件出发,通过递归分析所有位于node_modules
目录中的package.json
文件,来生成依赖关系数据,并利用 Echarts 进行可视化渲染。
npm install analyze-tool -g
安装完成后,在项目根目录的命令行窗口中运行以下命令来分析依赖项。分析结果将自动在一个网页中打开。
analyze-cli analyze
如果您想提高依赖项的下载速度,可以设置淘宝镜像源:
npm config set registry http://registry.npm.taobao.org/
您还可以使用 --depth [n]
参数来限制递归分析的深度。
analyze-cli analyze --depth [n]
要将依赖关系保存为 JSON 文件而不打开网页,请使用 --json [file-path]
参数并指定文件路径。
analyze-cli analyze --json [file-path]
如果您的 npm 支持npx,可以采用下列的命令快速上手.
npm install analyze-tool
npx analyze-tool analyze
npx analyze-tool analyze --help
│ main.ts // 入口函数, 用于处理命令接收参数
│ .eslintgrnore // eslint忽略配置文件
│ .eslintrc.json // eslint代码规范配置文件
│ .prettierr.json // 代码格式化配置文件
│ analyze.test.ts // jest测试代码文件
│ build.ts // 编译ts到dist,public文件复制到dist
│ jest.config.js // jest配置文件
│ package.json // 项目配置信息
│
├───public
│ │ index.html // 前端可视化基本文件
│ │
│ └───js
│ axios.js // 原生http封装axios
│ echarts.min.js // echarts库
│ macarons.js // Eaharts 主题
│ renderEcharts.js// 前端渲染主文件
│ renderReport.js // 分析报告文件
│
└───src
│ │ analysis.ts // 分析依赖并生成json数据
│ │ server.ts // 启动后台服务
│ │ type.ts // typescript类型限制处理
│ │
│ └───data // 临时存放生成的json数据
│
└───dist // build之后存放的文件
功能开发:
工程化:
FAQs
Analyze the dependency relationships in package-lock.json
We found that analysis-tool 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.