@cdkd/cli 0.340.0 → 0.341.1

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 (38) hide show
  1. package/dist/{ambient-client-defaults-D2df_dIB.js → ambient-client-defaults-CtGTOtn9.js} +2 -2
  2. package/dist/{ambient-client-defaults-D2df_dIB.js.map → ambient-client-defaults-CtGTOtn9.js.map} +1 -1
  3. package/dist/{asg-provider-DrQNWTtu.js → asg-provider-BAtESAWA.js} +5 -5
  4. package/dist/{asg-provider-DrQNWTtu.js.map → asg-provider-BAtESAWA.js.map} +1 -1
  5. package/dist/{aws-failure-text-FKztQiaJ.js → aws-failure-text-zxW2CTmF.js} +149 -9
  6. package/dist/aws-failure-text-zxW2CTmF.js.map +1 -0
  7. package/dist/cli.js +2 -2
  8. package/dist/{db-instance-modify-retry-BJSwxkSE.js → db-instance-modify-retry-DWfH-8xJ.js} +4 -4
  9. package/dist/{db-instance-modify-retry-BJSwxkSE.js.map → db-instance-modify-retry-DWfH-8xJ.js.map} +1 -1
  10. package/dist/{deploy-engine-Bn_aBFb7.js → deploy-engine-CGUvIYNR.js} +12501 -12320
  11. package/dist/deploy-engine-CGUvIYNR.js.map +1 -0
  12. package/dist/{ecr-uri-B5zqA138.js → ecr-uri-XErmp-WT.js} +3 -3
  13. package/dist/{ecr-uri-B5zqA138.js.map → ecr-uri-XErmp-WT.js.map} +1 -1
  14. package/dist/{iam-role-provider-CRHaUz5M.js → iam-role-provider-D9Q0YoPK.js} +5 -5
  15. package/dist/{iam-role-provider-CRHaUz5M.js.map → iam-role-provider-D9Q0YoPK.js.map} +1 -1
  16. package/dist/index.d.ts +3 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +4 -4
  19. package/dist/{neptune-provider-BL93NXUx.js → neptune-provider-CdvFGM7h.js} +6 -6
  20. package/dist/{neptune-provider-BL93NXUx.js.map → neptune-provider-CdvFGM7h.js.map} +1 -1
  21. package/dist/{program-CuJKRAac.js → program-DTlJetBn.js} +180 -45
  22. package/dist/program-DTlJetBn.js.map +1 -0
  23. package/dist/{provider-classes-CRZ8a4sy.js → provider-classes-BlYx16N0.js} +282 -153
  24. package/dist/provider-classes-BlYx16N0.js.map +1 -0
  25. package/dist/{rds-provider-B-LP69hz.js → rds-provider-Dexme8bI.js} +215 -57
  26. package/dist/rds-provider-Dexme8bI.js.map +1 -0
  27. package/dist/{read-replica-DblnJp2B.js → read-replica-BZcBe5RN.js} +3 -3
  28. package/dist/{read-replica-DblnJp2B.js.map → read-replica-BZcBe5RN.js.map} +1 -1
  29. package/dist/{update-removal-DTvJXMeM.js → update-removal-CNj3wKPR.js} +3 -3
  30. package/dist/{update-removal-DTvJXMeM.js.map → update-removal-CNj3wKPR.js.map} +1 -1
  31. package/dist/{version-Y2LIzQUU.js → version-B9pb2Csa.js} +2 -2
  32. package/dist/{version-Y2LIzQUU.js.map → version-B9pb2Csa.js.map} +1 -1
  33. package/package.json +1 -1
  34. package/dist/aws-failure-text-FKztQiaJ.js.map +0 -1
  35. package/dist/deploy-engine-Bn_aBFb7.js.map +0 -1
  36. package/dist/program-CuJKRAac.js.map +0 -1
  37. package/dist/provider-classes-CRZ8a4sy.js.map +0 -1
  38. package/dist/rds-provider-B-LP69hz.js.map +0 -1
