cdk-real-drift 0.3.0 → 0.3.1
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 +13 -2
- package/dist/cli.js +9 -8
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -343,6 +343,14 @@ CI (with `--yes`).
|
|
|
343
343
|
|
|
344
344
|
### Options
|
|
345
345
|
|
|
346
|
+
<!-- Editor note: this table is hand-aligned to a fixed column width. The
|
|
347
|
+
alignment is COSMETIC only — GitHub renders the table regardless — but a
|
|
348
|
+
cell that overflows the width silently skews the `|` columns in the source.
|
|
349
|
+
When editing a row, re-pad the `option` and `meaning` cells (and the
|
|
350
|
+
separator row) to match, or accept that alignment is inconsequential and
|
|
351
|
+
leave cells natural-width. Don't chase pixel alignment at the cost of a
|
|
352
|
+
readable diff. -->
|
|
353
|
+
|
|
346
354
|
| option | meaning |
|
|
347
355
|
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
348
356
|
| `--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 `--profile`'s region |
|
|
@@ -480,8 +488,11 @@ ignore:
|
|
|
480
488
|
segment, bounded by `.`, `/`, and `[` (`*.DesiredCount` matches
|
|
481
489
|
`<anyId>.DesiredCount`, not a deeper `Tbl.Config.DesiredCount`; `MyApi/*`
|
|
482
490
|
matches a direct construct-path child but not a grandchild
|
|
483
|
-
`MyApi/Resource/Method`) —
|
|
484
|
-
|
|
491
|
+
`MyApi/Resource/Method`) — but an explicit parent `path` (e.g. `MyApi/Resource`)
|
|
492
|
+
still covers its whole `/`-subtree (`MyApi/Resource/Method.Prop`) via the
|
|
493
|
+
ancestor walk, symmetric with the `.` case, so the segment bound does not
|
|
494
|
+
under-match. A leaf-pinned wildcard like `MyApi/*.Prop` still does NOT cross
|
|
495
|
+
segments (it only matches a direct child's `.Prop`). Inside a `[...]`
|
|
485
496
|
bracket key a `*` /
|
|
486
497
|
`?` is **unbounded within that bracket** (the brackets delimit the key, so a `.`
|
|
487
498
|
between them is data): `Alb.LoadBalancerAttributes[*]` and
|
package/dist/cli.js
CHANGED
|
@@ -457,8 +457,8 @@ function matchesGlob(pattern, name) {
|
|
|
457
457
|
* construct paths (`MyApi/Resource/Method`), so `MyApi/*` means "a direct child of
|
|
458
458
|
* MyApi" — bounding `*` at `/` keeps it from leaking to arbitrarily deep descendants
|
|
459
459
|
* (`MyApi/Resource/Method`). Deep-subtree coverage of a `/`-parent rule is still
|
|
460
|
-
* handled by the ancestor walk in `pathMatches` (which trims at
|
|
461
|
-
*
|
|
460
|
+
* handled by the ancestor walk in `pathMatches` (which trims at `.`, `[`, OR `/`, so a
|
|
461
|
+
* `/`-parent rule's whole subtree is covered — symmetric with `.`). Inside a `[...]` bracket a `/`
|
|
462
462
|
* is DATA, not a boundary — the brackets already delimit the key — so it stays literal
|
|
463
463
|
* there, exactly like `.`.
|
|
464
464
|
*
|
|
@@ -736,17 +736,18 @@ function parseIgnoreRule(entry) {
|
|
|
736
736
|
};
|
|
737
737
|
}
|
|
738
738
|
/**
|
|
739
|
-
* True when `pattern` matches `target` (= "<logicalId>.<path>"
|
|
740
|
-
* as a PARENT path: a rule "X.Policies" also ignores child paths
|
|
741
|
-
* "X.Policies.0.PolicyName" AND "X.Policies[MyPol].PolicyName" (so ignoring a
|
|
742
|
-
* structured property covers its leaves, including array / identity-keyed elements)
|
|
743
|
-
*
|
|
739
|
+
* True when `pattern` matches `target` (= "<logicalId>.<path>" / a `/`-joined construct
|
|
740
|
+
* path), either exactly or as a PARENT path: a rule "X.Policies" also ignores child paths
|
|
741
|
+
* like "X.Policies.0.PolicyName" AND "X.Policies[MyPol].PolicyName" (so ignoring a
|
|
742
|
+
* structured property covers its leaves, including array / identity-keyed elements), and a
|
|
743
|
+
* rule "MyApi/Res" covers its whole construct-path subtree "MyApi/Res/Method.Prop".
|
|
744
|
+
* Parent matching walks ancestors at each `.`, `[`, OR `/` boundary, combined with the glob.
|
|
744
745
|
*/
|
|
745
746
|
function pathMatches(pattern, target) {
|
|
746
747
|
if (matchesPathGlob(pattern, target)) return true;
|
|
747
748
|
let t = target;
|
|
748
749
|
while (true) {
|
|
749
|
-
const cut = Math.max(t.lastIndexOf("."), t.lastIndexOf("["));
|
|
750
|
+
const cut = Math.max(t.lastIndexOf("."), t.lastIndexOf("["), t.lastIndexOf("/"));
|
|
750
751
|
if (cut <= 0) break;
|
|
751
752
|
t = t.slice(0, cut);
|
|
752
753
|
if (matchesPathGlob(pattern, t)) return true;
|