cdk-insights 1.8.1 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/constants/config.d.ts +6 -2
- package/dist/entry.js +90 -90
- package/dist/index.js +44 -44
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,8 +19,9 @@ CDK Insights is **purpose-built for CDK** — it synthesizes your stacks and ana
|
|
|
19
19
|
|
|
20
20
|
**Key differences:**
|
|
21
21
|
- **Local-first** — static analysis runs entirely on your machine, no code uploaded
|
|
22
|
-
- **
|
|
23
|
-
- **Free forever** — static analysis with 100+ rules, JSON/Table/Markdown output
|
|
22
|
+
- **No account needed for static scans** — install via npm and run immediately
|
|
23
|
+
- **Free forever** — unlimited static analysis with 100+ rules, JSON/Table/Markdown output
|
|
24
|
+
- **AI insights optional** — sign up for a free account to get 500 AI-powered insights per month
|
|
24
25
|
- **CDK-native** — understands constructs and patterns, not just CloudFormation
|
|
25
26
|
- **CI/CD ready** — GitHub Action with PR comments and merge blocking
|
|
26
27
|
|
|
@@ -171,7 +172,13 @@ Aspects.of(app).add(createCdkInsightsAspect());
|
|
|
171
172
|
app.synth();
|
|
172
173
|
```
|
|
173
174
|
|
|
174
|
-
|
|
175
|
+
For accurate `file:line` source attribution, CDK needs to record per-construct stack traces during synth. Three ways to enable this, easiest first:
|
|
176
|
+
|
|
177
|
+
- **`npx cdk-insights setup`** writes `"@aws-cdk/core:stackTrace": true` into your `cdk.json` `context` block — durable across every `cdk synth` invocation, no env-var dance. Recommended.
|
|
178
|
+
- **`cdk synth --context @aws-cdk/core:stackTrace=true`** — one-off, scoped to that command.
|
|
179
|
+
- **`CDK_DEBUG=true cdk synth`** — one-off, env-var form.
|
|
180
|
+
|
|
181
|
+
`cdk-insights scan` already sets `CDK_DEBUG=true` on its spawned synth process, so users on the CLI path get high-confidence attribution out of the box. The above is for users who run `cdk synth` themselves with the aspect attached. On `aws-cdk-lib` ≥ 2.252.0, findings on deferred or post-construction property assignments (lifecycle rules, env vars, role policies, `Lazy.string`/`Lazy.any` values) point at the property setter line — not the construct constructor — automatically. Older CDKs continue to work; you'll just get construct-level attribution.
|
|
175
182
|
|
|
176
183
|
#### Validations plugin — for synth-time enforcement
|
|
177
184
|
|
|
@@ -39,8 +39,12 @@ export declare const QUOTA_THRESHOLDS: {
|
|
|
39
39
|
readonly WARNING_PERCENTAGE: 0.8;
|
|
40
40
|
/** Hard stop threshold percentage */
|
|
41
41
|
readonly HARD_STOP_PERCENTAGE: 0.9;
|
|
42
|
-
/** Default
|
|
43
|
-
readonly
|
|
42
|
+
/** Default monthly AI insight allowance for free / unlicensed users */
|
|
43
|
+
readonly DEFAULT_FREE_AI_INSIGHTS: 500;
|
|
44
|
+
/** Default monthly AI insight allowance for Pro */
|
|
45
|
+
readonly DEFAULT_PRO_AI_INSIGHTS: 5000;
|
|
46
|
+
/** Default monthly AI insight allowance per Team seat */
|
|
47
|
+
readonly DEFAULT_TEAM_AI_INSIGHTS_PER_SEAT: 10000;
|
|
44
48
|
};
|
|
45
49
|
export declare const UI_CONFIG: {
|
|
46
50
|
/** Progress bar width in characters */
|