@go-to-k/cdkd 0.285.10 → 0.285.12

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Br as StateError, Bt as DiffCalculator, Cr as ConfigError, Fr as ProvisioningError, Gt as TemplateParser, Hr as formatError, K as ProviderRegistry, Sr as CdkdError, Tr as DependencyError, U as IAMRoleProvider, Un as Synthesizer, Ur as isCdkdError, Vr as SynthesisError, Wr as normalizeAwsError, Wt as DagBuilder, _r as AwsClients, at as CloudControlProvider, br as setAwsClients, gr as resolveBucketRegion, hr as clearBucketRegionCache, jr as LockError, on as LockManager, pn as AssetPublisher, pr as AssemblyReader, r as DeployEngine, sn as S3StateBackend, vr as getAwsClients, xr as AssetError, yr as resetAwsClients } from "./deploy-engine-CB7zpRu0.js";
1
+ import { Br as StateError, Bt as DiffCalculator, Cr as ConfigError, Fr as ProvisioningError, Gt as TemplateParser, Hr as formatError, K as ProviderRegistry, Sr as CdkdError, Tr as DependencyError, U as IAMRoleProvider, Un as Synthesizer, Ur as isCdkdError, Vr as SynthesisError, Wr as normalizeAwsError, Wt as DagBuilder, _r as AwsClients, at as CloudControlProvider, br as setAwsClients, gr as resolveBucketRegion, hr as clearBucketRegionCache, jr as LockError, on as LockManager, pn as AssetPublisher, pr as AssemblyReader, r as DeployEngine, sn as S3StateBackend, vr as getAwsClients, xr as AssetError, yr as resetAwsClients } from "./deploy-engine-C3epVkTj.js";
2
2
  import { a as setLogger, n as getLogger, t as ConsoleLogger } from "./logger-Dw-3y48G.js";
3
3
 
4
4
  export { AssemblyReader, AssetError, AssetPublisher, AwsClients, CdkdError, CloudControlProvider, ConfigError, ConsoleLogger, DagBuilder, DependencyError, DeployEngine, DiffCalculator, IAMRoleProvider, LockError, LockManager, ProviderRegistry, ProvisioningError, S3StateBackend, StateError, SynthesisError, Synthesizer, TemplateParser, clearBucketRegionCache, formatError, getAwsClients, getLogger, isCdkdError, normalizeAwsError, resetAwsClients, resolveBucketRegion, setAwsClients, setLogger };
