@cdkd/cli 0.352.13 → 0.353.0

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.
Files changed (57) hide show
  1. package/dist/{ambient-client-defaults-_b32vSt-.js → ambient-client-defaults-z2kbR8l-.js} +3 -3
  2. package/dist/{ambient-client-defaults-_b32vSt-.js.map → ambient-client-defaults-z2kbR8l-.js.map} +1 -1
  3. package/dist/{asg-provider-DY41BqOf.js → asg-provider-CM19nSRR.js} +14 -9
  4. package/dist/asg-provider-CM19nSRR.js.map +1 -0
  5. package/dist/cli.js +3 -3
  6. package/dist/{custom-resource-runtime-QfwICca8.js → custom-resource-runtime-gD0yCVTA.js} +6 -6
  7. package/dist/{custom-resource-runtime-QfwICca8.js.map → custom-resource-runtime-gD0yCVTA.js.map} +1 -1
  8. package/dist/{db-associated-roles-ChWaJgql.js → db-associated-roles-CwKvJHmW.js} +2 -2
  9. package/dist/{db-associated-roles-ChWaJgql.js.map → db-associated-roles-CwKvJHmW.js.map} +1 -1
  10. package/dist/{delete-started-BAl80KJ-.js → delete-started-BR6VF4-U.js} +4 -4
  11. package/dist/{delete-started-BAl80KJ-.js.map → delete-started-BR6VF4-U.js.map} +1 -1
  12. package/dist/{deploy-engine-BQral6za.js → deploy-engine-axD9sX_9.js} +527 -100
  13. package/dist/deploy-engine-axD9sX_9.js.map +1 -0
  14. package/dist/{diff-calculator-Dj6UGllF.js → diff-calculator-Dych6a6c.js} +18 -13
  15. package/dist/diff-calculator-Dych6a6c.js.map +1 -0
  16. package/dist/{ecr-uri-BNOBWmtv.js → ecr-uri-CmjaicP1.js} +2 -2
  17. package/dist/{ecr-uri-BNOBWmtv.js.map → ecr-uri-CmjaicP1.js.map} +1 -1
  18. package/dist/{expected-bucket-owner-DvEnZMQG.js → expected-bucket-owner-BUXAXOgl.js} +2 -2
  19. package/dist/{expected-bucket-owner-DvEnZMQG.js.map → expected-bucket-owner-BUXAXOgl.js.map} +1 -1
  20. package/dist/{iam-role-provider-DWk5DUSX.js → iam-role-provider-C92_i6aW.js} +8 -8
  21. package/dist/{iam-role-provider-DWk5DUSX.js.map → iam-role-provider-C92_i6aW.js.map} +1 -1
  22. package/dist/{image-plan-DQ0trmM_.js → image-plan-Cu3b26DY.js} +10 -8
  23. package/dist/image-plan-Cu3b26DY.js.map +1 -0
  24. package/dist/index.d.ts +7 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +5 -5
  27. package/dist/{logger-BmVyKPL2.js → logger-oZMfcKSj.js} +2 -2
  28. package/dist/{logger-BmVyKPL2.js.map → logger-oZMfcKSj.js.map} +1 -1
  29. package/dist/{neptune-provider-CaTWycXB.js → neptune-provider-CN3MA8Cw.js} +7 -7
  30. package/dist/{neptune-provider-CaTWycXB.js.map → neptune-provider-CN3MA8Cw.js.map} +1 -1
  31. package/dist/{program-B8pMildk.js → program-BfTCUNof.js} +35 -31
  32. package/dist/program-BfTCUNof.js.map +1 -0
  33. package/dist/{provider-classes-D3-D7HGf.js → provider-classes-BbS4iho1.js} +16 -16
  34. package/dist/{provider-classes-D3-D7HGf.js.map → provider-classes-BbS4iho1.js.map} +1 -1
  35. package/dist/{rds-provider-BXsZQCfA.js → rds-provider-k-7oWDtG.js} +10 -10
  36. package/dist/{rds-provider-BXsZQCfA.js.map → rds-provider-k-7oWDtG.js.map} +1 -1
  37. package/dist/{read-replica-CaWHwB3m.js → read-replica-Dx5O9bW4.js} +3 -3
  38. package/dist/{read-replica-CaWHwB3m.js.map → read-replica-Dx5O9bW4.js.map} +1 -1
  39. package/dist/{replacement-rules-BuvJdDDu.js → replacement-rules-SPQJMbC6.js} +3 -3
  40. package/dist/{replacement-rules-BuvJdDDu.js.map → replacement-rules-SPQJMbC6.js.map} +1 -1
  41. package/dist/{resource-deadline-CB5xO4LO.js → resource-deadline-CImbEePa.js} +4 -4
  42. package/dist/{resource-deadline-CB5xO4LO.js.map → resource-deadline-CImbEePa.js.map} +1 -1
  43. package/dist/{run-cli-DlUy-Xfz.js → run-cli-B637Czto.js} +2 -2
  44. package/dist/{run-cli-DlUy-Xfz.js.map → run-cli-B637Czto.js.map} +1 -1
  45. package/dist/{ec2-termination-protection-D1fp1UTY.js → update-policy-C3iCsDhx.js} +15 -7
  46. package/dist/update-policy-C3iCsDhx.js.map +1 -0
  47. package/dist/{update-removal-i8K9a3aR.js → update-removal-TXGn1k50.js} +4 -4
  48. package/dist/{update-removal-i8K9a3aR.js.map → update-removal-TXGn1k50.js.map} +1 -1
  49. package/dist/{version-CK4KyY8m.js → version-HusdN8vD.js} +2 -2
  50. package/dist/{version-CK4KyY8m.js.map → version-HusdN8vD.js.map} +1 -1
  51. package/package.json +2 -2
  52. package/dist/asg-provider-DY41BqOf.js.map +0 -1
  53. package/dist/deploy-engine-BQral6za.js.map +0 -1
  54. package/dist/diff-calculator-Dj6UGllF.js.map +0 -1
  55. package/dist/ec2-termination-protection-D1fp1UTY.js.map +0 -1
  56. package/dist/image-plan-DQ0trmM_.js.map +0 -1
  57. package/dist/program-B8pMildk.js.map +0 -1
@@ -1,15 +1,15 @@
1
- import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, a as UNSHOWABLE_VALUE, c as deployReplaceCommand, d as pasteableCommand, f as physicalIdShownBesideCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE } from "./version-CK4KyY8m.js";
2
- import { $ as withStackScope, A as configStringRefusal, C as fallbackNamePropertyFor, D as coerceCfnInteger, E as coerceCfnBoolean, F as requireConfigString, G as currentNameGeneration, H as looksLikeCdkdGeneratedName, J as getCurrentStackName, K as getCurrentSkipPrefix, M as replayWarn, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, S as explicitNamePropertyFor, T as withoutGeneratedFallbackName, V as generateResourceNameWithFallback, W as stackInstanceNameSuffix, X as isNameGeneration, Z as withNameGeneration, _ as currentLogLineMasker, b as alternateNamePropertiesFor, c as VERBOSE_POINTER, et as withStackScopeBeforeStateRead, g as verbosePointerTail, h as verbosePointerSentence, j as readConfigString, k as configIntegerRefusal, m as verboseAwareText, n as getLogger, p as safeStringify, q as getCurrentStackInstanceId, u as describeAwsFailure, v as installLogLineMaskerSource, w as generatedNameFor, x as applyDefaultNameForFallback, y as getLiveRenderer } from "./logger-BmVyKPL2.js";
3
- import { A as stripControlChars, C as isNameCooldownError, F as isAmbiguousOutcomeError, G as markRedactedCause, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, K as wrapMaskedAwsError, L as isIamPropagationError, O as relayedNameCollision, P as isAmbiguousCcHandlerErrorCode, Q as AccountIdUnavailableError, S as isNameCollisionErrorFrom, T as isReplayedNameCollisionFrom, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, Z as SelectOutOfBoundsRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, b as isUpdateUnsupportedError, et as CdkdError, i as credentialFingerprint, k as escapeRegExp$1, m as ExportInUseError, n as ambientCredentialConfig, nt as DeploymentNotApprovedError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, st as StateError, t as ambientClientDefaults, w as isRecreateRetryableError, z as isTransientServerError } from "./ambient-client-defaults-_b32vSt-.js";
1
+ import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, a as UNSHOWABLE_VALUE, c as deployReplaceCommand, d as pasteableCommand, f as physicalIdShownBesideCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE } from "./version-HusdN8vD.js";
2
+ import { $ as withStackScope, A as configStringRefusal, C as fallbackNamePropertyFor, D as coerceCfnInteger, E as coerceCfnBoolean, F as requireConfigString, G as currentNameGeneration, H as looksLikeCdkdGeneratedName, J as getCurrentStackName, K as getCurrentSkipPrefix, M as replayWarn, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, S as explicitNamePropertyFor, T as withoutGeneratedFallbackName, V as generateResourceNameWithFallback, W as stackInstanceNameSuffix, X as isNameGeneration, Z as withNameGeneration, _ as currentLogLineMasker, b as alternateNamePropertiesFor, c as VERBOSE_POINTER, et as withStackScopeBeforeStateRead, g as verbosePointerTail, h as verbosePointerSentence, j as readConfigString, k as configIntegerRefusal, m as verboseAwareText, n as getLogger, p as safeStringify, q as getCurrentStackInstanceId, u as describeAwsFailure, v as installLogLineMaskerSource, w as generatedNameFor, x as applyDefaultNameForFallback, y as getLiveRenderer } from "./logger-oZMfcKSj.js";
3
+ import { A as stripControlChars, C as isNameCooldownError, F as isAmbiguousOutcomeError, G as markRedactedCause, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, K as wrapMaskedAwsError, L as isIamPropagationError, O as relayedNameCollision, P as isAmbiguousCcHandlerErrorCode, Q as AccountIdUnavailableError, S as isNameCollisionErrorFrom, T as isReplayedNameCollisionFrom, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, Z as SelectOutOfBoundsRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, b as isUpdateUnsupportedError, et as CdkdError, i as credentialFingerprint, k as escapeRegExp$1, m as ExportInUseError, n as ambientCredentialConfig, nt as DeploymentNotApprovedError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, st as StateError, t as ambientClientDefaults, w as isRecreateRetryableError, z as isTransientServerError } from "./ambient-client-defaults-z2kbR8l-.js";
4
4
  import { a as getAssumedRoleCredentials, c as setAssumedRoleCredentials, d as quietS3Logger, f as ambientRegion, i as awsEndpointOverrideUrl, n as awsClientDefaults, o as getPreAssumeEnvCredentials, r as awsEndpointOverrideActive, t as SECOND_ROLE_PUBLISH_REFUSAL, u as setPreAssumeEnvCredentials } from "./aws-client-defaults-DAebi99J.js";
5
5
  import { l as s3ClientDefaults, r as getAwsClients } from "./aws-clients-DOkPjjAW.js";
6
- import { A as describeJsonParseFailure, C as PhaseClock, E as recordPhase, M as parseFailureDebugDetail, N as parseJsonNamingNoBody, O as timePhase, P as utf8ByteLength, S as CREATE_ONLY_PATHS_SNAPSHOT, T as phaseTimingsEnabled, _ as hasNoRegistrySchema, a as reDisableInstanceApiTermination, b as IAM_PROPAGATION_MAX_DELAY_MS, c as unchangedBehindSecretReference, d as getCreateOnlyPropertyPaths, f as isIntrinsicShaped, g as describeTypeWithThrottleRetry, h as parseCreateOnlyPropertyPointers, i as observeThenDisableInstanceApiTermination, j as jsonParseFailureStandIn, k as timePhaseSync, l as cachedCreateOnlyPropertyPaths, m as templateResourceTypes, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, p as prefetchCreateOnlyPropertyPaths, r as isTerminationProtectionPropagationError, v as isAwsEmulatorRegistryMiss, w as phaseScopeForStack, x as withRetry, y as reportAwsEmulatorRegistryMiss } from "./ec2-termination-protection-D1fp1UTY.js";
6
+ import { A as timePhaseSync, C as CREATE_ONLY_PATHS_SNAPSHOT, D as recordPhase, E as phaseTimingsEnabled, F as utf8ByteLength, M as jsonParseFailureStandIn, N as parseFailureDebugDetail, P as parseJsonNamingNoBody, S as withRetry, T as phaseScopeForStack, _ as describeTypeWithThrottleRetry, a as observeThenDisableInstanceApiTermination, b as reportAwsEmulatorRegistryMiss, f as getCreateOnlyPropertyPaths, g as parseCreateOnlyPropertyPointers, h as templateResourceTypes, i as isTerminationProtectionPropagationError, j as describeJsonParseFailure, k as timePhase, l as unchangedBehindSecretReference, m as prefetchCreateOnlyPropertyPaths, o as reDisableInstanceApiTermination, p as isIntrinsicShaped, r as ec2InstanceProtectionSite, s as reEnableInstanceApiTermination, t as ignoresUnmodifiedGroupSize, u as cachedCreateOnlyPropertyPaths, v as hasNoRegistrySchema, w as PhaseClock, x as IAM_PROPAGATION_MAX_DELAY_MS, y as isAwsEmulatorRegistryMiss } from "./update-policy-C3iCsDhx.js";
7
7
  import { i as sameRegion, n as canonicalizeRegion, r as derivePartitionAndUrlSuffix } from "./aws-partition-DA0r2sr-.js";
