@go-to-k/cdkd 0.291.5 → 0.291.7

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.
@@ -1,8 +1,8 @@
1
- import { $ as yellow, $a as retryClassificationText, $i as expectedOwnerParam, $n as repairMalformedResourcePropertiesForReadOnly, $r as rewriteTemplateAssetReferences, $t as requireConfigObject, A as createPreDeleteFinalSnapshot, Aa as LocalInvokeBuildError$1, Ai as getDefaultStateBucketName, An as malformedOutputsRefusalMessage, Ar as buildForceUnlockCommand, At as carriesDynamicReference, B as isStatefulRecreateTargetSync, Ba as StackTerminationProtectionError, Bi as warnDeprecatedNoPrefixCliFlag, Bn as refuseMalformedOrphansForDestroy, Br as hasUnverifiableParameterRefusal, Bt as isSettledInstanceState, C as namesAnyDeclaredParameter, Ca as CdkdError, Ci as runDockerStreaming, Cn as isReadableResourceEntry, Cr as recoverMaskedOutput, Ct as slowCcOperationTimeoutMs, D as PRE_DELETE_SNAPSHOT_TYPES, Da as DeployCancelledError, Di as getDockerImageBySourceHash, Dn as malformedOrphanRecordsWarning, Dr as S3StateBackend, Dt as disableInstanceApiTermination, E as ATOMIC_FINAL_SNAPSHOT_TYPES, Ei as AssetManifestLoader, En as malformedLocalOutputsWarning, Er as LockManager, Et as deleteSkipReason, F as extractDeploymentEventError, Fa as PartialFailureError, Fi as resolveSkipPrefix, Fn as malformedResourcesWarning, Fr as CUSTOM_RESOURCE_RESPONSE_PREFIX, Ft as isImpossibleEmptyStoredAttribute, G as toCfnInteger, Ga as normalizeAwsError, Gi as findLargeInlineResources, Gn as refuseMalformedResourceEntries, Gr as orphansCarriedFrom, Gt as coerceCfnBoolean, H as WARM_THROUGHPUT_MEMBERS, Ha as SynthesisError, Hi as CFN_TEMPLATE_BODY_LIMIT, Hn as refuseMalformedOutputs, Hr as importableOutputs, Ht as normalizeAwsTagsToCfn, I as makeSiblingClaimReader, Ia as ProvisioningError, Ii as resolveStateBucketWithDefault, In as malformedStateRefusalMessage, Ir as DEFAULT_STATE_PREFIX, It as isNamelessDynamicReferenceError, J as bold, Ja as isRetryableTransientError, Ji as injectiveKey, Jn as refuseMalformedResourcesForDestroy, Jr as stringifyValue, Jt as configIntegerRefusal, K as toFiniteNumber, Ka as withErrorHandling, Ki as uploadCfnTemplate, Kn as refuseMalformedResourceEntriesForOrphan, Kr as shouldRetainResource, Kt as coerceCfnInteger, L as planOrphanAdoption, La as ResourceTimeoutError, Li as resolveStateBucketWithDefaultAndSource, Ln as refuseDivergentRecordRegionForDestroy, Lr as exportNamesCarriedFrom, Lt as isUnboundTemplateParameter, M as refusesFinalSnapshot, Mi as resolveApp, Mn as malformedRenderedContainersWarning, Mr as forceQuitRecoveryClause, Mt as cfnRefValueFromPhysicalId, N as unsupportedFinalSnapshotError, Na as MalformedProducerRecordRefusalError, Ni as resolveAutoAssetStorage, Nn as malformedResourceEntriesWarning, Nr as formatLockExpiry, Nt as coerceParameterTypedValue, O as buildFinalSnapshotIdentifier, Oa as DynamicReferenceRegionAmbiguousError, Oi as Synthesizer, On as malformedOrphansRefusalMessage, Or as rebuildClientForBucketRegion, Ot as isTerminationProtectionPropagationError, P as makeCanonicalizePropertiesFn, Pa as NestedStackChildDirectDestroyError, Pi as resolveCaptureObservedState, Pn as malformedResourcePropertiesWarning, Pr as shellQuote, Pt as getAccountInfo, Q as red, Qa as markRedactedCause, Qi as decodeListingKey, Qn as repairMalformedResourceEntriesForReadOnly, Qr as loadPublishableAssetManifest, Qt as requireConfigArray, R as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ra as ResourceUpdateNotSupportedError, Ri as resolveUseCdkBootstrapAssets, Rn as refuseMalformedNestedChildOutputs, Rr as hasReadableExportSet, Rt as parameterTypeMayLoseSecretIdentity, S as computeParameterTaint, Si as runDockerForeground, Sn as hasReadableResources, Sr as recordMaskOnlyValue, St as isWaitAbandonedError, T as resourcesNamingDeclaredParameter, Ta as CrossAccountSecretRefusalError, Ti as stripControlChars, Tn as malformedExportSourceWarning, Tr as scrubResourceRecord, Tt as deleteIndeterminateGuards, U as coerceWarmThroughput$1, Ui as CFN_TEMPLATE_URL_LIMIT, Un as refuseMalformedOutputsForDestroy, Ur as isReadableBag, Ut as resolveExplicitPhysicalId, V as renderStatefulReason, Vi as ssmResolvedValueType, Vn as refuseMalformedOrphansForOrphan, Vr as importableOutputKeys, Vt as WAFv2WebACLProvider, W as isWarmThroughputDecrease, Wi as MIGRATE_TMP_PREFIX, Wn as refuseMalformedResourceAttributesForOrphan, Wr as orphansAfterRollback, Wt as assertRegionMatch, X as gray, Xa as isTransientServerError, Xi as producerCoordinateKey, Xn as repairMalformedOrphansForReadOnly, Xr as buildAssetRedirectMap, Xt as readConfigString, Y as cyan, Ya as isThrottlingError, Yi as injectiveKeyPrefix, Yn as refuseMalformedState, Yr as WorkGraph, Yt as configStringRefusal, Z as green, Za as markNonRetryable, Zi as producerRecordKey, Zn as repairMalformedOutputsForReadOnly, Zr as createAssetRedirectResolver, Zt as replayWarn, _ as bagHoldsSecretExpression, _a as AwsClients, _i as dockerSpawnEnvWithSensitive, _n as UNREADABLE_ORPHANS_CONTAINER_ROW, _r as identityKeyFor, _t as endCommandInterruptScope, a as DeploymentEventsStore, aa as globMatches, ai as isCrossRegionRedirect, an as s3BucketDomainName, ar as describeTypeWithThrottleRetry, at as secretBearingStateKeyWarning, b as mergeNoChangeOutputs, ba as runWithStackAwsClients, bi as partitionSensitiveEnv, bn as hasReadableOrphans, br as maskSecretsInError, bt as startInterruptWatch, c as replayFailedOperations, ca as hasOwnKey, ci as validateAssetBucketName, cn as s3BucketWebsiteUrl, cr as TemplateParser, ct as IAMRoleProvider, d as updatePartialMessage, da as ownValue, di as buildDockerImage, dn as applyCallerIdentityCredentials, dr as STATE_SOURCED_READBACK_RULES, dt as ProviderRegistry, ea as PARTITION_TABLE, ei as AssetModeResolver, en as requireConfigString, eo as describeAwsFailure, er as repairMalformedResourcesForReadOnly, et as collectDeclaredOutputNames, f as updatePartialReason, fa as absoluteAssemblyPathEscape, fi as resolveDockerContextDirectory, fn as callerEnvCredentials, fr as TEMPLATE_SOURCED_RULES, ft as wouldReturnToSdkProvider, g as computeImplicitDeleteEdges, ga as resolveBucketRegion, gi as describeDockerFailure, gn as STATE_RESOURCES_MALFORMED, gr as errorCauseChain, gt as beginCommandInterruptScope, h as IMPLICIT_DELETE_DEPENDENCIES, hi as describeDockerExecFailure, hn as INTRINSIC_KEYS, hr as dynamicReferenceTokens, ht as maskerOrIdentity, i as DeploymentEventsReader, ia as failedStageNote, ii as getBootstrapMarkerKey, in as s3BucketArn, ir as findSilentDropProperties, it as secretBearing, j as isFinalSnapshotError, ja as LocalStartServiceError, ji as getLegacyStateBucketName, jn as malformedOutputsWarning, jr as buildLockContentionMessage, jt as carriesFetchableDynamicReference, k as ccRoutedFinalSnapshotError, ka as IntrinsicResolutionRefusalError, ki as synthesisStatusMessage, kn as malformedOrphansWarning, kr as UNREPRODUCIBLE_LOCK_CLAUSE, kt as IntrinsicFunctionResolver, l as replayRollback, la as hasPlainPrototype, li as validateContainerRepoName, ln as applyRoleArnIfSet, lr as STATE_SOURCED_BASELINE_RULES, lt as collectInlinePolicyNamesManagedBySiblings, m as maskingRetryLogger, ma as resolveAssemblyPath, mi as describeDockerCapturedOutput, mn as DiffCalculator, mr as createSecretMasker, mt as maskDeep, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as derivePartitionAndUrlSuffix, ni as assertAssetBucketRegion, nn as producerRegionsFromState, nr as safeStackName, nt as exportAliasCollisionScrubWarning, o as planFailedOps, oa as processStackMessages, oi as parseBootstrapMarker, on as s3BucketDualStackDomainName, or as withRetry, ot as secretSafeKeyDisplay, p as withResourceDeadline, pa as renderAssemblyPathEscape, pi as warnManifestExecutable, pn as envCredentialsAreAssumedRole, pr as carriesSecretMask, pt as createMaskedRetryLogger, q as formatResourceLine, qa as isMarkedNonRetryable, qi as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, qn as refuseMalformedResourcePropertiesForOrphan, qr as AssetPublisher, qt as configBooleanRefusal, r as DeployEngine, ra as AssemblyReader, ri as ensureAssetStorage, rn as withSharedDrainBudget, rr as findActionableSilentDrops, rt as isExportAliasCollision, s as planRollback, sa as defineOwnKey, si as readBootstrapMarkerBody, sn as s3BucketRegionalDomainName, sr as DagBuilder, st as getCurrentResourceSecrets, t as DEFAULT_RESOURCE_TIMEOUT_MS, ta as canonicalizeRegion, ti as BOOTSTRAP_MARKER_PREFIX, tn as classifyReplaySecretRegion, to as safeStringify, tr as safeRegion, tt as collectPublishedOutputNames, u as resolveReplacementOldType, ua as nullPrototypeRecord, ui as buildDenyExternalAccessPolicy, un as AWS_CREDENTIAL_ENV_KEYS, ur as STATE_SOURCED_CROSS_GENERATION_RULES, ut as clearOnUpdateRemoval, v as isSecretBearingReferenceString, va as getAwsClients, vi as formatDockerLoginError, vn as UNREADABLE_RESOURCES_MAP_ROW, vr as isSingleDynamicReferenceToken, vt as interruptWatchListenerCount, w as reachableDivergentParameters, wi as escapeRegExp, wn as malformedExportNamesWarning, wr as redactSecretsForState, wt as UNSPECIFIED_SKIP_REASON, x as bindingSkippedOutputs, xa as setAwsClients, xi as redactDockerArgvValues, xn as hasReadableOutputs, xr as maskSecretsInText, xt as CloudControlProvider, y as keptWholeReasonText, ya as resetAwsClients, yi as getDockerCmd, yn as displayLogicalId, yr as markSameGenerationBag, yt as isInterruptedWaitError, z as isStatefulRecreateTargetForReplace, za as StackHasActiveImportsError, zi as stateBucketExistenceConfirmed, zn as refuseMalformedOrphans, zr as hasReasonlessBaselineRefusal, zt as refStateLookupFromResource } from "./deploy-engine-BtJocpRR.js";
1
+ import { $ as yellow, $a as retryClassificationText, $i as expectedOwnerParam, $n as repairMalformedResourcePropertiesForReadOnly, $r as rewriteTemplateAssetReferences, $t as requireConfigObject, A as createPreDeleteFinalSnapshot, Aa as LocalInvokeBuildError$1, Ai as getDefaultStateBucketName, An as malformedOutputsRefusalMessage, Ar as buildForceUnlockCommand, At as carriesDynamicReference, B as isStatefulRecreateTargetSync, Ba as StackTerminationProtectionError, Bi as warnDeprecatedNoPrefixCliFlag, Bn as refuseMalformedOrphansForDestroy, Br as hasUnverifiableParameterRefusal, Bt as isSettledInstanceState, C as namesAnyDeclaredParameter, Ca as CdkdError, Ci as runDockerStreaming, Cn as isReadableResourceEntry, Cr as recoverMaskedOutput, Ct as slowCcOperationTimeoutMs, D as PRE_DELETE_SNAPSHOT_TYPES, Da as DeployCancelledError, Di as getDockerImageBySourceHash, Dn as malformedOrphanRecordsWarning, Dr as S3StateBackend, Dt as disableInstanceApiTermination, E as ATOMIC_FINAL_SNAPSHOT_TYPES, Ei as AssetManifestLoader, En as malformedLocalOutputsWarning, Er as LockManager, Et as deleteSkipReason, F as extractDeploymentEventError, Fa as PartialFailureError, Fi as resolveSkipPrefix, Fn as malformedResourcesWarning, Fr as CUSTOM_RESOURCE_RESPONSE_PREFIX, Ft as isImpossibleEmptyStoredAttribute, G as toCfnInteger, Ga as normalizeAwsError, Gi as findLargeInlineResources, Gn as refuseMalformedResourceEntries, Gr as orphansCarriedFrom, Gt as coerceCfnBoolean, H as WARM_THROUGHPUT_MEMBERS, Ha as SynthesisError, Hi as CFN_TEMPLATE_BODY_LIMIT, Hn as refuseMalformedOutputs, Hr as importableOutputs, Ht as normalizeAwsTagsToCfn, I as makeSiblingClaimReader, Ia as ProvisioningError, Ii as resolveStateBucketWithDefault, In as malformedStateRefusalMessage, Ir as DEFAULT_STATE_PREFIX, It as isNamelessDynamicReferenceError, J as bold, Ja as isRetryableTransientError, Ji as injectiveKey, Jn as refuseMalformedResourcesForDestroy, Jr as stringifyValue, Jt as configIntegerRefusal, K as toFiniteNumber, Ka as withErrorHandling, Ki as uploadCfnTemplate, Kn as refuseMalformedResourceEntriesForOrphan, Kr as shouldRetainResource, Kt as coerceCfnInteger, L as planOrphanAdoption, La as ResourceTimeoutError, Li as resolveStateBucketWithDefaultAndSource, Ln as refuseDivergentRecordRegionForDestroy, Lr as exportNamesCarriedFrom, Lt as isUnboundTemplateParameter, M as refusesFinalSnapshot, Mi as resolveApp, Mn as malformedRenderedContainersWarning, Mr as forceQuitRecoveryClause, Mt as cfnRefValueFromPhysicalId, N as unsupportedFinalSnapshotError, Na as MalformedProducerRecordRefusalError, Ni as resolveAutoAssetStorage, Nn as malformedResourceEntriesWarning, Nr as formatLockExpiry, Nt as coerceParameterTypedValue, O as buildFinalSnapshotIdentifier, Oa as DynamicReferenceRegionAmbiguousError, Oi as Synthesizer, On as malformedOrphansRefusalMessage, Or as rebuildClientForBucketRegion, Ot as isTerminationProtectionPropagationError, P as makeCanonicalizePropertiesFn, Pa as NestedStackChildDirectDestroyError, Pi as resolveCaptureObservedState, Pn as malformedResourcePropertiesWarning, Pr as shellQuote, Pt as getAccountInfo, Q as red, Qa as markRedactedCause, Qi as decodeListingKey, Qn as repairMalformedResourceEntriesForReadOnly, Qr as loadPublishableAssetManifest, Qt as requireConfigArray, R as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ra as ResourceUpdateNotSupportedError, Ri as resolveUseCdkBootstrapAssets, Rn as refuseMalformedNestedChildOutputs, Rr as hasReadableExportSet, Rt as parameterTypeMayLoseSecretIdentity, S as computeParameterTaint, Si as runDockerForeground, Sn as hasReadableResources, Sr as recordMaskOnlyValue, St as isWaitAbandonedError, T as resourcesNamingDeclaredParameter, Ta as CrossAccountSecretRefusalError, Ti as stripControlChars, Tn as malformedExportSourceWarning, Tr as scrubResourceRecord, Tt as deleteIndeterminateGuards, U as coerceWarmThroughput$1, Ui as CFN_TEMPLATE_URL_LIMIT, Un as refuseMalformedOutputsForDestroy, Ur as isReadableBag, Ut as resolveExplicitPhysicalId, V as renderStatefulReason, Vi as ssmResolvedValueType, Vn as refuseMalformedOrphansForOrphan, Vr as importableOutputKeys, Vt as WAFv2WebACLProvider, W as isWarmThroughputDecrease, Wi as MIGRATE_TMP_PREFIX, Wn as refuseMalformedResourceAttributesForOrphan, Wr as orphansAfterRollback, Wt as assertRegionMatch, X as gray, Xa as isTransientServerError, Xi as producerCoordinateKey, Xn as repairMalformedOrphansForReadOnly, Xr as buildAssetRedirectMap, Xt as readConfigString, Y as cyan, Ya as isThrottlingError, Yi as injectiveKeyPrefix, Yn as refuseMalformedState, Yr as WorkGraph, Yt as configStringRefusal, Z as green, Za as markNonRetryable, Zi as producerRecordKey, Zn as repairMalformedOutputsForReadOnly, Zr as createAssetRedirectResolver, Zt as replayWarn, _ as bagHoldsSecretExpression, _a as AwsClients, _i as dockerSpawnEnvWithSensitive, _n as UNREADABLE_ORPHANS_CONTAINER_ROW, _r as identityKeyFor, _t as endCommandInterruptScope, a as DeploymentEventsStore, aa as globMatches, ai as isCrossRegionRedirect, an as s3BucketDomainName, ar as describeTypeWithThrottleRetry, at as secretBearingStateKeyWarning, b as mergeNoChangeOutputs, ba as runWithStackAwsClients, bi as partitionSensitiveEnv, bn as hasReadableOrphans, br as maskSecretsInError, bt as startInterruptWatch, c as replayFailedOperations, ca as hasOwnKey, ci as validateAssetBucketName, cn as s3BucketWebsiteUrl, cr as TemplateParser, ct as IAMRoleProvider, d as updatePartialMessage, da as ownValue, di as buildDockerImage, dn as applyCallerIdentityCredentials, dr as STATE_SOURCED_READBACK_RULES, dt as ProviderRegistry, ea as PARTITION_TABLE, ei as AssetModeResolver, en as requireConfigString, eo as describeAwsFailure, er as repairMalformedResourcesForReadOnly, et as collectDeclaredOutputNames, f as updatePartialReason, fa as absoluteAssemblyPathEscape, fi as resolveDockerContextDirectory, fn as callerEnvCredentials, fr as TEMPLATE_SOURCED_RULES, ft as wouldReturnToSdkProvider, g as computeImplicitDeleteEdges, ga as resolveBucketRegion, gi as describeDockerFailure, gn as STATE_RESOURCES_MALFORMED, gr as errorCauseChain, gt as beginCommandInterruptScope, h as IMPLICIT_DELETE_DEPENDENCIES, hi as describeDockerExecFailure, hn as INTRINSIC_KEYS, hr as dynamicReferenceTokens, ht as maskerOrIdentity, i as DeploymentEventsReader, ia as failedStageNote, ii as getBootstrapMarkerKey, in as s3BucketArn, ir as findSilentDropProperties, it as secretBearing, j as isFinalSnapshotError, ja as LocalStartServiceError, ji as getLegacyStateBucketName, jn as malformedOutputsWarning, jr as buildLockContentionMessage, jt as carriesFetchableDynamicReference, k as ccRoutedFinalSnapshotError, ka as IntrinsicResolutionRefusalError, ki as synthesisStatusMessage, kn as malformedOrphansWarning, kr as UNREPRODUCIBLE_LOCK_CLAUSE, kt as IntrinsicFunctionResolver, l as replayRollback, la as hasPlainPrototype, li as validateContainerRepoName, ln as applyRoleArnIfSet, lr as STATE_SOURCED_BASELINE_RULES, lt as collectInlinePolicyNamesManagedBySiblings, m as maskingRetryLogger, ma as resolveAssemblyPath, mi as describeDockerCapturedOutput, mn as DiffCalculator, mr as createSecretMasker, mt as maskDeep, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as derivePartitionAndUrlSuffix, ni as assertAssetBucketRegion, nn as producerRegionsFromState, nr as safeStackName, nt as exportAliasCollisionScrubWarning, o as planFailedOps, oa as processStackMessages, oi as parseBootstrapMarker, on as s3BucketDualStackDomainName, or as withRetry, ot as secretSafeKeyDisplay, p as withResourceDeadline, pa as renderAssemblyPathEscape, pi as warnManifestExecutable, pn as envCredentialsAreAssumedRole, pr as carriesSecretMask, pt as createMaskedRetryLogger, q as formatResourceLine, qa as isMarkedNonRetryable, qi as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, qn as refuseMalformedResourcePropertiesForOrphan, qr as AssetPublisher, qt as configBooleanRefusal, r as DeployEngine, ra as AssemblyReader, ri as ensureAssetStorage, rn as withSharedDrainBudget, rr as findActionableSilentDrops, rt as isExportAliasCollision, s as planRollback, sa as defineOwnKey, si as readBootstrapMarkerBody, sn as s3BucketRegionalDomainName, sr as DagBuilder, st as getCurrentResourceSecrets, t as DEFAULT_RESOURCE_TIMEOUT_MS, ta as canonicalizeRegion, ti as BOOTSTRAP_MARKER_PREFIX, tn as classifyReplaySecretRegion, to as safeStringify, tr as safeRegion, tt as collectPublishedOutputNames, u as resolveReplacementOldType, ua as nullPrototypeRecord, ui as buildDenyExternalAccessPolicy, un as AWS_CREDENTIAL_ENV_KEYS, ur as STATE_SOURCED_CROSS_GENERATION_RULES, ut as clearOnUpdateRemoval, v as isSecretBearingReferenceString, va as getAwsClients, vi as formatDockerLoginError, vn as UNREADABLE_RESOURCES_MAP_ROW, vr as isSingleDynamicReferenceToken, vt as interruptWatchListenerCount, w as reachableDivergentParameters, wi as escapeRegExp, wn as malformedExportNamesWarning, wr as redactSecretsForState, wt as UNSPECIFIED_SKIP_REASON, x as bindingSkippedOutputs, xa as setAwsClients, xi as redactDockerArgvValues, xn as hasReadableOutputs, xr as maskSecretsInText, xt as CloudControlProvider, y as keptWholeReasonText, ya as resetAwsClients, yi as getDockerCmd, yn as displayLogicalId, yr as markSameGenerationBag, yt as isInterruptedWaitError, z as isStatefulRecreateTargetForReplace, za as StackHasActiveImportsError, zi as stateBucketExistenceConfirmed, zn as refuseMalformedOrphans, zr as hasReasonlessBaselineRefusal, zt as refStateLookupFromResource } from "./deploy-engine-Gl-b_bNn.js";
2
2
  import { C as displayAwsMessage, D as truncateCodePoints, E as isPasteableIdent, S as UNRENDERABLE, T as displaySafe, _ as withSkipPrefix, b as SECRET_REF_MAX_CODE_POINTS, c as PATTERN_B_NAME_OPTIONS, f as explicitNamePropertyFor, h as getCurrentStackName, i as reserveStdoutForPayload, l as PATTERN_B_NAME_PROPERTIES, m as generateResourceNameWithFallback, n as getLogger, o as runStackBuffered, p as generateResourceName, s as getLiveRenderer, u as PATTERN_B_RESOURCE_TYPES, v as withStackName, w as displayIdent, x as STACK_REF_MAX_CODE_POINTS } from "./logger-GASr9bAF.js";