@@ -1,8 +1,8 @@
1
- import { $ as DEFAULT_STATE_PREFIX, $n as resolveUseCdkBootstrapAssets, $t as isSingleDynamicReferenceToken, A as bold, An as validateAssetBucketName, Ar as LocalStartServiceError, At as requireConfigObject, B as secretBearingStateKeyWarning, Bn as runDockerStreaming, Bt as DiffCalculator, C as unsupportedFinalSnapshotError, Cn as BOOTSTRAP_MARKER_PREFIX, Ct as assertRegionMatch, D as isStatefulRecreateTargetSync, Dn as isCrossRegionRedirect, Dr as DynamicReferenceRegionAmbiguousError, Dt as readConfigString, E as MULTI_REGION_RECREATE_BLOCKED_TYPES, En as getBootstrapMarkerKey, Er as DeployCancelledError, Et as configStringRefusal, F as yellow, Fn as dockerSpawnEnvWithSensitive, Fr as ProvisioningError, Ft as s3BucketDomainName, G as clearOnUpdateRemoval, Gn as getDefaultStateBucketName, Gr as withErrorHandling, Gt as TemplateParser, H as getCurrentResourceSecrets, Hn as getDockerImageBySourceHash, Ht as describeTypeWithThrottleRetry, I as collectDeclaredOutputNames, In as formatDockerLoginError, Ir as ResourceTimeoutError, It as s3BucketDualStackDomainName, J as findSilentDropProperties, Jn as resolveAutoAssetStorage, Jr as isThrottlingError, Jt as TEMPLATE_SOURCED_RULES, K as ProviderRegistry, Kn as getLegacyStateBucketName, Kr as isMarkedNonRetryable, Kt as STATE_SOURCED_CROSS_GENERATION_RULES, L as collectPublishedOutputNames, Ln as getDockerCmd, Lr as ResourceUpdateNotSupportedError, Lt as s3BucketRegionalDomainName, M as gray, Mn as buildDenyExternalAccessPolicy, Mr as MissingCdkCliError, Mt as classifyReplaySecretRegion, N as green, Nn as describeAwsFailure, Nr as NestedStackChildDirectDestroyError, Nt as producerRegionsFromState, O as renderStatefulReason, On as parseBootstrapMarker, Or as LocalInvokeBuildError$1, Ot as replayWarn, P as red, Pn as buildDockerImage, Pr as PartialFailureError, Pt as s3BucketArn, Q as CUSTOM_RESOURCE_RESPONSE_PREFIX, Qn as resolveStateBucketWithDefaultAndSource, Qr as retryClassificationText, Qt as errorCauseChain, R as exportAliasCollisionScrubWarning, Rn as partitionSensitiveEnv, Rr as StackHasActiveImportsError, Rt as s3BucketWebsiteUrl, S as refusesFinalSnapshot, Sn as AssetModeResolver, Sr as CdkdError, St as resolveExplicitPhysicalId, T as extractDeploymentEventError, Tn as ensureAssetStorage, Tt as configBooleanRefusal, U as IAMRoleProvider, Un as Synthesizer, Ut as withRetry, V as stateKeySecretExposure, Vn as AssetManifestLoader, Vt as INTRINSIC_KEYS, W as collectInlinePolicyNamesManagedBySiblings, Wn as synthesisStatusMessage, Wr as normalizeAwsError, Wt as DagBuilder, X as maskDeep, Xn as resolveSkipPrefix, Xr as markNonRetryable, Xt as createSecretMasker, Y as createMaskedRetryLogger, Yn as resolveCaptureObservedState, Yr as isTransientServerError, Yt as carriesSecretMask, Z as maskerOrIdentity, Zn as resolveStateBucketWithDefault, Zr as markRedactedCause, Zt as dynamicReferenceTokens, _ as PRE_DELETE_SNAPSHOT_TYPES, _n as createAssetRedirectResolver, _r as AwsClients, _t as isUnboundTemplateParameter, a as DeploymentEventsStore, an as scrubResourceRecord, ar as findLargeInlineResources, at as CloudControlProvider, b as createPreDeleteFinalSnapshot, bn as escapeRegExp, br as setAwsClients, bt as WAFv2WebACLProvider, c as replayFailedOperations, cn as rebuildClientForBucketRegion, cr as displaySafe, ct as deleteIndeterminateGuards, d as updatePartialReason, dn as importableOutputs, dr as canonicalizeRegion, dt as isTerminationProtectionPropagationError, en as maskSecretsInError, er as stateBucketExistenceConfirmed, et as beginCommandInterruptScope, f as withResourceDeadline, fn as shouldRetainResource, fr as derivePartitionAndUrlSuffix, ft as IntrinsicFunctionResolver, g as ATOMIC_FINAL_SNAPSHOT_TYPES, gn as buildAssetRedirectMap, gr as resolveBucketRegion, gt as getAccountInfo, h as computeImplicitDeleteEdges, hn as WorkGraph, ht as coerceParameterTypedValue, i as DeploymentEventsReader, in as redactSecretsForState, ir as MIGRATE_TMP_PREFIX, it as startInterruptWatch, j as cyan, jn as validateContainerRepoName, jt as requireConfigString, k as formatResourceLine, kn as readBootstrapMarkerBody, kr as LocalMigrateError, kt as requireConfigArray, l as replayRollback, ln as exportNamesCarriedFrom, lr as expectedOwnerParam, lt as deleteSkipReason, m as IMPLICIT_DELETE_DEPENDENCIES, mn as stringifyValue, mr as processStackMessages, mt as cfnRefValueFromPhysicalId, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as recordMaskOnlyValue, nr as CFN_TEMPLATE_BODY_LIMIT, nt as interruptWatchListenerCount, o as planFailedOps, on as LockManager, or as uploadCfnTemplate, ot as slowCcOperationTimeoutMs, p as maskingRetryLogger, pn as AssetPublisher, pr as AssemblyReader, pt as carriesDynamicReference, q as findActionableSilentDrops, qn as resolveApp, qr as isRetryableTransientError, qt as STATE_SOURCED_READBACK_RULES, r as DeployEngine, rn as recoverMaskedOutput, rr as CFN_TEMPLATE_URL_LIMIT, rt as isInterruptedWaitError, s as planRollback, sn as S3StateBackend, sr as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, st as UNSPECIFIED_SKIP_REASON, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as maskSecretsInText, tr as warnDeprecatedNoPrefixCliFlag, tt as endCommandInterruptScope, u as updatePartialMessage, un as importableOutputKeys, ur as PARTITION_TABLE, ut as disableInstanceApiTermination, v as buildFinalSnapshotIdentifier, vn as loadPublishableAssetManifest, vr as getAwsClients, vt as parameterTypeMayLoseSecretIdentity, w as makeCanonicalizePropertiesFn, wn as assertAssetBucketRegion, wr as CrossAccountSecretRefusalError, wt as coerceCfnBoolean, x as isFinalSnapshotError, xn as stripControlChars, xt as normalizeAwsTagsToCfn, y as ccRoutedFinalSnapshotError, yn as rewriteTemplateAssetReferences, yr as resetAwsClients, yt as refStateLookupFromResource, z as isExportAliasCollision, zn as runDockerForeground, zr as StackTerminationProtectionError, zt as applyRoleArnIfSet } from "./deploy-engine-CB7zpRu0.js";
1
+ import { $ as DEFAULT_STATE_PREFIX, $n as resolveUseCdkBootstrapAssets, $t as isSingleDynamicReferenceToken, A as bold, An as validateAssetBucketName, Ar as LocalStartServiceError, At as requireConfigObject, B as secretBearingStateKeyWarning, Bn as runDockerStreaming, Bt as DiffCalculator, C as unsupportedFinalSnapshotError, Cn as BOOTSTRAP_MARKER_PREFIX, Ct as assertRegionMatch, D as isStatefulRecreateTargetSync, Dn as isCrossRegionRedirect, Dr as DynamicReferenceRegionAmbiguousError, Dt as readConfigString, E as MULTI_REGION_RECREATE_BLOCKED_TYPES, En as getBootstrapMarkerKey, Er as DeployCancelledError, Et as configStringRefusal, F as yellow, Fn as dockerSpawnEnvWithSensitive, Fr as ProvisioningError, Ft as s3BucketDomainName, G as clearOnUpdateRemoval, Gn as getDefaultStateBucketName, Gr as withErrorHandling, Gt as TemplateParser, H as getCurrentResourceSecrets, Hn as getDockerImageBySourceHash, Ht as describeTypeWithThrottleRetry, I as collectDeclaredOutputNames, In as formatDockerLoginError, Ir as ResourceTimeoutError, It as s3BucketDualStackDomainName, J as findSilentDropProperties, Jn as resolveAutoAssetStorage, Jr as isThrottlingError, Jt as TEMPLATE_SOURCED_RULES, K as ProviderRegistry, Kn as getLegacyStateBucketName, Kr as isMarkedNonRetryable, Kt as STATE_SOURCED_CROSS_GENERATION_RULES, L as collectPublishedOutputNames, Ln as getDockerCmd, Lr as ResourceUpdateNotSupportedError, Lt as s3BucketRegionalDomainName, M as gray, Mn as buildDenyExternalAccessPolicy, Mr as MissingCdkCliError, Mt as classifyReplaySecretRegion, N as green, Nn as describeAwsFailure, Nr as NestedStackChildDirectDestroyError, Nt as producerRegionsFromState, O as renderStatefulReason, On as parseBootstrapMarker, Or as LocalInvokeBuildError$1, Ot as replayWarn, P as red, Pn as buildDockerImage, Pr as PartialFailureError, Pt as s3BucketArn, Q as CUSTOM_RESOURCE_RESPONSE_PREFIX, Qn as resolveStateBucketWithDefaultAndSource, Qr as retryClassificationText, Qt as errorCauseChain, R as exportAliasCollisionScrubWarning, Rn as partitionSensitiveEnv, Rr as StackHasActiveImportsError, Rt as s3BucketWebsiteUrl, S as refusesFinalSnapshot, Sn as AssetModeResolver, Sr as CdkdError, St as resolveExplicitPhysicalId, T as extractDeploymentEventError, Tn as ensureAssetStorage, Tt as configBooleanRefusal, U as IAMRoleProvider, Un as Synthesizer, Ut as withRetry, V as stateKeySecretExposure, Vn as AssetManifestLoader, Vt as INTRINSIC_KEYS, W as collectInlinePolicyNamesManagedBySiblings, Wn as synthesisStatusMessage, Wr as normalizeAwsError, Wt as DagBuilder, X as maskDeep, Xn as resolveSkipPrefix, Xr as markNonRetryable, Xt as createSecretMasker, Y as createMaskedRetryLogger, Yn as resolveCaptureObservedState, Yr as isTransientServerError, Yt as carriesSecretMask, Z as maskerOrIdentity, Zn as resolveStateBucketWithDefault, Zr as markRedactedCause, Zt as dynamicReferenceTokens, _ as PRE_DELETE_SNAPSHOT_TYPES, _n as createAssetRedirectResolver, _r as AwsClients, _t as isUnboundTemplateParameter, a as DeploymentEventsStore, an as scrubResourceRecord, ar as findLargeInlineResources, at as CloudControlProvider, b as createPreDeleteFinalSnapshot, bn as escapeRegExp, br as setAwsClients, bt as WAFv2WebACLProvider, c as replayFailedOperations, cn as rebuildClientForBucketRegion, cr as displaySafe, ct as deleteIndeterminateGuards, d as updatePartialReason, dn as importableOutputs, dr as canonicalizeRegion, dt as isTerminationProtectionPropagationError, en as maskSecretsInError, er as stateBucketExistenceConfirmed, et as beginCommandInterruptScope, f as withResourceDeadline, fn as shouldRetainResource, fr as derivePartitionAndUrlSuffix, ft as IntrinsicFunctionResolver, g as ATOMIC_FINAL_SNAPSHOT_TYPES, gn as buildAssetRedirectMap, gr as resolveBucketRegion, gt as getAccountInfo, h as computeImplicitDeleteEdges, hn as WorkGraph, ht as coerceParameterTypedValue, i as DeploymentEventsReader, in as redactSecretsForState, ir as MIGRATE_TMP_PREFIX, it as startInterruptWatch, j as cyan, jn as validateContainerRepoName, jt as requireConfigString, k as formatResourceLine, kn as readBootstrapMarkerBody, kr as LocalMigrateError, kt as requireConfigArray, l as replayRollback, ln as exportNamesCarriedFrom, lr as expectedOwnerParam, lt as deleteSkipReason, m as IMPLICIT_DELETE_DEPENDENCIES, mn as stringifyValue, mr as processStackMessages, mt as cfnRefValueFromPhysicalId, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as recordMaskOnlyValue, nr as CFN_TEMPLATE_BODY_LIMIT, nt as interruptWatchListenerCount, o as planFailedOps, on as LockManager, or as uploadCfnTemplate, ot as slowCcOperationTimeoutMs, p as maskingRetryLogger, pn as AssetPublisher, pr as AssemblyReader, pt as carriesDynamicReference, q as findActionableSilentDrops, qn as resolveApp, qr as isRetryableTransientError, qt as STATE_SOURCED_READBACK_RULES, r as DeployEngine, rn as recoverMaskedOutput, rr as CFN_TEMPLATE_URL_LIMIT, rt as isInterruptedWaitError, s as planRollback, sn as S3StateBackend, sr as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, st as UNSPECIFIED_SKIP_REASON, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as maskSecretsInText, tr as warnDeprecatedNoPrefixCliFlag, tt as endCommandInterruptScope, u as updatePartialMessage, un as importableOutputKeys, ur as PARTITION_TABLE, ut as disableInstanceApiTermination, v as buildFinalSnapshotIdentifier, vn as loadPublishableAssetManifest, vr as getAwsClients, vt as parameterTypeMayLoseSecretIdentity, w as makeCanonicalizePropertiesFn, wn as assertAssetBucketRegion, wr as CrossAccountSecretRefusalError, wt as coerceCfnBoolean, x as isFinalSnapshotError, xn as stripControlChars, xt as normalizeAwsTagsToCfn, y as ccRoutedFinalSnapshotError, yn as rewriteTemplateAssetReferences, yr as resetAwsClients, yt as refStateLookupFromResource, z as isExportAliasCollision, zn as runDockerForeground, zr as StackTerminationProtectionError, zt as applyRoleArnIfSet } from "./deploy-engine-C3epVkTj.js";
2
2
  import { _ as withStackName, c as PATTERN_B_NAME_OPTIONS, f as generateResourceName, g as withSkipPrefix, i as reserveStdoutForPayload, l as PATTERN_B_NAME_PROPERTIES, m as getCurrentStackName, n as getLogger, o as runStackBuffered, p as generateResourceNameWithFallback, s as getLiveRenderer, u as PATTERN_B_RESOURCE_TYPES } from "./logger-Dw-3y48G.js";