8
- import { B as refusalTypeShown, Bt as RETRY_AUXILIARY_OWNER, Ct as isInterruptedWaitError, Dt as compositeIdSeparatorRefusal, Ft as createMaskedRetryLogger, G as isMarkedNotGone, H as resolveExplicitPhysicalId, It as isSecretDerivedValue, J as deleteWithProtectionCompensation, Jt as markAuxiliaryFailure, K as markNotGone, Kt as isAuxiliaryFailure, L as isQuotableImportValue, Lt as maskDeep, M as withoutServerErrorRetries, Mt as segmentAfterAnchor, Nt as stateOrphanRecordRemedy, Pt as createMaskedLogSinks, R as normalizeAwsTagsToCfn, Rt as maskerOrIdentity, Tt as canonicalizeRoute53QueryName, U as RESOURCE_NOT_FOUND, Ut as createdBeforeFailure, W as assertRegionMatch, Wt as createdResourceIdentityBeforeFailure, X as observeThenDisableProtection, Yt as markCreatedBeforeFailure, _t as pasteableAwsCommand, an as recoveryCommandFlags, c as clearCreatedReport, cn as DEFAULT_STATE_PREFIX, ct as protectionFlipKey, dn as withPasteableAwsProfile, dt as ElapsedBudgetRegistry, f as retractCreatedResource, fn as injectiveKey, ft as monotonicNowMs, hn as producerRecordKey, jt as resourceTypeShown, kt as logicalIdShown, l as collectCreatedResources, lt as runDeleteAttempt, n as prepareRemovalForUpdate, o as withoutInjectedRemovals, on as sanitizeRecoveryValue, ot as ProtectionFlipRegistry, pt as DELETION_PROTECTION_DOC_POINTER, q as compensateProtectionFlip, qt as isAuxiliaryMarkOf, r as removalWarning, s as CreatedResourceSink, sn as CUSTOM_RESOURCE_RESPONSE_PREFIX, st as isTerminalDeleteFailure, u as reportCreatedResource, ut as ElapsedBudget, vt as protectedReplacementAdvice, wt as startInterruptWatch, x as withUnchangedSecretPrincipalLists, z as quotedRemedyLogicalId, zt as withDerivedNameMasks } from "./update-removal-i8K9a3aR.js";
9
- import { t as expectedOwnerParam } from "./expected-bucket-owner-DvEnZMQG.js";
10
- import { Ct as isReadableBag, Dt as skippedOutputsCarriedFrom, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, gt as slowCcOperationTimeoutMs, ht as dbInstanceAttributes, i as dbClusterAttributes, n as isRefusedByName, r as markDeleteStarted, t as isDeleteStarted, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-BAl80KJ-.js";
11
- import { $t as recordInheritedParameterValue, A as witnessNormalize, An as recordNoEchoAttributeValues, At as withoutPhysicalNameCopies, B as redactionClaimOf, Cn as noEchoParameterPlaintextsOf, Ct as withLegacyOverlapScan, D as recordedNoEchoValuesOf, Dn as recordFreshNoEchoValuesIn, Dt as replaceEmbeddedPhysicalNameRewrites, E as recordPassedNoEchoParameters, En as recordDerivedMaskOnlyValue, Et as repairPhysicalNameCopyLeaves, F as markLeafCertifiedBag, G as foldRecording, Gt as recordTakenIfBranch, H as mixedLiteralAnswered, Ht as splitOutsideDynamicReferences, I as markSameGenerationBag, In as isDynamicReferenceString, It as secretRerenderPairs, J as hasPassProvenance, Jt as templateRereadsAccountId, K as openRecordingScope, Kt as inheritedPseudoValue, L as mergeResolvedPairs, Ln as isSingleDynamicReferenceToken, M as carryRedactionMarks, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, N as intrinsicLeafResolutionOf, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, O as replaceAtCoordinates, Ot as scrubResourceRecord, P as isSameGenerationBag, Pn as withoutNoEchoParameterEntries, Q as recordReferenceResolution, Qt as recordInheritedParameterRead, R as recordIntrinsicLeafResolution, Rn as maskMatchSpans, S as noEchoParametersReadBy, Sn as markNoEchoParameterClass, St as replaceWholeLeaves, Tt as repairEmbeddedPhysicalNamesTowards, U as withLegacyMixedScan, Ut as standsForInheritedSecret, V as resolvedPlaintextOf, Vt as rereadParameterExpression, W as redactForState, Wt as recordDroppedArrayElements, X as passReadVersionsFor, Xt as inheritedParameterExpression, Y as passProvenanceFor, Yt as inheritNestedStackParameterAssociations, Z as recordReferenceProvenanceEntry, Zt as inheritedRenderedToken, _ as noEchoComparison, _n as freshNoEchoValuesOf, _t as maskSecretsInText, an as recordRecoverableMaskedOutput, at as literalSplitDelimitersOf, bn as isScopedSecretVerdict, bt as legacyReferenceLeavesOnly, c as parseLambdaFunctionAddress, ct as recordLogOnlyParameterValue, d as canonicalJson$5, dn as crossStackSourceKey, dt as shareLogOnlyValues, en as redactInheritedParameterValue, et as carryLogOnlyValues, f as isMarkedCoordinate, fn as recordCrossStackExpression, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gn as contradictProvenPublicExpression, gt as maskSecretsInError, h as maskWholeValue, hn as carryFreshNoEchoMark, ht as maskRecordedSecretsInText, in as freshNoEchoLeafPositions, it as hasMaskableValues, jn as recordNoEchoParameterFreshValue, jt as spanNamesResolvableService, k as valueAtCoordinate, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, lt as recordLogOnlySplitFragments, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nn as carriesFreshNoEchoValue, nt as createUnionSecretMasker, on as recoverMaskedOutput, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, q as recordSecretResolution, qt as recordInheritedPseudoParameters, rn as embedsFreshNoEchoValue, rt as hasLogOnlyValues, sn as physicalNameCopiesOf, st as printingCorpusOf, t as ReplacementRulesRegistry, tn as withdrawRenderedParameterSpelling, tt as carryLogOnlyValuesCarriedBy, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, vn as isMaskOnlyPlaintext, vt as differingStringLeaves, w as readbackPathFor, wn as pinScopedSecretVerdict, wt as embeddedPhysicalNameRewrites, x as noEchoParameterNodesAt, xn as isSecretExpressionByVerdictOrSpelling, xt as overlapRuleAnswered, y as noEchoLeavesOf, yn as isNoEchoParameterPlaintext, yt as legacyLeavesWithoutMask, z as recordIntrinsicLeafResolutionAs, zt as arrayPairsWhateverDrops } from "./replacement-rules-BuvJdDDu.js";
12
- import { C as unsettledItemsField, D as withUnsettledItems, E as unsettledPropertiesOf, O as withUnsettledProperties, S as unsettledContextOf, T as unsettledItemsTopKey, c as refuseRestoreFromItself, f as planTagDiff, g as tagPlanWarning, i as withResourceDeadline, k as withoutUnsettledProperties, m as refuseMalformedDesiredTags, n as enclosingDeadlineRemainingMs, p as readTagList, r as whileEnclosingDeadlinesPaused, t as enclosingDeadlineExpired, w as unsettledItemsOf, x as isUsableAttemptedName, y as definedAttributes } from "./resource-deadline-CB5xO4LO.js";
8
+ import { B as refusalTypeShown, Bt as RETRY_AUXILIARY_OWNER, Ct as isInterruptedWaitError, Dt as compositeIdSeparatorRefusal, Ft as createMaskedRetryLogger, G as isMarkedNotGone, H as resolveExplicitPhysicalId, It as isSecretDerivedValue, J as deleteWithProtectionCompensation, Jt as markAuxiliaryFailure, K as markNotGone, Kt as isAuxiliaryFailure, L as isQuotableImportValue, Lt as maskDeep, M as withoutServerErrorRetries, Mt as segmentAfterAnchor, Nt as stateOrphanRecordRemedy, Pt as createMaskedLogSinks, R as normalizeAwsTagsToCfn, Rt as maskerOrIdentity, Tt as canonicalizeRoute53QueryName, U as RESOURCE_NOT_FOUND, Ut as createdBeforeFailure, W as assertRegionMatch, Wt as createdResourceIdentityBeforeFailure, X as observeThenDisableProtection, Yt as markCreatedBeforeFailure, _t as pasteableAwsCommand, an as recoveryCommandFlags, c as clearCreatedReport, cn as DEFAULT_STATE_PREFIX, ct as protectionFlipKey, dn as withPasteableAwsProfile, dt as ElapsedBudgetRegistry, f as retractCreatedResource, fn as injectiveKey, ft as monotonicNowMs, hn as producerRecordKey, jt as resourceTypeShown, kt as logicalIdShown, l as collectCreatedResources, lt as runDeleteAttempt, n as prepareRemovalForUpdate, o as withoutInjectedRemovals, on as sanitizeRecoveryValue, ot as ProtectionFlipRegistry, pt as DELETION_PROTECTION_DOC_POINTER, q as compensateProtectionFlip, qt as isAuxiliaryMarkOf, r as removalWarning, s as CreatedResourceSink, sn as CUSTOM_RESOURCE_RESPONSE_PREFIX, st as isTerminalDeleteFailure, u as reportCreatedResource, ut as ElapsedBudget, vt as protectedReplacementAdvice, wt as startInterruptWatch, x as withUnchangedSecretPrincipalLists, z as quotedRemedyLogicalId, zt as withDerivedNameMasks } from "./update-removal-TXGn1k50.js";
9
+ import { t as expectedOwnerParam } from "./expected-bucket-owner-BUXAXOgl.js";
10
+ import { Ct as isReadableBag, Dt as skippedOutputsCarriedFrom, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, gt as slowCcOperationTimeoutMs, ht as dbInstanceAttributes, i as dbClusterAttributes, n as isRefusedByName, r as markDeleteStarted, t as isDeleteStarted, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-BR6VF4-U.js";
11
+ import { $t as recordInheritedParameterValue, A as witnessNormalize, An as recordNoEchoAttributeValues, At as withoutPhysicalNameCopies, B as redactionClaimOf, Cn as noEchoParameterPlaintextsOf, Ct as withLegacyOverlapScan, D as recordedNoEchoValuesOf, Dn as recordFreshNoEchoValuesIn, Dt as replaceEmbeddedPhysicalNameRewrites, E as recordPassedNoEchoParameters, En as recordDerivedMaskOnlyValue, Et as repairPhysicalNameCopyLeaves, F as markLeafCertifiedBag, G as foldRecording, Gt as recordTakenIfBranch, H as mixedLiteralAnswered, Ht as splitOutsideDynamicReferences, I as markSameGenerationBag, In as isDynamicReferenceString, It as secretRerenderPairs, J as hasPassProvenance, Jt as templateRereadsAccountId, K as openRecordingScope, Kt as inheritedPseudoValue, L as mergeResolvedPairs, Ln as isSingleDynamicReferenceToken, M as carryRedactionMarks, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, N as intrinsicLeafResolutionOf, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, O as replaceAtCoordinates, Ot as scrubResourceRecord, P as isSameGenerationBag, Pn as withoutNoEchoParameterEntries, Q as recordReferenceResolution, Qt as recordInheritedParameterRead, R as recordIntrinsicLeafResolution, Rn as maskMatchSpans, S as noEchoParametersReadBy, Sn as markNoEchoParameterClass, St as replaceWholeLeaves, Tt as repairEmbeddedPhysicalNamesTowards, U as withLegacyMixedScan, Ut as standsForInheritedSecret, V as resolvedPlaintextOf, Vt as rereadParameterExpression, W as redactForState, Wt as recordDroppedArrayElements, X as passReadVersionsFor, Xt as inheritedParameterExpression, Y as passProvenanceFor, Yt as inheritNestedStackParameterAssociations, Z as recordReferenceProvenanceEntry, Zt as inheritedRenderedToken, _ as noEchoComparison, _n as freshNoEchoValuesOf, _t as maskSecretsInText, an as recordRecoverableMaskedOutput, at as literalSplitDelimitersOf, bn as isScopedSecretVerdict, bt as legacyReferenceLeavesOnly, c as parseLambdaFunctionAddress, ct as recordLogOnlyParameterValue, d as canonicalJson$5, dn as crossStackSourceKey, dt as shareLogOnlyValues, en as redactInheritedParameterValue, et as carryLogOnlyValues, f as isMarkedCoordinate, fn as recordCrossStackExpression, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gn as contradictProvenPublicExpression, gt as maskSecretsInError, h as maskWholeValue, hn as carryFreshNoEchoMark, ht as maskRecordedSecretsInText, in as freshNoEchoLeafPositions, it as hasMaskableValues, jn as recordNoEchoParameterFreshValue, jt as spanNamesResolvableService, k as valueAtCoordinate, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, lt as recordLogOnlySplitFragments, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nn as carriesFreshNoEchoValue, nt as createUnionSecretMasker, on as recoverMaskedOutput, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, q as recordSecretResolution, qt as recordInheritedPseudoParameters, rn as embedsFreshNoEchoValue, rt as hasLogOnlyValues, sn as physicalNameCopiesOf, st as printingCorpusOf, t as ReplacementRulesRegistry, tn as withdrawRenderedParameterSpelling, tt as carryLogOnlyValuesCarriedBy, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, vn as isMaskOnlyPlaintext, vt as differingStringLeaves, w as readbackPathFor, wn as pinScopedSecretVerdict, wt as embeddedPhysicalNameRewrites, x as noEchoParameterNodesAt, xn as isSecretExpressionByVerdictOrSpelling, xt as overlapRuleAnswered, y as noEchoLeavesOf, yn as isNoEchoParameterPlaintext, yt as legacyLeavesWithoutMask, z as recordIntrinsicLeafResolutionAs, zt as arrayPairsWhateverDrops } from "./replacement-rules-SPQJMbC6.js";
12
+ import { C as unsettledItemsField, D as withUnsettledItems, E as unsettledPropertiesOf, O as withUnsettledProperties, S as unsettledContextOf, T as unsettledItemsTopKey, c as refuseRestoreFromItself, f as planTagDiff, g as tagPlanWarning, i as withResourceDeadline, k as withoutUnsettledProperties, m as refuseMalformedDesiredTags, n as enclosingDeadlineRemainingMs, p as readTagList, r as whileEnclosingDeadlinesPaused, t as enclosingDeadlineExpired, w as unsettledItemsOf, x as isUsableAttemptedName, y as definedAttributes } from "./resource-deadline-CImbEePa.js";
13
13
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
14
14
  import { AsyncLocalStorage } from "node:async_hooks";
15
15
  import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketLifecycleConfigurationCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client } from "@aws-sdk/client-s3";
@@ -82,7 +82,7 @@ async function resolveBucketRegion(bucketName, opts = {}) {
82
82
  });
83
83
  }
