@go-to-k/cdkd 0.291.8 → 0.291.9

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-eLdrQQ2R.js";
1
+ import { $ as yellow, $a as markRedactedCause, $i as PARTITION_TABLE, $n as repairMalformedResourcePropertiesForReadOnly, $r as AssetModeResolver, $t as requireConfigObject, A as createPreDeleteFinalSnapshot, Aa as LocalStartServiceError, Ai as getLegacyStateBucketName, An as malformedOutputsRefusalMessage, Ar as buildForceUnlockCommand, At as carriesDynamicReference, B as isStatefulRecreateTargetSync, Bi as ssmResolvedValueType, Bn as refuseMalformedOrphansForDestroy, Br as importableOutputKeys, Bt as isSettledInstanceState, C as namesAnyDeclaredParameter, Ci as escapeRegExp, Cn as isReadableResourceEntry, Cr as recoverMaskedOutput, Ct as slowCcOperationTimeoutMs, D as PRE_DELETE_SNAPSHOT_TYPES, Da as DynamicReferenceRegionAmbiguousError, Di as Synthesizer, Dn as malformedOrphanRecordsWarning, Dr as S3StateBackend, Dt as disableInstanceApiTermination, E as ATOMIC_FINAL_SNAPSHOT_TYPES, Ea as DeployCancelledError, Ei as getDockerImageBySourceHash, En as malformedLocalOutputsWarning, Er as LockManager, Et as deleteSkipReason, F as extractDeploymentEventError, Fa as ProvisioningError, Fi as resolveStateBucketWithDefault, Fn as malformedResourcesWarning, Fr as DEFAULT_STATE_PREFIX, Ft as isImpossibleEmptyStoredAttribute, G as toCfnInteger, Ga as withErrorHandling, Gi as uploadCfnTemplate, Gn as refuseMalformedResourceEntries, Gr as shouldRetainResource, Gt as coerceCfnBoolean, H as WARM_THROUGHPUT_MEMBERS, Hi as CFN_TEMPLATE_URL_LIMIT, Hn as refuseMalformedOutputs, Hr as isReadableBag, Ht as normalizeAwsTagsToCfn, I as makeSiblingClaimReader, Ia as ResourceTimeoutError, Ii as resolveStateBucketWithDefaultAndSource, In as malformedStateRefusalMessage, Ir as exportNamesCarriedFrom, It as isNamelessDynamicReferenceError, J as bold, Ja as isMarkedNonRetryable, Ji as injectiveKeyPrefix, Jn as refuseMalformedResourcesForDestroy, Jr as WorkGraph, Jt as configIntegerRefusal, K as toFiniteNumber, Ka as pasteableCommand, Ki as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Kn as refuseMalformedResourceEntriesForOrphan, Kr as AssetPublisher, Kt as coerceCfnInteger, L as planOrphanAdoption, La as ResourceUpdateNotSupportedError, Li as resolveUseCdkBootstrapAssets, Ln as refuseDivergentRecordRegionForDestroy, Lr as hasReadableExportSet, Lt as isUnboundTemplateParameter, M as refusesFinalSnapshot, Ma as MalformedProducerRecordRefusalError, Mi as resolveAutoAssetStorage, Mn as malformedRenderedContainersWarning, Mr as forceQuitRecoveryClause, Mt as cfnRefValueFromPhysicalId, N as unsupportedFinalSnapshotError, Na as NestedStackChildDirectDestroyError, Ni as resolveCaptureObservedState, Nn as malformedResourceEntriesWarning, Nr as formatLockExpiry, Nt as coerceParameterTypedValue, O as buildFinalSnapshotIdentifier, Oa as IntrinsicResolutionRefusalError, Oi as synthesisStatusMessage, On as malformedOrphansRefusalMessage, Or as rebuildClientForBucketRegion, Ot as isTerminationProtectionPropagationError, P as makeCanonicalizePropertiesFn, Pa as PartialFailureError, Pi as resolveSkipPrefix, Pn as malformedResourcePropertiesWarning, Pr as CUSTOM_RESOURCE_RESPONSE_PREFIX, Pt as getAccountInfo, Q as red, Qa as markNonRetryable, Qi as expectedOwnerParam, Qn as repairMalformedResourceEntriesForReadOnly, Qr as rewriteTemplateAssetReferences, Qt as requireConfigArray, R as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ra as StackHasActiveImportsError, Ri as stateBucketExistenceConfirmed, Rn as refuseMalformedNestedChildOutputs, Rr as hasReasonlessBaselineRefusal, Rt as parameterTypeMayLoseSecretIdentity, S as computeParameterTaint, Sa as CdkdError, Si as runDockerStreaming, Sn as hasReadableResources, Sr as recordMaskOnlyValue, St as isWaitAbandonedError, T as resourcesNamingDeclaredParameter, Ti as AssetManifestLoader, Tn as malformedExportSourceWarning, Tr as scrubResourceRecord, Tt as deleteIndeterminateGuards, U as coerceWarmThroughput$1, Ui as MIGRATE_TMP_PREFIX, Un as refuseMalformedOutputsForDestroy, Ur as orphansAfterRollback, Ut as resolveExplicitPhysicalId, V as renderStatefulReason, Va as SynthesisError, Vi as CFN_TEMPLATE_BODY_LIMIT, Vn as refuseMalformedOrphansForOrphan, Vr as importableOutputs, Vt as WAFv2WebACLProvider, W as isWarmThroughputDecrease, Wa as normalizeAwsError, Wi as findLargeInlineResources, Wn as refuseMalformedResourceAttributesForOrphan, Wr as orphansCarriedFrom, Wt as assertRegionMatch, X as gray, Xa as isThrottlingError, Xi as producerRecordKey, Xn as repairMalformedOrphansForReadOnly, Xr as createAssetRedirectResolver, Xt as readConfigString, Y as cyan, Ya as isRetryableTransientError, Yi as producerCoordinateKey, Yn as refuseMalformedState, Yr as buildAssetRedirectMap, Yt as configStringRefusal, Z as green, Za as isTransientServerError, Zi as decodeListingKey, Zn as repairMalformedOutputsForReadOnly, Zr as loadPublishableAssetManifest, Zt as replayWarn, _ as bagHoldsSecretExpression, _a as getAwsClients, _i as formatDockerLoginError, _n as UNREADABLE_ORPHANS_CONTAINER_ROW, _r as identityKeyFor, _t as endCommandInterruptScope, a as DeploymentEventsStore, aa as processStackMessages, ai as parseBootstrapMarker, an as s3BucketDomainName, ar as describeTypeWithThrottleRetry, at as secretBearingStateKeyWarning, b as mergeNoChangeOutputs, ba as setAwsClients, bi as redactDockerArgvValues, bn as hasReadableOrphans, br as maskSecretsInError, bt as startInterruptWatch, c as replayFailedOperations, ca as hasPlainPrototype, ci as validateContainerRepoName, cn as s3BucketWebsiteUrl, cr as TemplateParser, ct as IAMRoleProvider, d as updatePartialMessage, da as absoluteAssemblyPathEscape, di as resolveDockerContextDirectory, dn as applyCallerIdentityCredentials, dr as STATE_SOURCED_READBACK_RULES, dt as ProviderRegistry, ea as canonicalizeRegion, ei as BOOTSTRAP_MARKER_PREFIX, en as requireConfigString, eo as retryClassificationText, er as repairMalformedResourcesForReadOnly, et as collectDeclaredOutputNames, f as updatePartialReason, fa as renderAssemblyPathEscape, fi as warnManifestExecutable, fn as callerEnvCredentials, fr as TEMPLATE_SOURCED_RULES, ft as wouldReturnToSdkProvider, g as computeImplicitDeleteEdges, ga as AwsClients, gi as dockerSpawnEnvWithSensitive, gn as STATE_RESOURCES_MALFORMED, gr as errorCauseChain, gt as beginCommandInterruptScope, h as IMPLICIT_DELETE_DEPENDENCIES, ha as resolveBucketRegion, hi as describeDockerFailure, hn as INTRINSIC_KEYS, hr as dynamicReferenceTokens, ht as maskerOrIdentity, i as DeploymentEventsReader, ia as globMatches, ii as isCrossRegionRedirect, in as s3BucketArn, ir as findSilentDropProperties, it as secretBearing, j as isFinalSnapshotError, ji as resolveApp, jn as malformedOutputsWarning, jr as buildLockContentionMessage, jt as carriesFetchableDynamicReference, k as ccRoutedFinalSnapshotError, ka as LocalInvokeBuildError$1, ki as getDefaultStateBucketName, kn as malformedOrphansWarning, kr as UNREPRODUCIBLE_LOCK_CLAUSE, kt as IntrinsicFunctionResolver, l as replayRollback, la as nullPrototypeRecord, li as buildDenyExternalAccessPolicy, ln as applyRoleArnIfSet, lr as STATE_SOURCED_BASELINE_RULES, lt as collectInlinePolicyNamesManagedBySiblings, m as maskingRetryLogger, mi as describeDockerExecFailure, mn as DiffCalculator, mr as createSecretMasker, mt as maskDeep, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as AssemblyReader, ni as ensureAssetStorage, nn as producerRegionsFromState, no as safeStringify, nr as safeStackName, nt as exportAliasCollisionScrubWarning, o as planFailedOps, oa as defineOwnKey, oi as readBootstrapMarkerBody, on as s3BucketDualStackDomainName, or as withRetry, ot as secretSafeKeyDisplay, p as withResourceDeadline, pa as resolveAssemblyPath, pi as describeDockerCapturedOutput, pn as envCredentialsAreAssumedRole, pr as carriesSecretMask, pt as createMaskedRetryLogger, q as formatResourceLine, qa as shellQuote, qi as injectiveKey, qn as refuseMalformedResourcePropertiesForOrphan, qr as stringifyValue, qt as configBooleanRefusal, r as DeployEngine, ra as failedStageNote, ri as getBootstrapMarkerKey, rn as withSharedDrainBudget, rr as findActionableSilentDrops, rt as isExportAliasCollision, s as planRollback, sa as hasOwnKey, si as validateAssetBucketName, sn as s3BucketRegionalDomainName, sr as DagBuilder, st as getCurrentResourceSecrets, t as DEFAULT_RESOURCE_TIMEOUT_MS, ta as derivePartitionAndUrlSuffix, ti as assertAssetBucketRegion, tn as classifyReplaySecretRegion, to as describeAwsFailure, tr as safeRegion, tt as collectPublishedOutputNames, u as resolveReplacementOldType, ua as ownValue, ui as buildDockerImage, un as AWS_CREDENTIAL_ENV_KEYS, ur as STATE_SOURCED_CROSS_GENERATION_RULES, ut as clearOnUpdateRemoval, v as isSecretBearingReferenceString, va as resetAwsClients, vi as getDockerCmd, vn as UNREADABLE_RESOURCES_MAP_ROW, vr as isSingleDynamicReferenceToken, vt as interruptWatchListenerCount, w as reachableDivergentParameters, wa as CrossAccountSecretRefusalError, wi as stripControlChars, wn as malformedExportNamesWarning, wr as redactSecretsForState, wt as UNSPECIFIED_SKIP_REASON, x as bindingSkippedOutputs, xi as runDockerForeground, xn as hasReadableOutputs, xr as maskSecretsInText, xt as CloudControlProvider, y as keptWholeReasonText, ya as runWithStackAwsClients, yi as partitionSensitiveEnv, yn as displayLogicalId, yr as markSameGenerationBag, yt as isInterruptedWaitError, z as isStatefulRecreateTargetForReplace, za as StackTerminationProtectionError, zi as warnDeprecatedNoPrefixCliFlag, zn as refuseMalformedOrphans, zr as hasUnverifiableParameterRefusal, zt as refStateLookupFromResource } from "./deploy-engine-TkL9nyq8.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-D_XcHZoy.js";
5
- import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-B3RJYZnx.js";
4
+ import { t as getCdkdVersion } from "./version-RzKz4JAW.js";
5
+ import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-D9EJApN9.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";
@@ -1759,10 +1759,18 @@ async function bootstrapDestroyCommand(options) {
1759
1759
  if (markerBody === null) {
1760
1760
  const probed = rawMarkerKey === markerKey ? markerKey : `${markerKey}, ${rawMarkerKey}`;
1761
1761
  logger.info(`No bootstrap marker for region '${region}' (${probed}) — asset storage is not opted in for this region (or was already destroyed); nothing to delete.`);
1762
- if (markerSiblings.sameRegionKeys.length > 0) for (const siblingKey of markerSiblings.sameRegionKeys) logger.warn(`A bootstrap marker for this region DOES exist at '${siblingKey}', under a different spelling of the region name — its asset bucket and ECR repository are still alive. Re-run 'cdkd bootstrap --destroy --region ${markerRegionOfKey(siblingKey)}' to tear it down.`);
1762
+ if (markerSiblings.sameRegionKeys.length > 0) for (const siblingKey of markerSiblings.sameRegionKeys) logger.warn(`A bootstrap marker for this region DOES exist at '${siblingKey}', under a different spelling of the region name — its asset bucket and ECR repository are still alive.\nTear it down with: ${pasteableCommand("cdkd bootstrap", [{ literal: "--destroy" }, {
1763
+ flag: "--region",
1764
+ value: markerRegionOfKey(siblingKey),
1765
+ hole: "region"
1766
+ }]).command}`);
1763
1767
  if (!options.includeStateBucket) {
1764
1768
  if (!markerListingSucceeded) logger.warn(`The bootstrap-marker listing could not be made, so it is NOT known whether this region has a marker under another spelling of its name. Check 's3://${bucketName}/${BOOTSTRAP_MARKER_PREFIX}' before re-bootstrapping — re-running 'cdkd bootstrap' while one exists writes a SECOND marker with DEFAULT names, and the next destroy would then tear down that storage while the storage the existing marker names survives.`);
1765
- else if (markerSiblings.sameRegionKeys.length === 0) logger.info(`If the asset bucket / ECR repo still exist without a marker, re-run 'cdkd bootstrap --region ${region}' to recreate the marker, then destroy again.`);
1769
+ else if (markerSiblings.sameRegionKeys.length === 0) logger.info(`If the asset bucket / ECR repo still exist without a marker, recreate the marker and destroy again.\nRecreate it with: ${pasteableCommand("cdkd bootstrap", [{
1770
+ flag: "--region",
1771
+ value: region,
1772
+ hole: "region"
1773
+ }]).command}`);
1766
1774
  return;
1767
1775
  }
1768
1776
  } else marker = parseBootstrapMarker(markerBody, resolvedMarkerKey);
@@ -1780,9 +1788,14 @@ async function bootstrapDestroyCommand(options) {
1780
1788
  if (markerSiblings.otherRegions.length > 0) throw new CdkdError(`Refusing to delete state bucket '${bucketName}': region(s) ${markerSiblings.otherRegions.map((r) => displayIdent(r)).join(", ")} are still opted in to cdkd asset storage (their bootstrap markers live in this bucket). Run 'cdkd bootstrap --destroy --region <r>' for each first.`, "STATE_BUCKET_HOLDS_MARKERS");
1781
1789
  if (markerSiblings.sameRegionKeys.length > 0) {
1782
1790
  const canonicalStillPresent = markerBody !== null && resolvedMarkerKey === markerKey;
1783
- const listing = markerSiblings.sameRegionKeys.map((k) => canonicalStillPresent ? ` - ${k}` : ` - ${k} (cdkd bootstrap --destroy --region ${markerRegionOfKey(k)})`).join("\n");
1784
- const remedy = canonicalStillPresent ? `Run 'cdkd bootstrap --destroy --region ${region}' WITHOUT --include-state-bucket ONCE: it tears down '${resolvedMarkerKey}' and then prints the exact --region spelling for each marker still standing. Follow those, then re-run with --include-state-bucket. (No per-marker spelling is given here because '${resolvedMarkerKey}' still exists and would be resolved first — and simply repeating this same command would not clear the rest, since once it is gone this region's canonical key no longer resolves anything.)` : "Run the command shown against each marker above, then re-run with --include-state-bucket.";
1785
- throw new CdkdError(`Refusing to delete state bucket '${bucketName}': region '${region}' has ${markerSiblings.sameRegionKeys.length} further bootstrap marker(s) under a different spelling of its name, which this teardown does not delete:\n${listing}\n${remedy}\nDestroy each one first — deleting the state bucket now would remove those markers while the asset storage they name survives, with no record of its names.`, "STATE_BUCKET_HOLDS_SIBLING_MARKERS");
1791
+ const listing = markerSiblings.sameRegionKeys.map((k, i) => ` ${i + 1}. ${k}`).join("\n");
1792
+ const teardownCommands = canonicalStillPresent ? "" : markerSiblings.sameRegionKeys.map((k, i) => `\n${i + 1}. Tear it down with: ${pasteableCommand("cdkd bootstrap", [{ literal: "--destroy" }, {
1793
+ flag: "--region",
1794
+ value: markerRegionOfKey(k),
1795
+ hole: "region"
1796
+ }]).command}`).join("");
1797
+ const remedy = canonicalStillPresent ? `Re-run the destroy for this region WITHOUT --include-state-bucket ONCE: it tears down '${resolvedMarkerKey}' and then prints the exact --region spelling for each marker still standing. Follow those, then re-run with --include-state-bucket. (No per-marker spelling is given here because '${resolvedMarkerKey}' still exists and would be resolved first — and simply repeating this same command would not clear the rest, since once it is gone this region's canonical key no longer resolves anything.)` : `Run each command below, then re-run with --include-state-bucket.`;
1798
+ throw new CdkdError(`Refusing to delete state bucket '${bucketName}': region '${region}' has ${markerSiblings.sameRegionKeys.length} further bootstrap marker(s) under a different spelling of its name, which this teardown does not delete:\n${listing}\n${remedy}\nDestroy each one first — deleting the state bucket now would remove those markers while the asset storage they name survives, with no record of its names.` + teardownCommands, "STATE_BUCKET_HOLDS_SIBLING_MARKERS");
1786
1799
  }
1787
1800
  }
1788
1801
  const planLines = [];
@@ -1808,7 +1821,11 @@ async function bootstrapDestroyCommand(options) {
1808
1821
  await stateBackend.purgeNoncurrentVersions([resolvedMarkerKey], { objectDescription: "the bootstrap marker, which names this region's asset bucket and container-asset ECR repository" });
1809
1822
  }
1810
1823
  logger.info(`✓ Deleted bootstrap marker (${resolvedMarkerKey})`);
1811
- for (const siblingKey of markerSiblings.sameRegionKeys) logger.warn(`A further bootstrap marker for this region remains at '${siblingKey}' (this region was bootstrapped under more than one spelling of its name). It names asset storage that was NOT destroyed by this run — re-run 'cdkd bootstrap --destroy --region ${markerRegionOfKey(siblingKey)}' to tear that one down too.`);
1824
+ for (const siblingKey of markerSiblings.sameRegionKeys) logger.warn(`A further bootstrap marker for this region remains at '${siblingKey}' (this region was bootstrapped under more than one spelling of its name). It names asset storage that was NOT destroyed by this run.\nTear it down with: ${pasteableCommand("cdkd bootstrap", [{ literal: "--destroy" }, {
1825
+ flag: "--region",
1826
+ value: markerRegionOfKey(siblingKey),
1827
+ hole: "region"
1828
+ }]).command}`);
1812
1829
  if (!markerListingSucceeded) logger.warn(`The bootstrap-marker listing could not be made, so a marker under another spelling of this region may still be live. Check 's3://${bucketName}/${BOOTSTRAP_MARKER_PREFIX}'.`);
1813
1830
  logger.info(`\ncdkd asset storage is now OFF for region ${region}: future deploys in this region fall back to legacy mode (CDK bootstrap destinations) unless the region is bootstrapped again.`);
1814
1831
  }
