@go-to-k/cdkd 0.296.8 → 0.296.10
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.
- package/dist/{asg-provider-BDJ1qN0J.js → asg-provider-Dxc7pRNy.js} +3 -3
- package/dist/{asg-provider-BDJ1qN0J.js.map → asg-provider-Dxc7pRNy.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-iXgQFHYR.js → deploy-engine-CpI6zpP3.js} +41 -24
- package/dist/{deploy-engine-iXgQFHYR.js.map → deploy-engine-CpI6zpP3.js.map} +1 -1
- package/dist/{iam-policy-targets-td1X_kKN.js → iam-policy-targets-BREzwsG6.js} +9 -8
- package/dist/iam-policy-targets-BREzwsG6.js.map +1 -0
- package/dist/{iam-role-provider-B1Ma2zVK.js → iam-role-provider-DwUk13DS.js} +3 -3
- package/dist/{iam-role-provider-B1Ma2zVK.js.map → iam-role-provider-DwUk13DS.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{neptune-provider-C-WMp2hQ.js → neptune-provider-Br7yS2dy.js} +3 -3
- package/dist/{neptune-provider-C-WMp2hQ.js.map → neptune-provider-Br7yS2dy.js.map} +1 -1
- package/dist/{program-CPziYRDp.js → program-CXEHAcOO.js} +114 -47
- package/dist/program-CXEHAcOO.js.map +1 -0
- package/dist/{provider-classes-CxXTKgEM.js → provider-classes-DbpGX0KN.js} +36 -21
- package/dist/provider-classes-DbpGX0KN.js.map +1 -0
- package/dist/{rds-provider-C193wAF8.js → rds-provider-C6t144QY.js} +3 -3
- package/dist/{rds-provider-C193wAF8.js.map → rds-provider-C6t144QY.js.map} +1 -1
- package/dist/{version-Br6yDF8t.js → version-VBHkBg7c.js} +2 -2
- package/dist/{version-Br6yDF8t.js.map → version-VBHkBg7c.js.map} +1 -1
- package/package.json +1 -1
- package/dist/iam-policy-targets-td1X_kKN.js.map +0 -1
- package/dist/program-CPziYRDp.js.map +0 -1
- package/dist/provider-classes-CxXTKgEM.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-
|
|
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-
|
|
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-CpI6zpP3.js";
|
|
6
|
+
import { t as getCdkdVersion } from "./version-VBHkBg7c.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-
|
|
2424
|
+
providerClasses ??= import("./provider-classes-DbpGX0KN.js");
|
|
2425
2425
|
return providerClasses;
|
|
2426
2426
|
}
|
|
2427
2427
|
function registerAllProviders(registry, classes) {
|
|
@@ -8117,6 +8117,7 @@ function canonicalizeIpProtocols(baseline, aws, resourceType) {
|
|
|
8117
8117
|
const CC_API_FALLBACK_DENY_LIST = {
|
|
8118
8118
|
"AWS::ApiGateway::RestApi": "Body / BodyS3Location are write-only inputs not returned by CC API GetResource; cdkd state preserves them",
|
|
8119
8119
|
"AWS::CloudFormation::Stack": "cdkd deploys nested stacks itself: no CloudFormation stack exists, and the physicalId is a cdkd-local placeholder ARN",
|
|
8120
|
+
"AWS::CloudWatch::AnomalyDetector": "the physicalId is a cdkd-derived metric descriptor, not the AnomalyDetectorId Cloud Control's GetResource requires",
|
|
8120
8121
|
"AWS::EC2::LaunchTemplate": "CC API returns version-bumped LaunchTemplateData with synthetic LatestVersionNumber that diverges from the CFn input shape"
|
|
8121
8122
|
};
|
|
8122
8123
|
|
|
@@ -10610,18 +10611,22 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
10610
10611
|
const stateTargetFor = (logicalId, resourceType) => resourceType === NESTED_STACK_TYPE ? `${stackName}~${logicalId}` : stackName;
|
|
10611
10612
|
const skippedStateTargets = /* @__PURE__ */ new Set();
|
|
10612
10613
|
const failedStateTargets = /* @__PURE__ */ new Set();
|
|
10613
|
-
const hintCommand = (command, t) => pasteableCommand(command, [
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10614
|
+
const hintCommand = (command, t) => pasteableCommand(command, [
|
|
10615
|
+
{
|
|
10616
|
+
value: t,
|
|
10617
|
+
hole: "stack",
|
|
10618
|
+
opts: { plainIdent: true }
|
|
10619
|
+
},
|
|
10620
|
+
{
|
|
10621
|
+
flag: "--stack-region",
|
|
10622
|
+
value: regionForState,
|
|
10623
|
+
hole: "region",
|
|
10624
|
+
opts: { plainIdent: true }
|
|
10625
|
+
},
|
|
10626
|
+
...accountArgs(refusalRecovery)
|
|
10627
|
+
]);
|
|
10623
10628
|
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.
|
|
10629
|
+
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
10630
|
let secretPrincipalRegions;
|
|
10626
10631
|
const buildDestroySnapshot = () => {
|
|
10627
10632
|
const { imports: _imports, outputReads: _outputReads, ...rest } = state;
|
|
@@ -10987,7 +10992,7 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
10987
10992
|
const droppableSkipped = journaledOrphanFailures > 0 ? skippedTargets.filter((t) => t !== stackName) : skippedTargets;
|
|
10988
10993
|
const skippedCommands = hintFor("cdkd state show", skippedTargets, "Inspect it with") + hintFor("cdkd state orphan", droppableSkipped, "Drop the record with");
|
|
10989
10994
|
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));
|
|
10995
|
+
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
10996
|
}
|
|
10992
10997
|
} finally {
|
|
10993
10998
|
try {
|
|
@@ -11082,6 +11087,15 @@ async function destroyCommand(stackArgs, options) {
|
|
|
11082
11087
|
});
|
|
11083
11088
|
const region = namedCliRegion(options.region) ?? "us-east-1";
|
|
11084
11089
|
const stateBucket = await resolveStateBucketWithDefault(options.stateBucket, region);
|
|
11090
|
+
const accountRecovery = {
|
|
11091
|
+
profile: options.profile,
|
|
11092
|
+
stateBucket,
|
|
11093
|
+
statePrefix: options.statePrefix
|
|
11094
|
+
};
|
|
11095
|
+
const stateCommandAccount = {
|
|
11096
|
+
args: accountArgs(accountRecovery),
|
|
11097
|
+
clause: withheldAccountClause(accountRecovery, "the command lines below print")
|
|
11098
|
+
};
|
|
11085
11099
|
logger.info("Starting stack destruction...");
|
|
11086
11100
|
logger.debug("Options:", options);
|
|
11087
11101
|
if (options.region) {
|
|
@@ -11226,7 +11240,7 @@ async function destroyCommand(stackArgs, options) {
|
|
|
11226
11240
|
const refRegion = allStateRefs.find((r) => r.stackName === pattern)?.region ?? region;
|
|
11227
11241
|
const stateOnlyResult = await stateBackend.getState(pattern, refRegion);
|
|
11228
11242
|
if (stateOnlyResult?.state.parentStack) {
|
|
11229
|
-
const err = new NestedStackChildDirectDestroyError(pattern, stateOnlyResult.state.parentStack, stateOnlyResult.state.parentLogicalId);
|
|
11243
|
+
const err = new NestedStackChildDirectDestroyError(pattern, stateOnlyResult.state.parentStack, stateOnlyResult.state.parentLogicalId, void 0, stateCommandAccount);
|
|
11230
11244
|
logger.error(` ✗ ${err.message}`);
|
|
11231
11245
|
totalErrors++;
|
|
11232
11246
|
} else if (appStacks.length > 0 && !notInApp.includes(pattern)) notInApp.push(pattern);
|
|
@@ -11258,7 +11272,10 @@ async function destroyCommand(stackArgs, options) {
|
|
|
11258
11272
|
if (synthStack?.terminationProtection === true) {
|
|
11259
11273
|
if (options.removeProtection) logger.warn(`Stack ${displaySafe(stackName)} has terminationProtection: true — bypassing because --remove-protection set`);
|
|
11260
11274
|
else {
|
|
11261
|
-
const err = new StackTerminationProtectionError(stackName
|
|
11275
|
+
const err = new StackTerminationProtectionError(stackName, void 0, {
|
|
11276
|
+
args: stateCommandAccount.args,
|
|
11277
|
+
clause: withheldAccountClause(accountRecovery, "the command below prints")
|
|
11278
|
+
});
|
|
11262
11279
|
logger.error(` ✗ ${err.message}`);
|
|
11263
11280
|
totalErrors++;
|
|
11264
11281
|
continue;
|
|
@@ -11275,15 +11292,20 @@ async function destroyCommand(stackArgs, options) {
|
|
|
11275
11292
|
} else if (synthRegion && refs.some((r) => r.region === synthRegion)) stackTargetRegion = synthRegion;
|
|
11276
11293
|
else {
|
|
11277
11294
|
const regions = refs.map((r) => r.region === void 0 ? "(legacy)" : plainOrDescribed(r.region, "region")).join(", ");
|
|
11278
|
-
const
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11295
|
+
const orphanOneClause = withheldAccountClause(accountRecovery, "the command below prints").trimEnd();
|
|
11296
|
+
const orphanOne = pasteableCommand("cdkd state orphan", [
|
|
11297
|
+
{
|
|
11298
|
+
value: stackName,
|
|
11299
|
+
hole: "stack",
|
|
11300
|
+
opts: { plainIdent: true }
|
|
11301
|
+
},
|
|
11302
|
+
{
|
|
11303
|
+
flag: "--stack-region",
|
|
11304
|
+
hole: "region"
|
|
11305
|
+
},
|
|
11306
|
+
...stateCommandAccount.args
|
|
11307
|
+
]);
|
|
11308
|
+
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
11309
|
}
|
|
11288
11310
|
const stateResult = await stateBackend.getState(stackName, stackTargetRegion);
|
|
11289
11311
|
if (!stateResult) {
|
|
@@ -11291,7 +11313,7 @@ async function destroyCommand(stackArgs, options) {
|
|
|
11291
11313
|
continue;
|
|
11292
11314
|
}
|
|
11293
11315
|
if (stateResult.state.parentStack) {
|
|
11294
|
-
const err = new NestedStackChildDirectDestroyError(stackName, stateResult.state.parentStack, stateResult.state.parentLogicalId);
|
|
11316
|
+
const err = new NestedStackChildDirectDestroyError(stackName, stateResult.state.parentStack, stateResult.state.parentLogicalId, void 0, stateCommandAccount);
|
|
11295
11317
|
logger.error(` ✗ ${err.message}`);
|
|
11296
11318
|
totalErrors++;
|
|
11297
11319
|
continue;
|
|
@@ -13987,6 +14009,15 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
|
|
|
13987
14009
|
}
|
|
13988
14010
|
let resolved;
|
|
13989
14011
|
try {
|
|
14012
|
+
const noIdentifier = physicalIdIsNotImportIdentifier(resourceType);
|
|
14013
|
+
if (noIdentifier !== void 0) {
|
|
14014
|
+
blocked.push({
|
|
14015
|
+
logicalId,
|
|
14016
|
+
resourceType,
|
|
14017
|
+
reason: `cdkd cannot export ${resourceType}: ${noIdentifier}, so an IMPORT changeset addressed by it would fail after the stack was locked. Remove the resource from the stack before exporting (it stays in AWS and can be re-declared in CloudFormation afterwards), or destroy it first and let CloudFormation create it fresh.`
|
|
14018
|
+
});
|
|
14019
|
+
continue;
|
|
14020
|
+
}
|
|
13990
14021
|
const measuredRefusal = cfnRefusesImportDespiteRegistry(resourceType);
|
|
13991
14022
|
if (!options.skipImportSupportPreflight && measuredRefusal !== void 0) {
|
|
13992
14023
|
blocked.push({
|
|
@@ -14210,6 +14241,10 @@ const CFN_IMPORT_REFUSED_DESPITE_REGISTRY = /* @__PURE__ */ new Map([["AWS::AppS
|
|
|
14210
14241
|
function cfnRefusesImportDespiteRegistry(resourceType) {
|
|
14211
14242
|
return CFN_IMPORT_REFUSED_DESPITE_REGISTRY.get(resourceType);
|
|
14212
14243
|
}
|
|
14244
|
+
const PHYSICAL_ID_NOT_IMPORT_IDENTIFIER = /* @__PURE__ */ new Map([["AWS::CloudWatch::AnomalyDetector", "its physicalId is a metric descriptor cdkd derives, not the registry's AnomalyDetectorId, and the CloudWatch API does not return that identifier"]]);
|
|
14245
|
+
function physicalIdIsNotImportIdentifier(resourceType) {
|
|
14246
|
+
return PHYSICAL_ID_NOT_IMPORT_IDENTIFIER.get(resourceType);
|
|
14247
|
+
}
|
|
14213
14248
|
async function fetchPrimaryIdentifier(resourceType, cfnClient) {
|
|
14214
14249
|
try {
|
|
14215
14250
|
const resp = await describeTypeWithThrottleRetry(resourceType, cfnClient);
|
|
@@ -16016,6 +16051,11 @@ async function stateOrphanCommand(stackArgs, options) {
|
|
|
16016
16051
|
}
|
|
16017
16052
|
if (!options.yes && !options.force) {
|
|
16018
16053
|
const targetList = targets.map((t) => describedStackRef(t)).join(", ");
|
|
16054
|
+
const bannerAccount = {
|
|
16055
|
+
profile: options.profile,
|
|
16056
|
+
stateBucket: setup.bucket,
|
|
16057
|
+
statePrefix: options.statePrefix
|
|
16058
|
+
};
|
|
16019
16059
|
const destroyCmd = pasteableCommand("cdkd destroy", [{
|
|
16020
16060
|
value: stackName,
|
|
16021
16061
|
hole: "stack",
|
|
@@ -16023,8 +16063,9 @@ async function stateOrphanCommand(stackArgs, options) {
|
|
|
16023
16063
|
patternMatched: true,
|
|
16024
16064
|
plainIdent: true
|
|
16025
16065
|
}
|
|
16026
|
-
}]);
|
|
16027
|
-
|
|
16066
|
+
}, ...accountArgs(bannerAccount)]);
|
|
16067
|
+
const bannerAccountClause = withheldAccountClause(bannerAccount, "the command below prints").trimEnd();
|
|
16068
|
+
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
16069
|
if (!await confirmStateOrphanRemoval(`Remove state for ${targetList} from s3://${setup.bucket}/${setup.prefix}/?`)) {
|
|
16029
16070
|
logger.info(safeMsg`Cancelled removal of state for stack: ${plainOrDescribed(stackName, "stack name")}`);
|
|
16030
16071
|
continue;
|
|
@@ -16092,17 +16133,22 @@ async function stateOrphanResources(stackName, requested, options) {
|
|
|
16092
16133
|
const childRef = childRefs.find((r) => r.region === region) ?? childRefs[0];
|
|
16093
16134
|
if (childRef === void 0) continue;
|
|
16094
16135
|
const otherRegions = childRefs.length - 1;
|
|
16095
|
-
const childCommand = pasteableCommand("cdkd state orphan", [
|
|
16096
|
-
|
|
16097
|
-
|
|
16098
|
-
|
|
16099
|
-
|
|
16100
|
-
|
|
16101
|
-
|
|
16102
|
-
|
|
16103
|
-
|
|
16104
|
-
|
|
16105
|
-
|
|
16136
|
+
const childCommand = pasteableCommand("cdkd state orphan", [
|
|
16137
|
+
{
|
|
16138
|
+
value: child,
|
|
16139
|
+
hole: "stack",
|
|
16140
|
+
opts: { plainIdent: true }
|
|
16141
|
+
},
|
|
16142
|
+
...childRef.region !== void 0 ? [{
|
|
16143
|
+
flag: "--stack-region",
|
|
16144
|
+
value: childRef.region,
|
|
16145
|
+
hole: "region",
|
|
16146
|
+
opts: { plainIdent: true }
|
|
16147
|
+
}] : [],
|
|
16148
|
+
...accountArgs(recovery)
|
|
16149
|
+
]);
|
|
16150
|
+
const accountClause = withheldAccountClause(recovery, "the command below prints").trimEnd();
|
|
16151
|
+
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
16152
|
}
|
|
16107
16153
|
clients = new AwsClients({
|
|
16108
16154
|
region,
|
|
@@ -17765,7 +17811,7 @@ function collectAssetReferences(stateDocument, marker, refs) {
|
|
|
17765
17811
|
};
|
|
17766
17812
|
walk(stateDocument);
|
|
17767
17813
|
}
|
|
17768
|
-
async function scanReferencedAssets(stateBackend, marker, logger) {
|
|
17814
|
+
async function scanReferencedAssets(stateBackend, marker, logger, account) {
|
|
17769
17815
|
const refs = {
|
|
17770
17816
|
s3Keys: /* @__PURE__ */ new Set(),
|
|
17771
17817
|
imageTags: /* @__PURE__ */ new Set(),
|
|
@@ -17784,7 +17830,12 @@ async function scanReferencedAssets(stateBackend, marker, logger) {
|
|
|
17784
17830
|
parsed = JSON.parse(body);
|
|
17785
17831
|
} catch (error) {
|
|
17786
17832
|
const { stack, region } = parseStateKey(key, STATE_FILE_SUFFIX, DEFAULT_STATE_PREFIX);
|
|
17787
|
-
const
|
|
17833
|
+
const pasteable = isPasteableIdent(stack) && (region === void 0 || isPasteableIdent(region));
|
|
17834
|
+
const recovery = {
|
|
17835
|
+
...account,
|
|
17836
|
+
statePrefix: keyPrefixOf(key, stack, region)
|
|
17837
|
+
};
|
|
17838
|
+
const inspectHint = pasteable ? pasteableCommand("cdkd state show", [...region === void 0 ? [{
|
|
17788
17839
|
value: stack,
|
|
17789
17840
|
hole: "stack"
|
|
17790
17841
|
}] : [{
|
|
@@ -17794,9 +17845,13 @@ async function scanReferencedAssets(stateBackend, marker, logger) {
|
|
|
17794
17845
|
flag: "--stack-region",
|
|
17795
17846
|
value: region,
|
|
17796
17847
|
hole: "region"
|
|
17797
|
-
}]).command : void 0;
|
|
17848
|
+
}], ...accountArgs(recovery)]).command : void 0;
|
|
17849
|
+
const accountClause = inspectHint === void 0 ? "" : [withheldAccountClause({
|
|
17850
|
+
...recovery,
|
|
17851
|
+
statePrefix: void 0
|
|
17852
|
+
}, "the command below prints").trimEnd(), keyPrefixHoleSentence(recovery.statePrefix)].filter((part) => part !== "").join(" ");
|
|
17798
17853
|
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);
|
|
17854
|
+
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
17855
|
}
|
|
17801
17856
|
collectAssetReferences(parsed, marker, refs);
|
|
17802
17857
|
}
|
|
@@ -18041,7 +18096,10 @@ async function gcCommand(options) {
|
|
|
18041
18096
|
let s3Candidates = [];
|
|
18042
18097
|
let ecrCandidates = [];
|
|
18043
18098
|
if (marker !== null) {
|
|
18044
|
-
const refs = await scanReferencedAssets(stateBackend, marker, logger
|
|
18099
|
+
const refs = await scanReferencedAssets(stateBackend, marker, logger, {
|
|
18100
|
+
profile: options.profile,
|
|
18101
|
+
stateBucket: bucketName
|
|
18102
|
+
});
|
|
18045
18103
|
s3Candidates = await listS3Candidates(awsClients.s3, marker.assetBucket, accountId, refs, cutoffMs, logger);
|
|
18046
18104
|
ecrCandidates = await listEcrCandidates(ecrClient, marker.containerRepo, refs, cutoffMs, logger);
|
|
18047
18105
|
}
|
|
@@ -18111,6 +18169,15 @@ function createGcCommand() {
|
|
|
18111
18169
|
commonOptions.forEach((opt) => cmd.addOption(opt));
|
|
18112
18170
|
return cmd;
|
|
18113
18171
|
}
|
|
18172
|
+
function keyPrefixOf(key, stack, region) {
|
|
18173
|
+
const tail = `/${stack}${region === void 0 ? "" : `/${region}`}/${STATE_FILE_SUFFIX.replace(/^\//, "")}`;
|
|
18174
|
+
return key.endsWith(tail) ? key.slice(0, -tail.length) : void 0;
|
|
18175
|
+
}
|
|
18176
|
+
function keyPrefixHoleSentence(prefix) {
|
|
18177
|
+
const reason = pasteableCommand("cdkd", accountArgs({ statePrefix: prefix })).withheld.find((w) => w.hole === "prefix")?.reason;
|
|
18178
|
+
if (reason === void 0) return "";
|
|
18179
|
+
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.`;
|
|
18180
|
+
}
|
|
18114
18181
|
|
|
18115
18182
|
//#endregion
|
|
18116
18183
|
//#region src/cli/commands/publish-assets.ts
|
|
@@ -26884,4 +26951,4 @@ function collectVerbFlags(program) {
|
|
|
26884
26951
|
|
|
26885
26952
|
//#endregion
|
|
26886
26953
|
export { canonicalizeIpProtocolValue as a, buildProgram, resolveSecretDerivedPrincipals as i, runDestroyForStack as n, resolvedResourceTimeoutMs as o, isResolvableSecretPrincipalList as r, canonicalizeIpv4Cidr as t };
|
|
26887
|
-
//# sourceMappingURL=program-
|
|
26954
|
+
//# sourceMappingURL=program-CXEHAcOO.js.map
|