@aws-prototyping-sdk/pdk-nag

中文文档
0.19.68发布于 2023/08/25Apache-2.0TypeScriptCommonJS零依赖近 30 天下载 2455

PDKNag ships with a helper utility that automatically configures CDKNag within your application.

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

原始使用文档

PDK Nag

PDKNag ships with a helper utility that automatically configures CDKNag within your application.

const app = PDKNag.app();
const stack = new Stack(app, 'MyStack');
...

As shown above, this will configure your application to have CDKNag run on synthesis.

By default, CDK will trigger a failure on synth if any errors are encountered. To relax these, run the following:

cdk synth --ignore-errors

Conversely, CDK will not fail on synth if warnings are detected. To enforce that all warnings are resolved, run the following command:

cdk synth --strict

Instrumenting custom NagPacks

By default, when creating a PDKNag application the AwsSolutions NagPack is instrumented. In order to specify custom NagPacks to instrument, you can configure the PDKApp as follows:

import { PDKNag, AwsPrototypingChecks } from "@aws-prototyping-sdk/pdk-nag";

const app = PDKNag.app({
    nagPacks: [new AwsPrototypingChecks()]
});

In this example, the AwsPrototypingChecks NagPack has been configured to run instead of the default. Multiple NagPacks can also be instrumented by adding NagPack instances to the nagPacks array;

版本与发布记录

@aws-prototyping-sdk/pdk-nag 共发布 216 个版本,首次发布于 2022/07/13;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.19.68latest2023/08/253 年前
0.19.672023/08/213 年前
0.19.662023/08/153 年前
0.19.652023/08/143 年前
0.19.642023/08/143 年前
0.19.632023/08/143 年前

关于 @aws-prototyping-sdk/pdk-nag 的常见问题

@aws-prototyping-sdk/pdk-nag 是什么?

PDKNag ships with a helper utility that automatically configures CDKNag within your application.注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @aws-prototyping-sdk/pdk-nag?

在项目目录运行 npm install @aws-prototyping-sdk/pdk-nag,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:cdk-nag(^2.27.24)、constructs(^10.2.39)、aws-cdk-lib(^2.81.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@aws-prototyping-sdk/pdk-nag 支持 TypeScript 吗?

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

@aws-prototyping-sdk/pdk-nag 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aws-prototyping-sdk/pdk-nag 可以商用吗?

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

@aws-prototyping-sdk/pdk-nag 的下载量有多少?

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

@aws-prototyping-sdk/pdk-nag 还在维护吗?

最新版本 0.19.68 发布于 2023/08/25(3 年前);至今共发布 216 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/07/13。作者已将其标记为弃用,新项目建议寻找替代方案。