cdk-real-drift 0.4.25 → 0.4.27
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 +34 -8
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5934,14 +5934,17 @@ async function enumerateRestApiChildren(ctx) {
|
|
|
5934
5934
|
const declaredModelNames = [];
|
|
5935
5935
|
const declaredValidatorIds = [];
|
|
5936
5936
|
const declaredResponseTypes = [];
|
|
5937
|
+
let gatewayResponseTypeUnresolved = false;
|
|
5937
5938
|
const declaredStageNames = [];
|
|
5938
5939
|
for (const r of desired.resources) if (r.resourceType === "AWS::ApiGateway::Authorizer" && parentRefMatches(r.declared.RestApiId, apiId) && r.physicalId) declaredAuthorizerIds.push(r.physicalId);
|
|
5939
5940
|
else if (r.resourceType === "AWS::ApiGateway::Model" && parentRefMatches(r.declared.RestApiId, apiId)) {
|
|
5940
5941
|
const name = typeof r.declared.Name === "string" ? r.declared.Name : r.physicalId;
|
|
5941
5942
|
if (name) declaredModelNames.push(name);
|
|
5942
5943
|
} else if (r.resourceType === "AWS::ApiGateway::RequestValidator" && parentRefMatches(r.declared.RestApiId, apiId) && r.physicalId) declaredValidatorIds.push(r.physicalId);
|
|
5943
|
-
else if (r.resourceType === "AWS::ApiGateway::GatewayResponse" && parentRefMatches(r.declared.RestApiId, apiId)
|
|
5944
|
-
|
|
5944
|
+
else if (r.resourceType === "AWS::ApiGateway::GatewayResponse" && parentRefMatches(r.declared.RestApiId, apiId)) {
|
|
5945
|
+
if (r.declared.ResponseType === UNRESOLVED || hasUnresolved(r.declared.ResponseType)) gatewayResponseTypeUnresolved = true;
|
|
5946
|
+
else if (typeof r.declared.ResponseType === "string") declaredResponseTypes.push(r.declared.ResponseType);
|
|
5947
|
+
} else if (r.resourceType === "AWS::ApiGateway::Stage" && parentRefMatches(r.declared.RestApiId, apiId)) {
|
|
5945
5948
|
const name = typeof r.declared.StageName === "string" ? r.declared.StageName : r.physicalId;
|
|
5946
5949
|
if (name) declaredStageNames.push(name);
|
|
5947
5950
|
}
|
|
@@ -6009,7 +6012,8 @@ async function enumerateRestApiChildren(ctx) {
|
|
|
6009
6012
|
liveResponseTypes: (await getAllGatewayResponses(client, apiId)).filter((g) => typeof g.responseType === "string").map((g) => ({
|
|
6010
6013
|
type: g.responseType,
|
|
6011
6014
|
label: g.responseType
|
|
6012
|
-
}))
|
|
6015
|
+
})),
|
|
6016
|
+
hasUnresolvedDeclaredResponseType: gatewayResponseTypeUnresolved
|
|
6013
6017
|
});
|
|
6014
6018
|
const stageAdded = diffApiGatewayStages({
|
|
6015
6019
|
apiId,
|
|
@@ -6148,6 +6152,7 @@ async function getAllRequestValidators(client, apiId) {
|
|
|
6148
6152
|
return out;
|
|
6149
6153
|
}
|
|
6150
6154
|
function diffApiGatewayGatewayResponses(input) {
|
|
6155
|
+
if (input.hasUnresolvedDeclaredResponseType) return [];
|
|
6151
6156
|
const { apiId, declaredResponseTypes, liveResponseTypes } = input;
|
|
6152
6157
|
const declared = new Set(declaredResponseTypes);
|
|
6153
6158
|
const added = [];
|
|
@@ -6780,6 +6785,7 @@ async function enumerateUserPoolChildren(ctx) {
|
|
|
6780
6785
|
];
|
|
6781
6786
|
}
|
|
6782
6787
|
function diffGraphQLApiChildren(input) {
|
|
6788
|
+
if (input.hasUnresolvedDeclaredDataSource) return [];
|
|
6783
6789
|
const declared = new Set(input.declaredDataSourceNames);
|
|
6784
6790
|
const added = [];
|
|
6785
6791
|
for (const ds of input.liveDataSources) {
|
|
@@ -6810,6 +6816,7 @@ async function pageDataSources(client, apiId) {
|
|
|
6810
6816
|
return out;
|
|
6811
6817
|
}
|
|
6812
6818
|
function diffGraphQLApiResolvers(input) {
|
|
6819
|
+
if (input.hasUnresolvedDeclaredResolver) return [];
|
|
6813
6820
|
const declared = new Set(input.declaredResolverKeys);
|
|
6814
6821
|
const added = [];
|
|
6815
6822
|
for (const r of input.liveResolvers) {
|
|
@@ -6886,15 +6893,22 @@ async function enumerateGraphQLApiChildren(ctx) {
|
|
|
6886
6893
|
if (!parent.physicalId) return [];
|
|
6887
6894
|
const apiId = bareApiId(parent.physicalId);
|
|
6888
6895
|
const declaredDataSourceNames = [];
|
|
6896
|
+
let datasourceNameUnresolved = false;
|
|
6889
6897
|
for (const r of desired.resources) {
|
|
6890
|
-
if (r.resourceType !== "AWS::AppSync::DataSource"
|
|
6898
|
+
if (r.resourceType !== "AWS::AppSync::DataSource") continue;
|
|
6891
6899
|
const declaredApiId = r.declared.ApiId;
|
|
6892
6900
|
if (declaredApiId !== UNRESOLVED && !hasUnresolved(declaredApiId)) {
|
|
6893
6901
|
if (typeof declaredApiId !== "string" || bareApiId(declaredApiId) !== apiId) continue;
|
|
6894
6902
|
}
|
|
6903
|
+
if (r.declared.Name === UNRESOLVED || hasUnresolved(r.declared.Name)) {
|
|
6904
|
+
datasourceNameUnresolved = true;
|
|
6905
|
+
continue;
|
|
6906
|
+
}
|
|
6907
|
+
if (typeof r.declared.Name !== "string") continue;
|
|
6895
6908
|
declaredDataSourceNames.push(r.declared.Name);
|
|
6896
6909
|
}
|
|
6897
6910
|
const declaredResolverKeys = [];
|
|
6911
|
+
let resolverKeyUnresolved = false;
|
|
6898
6912
|
for (const r of desired.resources) {
|
|
6899
6913
|
if (r.resourceType !== "AWS::AppSync::Resolver") continue;
|
|
6900
6914
|
const declaredApiId = r.declared.ApiId;
|
|
@@ -6902,6 +6916,10 @@ async function enumerateGraphQLApiChildren(ctx) {
|
|
|
6902
6916
|
if (typeof declaredApiId !== "string" || bareApiId(declaredApiId) !== apiId) continue;
|
|
6903
6917
|
}
|
|
6904
6918
|
const { TypeName, FieldName } = r.declared;
|
|
6919
|
+
if (TypeName === UNRESOLVED || hasUnresolved(TypeName) || FieldName === UNRESOLVED || hasUnresolved(FieldName)) {
|
|
6920
|
+
resolverKeyUnresolved = true;
|
|
6921
|
+
continue;
|
|
6922
|
+
}
|
|
6905
6923
|
if (typeof TypeName !== "string" || typeof FieldName !== "string") continue;
|
|
6906
6924
|
declaredResolverKeys.push(`${TypeName}|${FieldName}`);
|
|
6907
6925
|
}
|
|
@@ -6924,7 +6942,8 @@ async function enumerateGraphQLApiChildren(ctx) {
|
|
|
6924
6942
|
name: ds.name,
|
|
6925
6943
|
arn: ds.dataSourceArn,
|
|
6926
6944
|
label: ds.type ? `${ds.type} ${ds.name}` : ds.name
|
|
6927
|
-
}))
|
|
6945
|
+
})),
|
|
6946
|
+
hasUnresolvedDeclaredDataSource: datasourceNameUnresolved
|
|
6928
6947
|
});
|
|
6929
6948
|
const types = await pageTypes(client, apiId);
|
|
6930
6949
|
const liveResolvers = [];
|
|
@@ -6939,7 +6958,8 @@ async function enumerateGraphQLApiChildren(ctx) {
|
|
|
6939
6958
|
}
|
|
6940
6959
|
const resolverAdded = diffGraphQLApiResolvers({
|
|
6941
6960
|
declaredResolverKeys,
|
|
6942
|
-
liveResolvers
|
|
6961
|
+
liveResolvers,
|
|
6962
|
+
hasUnresolvedDeclaredResolver: resolverKeyUnresolved
|
|
6943
6963
|
});
|
|
6944
6964
|
const functionAdded = diffGraphQLApiFunctions({
|
|
6945
6965
|
declaredFunctionArns,
|
|
@@ -12577,13 +12597,19 @@ const SYNTHETIC_READ_SIGNAL_PATHS = { "AWS::ElasticLoadBalancingV2::TrustStore":
|
|
|
12577
12597
|
const CC_REVERTABLE_DESPITE_READ_OVERRIDE = new Set(["AWS::Scheduler::Schedule", "AWS::Cognito::IdentityPool"]);
|
|
12578
12598
|
const REVERT_SET_DEFAULT_PATHS = new Set([
|
|
12579
12599
|
"AWS::IAM::Role\0MaxSessionDuration",
|
|
12600
|
+
"AWS::IAM::Role\0Description",
|
|
12580
12601
|
"AWS::Lambda::Alias\0Description",
|
|
12581
12602
|
"AWS::Cognito::IdentityPool\0AllowClassicFlow",
|
|
12582
12603
|
"AWS::Transfer::Server\0SecurityPolicyName",
|
|
12604
|
+
"AWS::Transfer::Server\0IpAddressType",
|
|
12605
|
+
"AWS::Transfer::Server\0ProtocolDetails",
|
|
12606
|
+
"AWS::Transfer::Server\0S3StorageOptions",
|
|
12583
12607
|
"AWS::AppRunner::Service\0HealthCheckConfiguration",
|
|
12584
12608
|
"AWS::AppRunner::Service\0NetworkConfiguration",
|
|
12585
12609
|
"AWS::Location::Tracker\0PositionFiltering",
|
|
12610
|
+
"AWS::Location::Tracker\0PricingPlan",
|
|
12586
12611
|
"AWS::Location::PlaceIndex\0DataSourceConfiguration",
|
|
12612
|
+
"AWS::Location::PlaceIndex\0PricingPlan",
|
|
12587
12613
|
"AWS::Events::ApiDestination\0InvocationRateLimitPerSecond",
|
|
12588
12614
|
"AWS::Cognito::UserPool\0DeletionProtection",
|
|
12589
12615
|
"AWS::Cognito::UserPool\0MfaConfiguration",
|
|
@@ -13764,7 +13790,7 @@ async function revertStack(p) {
|
|
|
13764
13790
|
try {
|
|
13765
13791
|
const writer = resolveSdkWriter(item.resourceType, item.ops);
|
|
13766
13792
|
if (!writer) throw new Error(`no SDK writer for ${item.resourceType}`);
|
|
13767
|
-
const identifier = CC_IDENTIFIER_ADAPTERS[item.resourceType]?.(item.physicalId, res?.declared ?? {}) ?? item.physicalId;
|
|
13793
|
+
const identifier = CC_IDENTIFIER_ADAPTERS[item.resourceType]?.(item.physicalId, res?.declared ?? {}, region, gathered.desired.accountId) ?? item.physicalId;
|
|
13768
13794
|
await writer({
|
|
13769
13795
|
physicalId: item.physicalId,
|
|
13770
13796
|
identifier,
|
|
@@ -13783,7 +13809,7 @@ async function revertStack(p) {
|
|
|
13783
13809
|
}, buildRetryOpts(item.displayId));
|
|
13784
13810
|
} else {
|
|
13785
13811
|
const res = byLogical.get(item.logicalId);
|
|
13786
|
-
const identifier = CC_IDENTIFIER_ADAPTERS[item.resourceType]?.(item.physicalId, res?.declared ?? {}) ?? item.physicalId;
|
|
13812
|
+
const identifier = CC_IDENTIFIER_ADAPTERS[item.resourceType]?.(item.physicalId, res?.declared ?? {}, region, gathered.desired.accountId) ?? item.physicalId;
|
|
13787
13813
|
const tagged = tagPreservingOps(item.ops, gathered.liveByLogical.get(item.logicalId));
|
|
13788
13814
|
const extra = writeOnlyReincludeOps(res?.declared, gathered.schemas.get(item.resourceType), tagged);
|
|
13789
13815
|
const strip = rejectedEmptyStripOps(item.resourceType, [...tagged, ...extra], gathered.liveByLogical.get(item.logicalId));
|