@go-to-k/cdkd 0.280.9 → 0.280.11
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/{asg-provider-Bme2nsK8.js → asg-provider-CN0zTvF5.js} +2 -2
- package/dist/{asg-provider-Bme2nsK8.js.map → asg-provider-CN0zTvF5.js.map} +1 -1
- package/dist/cli.js +181 -15
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-DyvrbmXh.js → deploy-engine-DHGLmPWH.js} +29 -18
- package/dist/deploy-engine-DHGLmPWH.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-DyvrbmXh.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as applyRoleArnIfSet, A as red, At as AssetManifestLoader, B as isTerminationProtectionPropagationError, Bt as resolveStateBucketWithDefault, C as isStatefulRecreateTargetSync, Ct as validateAssetBucketName, D as cyan, Dn as withErrorHandling, Dt as getDockerCmd, E as bold, En as normalizeAwsError, Et as formatDockerLoginError, F as ProviderRegistry, Ft as getLegacyStateBucketName, G as normalizeAwsTagsToCfn, Gt as CFN_TEMPLATE_BODY_LIMIT, H as cfnRefValueFromPhysicalId, Ht as resolveUseCdkBootstrapAssets, I as findActionableSilentDrops, It as resolveApp, J as readConfigString, Jt as findLargeInlineResources, K as resolveExplicitPhysicalId, Kt as CFN_TEMPLATE_URL_LIMIT, L as CloudControlProvider, Lt as resolveAutoAssetStorage, M as IAMRoleProvider, Mt as Synthesizer, N as collectInlinePolicyNamesManagedBySiblings, Nt as synthesisStatusMessage, O as gray, Ot as runDockerForeground, P as clearOnUpdateRemoval, Pt as getDefaultStateBucketName, Q as requireConfigString, Qt as processStackMessages, R as slowCcOperationTimeoutMs, Rt as resolveCaptureObservedState, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as parseBootstrapMarker, T as formatResourceLine, Tt as buildDockerImage, U as refStateLookupFromResource, Ut as stateBucketExistenceConfirmed, V as IntrinsicFunctionResolver, Vt as resolveStateBucketWithDefaultAndSource, W as WAFv2WebACLProvider, Wt as warnDeprecatedNoPrefixCliFlag, X as requireConfigArray, Xt as expectedOwnerParam, Y as replayWarn, Yt as uploadCfnTemplate, Z as requireConfigObject, Zt as AssemblyReader, _ as createPreDeleteFinalSnapshot, _n as ProvisioningError, _t as rewriteTemplateAssetReferences, a as DeploymentEventsStore, at as DagBuilder, b as unsupportedFinalSnapshotError, bn as StackHasActiveImportsError, bt as ensureAssetStorage, c as replayFailedOperations, ct as S3StateBackend, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalMigrateError, dt as AssetPublisher, en as resolveBucketRegion, et as DiffCalculator, f as computeImplicitDeleteEdges, fn as LocalStartServiceError, ft as stringifyValue, g as ccRoutedFinalSnapshotError, gn as PartialFailureError, gt as loadPublishableAssetManifest, h as buildFinalSnapshotIdentifier, hn as NestedStackChildDirectDestroyError, ht as createAssetRedirectResolver, i as DeploymentEventsReader, in as setAwsClients, it as isThrottlingError, j as yellow, jt as getDockerImageBySourceHash, k as green, kt as runDockerStreaming, l as replayRollback, ln as DeployCancelledError, lt as rebuildClientForBucketRegion, m as PRE_DELETE_SNAPSHOT_TYPES, mn as MissingCdkCliError, mt as buildAssetRedirectMap, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as getAwsClients, nt as withRetry, o as planFailedOps, on as CdkdError, ot as TemplateParser, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pt as WorkGraph, q as assertRegionMatch, qt as MIGRATE_TMP_PREFIX, r as DeployEngine, rn as resetAwsClients, rt as isRetryableTransientError, s as planRollback, st as LockManager, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as AwsClients, tt as describeTypeWithThrottleRetry, u as withResourceDeadline, un as LocalInvokeBuildError$1, ut as shouldRetainResource, v as isFinalSnapshotError, vn as ResourceTimeoutError, vt as AssetModeResolver, w as renderStatefulReason, wt as validateContainerRepoName, x as extractDeploymentEventError, xn as StackTerminationProtectionError, xt as getBootstrapMarkerKey, y as refusesFinalSnapshot, yn as ResourceUpdateNotSupportedError, yt as BOOTSTRAP_MARKER_PREFIX, z as disableInstanceApiTermination, zt as resolveSkipPrefix } from "./deploy-engine-DHGLmPWH.js";
|
|
3
3
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as withSkipPrefix, i as runStackBuffered, n as getLogger, o as PATTERN_B_NAME_OPTIONS, p as withStackName, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-BYMEE-BS.js";
|
|
4
|
-
import { t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-CN0zTvF5.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
7
7
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -5077,7 +5077,9 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5077
5077
|
*/
|
|
5078
5078
|
async applyLifecycleConfiguration(bucketName, lifecycleConfig, onUnusable) {
|
|
5079
5079
|
for (const rule of lifecycleConfig.Rules) {
|
|
5080
|
-
const
|
|
5080
|
+
const rawFilter = rule["Filter"];
|
|
5081
|
+
if (rawFilter != null && requireConfigObject(rawFilter, "AWS::S3::Bucket LifecycleConfiguration.Rules[].Filter", { ...onUnusable ? { onUnusable } : {} }) === void 0) return;
|
|
5082
|
+
const rawTagFilters = rawFilter?.["TagFilters"] ?? rule["TagFilters"];
|
|
5081
5083
|
if (rawTagFilters != null) {
|
|
5082
5084
|
if (requireConfigArray(rawTagFilters, "AWS::S3::Bucket LifecycleConfiguration.Rules[].TagFilters", { ...onUnusable ? { onUnusable } : {} }) === void 0) return;
|
|
5083
5085
|
}
|
|
@@ -5092,7 +5094,7 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5092
5094
|
};
|
|
5093
5095
|
};
|
|
5094
5096
|
const isPlainPrefixOnly = (rule) => {
|
|
5095
|
-
if (rule["Filter"]
|
|
5097
|
+
if (rule["Filter"] != null) return false;
|
|
5096
5098
|
const s = gatherScope(rule);
|
|
5097
5099
|
return s.prefix !== void 0 && (s.tagFilters == null || s.tagFilters.length === 0) && s.sizeGt === void 0 && s.sizeLt === void 0;
|
|
5098
5100
|
};
|
|
@@ -5456,7 +5458,9 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5456
5458
|
async applyAnalyticsConfigurations(bucketName, configs, onUnusable) {
|
|
5457
5459
|
for (const config of configs) {
|
|
5458
5460
|
const id = config["Id"];
|
|
5459
|
-
const
|
|
5461
|
+
const rawStorageClassAnalysis = config["StorageClassAnalysis"];
|
|
5462
|
+
if (rawStorageClassAnalysis != null && requireConfigObject(rawStorageClassAnalysis, "AWS::S3::Bucket AnalyticsConfigurations[].StorageClassAnalysis", { ...onUnusable ? { onUnusable } : {} }) === void 0) continue;
|
|
5463
|
+
const storageClassAnalysis = rawStorageClassAnalysis;
|
|
5460
5464
|
const analyticsConfig = {
|
|
5461
5465
|
Id: id,
|
|
5462
5466
|
StorageClassAnalysis: {}
|
|
@@ -5472,14 +5476,16 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5472
5476
|
else if (prefix) analyticsConfig.Filter = { Prefix: prefix };
|
|
5473
5477
|
else if (tagFilters && tagFilters.length === 1) analyticsConfig.Filter = { Tag: tagFilters[0] };
|
|
5474
5478
|
if (storageClassAnalysis?.["DataExport"] != null) {
|
|
5475
|
-
const
|
|
5479
|
+
const rawDataExport = storageClassAnalysis["DataExport"];
|
|
5480
|
+
if (requireConfigObject(rawDataExport, "AWS::S3::Bucket AnalyticsConfigurations[].StorageClassAnalysis.DataExport", { ...onUnusable ? { onUnusable } : {} }) === void 0) continue;
|
|
5481
|
+
const dataExport = rawDataExport;
|
|
5476
5482
|
const analyticsDestPath = "AWS::S3::Bucket AnalyticsConfigurations[].StorageClassAnalysis.DataExport.Destination";
|
|
5477
5483
|
const rawDest = dataExport["Destination"];
|
|
5478
5484
|
const s3Dest = this.resolveS3BucketDestination(rawDest, analyticsDestPath, onUnusable);
|
|
5479
5485
|
if (s3Dest === void 0 && rawDest != null) continue;
|
|
5480
5486
|
const destPath = s3BucketDestinationPath(rawDest, analyticsDestPath);
|
|
5481
5487
|
analyticsConfig.StorageClassAnalysis = { DataExport: {
|
|
5482
|
-
OutputSchemaVersion: readConfigString(dataExport, "OutputSchemaVersion", "V_1", "AWS::S3::Bucket AnalyticsConfigurations[].StorageClassAnalysis.DataExport"),
|
|
5488
|
+
OutputSchemaVersion: readConfigString(dataExport, "OutputSchemaVersion", "V_1", "AWS::S3::Bucket AnalyticsConfigurations[].StorageClassAnalysis.DataExport", { ...onUnusable ? { onUnusable } : {} }),
|
|
5483
5489
|
Destination: s3Dest ? { S3BucketDestination: {
|
|
5484
5490
|
Bucket: s3Dest["BucketArn"] ?? s3Dest["Bucket"],
|
|
5485
5491
|
BucketAccountId: s3Dest["BucketAccountId"],
|
|
@@ -5624,8 +5630,12 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5624
5630
|
}
|
|
5625
5631
|
return sdkDest;
|
|
5626
5632
|
}
|
|
5627
|
-
async applyReplicationConfiguration(bucketName, replConfig) {
|
|
5633
|
+
async applyReplicationConfiguration(bucketName, replConfig, onUnusable) {
|
|
5628
5634
|
const rules = replConfig["Rules"];
|
|
5635
|
+
for (const rule of rules || []) {
|
|
5636
|
+
const rawFilter = rule["Filter"];
|
|
5637
|
+
if (rawFilter != null && requireConfigObject(rawFilter, "AWS::S3::Bucket ReplicationConfiguration.Rules[].Filter", { ...onUnusable ? { onUnusable } : {} }) === void 0) return;
|
|
5638
|
+
}
|
|
5629
5639
|
await this.s3Client.send(new PutBucketReplicationCommand({
|
|
5630
5640
|
Bucket: bucketName,
|
|
5631
5641
|
ReplicationConfiguration: {
|
|
@@ -5648,7 +5658,7 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5648
5658
|
if (Object.keys(sdkCriteria).length > 0) sdkRule["SourceSelectionCriteria"] = sdkCriteria;
|
|
5649
5659
|
}
|
|
5650
5660
|
const filter = rule["Filter"];
|
|
5651
|
-
if (filter) {
|
|
5661
|
+
if (filter != null) {
|
|
5652
5662
|
const and = filter["And"];
|
|
5653
5663
|
const prefix = filter["Prefix"];
|
|
5654
5664
|
const tagFilter = filter["TagFilter"];
|
|
@@ -5879,7 +5889,7 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5879
5889
|
});
|
|
5880
5890
|
await this.diffSubConfig(bucketName, previousProperties["LoggingConfiguration"], properties["LoggingConfiguration"], async (cfg) => this.applyLoggingConfiguration(bucketName, cfg), async () => this.applyLoggingConfiguration(bucketName, void 0));
|
|
5881
5891
|
await this.diffSubConfig(bucketName, previousProperties["NotificationConfiguration"], properties["NotificationConfiguration"], async (cfg) => this.applyNotificationConfiguration(bucketName, cfg), async () => this.applyNotificationConfiguration(bucketName, void 0));
|
|
5882
|
-
await this.diffSubConfig(bucketName, previousProperties["ReplicationConfiguration"], properties["ReplicationConfiguration"], async (cfg) => this.applyReplicationConfiguration(bucketName, cfg), async () => {
|
|
5892
|
+
await this.diffSubConfig(bucketName, previousProperties["ReplicationConfiguration"], properties["ReplicationConfiguration"], async (cfg) => this.applyReplicationConfiguration(bucketName, cfg, (m) => this.logger.warn(m)), async () => {
|
|
5883
5893
|
await this.s3Client.send(new DeleteBucketReplicationCommand({ Bucket: bucketName }));
|
|
5884
5894
|
this.logger.debug(`Deleted replication configuration on bucket ${bucketName}`);
|
|
5885
5895
|
});
|
|
@@ -5955,7 +5965,7 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5955
5965
|
const inventoryConfigs = properties["InventoryConfigurations"];
|
|
5956
5966
|
if (inventoryConfigs && Array.isArray(inventoryConfigs) && inventoryConfigs.length > 0) await this.applyInventoryConfigurations(bucketName, inventoryConfigs, replayOnUnusable);
|
|
5957
5967
|
const replConfig = properties["ReplicationConfiguration"];
|
|
5958
|
-
if (replConfig) await this.applyReplicationConfiguration(bucketName, replConfig);
|
|
5968
|
+
if (replConfig) await this.applyReplicationConfiguration(bucketName, replConfig, replayOnUnusable);
|
|
5959
5969
|
const objectLockConfig = properties["ObjectLockConfiguration"];
|
|
5960
5970
|
if (objectLockConfig) await this.applyObjectLockConfiguration(bucketName, objectLockConfig);
|
|
5961
5971
|
}
|
|
@@ -21993,7 +22003,17 @@ var ApiGatewayV2Provider = class {
|
|
|
21993
22003
|
"PayloadFormatVersion",
|
|
21994
22004
|
"TimeoutInMillis",
|
|
21995
22005
|
"RequestParameters",
|
|
21996
|
-
"Description"
|
|
22006
|
+
"Description",
|
|
22007
|
+
"ConnectionId",
|
|
22008
|
+
"ConnectionType",
|
|
22009
|
+
"ContentHandlingStrategy",
|
|
22010
|
+
"CredentialsArn",
|
|
22011
|
+
"IntegrationSubtype",
|
|
22012
|
+
"PassthroughBehavior",
|
|
22013
|
+
"RequestTemplates",
|
|
22014
|
+
"ResponseParameters",
|
|
22015
|
+
"TemplateSelectionExpression",
|
|
22016
|
+
"TlsConfig"
|
|
21997
22017
|
])],
|
|
21998
22018
|
["AWS::ApiGatewayV2::Route", /* @__PURE__ */ new Set([
|
|
21999
22019
|
"ApiId",
|
|
@@ -22219,7 +22239,17 @@ var ApiGatewayV2Provider = class {
|
|
|
22219
22239
|
PayloadFormatVersion: properties["PayloadFormatVersion"],
|
|
22220
22240
|
TimeoutInMillis: properties["TimeoutInMillis"],
|
|
22221
22241
|
RequestParameters: properties["RequestParameters"],
|
|
22222
|
-
Description: properties["Description"]
|
|
22242
|
+
Description: properties["Description"],
|
|
22243
|
+
ConnectionId: properties["ConnectionId"],
|
|
22244
|
+
ConnectionType: properties["ConnectionType"],
|
|
22245
|
+
ContentHandlingStrategy: properties["ContentHandlingStrategy"],
|
|
22246
|
+
CredentialsArn: properties["CredentialsArn"],
|
|
22247
|
+
IntegrationSubtype: properties["IntegrationSubtype"],
|
|
22248
|
+
PassthroughBehavior: properties["PassthroughBehavior"],
|
|
22249
|
+
RequestTemplates: properties["RequestTemplates"],
|
|
22250
|
+
ResponseParameters: this.toSdkResponseParameters(properties["ResponseParameters"]),
|
|
22251
|
+
TemplateSelectionExpression: properties["TemplateSelectionExpression"],
|
|
22252
|
+
TlsConfig: properties["TlsConfig"]
|
|
22223
22253
|
}))).IntegrationId;
|
|
22224
22254
|
this.logger.debug(`Successfully created API Gateway V2 Integration ${logicalId}: ${integrationId}`);
|
|
22225
22255
|
return {
|
|
@@ -22438,6 +22468,16 @@ var ApiGatewayV2Provider = class {
|
|
|
22438
22468
|
if (resp.TimeoutInMillis !== void 0) result["TimeoutInMillis"] = resp.TimeoutInMillis;
|
|
22439
22469
|
if (resp.RequestParameters !== void 0) result["RequestParameters"] = resp.RequestParameters;
|
|
22440
22470
|
if (resp.Description !== void 0) result["Description"] = resp.Description;
|
|
22471
|
+
if (resp.ConnectionId !== void 0) result["ConnectionId"] = resp.ConnectionId;
|
|
22472
|
+
if (resp.ConnectionType !== void 0) result["ConnectionType"] = resp.ConnectionType;
|
|
22473
|
+
if (resp.ContentHandlingStrategy !== void 0) result["ContentHandlingStrategy"] = resp.ContentHandlingStrategy;
|
|
22474
|
+
if (resp.CredentialsArn !== void 0) result["CredentialsArn"] = resp.CredentialsArn;
|
|
22475
|
+
if (resp.IntegrationSubtype !== void 0) result["IntegrationSubtype"] = resp.IntegrationSubtype;
|
|
22476
|
+
if (resp.PassthroughBehavior !== void 0) result["PassthroughBehavior"] = resp.PassthroughBehavior;
|
|
22477
|
+
if (resp.RequestTemplates !== void 0) result["RequestTemplates"] = resp.RequestTemplates;
|
|
22478
|
+
if (resp.ResponseParameters !== void 0) result["ResponseParameters"] = this.toCfnResponseParameters(resp.ResponseParameters);
|
|
22479
|
+
if (resp.TemplateSelectionExpression !== void 0) result["TemplateSelectionExpression"] = resp.TemplateSelectionExpression;
|
|
22480
|
+
if (resp.TlsConfig !== void 0) result["TlsConfig"] = resp.TlsConfig;
|
|
22441
22481
|
return result;
|
|
22442
22482
|
} catch (err) {
|
|
22443
22483
|
if (err instanceof NotFoundException$3) return void 0;
|
|
@@ -22720,7 +22760,11 @@ var ApiGatewayV2Provider = class {
|
|
|
22720
22760
|
* `UpdateIntegration` keys on `(ApiId, IntegrationId)`. Mutable
|
|
22721
22761
|
* fields cdkd manages: `IntegrationType` / `IntegrationUri` /
|
|
22722
22762
|
* `IntegrationMethod` / `PayloadFormatVersion` / `TimeoutInMillis` /
|
|
22723
|
-
* `RequestParameters` / `Description
|
|
22763
|
+
* `RequestParameters` / `Description`, plus the issue #609 backfill
|
|
22764
|
+
* (`ConnectionId` / `ConnectionType` / `ContentHandlingStrategy` /
|
|
22765
|
+
* `CredentialsArn` / `IntegrationSubtype` / `PassthroughBehavior` /
|
|
22766
|
+
* `RequestTemplates` / `ResponseParameters` / `TemplateSelectionExpression`
|
|
22767
|
+
* / `TlsConfig`).
|
|
22724
22768
|
*/
|
|
22725
22769
|
async updateIntegration(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
22726
22770
|
const apiId = properties["ApiId"] ?? previousProperties["ApiId"];
|
|
@@ -22765,6 +22809,50 @@ var ApiGatewayV2Provider = class {
|
|
|
22765
22809
|
changed = true;
|
|
22766
22810
|
}
|
|
22767
22811
|
}
|
|
22812
|
+
if (properties["ConnectionId"] != null && properties["ConnectionId"] !== previousProperties["ConnectionId"]) {
|
|
22813
|
+
input.ConnectionId = properties["ConnectionId"];
|
|
22814
|
+
changed = true;
|
|
22815
|
+
}
|
|
22816
|
+
if (properties["ConnectionType"] != null && properties["ConnectionType"] !== previousProperties["ConnectionType"]) {
|
|
22817
|
+
input.ConnectionType = properties["ConnectionType"];
|
|
22818
|
+
changed = true;
|
|
22819
|
+
}
|
|
22820
|
+
if (properties["ContentHandlingStrategy"] != null && properties["ContentHandlingStrategy"] !== previousProperties["ContentHandlingStrategy"]) {
|
|
22821
|
+
input.ContentHandlingStrategy = properties["ContentHandlingStrategy"];
|
|
22822
|
+
changed = true;
|
|
22823
|
+
}
|
|
22824
|
+
if (properties["CredentialsArn"] != null && properties["CredentialsArn"] !== previousProperties["CredentialsArn"]) {
|
|
22825
|
+
input.CredentialsArn = properties["CredentialsArn"];
|
|
22826
|
+
changed = true;
|
|
22827
|
+
}
|
|
22828
|
+
if (properties["IntegrationSubtype"] != null && properties["IntegrationSubtype"] !== previousProperties["IntegrationSubtype"]) {
|
|
22829
|
+
input.IntegrationSubtype = properties["IntegrationSubtype"];
|
|
22830
|
+
changed = true;
|
|
22831
|
+
}
|
|
22832
|
+
if (input.IntegrationSubtype === void 0) {
|
|
22833
|
+
const liveSubtype = properties["IntegrationSubtype"] ?? previousProperties["IntegrationSubtype"];
|
|
22834
|
+
if (liveSubtype !== void 0) input.IntegrationSubtype = liveSubtype;
|
|
22835
|
+
}
|
|
22836
|
+
if (properties["PassthroughBehavior"] != null && properties["PassthroughBehavior"] !== previousProperties["PassthroughBehavior"]) {
|
|
22837
|
+
input.PassthroughBehavior = properties["PassthroughBehavior"];
|
|
22838
|
+
changed = true;
|
|
22839
|
+
}
|
|
22840
|
+
if (properties["RequestTemplates"] != null && !this.deepEqual(properties["RequestTemplates"], previousProperties["RequestTemplates"])) {
|
|
22841
|
+
input.RequestTemplates = properties["RequestTemplates"];
|
|
22842
|
+
changed = true;
|
|
22843
|
+
}
|
|
22844
|
+
if (properties["ResponseParameters"] != null && !this.deepEqual(properties["ResponseParameters"], previousProperties["ResponseParameters"])) {
|
|
22845
|
+
input.ResponseParameters = this.toSdkResponseParameters(properties["ResponseParameters"]);
|
|
22846
|
+
changed = true;
|
|
22847
|
+
}
|
|
22848
|
+
if (properties["TemplateSelectionExpression"] != null && properties["TemplateSelectionExpression"] !== previousProperties["TemplateSelectionExpression"]) {
|
|
22849
|
+
input.TemplateSelectionExpression = properties["TemplateSelectionExpression"];
|
|
22850
|
+
changed = true;
|
|
22851
|
+
}
|
|
22852
|
+
if (properties["TlsConfig"] != null && !this.deepEqual(properties["TlsConfig"], previousProperties["TlsConfig"])) {
|
|
22853
|
+
input.TlsConfig = properties["TlsConfig"];
|
|
22854
|
+
changed = true;
|
|
22855
|
+
}
|
|
22768
22856
|
if (!changed) {
|
|
22769
22857
|
this.logger.debug(`No mutable Integration fields changed for ${logicalId}; skipping UpdateIntegration`);
|
|
22770
22858
|
return {
|
|
@@ -23115,6 +23203,84 @@ var ApiGatewayV2Provider = class {
|
|
|
23115
23203
|
return merged;
|
|
23116
23204
|
}
|
|
23117
23205
|
/**
|
|
23206
|
+
* `ResponseParameters` is the one `AWS::ApiGatewayV2::Integration` property
|
|
23207
|
+
* whose CFn shape does NOT match the SDK's, so forwarding it verbatim is not
|
|
23208
|
+
* an option (issue #609). CloudFormation models it as
|
|
23209
|
+
* `{ "<statusCode>": { ResponseParameters: [{ Destination, Source }, ...] } }`
|
|
23210
|
+
* while `CreateIntegration` / `UpdateIntegration` take the flattened
|
|
23211
|
+
* `{ "<statusCode>": { "<Destination>": "<Source>" } }`. The AWS SDK v3
|
|
23212
|
+
* serializer drops members it cannot model, so the un-converted CFn shape
|
|
23213
|
+
* would deliver an EMPTY map per status code — the silent-drop class one
|
|
23214
|
+
* level down.
|
|
23215
|
+
*
|
|
23216
|
+
* Anything that is not the expected object / array shape (an unresolved
|
|
23217
|
+
* intrinsic, a malformed block) passes through untouched so AWS surfaces the
|
|
23218
|
+
* real validation error instead of cdkd inventing one.
|
|
23219
|
+
*
|
|
23220
|
+
* `Source` is COERCED from a number / boolean rather than skipped. CFn types
|
|
23221
|
+
* `ResponseParameters` as free-form `object` and coerces scalars, cdkd does
|
|
23222
|
+
* not (the `coerceNumber` class in `.claude/rules/providers.md`), so an
|
|
23223
|
+
* unquoted `Source: 403` under the canonical `overwrite:statuscode`
|
|
23224
|
+
* destination is a perfectly legal template whose value arrives as a NUMBER.
|
|
23225
|
+
* Skipping it would re-introduce the silent drop this method exists to close.
|
|
23226
|
+
* A `Destination` is never coerced — it becomes an SDK map KEY, and a
|
|
23227
|
+
* non-string there is a malformed template, not a scalar shorthand.
|
|
23228
|
+
*/
|
|
23229
|
+
toSdkResponseParameters(value) {
|
|
23230
|
+
if (value == null) return void 0;
|
|
23231
|
+
if (typeof value !== "object" || Array.isArray(value)) return value;
|
|
23232
|
+
const out = {};
|
|
23233
|
+
for (const [statusCode, block] of Object.entries(value)) {
|
|
23234
|
+
if (block == null || typeof block !== "object" || Array.isArray(block)) {
|
|
23235
|
+
out[statusCode] = block;
|
|
23236
|
+
continue;
|
|
23237
|
+
}
|
|
23238
|
+
const entries = block["ResponseParameters"];
|
|
23239
|
+
if (!Array.isArray(entries)) {
|
|
23240
|
+
out[statusCode] = block;
|
|
23241
|
+
continue;
|
|
23242
|
+
}
|
|
23243
|
+
const mapped = {};
|
|
23244
|
+
for (const entry of entries) {
|
|
23245
|
+
const destination = entry != null && typeof entry === "object" && !Array.isArray(entry) ? entry["Destination"] : void 0;
|
|
23246
|
+
const source = entry != null && typeof entry === "object" && !Array.isArray(entry) ? entry["Source"] : void 0;
|
|
23247
|
+
const coerced = typeof source === "string" ? source : typeof source === "number" || typeof source === "boolean" ? String(source) : void 0;
|
|
23248
|
+
if (typeof destination !== "string" || coerced === void 0) {
|
|
23249
|
+
this.logger.warn(`AWS::ApiGatewayV2::Integration ResponseParameters['${statusCode}'] has an entry cdkd cannot deliver (Destination must be a string and Source a string / number / boolean; got ${JSON.stringify(destination)} / ${JSON.stringify(source)}); skipping that entry.`);
|
|
23250
|
+
continue;
|
|
23251
|
+
}
|
|
23252
|
+
mapped[destination] = coerced;
|
|
23253
|
+
}
|
|
23254
|
+
out[statusCode] = mapped;
|
|
23255
|
+
}
|
|
23256
|
+
return out;
|
|
23257
|
+
}
|
|
23258
|
+
/**
|
|
23259
|
+
* Inverse of {@link toSdkResponseParameters}, for `readCurrentState`. Without
|
|
23260
|
+
* it the AWS-current side would carry the flat SDK map while the cdkd
|
|
23261
|
+
* baseline carries the CFn list-of-pairs, and every `cdkd drift` run would
|
|
23262
|
+
* report permanent phantom drift on a resource nobody touched.
|
|
23263
|
+
*
|
|
23264
|
+
* The pairs are sorted by `Destination` because this turns an UNORDERED SDK
|
|
23265
|
+
* map into an ARRAY, and `calculateResourceDrift` compares arrays
|
|
23266
|
+
* POSITIONALLY — AWS does not guarantee map readback order, so an unsorted
|
|
23267
|
+
* rebuild would trade the shape-mismatch phantom drift for an ordering one
|
|
23268
|
+
* (and `--revert` would re-push an identical value forever). Same reasoning
|
|
23269
|
+
* as `src/analyzer/drift-normalize.ts`, applied at the source instead.
|
|
23270
|
+
*/
|
|
23271
|
+
toCfnResponseParameters(value) {
|
|
23272
|
+
if (value == null) return void 0;
|
|
23273
|
+
const out = {};
|
|
23274
|
+
for (const [statusCode, flat] of Object.entries(value)) {
|
|
23275
|
+
if (flat == null || typeof flat !== "object" || Array.isArray(flat)) continue;
|
|
23276
|
+
out[statusCode] = { ResponseParameters: Object.entries(flat).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([destination, source]) => ({
|
|
23277
|
+
Destination: destination,
|
|
23278
|
+
Source: source
|
|
23279
|
+
})) };
|
|
23280
|
+
}
|
|
23281
|
+
return out;
|
|
23282
|
+
}
|
|
23283
|
+
/**
|
|
23118
23284
|
* Convert CloudFormation Tags (Array<{Key, Value}>) to SDK Tags (Record<string, string>).
|
|
23119
23285
|
*/
|
|
23120
23286
|
cfnTagsToRecord(tags) {
|
|
@@ -68747,7 +68913,7 @@ function createMigrateCommand() {
|
|
|
68747
68913
|
*/
|
|
68748
68914
|
function buildProgram() {
|
|
68749
68915
|
const program = new Command();
|
|
68750
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.
|
|
68916
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.11");
|
|
68751
68917
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
68752
68918
|
const { profile } = actionCommand.optsWithGlobals();
|
|
68753
68919
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|