84
84
  try {
85
- const { expectedOwnerParam } = await import("./expected-bucket-owner-DvEnZMQG.js").then((n) => n.n);
85
+ const { expectedOwnerParam } = await import("./expected-bucket-owner-BUXAXOgl.js").then((n) => n.n);
86
86
  return (await client.send(new GetBucketLocationCommand({
87
87
  Bucket: bucketName,
88
88
  ...await expectedOwnerParam(client)
@@ -2356,6 +2356,31 @@ const STATE_SCHEMA_VERSIONS_READABLE = [
2356
2356
  16,
2357
2357
  17
2358
2358
  ];
2359
+ function classifyStateRecordAccess(version, minReaderVersion) {
2360
+ if (version === void 0) return { kind: "writable" };
2361
+ if (STATE_SCHEMA_VERSIONS_READABLE.includes(version)) return { kind: "writable" };
2362
+ if (typeof version === "number" && Number.isSafeInteger(version) && version > 17 && STATE_SCHEMA_VERSIONS_READABLE.includes(minReaderVersion)) return {
2363
+ kind: "read-only",
2364
+ version
2365
+ };
2366
+ return { kind: "unsupported" };
2367
+ }
2368
+ const READ_ONLY_STATE_MARK = Symbol("cdkd.readOnlyStateVersion");
2369
+ function markReadOnlyState(state, version) {
2370
+ Object.defineProperty(state, READ_ONLY_STATE_MARK, {
2371
+ value: version,
2372
+ enumerable: true,
2373
+ configurable: true,
2374
+ writable: false
2375
+ });
2376
+ return state;
2377
+ }
2378
+ function readOnlyStateVersionOf(state) {
2379
+ const marked = state[READ_ONLY_STATE_MARK];
2380
+ if (typeof marked === "number") return marked;
2381
+ const version = state.version;
2382
+ if (typeof version === "number" && version > 17) return version;
2383
+ }
2359
2384
 
2360
2385
  // src/state/create-token-ledger.ts
2361
2386
  const CREATE_TOKEN_LEDGER_VERSION = 1;
@@ -2530,7 +2555,7 @@ async function rawObjectExists(key) {
2530
2555
  await this.ensureClientForBucket();
2531
2556
  return this.headObject(key);
2532
2557
  }
2533
- async function getState(stackName, region) {
2558
+ async function getState(stackName, region, options = {}) {
2534
2559
  await this.ensureClientForBucket();
2535
2560
  const newKey = this.getStateKey(stackName, region);
2536
2561
  const shownStackName = this.displayName(stackName);
@@ -2545,7 +2570,7 @@ async function getState(stackName, region) {
2545
2570
  if (!response.Body) throw new StateError(`State file for stack ${shownStackName} (${shownRegionName}) has no body`);
2546
2571
  if (!response.ETag) throw new StateError(`State file for stack ${shownStackName} (${shownRegionName}) has no ETag`);
2547
2572
  const bodyString = await response.Body.transformToString();
2548
- const parsed = this.parseStateBody(bodyString, stackName);
2573
+ const parsed = this.parseStateBody(bodyString, stackName, options);
2549
2574
  const { state, divergentBodyRegion } = this.adoptKeyRegion(parsed, region, shownStackName, shownRegionName);
2550
2575
  if (!bodyMayCarryReferences(bodyString)) markTokenFreeState(state);
2551
2576
  this.logger.debug(`Retrieved state: ${shownStackName} (${shownRegionName}), ETag: ${response.ETag}`);
@@ -2561,7 +2586,7 @@ async function getState(stackName, region) {
2561
2586
  }
2562
2587
  this.logger.debug(`No state at new key for stack: ${shownStackName} (${shownRegionName})`);
2563
2588
  }
2564
- const legacy = await this.tryGetLegacy(stackName, region);
2589
+ const legacy = await this.tryGetLegacy(stackName, region, options);
2565
2590
  if (legacy) {
2566
2591
  const shownKey = displayIdent(this.getLegacyStateKey(stackName), { maxCodePoints: STACK_REF_MAX_CODE_POINTS });
2567
2592
  this.logger.warn(`Loaded legacy state for stack ${shownStackName} from ${shownKey}. It will be migrated to the region-scoped layout on next save.`);
@@ -2573,11 +2598,14 @@ async function getState(stackName, region) {
2573
2598
  return null;
2574
2599
  }
2575
2600
  async function saveState(stackName, region, state, options = {}) {
2601
+ const newerVersion = readOnlyStateVersionOf(state);
2602
+ if (newerVersion !== void 0) throw new StateError(`Refusing to save state for stack ${this.displayName(stackName)}: it was read from a record written by a newer cdkd (state schema version ${newerVersion}), which this cdkd binary can read but must not write. Upgrade cdkd to a version that supports schema ${newerVersion}.`);
2576
2603
  await this.ensureClientForBucket();
2577
2604
  const newKey = this.getStateKey(stackName, region);
2578
2605
  const { expectedEtag, migrateLegacy } = options;
2606
+ const { minReaderVersion: _minReaderVersion, ...stateFields } = state;
2579
2607
  const body = {
2580
- ...state,
2608
+ ...stateFields,
2581
2609
  ...stackInstanceIdCarriedFrom(state),
2582
2610
  version: stateSchemaVersionFor(state),
2583
2611
  stackName,
@@ -3772,7 +3800,7 @@ async function readLegacyRegion(stackName) {
3772
3800
  async function legacyBelongsToRegion(stackName, region) {
3773
3801
  return legacyProbeBelongsTo(await this.probeLegacyState(stackName), region);
3774
3802
  }
3775
- async function tryGetLegacy(stackName, region) {
3803
+ async function tryGetLegacy(stackName, region, options = {}) {
3776
3804
  try {
3777
3805
  const response = await this.s3Client.send(new GetObjectCommand({
3778
3806
  Bucket: this.config.bucket,
@@ -3781,7 +3809,7 @@ async function tryGetLegacy(stackName, region) {
3781
3809
  }));
3782
3810
  if (!response.Body || !response.ETag) return null;
3783
3811
  const bodyString = await response.Body.transformToString();
3784
- const state = this.parseStateBody(bodyString, stackName);
3812
+ const state = this.parseStateBody(bodyString, stackName, options);
3785
3813
  if (state.region && state.region !== region) {
3786
3814
  this.logger.debug(`Legacy state for stack ${this.displayName(stackName)} has region ${displayIdent(state.region)}, not ${displayIdent(region)} — skipping legacy fallback.`);
3787
3815
  return null;
@@ -3804,7 +3832,7 @@ async function tryGetLegacy(stackName, region) {
3804
3832
  throw this.wrapS3Failure(error, (text) => new StateError(`Failed to get legacy state for stack ${this.displayName(stackName)}: ${text}`, error instanceof Error ? error : void 0));
3805
3833
  }
3806
3834
  }
3807
- function parseStateBody(bodyString, stackName) {
3835
+ function parseStateBody(bodyString, stackName, options = {}) {
3808
3836
  let root;
3809
3837
  try {
3810
3838
  root = JSON.parse(bodyString);
@@ -3818,7 +3846,12 @@ function parseStateBody(bodyString, stackName) {
3818
3846
  }
3819
3847
  const parsed = root;
3820
3848
  const v = parsed.version;
3821
- if (v !== void 0 && !STATE_SCHEMA_VERSIONS_READABLE.includes(v)) {
3849
+ const access = classifyStateRecordAccess(v, parsed.minReaderVersion);
3850
+ if (access.kind === "read-only") {
3851
+ if (options.readOnly === true) return markReadOnlyState(parsed, access.version);
3852
+ throw new StateError(`State for stack ${this.displayName(stackName)} was written by a newer cdkd (state schema version ${access.version}). This cdkd binary can read it but must not write it: a write would drop the fields it does not know. Upgrade cdkd to a version that supports schema ${access.version}.`);
3853
+ }
3854
+ if (access.kind === "unsupported") {
3822
3855
  const vShown = v;
3823
3856
  const shown = displaySafe(vShown === null ? "null" : vShown, { asciiOnly: true }) || "<unrenderable>";
3824
3857
  throw new StateError(`Unsupported state schema version ${shown} for stack ${this.displayName(stackName)}. This cdkd binary supports versions ${STATE_SCHEMA_VERSIONS_READABLE.join(", ")}. Upgrade cdkd to a version that supports schema ${shown}.`);
@@ -3903,8 +3936,8 @@ var S3StateBackend = class S3StateBackend {
3903
3936
  rawObjectExists(key) {
3904
3937
  return rawObjectExists.call(this, key);
3905
3938
  }
3906
- getState(stackName, region) {
3907
- return getState.call(this, stackName, region);
3939
+ getState(stackName, region, options = {}) {
3940
+ return getState.call(this, stackName, region, options);
3908
3941
  }
3909
3942
  saveState(stackName, region, state, options = {}) {
3910
3943
  return saveState.call(this, stackName, region, state, options);
@@ -4162,11 +4195,11 @@ var S3StateBackend = class S3StateBackend {
4162
4195
  legacyBelongsToRegion(stackName, region) {
4163
4196
  return legacyBelongsToRegion.call(this, stackName, region);
4164
4197
  }
4165
- tryGetLegacy(stackName, region) {
4166
- return tryGetLegacy.call(this, stackName, region);
4198
+ tryGetLegacy(stackName, region, options = {}) {
4199
+ return tryGetLegacy.call(this, stackName, region, options);
4167
4200
  }
4168
- parseStateBody(bodyString, stackName) {
4169
- return parseStateBody.call(this, bodyString, stackName);
4201
+ parseStateBody(bodyString, stackName, options = {}) {
4202
+ return parseStateBody.call(this, bodyString, stackName, options);
4170
4203
  }
4171
4204
  };
4172
4205
 
@@ -13552,7 +13585,7 @@ async function applyRoleArnIfSet(opts) {
13552
13585
  // src/deployment/intrinsic-resolver/stack-state.ts
13553
13586
  async function getSameAccountStackState(stackName, region, context) {
13554
13587
  if (!context.stateBackend) throw markNonRetryable(/* @__PURE__ */ new Error("Fn::GetStackOutput: state backend is required for cross-stack references"));
13555
- return context.stateBackend.getState(stackName, region);
13588
+ return context.stateBackend.getState(stackName, region, { readOnly: true });
13556
13589
  }
13557
13590
  async function getCrossAccountStackState(roleArn, stackName, region, context) {
13558
13591
  const parsed = parseIamRoleArn(roleArn);
@@ -13586,7 +13619,7 @@ async function getCrossAccountStackState(roleArn, stackName, region, context) {
13586
13619
  secretAccessKey: credentials.secretAccessKey,
13587
13620
  sessionToken: credentials.sessionToken
13588
13621
  }
13589
- }).getState(stackName, region);
13622
+ }).getState(stackName, region, { readOnly: true });
13590
13623
  }
13591
13624
 
13592
13625
  // src/deployment/intrinsic-resolver/cross-stack/producer-state.ts
@@ -13610,7 +13643,7 @@ async function readProducerStateOnce(scope, stateBackend, stackName, region, onF
13610
13643
  };
13611
13644
  try {
13612
13645
  return {
13613
- state: (await stateBackend.getState(stackName, region))?.state ?? void 0,
13646
+ state: (await stateBackend.getState(stackName, region, { readOnly: true }))?.state ?? void 0,
13614
13647
  failed: false
13615
13648
  };
13616
13649
  } catch {
@@ -13717,7 +13750,7 @@ async function reresolveCrossStackValue(resolver, value, producerRegion, context
13717
13750
  // src/deployment/intrinsic-resolver/cross-stack/import-value.ts
13718
13751
  async function sameRegionExportEntry(resolver, context, exportName, entry) {
13719
13752
  try {
13720
- const local = await context.stateBackend.getState(entry.producerStack, resolver.resolverRegion);
13753
+ const local = await context.stateBackend.getState(entry.producerStack, resolver.resolverRegion, { readOnly: true });
13721
13754
  if (!local || !importableOutputKeys(local.state).includes(exportName)) return void 0;
13722
13755
  return {
13723
13756
  value: local.state.outputs[exportName],
@@ -13772,7 +13805,7 @@ async function resolveImportValue(resolver, importValueArg, context) {
13772
13805
  resolver.logger.debug(`No region available for stack ${quotedRender(displayMasked(resolver, refStack, context), "'")} — skipping (cdkd cannot read state without a region)`);
13773
13806
  continue;
13774
13807
  }
13775
- const stateData = await context.stateBackend.getState(refStack, lookupRegion);
13808
+ const stateData = await context.stateBackend.getState(refStack, lookupRegion, { readOnly: true });
13776
13809
  if (!stateData) {
13777
13810
  resolver.logger.debug(`No state found for stack: ${displayMasked(resolver, refStack, context)} (${displayMasked(resolver, lookupRegion, context)})`);
13778
13811
  continue;
@@ -19134,7 +19167,7 @@ async function deleteInIdLogScope(logicalId, physicalId, resourceType, propertie
19134
19167
  const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
19135
19168
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
19136
19169
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
19137
- const { ASGProvider } = await import("./asg-provider-DY41BqOf.js");
19170
+ const { ASGProvider } = await import("./asg-provider-CM19nSRR.js");
19138
19171
  const delegateRegion = ambientRegion();
19139
19172
  let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
19140
19173
  if (asgProvider === void 0) {
@@ -19288,7 +19321,7 @@ async function sdkDeleteDelegateInCcRegion(resourceType, logicalId, physicalId)
19288
19321
  const family = SDK_DELETE_FAMILIES.get(resourceType);
19289
19322
  const cached = this.sdkDeleteDelegates.get(family);
19290
19323
  if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
19291
- const provider = family === "rds" ? new (await (import("./rds-provider-BXsZQCfA.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-CaTWycXB.js"))).NeptuneProvider({ region: ccRegion });
19324
+ const provider = family === "rds" ? new (await (import("./rds-provider-k-7oWDtG.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-CN3MA8Cw.js"))).NeptuneProvider({ region: ccRegion });
19292
19325
  this.sdkDeleteDelegates.set(family, {
19293
19326
  region: ccRegion,
19294
19327
  provider
@@ -21974,7 +22007,7 @@ async function publishToSns(topicArn, request) {
21974
22007
  }
21975
22008
  async function invokeLambda(serviceToken, request) {
21976
22009
  if (localCustomResourceRuntimeActive()) {
21977
- const { invokeCustomResourceFunctionLocally } = await import("./custom-resource-runtime-QfwICca8.js");
22010
+ const { invokeCustomResourceFunctionLocally } = await import("./custom-resource-runtime-gD0yCVTA.js");
21978
22011
  const local = await invokeCustomResourceFunctionLocally({
21979
22012
  lambda: this.lambdaClient,
21980
22013
  s3: this.s3Client
@@ -22455,21 +22488,6 @@ var CustomResourceProvider = class CustomResourceProvider {
22455
22488
  }
22456
22489
  };
22457
22490
 
22458
- // src/provisioning/sticky-exempt-physical-id.ts
22459
- const ECS_SERVICE_CC_ID = /^(arn:aws[-a-z]*:ecs:[a-z0-9-]+:\d{12}:service\/([A-Za-z0-9_-]+)(?:\/([A-Za-z0-9_-]+))?)\|([^|\s]+)$/;
22460
- const CLUSTER_ARN = /^arn:aws[-a-z]*:ecs:[a-z0-9-]+:\d{12}:cluster\/([A-Za-z0-9_-]+)$/;
22461
- const CLUSTER_NAME = /^[A-Za-z0-9_-]+$/;
22462
- function ecsServiceSdkPhysicalId(ccPhysicalId) {
22463
- const match = ECS_SERVICE_CC_ID.exec(ccPhysicalId);
22464
- if (match === null) throw new Error("its recorded physical id is not the `<serviceArn>|<cluster>` form Cloud Control records for AWS::ECS::Service");
22465
- const [, serviceArn, first, second, clusterSegment] = match;
22466
- const clusterArn = CLUSTER_ARN.exec(clusterSegment);
22467
- if (clusterArn === null && !CLUSTER_NAME.test(clusterSegment)) throw new Error("the cluster segment of its recorded physical id is neither a cluster name nor a cluster ARN");
22468
- const clusterName = clusterArn === null ? clusterSegment : clusterArn[1];
22469
- if (second !== void 0 && first !== clusterName) throw new Error("its recorded physical id names one cluster in the service ARN and another after the `|`");
22470
- return serviceArn;
22471
- }
22472
-
22473
22491
  // src/provisioning/provider-registry/routing.ts
22474
22492
  function getProviderFor(input) {
22475
22493
  const debug = (message) => {
@@ -24460,7 +24478,22 @@ function findAutoRouteHits(resources) {
24460
24478
  return hits;
24461
24479
  }
24462
24480
 
24463
- // src/provisioning/provider-registry.ts
24481
+ // src/provisioning/sticky-exempt-physical-id.ts
24482
+ const ECS_SERVICE_CC_ID = /^(arn:aws[-a-z]*:ecs:[a-z0-9-]+:\d{12}:service\/([A-Za-z0-9_-]+)(?:\/([A-Za-z0-9_-]+))?)\|([^|\s]+)$/;
24483
+ const CLUSTER_ARN = /^arn:aws[-a-z]*:ecs:[a-z0-9-]+:\d{12}:cluster\/([A-Za-z0-9_-]+)$/;
24484
+ const CLUSTER_NAME = /^[A-Za-z0-9_-]+$/;
24485
+ function ecsServiceSdkPhysicalId(ccPhysicalId) {
24486
+ const match = ECS_SERVICE_CC_ID.exec(ccPhysicalId);
24487
+ if (match === null) throw new Error("its recorded physical id is not the `<serviceArn>|<cluster>` form Cloud Control records for AWS::ECS::Service");
24488
+ const [, serviceArn, first, second, clusterSegment] = match;
24489
+ const clusterArn = CLUSTER_ARN.exec(clusterSegment);
24490
+ if (clusterArn === null && !CLUSTER_NAME.test(clusterSegment)) throw new Error("the cluster segment of its recorded physical id is neither a cluster name nor a cluster ARN");
24491
+ const clusterName = clusterArn === null ? clusterSegment : clusterArn[1];
24492
+ if (second !== void 0 && first !== clusterName) throw new Error("its recorded physical id names one cluster in the service ARN and another after the `|`");
24493
+ return serviceArn;
24494
+ }
24495
+
24496
+ // src/provisioning/provider-registry/sticky-exempt.ts
24464
24497
  const STICKY_CC_MIGRATION_EXEMPT = /* @__PURE__ */ new Map([
24465
24498
  ["AWS::Scheduler::Schedule", {
24466
24499
  mode: "cc-broken",
@@ -24546,8 +24579,136 @@ const STICKY_CC_MIGRATION_EXEMPT = /* @__PURE__ */ new Map([
24546
24579
  physicalIdForm: "both layers store the bare REST API id: the schema primaryIdentifier is RestApiId and ApiGatewayProvider.create records the CreateRestApi id (observed equal on a live API by the fixture)",
24547
24580
  issue: "https://github.com/go-to-k/cdkd/issues/6141",
24548
24581
  integFixture: "cc-to-sdk-reroute-rest-api"
24582
+ }],
24583
+ ["AWS::EC2::SecurityGroup", {
24584
+ mode: "sdk-coverage",
24585
+ physicalIdForm: "both layers store the bare `sg-...` group id: the schema primaryIdentifier is Id and EC2Provider.create records the CreateSecurityGroup GroupId",
24586
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24587
+ integFixture: "cc-to-sdk-reroute-common-types"
24588
+ }],
24589
+ ["AWS::EC2::RouteTable", {
24590
+ mode: "sdk-coverage",
24591
+ physicalIdForm: "both layers store the bare `rtb-...` id: the schema primaryIdentifier is RouteTableId and EC2Provider.create records the CreateRouteTable RouteTableId",
24592
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24593
+ integFixture: "cc-to-sdk-reroute-common-types"
24594
+ }],
24595
+ ["AWS::ElasticLoadBalancingV2::TargetGroup", {
24596
+ mode: "sdk-coverage",
24597
+ physicalIdForm: "both layers store the target group ARN: the schema primaryIdentifier is TargetGroupArn and ELBv2Provider.create records the CreateTargetGroup TargetGroupArn",
24598
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24599
+ integFixture: "cc-to-sdk-reroute-common-types"
24600
+ }],
24601
+ ["AWS::KMS::Key", {
24602
+ mode: "sdk-coverage",
24603
+ physicalIdForm: "both layers store the bare key id, not the key ARN (observed as a UUID; a multi-region `mrk-...` id was not exercised): the schema primaryIdentifier is KeyId and the KMS provider records the CreateKey KeyId",
24604
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24605
+ integFixture: "cc-to-sdk-reroute-common-types"
24606
+ }],
24607
+ ["AWS::SecretsManager::Secret", {
24608
+ mode: "sdk-coverage",
24609
+ physicalIdForm: "both layers store the secret ARN, random suffix included: the schema primaryIdentifier is Id (the ARN) and SecretsManagerSecretProvider.create records the CreateSecret ARN",
24610
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24611
+ integFixture: "cc-to-sdk-reroute-common-types"
24612
+ }],
24613
+ ["AWS::Lambda::EventSourceMapping", {
24614
+ mode: "sdk-coverage",
24615
+ physicalIdForm: "both layers store the mapping UUID: the schema primaryIdentifier is Id and LambdaEventSourceMappingProvider.create records the CreateEventSourceMapping UUID",
24616
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24617
+ integFixture: "cc-to-sdk-reroute-common-types"
24618
+ }],
24619
+ ["AWS::IAM::Role", {
24620
+ mode: "sdk-coverage",
24621
+ physicalIdForm: "both layers store the bare role name: the schema primaryIdentifier is RoleName and IAMRoleProvider.create records the name it created the role under",
24622
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24623
+ integFixture: "cc-to-sdk-reroute-common-types"
24624
+ }],
24625
+ ["AWS::IAM::ManagedPolicy", {
24626
+ mode: "sdk-coverage",
24627
+ physicalIdForm: "both layers store the policy ARN: the schema primaryIdentifier is PolicyArn and IAMManagedPolicyProvider.create records the CreatePolicy Arn",
24628
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24629
+ integFixture: "cc-to-sdk-reroute-common-types"
24630
+ }],
24631
+ ["AWS::SQS::Queue", {
24632
+ mode: "sdk-coverage",
24633
+ physicalIdForm: "both layers store the queue URL: the schema primaryIdentifier is QueueUrl and SQSQueueProvider.create records the CreateQueue QueueUrl",
24634
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24635
+ integFixture: "cc-to-sdk-reroute-common-types"
24636
+ }],
24637
+ ["AWS::SSM::Parameter", {
24638
+ mode: "sdk-coverage",
24639
+ physicalIdForm: "both layers store the bare parameter name: the schema primaryIdentifier is Name and SSMParameterProvider.create records the name it put the parameter under",
24640
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24641
+ integFixture: "cc-to-sdk-reroute-common-types"
24642
+ }],
24643
+ ["AWS::EC2::VPC", {
24644
+ mode: "sdk-coverage",
24645
+ physicalIdForm: "both layers store the bare `vpc-...` id: the schema primaryIdentifier is VpcId and EC2Provider.create records the CreateVpc VpcId",
24646
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24647
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24648
+ }],
24649
+ ["AWS::EC2::InternetGateway", {
24650
+ mode: "sdk-coverage",
24651
+ physicalIdForm: "both layers store the bare `igw-...` id: the schema primaryIdentifier is InternetGatewayId and EC2Provider.create records the CreateInternetGateway id",
24652
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24653
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24654
+ }],
24655
+ ["AWS::EC2::NetworkAcl", {
24656
+ mode: "sdk-coverage",
24657
+ physicalIdForm: "both layers store the bare `acl-...` id: the schema primaryIdentifier is Id and EC2Provider.create records the CreateNetworkAcl NetworkAclId",
24658
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24659
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24660
+ }],
24661
+ ["AWS::IAM::User", {
24662
+ mode: "sdk-coverage",
24663
+ physicalIdForm: "both layers store the bare user name: the schema primaryIdentifier is UserName and the IAM user provider records the name it created the user under",
24664
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24665
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24666
+ }],
24667
+ ["AWS::IAM::Group", {
24668
+ mode: "sdk-coverage",
24669
+ physicalIdForm: "both layers store the bare group name: the schema primaryIdentifier is GroupName and the IAM group provider records the name it created the group under",
24670
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24671
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24672
+ }],
24673
+ ["AWS::IAM::InstanceProfile", {
24674
+ mode: "sdk-coverage",
24675
+ physicalIdForm: "both layers store the bare instance profile name: the schema primaryIdentifier is InstanceProfileName and IAMInstanceProfileProvider.create records that name",
24676
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24677
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24678
+ }],
24679
+ ["AWS::StepFunctions::StateMachine", {
24680
+ mode: "sdk-coverage",
24681
+ physicalIdForm: "both layers store the state machine ARN: the schema primaryIdentifier is Arn and StepFunctionsProvider.create records the CreateStateMachine stateMachineArn",
24682
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24683
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24684
+ }],
24685
+ ["AWS::Lambda::Url", {
24686
+ mode: "sdk-coverage",
24687
+ physicalIdForm: "both layers store the function ARN the URL is on, alias-qualified when Qualifier is set: the schema primaryIdentifier is FunctionArn and LambdaUrlProvider.create records the CreateFunctionUrlConfig FunctionArn (the fixture observed both the unqualified and the qualified form)",
24688
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24689
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24690
+ }],
24691
+ ["AWS::Cognito::UserPool", {
24692
+ mode: "sdk-coverage",
24693
+ physicalIdForm: "both layers store the bare `<region>_...` pool id: the schema primaryIdentifier is UserPoolId and CognitoUserPoolProvider.create records the CreateUserPool Id",
24694
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24695
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24696
+ }],
24697
+ ["AWS::CloudFront::OriginAccessControl", {
24698
+ mode: "sdk-coverage",
24699
+ physicalIdForm: "both layers store the bare origin access control id: the schema primaryIdentifier is Id and CloudFrontOACProvider.create records the CreateOriginAccessControl Id",
24700
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24701
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24702
+ }],
24703
+ ["AWS::KMS::Alias", {
24704
+ mode: "sdk-coverage",
24705
+ physicalIdForm: "both layers store the `alias/...` name: the schema primaryIdentifier is AliasName and the KMS alias provider records the name it created the alias under",
24706
+ issue: "https://github.com/go-to-k/cdkd/issues/6454",
24707
+ integFixture: "cc-to-sdk-reroute-common-types-2"
24549
24708
  }]
24550
24709
  ]);
24710
+
24711
+ // src/provisioning/provider-registry.ts
24551
24712
  function sdkAddressedPhysicalId(resourceType, physicalId, logicalId) {
24552
24713
  const entry = STICKY_CC_MIGRATION_EXEMPT.get(resourceType);
24553
24714
  const normalize = entry?.normalizeCcPhysicalId;
@@ -25493,7 +25654,7 @@ async function ccRoutedInstanceTakesNoSnapshot(input) {
25493
25654
  if (resourceType !== "AWS::RDS::DBInstance") return false;
25494
25655
  if (region === void 0 || region === "") return false;
25495
25656
  const mask = input.mask ?? ((text) => text);
25496
- const { describeDBInstanceInRegion, isLiveReadReplica } = await import("./read-replica-CaWHwB3m.js").then((n) => n.l);
25657
+ const { describeDBInstanceInRegion, isLiveReadReplica } = await import("./read-replica-Dx5O9bW4.js").then((n) => n.l);
25497
25658
  let reason;
25498
25659
  try {
25499
25660
  const live = await describeDBInstanceInRegion(physicalId, region);
@@ -27402,6 +27563,9 @@ function isSupersededResourceRecord(row) {
27402
27563
  const { physicalId, resourceType, properties } = record;
27403
27564
  return typeof physicalId === "string" && physicalId !== "" && typeof resourceType === "string" && resourceType !== "" && typeof properties === "object" && properties !== null && !Array.isArray(properties);
27404
27565
  }
27566
+ function isSupersededHeld(entry, resources) {
27567
+ return supersededHolderOf(entry, resources) !== void 0;
27568
+ }
27405
27569
  function supersededHolderOf(entry, resources) {
27406
27570
  const holders = Object.values(resources).filter((record) => typeof record === "object" && record !== null && record.physicalId === entry.state.physicalId);
27407
27571
  return holders.find((record) => record.resourceType === entry.state.resourceType) ?? holders[0];
@@ -27864,9 +28028,9 @@ async function retryDeferredReplacedDeletes(run, deps, stackName, counts) {
27864
28028
  function warnUnretriedReplacedDeletes(run, deps, why) {
27865
28029
  const deferred = run.deferredReplacedDeletes;
27866
28030
  run.deferredReplacedDeletes = void 0;
27867
- const cause = why === "failed" ? "the deploy failed first" : "the deploy was interrupted";
28031
+ const cause = why === "failed" ? "the deploy failed first" : why === "interrupted" ? "the deploy was interrupted" : "its nested stack's cleanup could not run";
27868
28032
  const noteFor = (logicalId) => run.supersededEntries.has(logicalId) ? `not retried: ${cause}; cdkd keeps it in state, and the next deploy retries the delete` : `not retried: ${cause}; it is no longer tracked in state, so delete it manually`;
27869
- for (const [logicalId, entry] of deferred ?? []) withPrintingSecrets(secretNameBagFor(deps.secretsRun(), logicalId), () => entry.cleanupPhase === true ? deps.logger.info(safeMsg` Old ${logicalId} (${entry.physicalId}) was not deleted: ${cause}. A rollback of the deploy adopts it again; otherwise ${run.supersededEntries.has(logicalId) ? "cdkd keeps it in state, and the next deploy deletes it" : "it is no longer tracked in state, so delete it manually"}`) : deps.logger.warn(entry.failureMessage === void 0 ? safeMsg` ⚠ The old physical id of ${logicalId} (${entry.physicalId}) was not sent its Delete: ${cause}. A rollback sends the new id an Update with the old properties, and this id is tracked again if the handler answers it; otherwise ${run.supersededEntries.has(logicalId) ? "cdkd keeps it in state, and the next deploy sends the Delete" : "it is no longer tracked in state, so delete it manually"}` : safeMsg` ⚠ Failed to delete old resource ${logicalId} (${entry.physicalId}): ${entry.failureMessage} (${noteFor(logicalId)})`));
28033
+ for (const [logicalId, entry] of deferred ?? []) withPrintingSecrets(secretNameBagFor(deps.secretsRun(), logicalId), () => why === "cleanup-failed" && entry.failureMessage === void 0 ? deps.logger.warn(safeMsg` ⚠ Old ${logicalId} (${entry.physicalId}) was not deleted: ${cause}. ${run.supersededEntries.has(logicalId) ? "cdkd keeps it in state, and the next deploy deletes it" : "It is no longer tracked in state, so delete it manually"}`) : entry.cleanupPhase === true ? deps.logger.info(safeMsg` Old ${logicalId} (${entry.physicalId}) was not deleted: ${cause}. A rollback of the deploy adopts it again; otherwise ${run.supersededEntries.has(logicalId) ? "cdkd keeps it in state, and the next deploy deletes it" : "it is no longer tracked in state, so delete it manually"}`) : deps.logger.warn(entry.failureMessage === void 0 ? safeMsg` ⚠ The old physical id of ${logicalId} (${entry.physicalId}) was not sent its Delete: ${cause}. A rollback sends the new id an Update with the old properties, and this id is tracked again if the handler answers it; otherwise ${run.supersededEntries.has(logicalId) ? "cdkd keeps it in state, and the next deploy sends the Delete" : "it is no longer tracked in state, so delete it manually"}` : safeMsg` ⚠ Failed to delete old resource ${logicalId} (${entry.physicalId}): ${entry.failureMessage} (${noteFor(logicalId)})`));
27870
28034
  }
27871
28035
 
27872
28036
  // src/deployment/masking-retry-logger.ts
@@ -30045,7 +30209,7 @@ function someStringLeaf(value, test, depth = 0) {
30045
30209
  // src/deployment/rollback-executor/plan.ts
30046
30210
  function planRollback(operations, stateResources, orphanLogicalIds = /* @__PURE__ */ new Set()) {
30047
30211
  const { createOps, otherOps } = partitionOps(operations);
30048
- return [...[...otherOps].reverse(), ...sortRollbackCreates(createOps, stateResources)].map((op) => {
30212
+ return [...orderDeleteFirstAfterDependencies([...otherOps].reverse(), stateResources, orphanLogicalIds), ...sortRollbackCreates(createOps, stateResources)].map((op) => {
30049
30213
  const action = classifyRollbackOp(op, stateResources, orphanLogicalIds);
30050
30214
  return {
30051
30215
  op,
@@ -30080,6 +30244,30 @@ function revertReferences(op, stateResources) {
30080
30244
  }
30081
30245
  return refs;
30082
30246
  }
30247
+ function orderDeleteFirstAfterDependencies(ops, stateResources, orphanLogicalIds = /* @__PURE__ */ new Set()) {
30248
+ const out = [...ops];
30249
+ const renamed = new Set(ops.filter((op) => renamedReverseReplacement(op, stateResources, orphanLogicalIds)).map((op) => op.logicalId));
30250
+ for (let pass = 0; pass < out.length; pass++) {
30251
+ let moved = false;
30252
+ for (const op of [...out].reverse()) {
30253
+ if (op.changeType !== "UPDATE" || op.oldDeletedBeforeCreate !== true) continue;
30254
+ const deps = new Set((Array.isArray(op.previousState?.dependencies) ? op.previousState.dependencies : []).filter((id) => typeof id === "string" && id !== op.logicalId && !renamed.has(id)));
30255
+ if (deps.size === 0) continue;
30256
+ const from = out.indexOf(op);
30257
+ let last = -1;
30258
+ out.forEach((other, at) => {
30259
+ if (other !== op && deps.has(other.logicalId)) last = at;
30260
+ });
30261
+ if (last <= from) continue;
30262
+ if (out.slice(from + 1, last + 1).some((other) => isStandaloneInlinePolicyType(other.resourceType) || revertReferences(other, stateResources).has(op.logicalId))) continue;
30263
+ out.splice(from, 1);
30264
+ out.splice(last, 0, op);
30265
+ moved = true;
30266
+ }
30267
+ if (!moved) break;
30268
+ }
30269
+ return out;
30270
+ }
30083
30271
  function partitionOps(operations) {
30084
30272
  const createOps = [];
30085
30273
  const otherOps = [];
@@ -32105,7 +32293,7 @@ async function replayRollbackUnbound(operations, stateResources, stackName, ctx,
32105
32293
  markDeleteFirstBlocked(operations, options.failedOperations);
32106
32294
  const { createOps, otherOps } = partitionOps(operations);
32107
32295
  const createdInSegment = new Set(createOps.map((o) => o.logicalId));
32108
- const stepOne = orderInlinePolicyReversals([...otherOps].reverse(), stateResources);
32296
+ const stepOne = orderDeleteFirstAfterDependencies(orderInlinePolicyReversals([...otherOps].reverse(), stateResources), stateResources, orphanLogicalIds);
32109
32297
  const stepOneIds = /* @__PURE__ */ new Map();
32110
32298
  const stepOneIndex = /* @__PURE__ */ new Map();
32111
32299
  stepOne.forEach((op, at) => {
@@ -34777,7 +34965,7 @@ function makeSiblingClaimReader(params) {
34777
34965
  if (ref.stackName === selfStackName && ref.region === selfRegion) continue;
34778
34966
  if (ref.region === void 0) continue;
34779
34967
  try {
34780
- const sibling = await stateBackend.getState(ref.stackName, ref.region);
34968
+ const sibling = await stateBackend.getState(ref.stackName, ref.region, { readOnly: true });
34781
34969
  if (!sibling) continue;
34782
34970
  const bag = sibling.state.resources;
34783
34971
  if (typeof bag !== "object" || bag === null) {
@@ -34996,7 +35184,7 @@ function makeForeignHolderScan(stateBackend) {
34996
35184
  const region = ref.region;
34997
35185
  let state;
34998
35186
  try {
34999
- state = (await stateBackend.getState(ref.stackName, region))?.state;
35187
+ state = (await stateBackend.getState(ref.stackName, region, { readOnly: true }))?.state;
35000
35188
  } catch {
35001
35189
  unreadable ??= named("it could not be read");
35002
35190
  return;
@@ -38272,6 +38460,47 @@ Drop the record with: ${dropCommand}`);
38272
38460
  deps.logger.info(safeMsg`${deletePrefix}${formatResourceLine("deleted", logicalId, resourceType)}`);
38273
38461
  }
38274
38462
 
38463
+ // src/deployment/nested-cleanup-scope.ts
38464
+ var NestedCleanupQueue = class {
38465
+ entries = [];
38466
+ open = true;
38467
+ enqueue(entry) {
38468
+ if (!this.open) return false;
38469
+ this.entries.push(entry);
38470
+ return true;
38471
+ }
38472
+ async runAll(context, logger) {
38473
+ this.open = false;
38474
+ let updatePartial = 0;
38475
+ for (let entry = this.entries.shift(); entry !== void 0; entry = this.entries.shift()) {
38476
+ if (context.interrupted()) {
38477
+ entry.abandon("interrupted");
38478
+ for (const rest of this.entries.splice(0)) rest.abandon("interrupted");
38479
+ break;
38480
+ }
38481
+ logger.info(safeMsg`Deleting the replaced resources of nested stack ${displayStackName(entry.stackName)}`);
38482
+ try {
38483
+ updatePartial += (await entry.run(context)).updatePartial;
38484
+ } catch (error) {
38485
+ logger.warn(safeMsg` ⚠ The cleanup of nested stack ${displayStackName(entry.stackName)} failed: ${asIsMessage(describeAwsFailure(error).summary)}. Its old resources were not deleted`);
38486
+ updatePartial += entry.fail().updatePartial;
38487
+ }
38488
+ }
38489
+ return { updatePartial };
38490
+ }
38491
+ abandon(why) {
38492
+ this.open = false;
38493
+ for (const entry of this.entries.splice(0)) entry.abandon(why);
38494
+ }
38495
+ };
38496
+ const nestedCleanupStore = new AsyncLocalStorage();
38497
+ function withNestedCleanupQueue(queue, fn) {
38498
+ return nestedCleanupStore.run(queue, fn);
38499
+ }
38500
+ function getNestedCleanupQueue() {
38501
+ return nestedCleanupStore.getStore();
38502
+ }
38503
+
38275
38504
  // src/deployment/deploy-engine/superseded-retry.ts
38276
38505
  async function retryCarriedSupersededResources(engine, host, carried, resources, options = {}) {
38277
38506
  let changed = false;
@@ -38334,6 +38563,141 @@ async function retryCarriedSupersededResources(engine, host, carried, resources,
38334
38563
  return changed;
38335
38564
  }
38336
38565
 
38566
+ // src/deployment/deploy-engine/nested-cleanup.ts
38567
+ async function runCleanupPhase(engine, { stackName, counts, completedOperations, host, carried, resources, releasedSomething }) {
38568
+ try {
38569
+ await retryDeferredReplacedDeletes(engine.replacementRun, engine.replacementDeps(), stackName, counts);
38570
+ } finally {
38571
+ for (const op of completedOperations) {
38572
+ if (op.changeType !== "UPDATE") continue;
38573
+ const verdict = engine.replacementRun.replacedOldMaySurvive.get(op.logicalId);
38574
+ if (verdict !== void 0) op.oldResourceMaySurvive = verdict;
38575
+ else delete op.oldResourceMaySurvive;
38576
+ }
38577
+ }
38578
+ await retryCarriedSupersededResources(engine, host, carried, resources, { waitInUse: releasedSomething });
38579
+ }
38580
+ function queueNestedCleanup(engine, stackName, host, pass) {
38581
+ if (engine.options.parentStackInfo === void 0) return false;
38582
+ if ((engine.replacementRun.deferredReplacedDeletes?.size ?? 0) === 0 && supersededResourcesOf(host).length === 0) return false;
38583
+ const queue = getNestedCleanupQueue();
38584
+ if (queue === void 0) return false;
38585
+ return queue.enqueue({
38586
+ stackName,
38587
+ run: (context) => runQueuedNestedCleanup(engine, stackName, host, pass, context),
38588
+ abandon: (why) => warnUnretriedReplacedDeletes(engine.replacementRun, engine.replacementDeps(), why),
38589
+ fail: () => passCouldNotRun(engine)
38590
+ });
38591
+ }
38592
+ function passCouldNotRun(engine) {
38593
+ const left = engine.replacementRun.deferredReplacedDeletes?.size ?? 0;
38594
+ warnUnretriedReplacedDeletes(engine.replacementRun, engine.replacementDeps(), "cleanup-failed");
38595
+ return { updatePartial: left };
38596
+ }
38597
+ async function runQueuedNestedCleanup(engine, stackName, host, pass, context) {
38598
+ const region = engine.stackRegion;
38599
+ const display = displayStackName(stackName);
38600
+ const onSigint = () => {
38601
+ engine.interrupted = true;
38602
+ engine.interruptCause ??= "user";
38603
+ engine.userInterrupted = true;
38604
+ };
38605
+ if (context.interrupted()) onSigint();
38606
+ process.on("SIGINT", onSigint);
38607
+ try {
38608
+ try {
38609
+ await engine.lockManager.acquireLockWithRetry(stackName, region, void 0, "deploy");
38610
+ } catch (error) {
38611
+ engine.logger.warn(safeMsg` ⚠ Could not lock nested stack ${display} to delete its replaced resources: ${asIsMessage(describeAwsFailure(error).summary)}`);
38612
+ return passCouldNotRun(engine);
38613
+ }
38614
+ try {
38615
+ let fresh;
38616
+ try {
38617
+ fresh = await engine.stateBackend.getState(stackName, region);
38618
+ } catch (error) {
38619
+ engine.logger.warn(safeMsg` ⚠ Could not read the state of nested stack ${display} to delete its replaced resources: ${asIsMessage(describeAwsFailure(error).summary)}`);
38620
+ return passCouldNotRun(engine);
38621
+ }
38622
+ if (fresh === null || fresh === void 0) {
38623
+ engine.logger.warn(safeMsg` ⚠ Nested stack ${display} has no state record any more: its replaced resources were not deleted`);
38624
+ return passCouldNotRun(engine);
38625
+ }
38626
+ const read = fresh;
38627
+ const persisted = supersededResourcesOf(fresh.state);
38628
+ const stillOwed = (entry) => persisted.some((row) => sameSuperseded(row, entry)) && !isSupersededHeld(entry, read.state.resources);
38629
+ const run = engine.replacementRun;
38630
+ for (const [logicalId] of run.deferredReplacedDeletes ?? []) {
38631
+ const recorded = run.supersededEntries.get(logicalId);
38632
+ if (recorded !== void 0 && !stillOwed(recorded)) {
38633
+ run.deferredReplacedDeletes?.delete(logicalId);
38634
+ engine.logger.debug(safeMsg`Old ${logicalId} of nested stack ${display} is no longer awaiting its delete; not deleting it`);
38635
+ }
38636
+ }
38637
+ const before = supersededResourcesOf(host);
38638
+ const counts = {
38639
+ updated: 0,
38640
+ updatePartial: 0
38641
+ };
38642
+ await pass(stillOwed, counts);
38643
+ const remaining = new Set(Array.isArray(host.supersededResources) ? host.supersededResources : []);
38644
+ const dropped = before.filter((entry) => !remaining.has(entry));
38645
+ const unrecorded = dropped.length > 0 ? await persistDropped(engine, stackName, read, dropped) : 0;
38646
+ return { updatePartial: counts.updatePartial + unrecorded };
38647
+ } finally {
38648
+ try {
38649
+ await engine.lockManager.releaseLock(stackName, region);
38650
+ } catch (error) {
38651
+ engine.logger.warn(safeMsg`Failed to release the lock of nested stack ${display}: ${asIsMessage(describeAwsFailure(error).detail)}`);
38652
+ }
38653
+ }
38654
+ } finally {
38655
+ process.removeListener("SIGINT", onSigint);
38656
+ }
38657
+ }
38658
+ function sameSuperseded(row, entry) {
38659
+ return row.logicalId === entry.logicalId && row.state.physicalId === entry.state.physicalId && row.state.resourceType === entry.state.resourceType;
38660
+ }
38661
+ const PERSIST_DROPPED_ATTEMPTS = 4;
38662
+ async function persistDropped(engine, stackName, fresh, dropped) {
38663
+ const region = engine.stackRegion;
38664
+ let current = fresh;
38665
+ for (let attempt = 1;; attempt++) {
38666
+ const rows = current.state.supersededResources;
38667
+ if (!Array.isArray(rows)) return 0;
38668
+ const kept = rows.filter((row) => !isSupersededResourceRecord(row) || !dropped.some((entry) => sameSuperseded(row, entry)));
38669
+ if (kept.length === rows.length) return 0;
38670
+ const { supersededResources: _rows, ...rest } = current.state;
38671
+ const next = {
38672
+ ...rest,
38673
+ ...stackInstanceIdCarriedFrom(rest),
38674
+ ...kept.length > 0 && { supersededResources: kept },
38675
+ lastModified: Date.now()
38676
+ };
38677
+ let failure;
38678
+ try {
38679
+ await engine.stateBackend.saveState(stackName, region, engine.withParentInfo(next), { expectedEtag: current.etag });
38680
+ return 0;
38681
+ } catch (error) {
38682
+ failure = error;
38683
+ }
38684
+ const again = attempt < 4 && isEtagConflict(failure) ? await engine.stateBackend.getState(stackName, region).catch(() => null) : null;
38685
+ if (again === null || again === void 0) {
38686
+ const ids = dropped.map((entry) => `${entry.logicalId} (${entry.state.physicalId})`).join(", ");
38687
+ engine.logger.warn(safeMsg` ⚠ Could not record in the state of nested stack ${displayStackName(stackName)} (region ${region}) that these replaced resources were deleted: ${ids}: ${asIsMessage(describeAwsFailure(failure).summary)}. They stay listed there, and its next deploy sends their deletes again`);
38688
+ return dropped.length;
38689
+ }
38690
+ current = again;
38691
+ }
38692
+ }
38693
+ function isEtagConflict(error) {
38694
+ for (let link = error, depth = 0; link !== void 0 && link !== null && depth < 5; depth++) {
38695
+ if (isConditionFailure(link)) return true;
38696
+ link = link.cause;
38697
+ }
38698
+ return false;
38699
+ }
38700
+
38337
38701
  // src/provisioning/changed-properties-consumers.ts
38338
38702
  const CHANGED_PROPERTIES_CONSUMER_TYPES = /* @__PURE__ */ new Set(["AWS::ServiceDiscovery::Service"]);
38339
38703
 
@@ -46574,6 +46938,31 @@ function unsettledMarkSinks(engine, logicalId, resolvedProps, currentResource) {
46574
46938
  };
46575
46939
  }
46576
46940
 
46941
+ // src/deployment/deploy-engine/update-policy.ts
46942
+ const HONORED_UPDATE_POLICIES = { "AWS::AutoScaling::AutoScalingGroup": [{
46943
+ key: "AutoScalingScheduledAction",
46944
+ asksForIt: ignoresUnmodifiedGroupSize
46945
+ }] };
46946
+ function honoredKeysPresent(resourceType, updatePolicy) {
46947
+ return (HONORED_UPDATE_POLICIES[resourceType] ?? []).filter((entry) => entry.asksForIt(updatePolicy)).map((entry) => entry.key);
46948
+ }
46949
+ function updatePolicyContext(updatePolicyOption, logger, logicalId, resourceType, resource, provisionedBy) {
46950
+ const updatePolicy = resource?.UpdatePolicy;
46951
+ if (typeof updatePolicy !== "object" || updatePolicy === null) return {};
46952
+ if (updatePolicyOption === false) return {};
46953
+ const keys = honoredKeysPresent(resourceType, updatePolicy);
46954
+ if (updatePolicyOption === true) {
46955
+ if (provisionedBy !== "sdk" && keys.length > 0) logger.warn(safeMsg`${logicalId}: UpdatePolicy ${keys.join(", ")} is not applied by cdkd on the Cloud Control route this update takes.`);
46956
+ return { updatePolicy };
46957
+ }
46958
+ if (provisionedBy === "sdk" && keys.length > 0) logger.info(safeMsg`${logicalId}: UpdatePolicy ${keys.join(", ")} is skipped by default; pass --update-policy to honor it.`);
46959
+ return {};
46960
+ }
46961
+ function warnUnhonoredCreationPolicy(logger, logicalId, resource) {
46962
+ if (resource?.CreationPolicy === void 0) return;
46963
+ logger.warn(safeMsg`${logicalId}: CreationPolicy is not honored; cdkd does not wait for cfn-signal success signals.`);
46964
+ }
46965
+
46577
46966
  // src/deployment/deploy-engine/replacement/cleanup-old-id.ts
46578
46967
  async function deleteOldIdAfterDeploy(run, deps, input) {
46579
46968
  const { logicalId, oldResource } = input;
@@ -46903,6 +47292,7 @@ async function updateInPlace(engine, { changedProperties, noEchoOnlyChangedPrope
46903
47292
  let replacedAtGeneration;
46904
47293
  const inlinePolicyClaimed = engine.inlinePolicyClaimedFor(resourceType, logicalId, stateResources);
46905
47294
  const typedPayloadLeaves = customResourcePayloadLeaves(resourceType, template?.Resources?.[logicalId]?.Properties, resolvedProps, template, conditions, stateResources);
47295
+ const updatePolicy = updatePolicyContext(engine.options.updatePolicy, engine.logger, logicalId, resourceType, template?.Resources?.[logicalId], updateDecision.provisionedBy);
46906
47296
  try {
46907
47297
  result = await engine.withRetry(() => withCurrentResourceSecrets(updateSecrets, () => updateProvider.update(logicalId, currentResource.physicalId, resourceType, removal.properties, previousSettled, {
46908
47298
  maskSecrets: createSecretMasker(updateSecrets),
@@ -46919,7 +47309,8 @@ async function updateInPlace(engine, { changedProperties, noEchoOnlyChangedPrope
46919
47309
  ...noEchoUpdateContext(engine, logicalId, noEchoOnlyForProvider, changedForProvider),
46920
47310
  ...unsettledMarkSinks(engine, logicalId, resolvedProps, currentResource),
46921
47311
  ...unsettled.size > 0 && { unsettledProperties: unsettled },
46922
- ...unsettledItems.size > 0 && { unsettledItems }
47312
+ ...unsettledItems.size > 0 && { unsettledItems },
47313
+ ...updatePolicy
46923
47314
  })), logicalId, void 0, void 0, updateProvider);
46924
47315
  if (result.sentNothing === true) engine.replacementRun.updatesThatSentNothing.add(logicalId);
46925
47316
  engine.unsettledMarks.delete(logicalId);
@@ -46957,6 +47348,7 @@ async function updateInPlace(engine, { changedProperties, noEchoOnlyChangedPrope
46957
47348
  logicalId,
46958
47349
  generation: fallbackGeneration
46959
47350
  }, replaceFallback));
47351
+ warnUnhonoredCreationPolicy(engine.logger, logicalId, template?.Resources?.[logicalId]);
46960
47352
  engine.unsettledMarks.delete(logicalId);
46961
47353
  engine.unsettledItemMarks.delete(logicalId);
46962
47354
  result = fallbackOutcome.result;
@@ -47252,10 +47644,12 @@ async function finishUpdate(engine, input) {
47252
47644
  lostWithParent,
47253
47645
  nameGenerationFields
47254
47646
  });
47255
- return markRestored(await (nextGeneration === void 0 ? replace() : withNameGeneration({
47647
+ const replaced = await (nextGeneration === void 0 ? replace() : withNameGeneration({
47256
47648
  logicalId,
47257
47649
  generation: nextGeneration
47258
- }, replace)));
47650
+ }, replace));
47651
+ warnUnhonoredCreationPolicy(engine.logger, logicalId, template?.Resources?.[logicalId]);
47652
+ return markRestored(replaced);
47259
47653
  }
47260
47654
  const serviceTokenRefusal = serviceTokenUpdateRefusal({
47261
47655
  logicalId,
@@ -47809,7 +48203,10 @@ async function provisionResourceBody(engine, logicalId, change, stateResources,
47809
48203
  if (change.changeType === "CREATE" || change.changeType === "UPDATE") await awaitNoEchoMacsFor(engine, logicalId, stateResources, template, conditions);
47810
48204
  return withStackRecords(engine.stackRecordsView, () => {
47811
48205
  switch (change.changeType) {
47812
- case "CREATE": return withPriorAttempts(priorAttempts, () => provisionCreate(engine, logicalId, change, stateResources, stackName, template, parameterValues, conditions, counts, progress));
48206
+ case "CREATE": return withPriorAttempts(priorAttempts, () => provisionCreate(engine, logicalId, change, stateResources, stackName, template, parameterValues, conditions, counts, progress)).then((outcome) => {
48207
+ warnUnhonoredCreationPolicy(engine.logger, logicalId, template?.Resources?.[logicalId]);
48208
+ return outcome;
48209
+ });
47813
48210
  case "UPDATE": return withPriorAttempts(priorAttempts, () => provisionUpdate(engine, logicalId, change, stateResources, stackName, template, parameterValues, conditions, counts, progress));
47814
48211
  case "DELETE": return provisionDelete(engine.deleteDeps(), logicalId, change, stateResources, stackName, template, counts, progress);
47815
48212
  }
@@ -48231,8 +48628,14 @@ async function rollbackFailedDeploy(run, error, initialDeploy, currentEtag) {
48231
48628
  }
48232
48629
 
48233
48630
  // src/deployment/deploy-engine/execute.ts
48234
- async function executeDeployment(engine, template, currentState, changes, dag, executionLevels, stackName, outputsDigestSource, parameterValues, conditions, currentEtag, progress, migrationPending = false) {
48631
+ function executeDeployment(...args) {
48632
+ const [engine] = args;
48633
+ if (engine.options.parentStackInfo !== void 0) return executeDeploymentBody(...args);
48634
+ return withNestedCleanupQueue(new NestedCleanupQueue(), () => executeDeploymentBody(...args));
48635
+ }
48636
+ async function executeDeploymentBody(engine, template, currentState, changes, dag, executionLevels, stackName, outputsDigestSource, parameterValues, conditions, currentEtag, progress, migrationPending = false) {
48235
48637
  const concurrency = engine.options.concurrency;
48638
+ const nestedCleanups = engine.options.parentStackInfo === void 0 ? getNestedCleanupQueue() : void 0;
48236
48639
  engine.deployChanges = changes;
48237
48640
  const newResources = { ...currentState.resources };
48238
48641
  engine.deployStateResources = newResources;
@@ -48412,24 +48815,10 @@ async function executeDeployment(engine, template, currentState, changes, dag, e
48412
48815
  }
48413
48816
  if (engine.interrupted && hasPending(deleteExecutor)) throw new InterruptedError(engine.interruptCause ?? "user");
48414
48817
  }
48415
- if (engine.interrupted) warnUnretriedReplacedDeletes(engine.replacementRun, engine.replacementDeps(), "interrupted");
48416
- else {
48417
- try {
48418
- await retryDeferredReplacedDeletes(engine.replacementRun, engine.replacementDeps(), stackName, actualCounts);
48419
- } finally {
48420
- for (const op of completedOperations) {
48421
- if (op.changeType !== "UPDATE") continue;
48422
- const verdict = engine.replacementRun.replacedOldMaySurvive.get(op.logicalId);
48423
- if (verdict !== void 0) op.oldResourceMaySurvive = verdict;
48424
- else delete op.oldResourceMaySurvive;
48425
- }
48426
- }
48427
- const releasedSomething = deleteChanges.size > 0 || completedOperations.some((op) => op.changeType === "UPDATE" && op.previousState !== void 0 && op.physicalId !== void 0 && op.physicalId !== op.previousState.physicalId);
48428
- await retryCarriedSupersededResources(engine, currentState, carriedSuperseded, newResources, { waitInUse: releasedSomething });
48429
- }
48430
48818
  } catch (error) {
48431
48819
  recordUnsettledMarks(engine, newResources);
48432
48820
  warnUnretriedReplacedDeletes(engine.replacementRun, engine.replacementDeps(), engine.interruptCause === "user" ? "interrupted" : "failed");
48821
+ nestedCleanups?.abandon(engine.interruptCause === "user" ? "interrupted" : "failed");
48433
48822
  const initialDeploy = currentEtag === void 0;
48434
48823
  await settleFailedDeployRecords(run);
48435
48824
  pruneStoppedSiblingMembersBestEffort(engine.logger, currentState.resources, newResources, engine.replacementRun, template);
@@ -48468,33 +48857,69 @@ async function executeDeployment(engine, template, currentState, changes, dag, e
48468
48857
  outputs = redactOutputs(engine.maskingDeps(), outputs);
48469
48858
  rememberRecoverableMaskedOutputs(engine.maskingDeps(), stackName, resolvedOutputsBeforeRedaction, outputs);
48470
48859
  } catch (outputError) {
48860
+ warnUnretriedReplacedDeletes(engine.replacementRun, engine.replacementDeps(), "failed");
48861
+ nestedCleanups?.abandon("failed");
48471
48862
  pruneStoppedSiblingMembersBestEffort(engine.logger, currentState.resources, newResources, engine.replacementRun, template);
48472
48863
  await persistStateAfterOutputFailure(engine, stackName, currentState, newResources, currentEtag, pendingMigration);
48473
48864
  await writeRollbackJournalSegment(engine.rollbackDeps(), stackName, completedOperations, failedOperations, "no-rollback-failure", currentEtag === void 0);
48474
48865
  throw outputError;
48475
48866
  }
48867
+ const successState = () => ({
48868
+ version: 17,
48869
+ region: engine.stackRegion,
48870
+ stackName: currentState.stackName,
48871
+ resources: newResources,
48872
+ ...orphansCarriedFrom(currentState),
48873
+ ...stackInstanceIdCarriedFrom(currentState),
48874
+ outputs,
48875
+ exportNames: [...engine.outputsRun.resolvedExportNames],
48876
+ ...engine.outputsRun.skippedOutputs && { skippedOutputs: { ...engine.outputsRun.skippedOutputs } },
48877
+ ...engine.recordedImports.length > 0 && { imports: [...engine.recordedImports] },
48878
+ ...engine.recordedOutputReads.length > 0 && { outputReads: [...engine.recordedOutputReads] },
48879
+ lastModified: Date.now()
48880
+ });
48881
+ if (engine.interrupted) {
48882
+ warnUnretriedReplacedDeletes(engine.replacementRun, engine.replacementDeps(), "interrupted");
48883
+ nestedCleanups?.abandon("interrupted");
48884
+ } else {
48885
+ const releasedSomething = deleteChanges.size > 0 || completedOperations.some((op) => op.changeType === "UPDATE" && op.previousState !== void 0 && op.physicalId !== void 0 && op.physicalId !== op.previousState.physicalId);
48886
+ const cleanup = (carried, counts) => runCleanupPhase(engine, {
48887
+ stackName,
48888
+ counts,
48889
+ completedOperations,
48890
+ host: currentState,
48891
+ carried,
48892
+ resources: newResources,
48893
+ releasedSomething
48894
+ });
48895
+ if (nestedCleanups !== void 0) {
48896
+ const { updatePartial } = await nestedCleanups.runAll({ interrupted: () => engine.interrupted }, engine.logger);
48897
+ actualCounts.updatePartial += updatePartial;
48898
+ actualCounts.nestedUpdatePartial += updatePartial;
48899
+ }
48900
+ if (queueNestedCleanup(engine, stackName, currentState, (stillOwed, counts) => cleanup(carriedSuperseded.filter(stillOwed), counts))) engine.logger.debug(safeMsg`Cleanup of ${stackName} waits for the root stack's deploy to succeed`);
48901
+ else try {
48902
+ await cleanup(carriedSuperseded, actualCounts);
48903
+ } catch (cleanupError) {
48904
+ warnUnretriedReplacedDeletes(engine.replacementRun, engine.replacementDeps(), "failed");
48905
+ await persistStateAfterOutputFailure(engine, stackName, currentState, newResources, currentEtag, pendingMigration, {
48906
+ state: successState,
48907
+ after: "the cleanup phase failed"
48908
+ });
48909
+ await writeRollbackJournalSegment(engine.rollbackDeps(), stackName, completedOperations, failedOperations, "no-rollback-failure", currentEtag === void 0);
48910
+ throw cleanupError;
48911
+ }
48912
+ }
48476
48913
  Object.assign(newResources, withTemplateDependencies(newResources, template, { removalsOnly: engine.options.parentStackInfo !== void 0 }));
48477
48914
  return {
48478
- state: {
48479
- version: 17,
48480
- region: engine.stackRegion,
48481
- stackName: currentState.stackName,
48482
- resources: newResources,
48483
- ...orphansCarriedFrom(currentState),
48484
- ...stackInstanceIdCarriedFrom(currentState),
48485
- outputs,
48486
- exportNames: [...engine.outputsRun.resolvedExportNames],
48487
- ...engine.outputsRun.skippedOutputs && { skippedOutputs: { ...engine.outputsRun.skippedOutputs } },
48488
- ...engine.recordedImports.length > 0 && { imports: [...engine.recordedImports] },
48489
- ...engine.recordedOutputReads.length > 0 && { outputReads: [...engine.recordedOutputReads] },
48490
- lastModified: Date.now()
48491
- },
48915
+ state: successState(),
48492
48916
  actualCounts,
48493
48917
  completedOperations
48494
48918
  };
48495
48919
  }
48496
- async function persistStateAfterOutputFailure(engine, stackName, currentState, newResources, currentEtag, pendingMigration) {
48497
- const buildState = () => ({
48920
+ async function persistStateAfterOutputFailure(engine, stackName, currentState, newResources, currentEtag, pendingMigration, override) {
48921
+ const after = override?.after ?? "output resolution failure";
48922
+ const buildState = override?.state ?? (() => ({
48498
48923
  version: 17,
48499
48924
  region: engine.stackRegion,
48500
48925
  stackName: currentState.stackName,
@@ -48506,22 +48931,22 @@ async function persistStateAfterOutputFailure(engine, stackName, currentState, n
48506
48931
  ...stackInstanceIdCarriedFrom(currentState),
48507
48932
  ...crossStackReadsForPartialSave(currentState, engine.recordedImports, engine.recordedOutputReads, engine.crossStackReadKeyNormalizer()),
48508
48933
  lastModified: Date.now()
48509
- });
48934
+ }));
48510
48935
  try {
48511
48936
  const expectedEtag = pendingMigration ? void 0 : currentEtag;
48512
48937
  await engine.stateBackend.saveState(stackName, engine.stackRegion, engine.withParentInfo(buildState()), {
48513
48938
  ...expectedEtag !== void 0 && { expectedEtag },
48514
48939
  migrateLegacy: pendingMigration
48515
48940
  });
48516
- engine.logger.debug("State saved after output resolution failure");
48941
+ engine.logger.debug(safeMsg`State saved after ${after}`);
48517
48942
  } catch (saveError) {
48518
- engine.logger.debug(safeMsg`Retrying state save after output resolution failure (ETag mismatch): ${asIsMessage(describeAwsFailure(saveError).detail)}`);
48943
+ engine.logger.debug(safeMsg`Retrying state save after ${after} (ETag mismatch): ${asIsMessage(describeAwsFailure(saveError).detail)}`);
48519
48944
  try {
48520
48945
  const freshEtag = (await engine.stateBackend.getState(stackName, engine.stackRegion))?.etag;
48521
48946
  await engine.stateBackend.saveState(stackName, engine.stackRegion, engine.withParentInfo(buildState()), { ...freshEtag !== void 0 && { expectedEtag: freshEtag } });
48522
- engine.logger.debug("State saved after output resolution failure (retry succeeded)");
48947
+ engine.logger.debug(safeMsg`State saved after ${after} (retry succeeded)`);
48523
48948
  } catch (retryError) {
48524
- engine.logger.warn(safeMsg`Failed to save state after output resolution failure: ${asIsMessage(describeAwsFailure(retryError).detail)} — resources were provisioned but not recorded; run deploy again to reconcile.`);
48949
+ engine.logger.warn(safeMsg`Failed to save state after ${after}: ${asIsMessage(describeAwsFailure(retryError).detail)} — resources were provisioned but not recorded; run deploy again to reconcile.`);
48525
48950
  }
48526
48951
  }
48527
48952
  }
@@ -49422,7 +49847,7 @@ async function scanActiveConsumers(producerStack, producerRegion, ctx, onUnreada
49422
49847
  const region = ref.region ?? ctx.baseRegion;
49423
49848
  if (ref.stackName === producerStack && region === producerRegion) return null;
49424
49849
  try {
49425
- const imports = (await ctx.stateBackend.getState(ref.stackName, region))?.state.imports;
49850
+ const imports = (await ctx.stateBackend.getState(ref.stackName, region, { readOnly: true }))?.state.imports;
49426
49851
  if (!imports || imports.length === 0) return null;
49427
49852
  const matches = imports.filter((entry) => entry.sourceStack === producerStack && canonicalizeRegion(entry.sourceRegion) === canonicalizeRegion(producerRegion));
49428
49853
  if (matches.length === 0) return null;
@@ -49598,7 +50023,9 @@ function keptWholeReasonText(reason) {
49598
50023
  async function deployWithoutChanges(engine, { stackName, template, currentState, currentEtag, effectiveTemplate, outputsDigestSource, parameterValues, conditions, conditionVerdicts, migrationPending, maskedFingerprintsBackfilled, orphansChanged, terminationProtectionChanged, ssmNamesHealed, nestedSsmNamesMarked, resolveStackInstanceId, startProvenanceCapture, startTime, clock }) {
49599
50024
  engine.logger.info("No changes detected. Stack is up to date.");
49600
50025
  startProvenanceCapture();
49601
- const supersededChanged = engine.options.dryRun ? false : await retryCarriedSupersededResources(engine, currentState, supersededResourcesOf(currentState), currentState.resources);
50026
+ const supersededChanged = engine.options.dryRun || queueNestedCleanup(engine, stackName, currentState, async (stillOwed) => {
50027
+ await retryCarriedSupersededResources(engine, currentState, supersededResourcesOf(currentState).filter(stillOwed), currentState.resources);
50028
+ }) ? false : await retryCarriedSupersededResources(engine, currentState, supersededResourcesOf(currentState), currentState.resources);
49602
50029
  let persistedOutputs = currentState.outputs ?? {};
49603
50030
  if (!engine.options.dryRun) {
49604
50031
  const resolvedOutputs = redactOutputs(engine.maskingDeps(), await withSharedDrainBudget(() => resolveOutputs(engine.outputsRun, engine.outputsDeps(), effectiveTemplate, currentState.resources, stackName, outputsDigestSource, parameterValues, conditions)));
@@ -50418,5 +50845,5 @@ var DeployEngine = class {
50418
50845
  }
50419
50846
  };
50420
50847
 
50421
- export { planVectorIndexUpdates as $, stackIdTailOf as $a, S3StateBackend as $c, ATOMIC_FINAL_SNAPSHOT_TYPES as $i, parseBootstrapMarker as $l, sgProtocolKey as $n, keepsSecretReferenceToken as $o, displayTextOrWithheld as $r, unreadableResourceEntries as $s, displacedOpClause as $t, recordedProtectionEvidence as A, customResourceStackName as Aa, refuseMalformedResourcesForDestroy as Ac, cyan as Ai, buildAssetRedirectMap as Al, constructPathOf as An, isUnboundTemplateParameter as Ao, withPreviousPolicies as Ar, malformedOrphanRecordsRefusalMessage as As, hasCdkAutoDeleteTag as At, declaredStreamTagsMember as B, resolvedResourceTimeoutMs as Ba, hasReadableOutputs as Bc, createReadOnlyAttributeHealerFactory as Bi, AssetManifestLoader as Bl, changedReferenceReason as Bn, promoteInPlaceAttributeDependents as Bo, nameGenerationHighWaterOf as Br, isReadableResourceEntry as Bs, updateRefactorMarker as Bt, pendingMovesOutOf as C, responsePresignClient as Ca, repairMalformedOutputsForReadOnly as Cc, isSupersededResourceRecord as Ci, isListParameterType as Cl, crossStackReadsForPartialSave as Cn, regionLessSecretName as Co, planFailedOps as Cr, parameterInputsFor as Cs, TABLE_INDEX_NOUN as Ct, findServiceTokenRefusals as D, getCurrentResourceSecrets as Da, malformedResourcesWarning as Dc, supersededResourcesOf as Di, decodeListingKey as Dl, noEchoMacParametersOf as Dn, s3BucketRegionalDomainName as Do, IMPLICIT_DELETE_DEPENDENCIES as Dr, maskedPropertyFingerprint as Ds, waitForIndexesSettled as Dt, deferredServiceTokenWarning as E, isCustomResourceType as Ea, malformedRenderedContainersWarning as Ec, supersededHolderOf as Ei, purgeNoncurrentKeyVersions as El, noEchoMacBinding as En, s3BucketDualStackDomainName as Eo, replacementNeverSwapped as Er, declaresNoEcho as Es, relayedIndexBusyDelete as Et, readProtection as F, setLocalCustomResourceRuntimeEnabled as Fa, accountArgs as Fc, noEchoAttributeNamesOf as Fi, isDefaultBootstrapRepoName as Fl, movedToHint as Fn, refStateLookupFromResource as Fo, redactedDeleteAddressSkip as Fr, refuseMalformedOrphanRecordsForDestroy as Fs, readRefactorMarkerOnce as Ft, streamMemberRefusals as G, deleteLeftInPlace as Ga, unwrittenCreateOnlyReplacement as Gc, orphanRecordsPrintingBag as Gi, warnAbsoluteAssetPath as Gl, parseMappingFile as Gn, recordedReferenceRegions as Go, withNameGenerationReached as Gr, refuseMalformedResourceAttributesForOrphan as Gs, formatResourceLine as Gt, reverseMapStreamPolicy as H, RollbackInlinePolicyWriters as Ha, findActionableSdkUnwired as Hc, journaledOrphanPrintingBag as Hi, isCfnTemplateAssetPath as Hl, isPairableType as Hn, outputReferenceProvenanceOf as Ho, retiredAfterRollback as Hr, malformedLocalResourcesWarning as Hs, readsOnlyNoEchoParameters as Ht, DynamoDBGlobalTableProvider as I, withCustomResourceStack as Ia, withheldAccountClause as Ic, noEchoComparisonForTemplate as Ii, loadPublishableAssetManifest as Il, rollbackOrphanIds as In, lacksRecordedRefArn as Io, segmentCleanupOptions as Ir, refuseMalformedOrphansForOrphan as Is, refactorMarkerMovesOf as It, isTtlAlreadyDisabled as J, isWaitAbandonedError as Ja, withoutUnwrittenSdkUnwiredProperties as Jc, secretNamedAttributeNamesOf as Ji, ensureAssetStorage as Jl, referencedLogicalIds as Jn, getAccountInfo as Jo, computeParameterTaint as Jr, refuseMalformedResourceEntriesForDestroy as Js, lookupEachName as Jt, streamPolicyMatchesDeclared as K, deleteSkipReason as Ka, withoutAcceptedSdkUnwiredProperties as Kc, secretNamePrintingBag as Ki, warnWholeAssemblyAsSource as Kl, propertiesChangedReason as Kn, referenceProvenanceOf as Ko, getCurrentProducerRegions as Kr, refuseMalformedResourceEntries as Ks, chunks as Kt, STREAM_POLICY_KEY as L, waitForLambdaFunctionActive as La, STATE_RESOURCES_MALFORMED as Lc, noEchoExactEchoLeavesOf as Li, redirectDockerAsset as Ll, withMovedTo as Ln, lacksRecordedTableArn as Lo, removeProtectionTypeList as Lr, repairMalformedOrphanRecordsForReadOnly as Ls, refactorMarkerRefusalMessage as Lt, PROTECTION_PROPERTY_BY_TYPE as M, customResourcesRunWithoutApp as Ma, refuseMalformedState as Mc, green as Mi, createLazyAssetModeContext as Ml, formatDestructiveChange as Mn, AWS_NO_VALUE as Mo, REDACTED_DELETE_ADDRESS_SKIP_REASON as Mr, malformedOrphanRowsKeptWarning as Ms, keptForRetainedRecord as Mt, isProtectionValueActive as N, localCustomResourceCommand as Na, repairMalformedResourcesForReadOnly as Nc, red as Ni, flattenAssetPlaceholders as Nl, findRefactorHints as Nn, cfnRefValueFromPhysicalId as No, isRedactedRecordedValue as Nr, previewableOrphanRecords as Ns, recordRetainedForReadoption as Nt, serviceTokenBlockingReason as O, withPrintingSecrets as Oa, malformedStateRefusalMessage as Oc, withoutSuperseded as Oi, rememberSynthesizedStacks as Ol, noEchoMacVerdict as On, s3BucketWebsiteUrl as Oo, computeImplicitDeleteEdges as Or, deployRefusesOrphanRowsReason as Os, ECR_AUTO_DELETE_IMAGES_TAG as Ot, perType as P, localCustomResourceRuntimeActive as Pa, JSON_LISTING_HOLE_VALUE as Pc, yellow as Pi, isDefaultBootstrapBucketName as Pl, hintSidesOf as Pn, isStalePlaceholderArnAttribute as Po, redactedDeleteAddressFields as Pr, refuseMalformedOrphanRecords as Ps, readRefactorMarker as Pt, sendTtlWaitingOutRateLimit as Q, poisonRenderedSpellingsCollidingIn as Qa, TemplateParser as Qc, extractDeploymentEventError as Qi, getBootstrapMarkerKey as Ql, cfnIngressPortValue as Qn, carriesDynamicReference as Qo, WITHHELD_NAME_DISPLAY as Qr, repairMalformedResourceEntriesForReadOnly as Qs, NESTED_PENDING_PARENT_REASON as Qt, STREAM_TAGS_KEY as R, CloudControlProvider as Ra, UNREADABLE_RESOURCES_MAP_ROW as Rc, noEchoParameterNamesOf as Ri, redirectFileAsset as Rl, changedReferenceInDiff as Rn, parseWebACLArn as Ro, orphanNeedsIdentity as Rr, unpreviewableOrphanRecords as Rs, refuseRefactorMarker as Rt, hasPendingMovesOut as S, customResourceResponseExpirationWarning as Sa, refuseMalformedOutputsForDestroy as Sc, holdsSupersededResources as Si, SSM_PARAMETER_VALUE_PREFIX as Sl, DeploymentEventsStore as Sn, producerRegionsFromState as So, isReplacementOrphan as Sr, movedMaskedProperties as Ss, INDEX_SETTLE_POLL_INTERVAL_MS as St, refusePendingMovesOut as T, readsNoEchoDeleteValues as Ta, refuseDivergentRecordRegionForDestroy as Tc, supersededHeldByOtherTypeWarning as Ti, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Tl, createNoEchoValueMacs as Tn, s3BucketDomainName as To, recordUnderIdIsNotOwn as Tr, passedParameterClassesOf as Ts, maskedLogger as Tt, streamDeclaresPolicy as U, UNSPECIFIED_SKIP_REASON as Ua, findHandledUnwrittenCreateOnly as Uc, maskEventTextWithBoundBags as Ui, parseAssetManifestBody as Ul, looselyEqual as Un, recordedOutputReferenceRegions as Uo, retiredNameGenerationsAfter as Ur, malformedResourceEntriesWarning as Us, getPriorAttempts as Ut, planStreamMemberOps as V, setResolvedResourceTimeouts as Va, hasReadableResources as Vc, completedReplayEntries as Vi, getDockerImageBySourceHash as Vl, differingRemedy as Vn, keepHeldTokenProvenance as Vo, nameScopeOf as Vr, malformedLocalResourceEntriesWarning as Vs, macWriteOnlyKeys as Vt, streamDeclaresTags as W, deleteIndeterminateGuards as Wa, findSdkUnwiredProperties as Wc, namingSecretsWithRecordedNoEcho as Wi, resolveFileAssetSourcePath as Wl, mappingPairs as Wn, recordedProvenanceOf as Wo, retiredNameGenerationsLeaving as Wr, malformedScrubResourceEntriesRefusalMessage as Ws, markRefusedBeforeApplying as Wt, planTimeToLive as X, isSelectOutOfBounds as Xa, hasNoCloudControlHandlers as Xc, stateSecretNameNeedles as Xi, assertAssetBucketRegion as Xl, stripSiblingOwnedSgRules as Xn, carriesFetchableDynamicReference as Xo, reachableDivergentParameters as Xr, refuseMalformedResourceEntriesForImportSave as Xs, pendingRequestCount as Xt, isTtlRateLimited as Y, IntrinsicFunctionResolver as Ya, NO_CC_HANDLERS_REASON as Yc, secretNamedRecordNeedles as Yi, buildDenyExternalAccessPolicy as Yl, siblingOwnedSgRuleIdentities as Yn, isImpossibleEmptyStoredAttribute as Yo, namesAnyDeclaredParameter as Yr, refuseMalformedResourceEntriesForImport as Ys, withApiLimit as Yt, readTtlSpec as Z, isAlwaysLiveAttribute as Za, PROPERTY_COVERAGE_BY_TYPE as Zc, storedSecretNameNeedles as Zi, isCrossRegionRedirect as Zl, withoutSiblingOwnedSgRules as Zn, isNamelessDynamicReferenceError as Zo, resourcesNamingDeclaredParameter as Zr, refuseMalformedResourceEntriesForOrphan as Zs, resolvePendingCloudControlRequests as Zt, conditionFingerprint as _, ccBrokenReason as _a, malformedLocalOutputsWarning as _c, destroyStackRecordsView as _i, findNestedTemplateTreeDefect as _l, sameJournaledOrphans as _n, applyCallerIdentityCredentials as _o, acquireIdempotencyToken as _r, toCfnInteger as _s, compensateRemovedDeletionProtection as _t, resolveAssemblyPath as _u, scanActiveConsumers as a, refusesFinalSnapshot as aa, refuseMalformedResourcePropertiesForExport as ac, exportNameNoEchoParameters as ai, CrossPrefixReadError as al, revertNestedChildFromJournal as an, withSecretPhysicalIdsMaskedInState as ao, settleUnsettledPrevious as ar, replacementSidesForLog as as, contributorInsightsRefusals as at, getCdkdContainerRepoName as au, readRecordedConditionVerdicts as b, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as ba, refuseMalformedNestedChildOutputs as bc, replacedDeleteFailureVerdict as bi, renderNestedTemplateTreeDefect as bl, planOrphanAdoption as bn, classifyRecordedSecretRegion as bo, demoteSupersededOrphans as br, inputFingerprinter as bs, resolveDynamoDbDeleteBudgetMs as bt, nestedSsmNameDeferredNote as c, buildFinalSnapshotIdentifier as ca, UNREADABLE_ORPHANS_CONTAINER_ROW as cc, noEchoParameterValueSeed as ci, crossPrefixDeniedWarning as cl, collectNestedChildUnaddressed as cn, refuseUnreadableCdkCrossAccountRefs as co, equalModuloMarkedMask as cr, isPlainReferenceTo as cs, planIndexContributorInsightsOps as ct, hasPlainPrototype as cu, slashedSsmNameHealAdoptedNote as d, collectPrincipalsAttachingPolicy as da, malformedOrphansWarning as dc, isExportAliasCollision as di, stackInstanceIdOf as dl, deleteJournaledOrphans as dn, assertSendableRoleArn as do, updatePartialMessage as dr, isStatefulRecreateTargetForReplace as ds, reverseMapTableContributorInsights as dt, absoluteAssemblyPathEscape as du, PRE_DELETE_SNAPSHOT_TYPES as ea, malformedDriftResourcePropertiesWarning as ec, exportAliasCollisionScrubWarning as ei, splitImportedOps as el, displacedPhysicalIdShown as en, isSettledInstanceState as eo, canonicalizeIpProtocolValue as er, withSharedDrainBudget as es, readbackVectorIndexes as et, readBootstrapMarkerBody as eu, slashedSsmNameHealNote as f, stripSiblingOwnedMembers as fa, refuseMalformedOrphans as fc, bindingSkippedOutputs as fi, withStackInstanceIdWithheld as fl, dropFailedCommands as fn, explicitRoleArnOrThrow as fo, updatePartialReason as fr, isStatefulRecreateTargetSync as fs, stripIndexContributorInsights as ft, assemblyPathEscape as fu, makeCanonicalizePropertiesFn as g, ProviderRegistry as ga, malformedExportSourceWarning as gc, awaitInFlightSibling as gi, missingStateBucketRemedy as gl, loadJournaledOrphans as gn, AWS_CREDENTIAL_ENV_KEYS as go, withCreateTokenLedger as gr, isWarmThroughputDecrease as gs, beginDeleteWait as gt, renderAssemblyPathEscape as gu, inheritedProvenanceForChildDiff as h, CC_BROKEN_REASON as ha, malformedExportNamesWarning as hc, maskingRetryLogger as hi, stringifyValue as hl, journaledOrphanLines as hn, sendableAssumeRoleCommand as ho, reserveStackCreateToken as hr, coerceWarmThroughput as hs, DYNAMODB_DELETE_POLL_COST_MS as ht, namesTheSameDirectory as hu, mergeNoChangeOutputs as i, isFinalSnapshotError as ia, refuseMalformedResourcePropertiesForDrift as ic, carriedExportAliasExposure as ii, rebuildClientForBucketRegion as il, recordDisplacedSkips as in, secretSegmentsOfState as io, recordAfterRollbackUpdate as ir, markNewValueKnownAfterDeploy as is, CONTRIBUTOR_INSIGHTS_KEY as it, getCdkdAssetBucketName as iu, recordedProtectionNote as j, customResourcesFailedWithoutApp as ja, refuseMalformedResourcesForExport as jc, gray as ji, createAssetRedirectResolver as jl, findDestructiveChanges as jn, parameterTypeMayLoseSecretIdentity as jo, findNestedStackTypeChanges as jr, malformedOrphanRecordsWarning as js, isTruthyCfnBoolean as jt, diffSecurity as k, NO_LOCAL_CUSTOM_RESOURCES_FLAG as ka, refuseMalformedResourcesForDeploy as kc, bold as ki, synthesizedStacks as kl, noEchoValueMacsOf as kn, coerceParameterTypedValue as ko, resolveReplacementOldType as kr, isReadableOrphanRecord as ks, S3_AUTO_DELETE_OBJECTS_TAG as kt, nestedSsmNameRowNote as l, collectGroupsAddedBySiblings as la, hasReadableOrphans as lc, collectDeclaredOutputNames as li, isAccessDenied$1 as ll, getCurrentNestedStackContext as ln, applyRoleArnIfSet as lo, equalModuloMask as lr, shownType as ls, readContributorInsightsSpec as lt, nullPrototypeRecord as lu, crossStackOutputProvenanceSource as m, withoutSiblingOwned as ma, repairMalformedOrphansForReadOnly as mc, DEFAULT_RESOURCE_WARN_AFTER_MS as mi, isSensitiveAttributeName as ml, isHandledOrphan as mn, parseIamRoleArn as mo, ledgerForStack as mr, WARM_THROUGHPUT_MEMBERS as ms, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as mt, displayAssemblyPath as mu, isSecretBearingReferenceString as n, ccRoutedInstanceTakesNoSnapshot as na, refuseMalformedResourceProperties as nc, secretBearingStateKeyWarning as ni, hasReasonlessBaselineRefusal as nl, getNestedRevertRun as nn, maskedSecretSegment as no, replayRollback as nr, INTRINSIC_KEYS as ns, vectorIndexesSettled as nt, validateContainerRepoName as nu, inRunStackKey as o, unsupportedFinalSnapshotError as oa, refuseMalformedResourcePropertiesForOrphan as oc, exportNameSecretExposure as oi, CrossPrefixScanCache as ol, revertedNestedRowIds as on, resolveDynamicReferences as oo, withUnprovenUnsettled as or, siblingsOf as os, indexDeclaresContributorInsights as ot, defineOwnKey as ou, slashedSsmNameHealPendingNote as p, withoutSiblingAttachedArns as pa, refuseMalformedOrphansForDestroy as pc, DEFAULT_RESOURCE_TIMEOUT_MS as pi, isSecretValuedAttribute as pl, dropFailedHint as pn, isIamRoleArn as po, earliestDefined as pr, renderStatefulReason as ps, DYNAMODB_DELETE_DEADLINE_MARGIN_MS as pt, describeFileReadFailure as pu, streamTagsMatchDeclared as q, withIndeterminateGuard as qa, withoutSdkUnwiredProperties as qc, secretNamePrintingBags as qi, AssetModeResolver as ql, proposeRenames as qn, referenceTokensIn as qo, inheritProducerRegions as qr, refuseMalformedResourceEntriesForDeploy as qs, isAccessDeniedError as qt, keptWholeReasonText as r, effectiveDeletionPolicy as ra, refuseMalformedResourcePropertiesForDestroy as rc, secretSafeKeyDisplay as ri, hasUnverifiableParameterRefusal as rl, nestedChildStackName as rn, secretPhysicalIdSegment as ro, DELETED_RESOURCE_REMEDY as rr, containsIntrinsic as rs, vectorIndexesShapeDetail as rt, BOOTSTRAP_MARKER_PREFIX as ru, checkNestedSsmNames as s, createPreDeleteFinalSnapshot as sa, repairMalformedResourcePropertiesForReadOnly as sc, isWholeDynamicReferenceValue as si, applyCrossPrefixScan as sl, withNestedRevertRun as sn, producerLookupOver as so, calculateResourceDrift as sr, findReplacedReadersOfRecreateTargets as ss, planContributorInsightsOp as st, hasOwnKey as su, DeployEngine as t, ccRoutedFinalSnapshotError as ta, malformedResourcePropertiesWarning as tc, secretBearing as ti, isKnownTokenFreeState as tl, dropSettledNestedJournals as tn, APPSYNC_APIKEY_ARN_RESOURCE_PATH as to, replayFailedOperations as tr, namesRecreatedParent as ts, vectorIndexesForCreate as tt, validateAssetBucketName as tu, healSlashedSsmParameterNames as u, collectManagedPolicyArnsAttachedBySiblings as ua, malformedOrphansRefusalMessage as uc, collectPublishedOutputNames as ui, isNotImplemented as ul, withNestedStackContext as un, assertFlagRoleArn as uo, undeclaredEmptyObservedKeys as ur, MULTI_REGION_RECREATE_BLOCKED_TYPES as us, reverseMapIndexContributorInsights as ut, ownValue as uu, conditionInputsFrom as v, isCustomResource as va, malformedOutputsRefusalMessage as vc, getStackRecords as vi, isAbsoluteAssetPath as vl, makeForeignHolderScan as vn, callerEnvCredentials as vo, planRollback as vr, toFiniteNumber as vs, deleteBudgetKey as vt, clearBucketRegionCache as vu, pendingMovesRefusalMessage as w, TemplateNoEchoReresolver as wa, STATE_REGION_DIVERGED as wc, supersededAfterRollback as wi, ssmResolvedValueType as wl, NOECHO_MAC_KEY_ALIAS as wn, s3BucketArn as wo, recheckFailedPlan as wr, maskedInputProof as ws, deleteTableWithIndexBusyRetry as wt, childTemplateLoader as x, applyCustomResourceResponseExpiration as xa, refuseMalformedOutputs as xc, deleteSupersededEntry as xi, templateIdentity as xl, DeploymentEventsReader as xn, classifyReplaySecretRegion as xo, isJournaledOrphan as xr, maskedPropertyFingerprintsOf as xs, DELETE_INDEX_WAIT_PROCEED_NOTE as xt, parentSuppliedValues as y, wouldReturnToSdkProvider as ya, malformedOutputsWarning as yc, withStackRecords as yi, listNestedTemplateRows as yl, makeSiblingClaimReader as yn, envCredentialsAreAssumedRole as yo, seedsDeleteFirstGuard as yr, tryGetTopLevelWriteOnlyProperties as ys, resolveDynamoDbDeleteBudgetClock as yt, resolveBucketRegion as yu, declaredStreamPolicyMember as z, waitForGoneAfterDelete as za, displayLogicalId as zc, withAttemptedItemsMasked as zi, rewriteTemplateAssetReferences as zl, changedReferencePath as zn, extractGetAttRefs as zo, nameGenerationCarriedFrom as zr, unreadableOrphanRecords as zs, sameMove as zt };
50422
- //# sourceMappingURL=deploy-engine-BQral6za.js.map
50848
+ export { planVectorIndexUpdates as $, stackIdTailOf as $a, S3StateBackend as $c, ATOMIC_FINAL_SNAPSHOT_TYPES as $i, getBootstrapMarkerKey as $l, sgProtocolKey as $n, keepsSecretReferenceToken as $o, displayTextOrWithheld as $r, unreadableResourceEntries as $s, displacedOpClause as $t, recordedProtectionEvidence as A, customResourceStackName as Aa, refuseMalformedResourcesForDestroy as Ac, cyan as Ai, synthesizedStacks as Al, constructPathOf as An, isUnboundTemplateParameter as Ao, withPreviousPolicies as Ar, malformedOrphanRecordsRefusalMessage as As, hasCdkAutoDeleteTag as At, declaredStreamTagsMember as B, resolvedResourceTimeoutMs as Ba, hasReadableOutputs as Bc, createReadOnlyAttributeHealerFactory as Bi, rewriteTemplateAssetReferences as Bl, changedReferenceReason as Bn, promoteInPlaceAttributeDependents as Bo, nameGenerationHighWaterOf as Br, isReadableResourceEntry as Bs, updateRefactorMarker as Bt, pendingMovesOutOf as C, responsePresignClient as Ca, repairMalformedOutputsForReadOnly as Cc, isSupersededResourceRecord as Ci, SSM_PARAMETER_VALUE_PREFIX as Cl, crossStackReadsForPartialSave as Cn, regionLessSecretName as Co, planFailedOps as Cr, parameterInputsFor as Cs, TABLE_INDEX_NOUN as Ct, findServiceTokenRefusals as D, getCurrentResourceSecrets as Da, malformedResourcesWarning as Dc, supersededResourcesOf as Di, purgeNoncurrentKeyVersions as Dl, noEchoMacParametersOf as Dn, s3BucketRegionalDomainName as Do, IMPLICIT_DELETE_DEPENDENCIES as Dr, maskedPropertyFingerprint as Ds, waitForIndexesSettled as Dt, deferredServiceTokenWarning as E, isCustomResourceType as Ea, malformedRenderedContainersWarning as Ec, supersededHolderOf as Ei, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as El, noEchoMacBinding as En, s3BucketDualStackDomainName as Eo, replacementNeverSwapped as Er, declaresNoEcho as Es, relayedIndexBusyDelete as Et, readProtection as F, setLocalCustomResourceRuntimeEnabled as Fa, accountArgs as Fc, noEchoAttributeNamesOf as Fi, isDefaultBootstrapBucketName as Fl, movedToHint as Fn, refStateLookupFromResource as Fo, redactedDeleteAddressSkip as Fr, refuseMalformedOrphanRecordsForDestroy as Fs, readRefactorMarkerOnce as Ft, streamMemberRefusals as G, deleteLeftInPlace as Ga, unwrittenCreateOnlyReplacement as Gc, orphanRecordsPrintingBag as Gi, resolveFileAssetSourcePath as Gl, parseMappingFile as Gn, recordedReferenceRegions as Go, withNameGenerationReached as Gr, refuseMalformedResourceAttributesForOrphan as Gs, formatResourceLine as Gt, reverseMapStreamPolicy as H, RollbackInlinePolicyWriters as Ha, findActionableSdkUnwired as Hc, journaledOrphanPrintingBag as Hi, getDockerImageBySourceHash as Hl, isPairableType as Hn, outputReferenceProvenanceOf as Ho, retiredAfterRollback as Hr, malformedLocalResourcesWarning as Hs, readsOnlyNoEchoParameters as Ht, DynamoDBGlobalTableProvider as I, withCustomResourceStack as Ia, withheldAccountClause as Ic, noEchoComparisonForTemplate as Ii, isDefaultBootstrapRepoName as Il, rollbackOrphanIds as In, lacksRecordedRefArn as Io, segmentCleanupOptions as Ir, refuseMalformedOrphansForOrphan as Is, refactorMarkerMovesOf as It, isTtlAlreadyDisabled as J, isWaitAbandonedError as Ja, withoutUnwrittenSdkUnwiredProperties as Jc, secretNamedAttributeNamesOf as Ji, AssetModeResolver as Jl, referencedLogicalIds as Jn, getAccountInfo as Jo, computeParameterTaint as Jr, refuseMalformedResourceEntriesForDestroy as Js, lookupEachName as Jt, streamPolicyMatchesDeclared as K, deleteSkipReason as Ka, withoutAcceptedSdkUnwiredProperties as Kc, secretNamePrintingBag as Ki, warnAbsoluteAssetPath as Kl, propertiesChangedReason as Kn, referenceProvenanceOf as Ko, getCurrentProducerRegions as Kr, refuseMalformedResourceEntries as Ks, chunks as Kt, STREAM_POLICY_KEY as L, waitForLambdaFunctionActive as La, STATE_RESOURCES_MALFORMED as Lc, noEchoExactEchoLeavesOf as Li, loadPublishableAssetManifest as Ll, withMovedTo as Ln, lacksRecordedTableArn as Lo, removeProtectionTypeList as Lr, repairMalformedOrphanRecordsForReadOnly as Ls, refactorMarkerRefusalMessage as Lt, PROTECTION_PROPERTY_BY_TYPE as M, customResourcesRunWithoutApp as Ma, refuseMalformedState as Mc, green as Mi, createAssetRedirectResolver as Ml, formatDestructiveChange as Mn, AWS_NO_VALUE as Mo, REDACTED_DELETE_ADDRESS_SKIP_REASON as Mr, malformedOrphanRowsKeptWarning as Ms, keptForRetainedRecord as Mt, isProtectionValueActive as N, localCustomResourceCommand as Na, repairMalformedResourcesForReadOnly as Nc, red as Ni, createLazyAssetModeContext as Nl, findRefactorHints as Nn, cfnRefValueFromPhysicalId as No, isRedactedRecordedValue as Nr, previewableOrphanRecords as Ns, recordRetainedForReadoption as Nt, serviceTokenBlockingReason as O, withPrintingSecrets as Oa, malformedStateRefusalMessage as Oc, withoutSuperseded as Oi, decodeListingKey as Ol, noEchoMacVerdict as On, s3BucketWebsiteUrl as Oo, computeImplicitDeleteEdges as Or, deployRefusesOrphanRowsReason as Os, ECR_AUTO_DELETE_IMAGES_TAG as Ot, perType as P, localCustomResourceRuntimeActive as Pa, JSON_LISTING_HOLE_VALUE as Pc, yellow as Pi, flattenAssetPlaceholders as Pl, hintSidesOf as Pn, isStalePlaceholderArnAttribute as Po, redactedDeleteAddressFields as Pr, refuseMalformedOrphanRecords as Ps, readRefactorMarker as Pt, sendTtlWaitingOutRateLimit as Q, poisonRenderedSpellingsCollidingIn as Qa, TemplateParser as Qc, extractDeploymentEventError as Qi, isCrossRegionRedirect as Ql, cfnIngressPortValue as Qn, carriesDynamicReference as Qo, WITHHELD_NAME_DISPLAY as Qr, repairMalformedResourceEntriesForReadOnly as Qs, NESTED_PENDING_PARENT_REASON as Qt, STREAM_TAGS_KEY as R, CloudControlProvider as Ra, UNREADABLE_RESOURCES_MAP_ROW as Rc, noEchoParameterNamesOf as Ri, redirectDockerAsset as Rl, changedReferenceInDiff as Rn, parseWebACLArn as Ro, orphanNeedsIdentity as Rr, unpreviewableOrphanRecords as Rs, refuseRefactorMarker as Rt, hasPendingMovesOut as S, customResourceResponseExpirationWarning as Sa, refuseMalformedOutputsForDestroy as Sc, holdsSupersededResources as Si, templateIdentity as Sl, DeploymentEventsStore as Sn, producerRegionsFromState as So, isReplacementOrphan as Sr, movedMaskedProperties as Ss, INDEX_SETTLE_POLL_INTERVAL_MS as St, refusePendingMovesOut as T, readsNoEchoDeleteValues as Ta, refuseDivergentRecordRegionForDestroy as Tc, supersededHeldByOtherTypeWarning as Ti, ssmResolvedValueType as Tl, createNoEchoValueMacs as Tn, s3BucketDomainName as To, recordUnderIdIsNotOwn as Tr, passedParameterClassesOf as Ts, maskedLogger as Tt, streamDeclaresPolicy as U, UNSPECIFIED_SKIP_REASON as Ua, findHandledUnwrittenCreateOnly as Uc, maskEventTextWithBoundBags as Ui, isCfnTemplateAssetPath as Ul, looselyEqual as Un, recordedOutputReferenceRegions as Uo, retiredNameGenerationsAfter as Ur, malformedResourceEntriesWarning as Us, getPriorAttempts as Ut, planStreamMemberOps as V, setResolvedResourceTimeouts as Va, hasReadableResources as Vc, completedReplayEntries as Vi, AssetManifestLoader as Vl, differingRemedy as Vn, keepHeldTokenProvenance as Vo, nameScopeOf as Vr, malformedLocalResourceEntriesWarning as Vs, macWriteOnlyKeys as Vt, streamDeclaresTags as W, deleteIndeterminateGuards as Wa, findSdkUnwiredProperties as Wc, namingSecretsWithRecordedNoEcho as Wi, parseAssetManifestBody as Wl, mappingPairs as Wn, recordedProvenanceOf as Wo, retiredNameGenerationsLeaving as Wr, malformedScrubResourceEntriesRefusalMessage as Ws, markRefusedBeforeApplying as Wt, planTimeToLive as X, isSelectOutOfBounds as Xa, hasNoCloudControlHandlers as Xc, stateSecretNameNeedles as Xi, buildDenyExternalAccessPolicy as Xl, stripSiblingOwnedSgRules as Xn, carriesFetchableDynamicReference as Xo, reachableDivergentParameters as Xr, refuseMalformedResourceEntriesForImportSave as Xs, pendingRequestCount as Xt, isTtlRateLimited as Y, IntrinsicFunctionResolver as Ya, NO_CC_HANDLERS_REASON as Yc, secretNamedRecordNeedles as Yi, ensureAssetStorage as Yl, siblingOwnedSgRuleIdentities as Yn, isImpossibleEmptyStoredAttribute as Yo, namesAnyDeclaredParameter as Yr, refuseMalformedResourceEntriesForImport as Ys, withApiLimit as Yt, readTtlSpec as Z, isAlwaysLiveAttribute as Za, PROPERTY_COVERAGE_BY_TYPE as Zc, storedSecretNameNeedles as Zi, assertAssetBucketRegion as Zl, withoutSiblingOwnedSgRules as Zn, isNamelessDynamicReferenceError as Zo, resourcesNamingDeclaredParameter as Zr, refuseMalformedResourceEntriesForOrphan as Zs, resolvePendingCloudControlRequests as Zt, conditionFingerprint as _, ccBrokenReason as _a, malformedLocalOutputsWarning as _c, destroyStackRecordsView as _i, missingStateBucketRemedy as _l, sameJournaledOrphans as _n, applyCallerIdentityCredentials as _o, acquireIdempotencyToken as _r, toCfnInteger as _s, compensateRemovedDeletionProtection as _t, renderAssemblyPathEscape as _u, scanActiveConsumers as a, refusesFinalSnapshot as aa, refuseMalformedResourcePropertiesForExport as ac, exportNameNoEchoParameters as ai, rebuildClientForBucketRegion as al, revertNestedChildFromJournal as an, withSecretPhysicalIdsMaskedInState as ao, settleUnsettledPrevious as ar, replacementSidesForLog as as, contributorInsightsRefusals as at, getCdkdAssetBucketName as au, readRecordedConditionVerdicts as b, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as ba, refuseMalformedNestedChildOutputs as bc, replacedDeleteFailureVerdict as bi, listNestedTemplateRows as bl, planOrphanAdoption as bn, classifyRecordedSecretRegion as bo, demoteSupersededOrphans as br, inputFingerprinter as bs, resolveDynamoDbDeleteBudgetMs as bt, resolveBucketRegion as bu, nestedSsmNameDeferredNote as c, buildFinalSnapshotIdentifier as ca, UNREADABLE_ORPHANS_CONTAINER_ROW as cc, noEchoParameterValueSeed as ci, applyCrossPrefixScan as cl, collectNestedChildUnaddressed as cn, refuseUnreadableCdkCrossAccountRefs as co, equalModuloMarkedMask as cr, isPlainReferenceTo as cs, planIndexContributorInsightsOps as ct, hasOwnKey as cu, slashedSsmNameHealAdoptedNote as d, collectPrincipalsAttachingPolicy as da, malformedOrphansWarning as dc, isExportAliasCollision as di, isNotImplemented as dl, deleteJournaledOrphans as dn, assertSendableRoleArn as do, updatePartialMessage as dr, isStatefulRecreateTargetForReplace as ds, reverseMapTableContributorInsights as dt, ownValue as du, PRE_DELETE_SNAPSHOT_TYPES as ea, malformedDriftResourcePropertiesWarning as ec, exportAliasCollisionScrubWarning as ei, splitImportedOps as el, displacedPhysicalIdShown as en, isSettledInstanceState as eo, canonicalizeIpProtocolValue as er, withSharedDrainBudget as es, readbackVectorIndexes as et, parseBootstrapMarker as eu, slashedSsmNameHealNote as f, stripSiblingOwnedMembers as fa, refuseMalformedOrphans as fc, bindingSkippedOutputs as fi, stackInstanceIdOf as fl, dropFailedCommands as fn, explicitRoleArnOrThrow as fo, updatePartialReason as fr, isStatefulRecreateTargetSync as fs, stripIndexContributorInsights as ft, absoluteAssemblyPathEscape as fu, makeCanonicalizePropertiesFn as g, ProviderRegistry as ga, malformedExportSourceWarning as gc, awaitInFlightSibling as gi, stringifyValue as gl, loadJournaledOrphans as gn, AWS_CREDENTIAL_ENV_KEYS as go, withCreateTokenLedger as gr, isWarmThroughputDecrease as gs, beginDeleteWait as gt, namesTheSameDirectory as gu, inheritedProvenanceForChildDiff as h, CC_BROKEN_REASON as ha, malformedExportNamesWarning as hc, maskingRetryLogger as hi, isSensitiveAttributeName as hl, journaledOrphanLines as hn, sendableAssumeRoleCommand as ho, reserveStackCreateToken as hr, coerceWarmThroughput as hs, DYNAMODB_DELETE_POLL_COST_MS as ht, displayAssemblyPath as hu, mergeNoChangeOutputs as i, isFinalSnapshotError as ia, refuseMalformedResourcePropertiesForDrift as ic, carriedExportAliasExposure as ii, hasUnverifiableParameterRefusal as il, recordDisplacedSkips as in, secretSegmentsOfState as io, recordAfterRollbackUpdate as ir, markNewValueKnownAfterDeploy as is, CONTRIBUTOR_INSIGHTS_KEY as it, BOOTSTRAP_MARKER_PREFIX as iu, recordedProtectionNote as j, customResourcesFailedWithoutApp as ja, refuseMalformedResourcesForExport as jc, gray as ji, buildAssetRedirectMap as jl, findDestructiveChanges as jn, parameterTypeMayLoseSecretIdentity as jo, findNestedStackTypeChanges as jr, malformedOrphanRecordsWarning as js, isTruthyCfnBoolean as jt, diffSecurity as k, NO_LOCAL_CUSTOM_RESOURCES_FLAG as ka, refuseMalformedResourcesForDeploy as kc, bold as ki, rememberSynthesizedStacks as kl, noEchoValueMacsOf as kn, coerceParameterTypedValue as ko, resolveReplacementOldType as kr, isReadableOrphanRecord as ks, S3_AUTO_DELETE_OBJECTS_TAG as kt, nestedSsmNameRowNote as l, collectGroupsAddedBySiblings as la, hasReadableOrphans as lc, collectDeclaredOutputNames as li, crossPrefixDeniedWarning as ll, getCurrentNestedStackContext as ln, applyRoleArnIfSet as lo, equalModuloMask as lr, shownType as ls, readContributorInsightsSpec as lt, hasPlainPrototype as lu, crossStackOutputProvenanceSource as m, withoutSiblingOwned as ma, repairMalformedOrphansForReadOnly as mc, DEFAULT_RESOURCE_WARN_AFTER_MS as mi, isSecretValuedAttribute as ml, isHandledOrphan as mn, parseIamRoleArn as mo, ledgerForStack as mr, WARM_THROUGHPUT_MEMBERS as ms, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as mt, describeFileReadFailure as mu, isSecretBearingReferenceString as n, ccRoutedInstanceTakesNoSnapshot as na, refuseMalformedResourceProperties as nc, secretBearingStateKeyWarning as ni, readOnlyStateVersionOf as nl, getNestedRevertRun as nn, maskedSecretSegment as no, replayRollback as nr, INTRINSIC_KEYS as ns, vectorIndexesSettled as nt, validateAssetBucketName as nu, inRunStackKey as o, unsupportedFinalSnapshotError as oa, refuseMalformedResourcePropertiesForOrphan as oc, exportNameSecretExposure as oi, CrossPrefixReadError as ol, revertedNestedRowIds as on, resolveDynamicReferences as oo, withUnprovenUnsettled as or, siblingsOf as os, indexDeclaresContributorInsights as ot, getCdkdContainerRepoName as ou, slashedSsmNameHealPendingNote as p, withoutSiblingAttachedArns as pa, refuseMalformedOrphansForDestroy as pc, DEFAULT_RESOURCE_TIMEOUT_MS as pi, withStackInstanceIdWithheld as pl, dropFailedHint as pn, isIamRoleArn as po, earliestDefined as pr, renderStatefulReason as ps, DYNAMODB_DELETE_DEADLINE_MARGIN_MS as pt, assemblyPathEscape as pu, streamTagsMatchDeclared as q, withIndeterminateGuard as qa, withoutSdkUnwiredProperties as qc, secretNamePrintingBags as qi, warnWholeAssemblyAsSource as ql, proposeRenames as qn, referenceTokensIn as qo, inheritProducerRegions as qr, refuseMalformedResourceEntriesForDeploy as qs, isAccessDeniedError as qt, keptWholeReasonText as r, effectiveDeletionPolicy as ra, refuseMalformedResourcePropertiesForDestroy as rc, secretSafeKeyDisplay as ri, hasReasonlessBaselineRefusal as rl, nestedChildStackName as rn, secretPhysicalIdSegment as ro, DELETED_RESOURCE_REMEDY as rr, containsIntrinsic as rs, vectorIndexesShapeDetail as rt, validateContainerRepoName as ru, checkNestedSsmNames as s, createPreDeleteFinalSnapshot as sa, repairMalformedResourcePropertiesForReadOnly as sc, isWholeDynamicReferenceValue as si, CrossPrefixScanCache as sl, withNestedRevertRun as sn, producerLookupOver as so, calculateResourceDrift as sr, findReplacedReadersOfRecreateTargets as ss, planContributorInsightsOp as st, defineOwnKey as su, DeployEngine as t, ccRoutedFinalSnapshotError as ta, malformedResourcePropertiesWarning as tc, secretBearing as ti, isKnownTokenFreeState as tl, dropSettledNestedJournals as tn, APPSYNC_APIKEY_ARN_RESOURCE_PATH as to, replayFailedOperations as tr, namesRecreatedParent as ts, vectorIndexesForCreate as tt, readBootstrapMarkerBody as tu, healSlashedSsmParameterNames as u, collectManagedPolicyArnsAttachedBySiblings as ua, malformedOrphansRefusalMessage as uc, collectPublishedOutputNames as ui, isAccessDenied$1 as ul, withNestedStackContext as un, assertFlagRoleArn as uo, undeclaredEmptyObservedKeys as ur, MULTI_REGION_RECREATE_BLOCKED_TYPES as us, reverseMapIndexContributorInsights as ut, nullPrototypeRecord as uu, conditionInputsFrom as v, isCustomResource as va, malformedOutputsRefusalMessage as vc, getStackRecords as vi, findNestedTemplateTreeDefect as vl, makeForeignHolderScan as vn, callerEnvCredentials as vo, planRollback as vr, toFiniteNumber as vs, deleteBudgetKey as vt, resolveAssemblyPath as vu, pendingMovesRefusalMessage as w, TemplateNoEchoReresolver as wa, STATE_REGION_DIVERGED as wc, supersededAfterRollback as wi, isListParameterType as wl, NOECHO_MAC_KEY_ALIAS as wn, s3BucketArn as wo, recheckFailedPlan as wr, maskedInputProof as ws, deleteTableWithIndexBusyRetry as wt, childTemplateLoader as x, applyCustomResourceResponseExpiration as xa, refuseMalformedOutputs as xc, deleteSupersededEntry as xi, renderNestedTemplateTreeDefect as xl, DeploymentEventsReader as xn, classifyReplaySecretRegion as xo, isJournaledOrphan as xr, maskedPropertyFingerprintsOf as xs, DELETE_INDEX_WAIT_PROCEED_NOTE as xt, parentSuppliedValues as y, wouldReturnToSdkProvider as ya, malformedOutputsWarning as yc, withStackRecords as yi, isAbsoluteAssetPath as yl, makeSiblingClaimReader as yn, envCredentialsAreAssumedRole as yo, seedsDeleteFirstGuard as yr, tryGetTopLevelWriteOnlyProperties as ys, resolveDynamoDbDeleteBudgetClock as yt, clearBucketRegionCache as yu, declaredStreamPolicyMember as z, waitForGoneAfterDelete as za, displayLogicalId as zc, withAttemptedItemsMasked as zi, redirectFileAsset as zl, changedReferencePath as zn, extractGetAttRefs as zo, nameGenerationCarriedFrom as zr, unreadableOrphanRecords as zs, sameMove as zt };
50849
+ //# sourceMappingURL=deploy-engine-axD9sX_9.js.map