3
3
  import { n as awsClientDefaults, s as ambientRegion } from "./aws-client-defaults-jISU4PHo.js";
4
- import { t as getCdkdVersion } from "./version-DVA14XyG.js";
5
- import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-CZTUKQnY.js";
4
+ import { t as getCdkdVersion } from "./version-oHfbqdBD.js";
5
+ import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-DqAx9B6g.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, NotFound, 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";
@@ -7284,11 +7284,10 @@ function isTruthyCfnBoolean(value) {
7284
7284
  * rather than a fallback.
7285
7285
  *
7286
7286
  * ONE clause for both arms so the two cannot come to render the same value
7287
- * differently. The prose `(${bucketName})` each arm carries BESIDE it is still
7288
- * interpolated as-is: this clause takes only the pasteable half, and
7289
- * display-sanitizing the PROSE of provider warnings is tracked as issue
7290
- * [#3269](https://github.com/go-to-k/cdkd/issues/3269) (#3136 covers the
7291
- * COMMAND half across providers, not prose).
7287
+ * differently. The PROSE copy of the name each arm carries BESIDE it goes
7288
+ * through `displaySafe` at the arm, masked first (issue
7289
+ * [#3269](https://github.com/go-to-k/cdkd/issues/3269)): unlike the command, a
7290
+ * sanitized prose name names no target, so it is rendered rather than withheld.
7292
7291
  *
7293
7292
  * `maskSecrets` is REQUIRED rather than optional, and both call sites build it
7294
7293
  * from `context?.maskSecrets` (security review of #3136, which found these two
@@ -8383,8 +8382,8 @@ function canonicalizeItemList(properties, key, fold) {
8383
8382
  function describeValue$1(value, maskSecrets = (text) => text) {
8384
8383
  if (value === null) return "null";
8385
8384
  if (Array.isArray(value)) return "an array";
8386
- if (typeof value === "string") return `a string ${JSON.stringify(maskDeep(value, maskSecrets))}`;
8387
- if (isPlainObject$2(value)) return `an object with keys [${Object.keys(value).map((key) => maskSecrets(key)).join(", ")}]`;
8385
+ if (typeof value === "string") return `a string ${displaySafe(JSON.stringify(maskDeep(value, maskSecrets)))}`;
8386
+ if (isPlainObject$2(value)) return `an object with keys [${Object.keys(value).map((key) => displaySafe(maskSecrets(key))).join(", ")}]`;
8388
8387
  return `a ${typeof value} (${maskSecrets(String(value))})`;
8389
8388
  }
8390
8389
  /**
@@ -8709,7 +8708,7 @@ var S3BucketProvider = class S3BucketProvider {
8709
8708
  Bucket: bucketName,
8710
8709
  VersioningConfiguration: { Status: status }
8711
8710
  }));
8712
- this.logger.debug(`Applied versioning (${status}) to bucket ${bucketName}`);
8711
+ this.logger.debug(`Applied versioning (${status}) to bucket ${displaySafe(bucketName)}`);
8713
8712
  return true;
8714
8713
  }
8715
8714
  /**
@@ -8720,7 +8719,7 @@ var S3BucketProvider = class S3BucketProvider {
8720
8719
  Bucket: bucketName,
8721
8720
  Tagging: { TagSet: tags }
8722
8721
  }));
8723
- this.logger.debug(`Applied ${tags.length} tags to bucket ${bucketName}`);
8722
+ this.logger.debug(`Applied ${tags.length} tags to bucket ${displaySafe(bucketName)}`);
8724
8723
  }
8725
8724
  /**
8726
8725
  * Apply a diff between old and new CFn-shape Tags arrays via S3's
@@ -8746,7 +8745,7 @@ var S3BucketProvider = class S3BucketProvider {
8746
8745
  if (newNorm.length === 0) {
8747
8746
  try {
8748
8747
  await this.s3Client.send(new DeleteBucketTaggingCommand({ Bucket: bucketName }));
8749
- this.logger.debug(`Cleared tags from bucket ${bucketName}`);
8748
+ this.logger.debug(`Cleared tags from bucket ${displaySafe(bucketName)}`);
8750
8749
  } catch (err) {
8751
8750
  if (err.name === "NoSuchTagSet") return;
8752
8751
  throw err;
@@ -8757,7 +8756,7 @@ var S3BucketProvider = class S3BucketProvider {
8757
8756
  Bucket: bucketName,
8758
8757
  Tagging: { TagSet: newNorm }
8759
8758
  }));
8760
- this.logger.debug(`Replaced tag set on bucket ${bucketName} (${newNorm.length} tags)`);
8759
+ this.logger.debug(`Replaced tag set on bucket ${displaySafe(bucketName)} (${newNorm.length} tags)`);
8761
8760
  }
8762
8761
  /**
8763
8762
  * Apply CORS configuration
@@ -8782,7 +8781,7 @@ var S3BucketProvider = class S3BucketProvider {
8782
8781
  Bucket: bucketName,
8783
8782
  CORSConfiguration: { CORSRules: corsRules }
8784
8783
  }));
8785
- this.logger.debug(`Applied CORS configuration to bucket ${bucketName}`);
8784
+ this.logger.debug(`Applied CORS configuration to bucket ${displaySafe(bucketName)}`);
8786
8785
  }
8787
8786
  /**
8788
8787
  * The per-item / per-rule STRING guard, with the applier's own SKIP as the
@@ -8906,7 +8905,7 @@ var S3BucketProvider = class S3BucketProvider {
8906
8905
  if (coerceCfnBoolean(rule["ExpiredObjectDeleteMarker"]) === true) {
8907
8906
  const exp = sdkRule.Expiration;
8908
8907
  if (!(exp?.["Days"] !== void 0 || exp?.["Date"] !== void 0)) sdkRule.Expiration = { ExpiredObjectDeleteMarker: true };
8909
- else this.logger.warn(`Lifecycle rule '${rule["Id"] ?? "<unnamed>"}' on ${bucketName} sets ExpiredObjectDeleteMarker alongside an expiration Days/Date; S3 forbids combining them, so the delete-marker cleanup was not applied.`);
8908
+ else this.logger.warn(`Lifecycle rule '${displaySafe(rule["Id"] ?? "<unnamed>")}' on ${displaySafe(bucketName)} sets ExpiredObjectDeleteMarker alongside an expiration Days/Date; S3 forbids combining them, so the delete-marker cleanup was not applied.`);
8910
8909
  }
8911
8910
  const nve = isPlainObject$2(rule["NoncurrentVersionExpiration"]) ? rule["NoncurrentVersionExpiration"] : void 0;
8912
8911
  const legacyNveDays = rule["NoncurrentVersionExpirationInDays"];
@@ -8922,7 +8921,7 @@ var S3BucketProvider = class S3BucketProvider {
8922
8921
  });
8923
8922
  const nvts = rule["NoncurrentVersionTransitions"];
8924
8923
  const singularNvt = rule["NoncurrentVersionTransition"];
8925
- const allNvts = mergeLegacySingular(nvts, singularNvt, (sc) => this.logger.warn(`Lifecycle rule '${rule["Id"] ?? "<unnamed>"}' on ${bucketName} declares both NoncurrentVersionTransitions and the legacy NoncurrentVersionTransition for storage class ${sc}; S3 rejects duplicates, so the legacy singular was ignored.`));
8924
+ const allNvts = mergeLegacySingular(nvts, singularNvt, (sc) => this.logger.warn(`Lifecycle rule '${displaySafe(rule["Id"] ?? "<unnamed>")}' on ${displaySafe(bucketName)} declares both NoncurrentVersionTransitions and the legacy NoncurrentVersionTransition for storage class ${displaySafe(sc)}; S3 rejects duplicates, so the legacy singular was ignored.`));
8926
8925
  if (allNvts.length > 0) sdkRule.NoncurrentVersionTransitions = allNvts.map(toSdkNvt);
8927
8926
  const toSdkTransition = (t) => ({
8928
8927
  Days: t["TransitionInDays"] ?? t["Days"],
@@ -8931,7 +8930,7 @@ var S3BucketProvider = class S3BucketProvider {
8931
8930
  });
8932
8931
  const transitions = rule["Transitions"];
8933
8932
  const singularTransition = rule["Transition"];
8934
- const allTransitions = mergeLegacySingular(transitions, singularTransition, (sc) => this.logger.warn(`Lifecycle rule '${rule["Id"] ?? "<unnamed>"}' on ${bucketName} declares both Transitions and the legacy Transition for storage class ${sc}; S3 rejects duplicates, so the legacy singular was ignored.`));
8933
+ const allTransitions = mergeLegacySingular(transitions, singularTransition, (sc) => this.logger.warn(`Lifecycle rule '${displaySafe(rule["Id"] ?? "<unnamed>")}' on ${displaySafe(bucketName)} declares both Transitions and the legacy Transition for storage class ${displaySafe(sc)}; S3 rejects duplicates, so the legacy singular was ignored.`));
8935
8934
  if (allTransitions.length > 0) sdkRule.Transitions = allTransitions.map(toSdkTransition);
8936
8935
  const abort = isPlainObject$2(rule["AbortIncompleteMultipartUpload"]) ? rule["AbortIncompleteMultipartUpload"] : void 0;
8937
8936
  if (abort) sdkRule.AbortIncompleteMultipartUpload = { DaysAfterInitiation: abort["DaysAfterInitiation"] };
@@ -8955,7 +8954,7 @@ var S3BucketProvider = class S3BucketProvider {
8955
8954
  LifecycleConfiguration: { Rules: rules },
8956
8955
  TransitionDefaultMinimumObjectSize: lifecycleConfig["TransitionDefaultMinimumObjectSize"]
8957
8956
  }));
8958
- this.logger.debug(`Applied lifecycle configuration to bucket ${bucketName}`);
8957
+ this.logger.debug(`Applied lifecycle configuration to bucket ${displaySafe(bucketName)}`);
8959
8958
  return true;
8960
8959
  }
8961
8960
  /**
@@ -8975,7 +8974,7 @@ var S3BucketProvider = class S3BucketProvider {
8975
8974
  RestrictPublicBuckets: config["RestrictPublicBuckets"]
8976
8975
  }
8977
8976
  }));
8978
- this.logger.debug(`Applied public access block configuration to bucket ${bucketName}`);
8977
+ this.logger.debug(`Applied public access block configuration to bucket ${displaySafe(bucketName)}`);
8979
8978
  }
8980
8979
  /**
8981
8980
  * Apply bucket encryption configuration
@@ -9005,7 +9004,7 @@ var S3BucketProvider = class S3BucketProvider {
9005
9004
  Bucket: bucketName,
9006
9005
  ServerSideEncryptionConfiguration: { Rules: rules }
9007
9006
  }));
9008
- this.logger.debug(`Applied encryption configuration to bucket ${bucketName}`);
9007
+ this.logger.debug(`Applied encryption configuration to bucket ${displaySafe(bucketName)}`);
9009
9008
  }
9010
9009
  /**
9011
9010
  * Apply logging configuration
@@ -9033,7 +9032,7 @@ var S3BucketProvider = class S3BucketProvider {
9033
9032
  Bucket: bucketName,
9034
9033
  BucketLoggingStatus: {}
9035
9034
  }));
9036
- this.logger.debug(`Cleared logging configuration on bucket ${bucketName}`);
9035
+ this.logger.debug(`Cleared logging configuration on bucket ${displaySafe(bucketName)}`);
9037
9036
  return true;
9038
9037
  }
9039
9038
  const loggingEnabled = {
@@ -9052,7 +9051,7 @@ var S3BucketProvider = class S3BucketProvider {
9052
9051
  Bucket: bucketName,
9053
9052
  BucketLoggingStatus: { LoggingEnabled: loggingEnabled }
9054
9053
  }));
9055
- this.logger.debug(`Applied logging configuration to bucket ${bucketName}`);
9054
+ this.logger.debug(`Applied logging configuration to bucket ${displaySafe(bucketName)}`);
9056
9055
  return true;
9057
9056
  }
9058
9057
  /**
@@ -9098,7 +9097,7 @@ var S3BucketProvider = class S3BucketProvider {
9098
9097
  Bucket: bucketName,
9099
9098
  WebsiteConfiguration: sdkConfig
9100
9099
  }));
9101
- this.logger.debug(`Applied website configuration to bucket ${bucketName}`);
9100
+ this.logger.debug(`Applied website configuration to bucket ${displaySafe(bucketName)}`);
9102
9101
  }
9103
9102
  /**
9104
9103
  * Apply accelerate configuration
@@ -9111,7 +9110,7 @@ var S3BucketProvider = class S3BucketProvider {
9111
9110
  Bucket: bucketName,
9112
9111
  AccelerateConfiguration: { Status: config["AccelerationStatus"] }
9113
9112
  }));
9114
- this.logger.debug(`Applied accelerate configuration to bucket ${bucketName}`);
9113
+ this.logger.debug(`Applied accelerate configuration to bucket ${displaySafe(bucketName)}`);
9115
9114
  }
9116
9115
  /**
9117
9116
  * Apply notification configuration (full-replace via PutBucketNotificationConfiguration)
@@ -9160,7 +9159,7 @@ var S3BucketProvider = class S3BucketProvider {
9160
9159
  Bucket: bucketName,
9161
9160
  NotificationConfiguration: cfg
9162
9161
  }));
9163
- this.logger.debug(`Applied notification configuration to bucket ${bucketName}`);
9162
+ this.logger.debug(`Applied notification configuration to bucket ${displaySafe(bucketName)}`);
9164
9163
  return true;
9165
9164
  }
9166
9165
  /**
@@ -9219,7 +9218,7 @@ var S3BucketProvider = class S3BucketProvider {
9219
9218
  MetricsConfiguration: metricsConfig
9220
9219
  }));
9221
9220
  }
9222
- this.logger.debug(`Applied ${configs.length - skipped.length} metrics configuration(s) to bucket ${bucketName}`);
9221
+ this.logger.debug(`Applied ${configs.length - skipped.length} metrics configuration(s) to bucket ${displaySafe(bucketName)}`);
9223
9222
  return {
9224
9223
  skipped,
9225
9224
  substituted: /* @__PURE__ */ new Map()
@@ -9355,7 +9354,7 @@ var S3BucketProvider = class S3BucketProvider {
9355
9354
  });
9356
9355
  if (sentItem !== config) substituted.set(index, sentItem);
9357
9356
  }
9358
- this.logger.debug(`Applied ${configs.length - skipped.length} analytics configuration(s) to bucket ${bucketName}`);
9357
+ this.logger.debug(`Applied ${configs.length - skipped.length} analytics configuration(s) to bucket ${displaySafe(bucketName)}`);
9359
9358
  return {
9360
9359
  skipped,
9361
9360
  substituted
@@ -9420,7 +9419,7 @@ var S3BucketProvider = class S3BucketProvider {
9420
9419
  const sentItem = effectiveIntelligentTieringItem(config);
9421
9420
  if (sentItem !== config) substituted.set(index, sentItem);
9422
9421
  }
9423
- this.logger.debug(`Applied ${configs.length - skipped.length} intelligent tiering configuration(s) to bucket ${bucketName}`);
9422
+ this.logger.debug(`Applied ${configs.length - skipped.length} intelligent tiering configuration(s) to bucket ${displaySafe(bucketName)}`);
9424
9423
  return {
9425
9424
  skipped,
9426
9425
  substituted
@@ -9503,7 +9502,7 @@ var S3BucketProvider = class S3BucketProvider {
9503
9502
  });
9504
9503
  if (sentItem !== config) substituted.set(index, sentItem);
9505
9504
  }
9506
- this.logger.debug(`Applied ${configs.length - skipped.length} inventory configuration(s) to bucket ${bucketName}`);
9505
+ this.logger.debug(`Applied ${configs.length - skipped.length} inventory configuration(s) to bucket ${displaySafe(bucketName)}`);
9507
9506
  return {
9508
9507
  skipped,
9509
9508
  substituted
@@ -9622,7 +9621,7 @@ var S3BucketProvider = class S3BucketProvider {
9622
9621
  })
9623
9622
  }
9624
9623
  }));
