@go-to-k/cdkd 0.280.3 → 0.280.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/{asg-provider-C-Mym0XH.js → asg-provider-Cyuov8l5.js} +2 -2
- package/dist/{asg-provider-C-Mym0XH.js.map → asg-provider-Cyuov8l5.js.map} +1 -1
- package/dist/cli.js +192 -17
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-Ca5ywZ1L.js → deploy-engine-CttwgBIB.js} +14 -16
- package/dist/{deploy-engine-Ca5ywZ1L.js.map → deploy-engine-CttwgBIB.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as DiffCalculator, $t as resolveBucketRegion, A as red, At as getDockerImageBySourceHash, B as isTerminationProtectionPropagationError, Bt as resolveStateBucketWithDefaultAndSource, C as isStatefulRecreateTargetSync, Ct as validateContainerRepoName, D as cyan, Dt as runDockerForeground, E as bold, En as withErrorHandling, Et as getDockerCmd, F as ProviderRegistry, Ft as resolveApp, G as normalizeAwsTagsToCfn, Gt as CFN_TEMPLATE_URL_LIMIT, H as cfnRefValueFromPhysicalId, Ht as stateBucketExistenceConfirmed, I as findActionableSilentDrops, It as resolveAutoAssetStorage, J as readConfigString, Jt as uploadCfnTemplate, K as resolveExplicitPhysicalId, Kt as MIGRATE_TMP_PREFIX, L as CloudControlProvider, Lt as resolveCaptureObservedState, M as IAMRoleProvider, Mt as synthesisStatusMessage, N as collectInlinePolicyNamesManagedBySiblings, Nt as getDefaultStateBucketName, O as gray, Ot as runDockerStreaming, P as clearOnUpdateRemoval, Pt as getLegacyStateBucketName, Q as applyRoleArnIfSet, R as slowCcOperationTimeoutMs, Rt as resolveSkipPrefix, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as validateAssetBucketName, T as formatResourceLine, Tn as normalizeAwsError, Tt as formatDockerLoginError, U as refStateLookupFromResource, Ut as warnDeprecatedNoPrefixCliFlag, V as IntrinsicFunctionResolver, Vt as resolveUseCdkBootstrapAssets, W as WAFv2WebACLProvider, Wt as CFN_TEMPLATE_BODY_LIMIT, X as requireConfigArray, Xt as AssemblyReader, Y as replayWarn, Yt as expectedOwnerParam, Z as requireConfigString, Zt as processStackMessages, _ as createPreDeleteFinalSnapshot, _n as ResourceTimeoutError, _t as AssetModeResolver, a as DeploymentEventsStore, an as CdkdError, at as TemplateParser, b as unsupportedFinalSnapshotError, bn as StackTerminationProtectionError, bt as getBootstrapMarkerKey, c as replayFailedOperations, cn as DeployCancelledError, ct as rebuildClientForBucketRegion, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalStartServiceError, dt as stringifyValue, en as AwsClients, et as describeTypeWithThrottleRetry, f as computeImplicitDeleteEdges, ft as WorkGraph, g as ccRoutedFinalSnapshotError, gn as ProvisioningError, gt as rewriteTemplateAssetReferences, h as buildFinalSnapshotIdentifier, hn as PartialFailureError, ht as loadPublishableAssetManifest, i as DeploymentEventsReader, it as DagBuilder, j as yellow, jt as Synthesizer, k as green, kt as AssetManifestLoader, l as replayRollback, ln as LocalInvokeBuildError$1, lt as shouldRetainResource, m as PRE_DELETE_SNAPSHOT_TYPES, mn as NestedStackChildDirectDestroyError, mt as createAssetRedirectResolver, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as resetAwsClients, nt as isRetryableTransientError, o as planFailedOps, ot as LockManager, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as MissingCdkCliError, pt as buildAssetRedirectMap, q as assertRegionMatch, qt as findLargeInlineResources, r as DeployEngine, rn as setAwsClients, rt as isThrottlingError, s as planRollback, st as S3StateBackend, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as getAwsClients, tt as withRetry, u as withResourceDeadline, un as LocalMigrateError, ut as AssetPublisher, v as isFinalSnapshotError, vn as ResourceUpdateNotSupportedError, vt as BOOTSTRAP_MARKER_PREFIX, w as renderStatefulReason, wt as buildDockerImage, x as extractDeploymentEventError, xt as parseBootstrapMarker, y as refusesFinalSnapshot, yn as StackHasActiveImportsError, yt as ensureAssetStorage, z as disableInstanceApiTermination, zt as resolveStateBucketWithDefault } from "./deploy-engine-
|
|
2
|
+
import { $ as DiffCalculator, $t as resolveBucketRegion, A as red, At as getDockerImageBySourceHash, B as isTerminationProtectionPropagationError, Bt as resolveStateBucketWithDefaultAndSource, C as isStatefulRecreateTargetSync, Ct as validateContainerRepoName, D as cyan, Dt as runDockerForeground, E as bold, En as withErrorHandling, Et as getDockerCmd, F as ProviderRegistry, Ft as resolveApp, G as normalizeAwsTagsToCfn, Gt as CFN_TEMPLATE_URL_LIMIT, H as cfnRefValueFromPhysicalId, Ht as stateBucketExistenceConfirmed, I as findActionableSilentDrops, It as resolveAutoAssetStorage, J as readConfigString, Jt as uploadCfnTemplate, K as resolveExplicitPhysicalId, Kt as MIGRATE_TMP_PREFIX, L as CloudControlProvider, Lt as resolveCaptureObservedState, M as IAMRoleProvider, Mt as synthesisStatusMessage, N as collectInlinePolicyNamesManagedBySiblings, Nt as getDefaultStateBucketName, O as gray, Ot as runDockerStreaming, P as clearOnUpdateRemoval, Pt as getLegacyStateBucketName, Q as applyRoleArnIfSet, R as slowCcOperationTimeoutMs, Rt as resolveSkipPrefix, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as validateAssetBucketName, T as formatResourceLine, Tn as normalizeAwsError, Tt as formatDockerLoginError, U as refStateLookupFromResource, Ut as warnDeprecatedNoPrefixCliFlag, V as IntrinsicFunctionResolver, Vt as resolveUseCdkBootstrapAssets, W as WAFv2WebACLProvider, Wt as CFN_TEMPLATE_BODY_LIMIT, X as requireConfigArray, Xt as AssemblyReader, Y as replayWarn, Yt as expectedOwnerParam, Z as requireConfigString, Zt as processStackMessages, _ as createPreDeleteFinalSnapshot, _n as ResourceTimeoutError, _t as AssetModeResolver, a as DeploymentEventsStore, an as CdkdError, at as TemplateParser, b as unsupportedFinalSnapshotError, bn as StackTerminationProtectionError, bt as getBootstrapMarkerKey, c as replayFailedOperations, cn as DeployCancelledError, ct as rebuildClientForBucketRegion, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalStartServiceError, dt as stringifyValue, en as AwsClients, et as describeTypeWithThrottleRetry, f as computeImplicitDeleteEdges, ft as WorkGraph, g as ccRoutedFinalSnapshotError, gn as ProvisioningError, gt as rewriteTemplateAssetReferences, h as buildFinalSnapshotIdentifier, hn as PartialFailureError, ht as loadPublishableAssetManifest, i as DeploymentEventsReader, it as DagBuilder, j as yellow, jt as Synthesizer, k as green, kt as AssetManifestLoader, l as replayRollback, ln as LocalInvokeBuildError$1, lt as shouldRetainResource, m as PRE_DELETE_SNAPSHOT_TYPES, mn as NestedStackChildDirectDestroyError, mt as createAssetRedirectResolver, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as resetAwsClients, nt as isRetryableTransientError, o as planFailedOps, ot as LockManager, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as MissingCdkCliError, pt as buildAssetRedirectMap, q as assertRegionMatch, qt as findLargeInlineResources, r as DeployEngine, rn as setAwsClients, rt as isThrottlingError, s as planRollback, st as S3StateBackend, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as getAwsClients, tt as withRetry, u as withResourceDeadline, un as LocalMigrateError, ut as AssetPublisher, v as isFinalSnapshotError, vn as ResourceUpdateNotSupportedError, vt as BOOTSTRAP_MARKER_PREFIX, w as renderStatefulReason, wt as buildDockerImage, x as extractDeploymentEventError, xt as parseBootstrapMarker, y as refusesFinalSnapshot, yn as StackHasActiveImportsError, yt as ensureAssetStorage, z as disableInstanceApiTermination, zt as resolveStateBucketWithDefault } from "./deploy-engine-CttwgBIB.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-Cyuov8l5.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";
|
|
@@ -43,7 +43,7 @@ import readline from "node:readline/promises";
|
|
|
43
43
|
import { writeFileSync as writeFileSync$1 } from "fs";
|
|
44
44
|
import * as zlib from "node:zlib";
|
|
45
45
|
import { ApplicationAutoScalingClient, DeleteScalingPolicyCommand, DeregisterScalableTargetCommand, DescribeScalableTargetsCommand, DescribeScalingPoliciesCommand, PutScalingPolicyCommand, RegisterScalableTargetCommand } from "@aws-sdk/client-application-auto-scaling";
|
|
46
|
-
import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand, DeleteRouteCommand as DeleteRouteCommand$1, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetIntegrationCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
|
|
46
|
+
import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteAccessLogSettingsCommand, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand, DeleteRouteCommand as DeleteRouteCommand$1, DeleteRouteRequestParameterCommand, DeleteRouteSettingsCommand, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetIntegrationCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
|
|
47
47
|
import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
|
|
48
48
|
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateClusterCommand, UpdateServiceCommand, waitUntilServicesStable } from "@aws-sdk/client-ecs";
|
|
49
49
|
import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$12, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
|
|
@@ -21781,7 +21781,11 @@ var ApiGatewayV2Provider = class {
|
|
|
21781
21781
|
"Description",
|
|
21782
21782
|
"Tags",
|
|
21783
21783
|
"StageVariables",
|
|
21784
|
-
"DefaultRouteSettings"
|
|
21784
|
+
"DefaultRouteSettings",
|
|
21785
|
+
"AccessLogSettings",
|
|
21786
|
+
"ClientCertificateId",
|
|
21787
|
+
"DeploymentId",
|
|
21788
|
+
"RouteSettings"
|
|
21785
21789
|
])],
|
|
21786
21790
|
["AWS::ApiGatewayV2::Integration", /* @__PURE__ */ new Set([
|
|
21787
21791
|
"ApiId",
|
|
@@ -21800,7 +21804,12 @@ var ApiGatewayV2Provider = class {
|
|
|
21800
21804
|
"AuthorizationType",
|
|
21801
21805
|
"AuthorizerId",
|
|
21802
21806
|
"AuthorizationScopes",
|
|
21803
|
-
"OperationName"
|
|
21807
|
+
"OperationName",
|
|
21808
|
+
"ApiKeyRequired",
|
|
21809
|
+
"ModelSelectionExpression",
|
|
21810
|
+
"RequestModels",
|
|
21811
|
+
"RequestParameters",
|
|
21812
|
+
"RouteResponseSelectionExpression"
|
|
21804
21813
|
])],
|
|
21805
21814
|
["AWS::ApiGatewayV2::Authorizer", /* @__PURE__ */ new Set([
|
|
21806
21815
|
"ApiId",
|
|
@@ -21959,6 +21968,10 @@ var ApiGatewayV2Provider = class {
|
|
|
21959
21968
|
Description: properties["Description"],
|
|
21960
21969
|
StageVariables: properties["StageVariables"],
|
|
21961
21970
|
DefaultRouteSettings: properties["DefaultRouteSettings"],
|
|
21971
|
+
AccessLogSettings: properties["AccessLogSettings"],
|
|
21972
|
+
ClientCertificateId: properties["ClientCertificateId"],
|
|
21973
|
+
DeploymentId: properties["DeploymentId"],
|
|
21974
|
+
RouteSettings: properties["RouteSettings"],
|
|
21962
21975
|
Tags: this.cfnTagsToRecord(properties["Tags"])
|
|
21963
21976
|
}));
|
|
21964
21977
|
this.logger.debug(`Successfully created API Gateway V2 Stage ${logicalId}: ${stageName}`);
|
|
@@ -22056,7 +22069,12 @@ var ApiGatewayV2Provider = class {
|
|
|
22056
22069
|
AuthorizationType: properties["AuthorizationType"],
|
|
22057
22070
|
AuthorizerId: properties["AuthorizerId"],
|
|
22058
22071
|
AuthorizationScopes: properties["AuthorizationScopes"],
|
|
22059
|
-
OperationName: properties["OperationName"]
|
|
22072
|
+
OperationName: properties["OperationName"],
|
|
22073
|
+
ApiKeyRequired: properties["ApiKeyRequired"],
|
|
22074
|
+
ModelSelectionExpression: properties["ModelSelectionExpression"],
|
|
22075
|
+
RequestModels: properties["RequestModels"],
|
|
22076
|
+
RequestParameters: properties["RequestParameters"],
|
|
22077
|
+
RouteResponseSelectionExpression: properties["RouteResponseSelectionExpression"]
|
|
22060
22078
|
}))).RouteId;
|
|
22061
22079
|
this.logger.debug(`Successfully created API Gateway V2 Route ${logicalId}: ${routeId}`);
|
|
22062
22080
|
return {
|
|
@@ -22196,6 +22214,10 @@ var ApiGatewayV2Provider = class {
|
|
|
22196
22214
|
result["Description"] = resp.Description ?? "";
|
|
22197
22215
|
if (resp.StageVariables !== void 0) result["StageVariables"] = resp.StageVariables;
|
|
22198
22216
|
if (resp.DefaultRouteSettings !== void 0) result["DefaultRouteSettings"] = resp.DefaultRouteSettings;
|
|
22217
|
+
if (resp.AccessLogSettings !== void 0) result["AccessLogSettings"] = resp.AccessLogSettings;
|
|
22218
|
+
if (resp.ClientCertificateId !== void 0) result["ClientCertificateId"] = resp.ClientCertificateId;
|
|
22219
|
+
if (properties?.["DeploymentId"] !== void 0 && resp.DeploymentId !== void 0) result["DeploymentId"] = resp.DeploymentId;
|
|
22220
|
+
if (resp.RouteSettings !== void 0) result["RouteSettings"] = resp.RouteSettings;
|
|
22199
22221
|
return result;
|
|
22200
22222
|
} catch (err) {
|
|
22201
22223
|
if (err instanceof NotFoundException$3) return void 0;
|
|
@@ -22241,6 +22263,11 @@ var ApiGatewayV2Provider = class {
|
|
|
22241
22263
|
result["AuthorizationScopes"] = resp.AuthorizationScopes ? [...resp.AuthorizationScopes] : [];
|
|
22242
22264
|
}
|
|
22243
22265
|
if (resp.OperationName !== void 0) result["OperationName"] = resp.OperationName;
|
|
22266
|
+
result["ApiKeyRequired"] = resp.ApiKeyRequired ?? false;
|
|
22267
|
+
if (resp.ModelSelectionExpression !== void 0) result["ModelSelectionExpression"] = resp.ModelSelectionExpression;
|
|
22268
|
+
if (resp.RequestModels !== void 0) result["RequestModels"] = resp.RequestModels;
|
|
22269
|
+
if (resp.RequestParameters !== void 0) result["RequestParameters"] = resp.RequestParameters;
|
|
22270
|
+
if (resp.RouteResponseSelectionExpression !== void 0) result["RouteResponseSelectionExpression"] = resp.RouteResponseSelectionExpression;
|
|
22244
22271
|
return result;
|
|
22245
22272
|
} catch (err) {
|
|
22246
22273
|
if (err instanceof NotFoundException$3) return void 0;
|
|
@@ -22400,8 +22427,11 @@ var ApiGatewayV2Provider = class {
|
|
|
22400
22427
|
* `UpdateStage` keys on `(ApiId, StageName)` — `StageName` is the
|
|
22401
22428
|
* physicalId and immutable. Mutable fields cdkd manages:
|
|
22402
22429
|
* `AutoDeploy` / `Description` / `StageVariables` /
|
|
22403
|
-
* `DefaultRouteSettings
|
|
22404
|
-
*
|
|
22430
|
+
* `DefaultRouteSettings` / `AccessLogSettings` / `ClientCertificateId` /
|
|
22431
|
+
* `DeploymentId` / `RouteSettings`. `ApiId` is also immutable (a stage
|
|
22432
|
+
* cannot be moved between APIs). `AccessLogSettings` and per-key
|
|
22433
|
+
* `RouteSettings` can only be CLEARED through their dedicated delete APIs —
|
|
22434
|
+
* see {@link applyStageRemovals}.
|
|
22405
22435
|
*/
|
|
22406
22436
|
async updateStage(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
22407
22437
|
const apiId = properties["ApiId"] ?? previousProperties["ApiId"];
|
|
@@ -22435,7 +22465,40 @@ var ApiGatewayV2Provider = class {
|
|
|
22435
22465
|
input.DefaultRouteSettings = properties["DefaultRouteSettings"];
|
|
22436
22466
|
changed = true;
|
|
22437
22467
|
}
|
|
22468
|
+
if (properties["AccessLogSettings"] !== void 0 && !this.deepEqual(properties["AccessLogSettings"], previousProperties["AccessLogSettings"])) {
|
|
22469
|
+
input.AccessLogSettings = properties["AccessLogSettings"];
|
|
22470
|
+
changed = true;
|
|
22471
|
+
}
|
|
22472
|
+
const accessLogRemoved = properties["AccessLogSettings"] === void 0 && previousProperties["AccessLogSettings"] !== void 0;
|
|
22473
|
+
if (properties["RouteSettings"] !== void 0 && !this.deepEqual(properties["RouteSettings"], previousProperties["RouteSettings"])) {
|
|
22474
|
+
input.RouteSettings = properties["RouteSettings"];
|
|
22475
|
+
changed = true;
|
|
22476
|
+
}
|
|
22477
|
+
const droppedRouteSettingKeys = this.droppedKeys(properties["RouteSettings"], previousProperties["RouteSettings"]);
|
|
22478
|
+
{
|
|
22479
|
+
const r = this.clearableUpdate(properties["ClientCertificateId"], previousProperties["ClientCertificateId"], "");
|
|
22480
|
+
if (r.changed) {
|
|
22481
|
+
input.ClientCertificateId = r.value;
|
|
22482
|
+
changed = true;
|
|
22483
|
+
}
|
|
22484
|
+
}
|
|
22485
|
+
if (properties["DeploymentId"] !== void 0 && properties["DeploymentId"] !== previousProperties["DeploymentId"]) {
|
|
22486
|
+
input.DeploymentId = properties["DeploymentId"];
|
|
22487
|
+
changed = true;
|
|
22488
|
+
}
|
|
22438
22489
|
if (!changed) {
|
|
22490
|
+
if (accessLogRemoved || droppedRouteSettingKeys.length > 0) {
|
|
22491
|
+
try {
|
|
22492
|
+
await this.applyStageRemovals(apiId, physicalId, accessLogRemoved, droppedRouteSettingKeys);
|
|
22493
|
+
} catch (error) {
|
|
22494
|
+
const cause = error instanceof Error ? error : void 0;
|
|
22495
|
+
throw new ProvisioningError(`Failed to update API Gateway V2 Stage ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
22496
|
+
}
|
|
22497
|
+
return {
|
|
22498
|
+
physicalId,
|
|
22499
|
+
wasReplaced: false
|
|
22500
|
+
};
|
|
22501
|
+
}
|
|
22439
22502
|
this.logger.debug(`No mutable Stage fields changed for ${logicalId}; skipping UpdateStage`);
|
|
22440
22503
|
return {
|
|
22441
22504
|
physicalId,
|
|
@@ -22445,6 +22508,7 @@ var ApiGatewayV2Provider = class {
|
|
|
22445
22508
|
this.logger.debug(`Updating API Gateway V2 Stage ${logicalId}: ${physicalId}`);
|
|
22446
22509
|
try {
|
|
22447
22510
|
await this.getClient().send(new UpdateStageCommand$1(input));
|
|
22511
|
+
await this.applyStageRemovals(apiId, physicalId, accessLogRemoved, droppedRouteSettingKeys);
|
|
22448
22512
|
return {
|
|
22449
22513
|
physicalId,
|
|
22450
22514
|
wasReplaced: false
|
|
@@ -22525,7 +22589,9 @@ var ApiGatewayV2Provider = class {
|
|
|
22525
22589
|
/**
|
|
22526
22590
|
* `UpdateRoute` keys on `(ApiId, RouteId)`. Mutable fields cdkd
|
|
22527
22591
|
* manages: `RouteKey` / `Target` / `AuthorizationType` /
|
|
22528
|
-
* `AuthorizerId` / `AuthorizationScopes` / `OperationName
|
|
22592
|
+
* `AuthorizerId` / `AuthorizationScopes` / `OperationName` /
|
|
22593
|
+
* `ApiKeyRequired` / `RequestModels` / `RequestParameters` /
|
|
22594
|
+
* `ModelSelectionExpression` / `RouteResponseSelectionExpression`.
|
|
22529
22595
|
*/
|
|
22530
22596
|
async updateRoute(logicalId, physicalId, resourceType, properties, previousProperties) {
|
|
22531
22597
|
const apiId = properties["ApiId"] ?? previousProperties["ApiId"];
|
|
@@ -22572,7 +22638,46 @@ var ApiGatewayV2Provider = class {
|
|
|
22572
22638
|
changed = true;
|
|
22573
22639
|
}
|
|
22574
22640
|
}
|
|
22641
|
+
{
|
|
22642
|
+
const r = this.clearableUpdate(properties["ApiKeyRequired"], previousProperties["ApiKeyRequired"], false);
|
|
22643
|
+
if (r.changed) {
|
|
22644
|
+
input.ApiKeyRequired = r.value;
|
|
22645
|
+
changed = true;
|
|
22646
|
+
}
|
|
22647
|
+
}
|
|
22648
|
+
{
|
|
22649
|
+
const merged = this.mapWithRemovals(properties["RequestModels"], previousProperties["RequestModels"]);
|
|
22650
|
+
if (merged !== void 0) {
|
|
22651
|
+
input.RequestModels = merged;
|
|
22652
|
+
changed = true;
|
|
22653
|
+
}
|
|
22654
|
+
}
|
|
22655
|
+
if (properties["RequestParameters"] !== void 0 && !this.deepEqual(properties["RequestParameters"], previousProperties["RequestParameters"])) {
|
|
22656
|
+
input.RequestParameters = properties["RequestParameters"];
|
|
22657
|
+
changed = true;
|
|
22658
|
+
}
|
|
22659
|
+
const droppedRequestParameterKeys = this.droppedKeys(properties["RequestParameters"], previousProperties["RequestParameters"]);
|
|
22660
|
+
if (properties["ModelSelectionExpression"] !== void 0 && properties["ModelSelectionExpression"] !== previousProperties["ModelSelectionExpression"]) {
|
|
22661
|
+
input.ModelSelectionExpression = properties["ModelSelectionExpression"];
|
|
22662
|
+
changed = true;
|
|
22663
|
+
}
|
|
22664
|
+
if (properties["RouteResponseSelectionExpression"] !== void 0 && properties["RouteResponseSelectionExpression"] !== previousProperties["RouteResponseSelectionExpression"]) {
|
|
22665
|
+
input.RouteResponseSelectionExpression = properties["RouteResponseSelectionExpression"];
|
|
22666
|
+
changed = true;
|
|
22667
|
+
}
|
|
22575
22668
|
if (!changed) {
|
|
22669
|
+
if (droppedRequestParameterKeys.length > 0) {
|
|
22670
|
+
try {
|
|
22671
|
+
await this.deleteRouteRequestParameters(apiId, physicalId, droppedRequestParameterKeys);
|
|
22672
|
+
} catch (error) {
|
|
22673
|
+
const cause = error instanceof Error ? error : void 0;
|
|
22674
|
+
throw new ProvisioningError(`Failed to update API Gateway V2 Route ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
|
|
22675
|
+
}
|
|
22676
|
+
return {
|
|
22677
|
+
physicalId,
|
|
22678
|
+
wasReplaced: false
|
|
22679
|
+
};
|
|
22680
|
+
}
|
|
22576
22681
|
this.logger.debug(`No mutable Route fields changed for ${logicalId}; skipping UpdateRoute`);
|
|
22577
22682
|
return {
|
|
22578
22683
|
physicalId,
|
|
@@ -22582,6 +22687,7 @@ var ApiGatewayV2Provider = class {
|
|
|
22582
22687
|
this.logger.debug(`Updating API Gateway V2 Route ${logicalId}: ${physicalId}`);
|
|
22583
22688
|
try {
|
|
22584
22689
|
await this.getClient().send(new UpdateRouteCommand(input));
|
|
22690
|
+
await this.deleteRouteRequestParameters(apiId, physicalId, droppedRequestParameterKeys);
|
|
22585
22691
|
return {
|
|
22586
22692
|
physicalId,
|
|
22587
22693
|
wasReplaced: false
|
|
@@ -22722,16 +22828,85 @@ var ApiGatewayV2Provider = class {
|
|
|
22722
22828
|
};
|
|
22723
22829
|
}
|
|
22724
22830
|
/**
|
|
22725
|
-
*
|
|
22726
|
-
*
|
|
22831
|
+
* Keys present in `previous` but absent from `next` — the set a
|
|
22832
|
+
* merge-semantics map silently keeps unless each is deleted BY NAME. A
|
|
22833
|
+
* whole-block removal (`next` undefined) therefore yields every previous key.
|
|
22834
|
+
*/
|
|
22835
|
+
droppedKeys(next, previous) {
|
|
22836
|
+
if (previous == null || typeof previous !== "object" || Array.isArray(previous)) return [];
|
|
22837
|
+
const prevMap = previous;
|
|
22838
|
+
const nextMap = next != null && typeof next === "object" && !Array.isArray(next) ? next : {};
|
|
22839
|
+
return Object.keys(prevMap).filter((key) => !Object.prototype.hasOwnProperty.call(nextMap, key));
|
|
22840
|
+
}
|
|
22841
|
+
/**
|
|
22842
|
+
* Send a delete that is idempotent by intent.
|
|
22843
|
+
*
|
|
22844
|
+
* These removal deletes run AFTER the merge-Update in the same update, so a
|
|
22845
|
+
* partial failure (throttle on the second of two) leaves state unsaved and
|
|
22846
|
+
* the next deploy recomputes the SAME dropped-key set and re-issues an
|
|
22847
|
+
* already-applied delete. A console-side removal produces the same shape.
|
|
22848
|
+
* Treating NotFound as success is what keeps that from becoming a permanent
|
|
22849
|
+
* failure loop.
|
|
22850
|
+
*/
|
|
22851
|
+
async sendTolerantOfNotFound(send) {
|
|
22852
|
+
try {
|
|
22853
|
+
await send();
|
|
22854
|
+
} catch (error) {
|
|
22855
|
+
if (error instanceof NotFoundException$3) return;
|
|
22856
|
+
throw error;
|
|
22857
|
+
}
|
|
22858
|
+
}
|
|
22859
|
+
/**
|
|
22860
|
+
* The two Stage members `UpdateStage` cannot clear.
|
|
22861
|
+
*
|
|
22862
|
+
* Both MERGE server-side — live-probed 2026-08-11: a stage keeps its
|
|
22863
|
+
* `AccessLogSettings` verbatim through an `UpdateStage` that omits the
|
|
22864
|
+
* member — so a removal that only omits the field is the silent no-op issue
|
|
22865
|
+
* #1160 tracks (access logging, and its billing, keep running). AWS ships
|
|
22866
|
+
* dedicated delete APIs for both; this mirrors the `DeleteCorsConfiguration`
|
|
22867
|
+
* path on `::Api`.
|
|
22868
|
+
*
|
|
22869
|
+
* KNOWN BOUND: `DeleteRouteSettings` removes a whole ROUTE KEY, so dropping
|
|
22870
|
+
* one member INSIDE a kept entry (`LoggingLevel` while `ThrottlingRateLimit`
|
|
22871
|
+
* stays) still merges and survives — the #1225 sub-field class, one level
|
|
22872
|
+
* below what this closes. Same for a partial `AccessLogSettings`.
|
|
22873
|
+
*/
|
|
22874
|
+
async applyStageRemovals(apiId, stageName, accessLogRemoved, droppedRouteSettingKeys) {
|
|
22875
|
+
if (accessLogRemoved) await this.sendTolerantOfNotFound(() => this.getClient().send(new DeleteAccessLogSettingsCommand({
|
|
22876
|
+
ApiId: apiId,
|
|
22877
|
+
StageName: stageName
|
|
22878
|
+
})));
|
|
22879
|
+
for (const routeKey of droppedRouteSettingKeys) await this.sendTolerantOfNotFound(() => this.getClient().send(new DeleteRouteSettingsCommand({
|
|
22880
|
+
ApiId: apiId,
|
|
22881
|
+
StageName: stageName,
|
|
22882
|
+
RouteKey: routeKey
|
|
22883
|
+
})));
|
|
22884
|
+
}
|
|
22885
|
+
/**
|
|
22886
|
+
* `RequestParameters` on a Route is an OBJECT-valued merge map, so a dropped
|
|
22887
|
+
* key needs the per-key delete API (live-probed 2026-08-11:
|
|
22888
|
+
* `DeleteRouteRequestParameter` clears exactly one parameter).
|
|
22889
|
+
*/
|
|
22890
|
+
async deleteRouteRequestParameters(apiId, routeId, droppedKeys) {
|
|
22891
|
+
for (const key of droppedKeys) await this.sendTolerantOfNotFound(() => this.getClient().send(new DeleteRouteRequestParameterCommand({
|
|
22892
|
+
ApiId: apiId,
|
|
22893
|
+
RouteId: routeId,
|
|
22894
|
+
RequestParameterKey: key
|
|
22895
|
+
})));
|
|
22896
|
+
}
|
|
22897
|
+
/**
|
|
22898
|
+
* Resolve a `Record<string, string>` update field (`StageVariables`, Route
|
|
22899
|
+
* `RequestModels`, Integration `RequestParameters`) with per-key removal
|
|
22900
|
+
* awareness.
|
|
22727
22901
|
*
|
|
22728
22902
|
* These maps also merge on the AWS side: sending `{}` (or a map missing
|
|
22729
22903
|
* a previously-present key) does NOT delete the dropped key — it is kept
|
|
22730
|
-
* live. Live-probed 2026-07-22
|
|
22731
|
-
* an empty-string value. So the
|
|
22732
|
-
*
|
|
22733
|
-
* removal (next `undefined`, previous
|
|
22734
|
-
* old key as `''`. Returns `undefined` when
|
|
22904
|
+
* live. Live-probed 2026-07-22 (and again 2026-08-11 for `RequestModels`):
|
|
22905
|
+
* a key is cleared only by sending it with an empty-string value. So the
|
|
22906
|
+
* resolved map is `next` plus every key present in `previous` but absent
|
|
22907
|
+
* from `next`, set to `''`. Whole-block removal (next `undefined`, previous
|
|
22908
|
+
* populated) therefore sends every old key as `''`. Returns `undefined` when
|
|
22909
|
+
* nothing changed.
|
|
22735
22910
|
*/
|
|
22736
22911
|
mapWithRemovals(next, previous) {
|
|
22737
22912
|
if (this.deepEqual(next, previous)) return void 0;
|
|
@@ -68374,7 +68549,7 @@ function createMigrateCommand() {
|
|
|
68374
68549
|
*/
|
|
68375
68550
|
function buildProgram() {
|
|
68376
68551
|
const program = new Command();
|
|
68377
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.
|
|
68552
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.4");
|
|
68378
68553
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
68379
68554
|
const { profile } = actionCommand.optsWithGlobals();
|
|
68380
68555
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|