cdk-real-drift 0.2.2 → 0.2.4
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/dist/cli.js +30 -6
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1587,8 +1587,17 @@ const KNOWN_DEFAULTS = {
|
|
|
1587
1587
|
Event: "END_ENTITY_CERTIFICATE_EXPIRY",
|
|
1588
1588
|
Threshold: 45
|
|
1589
1589
|
}] },
|
|
1590
|
-
"AWS::Location::Tracker": {
|
|
1590
|
+
"AWS::Location::Tracker": {
|
|
1591
|
+
PricingPlan: "RequestBasedUsage",
|
|
1592
|
+
PositionFiltering: "TimeBased"
|
|
1593
|
+
},
|
|
1591
1594
|
"AWS::Location::GeofenceCollection": { PricingPlan: "RequestBasedUsage" },
|
|
1595
|
+
"AWS::Location::PlaceIndex": {
|
|
1596
|
+
PricingPlan: "RequestBasedUsage",
|
|
1597
|
+
DataSourceConfiguration: { IntendedUse: "SingleUse" }
|
|
1598
|
+
},
|
|
1599
|
+
"AWS::Location::Map": { PricingPlan: "RequestBasedUsage" },
|
|
1600
|
+
"AWS::Location::RouteCalculator": { PricingPlan: "RequestBasedUsage" },
|
|
1592
1601
|
"AWS::MediaTailor::PlaybackConfiguration": {
|
|
1593
1602
|
InsertionMode: "STITCHED_ONLY",
|
|
1594
1603
|
AdConditioningConfiguration: { StreamingMediaFileConditioning: "TRANSCODE" },
|
|
@@ -3729,6 +3738,16 @@ function normalizeLiveModel(liveRaw, schema, opts = {}) {
|
|
|
3729
3738
|
if (opts.resourceType) sortUnorderedSetProps(live, opts.resourceType, (schema.unorderedObjectArrayPaths ?? []).filter((p) => !p.includes(".")));
|
|
3730
3739
|
return live;
|
|
3731
3740
|
}
|
|
3741
|
+
function remapSortedIndexToDeclared(path, arrayKey, sortedDeclared, rawDeclared) {
|
|
3742
|
+
const prefix = `${arrayKey}.`;
|
|
3743
|
+
if (!path.startsWith(prefix)) return path;
|
|
3744
|
+
const m = /^(\d+)(\..*|)$/.exec(path.slice(prefix.length));
|
|
3745
|
+
if (!m) return path;
|
|
3746
|
+
const el = sortedDeclared[Number(m[1])];
|
|
3747
|
+
if (el === void 0) return path;
|
|
3748
|
+
const rawIdx = rawDeclared.findIndex((e) => deepEqual(e, el));
|
|
3749
|
+
return rawIdx < 0 ? path : `${arrayKey}.${rawIdx}${m[2]}`;
|
|
3750
|
+
}
|
|
3732
3751
|
function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
3733
3752
|
const { logicalId, resourceType, physicalId, declared: declaredIn } = resource;
|
|
3734
3753
|
const findings = [];
|
|
@@ -4072,6 +4091,13 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
4072
4091
|
if (INTELLIGENT_TIERING_PATHS[resourceType]?.has(d.path) && isIntelligentTieringMatch(d.stateValue, d.awsValue)) continue;
|
|
4073
4092
|
if ((UNORDERED_ARRAY_PROPS[resourceType]?.has(d.path) || UNORDERED_ARRAY_PROPS[resourceType]?.has(d.path.replace(/\.\d+(?=\.|$)/g, ".*")) || schema.unorderedScalarPaths?.includes(d.path)) && isEqualUnorderedScalarSet(d.stateValue, d.awsValue)) continue;
|
|
4074
4093
|
if (isTrivialEmpty(d.stateValue) && d.path in knownDef && deepEqual(d.awsValue, knownDef[d.path])) continue;
|
|
4094
|
+
const unorderedExtra = unorderedObjArray && Array.isArray(declaredVal) && Array.isArray(v) ? {
|
|
4095
|
+
path: remapSortedIndexToDeclared(d.path, k, declaredVal, v),
|
|
4096
|
+
wholeArrayRevert: {
|
|
4097
|
+
path: k,
|
|
4098
|
+
value: v
|
|
4099
|
+
}
|
|
4100
|
+
} : {};
|
|
4075
4101
|
findings.push({
|
|
4076
4102
|
tier: "declared",
|
|
4077
4103
|
logicalId,
|
|
@@ -4079,10 +4105,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
4079
4105
|
path: d.path,
|
|
4080
4106
|
desired: d.stateValue,
|
|
4081
4107
|
actual: d.awsValue,
|
|
4082
|
-
...
|
|
4083
|
-
path: k,
|
|
4084
|
-
value: v
|
|
4085
|
-
} } : {}
|
|
4108
|
+
...unorderedExtra
|
|
4086
4109
|
});
|
|
4087
4110
|
}
|
|
4088
4111
|
}
|
|
@@ -10031,7 +10054,8 @@ const REVERT_SET_DEFAULT_PATHS = new Set([
|
|
|
10031
10054
|
"AWS::Cognito::IdentityPool\0AllowClassicFlow",
|
|
10032
10055
|
"AWS::Transfer::Server\0SecurityPolicyName",
|
|
10033
10056
|
"AWS::AppRunner::Service\0HealthCheckConfiguration",
|
|
10034
|
-
"AWS::AppRunner::Service\0NetworkConfiguration"
|
|
10057
|
+
"AWS::AppRunner::Service\0NetworkConfiguration",
|
|
10058
|
+
"AWS::Location::Tracker\0PositionFiltering"
|
|
10035
10059
|
]);
|
|
10036
10060
|
/**
|
|
10037
10061
|
* A nested undeclared value (a live sub-key inside a declared object, R96/R98) — a dotted
|