9625
- this.logger.debug(`Applied replication configuration to bucket ${bucketName}`);
9624
+ this.logger.debug(`Applied replication configuration to bucket ${displaySafe(bucketName)}`);
9626
9625
  return true;
9627
9626
  }
9628
9627
  /**
@@ -9668,7 +9667,7 @@ var S3BucketProvider = class S3BucketProvider {
9668
9667
  Bucket: bucketName,
9669
9668
  ObjectLockConfiguration: objectLockConfig
9670
9669
  }));
9671
- this.logger.debug(`Applied object lock configuration to bucket ${bucketName}`);
9670
+ this.logger.debug(`Applied object lock configuration to bucket ${displaySafe(bucketName)}`);
9672
9671
  return true;
9673
9672
  }
9674
9673
  /**
@@ -9711,7 +9710,7 @@ var S3BucketProvider = class S3BucketProvider {
9711
9710
  Bucket: bucketName,
9712
9711
  OwnershipControls: { Rules: ownershipControls.Rules.map((r) => ({ ObjectOwnership: r.ObjectOwnership })) }
9713
9712
  }));
9714
- this.logger.debug(`Applied ownership controls to bucket ${bucketName}`);
9713
+ this.logger.debug(`Applied ownership controls to bucket ${displaySafe(bucketName)}`);
9715
9714
  }
9716
9715
  /**
9717
9716
  * Normalize an "empty container" sub-config value to `undefined` so the diff
@@ -10111,7 +10110,7 @@ var S3BucketProvider = class S3BucketProvider {
10111
10110
  if (skippedIds.size === 0 && sentItems.size === 0) return;
10112
10111
  const desired = properties[key];
10113
10112
  if (!Array.isArray(desired)) {
10114
- this.logger.debug(`Bucket ${bucketName}: ${skippedIds.size + sentItems.size} skipped or substituted ${key} item(s) could not be recorded — the desired value is not an array`);
10113
+ this.logger.debug(`Bucket ${displaySafe(bucketName)}: ${skippedIds.size + sentItems.size} skipped or substituted ${key} item(s) could not be recorded — the desired value is not an array`);
10115
10114
  return;
10116
10115
  }
10117
10116
  const previous = previousProperties[key];
@@ -10128,7 +10127,7 @@ var S3BucketProvider = class S3BucketProvider {
10128
10127
  const versioningChanged = JSON.stringify(previousVersioning ?? null) !== JSON.stringify(nextVersioning ?? null);
10129
10128
  const versioningRefusal = configStringRefusal(nextVersioning, "Status", "Suspended", "AWS::S3::Bucket VersioningConfiguration");
10130
10129
  if (versioningRefusal !== void 0 && versioningChanged) {
10131
- this.logger.warn(`Bucket ${bucketName}: ${versioningRefusal}. Leaving the bucket's LIVE versioning state unchanged — neither enabling nor suspending it; the same value is REFUSED on a template-path create`);
10130
+ this.logger.warn(`Bucket ${displaySafe(bucketName)}: ${versioningRefusal}. Leaving the bucket's LIVE versioning state unchanged — neither enabling nor suspending it; the same value is REFUSED on a template-path create`);
10132
10131
  retainPrevious("VersioningConfiguration");
10133
10132
  }
10134
10133
  const desiredVersioningStatus = versioningRefusal === void 0 ? readConfigString(nextVersioning, "Status", "Suspended", "AWS::S3::Bucket VersioningConfiguration") : void 0;
@@ -10142,7 +10141,7 @@ var S3BucketProvider = class S3BucketProvider {
10142
10141
  return;
10143
10142
  }
10144
10143
  await this.s3Client.send(new DeleteBucketOwnershipControlsCommand({ Bucket: bucketName }));
10145
- this.logger.debug(`Deleted ownership controls on bucket ${bucketName}`);
10144
+ this.logger.debug(`Deleted ownership controls on bucket ${displaySafe(bucketName)}`);
10146
10145
  });
10147
10146
  const encryptionEmptyDesired = S3BucketProvider.declaresEmptyCollection(properties["BucketEncryption"], "ServerSideEncryptionConfiguration");
10148
10147
  await this.diffSubConfig(bucketName, S3BucketProvider.emptyListConfigToUndefined(previousProperties["BucketEncryption"], "ServerSideEncryptionConfiguration"), S3BucketProvider.emptyListConfigToUndefined(properties["BucketEncryption"], "ServerSideEncryptionConfiguration"), async (cfg) => this.applyBucketEncryption(bucketName, cfg), async () => {
@@ -10151,13 +10150,13 @@ var S3BucketProvider = class S3BucketProvider {
10151
10150
  return;
10152
10151
  }
10153
10152
  await this.s3Client.send(new DeleteBucketEncryptionCommand({ Bucket: bucketName }));
10154
- this.logger.debug(`Deleted bucket encryption on bucket ${bucketName}`);
10153
+ this.logger.debug(`Deleted bucket encryption on bucket ${displaySafe(bucketName)}`);
10155
10154
  });
10156
10155
  await this.diffSubConfig(bucketName, previousProperties["LifecycleConfiguration"], properties["LifecycleConfiguration"], async (cfg) => {
10157
10156
  if (!cfg.Rules || !Array.isArray(cfg.Rules) || cfg.Rules.length === 0) {
10158
10157
  if (context?.desiredFromAwsReadback === true) {
10159
10158
  await this.s3Client.send(new DeleteBucketLifecycleCommand({ Bucket: bucketName }));
10160
- this.logger.debug(`Deleted lifecycle configuration on bucket ${bucketName} (reverting to an unset baseline)`);
10159
+ this.logger.debug(`Deleted lifecycle configuration on bucket ${displaySafe(bucketName)} (reverting to an unset baseline)`);
10161
10160
  return;
10162
10161
  }
10163
10162
  this.emptyCollectionSkip("LifecycleConfiguration", "LifecycleConfiguration.Rules", previousProperties, retainPrevious);
@@ -10167,13 +10166,13 @@ var S3BucketProvider = class S3BucketProvider {
10167
10166
  else recordEffectiveFold("LifecycleConfiguration", effectiveLifecycleConfiguration(cfg));
10168
10167
  }, async () => {
10169
10168
  await this.s3Client.send(new DeleteBucketLifecycleCommand({ Bucket: bucketName }));
10170
- this.logger.debug(`Deleted lifecycle configuration on bucket ${bucketName}`);
10169
+ this.logger.debug(`Deleted lifecycle configuration on bucket ${displaySafe(bucketName)}`);
10171
10170
  });
10172
10171
  await this.diffSubConfig(bucketName, previousProperties["CorsConfiguration"], properties["CorsConfiguration"], async (cfg) => {
10173
10172
  if (!cfg.CorsRules || !Array.isArray(cfg.CorsRules) || cfg.CorsRules.length === 0) {
10174
10173
  if (context?.desiredFromAwsReadback === true) {
10175
10174
  await this.s3Client.send(new DeleteBucketCorsCommand({ Bucket: bucketName }));
10176
- this.logger.debug(`Deleted CORS configuration on bucket ${bucketName} (reverting to an unset baseline)`);
10175
+ this.logger.debug(`Deleted CORS configuration on bucket ${displaySafe(bucketName)} (reverting to an unset baseline)`);
10177
10176
  return;
10178
10177
  }
10179
10178
  this.emptyCollectionSkip("CorsConfiguration", "CorsConfiguration.CorsRules", previousProperties, retainPrevious);
@@ -10182,11 +10181,11 @@ var S3BucketProvider = class S3BucketProvider {
10182
10181
  await this.applyCorsConfiguration(bucketName, cfg);
10183
10182
  }, async () => {
10184
10183
  await this.s3Client.send(new DeleteBucketCorsCommand({ Bucket: bucketName }));
10185
- this.logger.debug(`Deleted CORS configuration on bucket ${bucketName}`);
10184
+ this.logger.debug(`Deleted CORS configuration on bucket ${displaySafe(bucketName)}`);
10186
10185
  });
10187
10186
  await this.diffSubConfig(bucketName, previousProperties["WebsiteConfiguration"], properties["WebsiteConfiguration"], async (cfg) => this.applyWebsiteConfiguration(bucketName, cfg), async () => {
10188
10187
  await this.s3Client.send(new DeleteBucketWebsiteCommand({ Bucket: bucketName }));
10189
- this.logger.debug(`Deleted website configuration on bucket ${bucketName}`);
10188
+ this.logger.debug(`Deleted website configuration on bucket ${displaySafe(bucketName)}`);
10190
10189
  });
10191
10190
  await this.diffSubConfig(bucketName, previousProperties["LoggingConfiguration"], properties["LoggingConfiguration"], async (cfg) => {
10192
10191
  if (!await this.applyLoggingConfiguration(bucketName, cfg, (m) => this.logger.warn(m))) retainPrevious("LoggingConfiguration");
@@ -10203,7 +10202,7 @@ var S3BucketProvider = class S3BucketProvider {
10203
10202
  if (!await this.applyReplicationConfiguration(bucketName, cfg, (m) => this.logger.warn(m))) retainPrevious("ReplicationConfiguration");
10204
10203
  }, async () => {
10205
10204
  await this.s3Client.send(new DeleteBucketReplicationCommand({ Bucket: bucketName }));
10206
- this.logger.debug(`Deleted replication configuration on bucket ${bucketName}`);
10205
+ this.logger.debug(`Deleted replication configuration on bucket ${displaySafe(bucketName)}`);
10207
10206
  });
10208
10207
  await this.diffSubConfig(bucketName, previousProperties["ObjectLockConfiguration"], properties["ObjectLockConfiguration"], async (cfg) => {
10209
10208
  if (!await this.applyObjectLockConfiguration(bucketName, cfg, (m) => this.logger.warn(m))) retainPrevious("ObjectLockConfiguration");
@@ -10212,7 +10211,7 @@ var S3BucketProvider = class S3BucketProvider {
10212
10211
  Bucket: bucketName,
10213
10212
  ObjectLockConfiguration: { ObjectLockEnabled: "Enabled" }
10214
10213
  }));
10215
- this.logger.debug(`Cleared object lock rule on bucket ${bucketName}`);
10214
+ this.logger.debug(`Cleared object lock rule on bucket ${displaySafe(bucketName)}`);
10216
10215
  });
10217
10216
  await this.diffSubConfig(bucketName, previousProperties["AccelerateConfiguration"], properties["AccelerateConfiguration"], async (cfg) => this.applyAccelerateConfiguration(bucketName, cfg), async () => this.applyAccelerateConfiguration(bucketName, { AccelerationStatus: "Suspended" }));
10218
10217
  const metricsOutcomes = itemOutcomes();
@@ -10224,7 +10223,7 @@ var S3BucketProvider = class S3BucketProvider {
10224
10223
  Bucket: bucketName,
10225
10224
  Id: id
10226
10225
  }));
10227
- this.logger.debug(`Deleted metrics configuration ${id} on bucket ${bucketName}`);
10226
+ this.logger.debug(`Deleted metrics configuration ${displaySafe(id)} on bucket ${displaySafe(bucketName)}`);
10228
10227
  });
10229
10228
  retainPreviousItems("MetricsConfigurations", metricsOutcomes);
10230
10229
  const analyticsOutcomes = itemOutcomes();
@@ -10236,7 +10235,7 @@ var S3BucketProvider = class S3BucketProvider {
10236
10235
  Bucket: bucketName,
10237
10236
  Id: id
10238
10237
  }));
10239
- this.logger.debug(`Deleted analytics configuration ${id} on bucket ${bucketName}`);
10238
+ this.logger.debug(`Deleted analytics configuration ${displaySafe(id)} on bucket ${displaySafe(bucketName)}`);
10240
10239
  });
10241
10240
  retainPreviousItems("AnalyticsConfigurations", analyticsOutcomes);
10242
10241
  const intelligentTieringOutcomes = itemOutcomes();
@@ -10248,7 +10247,7 @@ var S3BucketProvider = class S3BucketProvider {
10248
10247
  Bucket: bucketName,
10249
10248
  Id: id
10250
10249
  }));
10251
- this.logger.debug(`Deleted intelligent tiering configuration ${id} on bucket ${bucketName}`);
10250
+ this.logger.debug(`Deleted intelligent tiering configuration ${displaySafe(id)} on bucket ${displaySafe(bucketName)}`);
10252
10251
  });
10253
10252
  retainPreviousItems("IntelligentTieringConfigurations", intelligentTieringOutcomes);
10254
10253
  const inventoryOutcomes = itemOutcomes();
@@ -10260,7 +10259,7 @@ var S3BucketProvider = class S3BucketProvider {
10260
10259
  Bucket: bucketName,
10261
10260
  Id: id
10262
10261
  }));
10263
- this.logger.debug(`Deleted inventory configuration ${id} on bucket ${bucketName}`);
10262
+ this.logger.debug(`Deleted inventory configuration ${displaySafe(id)} on bucket ${displaySafe(bucketName)}`);
10264
10263
  });
10265
10264
  retainPreviousItems("InventoryConfigurations", inventoryOutcomes);
10266
10265
  if (versioningChanged && desiredVersioningStatus === "Suspended") {
@@ -10269,7 +10268,7 @@ var S3BucketProvider = class S3BucketProvider {
10269
10268
  return p["ObjectLockConfiguration"]?.["ObjectLockEnabled"] === "Enabled";
10270
10269
  };
10271
10270
  if (hasObjectLock(properties) || hasObjectLock(previousProperties)) {
10272
- this.logger.warn(`Bucket ${bucketName}: versioning would be suspended (VersioningConfiguration removed or set to Suspended), but the bucket has Object Lock enabled and S3 does not allow suspending versioning on it. Leaving versioning enabled.`);
10271
+ this.logger.warn(`Bucket ${displaySafe(bucketName)}: versioning would be suspended (VersioningConfiguration removed or set to Suspended), but the bucket has Object Lock enabled and S3 does not allow suspending versioning on it. Leaving versioning enabled.`);
10273
10272
  retainPrevious("VersioningConfiguration");
10274
10273
  } else await this.applyVersioning(bucketName, { Status: "Suspended" });
10275
10274
  }
@@ -10427,7 +10426,7 @@ var S3BucketProvider = class S3BucketProvider {
10427
10426
  * statement without the compiler losing that control flow ends there.
10428
10427
  */