3
3
  import { t as awsClientDefaults } from "./aws-client-defaults-D-iYiIJ6.js";
4
- import { t as getCdkdVersion } from "./version-CR046mQU.js";
5
- import { t as ASGProvider } from "./asg-provider-BBky5qYW.js";
4
+ import { t as getCdkdVersion } from "./version-CS-eKBJA.js";
5
+ import { t as ASGProvider } from "./asg-provider-CXkE2U3z.js";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
7
7
  import { createHash, randomBytes, randomUUID } from "node:crypto";
8
8
  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";
@@ -42,8 +42,10 @@ import { Command, Option } from "commander";
42
42
  import * as readline$1 from "node:readline/promises";
43
43
  import readline from "node:readline/promises";
44
44
  import { writeFileSync as writeFileSync$1 } from "fs";
45
+ import { Document, Pair, Scalar, YAMLMap, YAMLSeq, isScalar, parse, stringify, visit } from "yaml";
45
46
  import * as zlib from "node:zlib";
46
47
  import { ApplicationAutoScalingClient, DeleteScalingPolicyCommand, DeregisterScalableTargetCommand, DescribeScalableTargetsCommand, DescribeScalingPoliciesCommand, PutScalingPolicyCommand, RegisterScalableTargetCommand } from "@aws-sdk/client-application-auto-scaling";
48
+ import { isDeepStrictEqual, promisify } from "node:util";
47
49
  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";
