cdk-real-drift 0.4.24 → 0.4.25

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 CHANGED
@@ -368,28 +368,31 @@ CI (with `--yes`).
368
368
  leave cells natural-width. Don't chase pixel alignment at the cost of a
369
369
  readable diff. -->
370
370
 
371
- | option | meaning |
372
- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
373
- | `--region <r>` | a stack's own `env.region` ALWAYS wins; for an env-AGNOSTIC stack (no `env`) it falls back to `--region` (or `$AWS_REGION` / `$AWS_DEFAULT_REGION`), else the AWS-CLI/cdk region chain — the active profile's region, then the `[default]` profile's region, then EC2 IMDS |
374
- | `--profile <p>` | AWS profile (else `$AWS_PROFILE`, else `$AWS_DEFAULT_PROFILE` — same order `aws` and `cdk` use) |
375
- | `-a, --app <cmd\|cdk.out>` | CDK app command or pre-synthesized assembly dir (or `$CDKRD_APP` / cdk.json `"app"`); stack auto-discovery + construct paths |
376
- | `-c, --context key=value` | context for synth (repeatable; cdk.json is the base layer) |
377
- | `--all` | target every stack the app defines (the default when no `<stack>` is named; overrides any positional names) |
378
- | `--json` | machine-readable output (see [JSON contract](#json-output-contract)) |
379
- | `--fail` | (check) exit 1 on drift and never prompt; for scripts/CI. Without it, check reports drift but exits 0 |
380
- | `--strict` | (check) exit 1 when coverage is incomplete. A coverage gap is always surfaced loudly; `--strict` makes it CI-failing. Orthogonal to `--fail` |
381
- | `--show-all` | (check) inventory mode: show all current undeclared state, ignoring the baseline |
382
- | `--verbose` / `-v` | (check) expand the `info:` footer tiers / (revert) expand the not-revertable summary to full lists; (record) itemizes nested sub-keys in the multiselect |
383
- | `--pre-deploy` | (check) compare live vs the LOCAL synth template: the declared drift your next `cdk deploy` would silently overwrite |
384
- | `--undeclared-only` | (check) undeclared drift only: pair cdkrd with `cdk drift` for the declared side |
385
- | `--declared-only` | (check) declared drift vs the deployed template only (undeclared tier skipped; baseline untouched). Not `--pre-deploy` |
386
- | `--dry-run` | (revert) print the plan; make no changes |
387
- | `--wait[=DURATION]` | (revert) on a transient "resource is mid-update" error (e.g. Route53Resolver `RSLVR-00705`) keep retrying until it settles, up to DURATION (default `10m`; e.g. `--wait=5m`, `--wait=90s`) |
388
- | `--remove-unrecorded` | (revert, and check for its inline revert) REMOVE unrecorded values + DELETE unrecorded added resources in a no-prompt run (`--yes`/CI); an interactive revert already lists them |
389
- | `--yes` / `-y` | skip confirmations (revert apply; record records all without the multiselect) |
371
+ | option | meaning |
372
+ | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
373
+ | `--region <r>` | a stack's own `env.region` ALWAYS wins; for an env-AGNOSTIC stack (no `env`) it falls back to `--region` (or `$AWS_REGION` / `$AWS_DEFAULT_REGION`), else the AWS-CLI/cdk region chain — the active profile's region, then the `[default]` profile's region, then EC2 IMDS |
374
+ | `--profile <p>` | AWS profile (else `$AWS_PROFILE`, else `$AWS_DEFAULT_PROFILE` — same order `aws` and `cdk` use) |
375
+ | `-a, --app <cmd\|cdk.out>` | CDK app command or pre-synthesized assembly dir (or `$CDKRD_APP` / cdk.json `"app"`); stack auto-discovery + construct paths |
376
+ | `-c, --context key=value` | context for synth (repeatable; cdk.json is the base layer) |
377
+ | `--all` | target every stack the app defines (the default when no `<stack>` is named; overrides any positional names) |
378
+ | `--json` | machine-readable output (see [JSON contract](#json-output-contract)) |
379
+ | `--fail` | (check) exit 1 on drift and never prompt; for scripts/CI. Without it, check reports drift but exits 0 |
380
+ | `--strict` | (check) exit 1 when coverage is incomplete. A coverage gap is always surfaced loudly; `--strict` makes it CI-failing. Orthogonal to `--fail` |
381
+ | `--show-all` | (check) inventory mode: show all current undeclared state, ignoring the baseline |
382
+ | `--verbose` / `-v` | (check) expand the `info:` footer tiers / (revert) expand the not-revertable summary to full lists; (record) itemizes nested sub-keys in the multiselect. `-v` means `--verbose` **inside a verb** (`check -v`); a bare `cdkrd -v` (no verb) prints the version |
383
+ | `--pre-deploy` | (check) compare live vs the LOCAL synth template: the declared drift your next `cdk deploy` would silently overwrite |
384
+ | `--undeclared-only` | (check) undeclared drift only: pair cdkrd with `cdk drift` for the declared side |
385
+ | `--declared-only` | (check) declared drift vs the deployed template only (undeclared tier skipped; baseline untouched). Not `--pre-deploy` |
386
+ | `--dry-run` | (revert) print the plan; make no changes |
387
+ | `--wait[=DURATION]` | (revert) on a transient "resource is mid-update" error (e.g. Route53Resolver `RSLVR-00705`) keep retrying until it settles, up to DURATION (default `10m`; e.g. `--wait=5m`, `--wait=90s`). The DURATION is **inline-only** (`--wait=5m`); a separate `--wait 5m` is not read |
388
+ | `--remove-unrecorded` | (revert, and check for its inline revert) REMOVE unrecorded values + DELETE unrecorded added resources in a no-prompt run (`--yes`/CI); an interactive revert already lists them |
389
+ | `--yes` / `-y` | skip confirmations (revert apply; record records all without the multiselect) |
390
390
 
391
391
  Unknown options (`--apq`) and options missing their value (`--app` at the end of
392
392
  the line) are errors (exit `2`): a typo'd flag never silently becomes a stack name.
393
+ The three `check` scope flags — `--pre-deploy`, `--undeclared-only`, and
394
+ `--declared-only` — are **mutually exclusive**; passing two of them is an exit-`2`
395
+ error (they select which comparison runs, so a combination is contradictory).
393
396
 
394
397
  ### Interactive prompts (TTY only, CI is never prompted)
395
398
 
package/dist/cli.js CHANGED
@@ -3853,7 +3853,8 @@ function restrictYaml11Tags(baseTags) {
3853
3853
  }
3854
3854
  const CFN_YAML_PARSE_OPTIONS = {
3855
3855
  schema: "yaml-1.1",
3856
- customTags: restrictYaml11Tags
3856
+ customTags: restrictYaml11Tags,
3857
+ uniqueKeys: false
3857
3858
  };
3858
3859
  function detectTemplateFormat(text) {
3859
3860
  const trimmed = (text.charCodeAt(0) === 65279 ? text.slice(1) : text).trimStart();
@@ -15447,28 +15448,34 @@ OPTIONS
15447
15448
  resource skipped (unread) or a nested stack not
15448
15449
  recursed into. A loud coverage warning always prints;
15449
15450
  --strict makes it CI-failing. Orthogonal to --fail
15450
- --show-all inventory mode: show ALL current undeclared state
15451
- (not just changes since record)
15451
+ --show-all (check) inventory mode: show ALL current undeclared
15452
+ state (not just changes since record)
15452
15453
  --verbose (check) expand informational tiers / (revert) the
15453
- NOT-revertable summary to full per-finding lists
15454
+ NOT-revertable summary to full per-finding lists /
15455
+ (record) itemize nested sub-keys in the multiselect
15454
15456
  --pre-deploy (check) compare live state vs the LOCAL synth template
15455
15457
  — the declared drift your next deploy would overwrite
15456
15458
  --undeclared-only (check) undeclared drift only — pair cdkrd with
15457
15459
  \`cdk drift\` / CFn drift detection for the declared side
15458
15460
  --declared-only (check) declared drift vs the DEPLOYED template only
15459
15461
  (undeclared tier skipped; baseline untouched)
15462
+ (--pre-deploy / --undeclared-only / --declared-only are
15463
+ MUTUALLY EXCLUSIVE — passing two is an exit-2 error)
15460
15464
  --dry-run (revert) print the plan; make no changes
15461
15465
  --wait[=DURATION] (revert) on a transient "resource is mid-update" error
15462
15466
  (e.g. RSLVR-00705) keep retrying until it settles, up to
15463
- DURATION (default 10m; e.g. --wait=5m, --wait=90s)
15464
- --remove-unrecorded (revert) REMOVE unrecorded values + DELETE unrecorded
15465
- added resources (never recorded; default: refuse —
15466
- record the ones that are right)
15467
+ DURATION (default 10m; e.g. --wait=5m, --wait=90s). The
15468
+ DURATION is INLINE-only (--wait=5m); a separate --wait 5m
15469
+ is NOT read (5m would be taken as a stack name)
15470
+ --remove-unrecorded (revert, and check for its inline revert) REMOVE unrecorded
15471
+ values + DELETE unrecorded added resources (never recorded;
15472
+ default: refuse — record the ones that are right)
15467
15473
  --yes, -y skip the write confirm AND the op multiselect — apply the
15468
15474
  FULL plan (revert) / skip the selection multiselect +
15469
15475
  overwrite notice, record ALL (record) / ignore ALL shown
15470
15476
  drift without the multiselect (ignore)
15471
- --help, -h --version, -v
15477
+ --help, -h --version, -v (bare \`cdkrd -v\` prints the version; inside a verb,
15478
+ \`-v\` is the short alias for --verbose, e.g. check -v)
15472
15479
 
15473
15480
  Automation: check --fail / record --yes / ignore --yes / revert --yes (or
15474
15481
  --dry-run); non-TTY runs never prompt.