@bifravst/cloudformation-helpers

中文文档
10.0.3发布于 2026/10/31BSD-3-ClauseTypeScriptES Module构建来源已验证近 30 天下载 6136

Helper functions which simplify working with AWS CloudFormation stacks

原始使用文档
文档目录5 节
  1. Installation
  2. Usage
  3. cfnResponse
  4. Node & NPM
  5. TypeScript 6 and 7

CloudFormation Helpers npm version

GitHub Actions semantic-release Renovate @commitlint/config-conventional code style: prettier ESLint: TypeScript

Helper functions which simplify working with AWS CloudFormation stacks.

Installation

npm i --save-dev --save-exact @bifravst/cloudformation-helpers

Usage

cfnResponse

cfnResponse implements sending custom resource responses.

import { cfnResponse, ResponseStatus } from "@bifravst/cloudformation-helpers";
import { CloudFormationCustomResourceEvent } from "aws-lambda";

/**
 * Lambda creating a custom resource
 */
export const handler = async (
  event: CloudFormationCustomResourceEvent,
): Promise<void> => {
  // Create custom resource ...

  await cfnResponse({
    Status: ResponseStatus.SUCCESS,
    event,
    PhysicalResourceId: "MyCustomResource",
  });
};

Node & NPM

This project requires Node.js >=24.22.1 <25 || >=26.12.1 <27 and npm >=12.0.2 <13 (enforced via check-node-version on npm install and npm ci).

The check is skipped during npm publish and npm pack, because semantic-release bundles its own npm (@semantic-release/npm depends on npm@^11.6.2) and runs the publish with that version rather than the one installed in CI.

TypeScript 6 and 7

This repo runs TypeScript 6 and 7 side by side, so that eslint works.

版本与发布记录

@bifravst/cloudformation-helpers 共发布 139 个版本,首次发布于 2020/05/04;过去 12 个月发布了 4 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
10.0.3latest2026/10/318 天前
10.0.22026/10/309 天前
10.0.12026/08/172 个月前
10.0.02026/08/172 个月前
9.1.12024/07/132 年前
9.1.02024/07/132 年前

其他发布通道:export-esm → 6.0.0-export-esm.2。

关于 @bifravst/cloudformation-helpers 的常见问题

@bifravst/cloudformation-helpers 是什么?

Helper functions which simplify working with AWS CloudFormation stacks

如何安装 @bifravst/cloudformation-helpers?

在项目目录运行 npm install @bifravst/cloudformation-helpers,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@aws-sdk/client-cloudformation(>= 3 < 4)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@bifravst/cloudformation-helpers 支持 TypeScript 吗?

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

@bifravst/cloudformation-helpers 支持 ESM 还是 CommonJS?

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

@bifravst/cloudformation-helpers 需要什么版本的 Node.js?

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

@bifravst/cloudformation-helpers 可以商用吗?

@bifravst/cloudformation-helpers 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@bifravst/cloudformation-helpers 的下载量有多少?

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

@bifravst/cloudformation-helpers 还在维护吗?

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