@grafana/sign-plugin

中文文档
4.0.0发布于 2026/10/22Apache-2.0ES Module构建来源已验证近 30 天下载 10.4万

Sign Grafana plugins with ease.

原始使用文档
文档目录6 节
  1. Signing a plugin
  2. Sign a public plugin
  3. Sign a private plugin
  4. Requirements and proxy configuration
  5. Breaking changes in v4
  6. Contributing

Grafana / Sign Plugin

Sign Grafana plugins with ease.

ToC

@grafana/sign-plugin works on macOS, Windows and Linux.
If something doesn’t work, please file an issue.
If you have questions or need help, please ask in GitHub Discussions.

Signing a plugin

Signing a plugin allows Grafana to verify the authenticity of the plugin with signature verification. This gives users a way to make sure plugins haven’t been tampered with. All Grafana Labs-authored plugins, including Enterprise plugins, are signed.

All plugins require a signature since Grafana 7.0.

Please refer to Signing plugins documentation to understand how to sign a Grafana plugin. The following commands are mentioned here for development purposes.

Sign a public plugin

In your plugin directory, sign the plugin with your Grafana access policy token. Grafana sign-plugin creates a MANIFEST.txt file in the dist directory of your plugin.

export GRAFANA_ACCESS_POLICY_TOKEN=<YOUR_GRAFANA_ACCESS_POLICY_TOKEN>
npx @grafana/sign-plugin@latest

If the plugin distribution directory differs from the default dist, specify the path to use with the --distDir flag.

export GRAFANA_ACCESS_POLICY_TOKEN=<YOUR_GRAFANA_ACCESS_POLICY_TOKEN>
npx @grafana/sign-plugin@latest --distDir path/to/directory

Sign a private plugin

In your plugin directory, run the following to create a MANIFEST.txt file in the dist directory of your plugin.

npx @grafana/sign-plugin@latest --rootUrls https://example.com/grafana

Alternatives:

npx

npx @grafana/sign-plugin@latest

yarn (> 2.x)

yarn dlx @grafana/sign-plugin@latest

Requirements and proxy configuration

Starting with v4, @grafana/sign-plugin requires Node.js 24.15.0 or later.

To sign through an HTTP or HTTPS proxy, set HTTPS_PROXY before running the signing command:

export HTTPS_PROXY=http://proxy.example.com:8080
export NO_PROXY=localhost,127.0.0.1

Proxy URLs must include http:// or https://. Basic proxy authentication is supported with a URL such as http://username:[email protected]:8080. Lowercase https_proxy and no_proxy take precedence over their uppercase equivalents. NO_PROXY accepts comma-separated hosts or patterns to bypass the proxy. You don't need to set NODE_USE_ENV_PROXY.

Breaking changes in v4

Starting with v4, @grafana/sign-plugin uses Node.js built-in proxy support instead of proxy-agent:

  • Node.js versions earlier than 24.15.0 are no longer supported.
  • PAC files and SOCKS proxies are no longer supported. Configure an HTTP or HTTPS proxy directly instead.
  • ALL_PROXY is no longer read. Move HTTP or HTTPS proxy URLs to HTTPS_PROXY. HTTP_PROXY alone doesn't configure HTTPS signing requests.
  • Proxy URLs without a scheme are no longer supported. Add http:// or https://.
  • Space-separated NO_PROXY entries are no longer supported. Use commas instead. Refer to the Node.js proxy documentation for matching rules.

Contributing

We are always grateful for contribution! See the CONTRIBUTING.md for more information.

版本与发布记录

@grafana/sign-plugin 共发布 167 个版本,首次发布于 2022/10/28;过去 12 个月发布了 21 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
4.0.0latest2026/10/2225 天前
3.3.32026/07/144 个月前
3.3.22026/07/094 个月前
3.3.12026/06/115 个月前
3.3.02026/05/295 个月前
3.3.0-canary.2621.25744896186.0canary2026/05/126 个月前

关于 @grafana/sign-plugin 的常见问题

@grafana/sign-plugin 是什么?

Sign Grafana plugins with ease.

如何安装 @grafana/sign-plugin?

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

@grafana/sign-plugin 支持 TypeScript 吗?

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

@grafana/sign-plugin 支持 ESM 还是 CommonJS?

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

@grafana/sign-plugin 需要什么版本的 Node.js?

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

@grafana/sign-plugin 可以商用吗?

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

@grafana/sign-plugin 的下载量有多少?

根据 npm 官方下载统计,@grafana/sign-plugin 在 2026/10/17 – 2026/11/15 这 30 天内被下载 104,154 次,日均约 3,472 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@grafana/sign-plugin 还在维护吗?

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