10429
10428
  refuseForeignRegionAdopt(logicalId, resourceType, bucketName, wantRegion, actualRegion, cause) {
10430
- throw markNonRetryable(new ProvisioningError(`Refusing to adopt existing S3 bucket ${bucketName} for ${logicalId} (${resourceType}): it is owned by this account but lives in ${actualRegion}, while this stack deploys to ${wantRegion}. S3 bucket names are globally unique, so owning the name (which is what 'BucketAlreadyOwnedByYou' and a successful location lookup each report) never means the bucket is in this region. Adopting it would apply this stack's bucket configuration to a bucket in ${actualRegion}, and would record a physical id that denotes no bucket in ${wantRegion}. Either give this stack a bucket name unique to ${wantRegion}, or deploy the stack to ${actualRegion}.`, resourceType, logicalId, bucketName, cause));
10429
+ throw markNonRetryable(new ProvisioningError(`Refusing to adopt existing S3 bucket ${displaySafe(bucketName)} for ${displaySafe(logicalId)} (${resourceType}): it is owned by this account but lives in ${actualRegion}, while this stack deploys to ${wantRegion}. S3 bucket names are globally unique, so owning the name (which is what 'BucketAlreadyOwnedByYou' and a successful location lookup each report) never means the bucket is in this region. Adopting it would apply this stack's bucket configuration to a bucket in ${actualRegion}, and would record a physical id that denotes no bucket in ${wantRegion}. Either give this stack a bucket name unique to ${wantRegion}, or deploy the stack to ${actualRegion}.`, resourceType, logicalId, bucketName, cause));
10431
10430
  }
