@embrace-io/web-cli

中文文档
2.33.0发布于 2026/11/09Apache-2.0ES Module构建来源已验证近 30 天下载 6821

Embrace Web CLI for uploading sourcemaps and versioning bundles

原始使用文档
文档目录3 节
  1. Quick Start
  2. Upload sourcemaps
  3. Setting app version

Embrace Web SDK CLI

This tool is intended to help with build-time tasks for the Embrace Web SDK.

Quick Start

npm:

npm install --save-dev @embrace-io/web-cli

yarn:

yarn add -D @embrace-io/web-cli

Upload sourcemaps

To upload sourcemaps to Embrace as part of your build process you will require the following:

  • Your Embrace App ID
  • Your Embrace Symbol Upload API token (found in your Embrace dashboard in Settings->API)
  • The path to the built JS files
npx embrace-web-cli upload -a "YOUR_EMBRACE_APP_ID" -t "YOUR_EMBRACE_UPLOAD_API_TOKEN" -p "BUILD_PATH"

[!WARNING] The CLI must be run BEFORE the files are packaged (e.g., before creating a Docker image or deployment archive). The CLI injects a comment and a short function to the end of bundle files to enable symbolication, so it needs to happen before packaging.

Setting app version

The same upload sub-command as above can be used to inject your app's version into your bundle if the value is only known at build time. If the version is known prior to build time you can provide it when initializing the SDK as described in Keeping your app version up-to-date. Execute the same command as above while also providing your app's version:

npx embrace-web-cli upload -a "YOUR_EMBRACE_APP_ID" -t "YOUR_EMBRACE_UPLOAD_API_TOKEN" -p "BUILD_PATH" --app-version "APP_VERSION"

版本与发布记录

@embrace-io/web-cli 共发布 68 个版本,首次发布于 2025/04/04;过去 12 个月发布了 30 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.33.0latest2026/11/094 天前
2.32.02026/10/3014 天前
2.31.02026/10/2123 天前
2.30.02026/10/071 个月前
2.29.12026/09/281 个月前
2.29.02026/09/151 个月前

关于 @embrace-io/web-cli 的常见问题

@embrace-io/web-cli 是什么?

Embrace Web CLI for uploading sourcemaps and versioning bundles

如何安装 @embrace-io/web-cli?

在项目目录运行 npm install @embrace-io/web-cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 embrace-web-cli,可以用 npx embrace-web-cli 直接运行。

@embrace-io/web-cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/embrace-io__web-cli 是否存在。

@embrace-io/web-cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@embrace-io/web-cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@embrace-io/web-cli 可以商用吗?

@embrace-io/web-cli 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@embrace-io/web-cli 的下载量有多少?

根据 npm 官方下载统计,@embrace-io/web-cli 在 2026/10/14 – 2026/11/12 这 30 天内被下载 6,821 次,日均约 227 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@embrace-io/web-cli 还在维护吗?

最新版本 2.33.0 发布于 2026/11/09(4 天前);至今共发布 68 个版本,其中过去 12 个月发布了 30 个;首次发布于 2025/04/04。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。