@@ -1,11 +1,11 @@
1
- import { t as getCdkdVersion } from "./version-Y2LIzQUU.js";
2
- import { $ as safeMsg, B as SAFE_MSG_ALTERED_CHAR, C as PATTERN_B_RESOURCE_TYPES, F as isNameGeneration, G as cutMarker, H as STACK_REF_MAX_CODE_POINTS, J as displaySafe, K as displayAwsMessage, L as withSkipPrefix, Q as plainIdentOr, R as withStackScope, S as PATTERN_B_NAME_PROPERTIES, T as generateResourceName, U as UNRENDERABLE, V as SECRET_REF_MAX_CODE_POINTS, W as asIsMessage, X as isPasteableIdent, Y as displayStackName, _ as explicitNamePropertyFor, a as safeStringify, c as isStdoutReservedForPayload, d as runStackBuffered, et as stringifyJsonPayload, l as reserveStdoutForPayload, m as getLiveRenderer, n as describeAwsFailure, nt as truncateCodePoints, q as displayIdent, s as getLogger, tt as terminalSafe, w as derivesPatternBName, x as PATTERN_B_NAME_OPTIONS } from "./aws-failure-text-FKztQiaJ.js";
3
- import { $a as assertFlagRoleArn, $c as noEchoCoordinatesOf, $d as renderAssemblyPathEscape, $l as isLockInfoExpired, $n as updatePartialReason, $s as malformedOrphansRefusalMessage, $t as NESTED_PENDING_PARENT_REASON, $u as redactDockerArgvValues, A as serviceTokenBlockingReason, Aa as UNSPECIFIED_SKIP_REASON, Ac as hasReadableResources, Ad as findLargeInlineResources, Ai as namingSecretsWithRecordedNoEcho, Al as dynamicReferenceTokens, An as rollbackOrphanIds, Ao as getAccountInfo, Ar as inheritProducerRegions, As as isReadableResourceEntry, Au as WorkGraph, Bd as StageLoadError, Bl as recordNestedStackParameterExpressions, Bn as propertiesChangedReason, Bo as unsettledItemsOf, Br as secretSafeKeyDisplay, Bs as refuseMalformedResourceEntriesForImportSave, Bt as recordRetainedForReadoption, Bu as getBootstrapMarkerKey, C as templateIdentity, Cc as JSON_LISTING_HOLE_VALUE, Cd as resolveUseCdkBootstrapAssets, Ci as noEchoExactEchoLeavesOf, Cl as errorCauseChain, Cn as DeploymentEventsStore, Co as lacksRecordedTableArn, Cr as nameGenerationHighWaterOf, Cs as previewableOrphanRecords, Cu as isAccessDenied, D as refusePendingMovesOut, Da as setResolvedResourceTimeouts, Dc as UNREADABLE_RESOURCES_MAP_ROW, Dd as CFN_TEMPLATE_BODY_LIMIT, Di as completedReplayEntries, Dl as withPhysicalNameCopies, Dn as findRefactorHints, Dr as retiredNameGenerationsLeaving, Ds as repairMalformedOrphanRecordsForReadOnly, Du as AssetPublisher, E as pendingMovesRefusalMessage, Ec as STATE_RESOURCES_MALFORMED, Ed as ssmResolvedValueType, Ei as createReadOnlyAttributeHealerFactory, El as scrubResourceRecord, En as formatDestructiveChange, Eo as keepHeldTokenProvenance, Er as retiredNameGenerationsAfter, Es as refuseMalformedOrphansForOrphan, Eu as withStackInstanceIdWithheld, F as isProtectionValueActive, Fd as PARTITION_TABLE, Fi as secretNamedRecordNeedles, Fl as inheritNestedStackParameterAssociations, Fn as differingRemedy, Fo as keepsSecretReferenceToken, Fr as WITHHELD_NAME_DISPLAY, Fs as refuseMalformedResourceAttributesForOrphan, Fu as AssetModeResolver, Ga as IntrinsicFunctionResolver, Gc as DagBuilder, Gd as defineOwnKey, Gi as ccRoutedFinalSnapshotError, Gl as recordMaskOnlyValuesIn, Gn as recordAfterRollbackUpdate, Go as shownType, Gr as noEchoParameterValueSeed, Gs as malformedResourcePropertiesWarning, Gt as refuseRefactorMarker, Gu as BOOTSTRAP_MARKER_PREFIX, Hd as describeJsonParseFailure, Hi as withSecretPhysicalIdsMaskedInState, Hl as carriesSecretMask, Hn as referencedLogicalIds, Ho as withUnsettledProperties, Hr as exportNameNoEchoParameters, Hs as repairMalformedResourceEntriesForReadOnly, Ht as readRefactorMarkerOnce, Hu as readBootstrapMarkerBody, I as perType, Ic as NO_CC_HANDLERS_REASON, Id as canonicalizeRegion, Ii as stateSecretNameNeedles, In as isPairableType, Io as withSharedDrainBudget, Ir as displayTextOrWithheld, Is as refuseMalformedResourceEntries, It as withResourceDeadline, Iu as ensureAssetStorage, Jc as isMarkedCoordinate, Jd as nullPrototypeRecord, Ji as isFinalSnapshotError, Jl as recordProvenPublicExpression, Jn as calculateResourceDrift, Jo as isStatefulRecreateTargetSync, Jr as isExportAliasCollision, Js as refuseMalformedResourcePropertiesForExport, Ju as describeDockerCapturedOutput, Ka as isAlwaysLiveAttribute, Kc as TemplateParser, Kd as hasOwnKey, Ki as ccRoutedInstanceTakesNoSnapshot, Kl as recordNoEchoAttributeValues, Kn as settleUnsettledPrevious, Ko as MULTI_REGION_RECREATE_BLOCKED_TYPES, Kr as collectDeclaredOutputNames, Ks as refuseMalformedResourcePropertiesForDestroy, Kt as sameMove, Ku as buildDockerImage, L as readProtection, Lc as hasNoCloudControlHandlers, Ld as derivePartitionAndUrlSuffix, Li as storedSecretNameNeedles, Ll as physicalNameCopiesOf, Ln as looselyEqual, Lo as INTRINSIC_KEYS, Lr as exportAliasCollisionScrubWarning, Ls as refuseMalformedResourceEntriesForDeploy, Lt as IMPLICIT_DELETE_DEPENDENCIES, Lu as buildDenyExternalAccessPolicy, M as recordedProtectionEvidence, Ma as deleteLeftInPlace, Mc as findHandledUnwrittenCreateOnly, Md as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Mi as secretNamePrintingBag, Ml as spelledKeysOf, Mn as changedReferenceInDiff, Mo as carriesFetchableDynamicReference, Mr as namesAnyDeclaredParameter, Ms as malformedLocalResourcesWarning, Mu as createAssetRedirectResolver, N as recordedProtectionNote, Na as deleteSkipReason, Nd as decodeListingKey, Ni as secretNamePrintingBags, Nl as pathCrossesDottedKey, Nn as changedReferencePath, No as isNamelessDynamicReferenceError, Nr as reachableDivergentParameters, Ns as malformedResourceEntriesWarning, Nu as loadPublishableAssetManifest, O as deferredServiceTokenWarning, Oa as slowCcOperationTimeoutMs, Oc as displayLogicalId, Od as CFN_TEMPLATE_URL_LIMIT, Oi as journaledOrphanPrintingBag, On as hintSidesOf, Oo as recordedOutputReferenceRegions, Or as withNameGenerationReached, Os as unpreviewableOrphanRecords, Ou as isSensitiveAttributeName, P as PROTECTION_PROPERTY_BY_TYPE, Pc as unwrittenCreateOnlyReplacement, Pd as expectedOwnerParam, Pl as identityKeyFor, Pn as changedReferenceReason, Po as carriesDynamicReference, Pr as resourcesNamingDeclaredParameter, Ps as malformedScrubResourceEntriesRefusalMessage, Pu as rewriteTemplateAssetReferences, Qa as applyRoleArnIfSet, Qc as maskedLeafCoordinatesOf, Qd as displayAssemblyPath, Qi as buildFinalSnapshotIdentifier, Ql as LockManager, Qn as updatePartialMessage, Qr as maskingRetryLogger, Qs as hasReadableOrphans, Qt as resolvePendingCloudControlRequests, Qu as redactedDockerCause, Rd as refuseFailedLookups, Ri as extractDeploymentEventError, Rn as mappingPairs, Rr as secretBearing, Rs as refuseMalformedResourceEntriesForDestroy, Rt as computeImplicitDeleteEdges, Ru as assertAssetBucketRegion, S as renderNestedTemplateTreeDefect, Sa as withPrintingSecrets, Sc as repairMalformedResourcesForReadOnly, Sd as resolveStateBucketWithDefaultAndSource, Si as noEchoComparisonForTemplate, Sl as createSecretMasker, Sn as DeploymentEventsReader, So as isStalePlaceholderArnAttribute, Sr as nameGenerationCarriedFrom, Ss as malformedOrphanRowsKeptWarning, Su as crossPrefixDeniedWarning, T as pendingMovesOutOf, Tc as withheldAccountClause, Td as warnDeprecatedNoPrefixCliFlag, Ti as withAttemptedItemsMasked, Tl as maskSecretsInText, Tn as findDestructiveChanges, Tr as retiredAfterRollback, Ts as refuseMalformedOrphanRecordsForDestroy, Tu as stackInstanceIdOf, Ua as isWaitAbandonedError, Ud as parseFailureDebugDetail, Ui as ATOMIC_FINAL_SNAPSHOT_TYPES, Ul as provenPublicValue, Un as replayFailedOperations, Uo as withoutUnsettledProperties, Ur as exportNameSecretExposure, Us as unreadableResourceEntries, Ut as refactorMarkerMovesOf, Uu as validateAssetBucketName, Vd as processStackMessages, Vi as secretSegmentsOfState, Vl as splitGetAttStringForm, Vn as proposeRenames, Vo as unsettledPropertiesOf, Vr as carriedExportAliasExposure, Vs as refuseMalformedResourceEntriesForOrphan, Vt as readRefactorMarker, Vu as parseBootstrapMarker, Wa as DiffCalculator, Wd as utf8ByteLength, Wi as PRE_DELETE_SNAPSHOT_TYPES, Wl as recordMaskOnlyValue, Wn as replayRollback, Wo as findReplacedReadersOfRecreateTargets, Wr as isWholeDynamicReferenceValue, Ws as malformedDriftResourcePropertiesWarning, Wt as refactorMarkerRefusalMessage, Wu as validateContainerRepoName, Xa as producerLookupOver, Xc as maskReadbackAtCoordinates, Xd as absoluteAssemblyPathEscape, Xi as unsupportedFinalSnapshotError, Xl as WHOLE_DYNAMIC_REFERENCE_PATTERN, Xn as equalModuloMask, Xr as DEFAULT_RESOURCE_TIMEOUT_MS, Xs as repairMalformedResourcePropertiesForReadOnly, Xt as formatResourceLine, Xu as describeDockerFailure, Ya as resolveDynamicReferences, Yc as maskAtCoordinates, Yd as ownValue, Yi as refusesFinalSnapshot, Yl as wholeStringLeavesOf, Yn as equalModuloMarkedMask, Yo as renderStatefulReason, Yr as bindingSkippedOutputs, Ys as refuseMalformedResourcePropertiesForOrphan, Yu as describeDockerExecFailure, Za as refuseUnreadableCdkCrossAccountRefs, Zc as maskWholeValue, Zd as describeFileReadFailure, Zi as createPreDeleteFinalSnapshot, Zl as isSingleDynamicReferenceToken, Zn as undeclaredEmptyObservedKeys, Zr as DEFAULT_RESOURCE_WARN_AFTER_MS, Zs as UNREADABLE_ORPHANS_CONTAINER_ROW, Zt as pendingRequestCount, Zu as redactedCause, _ as readRecordedConditionVerdicts, _a as customResourceResponseExpirationWarning, _c as malformedStateRefusalMessage, _d as resolveApp, _i as gray, _l as printingCorpusOf, _n as loadJournaledOrphans, _o as coerceParameterTypedValue, _s as declaresNoEcho, _u as timePhase, ac as malformedExportSourceWarning, ad as isMalformedEnvKey, ai as deleteSupersededEntry, al as recordedNoEchoValuesOf, an as recordDisplacedSkips, ao as applyCallerIdentityCredentials, ar as planRollback, au as hasReadableExportSet, b as isAbsoluteAssetPath, ba as isCustomResourceType$1, bc as refuseMalformedResourcesForExport, bd as resolveSkipPrefix, bi as yellow, bl as shareLogOnlyValues, bn as makeSiblingClaimReader, bo as AWS_NO_VALUE, br as removeProtectionTypeList, bs as malformedOrphanRecordsRefusalMessage, bu as CrossPrefixScanCache, c as mergeNoChangeOutputs, cc as malformedOutputsWarning, cd as runDockerForeground, ci as removeSuperseded, cn as withNestedRevertRun, co as classifyRecordedSecretRegion, cr as isJournaledOrphan, cu as isReadableBag, d as crossStackOutputProvenanceSource, da as ProviderRegistry, dc as refuseMalformedOutputsForDestroy, dd as getDockerImageBySourceHash, di as supersededHolderOf, dn as withNestedStackContext, do as regionLessSecretName, dr as recheckFailedPlan, ds as prefetchCreateOnlyPropertyPaths, du as shouldRetainResource, ec as malformedOrphansWarning, ed as dockerSpawnEnvWithSensitive, ef as resolveAssemblyPath, ei as destroyStackRecordsView, el as noEchoLeavesOf, en as displacedOpClause, eo as assertSendableRoleArn, eu as S3StateBackend, f as inheritedProvenanceForChildDiff, fa as ccBrokenReason, fc as repairMalformedOutputsForReadOnly, fd as Synthesizer, fi as supersededResourcesOf, fl as carryLogOnlyValues, fn as deleteJournaledOrphans, fr as recordUnderIdIsNotOwn, fs as templateResourceTypes, fu as stackInstanceIdCarriedFrom, g as parentSuppliedValues, ga as applyCustomResourceResponseExpiration, gc as malformedResourcesWarning, gd as loadCdkJson, gi as cyan, gl as logOnlyValueCount, gn as journaledOrphanLines, gu as renderPhaseTimings, h as conditionInputsFrom, ha as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, hc as malformedRenderedContainersWarning, hd as getLegacyStateBucketName, hi as bold, hl as literalSplitDelimitersOf, hn as isHandledOrphan, hr as findNestedStackTypeChanges, hs as parameterInputsFor, hu as PhaseClock, ic as malformedExportNamesWarning, id as isDockerClientEnvKey, if as resolveBucketRegion, ii as addSuperseded, il as readsNoEchoSource, in as nestedChildStackName$1, io as AWS_CREDENTIAL_ENV_KEYS, iu as exportNamesCarriedFrom, j as diffSecurity, ja as deleteIndeterminateGuards, jc as findActionableSdkUnwired, jd as uploadCfnTemplate, ji as orphanRecordsPrintingBag, jl as isUncertifiedBaselineMaskPosition, jn as withMovedTo, jo as isImpossibleEmptyStoredAttribute, jr as computeParameterTaint, js as malformedLocalResourceEntriesWarning, ju as buildAssetRedirectMap, k as findServiceTokenRefusals, ka as RollbackInlinePolicyWriters, kc as hasReadableOutputs, kd as MIGRATE_TMP_PREFIX, ki as maskEventTextWithBoundBags, kl as DYNAMIC_REFERENCE_TOKEN_SCAN, kn as movedToHint, ko as recordedReferenceRegions, ks as unreadableOrphanRecords, ku as stringifyValue, l as scanActiveConsumers, ld as runDockerStreaming, li as supersededAfterRollback, ll as redactForState, ln as collectNestedChildUnaddressed, lo as classifyReplaySecretRegion, lr as isReplacementOrphan, lu as orphansAfterRollback, m as conditionFingerprint, ma as wouldReturnToSdkProvider, mc as refuseDivergentRecordRegionForDestroy, md as getDefaultStateBucketName, ml as hasMaskableValues, mn as dropFailedHint, mr as resolveReplacementOldType, ms as withRetry, mu as hasUnverifiableParameterRefusal, nc as refuseMalformedOrphansForDestroy, nd as partitionSensitiveEnv, nf as injectedAwsRegionValue, ni as withStackRecords, nn as dropSettledNestedJournals, no as isIamRoleArn, nu as acceptedCreateOnlyDropsOf, o as isSecretBearingReferenceString, oc as malformedLocalOutputsWarning, od as formatDockerLoginError, oi as holdsSupersededResources, ol as valueAtCoordinate, oo as callerEnvCredentials, or as seedsDeleteFirstGuard, ou as importableOutputKeys, p as makeCanonicalizePropertiesFn, pa as isCustomResource, pc as STATE_REGION_DIVERGED, pd as synthesisStatusMessage, pi as withoutSuperseded, pl as createUnionSecretMasker, pn as dropFailedCommands, pr as replacementNeverSwapped, ps as describeTypeWithThrottleRetry, pu as hasReasonlessBaselineRefusal, qa as poisonRenderedSpellingsCollidingIn, qc as canonicalCoordinates, qd as hasPlainPrototype, qi as effectiveDeletionPolicy, ql as recordNoEchoParameterFreshValue, qn as withUnprovenUnsettled, qo as isStatefulRecreateTargetForReplace, qr as collectPublishedOutputNames, qs as refuseMalformedResourcePropertiesForDrift, qt as updateRefactorMarker, qu as resolveDockerContextDirectory, rc as repairMalformedOrphansForReadOnly, rd as warnFinchArgvExposure, rl as readbackPathFor, ro as sendableAssumeRoleCommand, rr as withCreateTokenLedger, ru as describeRegionValueKind, s as keptWholeReasonText, sc as malformedOutputsRefusalMessage, sd as getDockerCmd, si as isSupersededResourceRecord, sl as liveMatchesUnresolvedTokenFrame, sn as revertedNestedRowIds, so as envCredentialsAreAssumedRole, sr as demoteSupersededOrphans, su as importableOutputs, t as DeployEngine, tc as refuseMalformedOrphans, td as finchSecretArgvRefusal, tf as injectAwsRegion, tl as noEchoOutputsComparison, tn as displacedPhysicalIdShown, to as explicitRoleArnOrThrow, tr as ledgerForStack, ts as coerceCfnBoolean, tu as splitImportedOps, u as inRunStackKey, ua as CC_BROKEN_REASON, uc as refuseMalformedOutputs, ud as AssetManifestLoader, ui as supersededHeldByOtherTypeWarning, un as getCurrentNestedStackContext, uo as producerRegionsFromState, ur as planFailedOps, uu as orphansCarriedFrom, v as childTemplateLoader, va as TemplateNoEchoReresolver, vc as refuseMalformedResourcesForDeploy, vd as resolveAutoAssetStorage, vi as green, vl as recordLogOnlyParameterValue, vn as sameJournaledOrphans, vo as isUnboundTemplateParameter, vs as deployRefusesOrphanRowsReason, vu as rebuildClientForBucketRegion, w as hasPendingMovesOut, wa as CloudControlProvider, wc as accountArgs, wd as stateBucketExistenceConfirmed, wi as noEchoParameterNamesOf, wl as maskSecretsInError, wn as constructPathOf$1, wo as refStateLookupFromResource, wr as nameScopeOf, ws as refuseMalformedOrphanRecords, wu as isNotImplemented, x as listNestedTemplateRows, xc as refuseMalformedState, xd as resolveStateBucketWithDefault, xi as noEchoAttributeNamesOf, xl as unionOfSecretBags, xn as planOrphanAdoption, xo as cfnRefValueFromPhysicalId, xr as orphanNeedsIdentity, xs as malformedOrphanRecordsWarning, xu as applyCrossPrefixScan, y as findNestedTemplateTreeDefect, ya as readsNoEchoDeleteValues, yc as refuseMalformedResourcesForDestroy, yd as resolveCaptureObservedState, yi as red, yl as recordLogOnlyValue, yn as makeForeignHolderScan, yo as parameterTypeMayLoseSecretIdentity, ys as isReadableOrphanRecord, yu as CrossPrefixReadError, zd as AssemblyReader, zl as recordPhysicalNameCopy, zn as parseMappingFile, zo as unsettledItemsField, zr as secretBearingStateKeyWarning, zs as refuseMalformedResourceEntriesForImport, zt as keptForRetainedRecord, zu as isCrossRegionRedirect } from "./deploy-engine-Bn_aBFb7.js";
4
- import { $ as DeployCancelledError, A as stripForDisplay, Ct as setPasteableVerbFlags, H as isThrottlingError, J as IntrinsicResolutionRefusalError, K as CrossAccountSecretRefusalError, L as isRetryableTransientError, O as escapeRegExp, P as isAmbiguousOutcomeError, Q as CdkdError, R as isTransientServerError, St as setPasteableRunFlags, U as markNonRetryable, V as isMarkedNonRetryable, X as AccountIdUnavailableError, Y as MalformedProducerRecordRefusalError, _ as StackHasActiveImportsError, _t as plainOrDescribed, a as normalizeAwsError, at as StateError, bt as shellQuote, c as withErrorHandling, ct as TIMEOUT_FLAG_RESOURCE_TYPE, ft as commandHole, g as ResourceUpdateNotSupportedError, h as PartialFailureError, ht as pasteableCommand, i as credentialFingerprint, it as ResourceTimeoutError, k as stripControlChars, l as LocalStartServiceError, m as NestedStackChildDirectDestroyError, mt as isInertUnquoted, n as ambientCredentialConfig, o as formatError, ot as SynthesisError, q as DynamicReferenceRegionAmbiguousError, r as clientDefaultsFor, rt as ProvisioningError, t as ambientClientDefaults, tt as LocalInvokeBuildError$1, ut as SHELL_ACTIVE_WHY, v as StackTerminationProtectionError, vt as quotedOrDescribed, xt as withheldTargetClause, yt as shellBoundedDisplay, z as retryClassificationText } from "./ambient-client-defaults-D2df_dIB.js";
5
- import { $t as forceQuitRecoveryClause, Dt as logicalIdShown, H as assertRegionMatch, M as VALUE_NOT_SHOWN, Qt as buildLockContentionMessage, U as isMarkedNotGone, V as RESOURCE_NOT_FOUND, Xt as UNREPRODUCIBLE_LOCK_CLAUSE, Zt as buildForceUnlockCommand, an as CUSTOM_RESOURCE_RESPONSE_PREFIX, bt as interruptWatchListenerCount, dn as setPasteableAwsProfile, en as formatLockExpiry, fn as withPasteableAwsProfile, kt as resourceTypeShown, ln as producerCoordinateKey, m as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, mt as isAwsCliLiteral, nn as formatLockOwner, on as DEFAULT_STATE_PREFIX, p as IAM_PRINCIPAL_NAME, sn as injectiveKey, st as runDeleteAttempt, tn as formatLockOperation, un as producerRecordKey, vt as beginCommandInterruptScope, xt as isInterruptedWaitError, y as readRecordedPrincipals, yt as endCommandInterruptScope, z as remedyLogicalId } from "./update-removal-DTvJXMeM.js";
1
+ import { t as getCdkdVersion } from "./version-B9pb2Csa.js";
2
+ import { $ as UNRENDERABLE, F as generateResourceName, G as isNameGeneration, J as withStackScope, M as PATTERN_B_NAME_PROPERTIES, N as PATTERN_B_RESOURCE_TYPES, P as derivesPatternBName, Q as STACK_REF_MAX_CODE_POINTS, X as SAFE_MSG_ALTERED_CHAR, Z as SECRET_REF_MAX_CODE_POINTS, _ as explicitNamePropertyFor, a as safeStringify, at as displayStackName, c as isStdoutReservedForPayload, ct as plainIdentOr, d as runStackBuffered, dt as terminalSafe, et as asIsMessage, ft as truncateCodePoints, it as displaySafe, j as PATTERN_B_NAME_OPTIONS, l as reserveStdoutForPayload, lt as safeMsg, m as getLiveRenderer, n as describeAwsFailure, nt as displayAwsMessage, ot as isPasteableIdent, q as withSkipPrefix, rt as displayIdent, s as getLogger, tt as cutMarker, ut as stringifyJsonPayload, x as coerceCfnBoolean } from "./aws-failure-text-zxW2CTmF.js";
3
+ import { $a as refuseUnreadableCdkCrossAccountRefs, $c as liveMatchesUnresolvedTokenFrame, $i as createPreDeleteFinalSnapshot, $l as importableOutputs, $n as updatePartialMessage, $r as DEFAULT_RESOURCE_WARN_AFTER_MS, $s as malformedOutputsRefusalMessage, $t as NESTED_PENDING_PARENT_REASON, $u as getDockerCmd, A as PROTECTION_PROPERTY_BY_TYPE, Aa as slowCcOperationTimeoutMs, Ad as refuseFailedLookups, Ai as journaledOrphanPrintingBag, An as rollbackOrphanIds, Ao as recordedOutputReferenceRegions, Ar as withNameGenerationReached, As as refuseMalformedResourceEntriesForDestroy, Au as assertAssetBucketRegion, Bc as isMarkedCoordinate, Bd as nullPrototypeRecord, Bi as extractDeploymentEventError, Bl as recordProvenPublicExpression, Bn as propertiesChangedReason, Br as secretBearing, Bs as refuseMalformedResourcePropertiesForExport, Bt as refactorMarkerRefusalMessage, Bu as describeDockerCapturedOutput, C as refusePendingMovesOut, Cc as findActionableSdkUnwired, Cd as uploadCfnTemplate, Ci as noEchoAttributeNamesOf, Cl as isUncertifiedBaselineMaskPosition, Cn as DeploymentEventsStore, Co as cfnRefValueFromPhysicalId, Cr as orphanNeedsIdentity, Cs as malformedLocalResourceEntriesWarning, Cu as buildAssetRedirectMap, D as diffSecurity, Dd as PARTITION_TABLE, Di as withAttemptedItemsMasked, Dl as inheritNestedStackParameterAssociations, Dn as findRefactorHints, Dr as retiredAfterRollback, Ds as refuseMalformedResourceAttributesForOrphan, Du as AssetModeResolver, E as serviceTokenBlockingReason, Ea as CloudControlProvider, Ec as unwrittenCreateOnlyReplacement, Ed as expectedOwnerParam, Ei as noEchoParameterNamesOf, El as identityKeyFor, En as formatDestructiveChange, Eo as refStateLookupFromResource, Er as nameScopeOf, Es as malformedScrubResourceEntriesRefusalMessage, Eu as rewriteTemplateAssetReferences, Fa as deleteSkipReason, Fd as parseFailureDebugDetail, Fi as secretNamePrintingBags, Fl as provenPublicValue, Fn as differingRemedy, Fo as isNamelessDynamicReferenceError, Fr as reachableDivergentParameters, Fs as unreadableResourceEntries, Ft as keptForRetainedRecord, Fu as validateAssetBucketName, Ga as isWaitAbandonedError, Gc as noEchoCoordinatesOf, Gd as renderAssemblyPathEscape, Gi as ATOMIC_FINAL_SNAPSHOT_TYPES, Gl as isLockInfoExpired, Gn as DELETED_RESOURCE_REMEDY, Go as withoutUnsettledProperties, Gr as exportNameSecretExposure, Gs as malformedOrphansRefusalMessage, Gu as redactDockerArgvValues, Hc as maskReadbackAtCoordinates, Hd as absoluteAssemblyPathEscape, Hl as WHOLE_DYNAMIC_REFERENCE_PATTERN, Hn as referencedLogicalIds, Ho as unsettledItemsOf, Hr as secretSafeKeyDisplay, Hs as repairMalformedResourcePropertiesForReadOnly, Ht as sameMove, Hu as describeDockerFailure, Id as utf8ByteLength, Il as recordMaskOnlyValue, In as isPairableType, Io as carriesDynamicReference, Ir as resourcesNamingDeclaredParameter, Is as malformedDriftResourcePropertiesWarning, It as recordRetainedForReadoption, Iu as validateContainerRepoName, Ja as isAlwaysLiveAttribute, Jd as injectedAwsRegionValue, Ji as ccRoutedInstanceTakesNoSnapshot, Jl as acceptedCreateOnlyDropsOf, Jn as withUnprovenUnsettled, Jo as MULTI_REGION_RECREATE_BLOCKED_TYPES, Jr as collectDeclaredOutputNames, Js as refuseMalformedOrphansForDestroy, Ju as partitionSensitiveEnv, Ka as DiffCalculator, Kc as noEchoLeavesOf, Kd as resolveAssemblyPath, Ki as PRE_DELETE_SNAPSHOT_TYPES, Kl as S3StateBackend, Kn as recordAfterRollbackUpdate, Ko as findReplacedReadersOfRecreateTargets, Kr as isWholeDynamicReferenceValue, Ks as malformedOrphansWarning, Kt as formatResourceLine, Ku as dockerSpawnEnvWithSensitive, Lc as DagBuilder, Ld as defineOwnKey, Li as secretNamedRecordNeedles, Ll as recordMaskOnlyValuesIn, Ln as looselyEqual, Lo as keepsSecretReferenceToken, Lr as WITHHELD_NAME_DISPLAY, Ls as malformedResourcePropertiesWarning, Lt as readRefactorMarker, Lu as BOOTSTRAP_MARKER_PREFIX, M as perType, Ma as UNSPECIFIED_SKIP_REASON, Md as StageLoadError, Mi as namingSecretsWithRecordedNoEcho, Ml as recordNestedStackParameterExpressions, Mn as changedReferenceInDiff, Mo as getAccountInfo, Mr as inheritProducerRegions, Ms as refuseMalformedResourceEntriesForImportSave, Mt as withResourceDeadline, Mu as getBootstrapMarkerKey, N as readProtection, Na as deleteIndeterminateGuards, Nd as processStackMessages, Ni as orphanRecordsPrintingBag, Nl as splitGetAttStringForm, Nn as changedReferencePath, No as isImpossibleEmptyStoredAttribute, Nr as computeParameterTaint, Ns as refuseMalformedResourceEntriesForOrphan, Nt as IMPLICIT_DELETE_DEPENDENCIES, Nu as parseBootstrapMarker, O as recordedProtectionEvidence, Oc as NO_CC_HANDLERS_REASON, Od as canonicalizeRegion, Oi as createReadOnlyAttributeHealerFactory, On as hintSidesOf, Oo as keepHeldTokenProvenance, Or as retiredNameGenerationsAfter, Os as refuseMalformedResourceEntries, Ou as ensureAssetStorage, Pa as deleteLeftInPlace, Pd as describeJsonParseFailure, Pi as secretNamePrintingBag, Pl as carriesSecretMask, Pn as changedReferenceReason, Po as carriesFetchableDynamicReference, Pr as namesAnyDeclaredParameter, Ps as repairMalformedResourceEntriesForReadOnly, Pt as computeImplicitDeleteEdges, Pu as readBootstrapMarkerBody, Qa as producerLookupOver, Qc as valueAtCoordinate, Qi as unsupportedFinalSnapshotError, Ql as importableOutputKeys, Qn as undeclaredEmptyObservedKeys, Qr as DEFAULT_RESOURCE_TIMEOUT_MS, Qs as malformedLocalOutputsWarning, Qt as resolvePendingCloudControlRequests, Qu as formatDockerLoginError, Rc as TemplateParser, Rd as hasOwnKey, Ri as stateSecretNameNeedles, Rl as recordNoEchoAttributeValues, Rn as mappingPairs, Ro as withSharedDrainBudget, Rr as displayTextOrWithheld, Rs as refuseMalformedResourcePropertiesForDestroy, Rt as readRefactorMarkerOnce, Ru as buildDockerImage, S as pendingMovesRefusalMessage, Sa as isCustomResourceType$1, Sc as hasReadableResources, Sd as findLargeInlineResources, Si as yellow, Sl as dynamicReferenceTokens, Sn as DeploymentEventsReader, So as AWS_NO_VALUE, Sr as removeProtectionTypeList, Ss as isReadableResourceEntry, Su as WorkGraph, T as findServiceTokenRefusals, Td as decodeListingKey, Ti as noEchoExactEchoLeavesOf, Tl as pathCrossesDottedKey, Tn as findDestructiveChanges, To as lacksRecordedTableArn, Tr as nameGenerationHighWaterOf, Ts as malformedResourceEntriesWarning, Tu as loadPublishableAssetManifest, Uc as maskWholeValue, Ud as describeFileReadFailure, Ui as secretSegmentsOfState, Ul as isSingleDynamicReferenceToken, Un as replayFailedOperations, Uo as unsettledPropertiesOf, Ur as carriedExportAliasExposure, Us as UNREADABLE_ORPHANS_CONTAINER_ROW, Ut as updateRefactorMarker, Uu as redactedCause, Vc as maskAtCoordinates, Vd as ownValue, Vl as wholeStringLeavesOf, Vn as proposeRenames, Vo as unsettledItemsField, Vr as secretBearingStateKeyWarning, Vs as refuseMalformedResourcePropertiesForOrphan, Vt as refuseRefactorMarker, Vu as describeDockerExecFailure, Wc as maskedLeafCoordinatesOf, Wd as displayAssemblyPath, Wi as withSecretPhysicalIdsMaskedInState, Wl as LockManager, Wn as replayRollback, Wo as withUnsettledProperties, Wr as exportNameNoEchoParameters, Ws as hasReadableOrphans, Wu as redactedDockerCause, Xc as readsNoEchoSource, Xd as resolveBucketRegion, Xi as isFinalSnapshotError, Xl as exportNamesCarriedFrom, Xn as equalModuloMarkedMask, Xo as isStatefulRecreateTargetSync, Xr as isExportAliasCollision, Xs as malformedExportNamesWarning, Xu as isDockerClientEnvKey, Ya as poisonRenderedSpellingsCollidingIn, Yc as readbackPathFor, Yi as effectiveDeletionPolicy, Yl as describeRegionValueKind, Yn as calculateResourceDrift, Yo as isStatefulRecreateTargetForReplace, Yr as collectPublishedOutputNames, Ys as repairMalformedOrphansForReadOnly, Yu as warnFinchArgvExposure, Za as resolveDynamicReferences, Zc as recordedNoEchoValuesOf, Zi as refusesFinalSnapshot, Zl as hasReadableExportSet, Zn as equalModuloMask, Zo as renderStatefulReason, Zr as bindingSkippedOutputs, Zs as malformedExportSourceWarning, Zt as pendingRequestCount, Zu as isMalformedEnvKey, _ as listNestedTemplateRows, _a as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, _c as withheldAccountClause, _d as warnDeprecatedNoPrefixCliFlag, _i as bold, _l as maskSecretsInText, _n as loadJournaledOrphans, _r as findNestedStackTypeChanges, _s as refuseMalformedOrphanRecordsForDestroy, _u as stackInstanceIdOf, a as scanActiveConsumers, ac as STATE_REGION_DIVERGED, ad as synthesisStatusMessage, al as createUnionSecretMasker, an as recordDisplacedSkips, ao as sendableAssumeRoleCommand, as as describeTypeWithThrottleRetry, au as hasReasonlessBaselineRefusal, b as hasPendingMovesOut, ba as TemplateNoEchoReresolver, bc as displayLogicalId, bd as CFN_TEMPLATE_URL_LIMIT, bi as green, bn as makeSiblingClaimReader, bo as isUnboundTemplateParameter, bs as unpreviewableOrphanRecords, bu as isSensitiveAttributeName, c as inheritedProvenanceForChildDiff, cc as malformedResourcesWarning, cd as loadCdkJson, ci as holdsSupersededResources, cl as logOnlyValueCount, cn as withNestedRevertRun, co as callerEnvCredentials, cr as demoteSupersededOrphans, cu as renderPhaseTimings, d as conditionInputsFrom, dc as refuseMalformedResourcesForDestroy, dd as resolveCaptureObservedState, di as supersededAfterRollback, dl as recordLogOnlyValue, dn as withNestedStackContext, do as classifyReplaySecretRegion, dr as planFailedOps, ds as isReadableOrphanRecord, du as CrossPrefixReadError, ea as buildFinalSnapshotIdentifier, ec as malformedOutputsWarning, ed as runDockerForeground, ei as maskingRetryLogger, en as displacedOpClause, eo as applyRoleArnIfSet, er as updatePartialReason, eu as isReadableBag, f as parentSuppliedValues, fa as CC_BROKEN_REASON, fc as refuseMalformedResourcesForExport, fd as resolveSkipPrefix, fi as supersededHeldByOtherTypeWarning, fl as shareLogOnlyValues, fn as deleteJournaledOrphans, fo as producerRegionsFromState, fr as recheckFailedPlan, fs as malformedOrphanRecordsRefusalMessage, fu as CrossPrefixScanCache, g as isAbsoluteAssetPath, ga as wouldReturnToSdkProvider, gc as accountArgs, gd as stateBucketExistenceConfirmed, gl as maskSecretsInError, gn as journaledOrphanLines, gr as withPreviousPolicies, gs as refuseMalformedOrphanRecords, gu as isNotImplemented, h as findNestedTemplateTreeDefect, ha as isCustomResource, hc as JSON_LISTING_HOLE_VALUE, hd as resolveUseCdkBootstrapAssets, hi as withoutSuperseded, hl as errorCauseChain, hn as isHandledOrphan, hr as resolveReplacementOldType, hs as previewableOrphanRecords, hu as isAccessDenied, i as mergeNoChangeOutputs, ic as repairMalformedOutputsForReadOnly, id as Synthesizer, ii as withStackRecords, il as carryLogOnlyValues, in as nestedChildStackName$1, io as isIamRoleArn, ir as withCreateTokenLedger, is as templateResourceTypes, iu as stackInstanceIdCarriedFrom, j as isProtectionValueActive, ja as RollbackInlinePolicyWriters, jd as AssemblyReader, ji as maskEventTextWithBoundBags, jl as recordPhysicalNameCopy, jn as withMovedTo, jo as recordedReferenceRegions, js as refuseMalformedResourceEntriesForImport, ju as isCrossRegionRedirect, k as recordedProtectionNote, ka as setResolvedResourceTimeouts, kc as hasNoCloudControlHandlers, kd as derivePartitionAndUrlSuffix, ki as completedReplayEntries, kl as physicalNameCopiesOf, kn as movedToHint, kr as retiredNameGenerationsLeaving, ks as refuseMalformedResourceEntriesForDeploy, ku as buildDenyExternalAccessPolicy, l as makeCanonicalizePropertiesFn, lc as malformedStateRefusalMessage, ld as resolveApp, li as isSupersededResourceRecord, ll as printingCorpusOf, ln as collectNestedChildUnaddressed, lo as envCredentialsAreAssumedRole, lr as isJournaledOrphan, ls as declaresNoEcho, lu as timePhase, m as childTemplateLoader, ma as ccBrokenReason, mc as repairMalformedResourcesForReadOnly, md as resolveStateBucketWithDefaultAndSource, mi as supersededResourcesOf, ml as createSecretMasker, mn as dropFailedHint, mr as replacementNeverSwapped, ms as malformedOrphanRowsKeptWarning, mu as crossPrefixDeniedWarning, n as isSecretBearingReferenceString, nc as refuseMalformedOutputs, nd as AssetManifestLoader, ni as destroyStackRecordsView, nn as dropSettledNestedJournals, no as assertSendableRoleArn, nr as ledgerForStack, nu as orphansCarriedFrom, o as inRunStackKey, oc as refuseDivergentRecordRegionForDestroy, od as getDefaultStateBucketName, oi as addSuperseded, ol as hasMaskableValues, oo as AWS_CREDENTIAL_ENV_KEYS, or as planRollback, os as withRetry, ou as hasUnverifiableParameterRefusal, p as readRecordedConditionVerdicts, pa as ProviderRegistry, pc as refuseMalformedState, pd as resolveStateBucketWithDefault, pi as supersededHolderOf, pl as unionOfSecretBags, pn as dropFailedCommands, po as regionLessSecretName, pr as recordUnderIdIsNotOwn, ps as malformedOrphanRecordsWarning, pu as applyCrossPrefixScan, qa as IntrinsicFunctionResolver, qc as noEchoOutputsComparison, qd as injectAwsRegion, qi as ccRoutedFinalSnapshotError, ql as splitImportedOps, qn as settleUnsettledPrevious, qo as shownType, qr as noEchoParameterValueSeed, qs as refuseMalformedOrphans, qu as finchSecretArgvRefusal, r as keptWholeReasonText, rc as refuseMalformedOutputsForDestroy, rd as getDockerImageBySourceHash, ro as explicitRoleArnOrThrow, rs as prefetchCreateOnlyPropertyPaths, ru as shouldRetainResource, s as crossStackOutputProvenanceSource, sc as malformedRenderedContainersWarning, sd as getLegacyStateBucketName, si as deleteSupersededEntry, sl as literalSplitDelimitersOf, sn as revertedNestedRowIds, so as applyCallerIdentityCredentials, sr as seedsDeleteFirstGuard, ss as parameterInputsFor, su as PhaseClock, t as DeployEngine, td as runDockerStreaming, tl as redactForState, tn as displacedPhysicalIdShown, to as assertFlagRoleArn, tu as orphansAfterRollback, u as conditionFingerprint, uc as refuseMalformedResourcesForDeploy, ud as resolveAutoAssetStorage, ui as removeSuperseded, ul as recordLogOnlyParameterValue, un as getCurrentNestedStackContext, uo as classifyRecordedSecretRegion, ur as isReplacementOrphan, us as deployRefusesOrphanRowsReason, uu as rebuildClientForBucketRegion, v as renderNestedTemplateTreeDefect, va as applyCustomResourceResponseExpiration, vc as STATE_RESOURCES_MALFORMED, vd as ssmResolvedValueType, vi as cyan, vl as scrubResourceRecord, vn as sameJournaledOrphans, vs as refuseMalformedOrphansForOrphan, vu as withStackInstanceIdWithheld, w as deferredServiceTokenWarning, wa as withPrintingSecrets, wc as findHandledUnwrittenCreateOnly, wd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, wi as noEchoComparisonForTemplate, wl as spelledKeysOf, wn as constructPathOf$1, wo as isStalePlaceholderArnAttribute, wr as nameGenerationCarriedFrom, ws as malformedLocalResourcesWarning, wu as createAssetRedirectResolver, x as pendingMovesOutOf, xa as readsNoEchoDeleteValues, xc as hasReadableOutputs, xd as MIGRATE_TMP_PREFIX, xi as red, xl as DYNAMIC_REFERENCE_TOKEN_SCAN, xn as planOrphanAdoption, xo as parameterTypeMayLoseSecretIdentity, xs as unreadableOrphanRecords, xu as stringifyValue, y as templateIdentity, ya as customResourceResponseExpirationWarning, yc as UNREADABLE_RESOURCES_MAP_ROW, yd as CFN_TEMPLATE_BODY_LIMIT, yi as gray, yl as withPhysicalNameCopies, yn as makeForeignHolderScan, yo as coerceParameterTypedValue, ys as repairMalformedOrphanRecordsForReadOnly, yu as AssetPublisher, zc as canonicalCoordinates, zd as hasPlainPrototype, zi as storedSecretNameNeedles, zl as recordNoEchoParameterFreshValue, zn as parseMappingFile, zo as INTRINSIC_KEYS, zr as exportAliasCollisionScrubWarning, zs as refuseMalformedResourcePropertiesForDrift, zt as refactorMarkerMovesOf, zu as resolveDockerContextDirectory } from "./deploy-engine-CGUvIYNR.js";
4
+ import { $ as DeployCancelledError, A as stripForDisplay, Ct as setPasteableVerbFlags, H as isThrottlingError, J as IntrinsicResolutionRefusalError, K as CrossAccountSecretRefusalError, L as isRetryableTransientError, O as escapeRegExp, P as isAmbiguousOutcomeError, Q as CdkdError, R as isTransientServerError, St as setPasteableRunFlags, U as markNonRetryable, V as isMarkedNonRetryable, X as AccountIdUnavailableError, Y as MalformedProducerRecordRefusalError, _ as StackHasActiveImportsError, _t as plainOrDescribed, a as normalizeAwsError, at as StateError, bt as shellQuote, c as withErrorHandling, ct as TIMEOUT_FLAG_RESOURCE_TYPE, ft as commandHole, g as ResourceUpdateNotSupportedError, h as PartialFailureError, ht as pasteableCommand, i as credentialFingerprint, it as ResourceTimeoutError, k as stripControlChars, l as LocalStartServiceError, m as NestedStackChildDirectDestroyError, mt as isInertUnquoted, n as ambientCredentialConfig, o as formatError, ot as SynthesisError, q as DynamicReferenceRegionAmbiguousError, r as clientDefaultsFor, rt as ProvisioningError, t as ambientClientDefaults, tt as LocalInvokeBuildError$1, ut as SHELL_ACTIVE_WHY, v as StackTerminationProtectionError, vt as quotedOrDescribed, xt as withheldTargetClause, yt as shellBoundedDisplay, z as retryClassificationText } from "./ambient-client-defaults-CtGTOtn9.js";
5
+ import { $t as forceQuitRecoveryClause, Dt as logicalIdShown, H as assertRegionMatch, M as VALUE_NOT_SHOWN, Qt as buildLockContentionMessage, U as isMarkedNotGone, V as RESOURCE_NOT_FOUND, Xt as UNREPRODUCIBLE_LOCK_CLAUSE, Zt as buildForceUnlockCommand, an as CUSTOM_RESOURCE_RESPONSE_PREFIX, bt as interruptWatchListenerCount, dn as setPasteableAwsProfile, en as formatLockExpiry, fn as withPasteableAwsProfile, kt as resourceTypeShown, ln as producerCoordinateKey, m as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, mt as isAwsCliLiteral, nn as formatLockOwner, on as DEFAULT_STATE_PREFIX, p as IAM_PRINCIPAL_NAME, sn as injectiveKey, st as runDeleteAttempt, tn as formatLockOperation, un as producerRecordKey, vt as beginCommandInterruptScope, xt as isInterruptedWaitError, y as readRecordedPrincipals, yt as endCommandInterruptScope, z as remedyLogicalId } from "./update-removal-CNj3wKPR.js";
6
6
  import { a as runWithStackAwsClients, i as resetAwsClients, l as s3ClientDefaults, o as setAwsClients, s as resolveS3ClientDefaults, t as AwsClients, u as setS3ClientDefaultsDebugLog } from "./aws-clients-D3Z_tFc1.js";
