@go-to-k/cdkd 0.296.8 → 0.296.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/{asg-provider-BDJ1qN0J.js → asg-provider-B0IrI6EW.js} +3 -3
  2. package/dist/{asg-provider-BDJ1qN0J.js.map → asg-provider-B0IrI6EW.js.map} +1 -1
  3. package/dist/cli.js +2 -2
  4. package/dist/{deploy-engine-iXgQFHYR.js → deploy-engine-B-oaHd2t.js} +41 -24
  5. package/dist/{deploy-engine-iXgQFHYR.js.map → deploy-engine-B-oaHd2t.js.map} +1 -1
  6. package/dist/{iam-policy-targets-td1X_kKN.js → iam-policy-targets-BREzwsG6.js} +9 -8
  7. package/dist/iam-policy-targets-BREzwsG6.js.map +1 -0
  8. package/dist/{iam-role-provider-B1Ma2zVK.js → iam-role-provider-DsJM0NT3.js} +3 -3
  9. package/dist/{iam-role-provider-B1Ma2zVK.js.map → iam-role-provider-DsJM0NT3.js.map} +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -3
  12. package/dist/{neptune-provider-C-WMp2hQ.js → neptune-provider-DGaKBQxm.js} +3 -3
  13. package/dist/{neptune-provider-C-WMp2hQ.js.map → neptune-provider-DGaKBQxm.js.map} +1 -1
  14. package/dist/{program-CPziYRDp.js → program-DTXVCX29.js} +100 -47
  15. package/dist/program-DTXVCX29.js.map +1 -0
  16. package/dist/{provider-classes-CxXTKgEM.js → provider-classes-y-yYsSvB.js} +21 -16
  17. package/dist/{provider-classes-CxXTKgEM.js.map → provider-classes-y-yYsSvB.js.map} +1 -1
  18. package/dist/{rds-provider-C193wAF8.js → rds-provider-B0YTjZKU.js} +3 -3
  19. package/dist/{rds-provider-C193wAF8.js.map → rds-provider-B0YTjZKU.js.map} +1 -1
  20. package/dist/{version-Br6yDF8t.js → version-Dqnp1Xj8.js} +2 -2
  21. package/dist/{version-Br6yDF8t.js.map → version-Dqnp1Xj8.js.map} +1 -1
  22. package/package.json +1 -1
  23. package/dist/iam-policy-targets-td1X_kKN.js.map +0 -1
  24. package/dist/program-CPziYRDp.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { a as runWithStackAwsClients, i as resetAwsClients, o as setAwsClients, t as AwsClients } from "./aws-clients-CnmtbrxD.js";
2
2
  import { A as displayIdent, D as UNRENDERABLE, E as STACK_REF_MAX_CODE_POINTS, F as plainIdentOr, I as safeMsg, L as stringifyJsonPayload, M as displayStackName, N as isPasteableIdent, O as cutMarker, R as truncateCodePoints, S as withStackName, T as SECRET_REF_MAX_CODE_POINTS, d as PATTERN_B_NAME_PROPERTIES, f as PATTERN_B_RESOURCE_TYPES, g as generateResourceName, h as explicitNamePropertyFor, i as reserveStdoutForPayload, j as displaySafe, k as displayAwsMessage, l as getLiveRenderer, m as derivesPatternBName, n as getLogger, o as runStackBuffered, r as isStdoutReservedForPayload, u as PATTERN_B_NAME_OPTIONS, w as SAFE_MSG_ALTERED_CHAR, x as withSkipPrefix } from "./logger-DAaB7GFO.js";
3
- import { An as setPasteableVerbFlags, At as CUSTOM_RESOURCE_RESPONSE_PREFIX, Bt as clientDefaultsFor, Ct as buildForceUnlockCommand, Dn as shellQuote, Dt as formatLockOperation, En as shellBoundedDisplay, Et as formatLockExpiry, F as runDeleteAttempt, Ft as producerRecordKey, G as beginCommandInterruptScope, Gn as retryClassificationText, Ht as AccountIdUnavailableError, It as setPasteableAwsProfile, J as isInterruptedWaitError, Jn as safeStringify, Jt as DeployCancelledError, K as endCommandInterruptScope, Kn as describeAwsFailure, Kt as CrossAccountSecretRefusalError, Lt as withPasteableAwsProfile, Mt as injectiveKey, On as withheldTargetClause, Ot as formatLockOwner, Pt as producerCoordinateKey, Qn as markNonRetryable, Qt as LocalStartServiceError, Rt as ambientClientDefaults, Sn as pasteableCommand, St as UNREPRODUCIBLE_LOCK_CLAUSE, Tn as quotedOrDescribed, Tt as forceQuitRecoveryClause, Un as isRetryableTransientError, V as isAwsCliLiteral, Vn as isAmbiguousOutcomeError, Vt as credentialFingerprint, Wn as isTransientServerError, Wt as CdkdError, Xn as isMarkedNonRetryable, Xt as IntrinsicResolutionRefusalError, Yt as DynamicReferenceRegionAmbiguousError, Zn as isThrottlingError, Zt as LocalInvokeBuildError$1, _ as VALUE_NOT_SHOWN, _n as SHELL_ACTIVE_WHY, an as ResourceTimeoutError, cn as StackTerminationProtectionError, g as assertRegionMatch, h as RESOURCE_NOT_FOUND, hn as TIMEOUT_FLAG_RESOURCE_TYPE, in as ProvisioningError, it as resourceTypeShown, jt as DEFAULT_STATE_PREFIX, kn as setPasteableRunFlags, mn as withErrorHandling, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nn as NestedStackChildDirectDestroyError, nt as logicalIdShown, on as ResourceUpdateNotSupportedError, pn as normalizeAwsError, q as interruptWatchListenerCount, rn as PartialFailureError, s as readRecordedPrincipals, sn as StackHasActiveImportsError, t as IAM_PRINCIPAL_NAME, tn as MalformedProducerRecordRefusalError, un as SynthesisError, w as remedyLogicalId, wn as plainOrDescribed, wt as buildLockContentionMessage, xn as isInertUnquoted, yn as commandHole, zt as ambientCredentialConfig } from "./iam-policy-targets-td1X_kKN.js";
3
+ import { An as setPasteableVerbFlags, At as CUSTOM_RESOURCE_RESPONSE_PREFIX, Bt as clientDefaultsFor, Ct as buildForceUnlockCommand, Dn as shellQuote, Dt as formatLockOperation, En as shellBoundedDisplay, Et as formatLockExpiry, F as runDeleteAttempt, Ft as producerRecordKey, G as beginCommandInterruptScope, Gn as retryClassificationText, Ht as AccountIdUnavailableError, It as setPasteableAwsProfile, J as isInterruptedWaitError, Jn as safeStringify, Jt as DeployCancelledError, K as endCommandInterruptScope, Kn as describeAwsFailure, Kt as CrossAccountSecretRefusalError, Lt as withPasteableAwsProfile, Mt as injectiveKey, On as withheldTargetClause, Ot as formatLockOwner, Pt as producerCoordinateKey, Qn as markNonRetryable, Qt as LocalStartServiceError, Rt as ambientClientDefaults, Sn as pasteableCommand, St as UNREPRODUCIBLE_LOCK_CLAUSE, Tn as quotedOrDescribed, Tt as forceQuitRecoveryClause, Un as isRetryableTransientError, V as isAwsCliLiteral, Vn as isAmbiguousOutcomeError, Vt as credentialFingerprint, Wn as isTransientServerError, Wt as CdkdError, Xn as isMarkedNonRetryable, Xt as IntrinsicResolutionRefusalError, Yt as DynamicReferenceRegionAmbiguousError, Zn as isThrottlingError, Zt as LocalInvokeBuildError$1, _ as VALUE_NOT_SHOWN, _n as SHELL_ACTIVE_WHY, an as ResourceTimeoutError, cn as StackTerminationProtectionError, g as assertRegionMatch, h as RESOURCE_NOT_FOUND, hn as TIMEOUT_FLAG_RESOURCE_TYPE, in as ProvisioningError, it as resourceTypeShown, jt as DEFAULT_STATE_PREFIX, kn as setPasteableRunFlags, mn as withErrorHandling, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nn as NestedStackChildDirectDestroyError, nt as logicalIdShown, on as ResourceUpdateNotSupportedError, pn as normalizeAwsError, q as interruptWatchListenerCount, rn as PartialFailureError, s as readRecordedPrincipals, sn as StackHasActiveImportsError, t as IAM_PRINCIPAL_NAME, tn as MalformedProducerRecordRefusalError, un as SynthesisError, w as remedyLogicalId, wn as plainOrDescribed, wt as buildLockContentionMessage, xn as isInertUnquoted, yn as commandHole, zt as ambientCredentialConfig } from "./iam-policy-targets-BREzwsG6.js";
4
4
  import { n as awsClientDefaults, r as getAssumedRoleCredentials, u as formatAuthority } from "./aws-client-defaults-D0q0z4dG.js";