48
50
  import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
49
51
  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";
@@ -52,7 +54,7 @@ import { AddTagsToResourceCommand as AddTagsToResourceCommand$4, CreateDBCluster
52
54
  import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$9, SetUserPoolMfaConfigCommand, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
53
55
  import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, NamespaceNotFound, ResourceInUse, ServiceDiscoveryClient, ServiceNotFound, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$15, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
54
56
  import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetGraphqlApiEnvironmentVariablesCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, NotFoundException as NotFoundException$4, PutGraphqlApiEnvironmentVariablesCommand, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
55
- import { parse, print } from "graphql";
57
+ import { parse as parse$1, print } from "graphql";
56
58
  import { ConcurrentModificationException, CrawlerRunningException, CreateConnectionCommand, CreateCrawlerCommand, CreateDatabaseCommand, CreateJobCommand, CreateSecurityConfigurationCommand, CreateTableCommand as CreateTableCommand$1, CreateTriggerCommand, CreateWorkflowCommand, DeleteConnectionCommand, DeleteCrawlerCommand, DeleteDatabaseCommand, DeleteJobCommand, DeleteSecurityConfigurationCommand, DeleteTableCommand as DeleteTableCommand$1, DeleteTriggerCommand, DeleteWorkflowCommand, EntityNotFoundException, GetConnectionCommand, GetCrawlerCommand, GetDatabaseCommand, GetJobCommand, GetSecurityConfigurationCommand, GetTableCommand, GetTagsCommand, GetTriggerCommand, GetWorkflowCommand, GlueClient, StartCrawlerScheduleCommand, StartTriggerCommand, StopCrawlerCommand, StopCrawlerScheduleCommand, StopTriggerCommand, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
57
59
  import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DuplicateRecordException, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
58
60
  import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, DisableEnhancedMonitoringCommand, EnableEnhancedMonitoringCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$15, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$10, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18, UpdateMaxRecordSizeCommand, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
@@ -69,11 +71,9 @@ import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand a
69
71
  import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, S3VectorsClient, TagResourceCommand as TagResourceCommand$22, UntagResourceCommand as UntagResourceCommand$22 } from "@aws-sdk/client-s3vectors";
70
72
  import { ListTagsForResourceCommand as ListTagsForResourceCommand$18, S3ControlClient, TagResourceCommand as TagResourceCommand$23, UntagResourceCommand as UntagResourceCommand$23 } from "@aws-sdk/client-s3-control";
71
73
  import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableCommand as DeleteTableCommand$2, GetNamespaceCommand as GetNamespaceCommand$1, GetTableBucketCommand, GetTableCommand as GetTableCommand$1, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$19, NotFoundException as NotFoundException$6, S3TablesClient, TagResourceCommand as TagResourceCommand$24, UntagResourceCommand as UntagResourceCommand$24 } from "@aws-sdk/client-s3tables";