7
7
  import { a as setAssumedRoleCredentials, d as formatAuthority, i as getPreAssumeEnvCredentials, n as awsClientDefaults, r as getAssumedRoleCredentials, u as runInStackAwsScope } from "./aws-client-defaults-BLXFsfMa.js";
8
- import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-B5zqA138.js";
8
+ import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-XErmp-WT.js";
9
9
  import { t as cdkdCacheHome } from "./cli.js";
10
10
  import { randomBytes, randomUUID } from "node:crypto";
11
11
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -293,6 +293,9 @@ const strictGetattOption = new Option("--strict-getatt", "Fail the deploy on ANY
293
293
  const allowUnaddressedOption = new Option("--allow-unaddressed", "Exit 0 even when the deploy left a resource unaddressed — a DELETE the provider could not issue, or a replacement whose old resource survives untracked (default: exit 2, matching cdkd destroy). The summary rows and warnings are printed either way; only the exit code changes.").default(false);
294
294
  const noCfnFallbackOption = new Option("--no-cfn-fallback", "Do not fall back to CloudFormation (ListExports / stack outputs) when an Fn::ImportValue / Fn::GetStackOutput reference is not found in cdkd state (default: fall back, so producers still managed by CloudFormation can be referenced)");
295
295
  const annotationMessageOptions = [new Option("--strict", "Do not proceed with stacks carrying warning annotations").default(false), new Option("--ignore-errors", "Ignore error annotations from stack synthesis, which will likely produce an invalid deployment").default(false)];
296
+ function exclusivelyOption(command) {
297
+ return new Option("-e, --exclusively", command === "deploy" ? "Only deploy requested stacks, do not include dependencies" : "Only destroy requested stacks, do not include the stacks that depend on them").default(false);
298
+ }
296
299
  const deployOptions = [
297
300
  new Option("--concurrency <number>", "Maximum concurrent resource operations").default(20).argParser((value) => parseInt(value, 10)),
298
301
  new Option("--stack-concurrency <number>", "Maximum concurrent stack deployments").default(4).argParser((value) => parseInt(value, 10)),
@@ -307,7 +310,7 @@ const deployOptions = [
307
310
  noWaitOption,
308
311
  fullWaitOption,
309
312
  aggressiveVpcParallelOption,
310
- new Option("-e, --exclusively", "Only deploy requested stacks, do not include dependencies").default(false),
313
+ exclusivelyOption("deploy"),
311
314
  allowUnsupportedTypesOption,
312
315
  preferSdkRouteOption,
313
316
  allowUnsupportedPropertiesOption,
@@ -1854,7 +1857,7 @@ function collectCrossStackRefs(node, onRef, unconditional) {
1854
1857
  // src/provisioning/register-providers.ts
1855
1858
  let providerClasses;
1856
1859
  function loadProviderClasses() {
1857
- providerClasses ??= import("./provider-classes-CRZ8a4sy.js");
1860
+ providerClasses ??= import("./provider-classes-BlYx16N0.js");
1858
1861
  return providerClasses;
1859
1862
  }
1860
1863
  function registerAllProviders(registry, classes) {
@@ -11643,6 +11646,7 @@ async function applyRevertUpdate(args) {
11643
11646
  maskSecrets: createSecretMasker(secrets),
11644
11647
  expectedRegion: report.region,
11645
11648
  recordedAttributes: stateResource.attributes,
11649
+ recordedCreateOnlyDrops: stateResource.acceptedCreateOnlyDrops,
11646
11650
  removedProperties: /* @__PURE__ */ new Set()
11647
11651
  }), outcome.logicalId, { logger: maskingRetryLogger(logger, secrets) });
11648
11652
  tally.totalSucceeded++;
@@ -12142,7 +12146,6 @@ function deletedRefusalError({ deleted, recordMissing }, mode) {
12142
12146
  const parts = [...deleted > 0 ? [`${deleted} resource(s) deleted outside cdkd`] : [], ...recordMissing > 0 ? [`${recordMissing} nested stack(s) whose state record is gone`] : []];
12143
12147
  return new PartialFailureError(`${parts.join(" and ")} were not ${verb}; each is named above.`);
12144
12148
  }
12145
- const DELETED_RESOURCE_REMEDY = "First confirm it is really gone (in the AWS console or with the AWS CLI). A deploy that does not change it will not recreate it: to recreate it, remove it from the CDK app and deploy, then restore it and deploy again; if it is meant to be gone, the first of those deploys is enough. Anything in the app that references it has to come out with it, and that deploy DELETES those resources too.";
12146
12149
  const NESTED_RECORD_MISSING_REMEDY = "If the parent was imported with 'cdkd import --migrate-from-cloudformation' and that import stopped part-way, its nested stacks were not recorded yet: re-run that import with --force, which rebuilds the parent record from the stack and then records them. Otherwise the resources the nested stack held are no longer tracked by cdkd and may still exist in AWS, and recreating it can collide with them. A deploy that does not change the nested stack will not recreate it: to recreate it, remove it from the CDK app and deploy, then restore it and deploy again; if it is meant to be gone, the first of those deploys is enough.";
12147
12150
  function nestedRecordMissingClause(report, outcome) {
12148
12151
  return safeMsg`its nested stack's own state record ${reportIdent(nestedChildStackName(report.stackName, outcome.logicalId), STACK_REF_MAX_CODE_POINTS)} is not in state.`;
@@ -12504,7 +12507,8 @@ async function announceOrphansAndConfirm({ state, logger, stackNoEchoValues, jou
12504
12507
  output: process.stdout
12505
12508
  });
12506
12509
  const journaledClause = journaledOrphans.count > 0 ? ` and ${journaledOrphans.count} recorded only in its rollback journal` : "";
12507
- const prompt = ctx.removeProtection ? `\nAbout to destroy ${resourceCount} resources${journaledClause} from stack ${displayStackName(stackName)}, REMOVING DELETION PROTECTION on ${protectedCount} of them. Continue? (y/N): ` : `\nAre you sure you want to destroy stack ${displayStackName(stackName)} and delete all ${resourceCount} resources${journaledClause}? (Y/n): `;
12510
+ const stackLabel = displayStackName(stackName) + (ctx.confirmationNote !== void 0 ? ` (${ctx.confirmationNote})` : "");
12511
+ const prompt = ctx.removeProtection ? `\nAbout to destroy ${resourceCount} resources${journaledClause} from stack ${stackLabel}, REMOVING DELETION PROTECTION on ${protectedCount} of them. Continue? (y/N): ` : `\nAre you sure you want to destroy stack ${stackLabel} and delete all ${resourceCount} resources${journaledClause}? (Y/n): `;
12508
12512
  const answer = await rl.question(prompt);
12509
12513
  rl.close();
12510
12514
  const trimmed = answer.trim().toLowerCase();
@@ -12940,6 +12944,7 @@ async function deleteStackResource({ lock, state, ctx, stackName, logger, result
12940
12944
  ...ctx.skipFinalSnapshot === true && { skipFinalSnapshot: true },
12941
12945
  ...secretPrincipalOptIn !== void 0 && { resolveSecretDerivedPrincipals: secretPrincipalOptIn },
12942
12946
  recordedAttributes: resource.attributes,
12947
+ recordedCreateOnlyDrops: resource.acceptedCreateOnlyDrops,
12943
12948
  recordedNoEchoLeaves: resource.noEchoLeaves,
12944
12949
  ...noEchoDeleteValues !== void 0 && { noEchoDeleteValues },
12945
12950
  ...ctx.noEchoReresolver !== void 0 && { noEchoReresolver: ctx.noEchoReresolver },
@@ -13246,20 +13251,7 @@ async function destroyStackUnderLock({ stackName, state, ctx, logger, result, re
13246
13251
  secretPrincipalRegions,
13247
13252
  secretPrincipalRegionsIncomplete
13248
13253
  };
13249
- for (let levelIndex = executionLevels.length - 1; levelIndex >= 0; levelIndex--) {
13250
- if (lock.interrupted) {
13251
- logger.debug("Interrupted (draining) — not scheduling further deletion levels");
13252
- break;
13253
- }
13254
- const level = executionLevels[levelIndex];
13255
- if (!level) continue;
13256
- logger.debug(`Deletion level ${executionLevels.length - levelIndex}/${executionLevels.length} (${level.length} resources)`);
13257
- const stackRegion = state.region ?? ctx.baseRegion;
13258
- const deletePromises = level.map((logicalId) => withPrintingSecrets(printingBagOf(logicalId), () => deleteStackResource(resourceFrame, logicalId, stackRegion)));
13259
- await Promise.all(deletePromises);
13260
- }
13261
- for (const entry of supersededResourcesOf(state)) {
13262
- if (lock.interrupted) break;
13254
+ const deleteSupersededRow = async (entry, early = false) => {
13263
13255
  const { logicalId } = entry;
13264
13256
  const { physicalId, resourceType } = entry.state;
13265
13257
  const drop = () => {
@@ -13270,9 +13262,9 @@ async function destroyStackUnderLock({ stackName, state, ctx, logger, result, re
13270
13262
  if (holder !== void 0) {
13271
13263
  drop();
13272
13264
  if (holder.resourceType !== resourceType) withPrintingSecrets(bag, () => logger.warn(safeMsg` ⚠ ${supersededHeldByOtherTypeWarning(entry, holder.resourceType)}`));
13273
- continue;
13265
+ return false;
13274
13266
  }
13275
- await withPrintingSecrets(bag, async () => {
13267
+ return withPrintingSecrets(bag, async () => {
13276
13268
  logger.info(safeMsg`Deleting ${logicalId}'s superseded ${resourceType} (${physicalId})...`);
13277
13269
  let outcome;
13278
13270
  try {
@@ -13300,7 +13292,11 @@ async function destroyStackUnderLock({ stackName, state, ctx, logger, result, re
13300
13292
  result.deletedCount++;
13301
13293
  drop();
13302
13294
  logger.info(safeMsg` ✓ Deleted ${logicalId}'s superseded ${resourceType}`);
13303
- return;
13295
+ return false;
13296
+ }
13297
+ if (early) {
13298
+ logger.info(safeMsg` ${logicalId}'s superseded ${resourceType} (${physicalId}) was not deleted yet; retrying after the stack's own resources`);
13299
+ return true;
13304
13300
  }
13305
13301
  const why = outcome.kind === "notDeleted" ? outcome.reason : maskSecretsInText(describeAwsFailure(outcome.error).detail, bag);
13306
13302
  if (outcome.kind === "notDeleted") {
@@ -13308,11 +13304,35 @@ async function destroyStackUnderLock({ stackName, state, ctx, logger, result, re
13308
13304
  result.skippedCount++;
13309
13305
  result.journaledOrphanSkips++;
13310
13306
  logger.warn(safeMsg` ⚠ ${logicalId}'s superseded ${resourceType} (${physicalId}) was not deleted: ${why}. ` + "Delete it manually — it is no longer tracked in state.");
13311
- return;
13307
+ return false;
13312
13308
  }
13313
13309
  result.errorCount++;
13314
13310
  logger.warn(safeMsg` ⚠ ${logicalId}'s superseded ${resourceType} (${physicalId}) was not deleted: ${why}. ` + "State preserved: it stays recorded, and a re-run of the destroy retries it.");
13311
+ return false;
13315
13312
  });
13313
+ };
13314
+ const retryLate = /* @__PURE__ */ new Set();
13315
+ for (const entry of supersededResourcesOf(state)) {
13316
+ if (lock.interrupted) break;
13317
+ if (!isCustomResourceType$1(entry.state.resourceType)) continue;
13318
+ if (await deleteSupersededRow(entry, true)) retryLate.add(entry);
13319
+ }
13320
+ for (let levelIndex = executionLevels.length - 1; levelIndex >= 0; levelIndex--) {
13321
+ if (lock.interrupted) {
13322
+ logger.debug("Interrupted (draining) — not scheduling further deletion levels");
13323
+ break;
13324
+ }
13325
+ const level = executionLevels[levelIndex];
13326
+ if (!level) continue;
13327
+ logger.debug(`Deletion level ${executionLevels.length - levelIndex}/${executionLevels.length} (${level.length} resources)`);
13328
+ const stackRegion = state.region ?? ctx.baseRegion;
13329
+ const deletePromises = level.map((logicalId) => withPrintingSecrets(printingBagOf(logicalId), () => deleteStackResource(resourceFrame, logicalId, stackRegion)));
13330
+ await Promise.all(deletePromises);
13331
+ }
13332
+ for (const entry of supersededResourcesOf(state)) {
13333
+ if (lock.interrupted) break;
13334
+ if (isCustomResourceType$1(entry.state.resourceType) && !retryLate.has(entry)) continue;
13335
+ await deleteSupersededRow(entry);
13316
13336
  }
13317
13337
  const unreadableSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.filter((row) => !isSupersededResourceRecord(row)).length : holdsSupersededResources(state) ? 1 : 0;
13318
13338
  if (unreadableSuperseded > 0) {
@@ -13621,6 +13641,9 @@ async function purgeEventsAfterDestroy(reader, stackName, region, opts, logger)
13621
13641
  return null;
13622
13642
  }
13623
13643
  }
13644
+ function protectionNotNamed(dependsOn) {
13645
+ return safeMsg` --remove-protection applies only to the stacks you name; this stack was added because it depends on ${describeStack(dependsOn)}. Name it to remove its protection too.`;
13646
+ }
13624
13647
 
13625
13648
  // src/cli/commands/destroy/select-targets.ts
13626
13649
  async function selectDestroyTargets(stackArgs, options, stateBackend, logger) {
@@ -13647,7 +13670,8 @@ async function selectDestroyTargets(stackArgs, options, stateBackend, logger) {
13647
13670
  ...s.account && { account: s.account },
13648
13671
  ...s.terminationProtection !== void 0 && { terminationProtection: s.terminationProtection },
13649
13672
  template: s.template,
13650
- ...s.nestedTemplates !== void 0 && { nestedTemplates: s.nestedTemplates }
13673
+ ...s.nestedTemplates !== void 0 && { nestedTemplates: s.nestedTemplates },
13674
+ dependencyNames: s.dependencyNames
13651
13675
  }));
13652
13676
  synthScanStacks = result.stacks.map((s) => ({
13653
13677
  stackName: s.stackName,
@@ -13698,16 +13722,30 @@ async function selectDestroyTargets(stackArgs, options, stateBackend, logger) {
13698
13722
  stackName: s.stackName,
13699
13723
  synth: appStackSet.has(s) ? s : void 0
13700
13724
  });
13725
+ const expandSelection = (selected, seeds) => {
13726
+ if (options.exclusively === true) return selected;
13727
+ if (appStacks.length === 0) {
13728
+ if (selected.length > 0) logger.warn("No synthesized app stack to read stack dependencies from, so only the named stack(s) are destroyed: a deployed stack that depends on one, if any, stays deployed. Run destroy from the CDK app to destroy its dependents too.");
13729
+ return selected;
13730
+ }
13731
+ const added = expandDestroyTargetsDownstream(seeds, appStacks, deployedIn(allStateRefs));
13732
+ for (const t of added.notDeployed) logger.debug(safeMsg`Not destroying ${describeStack(t)}, which depends on a selected stack: it is not deployed`);
13733
+ if (added.targets.length > 0) logger.info(safeMsg`Also destroying ${added.targets.length} stack(s) that depend on the selected stack(s) (pass -e / --exclusively to destroy only the named stacks): ${added.targets.map((t) => describeWithDependency(t)).join(", ")}`);
13734
+ return [...selected, ...added.targets];
13735
+ };
13701
13736
  let targets;
13702
13737
  const namesAppStack = /* @__PURE__ */ new Set();
13703
13738
  if (options.all) {
13704
13739
  const { topLevel, inStages } = partitionTopLevel(candidateStacks);
13705
- if (inStages.length > 0) logger.warn(renderAllLeftOutStageStacks(inStages));
13706
- targets = topLevel.map(toTarget);
13740
+ targets = expandSelection(topLevel.map(toTarget), partitionTopLevel(appStacks).topLevel);
13741
+ const expanded = new Set(targets.flatMap((t) => t.synth ? [t.synth] : []));
13742
+ const leftOut = inStages.filter((s) => !expanded.has(s));
13743
+ if (leftOut.length > 0) logger.warn(renderAllLeftOutStageStacks(leftOut));
13707
13744
  } else if (stackPatterns.length > 0) {
13708
13745
  const selectFrom = appStacks.length > 0 ? appStacks : candidateStacks;
13709
13746
  const inState = new Set(candidateStacks.map((s) => s.stackName));
13710
- targets = matchStacks(selectFrom, stackPatterns, { dedupe: "identity" }).filter((s) => inState.has(s.stackName)).map(toTarget);
13747
+ const matched = matchStacks(selectFrom, stackPatterns, { dedupe: "identity" });
13748
+ targets = expandSelection(matched.filter((s) => inState.has(s.stackName)).map(toTarget), matched.filter((s) => appStackSet.has(s)));
13711
13749
  if (appStacks.length > 0) {
13712
13750
  const gone = stacksNoLongerSelected(candidateStacks, stackPatterns, new Set(targets.map((t) => t.stackName)));
13713
13751
  if (gone.stacks.length > 0) logger.warn(renderStacksNoLongerSelected(gone.patterns, gone.stacks));
@@ -13735,12 +13773,71 @@ async function selectDestroyTargets(stackArgs, options, stateBackend, logger) {
13735
13773
  namesAppStack
13736
13774
  };
13737
13775
  }
13776
+ function expandDestroyTargetsDownstream(seeds, appStacks, isDeployed) {
13777
+ const dependentsOf = /* @__PURE__ */ new Map();
13778
+ for (const stack of appStacks) for (const depName of stack.dependencyNames ?? []) for (const producer of stacksForDependency(depName, stack, appStacks)) {
13779
+ const list = dependentsOf.get(producer) ?? [];
13780
+ list.push(stack);
13781
+ dependentsOf.set(producer, list);
13782
+ }
13783
+ const seen = new Set(seeds);
13784
+ const queue = seeds.map((s) => [s, s]);
13785
+ const targets = [];
13786
+ const notDeployed = [];
13787
+ while (queue.length > 0) {
13788
+ const [producer, seed] = queue.shift();
13789
+ for (const dependent of dependentsOf.get(producer) ?? []) {
13790
+ if (seen.has(dependent)) continue;
13791
+ seen.add(dependent);
13792
+ queue.push([dependent, seed]);
13793
+ if (isDeployed(dependent)) targets.push({
13794
+ stackName: dependent.stackName,
13795
+ synth: dependent,
13796
+ dependsOnSelected: seed
13797
+ });
13798
+ else notDeployed.push(dependent);
13799
+ }
13800
+ }
13801
+ return {
13802
+ targets,
13803
+ notDeployed
13804
+ };
13805
+ }
13806
+ function deployedIn(stateRefs) {
13807
+ return (stack) => stateRefs.some((r) => r.stackName === stack.stackName && (stack.region === void 0 || r.region === void 0 || r.region === stack.region));
13808
+ }
13809
+ function manifestAncestors(stack, appStacks) {
13810
+ const found = /* @__PURE__ */ new Set();
13811
+ const queue = [stack];
13812
+ while (queue.length > 0) {
13813
+ const s = queue.shift();
13814
+ for (const depName of s.dependencyNames ?? []) for (const producer of stacksForDependency(depName, s, appStacks)) {
13815
+ if (producer === stack || found.has(producer)) continue;
13816
+ found.add(producer);
13817
+ queue.push(producer);
13818
+ }
13819
+ }
13820
+ return found;
13821
+ }
13822
+ function describeWithDependency(t, describe = (x) => x.synth !== void 0 ? describeStack(x.synth) : displaySafe(x.stackName)) {
13823
+ const name = describe(t);
13824
+ return t.dependsOnSelected === void 0 ? name : `${name} (depends on ${describeStack(t.dependsOnSelected)})`;
13825
+ }
13738
13826
  async function orderDestroyTargets(targets, appStacks, synthScanStacks, regionForStack, logger) {
13739
13827
  const uniqueNames = [...new Set(targets.map((t) => t.stackName))];
13740
- if (synthScanStacks.length > 0 && uniqueNames.length > 1) {
13828
+ if (uniqueNames.length > 1) {
13741
13829
  const inSet = new Set(uniqueNames);
13742
- const inferred = inferCrossStackStackDeps(synthScanStacks.filter((s) => inSet.has(s.stackName)));
13743
- targets = orderConsumersBeforeProducers(uniqueNames, inferred).flatMap((name) => targets.filter((t) => t.stackName === name));
13830
+ const edges = inferCrossStackStackDeps(synthScanStacks.filter((s) => inSet.has(s.stackName)));
13831
+ for (const t of targets) {
13832
+ if (t.synth === void 0) continue;
13833
+ for (const producer of manifestAncestors(t.synth, appStacks)) {
13834
+ if (producer.stackName === t.stackName || !inSet.has(producer.stackName)) continue;
13835
+ const producers = edges.get(t.stackName) ?? /* @__PURE__ */ new Set();
13836
+ producers.add(producer.stackName);
13837
+ edges.set(t.stackName, producers);
13838
+ }
13839
+ }
13840
+ targets = orderConsumersBeforeProducers(uniqueNames, edges).flatMap((name) => targets.filter((t) => t.stackName === name));
13744
13841
  }
13745
13842
  const sharedAppNames = new Set(appStacks.map((s) => s.stackName).filter((name, i, names) => names.indexOf(name) !== i));
13746
13843
  const strictRegion = /* @__PURE__ */ new Map();
@@ -13752,12 +13849,25 @@ async function orderDestroyTargets(targets, appStacks, synthScanStacks, regionFo
13752
13849
  const strictNames = new Set([...strictBySynth.keys()].map((s) => s.stackName));
13753
13850
  refuseStackNameRegionCollisions(appStacks.filter((s) => strictBySynth.has(s) || strictNames.has(s.stackName) && s.region !== void 0), (s) => strictBySynth.get(s) ?? s.region, new Set(strictBySynth.keys()));
13754
13851
  const describeTarget = (t) => t.synth !== void 0 && strictRegion.has(t) ? `${describeStack(t.synth)} in ${displaySafe(strictRegion.get(t))}` : displaySafe(t.stackName);
13755
- logger.info(`Found ${targets.length} stack(s) to destroy: ${targets.map(describeTarget).join(", ")}`);
13852
+ logger.info(safeMsg`Found ${targets.length} stack(s) to destroy: ${targets.map((t) => describeWithDependency(t, describeTarget)).join(", ")}`);
13853
+ const dependentsOf = /* @__PURE__ */ new Map();
13854
+ const bySynth = new Map(targets.flatMap((t) => t.synth ? [[t.synth, t]] : []));
13855
+ for (const t of targets) {
13856
+ if (t.synth === void 0) continue;
13857
+ for (const producer of manifestAncestors(t.synth, appStacks)) {
13858
+ const pt = bySynth.get(producer);
13859
+ if (pt === void 0 || pt === t) continue;
13860
+ const list = dependentsOf.get(pt) ?? [];
13861
+ list.push(t);
13862
+ dependentsOf.set(pt, list);
13863
+ }
13864
+ }
13756
13865
  return {
13757
13866
  targets,
13758
13867
  uniqueNames,
13759
13868
  strictRegion,
13760
- describeTarget
13869
+ describeTarget,
13870
+ dependentsOf
13761
13871
  };
13762
13872
  }
13763
13873
 
@@ -13882,7 +13992,8 @@ async function destroyCommand(stackArgs, options) {
13882
13992
  }
13883
13993
  const ordering = await orderDestroyTargets(targets, appStacks, synthScanStacks, regionForStack, logger);
13884
13994
  targets = ordering.targets;
13885
- const { uniqueNames, strictRegion, describeTarget } = ordering;
13995
+ const { uniqueNames, strictRegion, describeTarget, dependentsOf } = ordering;
13996
+ const notDestroyed = /* @__PURE__ */ new Set();
13886
13997
  const accountId = "unknown";
13887
13998
  const stateRefsByName = /* @__PURE__ */ new Map();
13888
13999
  for (const ref of allStateRefs) {
@@ -13917,28 +14028,32 @@ async function destroyCommand(stackArgs, options) {
13917
14028
  return plannedDestroyRegion(refs, target.synth?.region, fallbackRegionByName.get(target.stackName) ?? region);
13918
14029
  };
13919
14030
  for (const target of targets) {
13920
- if (target.synth?.terminationProtection === true && !options.removeProtection) continue;
14031
+ if (target.synth?.terminationProtection === true && !(options.removeProtection === true && target.dependsOnSelected === void 0)) continue;
13921
14032
  const planned = plannedRegionFor(target);
13922
14033
  if (planned !== void 0) crossPrefixCheck.cache.full(target.stackName, planned, "prestart");
13923
14034
  }
13924
14035
  for (const [stackIndex, target] of targets.entries()) {
13925
14036
  const stackName = target.stackName;
13926
14037
  logger.info(`\nPreparing to destroy stack: ${describeTarget(target)}`);
14038
+ const removeProtection = options.removeProtection === true && target.dependsOnSelected === void 0;
13927
14039
  if (wrongAccount.has(target)) {
13928
14040
  logger.error(callerAccountUnreadable ? safeMsg` ✗ Stack ${describeTarget(target)} is pinned to account ${target.synth.account}, and the account this run's credentials resolve to could not be read (STS GetCallerIdentity failed), so it was not destroyed: another stack of the app shares its name, and only that account's credentials address its record. Check the credentials (aws sts get-caller-identity) and re-run destroy.` : safeMsg` ✗ Stack ${describeTarget(target)} is pinned to account ${target.synth.account}, which is not the account this run's credentials resolve to; not destroyed. Run destroy with that account's credentials.`);
14041
+ notDestroyed.add(target);
13929
14042
  totalErrors++;
13930
14043
  continue;
13931
14044
  }
13932
14045
  const refs = stateRefsByName.get(stackName) ?? [];
13933
14046
  const synthStack = target.synth;
13934
14047
  if (synthStack?.terminationProtection === true) {
13935
- if (options.removeProtection) logger.warn(`Stack ${displaySafe(stackName)} has terminationProtection: true — bypassing because --remove-protection set`);
14048
+ if (removeProtection) logger.warn(`Stack ${displaySafe(stackName)} has terminationProtection: true — bypassing because --remove-protection set`);
13936
14049
  else {
13937
14050
  const err = new StackTerminationProtectionError(stackName, void 0, {
13938
14051
  args: stateCommandAccount.args,
13939
14052
  clause: withheldAccountClause(accountRecovery, "the command below prints")
13940
14053
  });
13941
14054
  logger.error(` ✗ ${err.message}`);
14055
+ if (options.removeProtection === true && target.dependsOnSelected !== void 0) logger.error(protectionNotNamed(target.dependsOnSelected));
14056
+ notDestroyed.add(target);
13942
14057
  totalErrors++;
13943
14058
  continue;
13944
14059
  }
@@ -13976,13 +14091,15 @@ async function destroyCommand(stackArgs, options) {
13976
14091
  continue;
13977
14092
  }
13978
14093
  if (synthStack?.terminationProtection !== true && stateResult.state.terminationProtection === true) {
13979
- if (options.removeProtection) logger.warn(safeMsg`Stack ${stackName} was deployed with terminationProtection: true — bypassing because --remove-protection set`);
14094
+ if (removeProtection) logger.warn(safeMsg`Stack ${stackName} was deployed with terminationProtection: true — bypassing because --remove-protection set`);
13980
14095
  else {
13981
14096
  const err = new StackTerminationProtectionError(stackName, void 0, {
13982
14097
  args: stateCommandAccount.args,
13983
14098
  clause: withheldAccountClause(accountRecovery, "the command below prints")
13984
14099
  }, { command: "cdkd destroy" });
13985
14100
  logger.error(safeMsg` ✗ ${asIsMessage(err.message)}`);
14101
+ if (options.removeProtection === true && target.dependsOnSelected !== void 0) logger.error(protectionNotNamed(target.dependsOnSelected));
14102
+ notDestroyed.add(target);
13986
14103
  totalErrors++;
13987
14104
  continue;
13988
14105
  }
@@ -13990,9 +14107,16 @@ async function destroyCommand(stackArgs, options) {
13990
14107
  if (stateResult.state.parentStack) {
13991
14108
  const err = new NestedStackChildDirectDestroyError(stackName, stateResult.state.parentStack, stateResult.state.parentLogicalId, void 0, stateCommandAccount);
13992
14109
  logger.error(` ✗ ${err.message}`);
14110
+ notDestroyed.add(target);
13993
14111
  totalErrors++;
13994
14112
  continue;
13995
14113
  }
14114
+ const keptDependents = (dependentsOf.get(target) ?? []).filter((d) => notDestroyed.has(d));
14115
+ if (keptDependents.length > 0) {
14116
+ logger.warn(safeMsg`Not destroying stack ${describeTarget(target)}: ${keptDependents.map(describeTarget).join(", ")} depends on it and was not destroyed in this run.`);
14117
+ notDestroyed.add(target);
14118
+ continue;
14119
+ }
13996
14120
  if (runInterrupted()) {
13997
14121
  stoppedEarly = true;
13998
14122
  break;
@@ -14020,7 +14144,7 @@ async function destroyCommand(stackArgs, options) {
14020
14144
  destroyOptions: {
14021
14145
  ...options.profile && { profile: options.profile },
14022
14146
  statePrefix: options.statePrefix,
14023
- ...options.removeProtection === true && { removeProtection: true },
14147
+ ...removeProtection && { removeProtection: true },
14024
14148
  ...options.skipFinalSnapshot === true && { skipFinalSnapshot: true },
14025
14149
  ...options.resourceWarnAfter?.globalMs !== void 0 && { resourceWarnAfterMs: options.resourceWarnAfter.globalMs },
14026
14150
  ...options.resourceTimeout?.globalMs !== void 0 && { resourceTimeoutMs: options.resourceTimeout.globalMs },
@@ -14038,7 +14162,8 @@ async function destroyCommand(stackArgs, options) {
14038
14162
  stateBucket,
14039
14163
  statePrefix: options.statePrefix,
14040
14164
  skipConfirmation: options.yes || options.force,
14041
- removeProtection: options.removeProtection === true,
14165
+ ...target.dependsOnSelected !== void 0 && { confirmationNote: `it depends on ${describeStack(target.dependsOnSelected)}` },
14166
+ removeProtection,
14042
14167
  skipFinalSnapshot: options.skipFinalSnapshot === true,
14043
14168
  resolveSecretDerivedPrincipals: {},
14044
14169
  stackDestroy: true,
@@ -14064,6 +14189,7 @@ async function destroyCommand(stackArgs, options) {
14064
14189
  stackInterrupted = result.interrupted;
14065
14190
  stackCancelled = result.cancelled === true;
14066
14191
  if (result.interrupted) interrupted = true;
14192
+ if (result.errorCount > 0 || result.skippedCount > 0 || result.interrupted || result.cancelled === true) notDestroyed.add(target);
14067
14193
  destroyRunResult = result.errorCount > 0 || result.skippedCount > 0 ? "FAILED" : "SUCCEEDED";
14068
14194
  eventRecorder.record({
14069
14195
  eventType: "RUN_FINISHED",
@@ -14115,6 +14241,7 @@ function createDestroyCommand() {
14115
14241
  ...stateOptions,
14116
14242
  ...stackOptions,
14117
14243
  ...destroyOptions,
14244
+ exclusivelyOption("destroy"),
14118
14245
  ...resourceTimeoutOptions,
14119
14246
  skipFinalSnapshotOption,
14120
14247
  ...contextOptions
@@ -20564,6 +20691,7 @@ function actionLabel(item, skipFinalSnapshot) {
20564
20691
  case "orphan-retain": return ` - orphan ${safe(op.logicalId)} (${safe(op.resourceType)}) [DeletionPolicy Retain — left in AWS]`;
20565
20692
  case "orphan-flag": return ` - orphan ${safe(op.logicalId)} (${safe(op.resourceType)}) [--orphan]`;
20566
20693
  case "revert": return ` - revert ${safe(op.logicalId)} (${safe(op.resourceType)})${rep}`;
20694
+ case "restore-policies": return ` - revert ${safe(op.logicalId)} (${safe(op.resourceType)}) [DeletionPolicy / UpdateReplacePolicy only, in state; no AWS call]`;
20567
20695
  case "reverse-replacement":
20568
20696
  if (op.oldResourceMaySurvive !== void 0) return ` - reverse-replace ${safe(op.logicalId)} (${replacementTypes(op)}) [the deploy did not confirm deleting the old resource: re-create it if AWS reports it gone, ` + (op.oldResourceMaySurvive === "kept" ? `re-adopt it if AWS still has it (its delete was refused or never sent), ` : `REFUSED if AWS still has it (its delete may still be running, or only partly ran), `) + `REFUSED if cdkd cannot tell; ` + (item.retainsNewResource ? `new one RETAINED (UpdateReplacePolicy: Retain) and left untracked]` : `delete new]`);
20569
20697
  return item.retainsNewResource ? ` - reverse-replace ${safe(op.logicalId)} (${replacementTypes(op)}) [re-create old resource; new one RETAINED (UpdateReplacePolicy: Retain) and left untracked — REFUSED instead if the re-create collides with the name the retained resource still holds]` : ` - reverse-replace ${safe(op.logicalId)} (${replacementTypes(op)}) [re-create old resource, delete new]`;
@@ -20727,7 +20855,14 @@ function applyPlanToPreview(plan, previewState, skipFinalSnapshot) {
20727
20855
  break;
20728
20856
  case "revert":
20729
20857
  case "reverse-replacement":
20730
- case "reverse-replacement-readopt": if (op.previousState) previewState[op.logicalId] = op.previousState;
20858
+ case "reverse-replacement-readopt":
20859
+ if (op.previousState) previewState[op.logicalId] = op.previousState;
20860
+ break;
20861
+ case "restore-policies": {
20862
+ const current = previewState[op.logicalId];
20863
+ if (op.previousState && current) previewState[op.logicalId] = withPreviousPolicies(current, op.previousState);
20864
+ break;
20865
+ }
20731
20866
  }
20732
20867
  }
20733
20868
  }
@@ -32848,4 +32983,4 @@ function collectVerbFlags(program) {
32848
32983
  }
32849
32984
 
32850
32985
  export { resolveSecretDerivedPrincipals as a, buildProgram, isResolvableSecretPrincipalList as i, runDestroyForStack as n, canonicalizeIpProtocolValue as o, holdsUnprovenSecretPrincipalToken as r, canonicalizeIpv4Cidr as t };
32851
- //# sourceMappingURL=program-CuJKRAac.js.map
32986
+ //# sourceMappingURL=program-DTlJetBn.js.map