5
- import { $ as resourcesNamingDeclaredParameter, $a as maskSecretsInError, $i as repairMalformedResourceEntriesForReadOnly, $n as deleteSkipReason, $o as ensureAssetStorage, $r as deployRefusesOrphanRowsReason, $s as derivePartitionAndUrlSuffix, $t as effectiveDeletionPolicy, Ai as refuseMalformedOrphans, Ao as acceptedCreateOnlyDropsOf, As as getDefaultStateBucketName, At as planRollback, Ba as TemplateParser, Bi as refuseMalformedResourceEntriesForImportSave, Bn as CC_BROKEN_REASON, Bo as orphansCarriedFrom, Br as AWS_NO_VALUE, Bs as stateBucketExistenceConfirmed, Bt as updatePartialMessage, C as perType, Ci as malformedScrubResourceEntriesRefusalMessage, Cn as findDestructiveChanges, Co as WHOLE_DYNAMIC_REFERENCE_PATTERN, Cr as callerEnvCredentials, Cs as warnFinchArgvExposure, Dn as ledgerForStack, Do as S3StateBackend, Ds as getDockerImageBySourceHash, Dt as isJournaledOrphan, Ei as refuseDivergentRecordRegionForDestroy, Eo as isLockInfoExpired, Es as AssetManifestLoader, Et as demoteSupersededOrphans, Fa as withRetry, Fi as refuseMalformedResourceAttributesForOrphan, Fo as hasUnverifiableParameterRefusal, Fr as isImpossibleEmptyStoredAttribute, Fs as resolveCaptureObservedState, Ft as inheritProducerRegions, G as cyan, Ga as literalSplitDelimitersOf, Gi as refuseMalformedResourcePropertiesForOrphan, Go as WorkGraph, Gr as withSharedDrainBudget, Gs as MIGRATE_TMP_PREFIX, Gt as orphanRecordsPrintingBag, H as formatResourceLine, Ha as carryLogOnlyValues, Hi as refuseMalformedResourcePropertiesForDestroy, Hn as ccBrokenReason, Ho as AssetPublisher, Hr as isStalePlaceholderArnAttribute, Hs as ssmResolvedValueType, Ht as completedReplayEntries, Ii as refuseMalformedResourceEntries, Io as importableOutputKeys, Ir as carriesDynamicReference, Is as resolveSkipPrefix, J as red, Ja as recordLogOnlyParameterValue, Ji as refuseMalformedResourcesForExport, Jn as slowCcOperationTimeoutMs, Jo as loadPublishableAssetManifest, Jr as JSON_LISTING_HOLE_VALUE, Js as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Jt as ATOMIC_FINAL_SNAPSHOT_TYPES, K as gray, Ka as logOnlyValueCount, Ki as refuseMalformedResourcesForDeploy, Kn as withPrintingSecrets, Ko as buildAssetRedirectMap, Kr as parameterInputsFor, Ks as findLargeInlineResources, Kt as secretNamePrintingBag, Li as refuseMalformedResourceEntriesForDeploy, Lo as importableOutputs, Lr as carriesFetchableDynamicReference, Ls as resolveStateBucketWithDefault, Ma as prefetchCreateOnlyPropertyPaths, Mi as refuseMalformedOrphansForOrphan, Mo as exportNamesCarriedFrom, Mr as isUnboundTemplateParameter, Ms as loadCdkJson, Mt as resolveReplacementOldType, Na as templateResourceTypes, Ni as refuseMalformedOutputs, No as hasReadableExportSet, Nr as parameterTypeMayLoseSecretIdentity, Ns as resolveApp, Nt as findNestedStackTypeChanges, Oi as refuseMalformedOrphanRecords, Oo as rebuildClientForBucketRegion, Os as Synthesizer, Ot as isReplacementOrphan, Pa as describeTypeWithThrottleRetry, Pi as refuseMalformedOutputsForDestroy, Po as hasReasonlessBaselineRefusal, Pr as getAccountInfo, Ps as resolveAutoAssetStorage, Q as reachableDivergentParameters, Qa as errorCauseChain, Qi as repairMalformedOutputsForReadOnly, Qn as deleteIndeterminateGuards, Qo as assertAssetBucketRegion, Qr as UNREADABLE_RESOURCES_MAP_ROW, Qs as canonicalizeRegion, Qt as createPreDeleteFinalSnapshot, Ri as refuseMalformedResourceEntriesForDestroy, Ro as isReadableBag, Rr as isNamelessDynamicReferenceError, Rs as resolveStateBucketWithDefaultAndSource, S as isProtectionValueActive, Si as malformedResourcesWarning, Sn as constructPathOf, So as TEMPLATE_SOURCED_RULES, Sr as applyCallerIdentityCredentials, Ss as runDockerStreaming, St as destroyStackRecordsView, Ti as previewableOrphanRecords, Tn as RollbackInlinePolicyWriters, To as LockManager, Ts as stripControlChars, Tt as recordAfterRollbackUpdate, U as createReadOnlyAttributeHealerFactory, Ua as createUnionSecretMasker, Ui as refuseMalformedResourcePropertiesForDrift, Un as wouldReturnToSdkProvider, Uo as isSensitiveAttributeName, Ur as refStateLookupFromResource, Us as CFN_TEMPLATE_BODY_LIMIT, Ut as journaledOrphanPrintingBag, Va as liveMatchesUnresolvedTokenFrame, Vi as refuseMalformedResourceEntriesForOrphan, Vn as ProviderRegistry, Vo as shouldRetainResource, Vr as cfnRefValueFromPhysicalId, Vs as warnDeprecatedNoPrefixCliFlag, Vt as updatePartialReason, W as bold, Wa as hasMaskableValues, Wi as refuseMalformedResourcePropertiesForExport, Wn as isCustomResourceType$1, Wo as stringifyValue, Ws as CFN_TEMPLATE_URL_LIMIT, Wt as maskEventTextWithBoundBags, X as computeParameterTaint, Xa as shareLogOnlyValues, Xi as repairMalformedOrphanRecordsForReadOnly, Xo as AssetModeResolver, Xr as STATE_RESOURCES_MALFORMED, Xs as expectedOwnerParam, Xt as buildFinalSnapshotIdentifier, Y as yellow, Ya as recordLogOnlyValue, Yi as refuseMalformedState, Yn as ccProtectionRegistryTypes, Yo as rewriteTemplateAssetReferences, Yr as STATE_REGION_DIVERGED, Ys as decodeListingKey, Yt as PRE_DELETE_SNAPSHOT_TYPES, Z as namesAnyDeclaredParameter, Za as createSecretMasker, Zi as repairMalformedOrphansForReadOnly, Zn as UNSPECIFIED_SKIP_REASON, Zo as BOOTSTRAP_MARKER_PREFIX, Zr as UNREADABLE_ORPHANS_CONTAINER_ROW, Zs as PARTITION_TABLE, Zt as ccRoutedFinalSnapshotError, _ as makeCanonicalizePropertiesFn, _i as malformedOutputsRefusalMessage, _n as isExportAliasCollision, _o as recordProvenPublicExpression, _r as assertSendableRoleArn, _s as isMalformedEnvKey, a as findNestedTemplateTreeDefect, aa as findActionableSilentDrops, ac as hasPlainPrototype, ai as isReadableResourceEntry, an as extractDeploymentEventError, ao as dynamicReferenceTokens, as as validateContainerRepoName, at as makeSiblingClaimReader, b as recordedProtectionNote, bi as malformedResourceEntriesWarning, bn as DEFAULT_RESOURCE_WARN_AFTER_MS, bo as STATE_SOURCED_CROSS_GENERATION_RULES, br as sendableAssumeRoleCommand, bs as redactedDockerCause, bt as replayRollback, c as renderNestedTemplateTreeDefect, cc as absoluteAssemblyPathEscape, ci as malformedExportSourceWarning, cn as exportAliasCollisionScrubWarning, co as inheritNestedStackParameterAssociations, cs as resolveDockerContextDirectory, ct as displacedOpClause, d as conditionInputsFrom, da as findReplacedReadersOfRecreateTargets, dc as renderAssemblyPathEscape, di as malformedLocalResourcesWarning, dn as secretSafeKeyDisplay, do as identityKeyFor, dr as IntrinsicFunctionResolver, ds as describeDockerFailure, ea as repairMalformedResourcePropertiesForReadOnly, ec as AssemblyReader, ei as displayLogicalId, en as isFinalSnapshotError, eo as maskSecretsInText, es as getBootstrapMarkerKey, et as deleteJournaledOrphans, f as parentSuppliedValues, fa as shownType, fc as resolveAssemblyPath, fi as malformedOrphanRecordsRefusalMessage, fn as exportNameSecretExposure, fo as carriesSecretMask, fr as classifyReplaySecretRegion, fs as dockerSpawnEnvWithSensitive, ft as nestedChildStackName$1, g as mergeNoChangeOutputs, ga as renderStatefulReason, gi as malformedOrphansWarning, gn as collectPublishedOutputNames, go as recordNoEchoAttributeValues, gr as assertFlagRoleArn, gs as isDockerClientEnvKey, gt as withNestedRevertRun, h as keptWholeReasonText, ha as isStatefulRecreateTargetSync, hi as malformedOrphansRefusalMessage, hn as collectDeclaredOutputNames, ho as recordMaskOnlyValuesIn, hr as applyRoleArnIfSet, hs as getDockerCmd, ht as revertedNestedRowIds, i as childTemplateLoader, ia as unreadableResourceEntries, ic as hasOwnKey, ii as isReadableOrphanRecord, in as DeploymentEventsStore, io as DYNAMIC_REFERENCE_TOKEN_SCAN, is as validateAssetBucketName, it as sameJournaledOrphans, ji as refuseMalformedOrphansForDestroy, jo as describeRegionValueKind, jr as coerceParameterTypedValue, js as getLegacyStateBucketName, jt as replacementNeverSwapped, ki as refuseMalformedOrphanRecordsForDestroy, kn as withCreateTokenLedger, ko as splitImportedOps, ks as synthesisStatusMessage, kt as planFailedOps, l as templateIdentity, la as NO_CC_HANDLERS_REASON, lc as describeFileReadFailure, li as malformedLocalOutputsWarning, ln as secretBearing, lo as recordNestedStackParameterExpressions, lr as DiffCalculator, ls as describeDockerCapturedOutput, lt as displacedPhysicalIdShown, m as isSecretBearingReferenceString, ma as isStatefulRecreateTargetForReplace, mc as resolveBucketRegion, mi as malformedOrphanRowsKeptWarning, mn as noEchoParameterValueSeed, mo as recordMaskOnlyValue, mr as regionLessSecretName, ms as formatDockerLoginError, n as IMPLICIT_DELETE_DEPENDENCIES, na as unpreviewableOrphanRecords, nc as processStackMessages, ni as hasReadableOutputs, nn as unsupportedFinalSnapshotError, no as redactSecretsForState, ns as parseBootstrapMarker, nt as journaledOrphanLines, o as isAbsoluteAssetPath, oc as nullPrototypeRecord, oi as malformedDriftResourcePropertiesWarning, on as WITHHELD_NAME_DISPLAY, oo as isUncertifiedBaselineMaskPosition, os as buildDenyExternalAccessPolicy, ot as planOrphanAdoption, p as readRecordedConditionVerdicts, pa as MULTI_REGION_RECREATE_BLOCKED_TYPES, pi as malformedOrphanRecordsWarning, pn as isWholeDynamicReferenceValue, po as provenPublicValue, pr as producerRegionsFromState, ps as finchSecretArgvRefusal, pt as recordDisplacedSkips, q as green, qa as printingCorpusOf, qi as refuseMalformedResourcesForDestroy, qn as CloudControlProvider, qo as createAssetRedirectResolver, qs as uploadCfnTemplate, qt as stateSecretNameNeedles, r as computeImplicitDeleteEdges, ra as unreadableOrphanRecords, rc as defineOwnKey, ri as hasReadableResources, rn as DeploymentEventsReader, ro as scrubResourceRecord, rs as readBootstrapMarkerBody, rt as loadJournaledOrphans, s as listNestedTemplateRows, sa as unwrittenCreateOnlyReplacement, sc as ownValue, si as malformedExportNamesWarning, sn as displayTextOrWithheld, so as pathCrossesDottedKey, ss as buildDockerImage, st as NESTED_PENDING_PARENT_REASON, t as DeployEngine, ta as repairMalformedResourcesForReadOnly, tc as StageLoadError, ti as hasReadableOrphans, tn as refusesFinalSnapshot, to as markSameGenerationBag, tr as isWaitAbandonedError, ts as isCrossRegionRedirect, tt as isHandledOrphan, u as conditionFingerprint, ua as hasNoCloudControlHandlers, uc as displayAssemblyPath, ui as malformedLocalResourceEntriesWarning, un as secretBearingStateKeyWarning, ur as INTRINSIC_KEYS, us as describeDockerExecFailure, ut as dropSettledNestedJournals, v as withResourceDeadline, vi as malformedOutputsWarning, vn as bindingSkippedOutputs, vo as wholeStringLeavesOf, vr as explicitRoleArnOrThrow, vs as partitionSensitiveEnv, vt as withNestedStackContext, w as readProtection, wi as malformedStateRefusalMessage, wn as formatDestructiveChange, wo as isSingleDynamicReferenceToken, wr as envCredentialsAreAssumedRole, ws as escapeRegExp, wt as withStackRecords, x as PROTECTION_PROPERTY_BY_TYPE, xi as malformedResourcePropertiesWarning, xn as maskingRetryLogger, xo as STATE_SOURCED_READBACK_RULES, xr as AWS_CREDENTIAL_ENV_KEYS, xs as runDockerForeground, y as recordedProtectionEvidence, yi as malformedRenderedContainersWarning, yn as DEFAULT_RESOURCE_TIMEOUT_MS, yo as STATE_SOURCED_BASELINE_RULES, yr as isIamRoleArn, ys as redactDockerArgvValues, yt as replayFailedOperations, za as DagBuilder, zi as refuseMalformedResourceEntriesForImport, zo as orphansAfterRollback, zr as keepsSecretReferenceToken, zs as resolveUseCdkBootstrapAssets } from "./deploy-engine-iXgQFHYR.js";
6
- import { t as getCdkdVersion } from "./version-Br6yDF8t.js";
5
+ import { $ as resourcesNamingDeclaredParameter, $a as createSecretMasker, $i as repairMalformedOutputsForReadOnly, $n as deleteSkipReason, $o as BOOTSTRAP_MARKER_PREFIX, $r as accountArgs, $s as PARTITION_TABLE, $t as effectiveDeletionPolicy, Ai as refuseMalformedOrphanRecordsForDestroy, Ao as rebuildClientForBucketRegion, As as Synthesizer, At as planRollback, Bi as refuseMalformedResourceEntriesForImport, Bn as CC_BROKEN_REASON, Bo as isReadableBag, Br as AWS_NO_VALUE, Bs as resolveStateBucketWithDefaultAndSource, Bt as updatePartialMessage, C as perType, Ci as malformedResourcesWarning, Cn as findDestructiveChanges, Co as STATE_SOURCED_READBACK_RULES, Cr as callerEnvCredentials, Cs as runDockerForeground, Di as refuseDivergentRecordRegionForDestroy, Dn as ledgerForStack, Do as LockManager, Ds as stripControlChars, Dt as isJournaledOrphan, Ei as previewableOrphanRecords, Eo as isSingleDynamicReferenceToken, Es as escapeRegExp, Et as demoteSupersededOrphans, Fa as templateResourceTypes, Fi as refuseMalformedOutputsForDestroy, Fo as hasReadableExportSet, Fr as isImpossibleEmptyStoredAttribute, Fs as resolveApp, Ft as inheritProducerRegions, G as cyan, Ga as createUnionSecretMasker, Gi as refuseMalformedResourcePropertiesForExport, Go as isSensitiveAttributeName, Gr as withSharedDrainBudget, Gs as CFN_TEMPLATE_BODY_LIMIT, Gt as orphanRecordsPrintingBag, H as formatResourceLine, Ha as TemplateParser, Hi as refuseMalformedResourceEntriesForOrphan, Hn as ccBrokenReason, Ho as orphansCarriedFrom, Hr as isStalePlaceholderArnAttribute, Hs as stateBucketExistenceConfirmed, Ht as completedReplayEntries, Ia as describeTypeWithThrottleRetry, Ii as refuseMalformedResourceAttributesForOrphan, Io as hasReasonlessBaselineRefusal, Ir as carriesDynamicReference, Is as resolveAutoAssetStorage, J as red, Ja as logOnlyValueCount, Ji as refuseMalformedResourcesForDestroy, Jn as slowCcOperationTimeoutMs, Jo as buildAssetRedirectMap, Jr as JSON_LISTING_HOLE_VALUE, Js as findLargeInlineResources, Jt as ATOMIC_FINAL_SNAPSHOT_TYPES, K as gray, Ka as hasMaskableValues, Ki as refuseMalformedResourcePropertiesForOrphan, Kn as withPrintingSecrets, Ko as stringifyValue, Kr as parameterInputsFor, Ks as CFN_TEMPLATE_URL_LIMIT, Kt as secretNamePrintingBag, La as withRetry, Li as refuseMalformedResourceEntries, Lo as hasUnverifiableParameterRefusal, Lr as carriesFetchableDynamicReference, Ls as resolveCaptureObservedState, Mi as refuseMalformedOrphansForDestroy, Mo as acceptedCreateOnlyDropsOf, Mr as isUnboundTemplateParameter, Ms as getDefaultStateBucketName, Mt as resolveReplacementOldType, Ni as refuseMalformedOrphansForOrphan, No as describeRegionValueKind, Nr as parameterTypeMayLoseSecretIdentity, Ns as getLegacyStateBucketName, Nt as findNestedStackTypeChanges, Oo as isLockInfoExpired, Os as AssetManifestLoader, Ot as isReplacementOrphan, Pa as prefetchCreateOnlyPropertyPaths, Pi as refuseMalformedOutputs, Po as exportNamesCarriedFrom, Pr as getAccountInfo, Ps as loadCdkJson, Q as reachableDivergentParameters, Qa as shareLogOnlyValues, Qi as repairMalformedOrphansForReadOnly, Qn as deleteIndeterminateGuards, Qo as AssetModeResolver, Qr as UNREADABLE_RESOURCES_MAP_ROW, Qs as expectedOwnerParam, Qt as createPreDeleteFinalSnapshot, Ri as refuseMalformedResourceEntriesForDeploy, Ro as importableOutputKeys, Rr as isNamelessDynamicReferenceError, Rs as resolveSkipPrefix, S as isProtectionValueActive, Si as malformedResourcePropertiesWarning, Sn as constructPathOf, So as STATE_SOURCED_CROSS_GENERATION_RULES, Sr as applyCallerIdentityCredentials, Ss as redactedDockerCause, St as destroyStackRecordsView, Ti as malformedStateRefusalMessage, Tn as RollbackInlinePolicyWriters, To as WHOLE_DYNAMIC_REFERENCE_PATTERN, Ts as warnFinchArgvExposure, Tt as recordAfterRollbackUpdate, U as createReadOnlyAttributeHealerFactory, Ua as liveMatchesUnresolvedTokenFrame, Ui as refuseMalformedResourcePropertiesForDestroy, Un as wouldReturnToSdkProvider, Uo as shouldRetainResource, Ur as refStateLookupFromResource, Us as warnDeprecatedNoPrefixCliFlag, Ut as journaledOrphanPrintingBag, Va as DagBuilder, Vi as refuseMalformedResourceEntriesForImportSave, Vn as ProviderRegistry, Vo as orphansAfterRollback, Vr as cfnRefValueFromPhysicalId, Vs as resolveUseCdkBootstrapAssets, Vt as updatePartialReason, W as bold, Wa as carryLogOnlyValues, Wi as refuseMalformedResourcePropertiesForDrift, Wn as isCustomResourceType$1, Wo as AssetPublisher, Ws as ssmResolvedValueType, Wt as maskEventTextWithBoundBags, X as computeParameterTaint, Xa as recordLogOnlyParameterValue, Xi as refuseMalformedState, Xo as loadPublishableAssetManifest, Xr as STATE_RESOURCES_MALFORMED, Xs as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Xt as buildFinalSnapshotIdentifier, Y as yellow, Ya as printingCorpusOf, Yi as refuseMalformedResourcesForExport, Yn as ccProtectionRegistryTypes, Yo as createAssetRedirectResolver, Yr as STATE_REGION_DIVERGED, Ys as uploadCfnTemplate, Yt as PRE_DELETE_SNAPSHOT_TYPES, Z as namesAnyDeclaredParameter, Za as recordLogOnlyValue, Zi as repairMalformedOrphanRecordsForReadOnly, Zn as UNSPECIFIED_SKIP_REASON, Zo as rewriteTemplateAssetReferences, Zr as UNREADABLE_ORPHANS_CONTAINER_ROW, Zs as decodeListingKey, Zt as ccRoutedFinalSnapshotError, _ as makeCanonicalizePropertiesFn, _a as isStatefulRecreateTargetSync, _i as malformedOrphansWarning, _n as isExportAliasCollision, _o as recordMaskOnlyValuesIn, _r as assertSendableRoleArn, _s as getDockerCmd, a as findNestedTemplateTreeDefect, aa as unreadableResourceEntries, ac as defineOwnKey, ai as isReadableOrphanRecord, an as extractDeploymentEventError, ao as scrubResourceRecord, as as readBootstrapMarkerBody, at as makeSiblingClaimReader, b as recordedProtectionNote, bi as malformedRenderedContainersWarning, bn as DEFAULT_RESOURCE_WARN_AFTER_MS, bo as wholeStringLeavesOf, br as sendableAssumeRoleCommand, bs as partitionSensitiveEnv, bt as replayRollback, c as renderNestedTemplateTreeDefect, cc as nullPrototypeRecord, ci as malformedExportNamesWarning, cn as exportAliasCollisionScrubWarning, co as isUncertifiedBaselineMaskPosition, cs as buildDenyExternalAccessPolicy, ct as displacedOpClause, d as conditionInputsFrom, da as NO_CC_HANDLERS_REASON, dc as describeFileReadFailure, di as malformedLocalResourceEntriesWarning, dn as secretSafeKeyDisplay, do as recordNestedStackParameterExpressions, dr as IntrinsicFunctionResolver, ds as describeDockerCapturedOutput, ea as repairMalformedResourceEntriesForReadOnly, ec as canonicalizeRegion, ei as deployRefusesOrphanRowsReason, en as isFinalSnapshotError, eo as errorCauseChain, es as assertAssetBucketRegion, et as deleteJournaledOrphans, f as parentSuppliedValues, fa as hasNoCloudControlHandlers, fc as displayAssemblyPath, fi as malformedLocalResourcesWarning, fn as exportNameSecretExposure, fr as classifyReplaySecretRegion, fs as describeDockerExecFailure, ft as nestedChildStackName$1, g as mergeNoChangeOutputs, ga as isStatefulRecreateTargetForReplace, gc as resolveBucketRegion, gi as malformedOrphansRefusalMessage, gn as collectPublishedOutputNames, go as recordMaskOnlyValue, gr as assertFlagRoleArn, gs as formatDockerLoginError, gt as withNestedRevertRun, h as keptWholeReasonText, ha as MULTI_REGION_RECREATE_BLOCKED_TYPES, hi as malformedOrphanRowsKeptWarning, hn as collectDeclaredOutputNames, ho as provenPublicValue, hr as applyRoleArnIfSet, hs as finchSecretArgvRefusal, ht as revertedNestedRowIds, i as childTemplateLoader, ia as unreadableOrphanRecords, ic as processStackMessages, ii as hasReadableResources, in as DeploymentEventsStore, io as redactSecretsForState, is as parseBootstrapMarker, it as sameJournaledOrphans, ji as refuseMalformedOrphans, jo as splitImportedOps, jr as coerceParameterTypedValue, js as synthesisStatusMessage, jt as replacementNeverSwapped, ki as refuseMalformedOrphanRecords, kn as withCreateTokenLedger, ko as S3StateBackend, ks as getDockerImageBySourceHash, kt as planFailedOps, l as templateIdentity, la as unwrittenCreateOnlyReplacement, lc as ownValue, li as malformedExportSourceWarning, ln as secretBearing, lo as pathCrossesDottedKey, lr as DiffCalculator, ls as buildDockerImage, lt as displacedPhysicalIdShown, m as isSecretBearingReferenceString, ma as shownType, mc as resolveAssemblyPath, mi as malformedOrphanRecordsWarning, mn as noEchoParameterValueSeed, mo as carriesSecretMask, mr as regionLessSecretName, ms as dockerSpawnEnvWithSensitive, n as IMPLICIT_DELETE_DEPENDENCIES, na as repairMalformedResourcesForReadOnly, nc as AssemblyReader, ni as hasReadableOrphans, nn as unsupportedFinalSnapshotError, no as maskSecretsInText, ns as getBootstrapMarkerKey, nt as journaledOrphanLines, o as isAbsoluteAssetPath, oa as withheldAccountClause, oc as hasOwnKey, oi as isReadableResourceEntry, on as WITHHELD_NAME_DISPLAY, oo as DYNAMIC_REFERENCE_TOKEN_SCAN, os as validateAssetBucketName, ot as planOrphanAdoption, p as readRecordedConditionVerdicts, pa as findReplacedReadersOfRecreateTargets, pc as renderAssemblyPathEscape, pi as malformedOrphanRecordsRefusalMessage, pn as isWholeDynamicReferenceValue, po as identityKeyFor, pr as producerRegionsFromState, ps as describeDockerFailure, pt as recordDisplacedSkips, q as green, qa as literalSplitDelimitersOf, qi as refuseMalformedResourcesForDeploy, qn as CloudControlProvider, qo as WorkGraph, qs as MIGRATE_TMP_PREFIX, qt as stateSecretNameNeedles, r as computeImplicitDeleteEdges, ra as unpreviewableOrphanRecords, rc as StageLoadError, ri as hasReadableOutputs, rn as DeploymentEventsReader, ro as markSameGenerationBag, rs as isCrossRegionRedirect, rt as loadJournaledOrphans, s as listNestedTemplateRows, sa as findActionableSilentDrops, sc as hasPlainPrototype, si as malformedDriftResourcePropertiesWarning, sn as displayTextOrWithheld, so as dynamicReferenceTokens, ss as validateContainerRepoName, st as NESTED_PENDING_PARENT_REASON, t as DeployEngine, ta as repairMalformedResourcePropertiesForReadOnly, tc as derivePartitionAndUrlSuffix, ti as displayLogicalId, tn as refusesFinalSnapshot, to as maskSecretsInError, tr as isWaitAbandonedError, ts as ensureAssetStorage, tt as isHandledOrphan, u as conditionFingerprint, uc as absoluteAssemblyPathEscape, ui as malformedLocalOutputsWarning, un as secretBearingStateKeyWarning, uo as inheritNestedStackParameterAssociations, ur as INTRINSIC_KEYS, us as resolveDockerContextDirectory, ut as dropSettledNestedJournals, v as withResourceDeadline, va as renderStatefulReason, vi as malformedOutputsRefusalMessage, vn as bindingSkippedOutputs, vo as recordNoEchoAttributeValues, vr as explicitRoleArnOrThrow, vs as isDockerClientEnvKey, vt as withNestedStackContext, w as readProtection, wi as malformedScrubResourceEntriesRefusalMessage, wn as formatDestructiveChange, wo as TEMPLATE_SOURCED_RULES, wr as envCredentialsAreAssumedRole, ws as runDockerStreaming, wt as withStackRecords, x as PROTECTION_PROPERTY_BY_TYPE, xi as malformedResourceEntriesWarning, xn as maskingRetryLogger, xo as STATE_SOURCED_BASELINE_RULES, xr as AWS_CREDENTIAL_ENV_KEYS, xs as redactDockerArgvValues, y as recordedProtectionEvidence, yi as malformedOutputsWarning, yn as DEFAULT_RESOURCE_TIMEOUT_MS, yo as recordProvenPublicExpression, yr as isIamRoleArn, ys as isMalformedEnvKey, yt as replayFailedOperations, zi as refuseMalformedResourceEntriesForDestroy, zo as importableOutputs, zr as keepsSecretReferenceToken, zs as resolveStateBucketWithDefault } from "./deploy-engine-B-oaHd2t.js";
6
+ import { t as getCdkdVersion } from "./version-Dqnp1Xj8.js";
7
7
  import { randomBytes, randomUUID } from "node:crypto";