72
- import { Document, Pair, Scalar, YAMLMap, YAMLSeq, parse as parse$1, stringify } from "yaml";
73
74
  import { createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
74
75
  import { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_MCP_PROTOCOL, ConnectionRegistry, EcsTaskResolutionError, HOST_GATEWAY_MIN_VERSION, LocalInvokeBuildError, MCP_CONTAINER_PORT, MCP_PATH, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addStartServiceSpecificOptions, albStrategy, architectureToPlatform, attachAuthorizers, attachStageContext, availableApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildJwksUrlFromIssuer, buildMessageEvent, buildMgmtEndpointEnvUrl, buildStageMap, classifySourceChange, createAuthorizerCache, createFileWatcher, createFileWatcher as createFileWatcher$1, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, discoverRoutes, discoverWebSocketApis, downloadAndExtractS3Bundle, filterRoutesByApiIdentifier, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseSelectionExpressionPath, pickAgentCoreCandidateStack, pickAgentCoreCandidateStack as pickAgentCoreCandidateStack$1, probeHostGatewaySupport, readMtlsMaterialsFromDisk, resolveAgentCoreTarget, resolveEnvVars, resolveHostGatewayExtraHosts, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, tryResolveImageFnJoin, verifyJwtViaDiscovery, waitForAgentCorePing } from "cdk-local/internal";
75
76
  import { createServer } from "node:net";
76
- import { promisify } from "node:util";
77
77
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
78
78
  import { mkdtemp, rm, writeFile } from "node:fs/promises";
79
79
  import { WebSocketServer } from "ws";
@@ -1749,47 +1749,205 @@ function createBootstrapCommand() {
1749
1749
  //#endregion
1750
1750
  //#region src/utils/yaml.ts
1751
1751
  /**
1752
- * Simple JSON to YAML converter (CDK CLI compatible output)
1752
+ * JSON to YAML rendering (CDK CLI compatible output)
1753
1753
  *
1754
1754
  * Used by `synth` (CloudFormation template) and `list` (long output) for
1755
- * human-friendly YAML rendering. Matches the quoting style of CDK CLI:
1756
- * single-quote JSON-like / multi-line strings, double-quote strings whose
1757
- * literal content collides with YAML scalar keywords.
1758
- */
1759
- function toYaml(obj, indent = 0) {
1760
- const prefix = " ".repeat(indent);
1761
- if (obj === null || obj === void 0) return "null\n";
1762
- if (typeof obj === "boolean") return `${obj}\n`;
1763
- if (typeof obj === "number") return `"${obj}"\n`;
1764
- if (typeof obj === "string") {
1765
- if (obj.includes("\n")) return `'${obj.replace(/'/g, "''")}'\n`;
1766
- if (obj.startsWith("{") || obj.startsWith("[") || obj.startsWith("\"")) return `'${obj.replace(/'/g, "''")}'\n`;
1767
- if (obj.includes("#") || obj === "" || obj === "true" || obj === "false" || obj === "null") return `"${obj}"\n`;
1768
- return `${obj}\n`;
1769
- }
1770
- if (Array.isArray(obj)) {
1771
- if (obj.length === 0) return "[]\n";
1772
- let result = "\n";
1773
- for (const item of obj) {
1774
- const value = toYaml(item, indent + 1).trimStart();
1775
- result += `${prefix}- ${value}`;
1776
- }
1755
+ * human-friendly YAML rendering.
1756
+ *
1757
+ * Issue [#2421](https://github.com/go-to-k/cdkd/issues/2421): this was a
1758
+ * hand-rolled emitter whose "needs quoting" predicate covered four cases (an
1759
+ * embedded newline, a leading `{` / `[` / `"`, and the literals containing
1760
+ * `#` / empty / `true` / `false` / `null`). Every other YAML indicator was
1761
+ * emitted bare, so `AllowedOrigins: ['*']` rendered as `- *` — an alias node,
1762
+ * which a parser rejects with `BAD_ALIAS`. `cdkd synth` writes this output to
1763
+ * stdout, so `cdkd synth | yq` failed on the repo's own minimal fixture.
1764
+ *
1765
+ * The fix is a change of INSTRUMENT rather than a wider predicate: quoting a
1766
+ * YAML scalar correctly is a solved problem with an unbounded number of
1767
+ * spellings to get wrong one at a time, and the `yaml` package is already a
1768
+ * runtime dependency — the same library the AWS CDK CLI does this job with
1769
+ * (`@aws-cdk/toolkit-lib/lib/util/yaml-cfn.ts`: `yaml.stringify(obj, {
1770
+ * schema: 'yaml-1.1' })` at fold width 0). So "CDK CLI compatible" is now
1771
+ * produced by the library CDK CLI uses rather than approximated. The SCHEMA
1772
+ * differs from CDK CLI's deliberately; `EMIT_OPTIONS` below carries the
1773
+ * measurement and the reason, including the one input class whose rendering
1774
+ * that choice does change.
1775
+ *
1776
+ * Measured consequence on `tests/integration/basic` (2026-09-03): of 182
1777
+ * lines, only the defect and its mirror move — `- *` becomes `- "*"`, numbers
1778
+ * stop being emitted as strings (`ExpirationInDays: 90`, not `"90"`), numeric
1779
+ * STRINGS start being quoted (`schemaVersion: "2.2"`), and the document no
1780
+ * longer opens with a blank line. Indentation, key order and sequence style
1781
+ * are byte-identical to the hand-rolled output.
1782
+ *
1783
+ * One further contract change, recorded because it is silent rather than
1784
+ * because it is reachable: an `undefined` OBJECT VALUE is now OMITTED
1785
+ * (`{ a: undefined, b: 1 }` renders `b: 1`) where the hand-rolled emitter
1786
+ * wrote `a: null`. That matches what `JSON.stringify` does, so the YAML and
1787
+ * `--json` spellings of `cdkd list` agree, and neither consumer can produce
1788
+ * one today — `synth` passes assembly JSON, and `list`'s record is built with
1789
+ * `??` defaults.
1790
+ *
1791
+ * NOT the same job as `src/cli/yaml-cfn.ts`, which emits CFn intrinsics as
1792
+ * shorthand tags (`!Ref`) for `cdkd export` / `import`. `cdk synth` prints
1793
+ * the long form (`Fn::GetAtt`), and so does this.
1794
+ */
1795
+ /**
1796
+ * The emit options, and the READERS the output has to survive.
1797
+ *
1798
+ * The correctness here comes from `READER_SCHEMAS` — the oracle below quotes
1799
+ * anything EITHER reader would hand back changed — and NOT from the emitting
1800
+ * schema. That split matters, because neither schema resolves a superset of
1801
+ * the other:
1802
+ *
1803
+ * - 1.2 core added `0o` octal, for which 1.1 has no resolver, so `'0o17'`
1804
+ * emitted bare under 1.1 would come back as the number 15 from a default
1805
+ * reader — the finding that produced this oracle, and the reason the list
1806
+ * is a list. It is currently INERT, because emitting under `core` means the
1807
+ * library has already applied core's own resolvers: measured, dropping
1808
+ * `'core'` from this list reds nothing while dropping `'yaml-1.1'` reds. It
1809
+ * stays because the emit schema has already moved once in this file's
1810
+ * history, and this list is what would keep the guarantee standing if it
1811
+ * moves again;
1812
+ * - 1.1 resolves `yes` / `no` / `on` / `off` and timestamps, which 1.2 leaves
1813
+ * alone, so those must be quoted for `yq`'s sake even though a 1.2 reader
1814
+ * would not have re-typed them.
1815
+ *
1816
+ * Emitting under `core` rather than the CDK CLI's `yaml-1.1` is therefore a
1817
+ * deliberate choice and not a drift from parity, because 1.1 carries one tag
1818
+ * that DEFEATS the oracle: `<<` is the MERGE key, and its tag's `stringify`
1819
+ * returns the literal `<<` while ignoring the node's style, so the
1820
+ * `QUOTE_DOUBLE` the oracle sets on that key is silently discarded and
1821
+ * `{'<<': 'v'}` still emits `<<: v` — which a 1.1 reader rejects with `Merge
1822
+ * sources must be maps`. Under `core` there is no merge tag, the forced
1823
+ * quotes survive, and the output is `"<<": v`.
1824
+ *
1825
+ * Parity is preserved in fact rather than by the option name, and it was
1826
+ * MEASURED rather than argued (2026-09-03): with the oracle in place, both
1827
+ * this repo's real templates — `tests/integration/basic` and
1828
+ * `tests/integration/local-invoke` — render BYTE-IDENTICALLY under the two
1829
+ * schemas, as does every probe tried except `<<` itself. What changes is only
1830
+ * which layer does the quoting: under `core` the library emits `yes` bare and
1831
+ * the oracle quotes it; under 1.1 the library quoted it directly.
1832
+ *
1833
+ * This was found by a review round, after a first cut had `yaml-1.1` here and
1834
+ * a test suite that could not see the difference — the four-position
1835
+ * round-trip loop parses under 1.2, where `<<:` is an ordinary key, and the
1836
+ * 1.1 arm covered only the map-VALUE position. Both now run all four
1837
+ * positions under both readers.
1838
+ */
1839
+ const EMIT_OPTIONS = {
1840
+ schema: "core",
1841
+ lineWidth: 0,
1842
+ aliasDuplicateObjects: false
1843
+ };
1844
+ const READER_SCHEMAS = ["yaml-1.1", "core"];
1845
+ /**
1846
+ * The oracle PARSES, and a parse can warn as well as throw — so the probe
1847
+ * reads have to be silenced or the probe becomes an output side effect.
1848
+ *
1849
+ * Measured: a date-shaped map KEY emits bare under `core`, and probing it
1850
+ * under the 1.1 reader resolves it to a `Date`, at which point `yaml` calls
1851
+ * `process.emitWarning` (`Keys with collection values will be stringified`).
1852
+ * That reached the real stderr — 254 bytes on a GREEN unit run, against this
1853
+ * repo's "a green run must print nothing" rule, and on `cdkd synth` for any
1854
+ * template carrying such a key. The oracle only ever reads the parsed VALUE,
1855
+ * so it has no use for the diagnostics.
1856
+ *
1857
+ * `silent` is NOT diagnostics-only, though, and the difference is recorded
1858
+ * here because it changes what the `catch`es below mean. `parse` re-throws
1859
+ * `doc.errors[0]` only when the level is not `silent` (`yaml`'s
1860
+ * `public-api.js`), so under it a `DUPLICATE_KEY` / `TAB_AS_INDENT` /
1861
+ * `BLOCK_AS_IMPLICIT_KEY` document RETURNS a partially-composed value instead
1862
+ * of throwing. The oracle's answer is unaffected — it degrades "threw" into
1863
+ * "came back different", which is the same `false` — and that was measured
1864
+ * rather than argued: over a 91,033-string corpus in review, 0 verdicts flip,
1865
+ * and of the 487 strings whose emission fails a loud parse, none has a silent
1866
+ * parse returning the ORIGINAL value, which is the only shape that could
1867
+ * produce a wrong `true`.
1868
+ *
1869
+ * What still throws under `silent` is a `toJS`-time error, because that runs
1870
+ * AFTER the error check — which is exactly the `<<` merge failure the key
1871
+ * oracle depends on. Verified: `parse('<<: v', { schema: 'yaml-1.1',
1872
+ * logLevel: 'silent' })` still raises `Merge sources must be maps`.
1873
+ */
1874
+ const READER_OPTIONS = { logLevel: "silent" };
1875
+ /**
1876
+ * Templates repeat their scalars heavily (`AWS::S3::Bucket`, a region, a
1877
+ * logical id), and each miss costs one emit plus one parse per reader. Keyed
1878
+ * by the exact string, and the wrapped predicates are pure functions of it.
1879
+ */
1880
+ function memoize(fn) {
1881
+ const cache = /* @__PURE__ */ new Map();
1882
+ return (value) => {
1883
+ const hit = cache.get(value);
1884
+ if (hit !== void 0) return hit;
1885
+ const result = fn(value);
1886
+ cache.set(value, result);
1777
1887
  return result;
1778
- }
1779
- if (typeof obj === "object") {
1780
- const entries = Object.entries(obj);
1781
- if (entries.length === 0) return "{}\n";
1782
- let result = "\n";
1783
- for (const [key, value] of entries) {
1784
- const safeKey = key.includes(" ") ? `"${key}"` : key;
1785
- const isContainer = typeof value === "object" && value !== null;
1786
- const isEmptyContainer = isContainer && (Array.isArray(value) ? value.length === 0 : Object.keys(value).length === 0);
1787
- if (isContainer && !isEmptyContainer) result += `${prefix}${safeKey}:${toYaml(value, indent + 1)}`;
1788
- else result += `${prefix}${safeKey}: ${toYaml(value, indent + 1).trimStart()}`;
1888
+ };
1889
+ }
1890
+ /**
1891
+ * Would this string, emitted plain, come back as the same string from EVERY
1892
+ * reader above?
1893
+ *
1894
+ * The library answers it, for both resolvers, rather than a predicate spelled
1895
+ * out here. The defect being fixed WAS a hand-written must-quote list missing
1896
+ * entries, and a second list with two more entries on it is the same artifact
1897
+ * with the same failure mode; asking whether the value survives the trip has
1898
+ * no spellings to miss.
1899
+ *
1900
+ * There are two of these because position decides the question. A string can
1901
+ * be special as a KEY while ordinary as a value: `<<` is the merge key under
1902
+ * 1.1, so `{'<<': 'v'}` emitted plain makes a 1.1 reader fail with `Merge
1903
+ * sources must be maps`, while a bare `<<` in value position is just a
1904
+ * string.
1905
+ */
1906
+ const valueRoundTripsPlain = memoize((value) => {
1907
+ const emitted = stringify(value, EMIT_OPTIONS);
1908
+ return READER_SCHEMAS.every((schema) => {
1909
+ try {
1910
+ return parse(emitted, {
1911
+ schema,
1912
+ ...READER_OPTIONS
1913
+ }) === value;
1914
+ } catch {
1915
+ return false;
1789
1916
  }
1790
- return result;
1791
- }
1792
- return `${stringifyValue(obj)}\n`;
1917
+ });
1918
+ });
1919
+ const keyRoundTripsPlain = memoize((key) => {
1920
+ const probe = "cdkd-probe";
1921
+ const emitted = stringify({ [key]: probe }, EMIT_OPTIONS);
1922
+ return READER_SCHEMAS.every((schema) => {
1923
+ let back;
1924
+ try {
1925
+ back = parse(emitted, {
1926
+ schema,
1927
+ ...READER_OPTIONS
1928
+ });
1929
+ } catch {
1930
+ return false;
1931
+ }
1932
+ if (back === null || typeof back !== "object" || Array.isArray(back)) return false;
1933
+ const record = back;
1934
+ const keys = Object.keys(record);
1935
+ return keys.length === 1 && keys[0] === key && record[key] === probe;
1936
+ });
1937
+ });
1938
+ function toYaml(obj) {
1939
+ const doc = new Document(obj, EMIT_OPTIONS);
1940
+ visit(doc, {
1941
+ Scalar(key, node) {
1942
+ if (key === "key") return;
1943
+ if (typeof node.value === "string" && !valueRoundTripsPlain(node.value)) node.type = Scalar.QUOTE_DOUBLE;
1944
+ },
1945
+ Pair(_, pair) {
1946
+ const { key } = pair;
1947
+ if (isScalar(key) && typeof key.value === "string" && !keyRoundTripsPlain(key.value)) key.type = Scalar.QUOTE_DOUBLE;
1948
+ }
1949
+ });
1950
+ return doc.toString(EMIT_OPTIONS);
1793
1951
  }
1794
1952
 
1795
1953
  //#endregion
@@ -2010,8 +2168,7 @@ function emitStructured(payload, asJson) {
2010
2168
  process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
2011
2169
  return;
2012
2170
  }
2013
- const yaml = toYaml(payload).replace(/^\n/, "");
2014
- process.stdout.write(yaml);
2171
+ process.stdout.write(toYaml(payload));
2015
2172
  }
2016
2173
  /**
2017
2174
  * Create list command
@@ -23516,6 +23673,27 @@ function hasDescriptor(params) {
23516
23673
  //#endregion
23517
23674
  //#region src/provisioning/providers/secretsmanager-secret-provider.ts
23518
23675
  /**
23676
+ * `value` after a JSON round-trip: `undefined` members dropped, exactly the
23677
+ * shape state.json can hold. Used so the two sides of the issue-#2472
23678
+ * comparison in {@link SecretsManagerSecretProvider.changedSecretValue} are
23679
+ * spelled the same way, and so a null-prototype object (what
23680
+ * `redactSecretsForState` builds) compares equal to a plain one —
23681
+ * `isDeepStrictEqual` checks prototypes. `undefined` round-trips to `undefined`.
23682
+ */
23683
+ function asJson(value) {
23684
+ return value === void 0 ? void 0 : JSON.parse(JSON.stringify(value));
23685
+ }
23686
+ /**
23687
+ * A `SecretString` about to go on the wire must be a string. Pre-#2472 a
23688
+ * non-string was forwarded through a cast and left to AWS; a silent drop is
23689
+ * the worse failure for a value the user wrote, so the SHAPE is named — never
23690
+ * the value. Shared by `create()` and `update()` so the two cannot disagree.
23691
+ */
23692
+ function requireSecretStringShape(literal) {
23693
+ if (typeof literal === "string") return literal;
23694
+ throw new Error(`SecretString must be a string, got ${literal === null ? "null" : Array.isArray(literal) ? "array" : typeof literal}`);
23695
+ }
23696
+ /**
23519
23697
  * AWS Secrets Manager Secret Provider
23520
23698
  *
23521
23699
  * Implements resource provisioning for AWS::SecretsManager::Secret using the Secrets Manager SDK.
@@ -23552,7 +23730,7 @@ var SecretsManagerSecretProvider = class {
23552
23730
  let secretString;
23553
23731
  const generateConfig = properties["GenerateSecretString"];
23554
23732
  if (generateConfig) secretString = this.generateSecretString(generateConfig);
23555
- else if (properties["SecretString"]) secretString = properties["SecretString"];
23733
+ else if (properties["SecretString"] !== void 0 && properties["SecretString"] !== "") secretString = requireSecretStringShape(properties["SecretString"]);
23556
23734
  const createParams = { Name: name };
23557
23735
  if (secretString) createParams.SecretString = secretString;
23558
23736
  if (properties["Description"]) createParams.Description = properties["Description"];
@@ -23581,12 +23759,9 @@ var SecretsManagerSecretProvider = class {
23581
23759
  async update(logicalId, physicalId, resourceType, properties, previousProperties) {
23582
23760
  this.logger.debug(`Updating secret ${logicalId}: ${physicalId}`);
23583
23761
  try {
23584
- let secretString;
23585
- const generateConfig = properties["GenerateSecretString"];
23586
- if (generateConfig) secretString = this.generateSecretString(generateConfig);
23587
- else if (properties["SecretString"]) secretString = properties["SecretString"];
23762
+ const secretString = this.changedSecretValue(properties, previousProperties);
23588
23763
  const updateParams = { SecretId: physicalId };
23589
- if (secretString) updateParams.SecretString = secretString;
23764
+ if (secretString !== void 0) updateParams.SecretString = secretString;
23590
23765
  const description = clearOnUpdateRemoval(properties["Description"], previousProperties["Description"], "");
23591
23766
  if (description !== void 0) updateParams.Description = description;
23592
23767
  const newKmsKeyId = properties["KmsKeyId"];
@@ -23668,6 +23843,104 @@ var SecretsManagerSecretProvider = class {
23668
23843
  }
23669
23844
  }
23670
23845
  /**
23846
+ * The `SecretString` an in-place update must send, or `undefined` when the
23847
+ * value's SOURCE is unchanged (issue #2472).
23848
+ *
23849
+ * The source is `GenerateSecretString` when present (CloudFormation gives it
23850
+ * precedence over a literal) and `SecretString` otherwise. A generated value
23851
+ * is minted only when the `GenerateSecretString` block differs from the
23852
+ * previous one — every in-place update re-runs this method, so comparing
23853
+ * the block rather than the (never persisted, never read back) value is
23854
+ * the only way to keep an unrelated update from re-rolling the password. A
23855
+ * literal is sent only when it differs from the previous literal. Switching
23856
+ * source in either direction counts as a change (the previous side of the
23857
+ * new source is `undefined`), and a bag that carries NEITHER source keeps
23858
+ * the live value untouched, as CloudFormation does.
23859
+ *
23860
+ * One consequence of the precedence: a PREVIOUS bag carrying both a block
23861
+ * and an ignored `SecretString: 'x'` masks a block-to-literal switch whose
23862
+ * literal is still `'x'` (the literal compares equal, nothing is sent).
23863
+ * CloudFormation rejects a template declaring both, so such a record is
23864
+ * cdkd-created only and the miss is accepted.
23865
+ *
23866
+ * THE PREVIOUS BAG IS WHAT STATE PERSISTED, so the block is compared in
23867
+ * that spelling. On the deploy path a `{{resolve:...}}` inside
23868
+ * `SecretStringTemplate` reaches this method as plaintext while state holds
23869
+ * the redacted expression (GHSA-p5qg-v9gv-hc7w); compared raw, such a block
23870
+ * ALWAYS differs and every Tags-only update re-rolls the password — the
23871
+ * defect this method exists to close, for exactly the shape that embeds a
23872
+ * secret. {@link asPersisted} rewrites the desired block through the same
23873
+ * redaction the state writer uses, so the two sides meet. A pre-GHSA record
23874
+ * still holding plaintext matches the raw comparison instead; either match
23875
+ * means "unchanged".
23876
+ *
23877
+ * The same rewrite means an upstream ROTATION behind an unchanged reference
23878
+ * in `SecretStringTemplate` does NOT regenerate (the expression is the same
23879
+ * on both sides), where CloudFormation, which re-resolves at update time,
23880
+ * would. That is the intended trade for the generated source: the harmful
23881
+ * direction is the unrequested re-roll.
23882
+ *
23883
+ * RESIDUAL, permanent rather than one-shot: two references in the block
23884
+ * that resolve to the SAME plaintext. The resolver records one pair per
23885
+ * plaintext (last expression wins), so this value scan rewrites BOTH leaves
23886
+ * to the survivor expression, while the persisted previous holds each
23887
+ * leaf's own expression (the state writer redacts by POSITION, with the
23888
+ * template as its source) — the two spellings differ on every in-place
23889
+ * update, and that shape re-rolls on every Tags-only deploy. Threading a
23890
+ * position source through here would close it, but the only source this
23891
+ * method holds is the PREVIOUS block, and substituting its leaves would
23892
+ * also erase a genuine reference switch in a secret leaf; left open for a
23893
+ * shape that is rare (two secrets with identical plaintext in one block).
23894
+ *
23895
+ * A LITERAL IS DELIBERATELY NOT REDACTED BEFORE COMPARING. A
23896
+ * `SecretString: '{{resolve:...}}'` (a secret mirroring another one) is
23897
+ * re-sent on every in-place update: cdkd cannot tell whether the REFERENCED
23898
+ * value changed since the last deploy — state holds only the expression —
23899
+ * and CloudFormation re-applies it when the resolved value changed. A
23900
+ * redundant version is the milder failure; a stale copy is a wrong value.
23901
+ *
23902
+ * `isDeepStrictEqual` over a JSON round-trip rather than `JSON.stringify`
23903
+ * equality: the previous bag comes back from state.json while the new one
23904
+ * comes from the resolver, so a key-order difference is not a change, and
23905
+ * an explicit `undefined` member (which state.json cannot hold) must not
23906
+ * read as one either — that failure direction is a silent re-roll.
23907
+ *
23908
+ * KNOWN EDGE, accepted: the redaction is a VALUE scan, so a literal in the
23909
+ * block that happens to EQUAL a plaintext this resource resolved from a
23910
+ * reference elsewhere in its bag is rewritten to that reference's
23911
+ * expression too. Replacing a `{{resolve:...}}` in the template with the
23912
+ * literal it currently resolves to therefore compares equal and does NOT
23913
+ * regenerate, where CloudFormation would. This is the same rewrite the
23914
+ * state writer applies to that literal when it persists the record, so the
23915
+ * two sides stay consistent, and the miss is in the safe direction (no
23916
+ * unrequested re-roll) for an edit that puts a secret's plaintext into a
23917
+ * template.
23918
+ */
23919
+ changedSecretValue(properties, previousProperties) {
23920
+ const generateConfig = properties["GenerateSecretString"];
23921
+ if (generateConfig) {
23922
+ const previous = previousProperties["GenerateSecretString"];
23923
+ return isDeepStrictEqual(asJson(generateConfig), asJson(previous)) || isDeepStrictEqual(asJson(this.asPersisted(generateConfig)), asJson(previous)) ? void 0 : this.generateSecretString(generateConfig);
23924
+ }
23925
+ const literal = properties["SecretString"];
23926
+ if (literal === void 0) return void 0;
23927
+ if (isDeepStrictEqual(asJson(literal), asJson(previousProperties["SecretString"]))) return;
23928
+ return requireSecretStringShape(literal);
23929
+ }
23930
+ /**
23931
+ * `bag` as the state writer would persist it: every plaintext this
23932
+ * provider call resolved from a `{{resolve:...}}` reference is rewritten
23933
+ * back to its expression. The pairs come from the per-resource scope the
23934
+ * deploy engine / rollback executor bind around the provider call
23935
+ * (`resource-secrets-scope.ts`); absent (drift `--revert`, import, tests)
23936
+ * the bag is returned as-is. The map is handed to the redaction helper
23937
+ * only — never enumerated, never logged.
23938
+ */
23939
+ asPersisted(bag) {
23940
+ const secrets = getCurrentResourceSecrets();
23941
+ return secrets !== void 0 && secrets.size > 0 ? redactSecretsForState(bag, secrets) : bag;
23942
+ }
23943
+ /**
23671
23944
  * Generate a secret string from GenerateSecretString configuration
23672
23945
  *
23673
23946
  * Simple implementation that generates a random string based on the config.
@@ -46518,7 +46791,7 @@ var AppSyncProvider = class {
46518
46791
  */
46519
46792
  canonicalizeSdl(sdl, source) {
46520
46793
  try {
46521
- return print(parse(sdl));
46794
+ return print(parse$1(sdl));
46522
46795
  } catch (err) {
46523
46796
  this.logger.debug(`Failed to parse ${source} SDL via graphql-js (falling back to raw): ${err instanceof Error ? err.message : String(err)}`);
46524
46797
  return sdl;
@@ -62816,7 +63089,7 @@ function parseCfnTemplate(text) {
62816
63089
  throw new Error(`Template is not valid JSON. Cause: ${err instanceof Error ? err.message : String(err)}`);
62817
63090
  }
62818
63091
  else try {
62819
- parsed = parse$1(body, { customTags: CUSTOM_TAGS });
63092
+ parsed = parse(body, { customTags: CUSTOM_TAGS });
62820
63093
  } catch (err) {
62821
63094
  throw new Error(`Template is not valid YAML. Cause: ${err instanceof Error ? err.message : String(err)}`);
62822
63095
  }
@@ -89358,7 +89631,7 @@ function createMigrateCommand() {
89358
89631
  */
89359
89632
  function buildProgram() {
89360
89633
  const program = new Command();
89361
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version(getCdkdVersion());
89634
+ program.name("cdkd").description("Drop-in CDK CLI for existing CDK apps - up to 15x faster deploys via direct AWS SDK calls instead of CloudFormation").version(getCdkdVersion());
89362
89635
  program.hook("preAction", (_thisCommand, actionCommand) => {
89363
89636
  const { profile } = actionCommand.optsWithGlobals();
89364
89637
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
@@ -89387,4 +89660,4 @@ function buildProgram() {
89387
89660
 
89388
89661
  //#endregion
89389
89662
  export { buildProgram };
89390
- //# sourceMappingURL=program-BHmUE52I.js.map
89663
+ //# sourceMappingURL=program-C5evYwxk.js.map