@bifravst/cloudformation-helpers

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

简化 AWS CloudFormation 堆栈工作的辅助功能

中文使用文档
文档目录5 节
  1. 安装
  2. 使用量
  3. cfnResponse
  4. 节点和国家预防机制
  5. 类型脚本 6和 7

云阵帮助 npm version

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

用于简化 AWS CloudFormation 堆栈工作的辅助函数.

安装

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

使用量

cfnResponse

cfnResponse 执行自定义资源响应.

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",
  });
};

节点和国家预防机制

这个项目需要节点.js >=24.22.1 <25 || >=26.12.1 <27 页:1 >=12.0.2 <13 (通过 check-node-version 打开 npm install 财务报告和审定财务报表 npm ci) (中文(简体) ).

检查时跳过 npm publish 财务报告和审定财务报表 npm pack,因为 semantic-release 捆绑自己的npm(@semantic-release/npm 取决于 npm@^11.6.2)并使用该版本而不是该版本运行出版物 安装于 CI.

类型脚本 6和 7

此还原 并行运行类型脚本 6和 7, (中文(简体) ), 这样,斯林特工作。 。 。 .

版本与发布记录

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

版本发布日期距今
10.0.3latest2026/10/318 天前
10.0.22026/10/308 天前
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 是什么?

简化 AWS CloudFormation 堆栈工作的辅助功能

如何安装 @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 和提交记录判断。