cdk-real-drift 0.2.62 → 0.2.63
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 +9 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5080,8 +5080,12 @@ const CHILD_ENUMERATORS = {
|
|
|
5080
5080
|
"AWS::EFS::FileSystem": enumerateEfsFileSystemChildren,
|
|
5081
5081
|
"AWS::RDS::DBCluster": enumerateRdsClusterChildren
|
|
5082
5082
|
};
|
|
5083
|
+
function isBodyDefinedRestApi(declared) {
|
|
5084
|
+
return declared.Body != null || declared.BodyS3Location != null;
|
|
5085
|
+
}
|
|
5083
5086
|
function diffApiGatewayChildren(input) {
|
|
5084
|
-
const { apiId, rootResourceId, declaredResourceIds, declaredMethodKeys, liveResources, liveMethodsByResource } = input;
|
|
5087
|
+
const { apiId, rootResourceId, declaredResourceIds, declaredMethodKeys, liveResources, liveMethodsByResource, bodyDefined } = input;
|
|
5088
|
+
if (bodyDefined) return [];
|
|
5085
5089
|
const liveRootId = liveResources.find((r) => r.path === "/")?.id;
|
|
5086
5090
|
const declaredResources = new Set(declaredResourceIds);
|
|
5087
5091
|
if (rootResourceId) declaredResources.add(rootResourceId);
|
|
@@ -5138,6 +5142,7 @@ async function enumerateRestApiChildren(ctx) {
|
|
|
5138
5142
|
if (!apiId) return [];
|
|
5139
5143
|
const restApiLive = desired.ctx.liveAttrs[parent.logicalId] ?? {};
|
|
5140
5144
|
const rootResourceId = typeof restApiLive.RootResourceId === "string" ? restApiLive.RootResourceId : void 0;
|
|
5145
|
+
const bodyDefined = isBodyDefinedRestApi(parent.declared);
|
|
5141
5146
|
const declaredResourceIds = [];
|
|
5142
5147
|
const declaredMethodKeys = [];
|
|
5143
5148
|
for (const r of desired.resources) {
|
|
@@ -5163,7 +5168,7 @@ async function enumerateRestApiChildren(ctx) {
|
|
|
5163
5168
|
region,
|
|
5164
5169
|
...READ_RETRY
|
|
5165
5170
|
});
|
|
5166
|
-
const items = await getAllResources(client, apiId);
|
|
5171
|
+
const items = bodyDefined ? [] : await getAllResources(client, apiId);
|
|
5167
5172
|
const liveResources = items.filter((i) => typeof i.id === "string").map((i) => ({
|
|
5168
5173
|
id: i.id,
|
|
5169
5174
|
path: i.path,
|
|
@@ -5190,7 +5195,8 @@ async function enumerateRestApiChildren(ctx) {
|
|
|
5190
5195
|
declaredResourceIds,
|
|
5191
5196
|
declaredMethodKeys,
|
|
5192
5197
|
liveResources,
|
|
5193
|
-
liveMethodsByResource
|
|
5198
|
+
liveMethodsByResource,
|
|
5199
|
+
bodyDefined
|
|
5194
5200
|
});
|
|
5195
5201
|
const authorizerAdded = diffApiGatewayAuthorizers({
|
|
5196
5202
|
apiId,
|