10432
10431
  /**
10433
10432
  * The region an already-owned bucket actually lives in, canonicalized.
@@ -10577,14 +10576,14 @@ var S3BucketProvider = class S3BucketProvider {
10577
10576
  const probe = await this.probeBucketRegion(physicalId);
10578
10577
  if (probe.kind === "absent") return;
10579
10578
  if (probe.kind === "indeterminate") {
10580
- this.logger.debug(`GetBucketLocation failed for S3 bucket ${physicalId} (${logicalId}) before ${operation}: ${probe.reason}`);
10579
+ this.logger.debug(`GetBucketLocation failed for S3 bucket ${displaySafe(physicalId)} (${displaySafe(logicalId)}) before ${operation}: ${probe.reason}`);
10581
10580
  this.announceUnverifiedBucketIdentity(operation, logicalId, physicalId, probeFailedCause(probe.errorName));
10582
10581
  return;
10583
10582
  }
10584
10583
  if (probe.region === wantRegion) return;
10585
10584
  const consequence = operation === "update" ? `Applying this stack's bucket configuration would reconfigure a bucket in ${probe.region} that this stack does not own the definition of.` : `Deleting it would destroy a bucket in ${probe.region} that this stack's region does not contain, and that deletion cannot be undone.`;
10586
- const remedy = operation === "update" ? `Confirm which bucket you mean, then either rerun this stack against ${probe.region}, or — if the recorded id is stale — drop cdkd's record with 'cdkd state orphan <stack>', which removes the record without touching any AWS resource, and deploy again.` : `Confirm which bucket you mean. If ${physicalId} is genuinely yours to delete, delete it deliberately in ${probe.region}; if this record is simply stale, drop it with 'cdkd state orphan <stack>', which removes cdkd's record without touching any AWS resource, and the destroy will then have nothing to do for this resource.`;
10587
- throw markNonRetryable(new ProvisioningError(`Refusing to ${operation} S3 bucket ${physicalId} for ${logicalId} (${resourceType}): the bucket lives in ${probe.region}, while this stack's state is for ${wantRegion}. S3 bucket names are globally unique, so a state record can name a bucket in another region — records written before the create-path region guard can carry one. ${consequence} ${remedy}`, resourceType, logicalId, physicalId));
10585
+ const remedy = operation === "update" ? `Confirm which bucket you mean, then either rerun this stack against ${probe.region}, or — if the recorded id is stale — drop cdkd's record with 'cdkd state orphan <stack>', which removes the record without touching any AWS resource, and deploy again.` : `Confirm which bucket you mean. If ${displaySafe(physicalId)} is genuinely yours to delete, delete it deliberately in ${probe.region}; if this record is simply stale, drop it with 'cdkd state orphan <stack>', which removes cdkd's record without touching any AWS resource, and the destroy will then have nothing to do for this resource.`;
10586
+ throw markNonRetryable(new ProvisioningError(`Refusing to ${operation} S3 bucket ${displaySafe(physicalId)} for ${displaySafe(logicalId)} (${resourceType}): the bucket lives in ${probe.region}, while this stack's state is for ${wantRegion}. S3 bucket names are globally unique, so a state record can name a bucket in another region — records written before the create-path region guard can carry one. ${consequence} ${remedy}`, resourceType, logicalId, physicalId));
10588
10587
  }
10589
10588
  /**
10590
10589
  * Say out loud that the identity guard did not run.
@@ -10619,7 +10618,7 @@ var S3BucketProvider = class S3BucketProvider {
10619
10618
  * actual defect.
10620
10619
  */
