cdk-real-drift 0.1.0 → 0.1.2
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 +14 -0
- package/dist/cli.js +8 -0
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,11 +67,25 @@ result: 1 drift(s) (undeclared=1)
|
|
|
67
67
|
|
|
68
68
|
## Quick start
|
|
69
69
|
|
|
70
|
+
Install it in your CDK project, then the `cdkrd` bin is on your `PATH` (via
|
|
71
|
+
`npx`):
|
|
72
|
+
|
|
70
73
|
```bash
|
|
71
74
|
npm install -D cdk-real-drift # in your CDK project
|
|
72
75
|
npx cdkrd check # checks every stack your app defines
|
|
73
76
|
```
|
|
74
77
|
|
|
78
|
+
Or run it without installing:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npx cdk-real-drift check # zero-install (resolves the cdkrd bin)
|
|
82
|
+
npx -p cdk-real-drift cdkrd check # same, naming the bin explicitly
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The package is `cdk-real-drift` and its bin is `cdkrd`; a bare
|
|
86
|
+
`npx cdk-real-drift check` resolves the single bin, and `-p cdk-real-drift cdkrd`
|
|
87
|
+
names it explicitly.
|
|
88
|
+
|
|
75
89
|
`check` is the only command you run by hand, with nothing to set up first: it
|
|
76
90
|
finds drift and offers **Record**, **Revert**, and **Ignore** inline on what it
|
|
77
91
|
turns up.
|
package/dist/cli.js
CHANGED
|
@@ -604,10 +604,14 @@ function resolveApp(explicit) {
|
|
|
604
604
|
//#region src/synth/io-host.ts
|
|
605
605
|
const APP_STDOUT = "CDK_ASSEMBLY_I1001";
|
|
606
606
|
const APP_STDERR = "CDK_ASSEMBLY_E1002";
|
|
607
|
+
const VALIDATION_REPORT = "CDK_TOOLKIT_E9600";
|
|
607
608
|
/**
|
|
608
609
|
* Decide what QuietIoHost does with a message (pure, so it is unit-testable):
|
|
609
610
|
* - the CDK app's own stdout/stderr passthrough -> emit at INFO (default color, like
|
|
610
611
|
* cdk-local; never the alarming red the E1002/error tag would otherwise produce);
|
|
612
|
+
* - the construct-annotation validation report -> emit at WARN so the whole block is
|
|
613
|
+
* yellow (matching its WARNING label) instead of the misleading ERROR-level red
|
|
614
|
+
* wrap; per-severity labels still survive (see file header);
|
|
611
615
|
* - a real toolkit warning / error -> emit unchanged (still yellow / red);
|
|
612
616
|
* - everything else (toolkit info/debug/trace chatter) -> drop.
|
|
613
617
|
*/
|
|
@@ -616,6 +620,10 @@ function planIoMessage(msg) {
|
|
|
616
620
|
action: "emit",
|
|
617
621
|
level: "info"
|
|
618
622
|
};
|
|
623
|
+
if (msg.code === VALIDATION_REPORT) return {
|
|
624
|
+
action: "emit",
|
|
625
|
+
level: "warn"
|
|
626
|
+
};
|
|
619
627
|
if (msg.level === "warn" || msg.level === "error") return {
|
|
620
628
|
action: "emit",
|
|
621
629
|
level: msg.level
|