@contentful/node-apps-toolkit

中文文档
4.1.0发布于 2026/09/10MITTypeScriptESM + CJS近 30 天下载 25.2万

A collection of helpers and utilities for creating NodeJS Contentful Apps

原始使用文档
文档目录6 节
  1. Compatibiltiy
  2. Installation
  3. Available features
  4. Example Usage
  5. More coming soon
  6. Contributing and local development

Node Toolkit for Contentful Apps

The node-apps-toolkit is a growing collection of helpers and utilities for building Contentful Apps with Node.js.

Compatibiltiy

Requires an Node.js LTS version. Currently supported node versions:

  • v18
  • v20 Odd-numbered and not-yet LTS major versions are not supported.

Installation

npm install --save @contentful/node-apps-toolkit
# or
yarn add @contentful/node-apps-toolkit

Available features

  • :lock: Request Verification
  • :writing_hand: Request Signing
  • :bust_in_silhouette: CMA Token generation for App Identities

For more details, check out the API documentation.

Example Usage

const { getManagementToken } = require('@contentful/node-apps-toolkit');
const { appInstallationId, spaceId, environmentId, privateKey } = require('./some-constants');

getManagementToken(privateKey, { appInstallationId, spaceId, environmentId })
    .then((token) => {
      console.log('Here is your app token:', token)
    })

For more information, check out the full API documentation.

More coming soon

We're excited to expand this toolkit with new features. If you have any suggestions or requests for features you'd like to see, please create an issue in this repo.

Contributing and local development

Please see CONTRIBUTING.md for more information on how to contribute to this project.

版本与发布记录

@contentful/node-apps-toolkit 共发布 73 个版本,首次发布于 2020/10/06;过去 12 个月发布了 6 个版本。

版本发布日期距今
4.1.0latest2026/09/102 个月前
4.1.0-next.1next2026/09/102 个月前
4.0.12026/06/254 个月前
4.0.02026/05/195 个月前
3.16.12026/03/257 个月前
3.16.02026/01/299 个月前

关于 @contentful/node-apps-toolkit 的常见问题

@contentful/node-apps-toolkit 是什么?

A collection of helpers and utilities for creating NodeJS Contentful Apps

如何安装 @contentful/node-apps-toolkit?

在项目目录运行 npm install @contentful/node-apps-toolkit,或使用 pnpm add / yarn add / bun add。

@contentful/node-apps-toolkit 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@contentful/node-apps-toolkit 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@contentful/node-apps-toolkit 需要什么版本的 Node.js?

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

@contentful/node-apps-toolkit 可以商用吗?

@contentful/node-apps-toolkit 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@contentful/node-apps-toolkit 的下载量有多少?

根据 npm 官方下载统计,@contentful/node-apps-toolkit 在 2026/10/11 – 2026/11/09 这 30 天内被下载 252,322 次,日均约 8,411 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@contentful/node-apps-toolkit 还在维护吗?

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