10621
10620
  announceUnverifiedBucketIdentity(operation, logicalId, physicalId, cause) {
10622
- const message = `Could not confirm which bucket ${physicalId} for ${logicalId} is before ${operation}: ${cause.why}, so the cross-region guard did NOT run and cdkd is proceeding on the recorded physical id alone.`;
10621
+ const message = `Could not confirm which bucket ${displaySafe(physicalId)} for ${displaySafe(logicalId)} is before ${operation}: ${cause.why}, so the cross-region guard did NOT run and cdkd is proceeding on the recorded physical id alone.`;
10623
10622
  if (operation === "delete") {
10624
10623
  this.logger.warn(`${message} If this state record names a bucket in another region, this destroy will delete THAT bucket. ${cause.remedy}`);
10625
10624
  return;
@@ -10630,7 +10629,7 @@ var S3BucketProvider = class S3BucketProvider {
10630
10629
  * Create an S3 bucket
10631
10630
  */
10632
10631
  async create(logicalId, resourceType, properties, context) {
10633
- this.logger.debug(`Creating S3 bucket ${logicalId}`);
10632
+ this.logger.debug(`Creating S3 bucket ${displaySafe(logicalId)}`);
10634
10633
  const bucketName = properties["BucketName"] || generateResourceName(logicalId, {
10635
10634
  maxLength: 63,
10636
10635
  lowercase: true,
@@ -10648,13 +10647,13 @@ var S3BucketProvider = class S3BucketProvider {
10648
10647
  await this.s3Client.send(new CreateBucketCommand(createParams));
10649
10648
  createdNewBucket = preflight.kind === "absent";
10650
10649
  if (preflight.kind === "region" && preflight.region !== "us-east-1") this.refuseForeignRegionAdopt(logicalId, resourceType, bucketName, "us-east-1", preflight.region);
10651
- if (preflight.kind === "region") this.logger.warn(`S3 bucket ${bucketName} for ${logicalId} (${resourceType}) already existed in ${preflight.region} and was ADOPTED, not created. In us-east-1 S3 answers a re-create of a bucket you already own with 200 OK and RESETS that bucket's access control lists, so any ACL previously set on ${bucketName} is now the default. cdkd will not delete this bucket if the rest of this create fails.`);
10652
- this.logger.debug(`Created S3 bucket: ${bucketName}`);
10650
+ if (preflight.kind === "region") this.logger.warn(`S3 bucket ${displaySafe(bucketName)} for ${displaySafe(logicalId)} (${resourceType}) already existed in ${preflight.region} and was ADOPTED, not created. In us-east-1 S3 answers a re-create of a bucket you already own with 200 OK and RESETS that bucket's access control lists, so any ACL previously set on ${displaySafe(bucketName)} is now the default. cdkd will not delete this bucket if the rest of this create fails.`);
10651
+ this.logger.debug(`Created S3 bucket: ${displaySafe(bucketName)}`);
10653
10652
  } catch (createError) {
10654
10653
  if (createError instanceof ProvisioningError) throw createError;
10655
10654
  if (createError instanceof Error && (createError.name === "BucketAlreadyOwnedByYou" || createError.message.includes("you already own it"))) {
10656
10655
  await this.assertExistingBucketRegion(logicalId, resourceType, bucketName, region, createError);
10657
- this.logger.debug(`S3 bucket ${bucketName} already exists and is owned by you`);
10656
+ this.logger.debug(`S3 bucket ${displaySafe(bucketName)} already exists and is owned by you`);
10658
10657
  } else throw createError;
10659
10658
  }
10660
10659
  let effectiveOverrides;
@@ -10664,21 +10663,21 @@ var S3BucketProvider = class S3BucketProvider {
10664
10663
  } catch (innerError) {
10665
10664
  if (createdNewBucket) try {
10666
10665
  await this.s3Client.send(new DeleteBucketCommand({ Bucket: bucketName }));
10667
- this.logger.debug(`Cleaned up partially-created S3 bucket ${logicalId} (${bucketName}) after wiring failure`);
10666
+ this.logger.debug(`Cleaned up partially-created S3 bucket ${displaySafe(logicalId)} (${displaySafe(bucketName)}) after wiring failure`);
10668
10667
  } catch (cleanupError) {
10669
- this.logger.debug(`DeleteBucket cleanup failed for S3 bucket ${logicalId} (${bucketName}): ${describeAwsFailure(cleanupError).detail}`);
10668
+ this.logger.debug(`DeleteBucket cleanup failed for S3 bucket ${displaySafe(logicalId)} (${displaySafe(bucketName)}): ${describeAwsFailure(cleanupError).detail}`);
10670
10669
  const maskSecrets = maskerOrIdentity(context?.maskSecrets);
10671
- this.logger.warn(maskSecrets(`Failed to clean up partially-created S3 bucket ${logicalId} (${bucketName}) (${cleanupError instanceof Error ? cleanupError.name : typeof cleanupError}). Re-run with --verbose for AWS's own message. ` + manualBucketDeletionClause(bucketName, maskSecrets)));
10670
+ this.logger.warn(maskSecrets(`Failed to clean up partially-created S3 bucket ${displaySafe(logicalId)} (${displaySafe(maskSecrets(bucketName))}) (${cleanupError instanceof Error ? cleanupError.name : typeof cleanupError}). Re-run with --verbose for AWS's own message. ` + manualBucketDeletionClause(bucketName, maskSecrets)));
10672
10671
  }
10673
10672
  else if (preflight.kind === "indeterminate") {
10674
- this.logger.debug(`GetBucketLocation failed for S3 bucket ${bucketName} (${logicalId}) during create: ${preflight.reason}`);
10673
+ this.logger.debug(`GetBucketLocation failed for S3 bucket ${displaySafe(bucketName)} (${displaySafe(logicalId)}) during create: ${preflight.reason}`);
10675
10674
  const maskSecrets = maskerOrIdentity(context?.maskSecrets);
10676
- this.logger.warn(maskSecrets(`Not cleaning up S3 bucket ${logicalId} (${bucketName}) after a wiring failure: this deploy could not confirm whether it created the bucket (region probe failed: ${preflight.errorName}), and in us-east-1 a successful CreateBucket does not prove it. Re-run with --verbose for AWS's own message. If cdkd created it, the bucket is an orphan. ` + manualBucketDeletionClause(bucketName, maskSecrets)));
10675
+ this.logger.warn(maskSecrets(`Not cleaning up S3 bucket ${displaySafe(logicalId)} (${displaySafe(maskSecrets(bucketName))}) after a wiring failure: this deploy could not confirm whether it created the bucket (region probe failed: ${preflight.errorName}), and in us-east-1 a successful CreateBucket does not prove it. Re-run with --verbose for AWS's own message. If cdkd created it, the bucket is an orphan. ` + manualBucketDeletionClause(bucketName, maskSecrets)));
10677
10676
  }
10678
10677
  throw innerError;
10679
10678
  }
10680
10679
  const attributes = await this.buildAttributes(bucketName);
10681
- this.logger.debug(`Successfully created S3 bucket ${logicalId}: ${bucketName}`);
10680
+ this.logger.debug(`Successfully created S3 bucket ${displaySafe(logicalId)}: ${displaySafe(bucketName)}`);
10682
10681
  const effectiveProperties = S3BucketProvider.applyEffectiveOverrides(properties, effectiveOverrides);
10683
10682
  return {
10684
10683
  physicalId: bucketName,
@@ -10693,10 +10692,10 @@ var S3BucketProvider = class S3BucketProvider {
10693
10692
  * Update an S3 bucket
10694
10693
  */
10695
10694
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
10696
- this.logger.debug(`Updating S3 bucket ${logicalId}: ${physicalId}`);
10695
+ this.logger.debug(`Updating S3 bucket ${displaySafe(logicalId)}: ${displaySafe(physicalId)}`);
10697
10696
  const newBucketName = properties["BucketName"];
10698
10697
  if (newBucketName && newBucketName !== physicalId) {
10699
- this.logger.debug(`Bucket name changed (${physicalId} -> ${newBucketName}), replacement required`);
10698
+ this.logger.debug(`Bucket name changed (${displaySafe(physicalId)} -> ${displaySafe(newBucketName)}), replacement required`);
10700
10699
  return {
10701
10700
  physicalId,
10702
10701
  wasReplaced: true
@@ -10711,7 +10710,7 @@ var S3BucketProvider = class S3BucketProvider {
10711
10710
  for (const [key, value] of await this.applySubConfigDiffs(physicalId, properties, previousProperties, context)) effectiveOverrides.set(key, value);
10712
10711
  await this.applyTagDiff(physicalId, previousProperties["Tags"], properties["Tags"]);
10713
10712
  const attributes = await this.buildAttributes(physicalId);
10714
- this.logger.debug(`Successfully updated S3 bucket ${logicalId}`);
10713
+ this.logger.debug(`Successfully updated S3 bucket ${displaySafe(logicalId)}`);
10715
10714
  const effectiveProperties = S3BucketProvider.applyEffectiveOverrides(properties, effectiveOverrides);
10716
10715
  return {
10717
10716
  physicalId,
@@ -10729,7 +10728,7 @@ var S3BucketProvider = class S3BucketProvider {
10729
10728
  * Note: The bucket must be empty before deletion.
10730
10729
  */
10731
10730
  async delete(logicalId, physicalId, resourceType, properties, context) {
10732
- this.logger.debug(`Deleting S3 bucket ${logicalId}: ${physicalId}`);
10731
+ this.logger.debug(`Deleting S3 bucket ${displaySafe(logicalId)}: ${displaySafe(physicalId)}`);
10733
10732
  const allowAutoEmpty = context?.forceDataDelete === true || hasCdkAutoDeleteTag(properties, "aws-cdk:auto-delete-objects");
10734
10733
  if (context?.expectedRegion) await this.assertStateBucketRegion("delete", logicalId, resourceType, physicalId, context.expectedRegion);
10735
10734
  else this.announceUnverifiedBucketIdentity("delete", logicalId, physicalId, noRecordedRegionCause());
@@ -10739,7 +10738,7 @@ var S3BucketProvider = class S3BucketProvider {
10739
10738
  if (error instanceof NoSuchBucket) {
10740
10739
  const clientRegion = await this.s3Client.config.region();
10741
10740
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
10742
- this.logger.debug(`Bucket ${physicalId} does not exist, skipping deletion`);
10741
+ this.logger.debug(`Bucket ${displaySafe(physicalId)} does not exist, skipping deletion`);
10743
10742
  return;
10744
10743
  }
10745
10744
  throw this.wrapOperationError("delete", logicalId, resourceType, physicalId, error);
@@ -10785,8 +10784,8 @@ var S3BucketProvider = class S3BucketProvider {
10785
10784
  */
10786
10785
  wrapOperationError(operation, logicalId, resourceType, physicalId, error) {
10787
10786
  const failure = describeAwsFailure(error);
10788
- if (failure.redacted) this.logger.debug(`Failed to ${operation} S3 bucket ${logicalId} (${physicalId}): ${failure.detail}`);
10789
- const wrapped = new ProvisioningError(`Failed to ${operation} S3 bucket ${logicalId}: ${failure.summary}`, resourceType, logicalId, physicalId, error instanceof Error ? error : void 0);
10787
+ if (failure.redacted) this.logger.debug(`Failed to ${operation} S3 bucket ${displaySafe(logicalId)} (${displaySafe(physicalId)}): ${failure.detail}`);
10788
+ const wrapped = new ProvisioningError(`Failed to ${operation} S3 bucket ${displaySafe(logicalId)}: ${failure.summary}`, resourceType, logicalId, physicalId, error instanceof Error ? error : void 0);
10790
10789
  return failure.redacted ? markRedactedCause(wrapped) : wrapped;
10791
10790
  }
10792
10791
  /**
@@ -11477,20 +11476,20 @@ var S3BucketProvider = class S3BucketProvider {
11477
11476
  const maxAttempts = 3;
11478
11477
  for (let attempt = 1; attempt <= maxAttempts; attempt++) try {
11479
11478
  await this.s3Client.send(new DeleteBucketCommand({ Bucket: bucketName }));
11480
- this.logger.debug(`Successfully deleted S3 bucket ${logicalId}`);
11479
+ this.logger.debug(`Successfully deleted S3 bucket ${displaySafe(logicalId)}`);
11481
11480
  return;
11482
11481
  } catch (error) {
11483
11482
  const msg = describeAwsFailure(error).detail;
11484
11483
  if (msg.includes("not empty") || msg.includes("BucketNotEmpty")) {
11485
- if (!allowAutoEmpty) throw new Error(`bucket ${bucketName} is not empty. Matching CloudFormation, cdkd does not delete a non-empty bucket unless it opted into automatic emptying (CDK's autoDeleteObjects: true, i.e. the '${S3_AUTO_DELETE_OBJECTS_TAG}' tag). Either empty the bucket first (delete all objects — and for versioned buckets all object versions and delete markers), or redeploy with autoDeleteObjects: true and destroy again.`);
11486
- this.logger.info(`Bucket ${bucketName} not empty (attempt ${attempt}/${maxAttempts}), emptying (auto-delete opt-in present)...`);
11484
+ if (!allowAutoEmpty) throw new Error(`bucket ${displaySafe(bucketName)} is not empty. Matching CloudFormation, cdkd does not delete a non-empty bucket unless it opted into automatic emptying (CDK's autoDeleteObjects: true, i.e. the '${S3_AUTO_DELETE_OBJECTS_TAG}' tag). Either empty the bucket first (delete all objects — and for versioned buckets all object versions and delete markers), or redeploy with autoDeleteObjects: true and destroy again.`);
11485
+ this.logger.info(`Bucket ${displaySafe(bucketName)} not empty (attempt ${attempt}/${maxAttempts}), emptying (auto-delete opt-in present)...`);
11487
11486
  await this.emptyBucket(bucketName);
11488
11487
  continue;
11489
11488
  }
11490
11489
  throw error;
11491
11490
  }
11492
11491
  await this.s3Client.send(new DeleteBucketCommand({ Bucket: bucketName }));
11493
- this.logger.debug(`Successfully deleted S3 bucket ${logicalId}`);
11492
+ this.logger.debug(`Successfully deleted S3 bucket ${displaySafe(logicalId)}`);
11494
11493
  }
11495
11494
  /**
11496
11495
  * Empty a bucket by deleting all object versions and delete markers.
@@ -11529,7 +11528,7 @@ var S3BucketProvider = class S3BucketProvider {
11529
11528
  Quiet: true
11530
11529
  }
11531
11530
  }));
11532
- this.logger.debug(`Emptied ${objects.length} objects from ${bucketName}`);
11531
+ this.logger.debug(`Emptied ${objects.length} objects from ${displaySafe(bucketName)}`);
11533
11532
  }
11534
11533
  if (!listResp.IsTruncated) break;
11535
11534
  keyMarker = decodeListingKey(listResp.NextKeyMarker);
@@ -26025,14 +26024,16 @@ var LogsLogGroupProvider = class {
26025
26024
  } catch (innerError) {
26026
26025
  if (createdNewLogGroup) try {
26027
26026
  await this.logsClient.send(new DeleteLogGroupCommand({ logGroupName }));
26028
- this.logger.debug(`Cleaned up partially-created log group ${logicalId} (${logGroupName}) after wiring failure`);
26027
+ this.logger.debug(`Cleaned up partially-created log group ${displaySafe(logicalId)} (${displaySafe(logGroupName)}) after wiring failure`);
26029
26028
  } catch (cleanupError) {
26029
+ const mask = maskerOrIdentity(context?.maskSecrets);
26030
26030
  const deleteCommand = renderDisableCommand({
26031
26031
  before: "aws logs delete-log-group --log-group-name",
26032
- identifier: logGroupName
26032
+ identifier: logGroupName,
26033
+ maskSecrets: mask
26033
26034
  });
26034
26035
  const manualStep = deleteCommand ? `Manual deletion may be required before the next deploy: ${deleteCommand}` : "Manual deletion may be required before the next deploy, via the console: the log group name cannot be reproduced safely on a command line.";
26035
- this.logger.warn(`Failed to clean up partially-created log group ${logicalId} (${logGroupName}): ${describeAwsFailure(cleanupError).detail}. ${manualStep}`);
26036
+ this.logger.warn(mask(`Failed to clean up partially-created log group ${displaySafe(logicalId)} (${displaySafe(mask(logGroupName))}): ${describeAwsFailure(cleanupError).detail}. ${manualStep}`));
26036
26037
  }
26037
26038
  throw innerError;
26038
26039
  }
@@ -27716,7 +27717,7 @@ var SSMParameterProvider = class {
27716
27717
  try {
27717
27718
  return await this.buildParameterArnUnguarded(name, mask);
27718
27719
  } catch (error) {
27719
- this.logger.warn(mask(`Could not build the Arn attribute for SSM parameter ${name}: ${describeAwsFailure(error).detail}. The parameter itself is unaffected; the Arn is NOT recorded, so an Fn::GetAtt on it will fail until a later deploy records it.`));
27720
+ this.logger.warn(mask(`Could not build the Arn attribute for SSM parameter ${displaySafe(mask(name))}: ${describeAwsFailure(error).detail}. The parameter itself is unaffected; the Arn is NOT recorded, so an Fn::GetAtt on it will fail until a later deploy records it.`));
27720
27721
  return;
27721
27722
  }
27722
27723
  }
@@ -27740,7 +27741,7 @@ var SSMParameterProvider = class {
27740
27741
  const region = await this.ssmClient.config.region();
27741
27742
  const accountInfo = await getAccountInfo(region);
27742
27743
  if (accountInfo.fabricated) {
27743
- this.logger.warn(mask(`Cannot determine the AWS account (STS is unreachable, and the resolved account id is a placeholder), so the Arn attribute for SSM parameter ${name} would be fabricated and is NOT recorded. An Fn::GetAtt on it will fail until a later deploy resolves the account.`));
27744
+ this.logger.warn(mask(`Cannot determine the AWS account (STS is unreachable, and the resolved account id is a placeholder), so the Arn attribute for SSM parameter ${displaySafe(mask(name))} would be fabricated and is NOT recorded. An Fn::GetAtt on it will fail until a later deploy resolves the account.`));
27744
27745
  return;
27745
27746
  }
27746
27747
  const { partition } = derivePartitionAndUrlSuffix(accountInfo.region);
@@ -27754,14 +27755,14 @@ var SSMParameterProvider = class {
27754
27755
  const mask = maskerOrIdentity(context?.maskSecrets);
27755
27756
  const warn = (message) => this.logger.warn(mask(message));
27756
27757
  const debug = (message) => this.logger.debug(mask(message));
27757
- debug(`Creating SSM parameter ${logicalId}`);
27758
+ debug(`Creating SSM parameter ${displaySafe(logicalId)}`);
27758
27759
  const name = properties["Name"] || `/${generateResourceName(logicalId, {
27759
27760
  maxLength: 1023,
27760
27761
  allowedPattern: /[^a-zA-Z0-9-/_]/g
27761
27762
  })}`;
27762
27763
  const type = properties["Type"] || "String";
27763
27764
  const value = properties["Value"];
27764
- if (!value) throw new ProvisioningError(`Value is required for SSM parameter ${logicalId}`, resourceType, logicalId);
27765
+ if (!value) throw new ProvisioningError(`Value is required for SSM parameter ${displaySafe(logicalId)}`, resourceType, logicalId);
27765
27766
  try {
27766
27767
  const putParams = {
27767
27768
  Name: name,
@@ -27785,7 +27786,7 @@ var SSMParameterProvider = class {
27785
27786
  } catch (innerError) {
27786
27787
  try {
27787
27788
  await this.ssmClient.send(new DeleteParameterCommand({ Name: name }));
27788
- debug(`Cleaned up partially-created SSM parameter ${logicalId} (${name}) after wiring failure`);
27789
+ debug(`Cleaned up partially-created SSM parameter ${displaySafe(logicalId)} (${displaySafe(mask(name))}) after wiring failure`);
27789
27790
  } catch (cleanupError) {
27790
27791
  const deleteCommand = renderDisableCommand({
27791
27792
  before: "aws ssm delete-parameter --name",
@@ -27793,11 +27794,11 @@ var SSMParameterProvider = class {
27793
27794
  maskSecrets: mask
27794
27795
  });
27795
27796
  const manualStep = deleteCommand ? `Manual deletion may be required before the next deploy: ${deleteCommand}` : "Manual deletion may be required before the next deploy, via the console: the parameter name cannot be reproduced safely on a command line, and a command naming the sanitized form would delete a DIFFERENT parameter.";
27796
- warn(`Failed to clean up partially-created SSM parameter ${logicalId} (${name}): ${describeAwsFailure(cleanupError).detail}. ${manualStep}`);
27797
+ warn(`Failed to clean up partially-created SSM parameter ${displaySafe(logicalId)} (${displaySafe(mask(name))}): ${describeAwsFailure(cleanupError).detail}. ${manualStep}`);
27797
27798
  }
27798
27799
  throw innerError;
27799
27800
  }
27800
- debug(`Successfully created SSM parameter ${logicalId}: ${name}`);
27801
+ debug(`Successfully created SSM parameter ${displaySafe(logicalId)}: ${displaySafe(mask(name))}`);
27801
27802
  const arn = await this.buildParameterArn(name, mask);
27802
27803
  return {
27803
27804
  physicalId: name,
@@ -27809,7 +27810,7 @@ var SSMParameterProvider = class {
27809
27810
  };
27810
27811
  } catch (error) {
27811
27812
  const cause = error instanceof Error ? error : void 0;
27812
- throw new ProvisioningError(`Failed to create SSM parameter ${logicalId}: ${mask(error instanceof Error ? error.message : String(error))}`, resourceType, logicalId, void 0, cause);
27813
+ throw new ProvisioningError(`Failed to create SSM parameter ${displaySafe(logicalId)}: ${mask(error instanceof Error ? error.message : String(error))}`, resourceType, logicalId, void 0, cause);
27813
27814
  }
27814
27815
  }
27815
27816
  /**
@@ -27818,10 +27819,10 @@ var SSMParameterProvider = class {
27818
27819
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
27819
27820
  const mask = maskerOrIdentity(context?.maskSecrets);
27820
27821
  const debug = (message) => this.logger.debug(mask(message));
27821
- debug(`Updating SSM parameter ${logicalId}: ${physicalId}`);
27822
+ debug(`Updating SSM parameter ${displaySafe(logicalId)}: ${displaySafe(mask(physicalId))}`);
27822
27823
  const type = properties["Type"] || "String";
27823
27824
  const value = properties["Value"];
27824
- if (!value) throw new ProvisioningError(`Value is required for SSM parameter ${logicalId}`, resourceType, logicalId, physicalId);
27825
+ if (!value) throw new ProvisioningError(`Value is required for SSM parameter ${displaySafe(logicalId)}`, resourceType, logicalId, physicalId);
27825
27826
  try {
27826
27827
  const putParams = {
27827
27828
  Name: physicalId,
@@ -27850,9 +27851,9 @@ var SSMParameterProvider = class {
27850
27851
  ResourceId: physicalId,
27851
27852
  Tags: newTags
27852
27853
  }));
27853
- debug(`Updated tags for SSM parameter ${physicalId}`);
27854
+ debug(`Updated tags for SSM parameter ${displaySafe(mask(physicalId))}`);
27854
27855
  }
27855
- debug(`Successfully updated SSM parameter ${logicalId}`);
27856
+ debug(`Successfully updated SSM parameter ${displaySafe(logicalId)}`);
27856
27857
  const arn = await this.buildParameterArn(physicalId, mask);
27857
27858
  return {
27858
27859
  physicalId,
@@ -27865,26 +27866,26 @@ var SSMParameterProvider = class {
27865
27866
  };
27866
27867
  } catch (error) {
27867
27868
  const cause = error instanceof Error ? error : void 0;
27868
- throw new ProvisioningError(`Failed to update SSM parameter ${logicalId}: ${mask(error instanceof Error ? error.message : String(error))}`, resourceType, logicalId, physicalId, cause);
27869
+ throw new ProvisioningError(`Failed to update SSM parameter ${displaySafe(logicalId)}: ${mask(error instanceof Error ? error.message : String(error))}`, resourceType, logicalId, physicalId, cause);
27869
27870
  }
27870
27871
  }
27871
27872
  /**
27872
27873
  * Delete an SSM parameter
27873
27874
  */
27874
27875
  async delete(logicalId, physicalId, resourceType, _properties, context) {
27875
- this.logger.debug(`Deleting SSM parameter ${logicalId}: ${physicalId}`);
27876
+ this.logger.debug(`Deleting SSM parameter ${displaySafe(logicalId)}: ${displaySafe(physicalId)}`);
27876
27877
  try {
27877
27878
  await this.ssmClient.send(new DeleteParameterCommand({ Name: physicalId }));
27878
- this.logger.debug(`Successfully deleted SSM parameter ${logicalId}`);
27879
+ this.logger.debug(`Successfully deleted SSM parameter ${displaySafe(logicalId)}`);
27879
27880
  } catch (error) {
27880
27881
  if (error instanceof ParameterNotFound) {
27881
27882
  const clientRegion = await this.ssmClient.config.region();
27882
27883
  assertRegionMatch(clientRegion, context?.expectedRegion, resourceType, logicalId, physicalId);
27883
- this.logger.debug(`Parameter ${physicalId} does not exist, skipping deletion`);
27884
+ this.logger.debug(`Parameter ${displaySafe(physicalId)} does not exist, skipping deletion`);
27884
27885
  return;
27885
27886
  }
27886
27887
  const cause = error instanceof Error ? error : void 0;
27887
- throw new ProvisioningError(`Failed to delete SSM parameter ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
27888
+ throw new ProvisioningError(`Failed to delete SSM parameter ${displaySafe(logicalId)}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
27888
27889
  }
27889
27890
  }
27890
27891
  /**
@@ -28027,7 +28028,7 @@ var SSMParameterProvider = class {
28027
28028
  after: "--query Parameter.Name --output text"
28028
28029
  });
28029
28030
  const howToRead = readCommand ? ` Read the name AWS holds with: ${readCommand}` : " Read the name AWS holds via the console: the value cdkd was given cannot be reproduced safely on a command line, so any command shown here would read a different parameter.";
28030
- throw new ProvisioningError(`Cannot adopt SSM parameter ${input.logicalId} from ${shape} ('${explicit}'): cdkd records a parameter's NAME as its physical id, because SSM's write APIs accept only the name (PutParameter and DeleteParameter both reject an ARN, and a name cannot contain ':'), so the next cdkd deploy and cdkd destroy would fail with a ValidationException. ${remedy}.${whyNotDerived}${howToRead}`, input.resourceType, input.logicalId);
28031
+ throw new ProvisioningError(`Cannot adopt SSM parameter ${displaySafe(input.logicalId)} from ${shape} ('${displaySafe(explicit)}'): cdkd records a parameter's NAME as its physical id, because SSM's write APIs accept only the name (PutParameter and DeleteParameter both reject an ARN, and a name cannot contain ':'), so the next cdkd deploy and cdkd destroy would fail with a ValidationException. ${remedy}.${whyNotDerived}${howToRead}`, input.resourceType, input.logicalId);
28031
28032
  }
28032
28033
  /**
28033
28034
  * Adopt an existing SSM parameter into cdkd state.
@@ -73789,7 +73790,11 @@ async function driftCommand(stacks, options) {
73789
73790
  const targetRefs = resolveTargetRefs(stacks, await stateBackend.listStacks(), options);
73790
73791
  const reports = [];
73791
73792
  for (const ref of targetRefs) {
73792
- if (!ref.region) throw new Error(`Stack '${ref.stackName}' has only a legacy state record without a region. Run 'cdkd deploy ${ref.stackName}' (or any cdkd write) to migrate it to the region-scoped layout, then re-run drift detection.`);
73793
+ if (!ref.region) {
73794
+ const migrate = stackCommandFor("cdkd deploy", ref.stackName, { patternMatched: true });
73795
+ const identity = stackIdentityLine(ref.stackName);
73796
+ throw new Error("A state record for this stack is a legacy one with no region, which drift cannot read. A cdkd write migrates it to the region-scoped layout; re-run drift detection after it." + (identity === void 0 ? "\nThe stack name is not printed here: a name is printed only when it renders exactly, is non-empty and fits the reference cap — this one fails at least one of those." : `\n${identity}`) + (migrate === void 0 ? `\nThe migrate command is not printed here: ${WITHHELD_COMMAND_REASON} List records as stored with 'cdkd state list --json' and migrate the one whose key matches.` : `\nMigrate with: ${migrate}`));
73797
+ }
73793
73798
  const report = await runDriftForStack(ref.stackName, ref.region, stateBackend, providerRegistry, ccApiFallback, resolvePrincipalUniqueId, options.accept || options.revert ? "refuse" : "repair");
73794
73799
  reports.push(report);
73795
73800
  }
@@ -74889,7 +74894,7 @@ async function runAccept(reports, stateBackend, stateConfig, awsClients, options
74889
74894
  for (const change of outcome.changes) {
74890
74895
  const refusal = acceptRefusalReason(change, outcome.maskedPaths);
74891
74896
  if (refusal !== void 0) {
74892
- logger.warn(` ! ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): not accepting '${change.path}' — ${refusal}, so cdkd will not write it to state. Run 'cdkd drift ${report.stackName} --revert' to push the referenced value back to AWS, or re-deploy if the reference changed.`);
74897
+ logger.warn(` ! ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): not accepting '${change.path}' — ${refusal}, so cdkd will not write it to state. Run 'cdkd drift --revert' for this stack to push the referenced value back to AWS, or re-deploy if the reference changed.`);
74893
74898
  continue;
74894
74899
  }
74895
74900
  setAtPath(newBaseline, change.path, change.awsValue);
@@ -76186,7 +76191,7 @@ async function runRevert(reports, providerRegistry, stateBackend, stateConfig, a
76186
76191
  await stateBackend.saveState(report.stackName, report.region, newState, saveOptions);
76187
76192
  logger.info(`✓ State updated for ${report.stackName} (${report.region}): recorded the value the provider actually applied on ${recordedCount} resource(s).`);
76188
76193
  } catch (err) {
76189
- logger.warn(`Reverted ${report.stackName} (${report.region}), but could not record the value the provider actually applied: ${err instanceof Error ? err.message : String(err)}. The next 'cdkd drift' will report the same difference — re-run 'cdkd drift ${report.stackName} --revert' once the state write can succeed.`);
76194
+ logger.warn(`Reverted ${report.stackName} (${report.region}), but could not record the value the provider actually applied: ${err instanceof Error ? err.message : String(err)}. The next 'cdkd drift' will report the same difference — re-run 'cdkd drift --revert' for this stack once the state write can succeed.`);
76190
76195
  }
76191
76196
  }
76192
76197
  } finally {
@@ -76297,7 +76302,7 @@ function printRevertPlan(reports, out) {
76297
76302
  const word = unbaselined.length === 1 ? "value" : "values";
76298
76303
  out.write(` ! this resource has no observed-capture baseline, so the revert pushes the raw TEMPLATE and LEAVES ${unbaselined.length} AWS-authored ${word} untouched:\n`);
76299
76304
  for (const path of unbaselined) out.write(` ${maskSecretsInText(path, o.secrets)}\n`);
76300
- out.write(` The template does not declare these, so cdkd cannot tell an AWS-authored value from an out-of-band change and will not reset either (issue #1626). Run 'cdkd state refresh-observed ${report.stackName}' (or re-deploy) to populate observedProperties if you want them reverted too.\n`);
76305
+ out.write(" The template does not declare these, so cdkd cannot tell an AWS-authored value from an out-of-band change and will not reset either (issue #1626). Run 'cdkd state refresh-observed' for this stack (or re-deploy) to populate observedProperties if you want them reverted too.\n");
76301
76306
  }
76302
76307
  }
76303
76308
  }
@@ -76466,6 +76471,134 @@ function formatScalar(value) {
76466
76471
  return JSON.stringify(value);
76467
76472
  }
76468
76473
  /**
76474
+ * Why a command is not printed, phrased as the RULE rather than as a claim
76475
+ * about the name (m19 of the go-to-k/cdkd#3486 review). This SUPERSEDES the
76476
+ * m4 / m10 wording, which said the constant should name every reason the gate
76477
+ * has "since naming one tells the operator something false about the others" —
76478
+ * the enumeration is what round 4 measured as the defect.
76479
+ *
76480
+ * The earlier wording was a four-way disjunction — "does not render exactly, is
76481
+ * empty, is too long, or ... an option or a pattern" — which is true, but three
76482
+ * of the four disjuncts are visibly FALSE of a name printed on the `Stack:`
76483
+ * line right above it: `--all` renders exactly, is non-empty and is short. A
76484
+ * reader checking the sentence against what they can see concludes the tool is
76485
+ * guessing.
76486
+ *
76487
+ * The leading-`-` clause is stated as the GATE rather than as a parse, because
76488
+ * the gate is wider than Commander: `--all` really is parsed as the flag, while
76489
+ * a BARE `-` Commander takes positionally (measured) and this refuses it
76490
+ * anyway. Writing "would be read as an option" would be false of that one name.
76491
+ *
76492
+ * Naming the ACTUAL reason needs the gate to return it, and deriving it here
76493
+ * from a second copy of the predicates is the exact defect go-to-k/cdkd#3499
76494
+ * closed one file over. So this states the rule and leaves the reason to the
76495
+ * go-to-k/cdkd#3436 fold-in, where `pasteableCommand` supplies it.
76496
+ */
76497
+ const WITHHELD_COMMAND_REASON = "a name is printed in a command only when it renders exactly, is non-empty, fits the reference cap, does not begin with '-', and is not a 'cdkd deploy' pattern — this one fails at least one of those.";
76498
+ /**
76499
+ * Does `value` reach the terminal as itself — sanitizing changes nothing, and
76500
+ * the state-reference cap does not cut it?
76501
+ *
76502
+ * Module-private and shared by {@link stackCommandFor} and
76503
+ * {@link stackIdentityLine}: the identity line and the command it sits above
76504
+ * must agree about which names are safe to print, and two spellings of this
76505
+ * predicate is how they would come to disagree.
76506
+ */
76507
+ function rendersExactly(value) {
76508
+ if (value === "") return false;
76509
+ const safe = displaySafe(value, { asciiOnly: true });
76510
+ return safe === value && !truncateCodePoints(safe, 1152).truncated;
76511
+ }
76512
+ /**
76513
+ * The `Stack: '<name>'` line that carries a record's identity NEXT TO a
76514
+ * pasteable command, or `undefined` when the name cannot be printed at all.
76515
+ *
76516
+ * A labelled command line is a trusted-looking shape, and a stack name is an
76517
+ * S3 key segment `listStacks` validates only for non-emptiness — so a name
76518
+ * carrying a newline printed ABOVE one forges a second labelled line that the
76519
+ * operator has every reason to trust. The same gate as the command, on its own
76520
+ * line, shell-quoted: inside a sentence a `$(...)` name executes when the
76521
+ * phrase is pasted, and `displayIdent`'s JSON quotes would not stop that —
76522
+ * double quotes do not close command substitution.
76523
+ *
76524
+ * USED BY SITE 1 ALONE, deliberately. A labelled command line is only safe in
76525
+ * a block whose OTHER values are gated too, and site 1's block carries exactly
76526
+ * two: this identity and the command beside it. The blocks that also carry a
76527
+ * property path, a resource type, a state-write error message or an AWS
76528
+ * readback value cannot meet that bar
76529
+ * by sanitizing — an arbitrary value cannot be gated for exactness and still
76530
+ * printed — so they keep their command in prose and the whole class is
76531
+ * [#3436](https://github.com/go-to-k/cdkd/issues/3436)'s.
76532
+ */
76533
+ function stackIdentityLine(stackName, indent = "") {
76534
+ return rendersExactly(stackName) ? `${indent}Stack: ${shellQuote(stackName)}` : void 0;
76535
+ }
76536
+ /**
76537
+ * A pasteable `cdkd ...` command addressing ONE state record, or `undefined`
76538
+ * when this stack name cannot be named safely — in which case the caller names
76539
+ * the command in prose and leaves the operator to supply the name.
76540
+ *
76541
+ * Every name these messages carry comes out of an S3 KEY (`listStacks`, and the
76542
+ * `report.stackName` derived from it), so it is as untrusted as a state record's
76543
+ * body (issue [#3307](https://github.com/go-to-k/cdkd/issues/3307)). Four gates,
76544
+ * and each closes a different failure:
76545
+ *
76546
+ * - SANITIZE, then compare against the RAW value. `displaySafe` drops the
76547
+ * forgery class (C0 + DEL, `U+0085` and C1, `U+2028`/`U+2029`, the bidi
76548
+ * overrides), so a name carrying one is never NAMED IN A COMMAND; and a name
76549
+ * it ALTERED addresses a DIFFERENT record, the misdirection
76550
+ * `malformedDestroyResourcesRefusalMessage` and `orphanCommandFor` already
76551
+ * gate for. `asciiOnly` here rather than the denylist, because a stack name's
76552
+ * charset is the S3 key's. What this does NOT do is sanitize the identity the
76553
+ * surrounding prose prints: `report.stackName` reaches ~20 message sites in
76554
+ * this file raw, which is the DISPLAY class go-to-k/cdkd#3232 records, not
76555
+ * this gate's.
76556
+ * - CAP at `STACK_REF_MAX_CODE_POINTS`, the state-reference grammar, so a
76557
+ * multi-kilobyte planted name cannot grow the pasted payload without bound,
76558
+ * while a legitimate multi-level nested child (`Parent~Child~...`) still
76559
+ * renders. It bounds the PAYLOAD and nothing more — a name at the cap still
76560
+ * wraps across a terminal, which is `display-safe.ts`'s own caveat on the
76561
+ * constant (go-to-k/cdkd#3179).
76562
+ * - SHELL-QUOTE, and print the command LAST and UNWRAPPED on its own labelled
76563
+ * line. `shellQuote` is only as good as the quote context around it: inside
76564
+ * prose `'...'` a quoted value turns the quoting inside out and a pasted span
76565
+ * RUNS (measured in go-to-k/cdkd#3363; the class is go-to-k/cdkd#3436).
76566
+ * - REFUSE a name the COMMAND would read as something other than a name. A
76567
+ * leading `-` is refused CONSERVATIVELY: `--all` survives sanitizing, the cap
76568
+ * and quoting and is then parsed by Commander as the flag, addressing every
76569
+ * stack. (A BARE `-` Commander takes positionally, so the refusal is wider
76570
+ * than the parse — the gate is "starts with `-`", not "parses as an option".)
76571
+ * And `cdkd deploy` matches its argument as a PATTERN
76572
+ * (`src/cli/stack-matcher.ts`), where `*` is a wildcard and `/` selects by
76573
+ * display path. `patternMatched` asks for the last two; `/` cannot arrive
76574
+ * through a key (`listStacks` splits keys on it), so that half is defensive.
76575
+ *
76576
+ * **`region` and `flags` have NO production caller today, and neither does
76577
+ * `stackIdentityLine`'s `indent`** (M16 / m17 of the go-to-k/cdkd#3486 review;
76578
+ * the one call site is the legacy region-less refusal, which has no region by
76579
+ * definition and passes only `patternMatched`). They are kept, with their
76580
+ * cases, as the landing place for the three `cdkd drift` sites
76581
+ * go-to-k/cdkd#3436 owns — the `--stack-region` requirement go-to-k/cdkd#3307
76582
+ * states for `:6139` is exactly what `region` exists to satisfy. Read their
76583
+ * hazard-matrix cases as a SPECIFICATION for that landing, not as coverage of
76584
+ * a live path. `region` takes the same gates as the NAME — sanitize,
76585
+ * exactness, the cap, emptiness and the leading `-` — because a region is a
76586
+ * key SEGMENT, no more trusted than the name.
76587
+ *
76588
+ * Exported for `tests/unit/cli/drift.test.ts`, which drives the hazard matrix
76589
+ * through it directly; the one call site is driven through the CLI separately,
76590
+ * since what a site PASSES is not something a helper test can see.
76591
+ */
76592
+ function stackCommandFor(command, stackName, opts = {}) {
76593
+ if (!rendersExactly(stackName) || stackName.startsWith("-")) return void 0;
76594
+ if (opts.patternMatched && (stackName.includes("*") || stackName.includes("/"))) return void 0;
76595
+ if (opts.region !== void 0 && (!rendersExactly(opts.region) || opts.region.startsWith("-"))) return;
76596
+ const parts = [command, shellQuote(stackName)];
76597
+ if (opts.flags !== void 0) parts.push(opts.flags);
76598
+ if (opts.region !== void 0) parts.push(`--stack-region ${shellQuote(opts.region)}`);
76599
+ return parts.join(" ");
76600
+ }
76601
+ /**
76469
76602
  * Reusable `--stack-region <region>` option (mirrors `state show`).
76470
76603
  */
76471
76604
  function stackRegionOption$2() {
@@ -98139,4 +98272,4 @@ function buildProgram() {
98139
98272
 
98140
98273
  //#endregion
98141
98274
  export { buildProgram };
98142
- //# sourceMappingURL=program-CAdTYHWf.js.map
98275
+ //# sourceMappingURL=program-Cy-pVgf_.js.map