8
8
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
9
9
  import { GetRoleCommand, GetUserCommand } from "@aws-sdk/client-iam";
@@ -2421,7 +2421,7 @@ function collectCrossStackRefs(node, onRef) {
2421
2421
  //#region src/provisioning/register-providers.ts
2422
2422
  let providerClasses;
2423
2423
  function loadProviderClasses() {
2424
- providerClasses ??= import("./provider-classes-CxXTKgEM.js");
2424
+ providerClasses ??= import("./provider-classes-y-yYsSvB.js");
2425
2425
  return providerClasses;
2426
2426
  }
2427
2427
  function registerAllProviders(registry, classes) {
@@ -10610,18 +10610,22 @@ async function runDestroyForStack(stackName, state, ctx) {
10610
10610
  const stateTargetFor = (logicalId, resourceType) => resourceType === NESTED_STACK_TYPE ? `${stackName}~${logicalId}` : stackName;
10611
10611
  const skippedStateTargets = /* @__PURE__ */ new Set();
10612
10612
  const failedStateTargets = /* @__PURE__ */ new Set();
10613
- const hintCommand = (command, t) => pasteableCommand(command, [{
10614
- value: t,
10615
- hole: "stack",
10616
- opts: { plainIdent: true }
10617
- }, {
10618
- flag: "--stack-region",
10619
- value: regionForState,
10620
- hole: "region",
10621
- opts: { plainIdent: true }
10622
- }]);
10613
+ const hintCommand = (command, t) => pasteableCommand(command, [
10614
+ {
10615
+ value: t,
10616
+ hole: "stack",
10617
+ opts: { plainIdent: true }
10618
+ },
10619
+ {
10620
+ flag: "--stack-region",
10621
+ value: regionForState,
10622
+ hole: "region",
10623
+ opts: { plainIdent: true }
10624
+ },
10625
+ ...accountArgs(refusalRecovery)
10626
+ ]);
10623
10627
  const hintFor = (command, targets, label) => [...new Set(targets.map((t) => `\n${label}: ${hintCommand(command, t).command}`))].join("");
10624
- const hintHolesClause = (targets) => targets.every((t) => hintCommand("cdkd state show", t).withheld.length === 0) ? "" : " A target that is not a plain identifier is printed as a quoted '<stack>' or '<region>' placeholder; list the records as stored with 'cdkd state list --long'.";
10628
+ const hintHolesClause = (targets) => (targets.every((t) => hintCommand("cdkd state show", t).withheld.every((w) => w.hole !== "stack" && w.hole !== "region")) ? "" : " A target that is not a plain identifier is printed as a quoted '<stack>' or '<region>' placeholder; list the records as stored with 'cdkd state list --long'.") + (targets.length === 0 ? "" : ((clause) => clause === "" ? "" : ` ${clause}`)(withheldAccountClause(refusalRecovery, "the command lines below print").trimEnd()));
10625
10629
  let secretPrincipalRegions;
10626
10630
  const buildDestroySnapshot = () => {
10627
10631
  const { imports: _imports, outputReads: _outputReads, ...rest } = state;
@@ -10987,7 +10991,7 @@ async function runDestroyForStack(stackName, state, ctx) {
10987
10991
  const droppableSkipped = journaledOrphanFailures > 0 ? skippedTargets.filter((t) => t !== stackName) : skippedTargets;
10988
10992
  const skippedCommands = hintFor("cdkd state show", skippedTargets, "Inspect it with") + hintFor("cdkd state orphan", droppableSkipped, "Drop the record with");
10989
10993
  const dedupedCommands = (lines) => [...new Set(lines.split("\n").filter((l) => l !== ""))].map((l) => `\n${l}`).join("");
10990
- logger.warn(`\n${yellow("⚠")} ${bold(`Stack ${plainOrDescribed(stackName, "stack name")} partially destroyed`)} (${green(result.deletedCount)} deleted${retainedSuffix}${skippedSuffix}${guardSuffix}, ${red(result.errorCount)} errors). State preserved — re-run 'cdkd destroy' / 'cdkd state destroy' to clean up. ` + (journaledOrphanFailures > 0 ? `${journaledOrphanFailures} of the failures are resources a failed deploy created that only the rollback journal records: re-run the destroy to retry them. Do not drop this stack's state record — that also deletes the journal, their only record.` : "If the same resource keeps failing, dropping the state record is the last resort: it removes the record without deleting AWS resources.") + skippedClause + hintHolesClause([...failedTargets, ...skippedTargets]) + dedupedCommands(orphanHint + skippedCommands));
10994
+ logger.warn(`\n${yellow("⚠")} ${bold(`Stack ${plainOrDescribed(stackName, "stack name")} partially destroyed`)} (${green(result.deletedCount)} deleted${retainedSuffix}${skippedSuffix}${guardSuffix}, ${red(result.errorCount)} errors). State preserved — re-run 'cdkd destroy' / 'cdkd state destroy' to clean up. ` + (journaledOrphanFailures > 0 ? `${journaledOrphanFailures} of the failures are resources a failed deploy created that only the rollback journal records: re-run the destroy to retry them. Do not drop this stack's state record — that also deletes the journal, their only record.` : "If the same resource keeps failing, dropping the state record is the last resort: it removes the record without deleting AWS resources.") + skippedClause + hintHolesClause([...orphanHint === "" ? [] : failedTargets, ...skippedTargets]) + dedupedCommands(orphanHint + skippedCommands));
10991
10995
  }
10992
10996
  } finally {
10993
10997
  try {
@@ -11082,6 +11086,15 @@ async function destroyCommand(stackArgs, options) {
11082
11086
  });
11083
11087
  const region = namedCliRegion(options.region) ?? "us-east-1";
11084
11088
  const stateBucket = await resolveStateBucketWithDefault(options.stateBucket, region);
11089
+ const accountRecovery = {
11090
+ profile: options.profile,
11091
+ stateBucket,
11092
+ statePrefix: options.statePrefix
11093
+ };
11094
+ const stateCommandAccount = {
11095
+ args: accountArgs(accountRecovery),
11096
+ clause: withheldAccountClause(accountRecovery, "the command lines below print")
11097
+ };
11085
11098
  logger.info("Starting stack destruction...");
11086
11099
  logger.debug("Options:", options);
11087
11100
  if (options.region) {
@@ -11226,7 +11239,7 @@ async function destroyCommand(stackArgs, options) {
11226
11239
  const refRegion = allStateRefs.find((r) => r.stackName === pattern)?.region ?? region;
11227
11240
  const stateOnlyResult = await stateBackend.getState(pattern, refRegion);
11228
11241
  if (stateOnlyResult?.state.parentStack) {
11229
- const err = new NestedStackChildDirectDestroyError(pattern, stateOnlyResult.state.parentStack, stateOnlyResult.state.parentLogicalId);
11242
+ const err = new NestedStackChildDirectDestroyError(pattern, stateOnlyResult.state.parentStack, stateOnlyResult.state.parentLogicalId, void 0, stateCommandAccount);
11230
11243
  logger.error(` ✗ ${err.message}`);
11231
11244
  totalErrors++;
11232
11245
  } else if (appStacks.length > 0 && !notInApp.includes(pattern)) notInApp.push(pattern);
@@ -11258,7 +11271,10 @@ async function destroyCommand(stackArgs, options) {
11258
11271
  if (synthStack?.terminationProtection === true) {
11259
11272
  if (options.removeProtection) logger.warn(`Stack ${displaySafe(stackName)} has terminationProtection: true — bypassing because --remove-protection set`);
11260
11273
  else {
11261
- const err = new StackTerminationProtectionError(stackName);
11274
+ const err = new StackTerminationProtectionError(stackName, void 0, {
11275
+ args: stateCommandAccount.args,
11276
+ clause: withheldAccountClause(accountRecovery, "the command below prints")
11277
+ });
11262
11278
  logger.error(` ✗ ${err.message}`);
11263
11279
  totalErrors++;
11264
11280
  continue;
@@ -11275,15 +11291,20 @@ async function destroyCommand(stackArgs, options) {
11275
11291
  } else if (synthRegion && refs.some((r) => r.region === synthRegion)) stackTargetRegion = synthRegion;
11276
11292
  else {
11277
11293
  const regions = refs.map((r) => r.region === void 0 ? "(legacy)" : plainOrDescribed(r.region, "region")).join(", ");
11278
- const orphanOne = pasteableCommand("cdkd state orphan", [{
11279
- value: stackName,
11280
- hole: "stack",
11281
- opts: { plainIdent: true }
11282
- }, {
11283
- flag: "--stack-region",
11284
- hole: "region"
11285
- }]);
11286
- throw new Error(`Stack ${quotedOrDescribed(stackName, "stack name")} has state in multiple regions: ${regions}. Remove cdkd's record for ONE region with the command below (fill in the region), or run destroy from a CDK app whose env.region matches one of them.` + withheldTargetClause(orphanOne, "stack", "cdkd state orphan", "This stack's name") + `\nRemove one record with: ${orphanOne.command}`);
11294
+ const orphanOneClause = withheldAccountClause(accountRecovery, "the command below prints").trimEnd();
11295
+ const orphanOne = pasteableCommand("cdkd state orphan", [
11296
+ {
11297
+ value: stackName,
11298
+ hole: "stack",
11299
+ opts: { plainIdent: true }
11300
+ },
11301
+ {
11302
+ flag: "--stack-region",
11303
+ hole: "region"
11304
+ },
11305
+ ...stateCommandAccount.args
11306
+ ]);
11307
+ throw new Error(`Stack ${quotedOrDescribed(stackName, "stack name")} has state in multiple regions: ${regions}. Remove cdkd's record for ONE region with the command below (fill in the region), or run destroy from a CDK app whose env.region matches one of them.` + withheldTargetClause(orphanOne, "stack", "cdkd state orphan", "This stack's name") + (orphanOneClause === "" ? "" : ` ${orphanOneClause}`) + `\nRemove one record with: ${orphanOne.command}`);
11287
11308
  }
11288
11309
  const stateResult = await stateBackend.getState(stackName, stackTargetRegion);
11289
11310
  if (!stateResult) {
@@ -11291,7 +11312,7 @@ async function destroyCommand(stackArgs, options) {
11291
11312
  continue;
11292
11313
  }
11293
11314
  if (stateResult.state.parentStack) {
11294
- const err = new NestedStackChildDirectDestroyError(stackName, stateResult.state.parentStack, stateResult.state.parentLogicalId);
11315
+ const err = new NestedStackChildDirectDestroyError(stackName, stateResult.state.parentStack, stateResult.state.parentLogicalId, void 0, stateCommandAccount);
11295
11316
  logger.error(` ✗ ${err.message}`);
11296
11317
  totalErrors++;
11297
11318
  continue;
@@ -16016,6 +16037,11 @@ async function stateOrphanCommand(stackArgs, options) {
16016
16037
  }
16017
16038
  if (!options.yes && !options.force) {
16018
16039
  const targetList = targets.map((t) => describedStackRef(t)).join(", ");
16040
+ const bannerAccount = {
16041
+ profile: options.profile,
16042
+ stateBucket: setup.bucket,
16043
+ statePrefix: options.statePrefix
16044
+ };
16019
16045
  const destroyCmd = pasteableCommand("cdkd destroy", [{
16020
16046
  value: stackName,
16021
16047
  hole: "stack",
@@ -16023,8 +16049,9 @@ async function stateOrphanCommand(stackArgs, options) {
16023
16049
  patternMatched: true,
16024
16050
  plainIdent: true
16025
16051
  }
16026
- }]);
16027
- process.stdout.write(`\nWARNING: This removes cdkd's state record for [${targetList}] only. AWS resources will NOT be deleted.` + (targets.some(refIsDescribed) ? ` ${STATE_LIST_POINTER}` : "") + "\nDelete the actual resources instead with the command below." + withheldTargetClause(destroyCmd, "stack", "cdkd destroy") + `\nDestroy with: ${destroyCmd.command}\n\n`);
16052
+ }, ...accountArgs(bannerAccount)]);
16053
+ const bannerAccountClause = withheldAccountClause(bannerAccount, "the command below prints").trimEnd();
16054
+ process.stdout.write(`\nWARNING: This removes cdkd's state record for [${targetList}] only. AWS resources will NOT be deleted.` + (targets.some(refIsDescribed) ? ` ${STATE_LIST_POINTER}` : "") + "\nDelete the actual resources instead with the command below." + withheldTargetClause(destroyCmd, "stack", "cdkd destroy") + (bannerAccountClause === "" ? "" : ` ${bannerAccountClause}`) + `\nDestroy with: ${destroyCmd.command}\n\n`);
16028
16055
  if (!await confirmStateOrphanRemoval(`Remove state for ${targetList} from s3://${setup.bucket}/${setup.prefix}/?`)) {
16029
16056
  logger.info(safeMsg`Cancelled removal of state for stack: ${plainOrDescribed(stackName, "stack name")}`);
16030
16057
  continue;
@@ -16092,17 +16119,22 @@ async function stateOrphanResources(stackName, requested, options) {
16092
16119
  const childRef = childRefs.find((r) => r.region === region) ?? childRefs[0];
16093
16120
  if (childRef === void 0) continue;
16094
16121
  const otherRegions = childRefs.length - 1;
16095
- const childCommand = pasteableCommand("cdkd state orphan", [{
16096
- value: child,
16097
- hole: "stack",
16098
- opts: { plainIdent: true }
16099
- }, ...childRef.region !== void 0 ? [{
16100
- flag: "--stack-region",
16101
- value: childRef.region,
16102
- hole: "region",
16103
- opts: { plainIdent: true }
16104
- }] : []]);
16105
- throw new Error(`${capitalize(plainOrDescribed(id, "logical id"))} has a nested stack's state record of its own. The child's resources are recorded there, and removing this row would leave that record behind with nothing that removes it. Drop the child's record first (it keeps the child's AWS resources; a child with nested stacks of its own has records under '<child>~<logicalId>' too), then re-run.` + withheldTargetClause(childCommand, "stack", "cdkd state orphan") + (otherRegions > 0 ? ` The child also has records in ${otherRegions} other region(s); 'cdkd state list' shows them, and each needs the same drop.` : "") + `\nDrop the child with: ${childCommand.command}`);
16122
+ const childCommand = pasteableCommand("cdkd state orphan", [
16123
+ {
16124
+ value: child,
16125
+ hole: "stack",
16126
+ opts: { plainIdent: true }
16127
+ },
16128
+ ...childRef.region !== void 0 ? [{
16129
+ flag: "--stack-region",
16130
+ value: childRef.region,
16131
+ hole: "region",
16132
+ opts: { plainIdent: true }
16133
+ }] : [],
16134
+ ...accountArgs(recovery)
16135
+ ]);
16136
+ const accountClause = withheldAccountClause(recovery, "the command below prints").trimEnd();
16137
+ throw new Error(`${capitalize(plainOrDescribed(id, "logical id"))} has a nested stack's state record of its own. The child's resources are recorded there, and removing this row would leave that record behind with nothing that removes it. Drop the child's record first (it keeps the child's AWS resources; a child with nested stacks of its own has records under '<child>~<logicalId>' too), then re-run.` + withheldTargetClause(childCommand, "stack", "cdkd state orphan") + (otherRegions > 0 ? ` The child also has records in ${otherRegions} other region(s); 'cdkd state list' shows them, and each needs the same drop.` : "") + (accountClause === "" ? "" : ` ${accountClause}`) + `\nDrop the child with: ${childCommand.command}`);
16106
16138
  }
16107
16139
  clients = new AwsClients({
16108
16140
  region,
@@ -17765,7 +17797,7 @@ function collectAssetReferences(stateDocument, marker, refs) {
17765
17797
  };
17766
17798
  walk(stateDocument);
17767
17799
  }
17768
- async function scanReferencedAssets(stateBackend, marker, logger) {
17800
+ async function scanReferencedAssets(stateBackend, marker, logger, account) {
17769
17801
  const refs = {
17770
17802
  s3Keys: /* @__PURE__ */ new Set(),
17771
17803
  imageTags: /* @__PURE__ */ new Set(),
@@ -17784,7 +17816,12 @@ async function scanReferencedAssets(stateBackend, marker, logger) {
17784
17816
  parsed = JSON.parse(body);
17785
17817
  } catch (error) {
17786
17818
  const { stack, region } = parseStateKey(key, STATE_FILE_SUFFIX, DEFAULT_STATE_PREFIX);
17787
- const inspectHint = isPasteableIdent(stack) && (region === void 0 || isPasteableIdent(region)) ? pasteableCommand("cdkd state show", region === void 0 ? [{
17819
+ const pasteable = isPasteableIdent(stack) && (region === void 0 || isPasteableIdent(region));
17820
+ const recovery = {
17821
+ ...account,
17822
+ statePrefix: keyPrefixOf(key, stack, region)
17823
+ };
17824
+ const inspectHint = pasteable ? pasteableCommand("cdkd state show", [...region === void 0 ? [{
17788
17825
  value: stack,
17789
17826
  hole: "stack"
17790
17827
  }] : [{
@@ -17794,9 +17831,13 @@ async function scanReferencedAssets(stateBackend, marker, logger) {
17794
17831
  flag: "--stack-region",
17795
17832
  value: region,
17796
17833
  hole: "region"
17797
- }]).command : void 0;
17834
+ }], ...accountArgs(recovery)]).command : void 0;
17835
+ const accountClause = inspectHint === void 0 ? "" : [withheldAccountClause({
17836
+ ...recovery,
17837
+ statePrefix: void 0
17838
+ }, "the command below prints").trimEnd(), keyPrefixHoleSentence(recovery.statePrefix)].filter((part) => part !== "").join(" ");
17798
17839
  const inspect = inspectHint === void 0 ? "its stack name is not safe to paste into a command, so inspect the object at that key directly" : `see the command below`;
17799
- throw new CdkdError(`State file ${displayIdent(key, { maxCodePoints: STATE_KEY_MAX_CODE_POINTS })} is not valid JSON — aborting: gc must know every referenced asset before deleting anything, and this file's references are unreadable. Repair or remove the corrupt state file (${inspect}), then re-run.` + (inspectHint === void 0 ? "" : `\nInspect it with: ${inspectHint}`), "GC_STATE_UNREADABLE", error);
17840
+ throw new CdkdError(`State file ${displayIdent(key, { maxCodePoints: STATE_KEY_MAX_CODE_POINTS })} is not valid JSON — aborting: gc must know every referenced asset before deleting anything, and this file's references are unreadable. Repair or remove the corrupt state file (${inspect}), then re-run.` + (accountClause === "" ? "" : ` ${accountClause}`) + (inspectHint === void 0 ? "" : `\nInspect it with: ${inspectHint}`), "GC_STATE_UNREADABLE", error);
17800
17841
  }
17801
17842
  collectAssetReferences(parsed, marker, refs);
17802
17843
  }
@@ -18041,7 +18082,10 @@ async function gcCommand(options) {
18041
18082
  let s3Candidates = [];
18042
18083
  let ecrCandidates = [];
18043
18084
  if (marker !== null) {
18044
- const refs = await scanReferencedAssets(stateBackend, marker, logger);
18085
+ const refs = await scanReferencedAssets(stateBackend, marker, logger, {
18086
+ profile: options.profile,
18087
+ stateBucket: bucketName
18088
+ });
18045
18089
  s3Candidates = await listS3Candidates(awsClients.s3, marker.assetBucket, accountId, refs, cutoffMs, logger);
18046
18090
  ecrCandidates = await listEcrCandidates(ecrClient, marker.containerRepo, refs, cutoffMs, logger);
18047
18091
  }
@@ -18111,6 +18155,15 @@ function createGcCommand() {
18111
18155
  commonOptions.forEach((opt) => cmd.addOption(opt));
18112
18156
  return cmd;
18113
18157
  }
18158
+ function keyPrefixOf(key, stack, region) {
18159
+ const tail = `/${stack}${region === void 0 ? "" : `/${region}`}/${STATE_FILE_SUFFIX.replace(/^\//, "")}`;
18160
+ return key.endsWith(tail) ? key.slice(0, -tail.length) : void 0;
18161
+ }
18162
+ function keyPrefixHoleSentence(prefix) {
18163
+ const reason = pasteableCommand("cdkd", accountArgs({ statePrefix: prefix })).withheld.find((w) => w.hole === "prefix")?.reason;
18164
+ if (reason === void 0) return "";
18165
+ return `The state prefix of the key above ${reason === "option-shaped" ? `begins with a '-'` : reason === "altered" ? "does not render exactly" : reason === "too-long" ? "is too long to print" : prefix !== void 0 && prefix.includes("/") ? `has a '/'-separated part that is not a plain identifier` : "is not a plain identifier"}, so the command below prints '<prefix>' in its place: replace it whole, quotes included, with that prefix shell-quoted -- the part of the key before '/<stack>/<region>/state.json' ('/<stack>/state.json' for a legacy key), since 'cdkd gc' takes no --state-prefix.`;
18166
+ }
18114
18167
 
18115
18168
  //#endregion
18116
18169
  //#region src/cli/commands/publish-assets.ts
@@ -26884,4 +26937,4 @@ function collectVerbFlags(program) {
26884
26937
 
26885
26938
  //#endregion
26886
26939
  export { canonicalizeIpProtocolValue as a, buildProgram, resolveSecretDerivedPrincipals as i, runDestroyForStack as n, resolvedResourceTimeoutMs as o, isResolvableSecretPrincipalList as r, canonicalizeIpv4Cidr as t };
26887
- //# sourceMappingURL=program-CPziYRDp.js.map
26940
+ //# sourceMappingURL=program-DTXVCX29.js.map