@@ -64681,8 +64698,25 @@ async function runDestroyForStack(stackName, state, ctx) {
64681
64698
  const stateTargetFor = (logicalId, resourceType) => resourceType === NESTED_STACK_TYPE ? `${stackName}~${logicalId}` : stackName;
64682
64699
  const skippedStateTargets = /* @__PURE__ */ new Set();
64683
64700
  const failedStateTargets = /* @__PURE__ */ new Set();
64684
- /** `'cmd A' / 'cmd B'` — the quoted, slash-joined hint both summary arms print. */
64685
- const hintFor = (command, targets) => targets.map((t) => `'${command} ${t}'`).join(" / ");
64701
+ /**
64702
+ * One labelled line per target — the hint both summary arms print.
64703
+ *
64704
+ * The PROSE quotes are gone, every target goes through the shared gate, and
64705
+ * each command gets its OWN line (go-to-k/cdkd#3436). The old
64706
+ * `'${command} ${t}'` wrapper is the shape whose paste ran an interpolated
64707
+ * value, and this builder was the issue's example of a command the repo-wide
64708
+ * grep cannot see, since neither `'cdkd ` nor the value is on the same line
64709
+ * as the other. The ` / ` join that first replaced it was its own defect:
64710
+ * pasted, it handed the second command to the first as arguments.
64711
+ */
64712
+ const hintFor = (command, targets, label) => [...new Set(targets.map((t) => `\n${label}: ${pasteableCommand(command, [{
64713
+ value: t,
64714
+ hole: "stack"
64715
+ }, {
64716
+ flag: "--stack-region",
64717
+ value: regionForState,
64718
+ hole: "region"
64719
+ }]).command}`))].join("");
64686
64720
  const buildDestroySnapshot = () => {
64687
64721
  const { imports: _imports, outputReads: _outputReads, ...rest } = state;
64688
64722
  return {
@@ -64970,21 +65004,26 @@ async function runDestroyForStack(stackName, state, ctx) {
64970
65004
  const skippedSuffix = result.skippedCount > 0 ? `, ${yellow(result.skippedCount)} skipped` : "";
64971
65005
  const guardSuffix = result.guardIndeterminateCount > 0 ? `, ${yellow(result.guardIndeterminateCount)} unverified` : "";
64972
65006
  if (result.guardIndeterminateCount > 0) {
64973
- const durablePointer = ctx.eventRecorder === void 0 ? "This summary is the only record: this run wrote no deployment events, either because it is a 'cdkd state destroy' (go-to-k/cdkd#2423) or because it is a nested-stack child, neither of which threads an event recorder." : `Run 'cdkd events ${stackName}' for the RESOURCE_GUARD_INDETERMINATE entries, which name the check and the reason and survive the run.`;
65007
+ const durablePointer = ctx.eventRecorder === void 0 ? "This summary is the only record: this run wrote no deployment events, either because it is a 'cdkd state destroy' (go-to-k/cdkd#2423) or because it is a nested-stack child, neither of which threads an event recorder." : `The RESOURCE_GUARD_INDETERMINATE entries name the check and the reason and survive the run.\nRead them with: ${pasteableCommand("cdkd events", [{
65008
+ value: stackName,
65009
+ hole: "stack"
65010
+ }]).command}`;
64974
65011
  logger.warn(`\n${yellow("⚠")} ${result.guardIndeterminateCount} pre-flight safety check(s) could NOT be completed during this destroy and cdkd proceeded anyway: ${[...guardIndeterminateTargets].join(", ")}. A check can be suppressed by DENYING the permission it needs, so treat this as unconfirmed rather than benign. ${durablePointer}`);
64975
65012
  }
64976
65013
  if (!preserveState) logger.info(`\n${green("✓")} ${bold(`Stack ${stackName} destroyed`)} (${green(result.deletedCount)} deleted${retainedSuffix}${guardSuffix}, ${result.errorCount} errors)`);
64977
65014
  else if (result.interrupted && result.errorCount === 0) logger.warn(`\n${yellow("⚠")} ${bold(`Stack ${stackName} destroy interrupted`)} (${green(result.deletedCount)} deleted${retainedSuffix}${skippedSuffix}${guardSuffix}, ${result.errorCount} errors). State preserved — re-run 'cdkd destroy' / 'cdkd state destroy' to finish.`);
64978
65015
  else if (result.errorCount === 0) {
64979
65016
  const targets = [...skippedStateTargets];
64980
- const showHint = hintFor("cdkd state show", targets);
64981
- const orphanHint = hintFor("cdkd state orphan", targets);
64982
- logger.warn(`\n${yellow("⚠")} ${bold(`Stack ${stackName} partially destroyed`)} (${green(result.deletedCount)} deleted${retainedSuffix}${skippedSuffix}${guardSuffix}, ${result.errorCount} errors). cdkd could not address the skipped resource(s), so they may still exist in AWS. Fix the physicalId in state.json (${showHint}) and re-run, or delete them by hand and drop the records with ${orphanHint}.`);
65017
+ const showHint = hintFor("cdkd state show", targets, "Inspect it with");
65018
+ const orphanHint = hintFor("cdkd state orphan", targets, "Drop the record with");
65019
+ logger.warn(`\n${yellow("⚠")} ${bold(`Stack ${stackName} partially destroyed`)} (${green(result.deletedCount)} deleted${retainedSuffix}${skippedSuffix}${guardSuffix}, ${result.errorCount} errors). cdkd could not address the skipped resource(s), so they may still exist in AWS. Fix the physicalId in state.json and re-run, or delete them by hand and drop the records.` + showHint + orphanHint);
64983
65020
  } else {
64984
- const orphanHint = hintFor("cdkd state orphan", failedStateTargets.size > 0 ? [...failedStateTargets] : [stackName]);
65021
+ const orphanHint = hintFor("cdkd state orphan", failedStateTargets.size > 0 ? [...failedStateTargets] : [stackName], "Drop the record with");
64985
65022
  const skippedTargets = [...skippedStateTargets];
64986
- const skippedClause = skippedTargets.length > 0 ? ` Separately, ${result.skippedCount} resource(s) were SKIPPED — cdkd could not address them, so no delete was issued and they may still exist in AWS. Fix the physicalId in state.json (${hintFor("cdkd state show", skippedTargets)}) and re-run, or delete them by hand and drop the records with ${hintFor("cdkd state orphan", skippedTargets)}.` : "";
64987
- logger.warn(`\n${yellow("⚠")} ${bold(`Stack ${stackName} partially destroyed`)} (${green(result.deletedCount)} deleted${retainedSuffix}${skippedSuffix}${guardSuffix}, ${red(result.errorCount)} errors). State preserved — re-run 'cdkd destroy' / 'cdkd state destroy' to clean up. If the same resource keeps failing, ${orphanHint} is the last resort: it removes the state record without deleting AWS resources.` + skippedClause);
65023
+ const skippedClause = skippedTargets.length > 0 ? ` Separately, ${result.skippedCount} resource(s) were SKIPPED — cdkd could not address them, so no delete was issued and they may still exist in AWS. Fix the physicalId in state.json and re-run, or delete them by hand and drop their records.` : "";
65024
+ const skippedCommands = hintFor("cdkd state show", skippedTargets, "Inspect it with") + hintFor("cdkd state orphan", skippedTargets, "Drop the record with");
65025
+ const dedupedCommands = (lines) => [...new Set(lines.split("\n").filter((l) => l !== ""))].map((l) => `\n${l}`).join("");
65026
+ logger.warn(`\n${yellow("⚠")} ${bold(`Stack ${stackName} partially destroyed`)} (${green(result.deletedCount)} deleted${retainedSuffix}${skippedSuffix}${guardSuffix}, ${red(result.errorCount)} errors). State preserved — re-run 'cdkd destroy' / 'cdkd state destroy' to clean up. If the same resource keeps failing, dropping the state record is the last resort: it removes the record without deleting AWS resources.` + skippedClause + dedupedCommands(orphanHint + skippedCommands));
64988
65027
  }
64989
65028
  } finally {
64990
65029
  try {
@@ -65104,11 +65143,11 @@ function getCurrentNestedStackContext() {
65104
65143
  * @param alsoSkippedCount resources the child SKIPPED (no AWS call issued)
65105
65144
  * @param alsoInterrupted whether the child's destroy was also interrupted
65106
65145
  */
65107
- function nestedStackChildFailureMessage(childStackName, errorCount, alsoSkippedCount, alsoInterrupted) {
65146
+ function nestedStackChildFailureMessage(childStackName, errorCount, alsoSkippedCount, alsoInterrupted, inspectCommand) {
65108
65147
  const extra = [];
65109
65148
  if (alsoSkippedCount > 0) extra.push(`${alsoSkippedCount} resource(s) were also skipped`);
65110
65149
  if (alsoInterrupted) extra.push("the child destroy was also interrupted");
65111
- return `Nested stack ${childStackName} failed to destroy: ${errorCount} resource(s) failed to delete` + (extra.length > 0 ? ` (${extra.join("; ")})` : "") + `. The child's state is PRESERVED and still lists them — inspect it with 'cdkd state show ${childStackName}', resolve the failure, and re-run the destroy. The parent's record of this nested stack is kept so the child stays reachable.`;
65150
+ return `Nested stack ${childStackName} failed to destroy: ${errorCount} resource(s) failed to delete` + (extra.length > 0 ? ` (${extra.join("; ")})` : "") + `. The child's state is PRESERVED and still lists them — inspect it, resolve the failure, and re-run the destroy. The parent's record of this nested stack is kept so the child stays reachable.\nInspect it with: ${inspectCommand}`;
65112
65151
  }
65113
65152
 
65114
65153
  //#endregion
@@ -65285,7 +65324,10 @@ var NestedStackProvider = class {
65285
65324
  ...ctx.destroyOptions?.resourceTimeoutByType && { resourceTimeoutByType: ctx.destroyOptions.resourceTimeoutByType }
65286
65325
  }));
65287
65326
  if (childResult.errorCount > 0) {
65288
- const failure = new Error(nestedStackChildFailureMessage(childStackName, childResult.errorCount, childResult.skippedCount, childResult.interrupted));
65327
+ const failure = new Error(nestedStackChildFailureMessage(childStackName, childResult.errorCount, childResult.skippedCount, childResult.interrupted, pasteableCommand("cdkd state show", [{
65328
+ value: childStackName,
65329
+ hole: "stack"
65330
+ }]).command));
65289
65331
  throw childResult.interrupted ? markNonRetryable(failure) : failure;
65290
65332
  }
65291
65333
  if (childResult.skippedCount > 0 || childResult.interrupted) {
@@ -68325,6 +68367,36 @@ function conditionsDependOnTokenParameters(template, tokenParameterNames) {
68325
68367
  }
68326
68368
  return false;
68327
68369
  }
68370
+ /**
68371
+ * The reason a repaired `properties` map puts on the node's `blocking`
68372
+ * (go-to-k/cdkd#3335).
68373
+ *
68374
+ * `cdkd diff` REPAIRS this container and previews the record; `cdkd deploy`
68375
+ * REFUSES it inside `DiffCalculator.calculateDiff`, which both deploy paths
68376
+ * reach. So the preview is honest about the rows and wrong about what happens
68377
+ * next, and this is the sentence that says so.
68378
+ *
68379
+ * The ids are NOT re-rendered here: they have already been through
68380
+ * `malformedResourcePropertiesWarning`'s sanitizer in the warning printed
68381
+ * beside this, and the renderer strips control characters from every blocking
68382
+ * reason on the way out. The count is what this line adds — and the line does
68383
+ * not send the reader to that warning for the names, because the warning caps
68384
+ * at five before `and N more`, and under `--json` this reason ships in the
68385
+ * payload, where "above" has no referent.
68386
+ */
68387
+ function deployRefusesPropertiesReason(logicalIds) {
68388
+ return `${logicalIds.length} resource record(s) hold a 'properties' map that cannot be read. This preview repaired them to empty; 'cdkd deploy' refuses the record instead, so the deploy this previews will not start.`;
68389
+ }
68390
+ /**
68391
+ * The `outputs` twin of {@link deployRefusesPropertiesReason}, a constant
68392
+ * because the bag is refused as a whole and there is nothing to count.
68393
+ *
68394
+ * `refuseMalformedOutputs` in `DeployEngine` is what refuses it. This arm is
68395
+ * the one the issue could not drive end to end — a record whose template
68396
+ * declares no Outputs produces no delta at all, so before this the node had
68397
+ * nothing to report and `--fail` exited 0.
68398
+ */
68399
+ const DEPLOY_REFUSES_OUTPUTS_REASON = "The 'outputs' bag cannot be read. This preview repaired it to empty; 'cdkd deploy' refuses the record instead, so the deploy this previews will not start.";
68328
68400
  /** How many unreadable row names the human preview lists before summarizing. */
68329
68401
  const UNREADABLE_PREVIEW_NAMES = 10;
68330
68402
  /** Empty template used to diff a removed nested child's state → all DELETE. */
@@ -68392,6 +68464,7 @@ async function loadStateOrEmpty(stackName, region, stateBackend) {
68392
68464
  const result = await stateBackend.getState(stackName, region);
68393
68465
  if (result) {
68394
68466
  const unreadable = [];
68467
+ const deployRefusals = [];
68395
68468
  if (repairMalformedResourcesForReadOnly(result.state)) {
68396
68469
  logger.warn(malformedResourcesWarning(stackName, region));
68397
68470
  unreadable.push(UNREADABLE_RESOURCES_MAP_ROW);
@@ -68402,8 +68475,14 @@ async function loadStateOrEmpty(stackName, region, stateBackend) {
68402
68475
  unreadable.push(...dropped);
68403
68476
  }
68404
68477
  const unreadableProps = repairMalformedResourcePropertiesForReadOnly(result.state);
68405
- if (unreadableProps.length > 0) logger.warn(malformedResourcePropertiesWarning(stackName, region, unreadableProps));
68406
- if (repairMalformedOutputsForReadOnly(result.state)) logger.warn(malformedOutputsWarning(stackName, region));
68478
+ if (unreadableProps.length > 0) {
68479
+ logger.warn(malformedResourcePropertiesWarning(stackName, region, unreadableProps));
68480
+ deployRefusals.push(deployRefusesPropertiesReason(unreadableProps));
68481
+ }
68482
+ if (repairMalformedOutputsForReadOnly(result.state)) {
68483
+ logger.warn(malformedOutputsWarning(stackName, region));
68484
+ deployRefusals.push(DEPLOY_REFUSES_OUTPUTS_REASON);
68485
+ }
68407
68486
  if (repairMalformedOrphansForReadOnly(result.state)) {
68408
68487
  logger.warn(malformedOrphansWarning(stackName, region));
68409
68488
  unreadable.push(UNREADABLE_ORPHANS_CONTAINER_ROW);
@@ -68411,7 +68490,8 @@ async function loadStateOrEmpty(stackName, region, stateBackend) {
68411
68490
  if (isReadableBag(result.state.outputs) && !hasReadableExportSet(result.state)) logger.warn(malformedExportNamesWarning(stackName, region));
68412
68491
  return {
68413
68492
  state: result.state,
68414
- unreadable
68493
+ unreadable,
68494
+ deployRefusals
68415
68495
  };
68416
68496
  }
68417
68497
  return {
@@ -68423,7 +68503,8 @@ async function loadStateOrEmpty(stackName, region, stateBackend) {
68423
68503
  version: 10,
68424
68504
  lastModified: Date.now()
68425
68505
  },
68426
- unreadable: []
68506
+ unreadable: [],
68507
+ deployRefusals: []
68427
68508
  };
68428
68509
  }
68429
68510
  /**
@@ -68572,6 +68653,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
68572
68653
  let adoptedOrphans = [];
68573
68654
  let adoptedRecords = {};
68574
68655
  let blocking = [];
68656
+ const deployRefusals = [];
68575
68657
  let stateForDiff = currentState;
68576
68658
  const unreadableOrphans = [];
68577
68659
  if (currentState.orphans?.length && options.previewOrphanAdoption) {
@@ -68598,7 +68680,10 @@ async function computeStackDiff(currentState, template, region, stackName, state
68598
68680
  }
68599
68681
  };
68600
68682
  const tornAdopted = repairMalformedResourcePropertiesForReadOnly(stateForDiff);
68601
- if (tornAdopted.length > 0) logger.warn(malformedResourcePropertiesWarning(stackName, region, tornAdopted));
68683
+ if (tornAdopted.length > 0) {
68684
+ logger.warn(malformedResourcePropertiesWarning(stackName, region, tornAdopted));
68685
+ deployRefusals.push(deployRefusesPropertiesReason(tornAdopted));
68686
+ }
68602
68687
  }
68603
68688
  }
68604
68689
  const changes = await diffCalculator.calculateDiff(stateForDiff, effectiveTemplate, resolveFn, canonicalizeProperties);
@@ -68641,7 +68726,8 @@ async function computeStackDiff(currentState, template, region, stackName, state
68641
68726
  adoptedOrphans,
68642
68727
  adoptedRecords,
68643
68728
  blocking,
68644
- unreadableOrphans
68729
+ unreadableOrphans,
68730
+ deployRefusals
68645
68731
  };
68646
68732
  }
68647
68733
  /**
@@ -68719,10 +68805,10 @@ async function resolveChildStackParameters(parentStackRow, parentTemplate, paren
68719
68805
  * fail at deploy time.
68720
68806
  */
68721
68807
  async function buildDiffTree(args) {
68722
- const { stackName, displayName, region, template, nestedTemplates, recursive, stateBackend, diffCalculator, parentHasSecretReference, parameters, canonicalizeProperties, assetRedirect, cfnFallback, previewOrphanAdoption, ancestorTemplatePaths } = args;
68723
- const { state, unreadable } = await loadStateOrEmpty(stackName, region, stateBackend);
68808
+ const { stackName, displayName, region, template, nestedTemplates, recursive, stateBackend, diffCalculator, parentHasSecretReference, parameters, canonicalizeProperties, assetRedirect, cfnFallback, previewOrphanAdoption, ancestorTemplatePaths, isNestedChild } = args;
68809
+ const { state, unreadable, deployRefusals } = await loadStateOrEmpty(stackName, region, stateBackend);
68724
68810
  const secretBearingAbove = parentHasSecretReference === true || templateHasSecretDynamicReference(template);
68725
- const { changes, outputChanges, adoptedOrphans, adoptedRecords, blocking, unreadableOrphans } = await computeStackDiff(state, template, region, stackName, stateBackend, diffCalculator, {
68811
+ const { changes, outputChanges, adoptedOrphans, adoptedRecords, blocking, unreadableOrphans, deployRefusals: adoptedDeployRefusals } = await computeStackDiff(state, template, region, stackName, stateBackend, diffCalculator, {
68726
68812
  ...parameters && { parameters },
68727
68813
  ...canonicalizeProperties && { canonicalizeProperties },
68728
68814
  ...cfnFallback !== void 0 && { cfnFallback },
@@ -68744,7 +68830,11 @@ async function buildDiffTree(args) {
68744
68830
  ccApiRoutes: collectCcApiRoutes(template, stateAfterAdoption),
68745
68831
  outputChanges,
68746
68832
  adoptedOrphans,
68747
- blocking,
68833
+ blocking: isNestedChild ? blocking : [
68834
+ ...deployRefusals,
68835
+ ...adoptedDeployRefusals,
68836
+ ...blocking
68837
+ ],
68748
68838
  unreadable: [...unreadable, ...unreadableOrphans],
68749
68839
  children: []
68750
68840
  };
@@ -68778,6 +68868,7 @@ async function buildDiffTree(args) {
68778
68868
  ...cfnFallback !== void 0 && { cfnFallback },
68779
68869
  ...previewOrphanAdoption && { previewOrphanAdoption },
68780
68870
  ancestorTemplatePaths: childAncestorTemplatePaths,
68871
+ isNestedChild: true,
68781
68872
  parentHasSecretReference: secretBearingAbove
68782
68873
  }));
68783
68874
  }
@@ -69214,9 +69305,18 @@ var DiffDetectedError = class DiffDetectedError extends CdkdError {
69214
69305
  }
69215
69306
  };
69216
69307
  /**
69217
- * Signals that the preview completed and `cdkd deploy` would REFUSE to start
69218
- * (issue go-to-k/cdkd#2943) — today, a rollback-orphan record whose physical
69219
- * id another cdkd stack already manages.
69308
+ * Signals that the preview completed and `cdkd deploy` would REFUSE to start.
69309
+ * Two conditions reach it, and the message must fit BOTH:
69310
+ *
69311
+ * - a rollback-orphan record whose physical id another cdkd stack already
69312
+ * manages (issue go-to-k/cdkd#2943), where the remedy is resolving the
69313
+ * ownership conflict between two stacks;
69314
+ * - a container this preview REPAIRED and the deploy refuses — a resource's
69315
+ * unreadable `properties` map or an unreadable `outputs` bag (issue
69316
+ * go-to-k/cdkd#3335), where there is no second stack at all and the remedy
69317
+ * is repairing the one record.
69318
+ *
69319
+ * So the message names no remedy at all and closes on the count.
69220
69320
  *
69221
69321
  * Exit **3**, and neither 1 nor 2, for reasons that are about what a caller
69222
69322
  * can conclude:
@@ -69226,18 +69326,19 @@ var DiffDetectedError = class DiffDetectedError extends CdkdError {
69226
69326
  * code for "there is work to do" and "the work cannot begin".
69227
69327
  * - **2** is this CLI's partial-failure family, documented as "work
69228
69328
  * completed, re-running typically resolves it" (`docs/cli-reference.md`).
69229
- * A refusal is the opposite: re-running changes nothing until a human
69230
- * resolves the ownership conflict.
69329
+ * A refusal is the opposite: re-running changes nothing until a human acts
69330
+ * — repairing the record, or resolving the ownership conflict, depending on
69331
+ * which condition fired.
69231
69332
  *
69232
69333
  * It is NOT silent: unlike `--fail`, this is not a flag the user opted into,
69233
69334
  * so the reason has to be visible even when the diff report scrolled away.
69234
- * The `Blocking` section already printed the per-record detail; this adds the
69235
- * one line that says the run cannot proceed.
69335
+ * The `Blocking` section already printed the per-condition detail; this adds
69336
+ * the one line that says the run cannot proceed.
69236
69337
  */
69237
69338
  var DeployRefusalPreviewError = class DeployRefusalPreviewError extends CdkdError {
69238
69339
  exitCode = 3;
69239
69340
  constructor(count) {
69240
- super(`cdkd deploy would refuse to start: ${count} blocking condition(s) reported above. Resolve them, or run \`cdkd state\` to inspect the conflicting stack.`, "DEPLOY_REFUSAL_PREVIEW");
69341
+ super(`cdkd deploy would refuse to start: ${count} blocking condition(s) reported above.`, "DEPLOY_REFUSAL_PREVIEW");
69241
69342
  this.name = "DeployRefusalPreviewError";
69242
69343
  Object.setPrototypeOf(this, DeployRefusalPreviewError.prototype);
69243
69344
  }
@@ -69362,7 +69463,8 @@ async function diffCommand(stacks, options) {
69362
69463
  canonicalizeProperties,
69363
69464
  ...assetRedirect && { assetRedirect },
69364
69465
  ...options.cfnFallback === false && { cfnFallback: false },
69365
- previewOrphanAdoption
69466
+ previewOrphanAdoption,
69467
+ isNestedChild: false
69366
69468
  }));
69367
69469
  }
69368
69470
  if (options.json) process.stdout.write(`${JSON.stringify(trees.map(diffTreeToJson), null, 2)}\n`);
@@ -70735,9 +70837,15 @@ function scrubRefusalWording(verdict, loggedExportKey, loggedProducerStack, logg
70735
70837
  const through = chain.length > 1 ? ` (through ${chain.slice(0, -1).map((s) => `'${s}'`).join(", ")})` : "";
70736
70838
  const templateClaim = verdict.kind === "declared" ? `declares '${loggedExportKey}' from a {{resolve:...}} expression` : verdict.kind === "chained" ? chainRoot !== void 0 ? `publishes '${loggedExportKey}' by RE-EXPORTING a value that '${chainRoot}' declares from a {{resolve:...}} expression${through}` : `publishes '${loggedExportKey}' by RE-EXPORTING a value another stack of this app declares from a {{resolve:...}} expression` : chainRoot !== void 0 ? `publishes at least one output that RE-EXPORTS a value '${chainRoot}' declares from a {{resolve:...}} expression${through} (this run could not match '${loggedExportKey}' to a declared output, so it cannot say which)` : `publishes at least one output from a {{resolve:...}} expression (this run could not match '${loggedExportKey}' to a declared output, so it cannot say which)`;
70737
70839
  const scrubOrder = dedupePreservingOrder([...chain].reverse().concat(loggedProducerStack), "last");
70840
+ const remedyCommands = scrubOrder.map((name) => `Scrub with: ${pasteableCommand("cdkd scrub", [{
70841
+ value: name,
70842
+ hole: "stack",
70843
+ opts: { patternMatched: true }
70844
+ }]).command}`);
70738
70845
  return {
70739
70846
  templateClaim,
70740
- remedy: scrubOrder.length > 1 ? `Scrub the producers first, from the head of the chain (${scrubOrder.map((s) => `'cdkd scrub ${s}'`).join(", then ")})` : `Scrub the producer first ('cdkd scrub ${loggedProducerStack}')`
70847
+ remedy: scrubOrder.length > 1 ? `Scrub the producers first, from the head of the chain, in the order below` : `Scrub the producer first`,
70848
+ remedyCommands
70741
70849
  };
70742
70850
  }
70743
70851
  /**
@@ -70799,8 +70907,12 @@ function dedupePreservingOrder(values, keep) {
70799
70907
  function plaintextProducerCrossStackReadError(origin, stackName, intrinsic, path, producerStack, exportKey, verdict, secrets) {
70800
70908
  const loggedExportKey = maskSecretsInText(exportKey, secrets);
70801
70909
  const loggedProducerStack = maskSecretsInText(producerStack, secrets);
70802
- const { templateClaim, remedy } = scrubRefusalWording(verdict, loggedExportKey, loggedProducerStack, verdict.via.map((s) => maskSecretsInText(s, secrets)));
70803
- return new ScrubRefusalError(`Scrub of ${stackName} resolved the ${intrinsic} in ${origin}${path ? ` at ${path}` : ""} to a PLAINTEXT value: the producer stack '${loggedProducerStack}' ${templateClaim}, but its own state still stores the resolved plaintext rather than that expression. scrub has no expression to write in this stack's place, so it cannot redact the imported secret and must not report this stack clean. ${remedy}, then re-run 'cdkd scrub ${stackName}' — the read will then return the expression and this stack is scrubbed normally.`, "SCRUB_CROSS_STACK_PRODUCER_PLAINTEXT");
70910
+ const { templateClaim, remedy, remedyCommands } = scrubRefusalWording(verdict, loggedExportKey, loggedProducerStack, verdict.via.map((s) => maskSecretsInText(s, secrets)));
70911
+ return new ScrubRefusalError(`Scrub of ${stackName} resolved the ${intrinsic} in ${origin}${path ? ` at ${path}` : ""} to a PLAINTEXT value: the producer stack '${loggedProducerStack}' ${templateClaim}, but its own state still stores the resolved plaintext rather than that expression. scrub has no expression to write in this stack's place, so it cannot redact the imported secret and must not report this stack clean. ${remedy}, then re-run scrub for this stack — the read will then return the expression and this stack is scrubbed normally.\n${remedyCommands.join("\n")}\nThen re-run: ${pasteableCommand("cdkd scrub", [{
70912
+ value: stackName,
70913
+ hole: "stack",
70914
+ opts: { patternMatched: true }
70915
+ }]).command}`, "SCRUB_CROSS_STACK_PRODUCER_PLAINTEXT");
70804
70916
  }
70805
70917
  /** The `no` verdict, shared so the walk allocates nothing for the common case. */
70806
70918
  const NO_SECRET_EXPRESSION = {
@@ -72421,10 +72533,9 @@ function createScrubCommand() {
72421
72533
  * (phantom drift against an ISO-string baseline, and `--accept` persisted the
72422
72534
  * `{}`). The identity return is what makes the second visible to the
72423
72535
  * comparator; the null-prototype target is what keeps the first an own key.
72424
- * One layer LATER the same flattening survives in `secret-redaction.ts`'s
72425
- * value walk, which `--accept` runs over a resource that RECORDS a secret
72426
- * (issue #2427) -- so the ISO string reaches the baseline only where that
72427
- * walk does not run.
72536
+ * One layer LATER `secret-redaction.ts`'s value walk, which `--accept` runs
72537
+ * over a resource that RECORDS a secret, keeps a `Date` by identity too (issue
72538
+ * #2427), so the ISO string reaches the baseline on both kinds of resource.
72428
72539
  */
72429
72540
  function canonicalizeTagListsDeep(v) {
72430
72541
  if (Array.isArray(v)) {
@@ -76854,7 +76965,13 @@ async function destroyCommand(stackArgs, options) {
76854
76965
  } else if (synthRegion && refs.some((r) => r.region === synthRegion)) stackTargetRegion = synthRegion;
76855
76966
  else {
76856
76967
  const regions = refs.map((r) => r.region ?? "(legacy)").join(", ");
76857
- throw new Error(`Stack '${stackName}' has state in multiple regions: ${regions}. Use 'cdkd state orphan ${stackName} --stack-region <region>' to remove cdkd's record for one region, or run destroy from a CDK app whose env.region matches one of them.`);
76968
+ throw new Error(`Stack '${stackName}' has state in multiple regions: ${regions}. Remove cdkd's record for ONE region with the command below (fill in the region), or run destroy from a CDK app whose env.region matches one of them.\nRemove one record with: ${pasteableCommand("cdkd state orphan", [{
76969
+ value: stackName,
76970
+ hole: "stack"
76971
+ }, {
76972
+ flag: "--stack-region",
76973
+ hole: "region"
76974
+ }]).command}`);
76858
76975
  }
76859
76976
  const stateResult = await stateBackend.getState(stackName, stackTargetRegion);
76860
76977
  if (!stateResult) {
@@ -78744,7 +78861,10 @@ async function exportCommand(stackArg, options) {
78744
78861
  const { state, etag, migrationPending } = stateData;
78745
78862
  const exportJournal = await stateBackend.loadRollbackJournal(resolvedStackName, targetRegion);
78746
78863
  if (exportJournal && exportJournal.segments.length > 0) {
78747
- logger.warn(`Stack '${resolvedStackName}' has a rollback journal — a previous deploy failed or was interrupted and has not been reverted. Exporting this half-deployed state to CloudFormation is likely unintended; run 'cdkd rollback ${resolvedStackName}' to revert (or 'cdkd deploy' to fix forward) first.`);
78864
+ logger.warn(`Stack '${resolvedStackName}' has a rollback journal — a previous deploy failed or was interrupted and has not been reverted. Exporting this half-deployed state to CloudFormation is likely unintended; revert it first (or 'cdkd deploy' to fix forward).\nRevert it with: ${pasteableCommand("cdkd rollback", [{
78865
+ value: resolvedStackName,
78866
+ hole: "stack"
78867
+ }]).command}`);
78748
78868
  if (!options.yes && !options.dryRun) {
78749
78869
  if (!await confirmPrompt$3("Export anyway?")) {
78750
78870
  logger.info("Export cancelled");
@@ -79094,7 +79214,7 @@ function safeDetail(value) {
79094
79214
  */
79095
79215
  function orphanCommandFor(stackName, region) {
79096
79216
  const shownStack = safeSegment(stackName);
79097
- if (!(typeof stackName === "string" && shownStack === stackName && typeof region === "string" && safeSegment(region) === region)) return "cdkd state orphan <stack> --stack-region <region> — spelled out because this record's name or region does NOT render exactly, so another record may render identically; list them as stored with 'cdkd state list --long' and act on the one whose key matches";
79217
+ if (!(typeof stackName === "string" && shownStack === stackName && !stackName.startsWith("-") && typeof region === "string" && safeSegment(region) === region && !region.startsWith("-"))) return "cdkd state orphan <stack> --stack-region <region> — spelled out because this record's name or region does NOT render exactly, so another record may render identically; list them as stored with 'cdkd state list --long' and act on the one whose key matches";
79098
79218
  return `cdkd state orphan ${shellQuote(shownStack)} --stack-region ${shellQuote(safeSegment(region))}`;
79099
79219
  }
79100
79220
  /**
@@ -80975,7 +81095,10 @@ async function runPerStackImportLoop(args) {
80975
81095
  } catch (err) {
80976
81096
  const importedSummary = importedStacks.length > 0 ? importedStacks.map((s) => `${safeSegment(s.cdkdStackName)} → ${safeSegment(s.cfnStackName)}`).join(", ") : "(none)";
80977
81097
  const remainingSummary = perStackPlans.slice(i).map((p) => safeSegment(p.cdkdName)).join(", ");
80978
- throw new Error(`Phase 1A IMPORT changeset failed for cdkd stack '${safeSegment(plan.cdkdName)}' (CFn name '${plan.cfnName}'). Stacks imported successfully so far: ${importedSummary}. Stacks not yet imported (cdkd state preserved): ${remainingSummary}. After resolving the underlying cause, re-run 'cdkd export ${rootStackName}' — already-imported children will be adopted as nested references on retry. Cause: ${err instanceof Error ? err.message : String(err)}`, { cause: err instanceof Error ? err : void 0 });
81098
+ throw new Error(`Phase 1A IMPORT changeset failed for cdkd stack '${safeSegment(plan.cdkdName)}' (CFn name '${plan.cfnName}'). Stacks imported successfully so far: ${importedSummary}. Stacks not yet imported (cdkd state preserved): ${remainingSummary}. After resolving the underlying cause, re-run the export — already-imported children will be adopted as nested references on retry. Cause: ${err instanceof Error ? err.message : String(err)}\nRe-run with: ${pasteableCommand("cdkd export", [{
81099
+ value: rootStackName,
81100
+ hole: "stack"
81101
+ }]).command}`, { cause: err instanceof Error ? err : void 0 });
80979
81102
  }
80980
81103
  const cfnArn = (await deps.cfnClient.send(new DescribeStacksCommand({ StackName: plan.cfnName }))).Stacks?.[0]?.StackId;
80981
81104
  if (!cfnArn) throw new Error(`runPerStackImportLoop: DescribeStacks returned no StackId for '${plan.cfnName}' immediately after Phase 1A IMPORT — AWS may be in an unexpected state.`);
@@ -81757,7 +81880,11 @@ async function stateResourcesCommand(stackName, options) {
81757
81880
  const setup = await setupStateBackend(options);
81758
81881
  try {
81759
81882
  const ref = resolveSingleRegion(stackName, await setup.stateBackend.listStacks(), options.stackRegion);
81760
- if (!ref.region) throw new Error(`Stack '${safe$1(stackName)}' has only a legacy state record without a region. Run 'cdkd deploy ${safe$1(stackName)}' (or any cdkd write) to migrate it to the region-scoped layout, then re-run this command.`);
81883
+ if (!ref.region) throw new Error(`Stack '${safe$1(stackName)}' has only a legacy state record without a region. A cdkd write migrates it to the region-scoped layout; re-run this command after it.\nMigrate with: ${pasteableCommand("cdkd deploy", [{
81884
+ value: stackName,
81885
+ hole: "stack",
81886
+ opts: { patternMatched: true }
81887
+ }]).command}`);
81761
81888
  const stateResult = await setup.stateBackend.getState(stackName, ref.region);
81762
81889
  if (!stateResult) throw new Error(`No state found for stack '${safe$1(stackName)}' (${safe$1(ref.region)}) in s3://${setup.bucket}/${setup.prefix}/. Run 'cdkd state list' to see available stacks.`);
81763
81890
  if (repairMalformedResourcesForReadOnly(stateResult.state)) logger.warn(malformedResourcesWarning(stackName, ref.region));
@@ -81964,7 +82091,11 @@ async function stateShowCommand(stackName, options) {
81964
82091
  const setup = await setupStateBackend(options);
81965
82092
  try {
81966
82093
  const ref = resolveSingleRegion(stackName, await setup.stateBackend.listStacks(), options.stackRegion);
81967
- if (!ref.region) throw new Error(`Stack '${safe$1(stackName)}' has only a legacy state record without a region. Run 'cdkd deploy ${safe$1(stackName)}' (or any cdkd write) to migrate it to the region-scoped layout, then re-run this command.`);
82094
+ if (!ref.region) throw new Error(`Stack '${safe$1(stackName)}' has only a legacy state record without a region. A cdkd write migrates it to the region-scoped layout; re-run this command after it.\nMigrate with: ${pasteableCommand("cdkd deploy", [{
82095
+ value: stackName,
82096
+ hole: "stack",
82097
+ opts: { patternMatched: true }
82098
+ }]).command}`);
81968
82099
  const [stateResult, lockInfo] = await Promise.all([setup.stateBackend.getState(stackName, ref.region), setup.lockManager.getLockInfo(stackName, ref.region)]);
81969
82100
  if (!stateResult) throw new Error(`No state found for stack '${safe$1(stackName)}' (${safe$1(ref.region)}) in s3://${setup.bucket}/${setup.prefix}/. Run 'cdkd state list' to see available stacks.`);
81970
82101
  if (options.showNested) {
@@ -82432,7 +82563,11 @@ async function stateOrphanCommand(stackArgs, options) {
82432
82563
  }
82433
82564
  if (!options.yes && !options.force) {
82434
82565
  const targetList = targets.map((t) => formatStackRefSafe(t)).join(", ");
82435
- process.stdout.write(`\nWARNING: This removes cdkd's state record for [${targetList}] only. AWS resources will NOT be deleted.\nUse 'cdkd destroy ${displaySafe(stackName, { asciiOnly: true }) || "<unrenderable>"}' if you want to delete the actual resources.\n\n`);
82566
+ process.stdout.write(`\nWARNING: This removes cdkd's state record for [${targetList}] only. AWS resources will NOT be deleted.\nDelete the actual resources instead with the command below.\nDestroy with: ${pasteableCommand("cdkd destroy", [{
82567
+ value: stackName,
82568
+ hole: "stack",
82569
+ opts: { patternMatched: true }
82570
+ }]).command}\n\n`);
82436
82571
  if (!await confirmStateOrphanRemoval(`Remove state for ${targetList} from s3://${setup.bucket}/${setup.prefix}/?`)) {
82437
82572
  logger.info(`Cancelled removal of state for stack: ${stackName}`);
82438
82573
  continue;
@@ -82964,6 +83099,68 @@ function createStateInfoCommand() {
82964
83099
  return cmd;
82965
83100
  }
82966
83101
  /**
83102
+ * The hole the legacy refusal's `cdkd deploy` prints for a name it cannot
83103
+ * name, and the key {@link withheldNameClause} reads the reason back by. ONE
83104
+ * spelling so the two cannot drift apart (m22 of the go-to-k/cdkd#3499 review).
83105
+ */
83106
+ const STACK_HOLE = "stack";
83107
+ /**
83108
+ * The sentence for a name `pasteableCommand` would not print, rendered from the
83109
+ * REASON it gave rather than from a predicate of this site's own — M11 of the
83110
+ * go-to-k/cdkd#3499 review. Keying it on a second predicate got both directions
83111
+ * wrong at once: `Old;Stack` renders exactly, so a rendering-based clause called
83112
+ * a command that names it "not exact", and `--all` also renders exactly, so the
83113
+ * same clause said nothing above a hole the operator was then invited to fill
83114
+ * with the name printed beside it.
83115
+ *
83116
+ * THREE of the five reasons are reachable from this call site, and the other
83117
+ * two are bounded out by where the name comes from — an S3 key segment:
83118
+ *
83119
+ * - `altered`, `option-shaped` and `pattern-shaped` are all reachable: a
83120
+ * planted key can spell a name any of those ways in a handful of bytes.
83121
+ * - `empty` is not. `listStacks` drops a key whose stack segment is empty
83122
+ * (`s3-state-backend.ts`'s `if (!stackName) continue`), so `target.stackName`
83123
+ * is non-empty by the time the refusal is built.
83124
+ * - `too-long` is not either, and the bound is not obvious: the cap is
83125
+ * `STACK_REF_MAX_CODE_POINTS` (1152), while S3 caps the WHOLE key at 1024
83126
+ * bytes, leaving at most 1008 for the name inside `cdkd/<name>/state.json`.
83127
+ * A multi-byte character only lowers the code-point count further, so a name
83128
+ * arriving through `listStacks` can never reach the cap.
83129
+ *
83130
+ * Both unreachable arms stay, and are covered, because the REASON is the
83131
+ * gate's and not this site's: `pasteableCommand` can return either to a caller
83132
+ * whose value comes from somewhere else. A missing arm is no longer a silent
83133
+ * fall-through — the `switch` below is exhaustive over `WithholdReason`, so
83134
+ * dropping one is a compile error (M13). What the cases buy on top of that is
83135
+ * the SENTENCE: the type checker knows an arm exists, not that it says the
83136
+ * right thing, and substituting one arm's text for another's is exactly the
83137
+ * disagreement M11 closed.
83138
+ */
83139
+ function withheldNameClause(built) {
83140
+ const reason = built.withheld.find((w) => w.hole === STACK_HOLE)?.reason;
83141
+ if (reason === void 0) return "";
83142
+ let why;
83143
+ switch (reason) {
83144
+ case "altered":
83145
+ why = `does NOT render exactly, so another record may render identically`;
83146
+ break;
83147
+ case "empty":
83148
+ why = `is empty`;
83149
+ break;
83150
+ case "too-long":
83151
+ why = `is too long to print`;
83152
+ break;
83153
+ case "option-shaped":
83154
+ why = "begins with a '-', so it is not safe to print as an argument to 'cdkd deploy' — a name like '--all' is parsed as the FLAG and targets every stack";
83155
+ break;
83156
+ case "pattern-shaped":
83157
+ why = `would be read as a PATTERN by 'cdkd deploy', which can match other stacks`;
83158
+ break;
83159
+ default: throw new Error(`withheldNameClause: unhandled WithholdReason ${String(reason)}`);
83160
+ }
83161
+ return ` This record's name ${why} — so it is not named in the command below; list the records as stored with 'cdkd state list --long' and act on the one whose key matches.`;
83162
+ }
83163
+ /**
82967
83164
  * `cdkd state refresh-observed <stack>` command implementation.
82968
83165
  *
82969
83166
  * Walks every resource in the given stack(s) and refreshes its
@@ -83053,9 +83250,13 @@ async function stateRefreshObservedCommand(stackArgs, options) {
83053
83250
  }
83054
83251
  }
83055
83252
  for (const target of targets) if (!target.region) {
83056
- const stack = shellQuote(safeStackName(target.stackName));
83057
- const example = safeStackName(target.stackName) === target.stackName && !/^-|[*/]/.test(target.stackName) ? ` For example: cdkd deploy ${stack}` : "";
83058
- throw new Error(`Stack ${stack} has only a legacy state record without a region. Migrate it to the region-scoped layout with any cdkd write, then re-run refresh-observed.` + example);
83253
+ const stack = displayIdent(target.stackName, { maxCodePoints: STACK_REF_MAX_CODE_POINTS });
83254
+ const migrate = pasteableCommand("cdkd deploy", [{
83255
+ value: target.stackName,
83256
+ hole: STACK_HOLE,
83257
+ opts: { patternMatched: true }
83258
+ }]);
83259
+ throw new Error(`Stack ${stack} has only a legacy state record without a region. Migrate it to the region-scoped layout with any cdkd write, then re-run refresh-observed.` + withheldNameClause(migrate) + `\nMigrate with: ${migrate.command}`);
83059
83260
  }
83060
83261
  let totalRefreshed = 0;
83061
83262
  let totalUnsupported = 0;
@@ -83644,7 +83845,10 @@ async function rollbackCommand(stackArg, options) {
83644
83845
  const fresh = await setup.stateBackend.getState(stackName, region);
83645
83846
  currentEtag = await setup.stateBackend.saveState(stackName, region, next(), { ...fresh?.etag !== void 0 && { expectedEtag: fresh.etag } });
83646
83847
  } catch (retryError) {
83647
- logger.warn(`Failed to persist state after a rollback operation: ${displaySafe(retryError instanceof Error ? retryError.message : String(retryError))}. The resource was reverted in AWS; re-run 'cdkd rollback ${safeStack(stackName)}' to reconcile state.`);
83848
+ logger.warn(`Failed to persist state after a rollback operation: ${displaySafe(retryError instanceof Error ? retryError.message : String(retryError))}. The resource was reverted in AWS; re-run the rollback to reconcile state.\nRe-run with: ${pasteableCommand("cdkd rollback", [{
83849
+ value: stackName,
83850
+ hole: "stack"
83851
+ }]).command}`);
83648
83852
  }
83649
83853
  }
83650
83854
  };
@@ -83725,8 +83929,14 @@ async function rollbackCommand(stackArg, options) {
83725
83929
  await setup.stateBackend.deleteState(stackName, region);
83726
83930
  logger.info(`State for '${safeStack(stackName)}' (${safe(region)}) removed (stack fully rolled back).`);
83727
83931
  }
83728
- if (interrupted) throw new PartialFailureError(`Rollback interrupted. Journal preserved — re-run 'cdkd rollback ${safeStack(stackName)}' to finish.`);
83729
- if (totalFailures > 0) throw new PartialFailureError(`Rollback completed with ${totalFailures} failed operation(s). Journal preserved — re-run 'cdkd rollback ${safeStack(stackName)}' to retry.`);
83932
+ if (interrupted) throw new PartialFailureError(`Rollback interrupted. Journal preserved — re-run the rollback to finish.\nRe-run with: ${pasteableCommand("cdkd rollback", [{
83933
+ value: stackName,
83934
+ hole: "stack"
83935
+ }]).command}`);
83936
+ if (totalFailures > 0) throw new PartialFailureError(`Rollback completed with ${totalFailures} failed operation(s). Journal preserved — re-run the rollback to retry.\nRe-run with: ${pasteableCommand("cdkd rollback", [{
83937
+ value: stackName,
83938
+ hole: "stack"
83939
+ }]).command}`);
83730
83940
  if (totalWarnings > 0) throw new PartialFailureError(`Rollback completed with ${totalWarnings} skipped/unrecoverable operation(s) (see warnings above).`);
83731
83941
  logger.info(`\nRollback of '${safeStack(stackName)}' (${safe(region)}) complete.`);
83732
83942
  } finally {
@@ -84073,7 +84283,13 @@ function printRunList(stackName, region, runs) {
84073
84283
  const resultColored = result === "SUCCEEDED" ? green(result) : result === "UNKNOWN" || result === "<unrenderable>" ? gray(result) : red(result);
84074
84284
  logger.info(` ${cyan(safeId(run.runId) || "<unrenderable>")} ${safeId(run.command) || "<unrenderable>"} ${resultColored} ${gray(safeId(run.startedAt) || "?")} -> ${gray(safeId(run.finishedAt) || "?")} ${gray(`cdkd ${safeId(run.cdkdVersion) || "<unrenderable>"}`)} ${gray(`${safeCount(run.eventCount)} events`)}`);
84075
84285
  }
84076
- logger.info(gray(`\nUse 'cdkd events ${safeStack} --run <runId>' to read one run's events.`));
84286
+ logger.info(gray(`\nRead one run's events with: ${pasteableCommand("cdkd events", [{
84287
+ value: stackName,
84288
+ hole: "stack"
84289
+ }, {
84290
+ flag: "--run",
84291
+ hole: "runId"
84292
+ }]).command}`));
84077
84293
  }
84078
84294
  /** Human-readable single-run event stream (in recorded order). */
84079
84295
  /**
@@ -90870,7 +91086,7 @@ async function runDetached(opts) {
90870
91086
  args.push(opts.image, ...entryPointTail, ...opts.cmd);
90871
91087
  const logger = getLogger().child("docker");
90872
91088
  logger.debug(`${getDockerCmd()} ${redactDockerArgvValues(args).join(" ")}`);
90873
- if (collisions.length > 0) logger.warn(`Env var(s) ${collisions.map((k) => JSON.stringify(k)).join(", ")} share a name with a docker-client environment variable or have a malformed name (empty, or containing '=' / NUL), and were NOT passed to the container at all (a colliding name would hijack the docker client; a malformed name cannot form a valid environment variable). Rename the env var if the container needs it.`);
91089
+ if (collisions.length > 0) logger.warn(`Env var(s) ${collisions.map((k) => JSON.stringify(k)).join(", ")} share a name with a variable the container client reads (docker, or the CDK_DOCKER binary) or have a malformed name (empty, or containing '=' / NUL), and were NOT passed to the container at all (a colliding name would hijack that client; a malformed name cannot form a valid environment variable). Rename the env var if the container needs it.`);
90874
91090
  try {
90875
91091
  const { stdout } = await execFileAsync$3(getDockerCmd(), args, {
90876
91092
  maxBuffer: 10485760,
@@ -94123,7 +94339,7 @@ async function createNetworkAndSidecar(args) {
94123
94339
  if (cluster) sidecarEnv["CLUSTER"] = cluster;
94124
94340
  const { flags: sidecarFlags, sensitiveEnv: sidecarSensitiveEnv, collisions: sidecarCollisions } = partitionSensitiveEnv(sidecarEnv, SENSITIVE_ENV_KEYS);
94125
94341
  sidecarArgs.push(...sidecarFlags);
94126
- if (sidecarCollisions.length > 0) logger.warn(`Sidecar env var(s) ${sidecarCollisions.map((k) => JSON.stringify(k)).join(", ")} share a name with a docker-client environment variable and were NOT passed to the sidecar at all (they would hijack the docker client).`);
94342
+ if (sidecarCollisions.length > 0) logger.warn(`Sidecar env var(s) ${sidecarCollisions.map((k) => JSON.stringify(k)).join(", ")} share a name with a variable the container client reads (docker, or the CDK_DOCKER binary) and were NOT passed to the sidecar at all (they would hijack that client).`);
94127
94343
  sidecarArgs.push(METADATA_ENDPOINT_IMAGE);
94128
94344
  logger.info(`Starting ECS local-container-endpoints sidecar at ${sidecarIp}...`);
94129
94345
  try {
@@ -94489,7 +94705,7 @@ async function runEcsTask(task, options, state) {
94489
94705
  });
94490
94706
  dockerCmds.set(container.name, built.args);
94491
94707
  dockerEnvs.set(container.name, built.sensitiveEnv);
94492
- if (built.collisions.length > 0) logger.warn(`Container '${container.name}': secret(s) ${built.collisions.map((k) => JSON.stringify(k)).join(", ")} share a name with a docker-client environment variable or have a malformed name (empty, or containing '=' / NUL), and were NOT passed to the container at all (a colliding name would hijack the docker client; a malformed name cannot form a valid environment variable). Rename the secret if the container needs it.`);
94708
+ if (built.collisions.length > 0) logger.warn(`Container '${container.name}': secret(s) ${built.collisions.map((k) => JSON.stringify(k)).join(", ")} share a name with a variable the container client reads (docker, or the CDK_DOCKER binary) or have a malformed name (empty, or containing '=' / NUL), and were NOT passed to the container at all (a colliding name would hijack that client; a malformed name cannot form a valid environment variable). Rename the secret if the container needs it.`);
94493
94709
  }
94494
94710
  const startedByName = /* @__PURE__ */ new Map();
94495
94711
  for (const containerName of startOrder) {
@@ -98272,4 +98488,4 @@ function buildProgram() {
98272
98488
 
98273
98489
  //#endregion
98274
98490
  export { buildProgram };
98275
- //# sourceMappingURL=program-Fgtmg1PN.js.map
98491
+ //# sourceMappingURL=program-CY92mXcX.js.map