@cdkd/cli 0.352.11 → 0.352.13

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 (54) hide show
  1. package/dist/{ambient-client-defaults-BfQftjup.js → ambient-client-defaults-_b32vSt-.js} +3 -3
  2. package/dist/{ambient-client-defaults-BfQftjup.js.map → ambient-client-defaults-_b32vSt-.js.map} +1 -1
  3. package/dist/{asg-provider-B_4pcw4I.js → asg-provider-DY41BqOf.js} +6 -6
  4. package/dist/{asg-provider-B_4pcw4I.js.map → asg-provider-DY41BqOf.js.map} +1 -1
  5. package/dist/cli.js +3 -3
  6. package/dist/{custom-resource-runtime-CqgBKNa_.js → custom-resource-runtime-QfwICca8.js} +6 -6
  7. package/dist/{custom-resource-runtime-CqgBKNa_.js.map → custom-resource-runtime-QfwICca8.js.map} +1 -1
  8. package/dist/{db-associated-roles-j5wKB1V4.js → db-associated-roles-ChWaJgql.js} +2 -2
  9. package/dist/{db-associated-roles-j5wKB1V4.js.map → db-associated-roles-ChWaJgql.js.map} +1 -1
  10. package/dist/{delete-started-CqhLfKwS.js → delete-started-BAl80KJ-.js} +4 -4
  11. package/dist/{delete-started-CqhLfKwS.js.map → delete-started-BAl80KJ-.js.map} +1 -1
  12. package/dist/{deploy-engine-DvGT0BH-.js → deploy-engine-BQral6za.js} +1052 -827
  13. package/dist/deploy-engine-BQral6za.js.map +1 -0
  14. package/dist/{diff-calculator-DcfE2c-4.js → diff-calculator-Dj6UGllF.js} +297 -23
  15. package/dist/diff-calculator-Dj6UGllF.js.map +1 -0
  16. package/dist/{ec2-termination-protection-DHNUzWHz.js → ec2-termination-protection-D1fp1UTY.js} +6 -6
  17. package/dist/{ec2-termination-protection-DHNUzWHz.js.map → ec2-termination-protection-D1fp1UTY.js.map} +1 -1
  18. package/dist/{ecr-uri-D7lbBR5B.js → ecr-uri-BNOBWmtv.js} +2 -2
  19. package/dist/{ecr-uri-D7lbBR5B.js.map → ecr-uri-BNOBWmtv.js.map} +1 -1
  20. package/dist/{expected-bucket-owner-xGmx3Vtv.js → expected-bucket-owner-DvEnZMQG.js} +2 -2
  21. package/dist/{expected-bucket-owner-xGmx3Vtv.js.map → expected-bucket-owner-DvEnZMQG.js.map} +1 -1
  22. package/dist/{iam-role-provider-DJvOTPL2.js → iam-role-provider-DWk5DUSX.js} +8 -8
  23. package/dist/{iam-role-provider-DJvOTPL2.js.map → iam-role-provider-DWk5DUSX.js.map} +1 -1
  24. package/dist/{image-plan-BAVYrU--.js → image-plan-DQ0trmM_.js} +14 -14
  25. package/dist/{image-plan-BAVYrU--.js.map → image-plan-DQ0trmM_.js.map} +1 -1
  26. package/dist/index.d.ts +114 -12
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +5 -5
  29. package/dist/{logger-BZAXATu5.js → logger-BmVyKPL2.js} +2 -2
  30. package/dist/{logger-BZAXATu5.js.map → logger-BmVyKPL2.js.map} +1 -1
  31. package/dist/{neptune-provider-DvIWf3JD.js → neptune-provider-CaTWycXB.js} +7 -7
  32. package/dist/{neptune-provider-DvIWf3JD.js.map → neptune-provider-CaTWycXB.js.map} +1 -1
  33. package/dist/{program-wHPyPSIE.js → program-B8pMildk.js} +186 -175
  34. package/dist/program-B8pMildk.js.map +1 -0
  35. package/dist/{provider-classes-DYjNHrv7.js → provider-classes-D3-D7HGf.js} +21 -21
  36. package/dist/{provider-classes-DYjNHrv7.js.map → provider-classes-D3-D7HGf.js.map} +1 -1
  37. package/dist/{rds-provider-C0ApHlEg.js → rds-provider-BXsZQCfA.js} +10 -10
  38. package/dist/{rds-provider-C0ApHlEg.js.map → rds-provider-BXsZQCfA.js.map} +1 -1
  39. package/dist/{read-replica-B1uGbZ_1.js → read-replica-CaWHwB3m.js} +3 -3
  40. package/dist/{read-replica-B1uGbZ_1.js.map → read-replica-CaWHwB3m.js.map} +1 -1
  41. package/dist/{replacement-rules-Dsgiy577.js → replacement-rules-BuvJdDDu.js} +3 -3
  42. package/dist/{replacement-rules-Dsgiy577.js.map → replacement-rules-BuvJdDDu.js.map} +1 -1
  43. package/dist/{resource-deadline-CvylpYDt.js → resource-deadline-CB5xO4LO.js} +4 -4
  44. package/dist/{resource-deadline-CvylpYDt.js.map → resource-deadline-CB5xO4LO.js.map} +1 -1
  45. package/dist/{run-cli-BfVibwNv.js → run-cli-DlUy-Xfz.js} +2 -2
  46. package/dist/{run-cli-BfVibwNv.js.map → run-cli-DlUy-Xfz.js.map} +1 -1
  47. package/dist/{update-removal-23Sp06KY.js → update-removal-i8K9a3aR.js} +22 -22
  48. package/dist/{update-removal-23Sp06KY.js.map → update-removal-i8K9a3aR.js.map} +1 -1
  49. package/dist/{version-DheF9mtT.js → version-CK4KyY8m.js} +2 -2
  50. package/dist/{version-DheF9mtT.js.map → version-CK4KyY8m.js.map} +1 -1
  51. package/package.json +2 -2
  52. package/dist/deploy-engine-DvGT0BH-.js.map +0 -1
  53. package/dist/diff-calculator-DcfE2c-4.js.map +0 -1
  54. package/dist/program-wHPyPSIE.js.map +0 -1
@@ -1,15 +1,15 @@
1
- import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, a as UNSHOWABLE_VALUE, c as deployReplaceCommand, d as pasteableCommand, f as physicalIdShownBesideCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE } from "./version-DheF9mtT.js";
2
- import { $ as withStackScope, A as configStringRefusal, C as fallbackNamePropertyFor, D as coerceCfnInteger, E as coerceCfnBoolean, F as requireConfigString, G as currentNameGeneration, H as looksLikeCdkdGeneratedName, J as getCurrentStackName, K as getCurrentSkipPrefix, M as replayWarn, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, S as explicitNamePropertyFor, T as withoutGeneratedFallbackName, V as generateResourceNameWithFallback, W as stackInstanceNameSuffix, X as isNameGeneration, Z as withNameGeneration, _ as currentLogLineMasker, b as alternateNamePropertiesFor, c as VERBOSE_POINTER, et as withStackScopeBeforeStateRead, g as verbosePointerTail, h as verbosePointerSentence, j as readConfigString, k as configIntegerRefusal, m as verboseAwareText, n as getLogger, p as safeStringify, q as getCurrentStackInstanceId, u as describeAwsFailure, v as installLogLineMaskerSource, w as generatedNameFor, x as applyDefaultNameForFallback, y as getLiveRenderer } from "./logger-BZAXATu5.js";
3
- import { A as stripControlChars, C as isNameCooldownError, F as isAmbiguousOutcomeError, G as markRedactedCause, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, K as wrapMaskedAwsError, L as isIamPropagationError, O as relayedNameCollision, P as isAmbiguousCcHandlerErrorCode, Q as AccountIdUnavailableError, S as isNameCollisionErrorFrom, T as isReplayedNameCollisionFrom, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, Z as SelectOutOfBoundsRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, b as isUpdateUnsupportedError, et as CdkdError, i as credentialFingerprint, k as escapeRegExp$1, m as ExportInUseError, n as ambientCredentialConfig, nt as DeploymentNotApprovedError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, st as StateError, t as ambientClientDefaults, w as isRecreateRetryableError, z as isTransientServerError } from "./ambient-client-defaults-BfQftjup.js";
1
+ import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, a as UNSHOWABLE_VALUE, c as deployReplaceCommand, d as pasteableCommand, f as physicalIdShownBesideCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE } from "./version-CK4KyY8m.js";
2
+ import { $ as withStackScope, A as configStringRefusal, C as fallbackNamePropertyFor, D as coerceCfnInteger, E as coerceCfnBoolean, F as requireConfigString, G as currentNameGeneration, H as looksLikeCdkdGeneratedName, J as getCurrentStackName, K as getCurrentSkipPrefix, M as replayWarn, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, S as explicitNamePropertyFor, T as withoutGeneratedFallbackName, V as generateResourceNameWithFallback, W as stackInstanceNameSuffix, X as isNameGeneration, Z as withNameGeneration, _ as currentLogLineMasker, b as alternateNamePropertiesFor, c as VERBOSE_POINTER, et as withStackScopeBeforeStateRead, g as verbosePointerTail, h as verbosePointerSentence, j as readConfigString, k as configIntegerRefusal, m as verboseAwareText, n as getLogger, p as safeStringify, q as getCurrentStackInstanceId, u as describeAwsFailure, v as installLogLineMaskerSource, w as generatedNameFor, x as applyDefaultNameForFallback, y as getLiveRenderer } from "./logger-BmVyKPL2.js";
3
+ import { A as stripControlChars, C as isNameCooldownError, F as isAmbiguousOutcomeError, G as markRedactedCause, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, K as wrapMaskedAwsError, L as isIamPropagationError, O as relayedNameCollision, P as isAmbiguousCcHandlerErrorCode, Q as AccountIdUnavailableError, S as isNameCollisionErrorFrom, T as isReplayedNameCollisionFrom, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, Z as SelectOutOfBoundsRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, b as isUpdateUnsupportedError, et as CdkdError, i as credentialFingerprint, k as escapeRegExp$1, m as ExportInUseError, n as ambientCredentialConfig, nt as DeploymentNotApprovedError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, st as StateError, t as ambientClientDefaults, w as isRecreateRetryableError, z as isTransientServerError } from "./ambient-client-defaults-_b32vSt-.js";
4
4
  import { a as getAssumedRoleCredentials, c as setAssumedRoleCredentials, d as quietS3Logger, f as ambientRegion, i as awsEndpointOverrideUrl, n as awsClientDefaults, o as getPreAssumeEnvCredentials, r as awsEndpointOverrideActive, t as SECOND_ROLE_PUBLISH_REFUSAL, u as setPreAssumeEnvCredentials } from "./aws-client-defaults-DAebi99J.js";
5
5
  import { l as s3ClientDefaults, r as getAwsClients } from "./aws-clients-DOkPjjAW.js";
6
- import { A as describeJsonParseFailure, C as PhaseClock, E as recordPhase, M as parseFailureDebugDetail, N as parseJsonNamingNoBody, O as timePhase, P as utf8ByteLength, S as CREATE_ONLY_PATHS_SNAPSHOT, T as phaseTimingsEnabled, _ as hasNoRegistrySchema, a as reDisableInstanceApiTermination, b as IAM_PROPAGATION_MAX_DELAY_MS, c as unchangedBehindSecretReference, d as getCreateOnlyPropertyPaths, f as isIntrinsicShaped, g as describeTypeWithThrottleRetry, h as parseCreateOnlyPropertyPointers, i as observeThenDisableInstanceApiTermination, j as jsonParseFailureStandIn, k as timePhaseSync, l as cachedCreateOnlyPropertyPaths, m as templateResourceTypes, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, p as prefetchCreateOnlyPropertyPaths, r as isTerminationProtectionPropagationError, v as isAwsEmulatorRegistryMiss, w as phaseScopeForStack, x as withRetry, y as reportAwsEmulatorRegistryMiss } from "./ec2-termination-protection-DHNUzWHz.js";
6
+ import { A as describeJsonParseFailure, C as PhaseClock, E as recordPhase, M as parseFailureDebugDetail, N as parseJsonNamingNoBody, O as timePhase, P as utf8ByteLength, S as CREATE_ONLY_PATHS_SNAPSHOT, T as phaseTimingsEnabled, _ as hasNoRegistrySchema, a as reDisableInstanceApiTermination, b as IAM_PROPAGATION_MAX_DELAY_MS, c as unchangedBehindSecretReference, d as getCreateOnlyPropertyPaths, f as isIntrinsicShaped, g as describeTypeWithThrottleRetry, h as parseCreateOnlyPropertyPointers, i as observeThenDisableInstanceApiTermination, j as jsonParseFailureStandIn, k as timePhaseSync, l as cachedCreateOnlyPropertyPaths, m as templateResourceTypes, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, p as prefetchCreateOnlyPropertyPaths, r as isTerminationProtectionPropagationError, v as isAwsEmulatorRegistryMiss, w as phaseScopeForStack, x as withRetry, y as reportAwsEmulatorRegistryMiss } from "./ec2-termination-protection-D1fp1UTY.js";
7
7
  import { i as sameRegion, n as canonicalizeRegion, r as derivePartitionAndUrlSuffix } from "./aws-partition-DA0r2sr-.js";
8
- import { t as expectedOwnerParam } from "./expected-bucket-owner-xGmx3Vtv.js";
9
- import { B as refusalTypeShown, Bt as RETRY_AUXILIARY_OWNER, Ct as isInterruptedWaitError, Dt as compositeIdSeparatorRefusal, Ft as createMaskedRetryLogger, G as isMarkedNotGone, H as resolveExplicitPhysicalId, It as isSecretDerivedValue, J as deleteWithProtectionCompensation, Jt as markAuxiliaryFailure, K as markNotGone, Kt as isAuxiliaryFailure, L as isQuotableImportValue, Lt as maskDeep, M as withoutServerErrorRetries, Mt as segmentAfterAnchor, Nt as stateOrphanRecordRemedy, Pt as createMaskedLogSinks, R as normalizeAwsTagsToCfn, Rt as maskerOrIdentity, Tt as canonicalizeRoute53QueryName, U as RESOURCE_NOT_FOUND, Ut as createdBeforeFailure, W as assertRegionMatch, Wt as createdResourceIdentityBeforeFailure, X as observeThenDisableProtection, Yt as markCreatedBeforeFailure, _t as pasteableAwsCommand, an as recoveryCommandFlags, c as clearCreatedReport, cn as DEFAULT_STATE_PREFIX, ct as protectionFlipKey, dt as ElapsedBudgetRegistry, f as retractCreatedResource, fn as producerRecordKey, ft as monotonicNowMs, hn as withPasteableAwsProfile, jt as resourceTypeShown, kt as logicalIdShown, l as collectCreatedResources, ln as injectiveKey, lt as runDeleteAttempt, n as prepareRemovalForUpdate, o as withoutInjectedRemovals, on as sanitizeRecoveryValue, ot as ProtectionFlipRegistry, pt as DELETION_PROTECTION_DOC_POINTER, q as compensateProtectionFlip, qt as isAuxiliaryMarkOf, r as removalWarning, s as CreatedResourceSink, sn as CUSTOM_RESOURCE_RESPONSE_PREFIX, st as isTerminalDeleteFailure, u as reportCreatedResource, ut as ElapsedBudget, vt as protectedReplacementAdvice, wt as startInterruptWatch, x as withUnchangedSecretPrincipalLists, z as quotedRemedyLogicalId, zt as withDerivedNameMasks } from "./update-removal-23Sp06KY.js";
10
- import { Ct as isReadableBag, Dt as skippedOutputsCarriedFrom, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, gt as slowCcOperationTimeoutMs, ht as dbInstanceAttributes, i as dbClusterAttributes, n as isRefusedByName, r as markDeleteStarted, t as isDeleteStarted, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-CqhLfKwS.js";
11
- import { $t as recordInheritedParameterValue, A as witnessNormalize, An as recordNoEchoAttributeValues, At as withoutPhysicalNameCopies, B as redactionClaimOf, Cn as noEchoParameterPlaintextsOf, Ct as withLegacyOverlapScan, D as recordedNoEchoValuesOf, Dn as recordFreshNoEchoValuesIn, Dt as replaceEmbeddedPhysicalNameRewrites, E as recordPassedNoEchoParameters, En as recordDerivedMaskOnlyValue, Et as repairPhysicalNameCopyLeaves, F as markLeafCertifiedBag, G as foldRecording, Gt as recordTakenIfBranch, H as mixedLiteralAnswered, Ht as splitOutsideDynamicReferences, I as markSameGenerationBag, In as isDynamicReferenceString, It as secretRerenderPairs, J as hasPassProvenance, Jt as templateRereadsAccountId, K as openRecordingScope, Kt as inheritedPseudoValue, L as mergeResolvedPairs, Ln as isSingleDynamicReferenceToken, M as carryRedactionMarks, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, N as intrinsicLeafResolutionOf, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, O as replaceAtCoordinates, Ot as scrubResourceRecord, P as isSameGenerationBag, Pn as withoutNoEchoParameterEntries, Q as recordReferenceResolution, Qt as recordInheritedParameterRead, R as recordIntrinsicLeafResolution, Rn as maskMatchSpans, S as noEchoParametersReadBy, Sn as markNoEchoParameterClass, St as replaceWholeLeaves, Tt as repairEmbeddedPhysicalNamesTowards, U as withLegacyMixedScan, Ut as standsForInheritedSecret, V as resolvedPlaintextOf, Vt as rereadParameterExpression, W as redactForState, Wt as recordDroppedArrayElements, X as passReadVersionsFor, Xt as inheritedParameterExpression, Y as passProvenanceFor, Yt as inheritNestedStackParameterAssociations, Z as recordReferenceProvenanceEntry, Zt as inheritedRenderedToken, _ as noEchoComparison, _n as freshNoEchoValuesOf, _t as maskSecretsInText, an as recordRecoverableMaskedOutput, at as literalSplitDelimitersOf, bn as isScopedSecretVerdict, bt as legacyReferenceLeavesOnly, c as parseLambdaFunctionAddress, ct as recordLogOnlyParameterValue, d as canonicalJson$5, dn as crossStackSourceKey, dt as shareLogOnlyValues, en as redactInheritedParameterValue, et as carryLogOnlyValues, f as isMarkedCoordinate, fn as recordCrossStackExpression, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gn as contradictProvenPublicExpression, gt as maskSecretsInError, h as maskWholeValue, hn as carryFreshNoEchoMark, ht as maskRecordedSecretsInText, in as freshNoEchoLeafPositions, it as hasMaskableValues, jn as recordNoEchoParameterFreshValue, jt as spanNamesResolvableService, k as valueAtCoordinate, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, lt as recordLogOnlySplitFragments, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nn as carriesFreshNoEchoValue, nt as createUnionSecretMasker, on as recoverMaskedOutput, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, q as recordSecretResolution, qt as recordInheritedPseudoParameters, rn as embedsFreshNoEchoValue, rt as hasLogOnlyValues, sn as physicalNameCopiesOf, st as printingCorpusOf, t as ReplacementRulesRegistry, tn as withdrawRenderedParameterSpelling, tt as carryLogOnlyValuesCarriedBy, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, vn as isMaskOnlyPlaintext, vt as differingStringLeaves, w as readbackPathFor, wn as pinScopedSecretVerdict, wt as embeddedPhysicalNameRewrites, x as noEchoParameterNodesAt, xn as isSecretExpressionByVerdictOrSpelling, xt as overlapRuleAnswered, y as noEchoLeavesOf, yn as isNoEchoParameterPlaintext, yt as legacyLeavesWithoutMask, z as recordIntrinsicLeafResolutionAs, zt as arrayPairsWhateverDrops } from "./replacement-rules-Dsgiy577.js";
12
- import { C as unsettledItemsField, D as withUnsettledItems, E as unsettledPropertiesOf, O as withUnsettledProperties, S as unsettledContextOf, T as unsettledItemsTopKey, c as refuseRestoreFromItself, f as planTagDiff, g as tagPlanWarning, i as withResourceDeadline, k as withoutUnsettledProperties, m as refuseMalformedDesiredTags, n as enclosingDeadlineRemainingMs, p as readTagList, r as whileEnclosingDeadlinesPaused, t as enclosingDeadlineExpired, w as unsettledItemsOf, x as isUsableAttemptedName, y as definedAttributes } from "./resource-deadline-CvylpYDt.js";
8
+ import { B as refusalTypeShown, Bt as RETRY_AUXILIARY_OWNER, Ct as isInterruptedWaitError, Dt as compositeIdSeparatorRefusal, Ft as createMaskedRetryLogger, G as isMarkedNotGone, H as resolveExplicitPhysicalId, It as isSecretDerivedValue, J as deleteWithProtectionCompensation, Jt as markAuxiliaryFailure, K as markNotGone, Kt as isAuxiliaryFailure, L as isQuotableImportValue, Lt as maskDeep, M as withoutServerErrorRetries, Mt as segmentAfterAnchor, Nt as stateOrphanRecordRemedy, Pt as createMaskedLogSinks, R as normalizeAwsTagsToCfn, Rt as maskerOrIdentity, Tt as canonicalizeRoute53QueryName, U as RESOURCE_NOT_FOUND, Ut as createdBeforeFailure, W as assertRegionMatch, Wt as createdResourceIdentityBeforeFailure, X as observeThenDisableProtection, Yt as markCreatedBeforeFailure, _t as pasteableAwsCommand, an as recoveryCommandFlags, c as clearCreatedReport, cn as DEFAULT_STATE_PREFIX, ct as protectionFlipKey, dn as withPasteableAwsProfile, dt as ElapsedBudgetRegistry, f as retractCreatedResource, fn as injectiveKey, ft as monotonicNowMs, hn as producerRecordKey, jt as resourceTypeShown, kt as logicalIdShown, l as collectCreatedResources, lt as runDeleteAttempt, n as prepareRemovalForUpdate, o as withoutInjectedRemovals, on as sanitizeRecoveryValue, ot as ProtectionFlipRegistry, pt as DELETION_PROTECTION_DOC_POINTER, q as compensateProtectionFlip, qt as isAuxiliaryMarkOf, r as removalWarning, s as CreatedResourceSink, sn as CUSTOM_RESOURCE_RESPONSE_PREFIX, st as isTerminalDeleteFailure, u as reportCreatedResource, ut as ElapsedBudget, vt as protectedReplacementAdvice, wt as startInterruptWatch, x as withUnchangedSecretPrincipalLists, z as quotedRemedyLogicalId, zt as withDerivedNameMasks } from "./update-removal-i8K9a3aR.js";
9
+ import { t as expectedOwnerParam } from "./expected-bucket-owner-DvEnZMQG.js";
10
+ import { Ct as isReadableBag, Dt as skippedOutputsCarriedFrom, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, gt as slowCcOperationTimeoutMs, ht as dbInstanceAttributes, i as dbClusterAttributes, n as isRefusedByName, r as markDeleteStarted, t as isDeleteStarted, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-BAl80KJ-.js";
11
+ import { $t as recordInheritedParameterValue, A as witnessNormalize, An as recordNoEchoAttributeValues, At as withoutPhysicalNameCopies, B as redactionClaimOf, Cn as noEchoParameterPlaintextsOf, Ct as withLegacyOverlapScan, D as recordedNoEchoValuesOf, Dn as recordFreshNoEchoValuesIn, Dt as replaceEmbeddedPhysicalNameRewrites, E as recordPassedNoEchoParameters, En as recordDerivedMaskOnlyValue, Et as repairPhysicalNameCopyLeaves, F as markLeafCertifiedBag, G as foldRecording, Gt as recordTakenIfBranch, H as mixedLiteralAnswered, Ht as splitOutsideDynamicReferences, I as markSameGenerationBag, In as isDynamicReferenceString, It as secretRerenderPairs, J as hasPassProvenance, Jt as templateRereadsAccountId, K as openRecordingScope, Kt as inheritedPseudoValue, L as mergeResolvedPairs, Ln as isSingleDynamicReferenceToken, M as carryRedactionMarks, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, N as intrinsicLeafResolutionOf, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, O as replaceAtCoordinates, Ot as scrubResourceRecord, P as isSameGenerationBag, Pn as withoutNoEchoParameterEntries, Q as recordReferenceResolution, Qt as recordInheritedParameterRead, R as recordIntrinsicLeafResolution, Rn as maskMatchSpans, S as noEchoParametersReadBy, Sn as markNoEchoParameterClass, St as replaceWholeLeaves, Tt as repairEmbeddedPhysicalNamesTowards, U as withLegacyMixedScan, Ut as standsForInheritedSecret, V as resolvedPlaintextOf, Vt as rereadParameterExpression, W as redactForState, Wt as recordDroppedArrayElements, X as passReadVersionsFor, Xt as inheritedParameterExpression, Y as passProvenanceFor, Yt as inheritNestedStackParameterAssociations, Z as recordReferenceProvenanceEntry, Zt as inheritedRenderedToken, _ as noEchoComparison, _n as freshNoEchoValuesOf, _t as maskSecretsInText, an as recordRecoverableMaskedOutput, at as literalSplitDelimitersOf, bn as isScopedSecretVerdict, bt as legacyReferenceLeavesOnly, c as parseLambdaFunctionAddress, ct as recordLogOnlyParameterValue, d as canonicalJson$5, dn as crossStackSourceKey, dt as shareLogOnlyValues, en as redactInheritedParameterValue, et as carryLogOnlyValues, f as isMarkedCoordinate, fn as recordCrossStackExpression, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gn as contradictProvenPublicExpression, gt as maskSecretsInError, h as maskWholeValue, hn as carryFreshNoEchoMark, ht as maskRecordedSecretsInText, in as freshNoEchoLeafPositions, it as hasMaskableValues, jn as recordNoEchoParameterFreshValue, jt as spanNamesResolvableService, k as valueAtCoordinate, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, lt as recordLogOnlySplitFragments, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nn as carriesFreshNoEchoValue, nt as createUnionSecretMasker, on as recoverMaskedOutput, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, q as recordSecretResolution, qt as recordInheritedPseudoParameters, rn as embedsFreshNoEchoValue, rt as hasLogOnlyValues, sn as physicalNameCopiesOf, st as printingCorpusOf, t as ReplacementRulesRegistry, tn as withdrawRenderedParameterSpelling, tt as carryLogOnlyValuesCarriedBy, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, vn as isMaskOnlyPlaintext, vt as differingStringLeaves, w as readbackPathFor, wn as pinScopedSecretVerdict, wt as embeddedPhysicalNameRewrites, x as noEchoParameterNodesAt, xn as isSecretExpressionByVerdictOrSpelling, xt as overlapRuleAnswered, y as noEchoLeavesOf, yn as isNoEchoParameterPlaintext, yt as legacyLeavesWithoutMask, z as recordIntrinsicLeafResolutionAs, zt as arrayPairsWhateverDrops } from "./replacement-rules-BuvJdDDu.js";
12
+ import { C as unsettledItemsField, D as withUnsettledItems, E as unsettledPropertiesOf, O as withUnsettledProperties, S as unsettledContextOf, T as unsettledItemsTopKey, c as refuseRestoreFromItself, f as planTagDiff, g as tagPlanWarning, i as withResourceDeadline, k as withoutUnsettledProperties, m as refuseMalformedDesiredTags, n as enclosingDeadlineRemainingMs, p as readTagList, r as whileEnclosingDeadlinesPaused, t as enclosingDeadlineExpired, w as unsettledItemsOf, x as isUsableAttemptedName, y as definedAttributes } from "./resource-deadline-CB5xO4LO.js";
13
13
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
14
14
  import { AsyncLocalStorage } from "node:async_hooks";
15
15
  import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketLifecycleConfigurationCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client } from "@aws-sdk/client-s3";
@@ -30,10 +30,10 @@ import { CreateSnapshotCommand as CreateSnapshotCommand$1, DescribeReplicationGr
30
30
  import * as fs from "node:fs";
31
31
  import { readFileSync } from "node:fs";
32
32
  import * as path from "node:path";
33
- import { DescribeKeyCommand, GenerateMacCommand, KMSClient } from "@aws-sdk/client-kms";
33
+ import { CreateRepositoryCommand, DescribeRepositoriesCommand, ECRClient, PutImageTagMutabilityCommand } from "@aws-sdk/client-ecr";
34
34
  import { readFile } from "fs/promises";
35
35
  import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, resolve as resolve$1 } from "path";
36
- import { CreateRepositoryCommand, DescribeRepositoriesCommand, ECRClient, PutImageTagMutabilityCommand } from "@aws-sdk/client-ecr";
36
+ import { DescribeKeyCommand, GenerateMacCommand, KMSClient } from "@aws-sdk/client-kms";
37
37
  import { getActiveWorkloadAwsWiring } from "cdk-local/internal";
38
38
  import { isDeepStrictEqual } from "node:util";
39
39
  import { DescribeDBClustersCommand, DescribeDBInstancesCommand, RDSClient } from "@aws-sdk/client-rds";
@@ -82,7 +82,7 @@ async function resolveBucketRegion(bucketName, opts = {}) {
82
82
  });
83
83
  }
84
84
  try {
85
- const { expectedOwnerParam } = await import("./expected-bucket-owner-xGmx3Vtv.js").then((n) => n.n);
85
+ const { expectedOwnerParam } = await import("./expected-bucket-owner-DvEnZMQG.js").then((n) => n.n);
86
86
  return (await client.send(new GetBucketLocationCommand({
87
87
  Bucket: bucketName,
88
88
  ...await expectedOwnerParam(client)
@@ -234,657 +234,48 @@ function displayAssemblyPath(value) {
234
234
  else if (kinds[i] !== "escaped") body += ch;
235
235
  else for (let u = 0; u < ch.length; u++) body += `\\u${ch.charCodeAt(u).toString(16).padStart(4, "0")}`;
236
236
  });
237
- return `"${body}"`;
238
- }
239
- function describeFileReadFailure(err, filePath) {
240
- if (err instanceof SyntaxError) return "invalid JSON";
241
- const message = describeAwsFailure(err).detail;
242
- return displaySafe(filePath === "" ? message : message.split(filePath).join("<path>"));
243
- }
244
- function renderAssemblyPathEscape(escape, dir, action = "load", provenanceOverride) {
245
- const provenance = provenanceOverride ?? `CDK emits assembly paths that stay inside the assembly directory; one that leaves it indicates the synth output was hand-modified or generated by a non-CDK toolchain. Refusing to ${action}.`;
246
- const base = path.resolve(dir);
247
- const realBase = resolveThroughLinks(base) ?? base;
248
- const shownPath = displayAssemblyPath(escape.path);
249
- const shownBase = displayAssemblyPath(base);
250
- if (escape.escape === "symlink") {
251
- if (escape.realPath === realBase) return `resolves to ${shownPath}, a symbolic link to the directory ${shownBase} itself rather than to a file inside it. ${provenance}`;
252
- return `resolves to ${shownPath}, which leads through a symbolic link to ${displayAssemblyPath(escape.realPath)}, outside ${shownBase}. ${provenance}`;
253
- }
254
- if (escape.path === base) return `names the directory ${shownBase} itself rather than a file inside it. ${provenance}`;
255
- return `resolves to ${shownPath}, outside ${shownBase}. ${provenance}`;
256
- }
257
-
258
- // src/utils/own-keys.ts
259
- function hasOwnKey(target, key) {
260
- return Object.prototype.hasOwnProperty.call(target, key);
261
- }
262
- function ownValue(target, key) {
263
- return hasOwnKey(target, key) ? target[key] : void 0;
264
- }
265
- function defineOwnKey(target, key, value) {
266
- Object.defineProperty(target, key, {
267
- value,
268
- writable: true,
269
- enumerable: true,
270
- configurable: true
271
- });
272
- }
273
- function hasPlainPrototype(value) {
274
- const proto = Object.getPrototypeOf(value);
275
- return proto === Object.prototype || proto === null;
276
- }
277
- function nullPrototypeRecord() {
278
- return Object.create(null);
279
- }
280
-
281
- // src/synthesis/synthesized-stacks.ts
282
- let lastSynthesizedStacks = [];
283
- function rememberSynthesizedStacks(stacks) {
284
- lastSynthesizedStacks = stacks;
285
- }
286
- function synthesizedStacks() {
287
- return lastSynthesizedStacks;
288
- }
289
-
290
- // src/utils/s3-listing-keys.ts
291
- function decodeListingKey(value) {
292
- if (value === void 0) return void 0;
293
- try {
294
- return decodeURIComponent(value.replace(/\+/g, "%20"));
295
- } catch (error) {
296
- throw new Error(`S3 returned a listing key that is not valid URL encoding: ${JSON.stringify(value)}. cdkd takes every listing with EncodingType='url' so a key containing a carriage return survives the XML round-trip; a value that will not decode cannot be addressed safely, so this listing is refused rather than acted on.`, { cause: error });
297
- }
298
- }
299
-
300
- // src/state/s3-replication-purge-gap.ts
301
- const DEFAULT_PURGED_OBJECT_DESCRIPTION = "the body of an object cdkd has just reported as removed";
302
- const replicationProbeCache = /* @__PURE__ */ new Map();
303
- const warnedWarnings = /* @__PURE__ */ new Set();
304
- const MAX_NAMED_DESTINATIONS = 3;
305
- const UNNAMED_DESTINATION = "<destination not named by the replication rule>";
306
- const PERMANENT_DENIALS = /* @__PURE__ */ new Set([
307
- "AccessDenied",
308
- "AccessDeniedException",
309
- "AllAccessDisabled",
310
- "MethodNotAllowed",
311
- "NotImplemented"
312
- ]);
313
- const TRANSIENT_CREDENTIAL_CODES = /* @__PURE__ */ new Set([
314
- "InvalidAccessKeyId",
315
- "ExpiredToken",
316
- "ExpiredTokenException",
317
- "InvalidToken",
318
- "TokenRefreshRequired",
319
- "RequestTimeTooSkewed",
320
- "RequestExpired"
321
- ]);
322
- const describe$1 = (error) => describeAwsFailure(error).detail;
323
- const errorCodes = (error) => {
324
- if (error === null || typeof error !== "object" && typeof error !== "function") return [];
325
- const e = error;
326
- const codes = [];
327
- if (typeof e.name === "string" && e.name.length > 0) codes.push(e.name);
328
- if (typeof e.Code === "string" && e.Code.length > 0) codes.push(e.Code);
329
- return codes;
330
- };
331
- const hasCode = (error, set) => errorCodes(error).some((code) => set.has(code));
332
- const httpStatus = (error) => {
333
- if (error === null || typeof error !== "object" && typeof error !== "function") return void 0;
334
- const meta = error.$metadata;
335
- return typeof meta?.httpStatusCode === "number" ? meta.httpStatusCode : void 0;
336
- };
337
- function destinationName(bucketArn, account) {
338
- if (bucketArn === void 0 || bucketArn === "") return UNNAMED_DESTINATION;
339
- const name = bucketArn.replace(/^arn:[^:]*:s3:::/, "");
340
- return account !== void 0 && account !== "" ? `${name} (account ${account})` : name;
341
- }
342
- function normalizeReplicationRules(config) {
343
- const targets = [];
344
- for (const rule of config.Rules ?? []) {
345
- const prefix = rule.Filter !== void 0 ? rule.Filter.Prefix ?? rule.Filter.And?.Prefix ?? "" : rule.Prefix ?? "";
346
- targets.push({
347
- prefix,
348
- destination: destinationName(rule.Destination?.Bucket, rule.Destination?.Account),
349
- enabled: rule.Status !== "Disabled"
350
- });
351
- }
352
- return targets;
353
- }
354
- async function runProbe(s3Client, bucket, requestFields) {
355
- try {
356
- const config = (await s3Client.send(new GetBucketReplicationCommand({
357
- Bucket: bucket,
358
- ...requestFields
359
- }))).ReplicationConfiguration;
360
- if (config === void 0) return { kind: "none" };
361
- const rules = normalizeReplicationRules(config);
362
- return rules.length === 0 ? { kind: "none" } : {
363
- kind: "rules",
364
- rules
365
- };
366
- } catch (error) {
367
- if (errorCodes(error).includes("ReplicationConfigurationNotFoundError")) return { kind: "none" };
368
- if (hasCode(error, TRANSIENT_CREDENTIAL_CODES)) return {
369
- kind: "unknown",
370
- reason: describe$1(error),
371
- retry: true
372
- };
373
- const permanent = hasCode(error, PERMANENT_DENIALS) || httpStatus(error) === 403;
374
- return {
375
- kind: "unknown",
376
- reason: describe$1(error),
377
- retry: !permanent
378
- };
379
- }
380
- }
381
- function probe(s3Client, bucket, requestFields) {
382
- const key = injectiveKey(bucket, requestFields.ExpectedBucketOwner ?? "");
383
- const cached = replicationProbeCache.get(key);
384
- if (cached) return cached;
385
- const pending = runProbe(s3Client, bucket, requestFields).then((result) => {
386
- if (result.kind === "unknown" && result.retry) evictIfOwn(key, pending);
387
- return result;
388
- }, (error) => {
389
- evictIfOwn(key, pending);
390
- return {
391
- kind: "unknown",
392
- reason: describe$1(error),
393
- retry: true
394
- };
395
- });
396
- replicationProbeCache.set(key, pending);
397
- return pending;
398
- }
399
- function evictIfOwn(key, own) {
400
- if (replicationProbeCache.get(key) === own) replicationProbeCache.delete(key);
401
- }
402
- async function warnIfPurgeIsReplicated(s3Client, bucket, keys, options = {}) {
403
- if (keys.length === 0) return;
404
- const emitDebug = (message) => {
405
- const sink = options.logger;
406
- if (sink?.debug) sink.debug(message);
407
- else getLogger().child("s3-replication-check").debug(message);
408
- };
409
- try {
410
- const safeBucket = displaySafe(bucket, { asciiOnly: true });
411
- const result = await probe(s3Client, bucket, options.requestFields ?? {});
412
- if (result.kind === "none") return;
413
- if (result.kind === "unknown") {
414
- emitDebug(`Could not determine whether s3://${safeBucket} is replicated (grant s3:GetReplicationConfiguration to enable the check): ${displaySafe(result.reason)}`);
415
- return;
416
- }
417
- const covered = result.rules.filter((rule) => keys.some((key) => key.startsWith(rule.prefix)));
418
- if (covered.length === 0) return;
419
- const destinations = [...new Set(covered.map((rule) => rule.enabled ? rule.destination : `${rule.destination} (rule currently Disabled -- it stops FUTURE replication, not what it already copied)`))].sort();
420
- const warnKey = injectiveKey(bucket, options.objectDescription ?? "", ...destinations);
421
- if (warnedWarnings.has(warnKey)) {
422
- emitDebug(`S3 replication on s3://${safeBucket} still covers purged keys (${options.objectDescription ?? "the body of an object cdkd has just reported as removed"}); already reported once this run for ${destinations.map((d) => displaySafe(d, { asciiOnly: true })).join(", ")}.`);
423
- return;
424
- }
425
- const named = destinations.slice(0, MAX_NAMED_DESTINATIONS).map((d) => displaySafe(d, { asciiOnly: true }));
426
- const elided = destinations.length - named.length;
427
- (options.logger ?? getLogger().child("s3-replication-check")).warn(`S3 replication is enabled on s3://${safeBucket} and covers the key(s) cdkd just purged. S3 NEVER replicates a version-id delete, so the purge removed those versions from THIS bucket only — the copies in the destination bucket survive and remain readable there via GetObject with a VersionId (${options.objectDescription ?? "the body of an object cdkd has just reported as removed"}). cdkd cannot delete them. Remove them in the destination bucket yourself (aws s3api list-object-versions, then delete-object --version-id), or narrow the replication rule so it excludes the prefixes cdkd purges under. Destination(s): ${named.join(", ")}` + (elided > 0 ? ` (and ${elided} more; ${withPasteableAwsProfile("aws s3api get-bucket-replication")} --bucket ${safeBucket} lists them all)` : ""));
428
- warnedWarnings.add(warnKey);
429
- } catch {}
430
- }
431
-
432
- // src/state/s3-noncurrent-version-purge.ts
433
- const CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION = "a custom-resource response object, which is the handler's full cfn-response body including `Data`";
434
- const DELETE_BATCH_SIZE = 1e3;
435
- const MAX_NAMED_FAILURES = 5;
436
- const UNKNOWN_KEY_PREFIX = "<unknown key #";
437
- const TRUNCATED_NO_MARKER = "listing reported IsTruncated with no NextKeyMarker; the walk stopped early and versions may remain";
438
- function recordFailure(failed, key, reason) {
439
- const existing = failed.get(key);
440
- if (existing) existing.push(reason);
441
- else failed.set(key, [reason]);
442
- }
443
- const describe = (error) => describeAwsFailure(error).detail;
444
- const PREFIX_HANDLE_SUFFIX = "* (every key under this prefix)";
445
- async function purgeNoncurrentVersionsUnderPrefix(s3Client, bucket, prefix, options = {}) {
446
- const logger = options.logger ?? getLogger().child("s3-version-purge");
447
- if (!prefix.endsWith("/") || prefix.replace(/\/+/g, "") === "") {
448
- logger.warn(safeMsg`Refused to purge noncurrent versions under ${JSON.stringify(prefix)}: ` + `a prefix-wide purge needs a non-empty prefix ending in '/'. Nothing was purged.`);
449
- return {
450
- deletedBodies: 0,
451
- complete: false
452
- };
453
- }
454
- const handle = `${prefix}${PREFIX_HANDLE_SUFFIX}`;
455
- return purgeWalk(s3Client, bucket, [prefix], {
456
- scope: {
457
- covers: (key) => key.startsWith(prefix),
458
- unsettledUnder: () => [handle],
459
- ownsEveryListedKey: true
460
- },
461
- listingFailureHandles: () => [handle],
462
- options: {
463
- ...options,
464
- logger
465
- }
466
- });
467
- }
468
- async function purgeNoncurrentKeyVersions(s3Client, bucket, keys, options = {}) {
469
- if (keys.length === 0) return;
470
- const wanted = new Set(keys);
471
- await purgeWalk(s3Client, bucket, options.listPrefix !== void 0 ? [options.listPrefix] : keys, {
472
- scope: {
473
- covers: (key) => wanted.has(key),
474
- unsettledUnder: (prefix) => [...wanted].filter((key) => key.startsWith(prefix)),
475
- ownsEveryListedKey: false
476
- },
477
- listingFailureHandles: (prefix) => options.listPrefix !== void 0 ? [...keys] : [prefix],
478
- options
479
- });
480
- }
481
- async function purgeWalk(s3Client, bucket, prefixes, params) {
482
- const { scope, listingFailureHandles, options } = params;
483
- const logger = options.logger ?? getLogger().child("s3-version-purge");
484
- const requestFields = options.requestFields ?? {};
485
- const failed = /* @__PURE__ */ new Map();
486
- const unknown = { n: 0 };
487
- const purged = /* @__PURE__ */ new Set();
488
- const unsettledBodies = /* @__PURE__ */ new Set();
489
- const removed = { n: 0 };
490
- for (const prefix of prefixes) try {
491
- await purgeUnderPrefix(s3Client, bucket, prefix, scope, requestFields, failed, unknown, purged, unsettledBodies, removed);
492
- } catch (error) {
493
- for (const key of listingFailureHandles(prefix)) {
494
- recordFailure(failed, key, describe(error));
495
- unsettledBodies.add(key);
496
- }
497
- }
498
- if (failed.size > 0) {
499
- const named = [...failed.entries()].slice(0, MAX_NAMED_FAILURES).map(([key, reasons]) => displaySafe(`${key} (${reasons.join("; ")})`));
500
- const elided = failed.size - named.length;
501
- const prefixCount = [...failed.keys()].filter((k) => k.endsWith(PREFIX_HANDLE_SUFFIX)).length;
502
- const keyCount = failed.size - prefixCount;
503
- const subject = [keyCount > 0 ? `${keyCount} key(s)` : "", prefixCount > 0 ? `every key under ${prefixCount} prefix(es)` : ""].filter((part) => part !== "").join(" and ");
504
- logger.warn(`Could not purge noncurrent versions of ${subject} in s3://${displaySafe(bucket, { asciiOnly: true })}. Their previous versions survive and remain readable via GetObject with a VersionId (${options.objectDescription ?? "the body of an object cdkd has just reported as removed"}). Grant s3:ListBucketVersions and s3:DeleteObjectVersion on the state bucket, or purge the key(s) by hand. Failures: ${named.join(", ")}` + (elided > 0 ? ` (and ${elided} more)` : ""));
505
- }
506
- const replicationKeys = [.../* @__PURE__ */ new Set([...purged, ...unsettledBodies])];
507
- await warnIfPurgeIsReplicated(s3Client, bucket, replicationKeys, {
508
- requestFields,
509
- logger,
510
- ...options.objectDescription !== void 0 && { objectDescription: options.objectDescription }
511
- });
512
- return {
513
- deletedBodies: removed.n,
514
- complete: failed.size === 0
515
- };
516
- }
517
- async function purgeUnderPrefix(s3Client, bucket, prefix, scope, requestFields, failed, unknown, purged, unsettledBodies, removed) {
518
- let keyMarker;
519
- let versionIdMarker;
520
- do {
521
- const resp = await s3Client.send(new ListObjectVersionsCommand({
522
- Bucket: bucket,
523
- ...requestFields,
524
- Prefix: prefix,
525
- EncodingType: "url",
526
- ...keyMarker !== void 0 && { KeyMarker: keyMarker },
527
- ...versionIdMarker !== void 0 && { VersionIdMarker: versionIdMarker }
528
- }));
529
- const stale = [];
530
- const staleBodies = /* @__PURE__ */ new Map();
531
- const isStaleBody = (key, versionId) => key !== void 0 && versionId !== void 0 && staleBodies.get(key)?.has(versionId) === true;
532
- const entries = [...(resp.Versions ?? []).map((entry) => ({
533
- entry,
534
- hasBody: true
535
- })), ...(resp.DeleteMarkers ?? []).map((entry) => ({
536
- entry,
537
- hasBody: false
538
- }))];
539
- for (const { entry, hasBody } of entries) {
540
- let decodedKey;
541
- try {
542
- decodedKey = decodeListingKey(entry.Key);
543
- } catch {
544
- if (hasBody && entry.Key !== void 0) unsettledBodies.add(`${entry.Key} [key not decodable; shown as S3 returned it]`);
545
- if (scope.ownsEveryListedKey && entry.Key !== void 0 && entry.IsLatest !== true) recordFailure(failed, `${entry.Key} [key not decodable; shown as S3 returned it]`, `version ${entry.VersionId ?? "<unknown>"}: listing key could not be decoded, so the entry was left alone`);
546
- continue;
547
- }
548
- if (decodedKey === void 0 || !scope.covers(decodedKey)) continue;
549
- if (entry.IsLatest === void 0) {
550
- recordFailure(failed, decodedKey, `version ${entry.VersionId ?? "<unknown>"}: listing omitted IsLatest, so the entry was left alone rather than risk deleting a current version`);
551
- if (hasBody) unsettledBodies.add(decodedKey);
552
- }
553
- if (entry.IsLatest !== false) continue;
554
- if (!entry.VersionId) {
555
- recordFailure(failed, decodedKey, `listing returned a noncurrent entry with no VersionId, so it could not be deleted`);
556
- if (hasBody) unsettledBodies.add(decodedKey);
557
- continue;
558
- }
559
- stale.push({
560
- Key: decodedKey,
561
- VersionId: entry.VersionId
562
- });
563
- if (hasBody) {
564
- const ids = staleBodies.get(decodedKey) ?? /* @__PURE__ */ new Set();
565
- ids.add(entry.VersionId);
566
- staleBodies.set(decodedKey, ids);
567
- }
568
- if (hasBody) purged.add(decodedKey);
569
- }
570
- for (let i = 0; i < stale.length; i += DELETE_BATCH_SIZE) {
571
- const batch = stale.slice(i, i + DELETE_BATCH_SIZE);
572
- try {
573
- const deleted = await s3Client.send(new DeleteObjectsCommand({
574
- Bucket: bucket,
575
- ...requestFields,
576
- Delete: {
577
- Objects: batch,
578
- Quiet: true
579
- }
580
- }));
581
- let bodiesRemoved = batch.filter((o) => isStaleBody(o.Key, o.VersionId)).length;
582
- for (const err of deleted.Errors ?? []) if (err.Key === void 0 || err.VersionId === void 0 || isStaleBody(err.Key, err.VersionId)) bodiesRemoved -= 1;
583
- removed.n += Math.max(0, bodiesRemoved);
584
- for (const err of deleted.Errors ?? []) {
585
- if (err.Code === "NoSuchVersion") continue;
586
- const reason = `version ${err.VersionId ?? "<unknown>"}: ${err.Code ?? "Error"}` + (err.Message ? ` - ${err.Message}` : "");
587
- if (err.Key !== void 0) recordFailure(failed, err.Key, reason);
588
- else {
589
- unknown.n += 1;
590
- recordFailure(failed, `${UNKNOWN_KEY_PREFIX}${unknown.n}>`, reason);
591
- }
592
- }
593
- } catch (error) {
594
- for (const object of batch) recordFailure(failed, object.Key, describe(error));
595
- }
596
- }
597
- if (resp.IsTruncated === true && resp.NextKeyMarker === void 0) for (const key of scope.unsettledUnder(prefix)) {
598
- recordFailure(failed, key, TRUNCATED_NO_MARKER);
599
- unsettledBodies.add(key);
600
- }
601
- keyMarker = resp.IsTruncated === true ? decodeListingKey(resp.NextKeyMarker) : void 0;
602
- versionIdMarker = keyMarker !== void 0 ? resp.NextVersionIdMarker : void 0;
603
- } while (keyMarker !== void 0);
604
- }
605
-
606
- // src/utils/parameter-types.ts
607
- function isListParameterType(type) {
608
- if (type === "CommaDelimitedList") return true;
609
- return type.length > 6 && type.startsWith("List<") && type.endsWith(">");
610
- }
611
- const SSM_PARAMETER_VALUE_PREFIX = "AWS::SSM::Parameter::Value<";
612
- function ssmResolvedValueType(type) {
613
- if (!type.startsWith("AWS::SSM::Parameter::Value<") || !type.endsWith(">")) return void 0;
614
- const inner = type.slice(27, -1);
615
- return inner.length > 0 ? inner : void 0;
616
- }
617
-
618
- // src/utils/nested-template-cycle.ts
619
- const NESTED_STACK_TYPE$5 = "AWS::CloudFormation::Stack";
620
- function isAbsoluteAssetPath(p) {
621
- return path.isAbsolute(p) || p.startsWith("/");
622
- }
623
- function templateIdentity(templatePath) {
624
- const dir = path.dirname(templatePath);
625
- let realDir;
626
- try {
627
- realDir = fs.realpathSync.native(dir);
628
- } catch {
629
- realDir = path.resolve(dir);
630
- }
631
- return path.join(realDir, path.basename(templatePath));
632
- }
633
- function listNestedTemplateRows(template) {
634
- if (template === null || typeof template !== "object") return [];
635
- const resources = template.Resources;
636
- if (resources === null || resources === void 0) return [];
637
- const rows = [];
638
- for (const [logicalId, resource] of Object.entries(resources)) {
639
- const row = resource;
640
- if (row?.Type !== NESTED_STACK_TYPE$5) continue;
641
- const assetPath = row.Metadata?.["aws:asset:path"];
642
- if (typeof assetPath !== "string" || assetPath.length === 0) continue;
643
- rows.push({
644
- logicalId,
645
- assetPath
646
- });
647
- }
648
- return rows;
649
- }
650
- function readNestedRows(templatePath) {
651
- let parsed;
652
- try {
653
- parsed = JSON.parse(fs.readFileSync(templatePath, "utf-8"));
654
- } catch {
655
- return;
656
- }
657
- return listNestedTemplateRows(parsed);
658
- }
659
- const MAX_NESTING_DEPTH = 512;
660
- const MAX_ROWS_FOLLOWED = 1e4;
661
- function findNestedTemplateTreeDefect(nestedTemplates, ancestorTemplatePaths = []) {
662
- const onChain = /* @__PURE__ */ new Set();
663
- for (const p of ancestorTemplatePaths) onChain.add(templateIdentity(p));
664
- const clean = /* @__PURE__ */ new Set();
665
- const chain = [];
666
- let rowsFollowed = 0;
667
- const visit = (logicalId, templatePath) => {
668
- if (typeof templatePath !== "string") return void 0;
669
- const identity = templateIdentity(templatePath);
670
- const lexical = path.resolve(templatePath);
671
- chain.push({
672
- logicalId,
673
- templatePath: identity
674
- });
675
- try {
676
- if (onChain.has(identity)) return {
677
- kind: "cycle",
678
- chain: [...chain]
679
- };
680
- if (chain.length > 512) return {
681
- kind: "too-deep",
682
- chain: [...chain]
683
- };
684
- if (++rowsFollowed > 1e4) return {
685
- kind: "too-large",
686
- chain: [...chain]
687
- };
688
- if (clean.has(lexical)) return void 0;
689
- const rows = readNestedRows(templatePath);
690
- if (rows === void 0) return void 0;
691
- onChain.add(identity);
692
- try {
693
- const dir = path.dirname(templatePath);
694
- for (const row of rows) {
695
- if (isAbsoluteAssetPath(row.assetPath)) return {
696
- kind: "absolute-path",
697
- chain: [...chain],
698
- logicalId: row.logicalId,
699
- assetPath: row.assetPath
700
- };
701
- const resolved = resolveAssemblyPath(dir, row.assetPath);
702
- if (!resolved.contained) return {
703
- kind: "escaping-path",
704
- chain: [...chain],
705
- logicalId: row.logicalId,
706
- assetPath: row.assetPath,
707
- escape: resolved,
708
- dir
709
- };
710
- const defect = visit(row.logicalId, resolved.path);
711
- if (defect) return defect;
712
- }
713
- } finally {
714
- onChain.delete(identity);
715
- }
716
- clean.add(lexical);
717
- return;
718
- } finally {
719
- chain.pop();
720
- }
721
- };
722
- for (const [logicalId, templatePath] of Object.entries(nestedTemplates)) {
723
- const defect = visit(logicalId, templatePath);
724
- if (defect) return defect;
725
- }
726
- }
727
- const MAX_RENDERED_HOPS = 8;
728
- function renderChain(chain) {
729
- const hop = (h) => `${displayIdent(h.logicalId)} (${displayAssemblyPath(h.templatePath)})`;
730
- if (chain.length <= MAX_RENDERED_HOPS) return chain.map(hop).join(" then ");
731
- const keep = MAX_RENDERED_HOPS / 2;
732
- return [
733
- ...chain.slice(0, keep).map(hop),
734
- `... ${chain.length - 8} more ...`,
735
- ...chain.slice(-4).map(hop)
736
- ].join(" then ");
737
- }
738
- function renderNestedTemplateTreeDefect(defect, stackName, action) {
739
- const provenance = `CDK emits an acyclic nested template tree with relative asset paths, so this indicates the synth output was hand-modified or generated by a non-CDK toolchain. Refusing to ${action}.`;
740
- const owner = (chain) => {
741
- const ids = chain.slice(0, -1).map((h) => h.logicalId);
742
- const keep = MAX_RENDERED_HOPS / 2;
743
- if (ids.length <= MAX_RENDERED_HOPS) return displayStackName([stackName, ...ids].join("~"));
744
- const head = displayStackName([stackName, ...ids.slice(0, keep)].join("~"));
745
- const tail = displayStackName(ids.slice(-4).join("~"));
746
- return `${head}~...${ids.length - 8} more...~${tail}`;
747
- };
748
- if (defect.kind === "cycle") {
749
- const closing = defect.chain[defect.chain.length - 1];
750
- return `The nested template tree under stack ${displayStackName(stackName)} contains a cycle: ${renderChain(defect.chain)}. Nested stack ${displayIdent(closing.logicalId)} (declared in stack ${owner(defect.chain)}) resolves to a template that is already on that nesting chain, so its Metadata['aws:asset:path'] closes a cycle. ${provenance}`;
751
- }
752
- if (defect.kind === "too-large") return `The nested template tree under stack ${displayStackName(stackName)} has more than ${MAX_ROWS_FOLLOWED} nested-stack rows to follow (the walk stopped at ${renderChain(defect.chain)}). That is far beyond any CDK-generated assembly. Symlinked directories can give one template file many paths, which multiplies the tree without ever repeating on one chain. Refusing to ${action}.`;
753
- if (defect.kind === "too-deep") return `The nested template tree under stack ${displayStackName(stackName)} nests more than ${512} levels deep: ${renderChain(defect.chain)}. No tree that deep can deploy, because each level lengthens the child's state key and S3 caps a key at 1024 bytes. ${provenance}`;
754
- if (defect.kind === "escaping-path") return `The nested template tree under stack ${displayStackName(stackName)} has nested stack ${displayIdent(defect.logicalId)} (reached through ${renderChain(defect.chain)}) with Metadata['aws:asset:path']=${displayAssemblyPath(defect.assetPath)} which ${renderAssemblyPathEscape(defect.escape, defect.dir, action)}`;
755
- return `The nested template tree under stack ${displayStackName(stackName)} has nested stack ${displayIdent(defect.logicalId)} (reached through ${renderChain(defect.chain)}) with Metadata['aws:asset:path']=${displayAssemblyPath(defect.assetPath)} which is absolute. ${provenance}`;
756
- }
757
-
758
- // src/utils/missing-state-bucket-remedy.ts
759
- function missingStateBucketRemedy(what) {
760
- if (!awsEndpointOverrideActive()) return `Run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} to create ${what}.`;
761
- return `AWS Emulator keeps nothing across restarts, so a new or restarted emulator has no cdkd bootstrap yet. A cdkd deploy without --dry-run creates the state bucket on its own; or bootstrap the emulator now with:\n${cdkdRemedy("cdkd bootstrap")}`;
762
- }
763
-
764
- // src/assets/absolute-asset-path-warning.ts
765
- function warnWholeAssemblyAsSource(w) {
766
- getLogger().child("assets").warn(`${w.subject} has ${w.field} naming the output directory ITSELF: ${displayAssemblyPath(w.outdir)}. cdkd will ${w.sink} — that is the WHOLE assembly, every template and every staged asset, not one asset directory. No CDK synth emits this, so treat this assembly as untrusted unless you wrote that path yourself.`);
767
- }
768
- function warnAbsoluteAssetPath(w) {
769
- getLogger().child("assets").warn(`${w.subject} has an absolute ${w.field} pointing outside the assembly: ${displayAssemblyPath(w.absolute)}` + (w.escape.escape === "symlink" ? ` (through a symbolic link to ${displayAssemblyPath(w.escape.realPath)})` : "") + `. cdkd will ${w.sink}. This is what cdk synth --no-staging emits, and is expected for it; if you did not synthesize with that flag, treat this assembly as untrusted: an absolute source path is honoured as written, so nothing but this line stands between it and that step.`);
770
- }
771
-
772
- // src/assets/asset-manifest-loader.ts
773
- function resolveFileAssetSourcePath(manifestDir, asset, opts) {
774
- const { assetOutdir, sink } = opts;
775
- if (isAbsolute$1(asset.source.path)) {
776
- const absolute = resolve$1(asset.source.path);
777
- const escape = absoluteAssemblyPathEscape(assetOutdir, absolute);
778
- if (escape !== void 0) warnAbsoluteAssetPath({
779
- subject: `File asset ${displayAssemblyPath(asset.displayName)}`,
780
- field: "source.path",
781
- absolute,
782
- escape,
783
- sink
784
- });
785
- else if (namesTheSameDirectory(assetOutdir, absolute)) warnWholeAssemblyAsSource({
786
- subject: `File asset ${displayAssemblyPath(asset.displayName)}`,
787
- field: "source.path",
788
- outdir: absolute,
789
- sink
790
- });
791
- return absolute;
792
- }
793
- const resolved = resolveAssemblyPath(manifestDir, asset.source.path, { containWithin: assetOutdir });
794
- if (!resolved.contained && namesTheSameDirectory(assetOutdir, resolved.path)) {
795
- warnWholeAssemblyAsSource({
796
- subject: `File asset ${displayAssemblyPath(asset.displayName)}`,
797
- field: "source.path",
798
- outdir: resolved.path,
799
- sink
800
- });
801
- return resolved.path;
802
- }
803
- if (!resolved.contained) throw new Error(`File asset ${displayAssemblyPath(asset.displayName)} has source.path=${displayAssemblyPath(asset.source.path)} which ${renderAssemblyPathEscape(resolved, assetOutdir, "publish it")}`);
804
- return resolved.path;
805
- }
806
- function isCfnTemplateAssetPath(sourcePath) {
807
- return sourcePath.endsWith(".template.json");
808
- }
809
- function parseAssetManifestBody(content, manifestPath) {
810
- try {
811
- return JSON.parse(content);
812
- } catch (err) {
813
- getLogger().child("AssetManifestLoader").debug(safeMsg`Asset manifest ${manifestPath} failed to parse: ${parseFailureDebugDetail(err)}`);
814
- throw new Error(`Failed to load asset manifest from ${manifestPath}: ${describeJsonParseFailure(err, utf8ByteLength(content))}`);
815
- }
816
- }
817
- var AssetManifestLoader = class {
818
- logger = getLogger().child("AssetManifestLoader");
819
- async loadStackManifest(stack, fallbackDir) {
820
- if (stack.assetManifestPath) return this.loadManifest(dirname$1(stack.assetManifestPath), stack.stackName, basename$1(stack.assetManifestPath));
821
- return this.loadManifest(fallbackDir, stack.stackName);
822
- }
823
- async loadManifest(cdkOutputDir, stackName, fileName = `${stackName}.assets.json`) {
824
- const resolved = resolveAssemblyPath(cdkOutputDir, fileName);
825
- if (!resolved.contained) throw new Error(`Asset manifest for stack ${displayStackName(stackName)} ${renderAssemblyPathEscape(resolved, cdkOutputDir)}`);
826
- const manifestPath = resolved.path;
827
- let content;
828
- try {
829
- this.logger.debug(`Loading asset manifest from: ${manifestPath}`);
830
- content = await readFile(manifestPath, "utf-8");
831
- const manifest = JSON.parse(content);
832
- this.logger.debug(`Loaded asset manifest: ${Object.keys(manifest.files).length} file assets, ${Object.keys(manifest.dockerImages).length} docker image assets`);
833
- return manifest;
834
- } catch (error) {
835
- if (error.code === "ENOENT") {
836
- this.logger.debug(`Asset manifest not found: ${manifestPath}`);
837
- return null;
838
- }
839
- if (error instanceof SyntaxError && content !== void 0) {
840
- this.logger.debug(safeMsg`Asset manifest ${manifestPath} failed to parse: ${parseFailureDebugDetail(error)}`);
841
- throw new Error(`Failed to load asset manifest from ${manifestPath}: ${describeJsonParseFailure(error, utf8ByteLength(content))}`);
842
- }
843
- throw new Error(`Failed to load asset manifest from ${manifestPath}: ${describeAwsFailure(error).detail}`);
844
- }
845
- }
846
- getFileAssets(manifest) {
847
- const fileAssets = /* @__PURE__ */ new Map();
848
- for (const [assetHash, asset] of Object.entries(manifest.files)) {
849
- if (isCfnTemplateAssetPath(asset.source.path)) {
850
- this.logger.debug(`Skipping CloudFormation template asset: ${asset.displayName}`);
851
- continue;
852
- }
853
- fileAssets.set(assetHash, asset);
854
- }
855
- this.logger.debug(`Found ${fileAssets.size} file assets (excluding templates)`);
856
- return fileAssets;
857
- }
858
- getAssetSourcePath(cdkOutputDir, asset, opts) {
859
- return resolveFileAssetSourcePath(cdkOutputDir, asset, opts);
860
- }
861
- resolveAssetDestinationValue(value, accountId, region, partition = "aws") {
862
- return value.replace(/\$\{AWS::AccountId\}/g, accountId).replace(/\$\{AWS::Region\}/g, region).replace(/\$\{AWS::Partition\}/g, partition);
863
- }
864
- };
865
- function getDockerImageBySourceHash(manifest, imageUri) {
866
- const dockerImages = manifest.dockerImages ?? {};
867
- const entries = Object.entries(dockerImages);
868
- if (entries.length === 0) return void 0;
869
- const hash = extractHashFromImageUri(imageUri);
870
- if (hash !== void 0) {
871
- const asset = dockerImages[hash];
872
- if (asset) return {
873
- hash,
874
- asset
875
- };
876
- }
877
- if (entries.length === 1) {
878
- const [singleHash, singleAsset] = entries[0];
879
- return {
880
- hash: singleHash,
881
- asset: singleAsset
882
- };
237
+ return `"${body}"`;
238
+ }
239
+ function describeFileReadFailure(err, filePath) {
240
+ if (err instanceof SyntaxError) return "invalid JSON";
241
+ const message = describeAwsFailure(err).detail;
242
+ return displaySafe(filePath === "" ? message : message.split(filePath).join("<path>"));
243
+ }
244
+ function renderAssemblyPathEscape(escape, dir, action = "load", provenanceOverride) {
245
+ const provenance = provenanceOverride ?? `CDK emits assembly paths that stay inside the assembly directory; one that leaves it indicates the synth output was hand-modified or generated by a non-CDK toolchain. Refusing to ${action}.`;
246
+ const base = path.resolve(dir);
247
+ const realBase = resolveThroughLinks(base) ?? base;
248
+ const shownPath = displayAssemblyPath(escape.path);
249
+ const shownBase = displayAssemblyPath(base);
250
+ if (escape.escape === "symlink") {
251
+ if (escape.realPath === realBase) return `resolves to ${shownPath}, a symbolic link to the directory ${shownBase} itself rather than to a file inside it. ${provenance}`;
252
+ return `resolves to ${shownPath}, which leads through a symbolic link to ${displayAssemblyPath(escape.realPath)}, outside ${shownBase}. ${provenance}`;
883
253
  }
254
+ if (escape.path === base) return `names the directory ${shownBase} itself rather than a file inside it. ${provenance}`;
255
+ return `resolves to ${shownPath}, outside ${shownBase}. ${provenance}`;
884
256
  }
885
- function extractHashFromImageUri(imageUri) {
886
- if (imageUri.includes("@sha256:")) return void 0;
887
- return /:([a-f0-9]{8,})$/.exec(imageUri)?.[1];
257
+
258
+ // src/utils/own-keys.ts
259
+ function hasOwnKey(target, key) {
260
+ return Object.prototype.hasOwnProperty.call(target, key);
261
+ }
262
+ function ownValue(target, key) {
263
+ return hasOwnKey(target, key) ? target[key] : void 0;
264
+ }
265
+ function defineOwnKey(target, key, value) {
266
+ Object.defineProperty(target, key, {
267
+ value,
268
+ writable: true,
269
+ enumerable: true,
270
+ configurable: true
271
+ });
272
+ }
273
+ function hasPlainPrototype(value) {
274
+ const proto = Object.getPrototypeOf(value);
275
+ return proto === Object.prototype || proto === null;
276
+ }
277
+ function nullPrototypeRecord() {
278
+ return Object.create(null);
888
279
  }
889
280
 
890
281
  // src/assets/asset-storage/names.ts
@@ -1397,6 +788,132 @@ var AssetModeResolver = class {
1397
788
  }
1398
789
  };
1399
790
 
791
+ // src/assets/absolute-asset-path-warning.ts
792
+ function warnWholeAssemblyAsSource(w) {
793
+ getLogger().child("assets").warn(`${w.subject} has ${w.field} naming the output directory ITSELF: ${displayAssemblyPath(w.outdir)}. cdkd will ${w.sink} — that is the WHOLE assembly, every template and every staged asset, not one asset directory. No CDK synth emits this, so treat this assembly as untrusted unless you wrote that path yourself.`);
794
+ }
795
+ function warnAbsoluteAssetPath(w) {
796
+ getLogger().child("assets").warn(`${w.subject} has an absolute ${w.field} pointing outside the assembly: ${displayAssemblyPath(w.absolute)}` + (w.escape.escape === "symlink" ? ` (through a symbolic link to ${displayAssemblyPath(w.escape.realPath)})` : "") + `. cdkd will ${w.sink}. This is what cdk synth --no-staging emits, and is expected for it; if you did not synthesize with that flag, treat this assembly as untrusted: an absolute source path is honoured as written, so nothing but this line stands between it and that step.`);
797
+ }
798
+
799
+ // src/assets/asset-manifest-loader.ts
800
+ function resolveFileAssetSourcePath(manifestDir, asset, opts) {
801
+ const { assetOutdir, sink } = opts;
802
+ if (isAbsolute$1(asset.source.path)) {
803
+ const absolute = resolve$1(asset.source.path);
804
+ const escape = absoluteAssemblyPathEscape(assetOutdir, absolute);
805
+ if (escape !== void 0) warnAbsoluteAssetPath({
806
+ subject: `File asset ${displayAssemblyPath(asset.displayName)}`,
807
+ field: "source.path",
808
+ absolute,
809
+ escape,
810
+ sink
811
+ });
812
+ else if (namesTheSameDirectory(assetOutdir, absolute)) warnWholeAssemblyAsSource({
813
+ subject: `File asset ${displayAssemblyPath(asset.displayName)}`,
814
+ field: "source.path",
815
+ outdir: absolute,
816
+ sink
817
+ });
818
+ return absolute;
819
+ }
820
+ const resolved = resolveAssemblyPath(manifestDir, asset.source.path, { containWithin: assetOutdir });
821
+ if (!resolved.contained && namesTheSameDirectory(assetOutdir, resolved.path)) {
822
+ warnWholeAssemblyAsSource({
823
+ subject: `File asset ${displayAssemblyPath(asset.displayName)}`,
824
+ field: "source.path",
825
+ outdir: resolved.path,
826
+ sink
827
+ });
828
+ return resolved.path;
829
+ }
830
+ if (!resolved.contained) throw new Error(`File asset ${displayAssemblyPath(asset.displayName)} has source.path=${displayAssemblyPath(asset.source.path)} which ${renderAssemblyPathEscape(resolved, assetOutdir, "publish it")}`);
831
+ return resolved.path;
832
+ }
833
+ function isCfnTemplateAssetPath(sourcePath) {
834
+ return sourcePath.endsWith(".template.json");
835
+ }
836
+ function parseAssetManifestBody(content, manifestPath) {
837
+ try {
838
+ return JSON.parse(content);
839
+ } catch (err) {
840
+ getLogger().child("AssetManifestLoader").debug(safeMsg`Asset manifest ${manifestPath} failed to parse: ${parseFailureDebugDetail(err)}`);
841
+ throw new Error(`Failed to load asset manifest from ${manifestPath}: ${describeJsonParseFailure(err, utf8ByteLength(content))}`);
842
+ }
843
+ }
844
+ var AssetManifestLoader = class {
845
+ logger = getLogger().child("AssetManifestLoader");
846
+ async loadStackManifest(stack, fallbackDir) {
847
+ if (stack.assetManifestPath) return this.loadManifest(dirname$1(stack.assetManifestPath), stack.stackName, basename$1(stack.assetManifestPath));
848
+ return this.loadManifest(fallbackDir, stack.stackName);
849
+ }
850
+ async loadManifest(cdkOutputDir, stackName, fileName = `${stackName}.assets.json`) {
851
+ const resolved = resolveAssemblyPath(cdkOutputDir, fileName);
852
+ if (!resolved.contained) throw new Error(`Asset manifest for stack ${displayStackName(stackName)} ${renderAssemblyPathEscape(resolved, cdkOutputDir)}`);
853
+ const manifestPath = resolved.path;
854
+ let content;
855
+ try {
856
+ this.logger.debug(`Loading asset manifest from: ${manifestPath}`);
857
+ content = await readFile(manifestPath, "utf-8");
858
+ const manifest = JSON.parse(content);
859
+ this.logger.debug(`Loaded asset manifest: ${Object.keys(manifest.files).length} file assets, ${Object.keys(manifest.dockerImages).length} docker image assets`);
860
+ return manifest;
861
+ } catch (error) {
862
+ if (error.code === "ENOENT") {
863
+ this.logger.debug(`Asset manifest not found: ${manifestPath}`);
864
+ return null;
865
+ }
866
+ if (error instanceof SyntaxError && content !== void 0) {
867
+ this.logger.debug(safeMsg`Asset manifest ${manifestPath} failed to parse: ${parseFailureDebugDetail(error)}`);
868
+ throw new Error(`Failed to load asset manifest from ${manifestPath}: ${describeJsonParseFailure(error, utf8ByteLength(content))}`);
869
+ }
870
+ throw new Error(`Failed to load asset manifest from ${manifestPath}: ${describeAwsFailure(error).detail}`);
871
+ }
872
+ }
873
+ getFileAssets(manifest) {
874
+ const fileAssets = /* @__PURE__ */ new Map();
875
+ for (const [assetHash, asset] of Object.entries(manifest.files)) {
876
+ if (isCfnTemplateAssetPath(asset.source.path)) {
877
+ this.logger.debug(`Skipping CloudFormation template asset: ${asset.displayName}`);
878
+ continue;
879
+ }
880
+ fileAssets.set(assetHash, asset);
881
+ }
882
+ this.logger.debug(`Found ${fileAssets.size} file assets (excluding templates)`);
883
+ return fileAssets;
884
+ }
885
+ getAssetSourcePath(cdkOutputDir, asset, opts) {
886
+ return resolveFileAssetSourcePath(cdkOutputDir, asset, opts);
887
+ }
888
+ resolveAssetDestinationValue(value, accountId, region, partition = "aws") {
889
+ return value.replace(/\$\{AWS::AccountId\}/g, accountId).replace(/\$\{AWS::Region\}/g, region).replace(/\$\{AWS::Partition\}/g, partition);
890
+ }
891
+ };
892
+ function getDockerImageBySourceHash(manifest, imageUri) {
893
+ const dockerImages = manifest.dockerImages ?? {};
894
+ const entries = Object.entries(dockerImages);
895
+ if (entries.length === 0) return void 0;
896
+ const hash = extractHashFromImageUri(imageUri);
897
+ if (hash !== void 0) {
898
+ const asset = dockerImages[hash];
899
+ if (asset) return {
900
+ hash,
901
+ asset
902
+ };
903
+ }
904
+ if (entries.length === 1) {
905
+ const [singleHash, singleAsset] = entries[0];
906
+ return {
907
+ hash: singleHash,
908
+ asset: singleAsset
909
+ };
910
+ }
911
+ }
912
+ function extractHashFromImageUri(imageUri) {
913
+ if (imageUri.includes("@sha256:")) return void 0;
914
+ return /:([a-f0-9]{8,})$/.exec(imageUri)?.[1];
915
+ }
916
+
1400
917
  // src/assets/asset-redirect.ts
1401
918
  function flattenAssetPlaceholders(value, accountId, region, partition = "aws") {
1402
919
  return value.replace(/\$\{AWS::AccountId\}/g, accountId).replace(/\$\{AWS::Region\}/g, region).replace(/\$\{AWS::Partition\}/g, partition);
@@ -1491,180 +1008,673 @@ function evaluatePseudoParam(name, map) {
1491
1008
  default: throw new Error(`Not a foldable pseudo parameter: ${name}`);
1492
1009
  }
1493
1010
  }
1494
- function foldablePartValue(part, map) {
1495
- if (typeof part === "string") return part;
1496
- if (part !== null && typeof part === "object" && !Array.isArray(part)) {
1497
- const keys = Object.keys(part);
1498
- if (keys.length === 1 && keys[0] === "Ref") {
1499
- const ref = part["Ref"];
1500
- if (typeof ref === "string" && FOLDABLE_PSEUDO_PARAMS.has(ref)) return evaluatePseudoParam(ref, map);
1011
+ function foldablePartValue(part, map) {
1012
+ if (typeof part === "string") return part;
1013
+ if (part !== null && typeof part === "object" && !Array.isArray(part)) {
1014
+ const keys = Object.keys(part);
1015
+ if (keys.length === 1 && keys[0] === "Ref") {
1016
+ const ref = part["Ref"];
1017
+ if (typeof ref === "string" && FOLDABLE_PSEUDO_PARAMS.has(ref)) return evaluatePseudoParam(ref, map);
1018
+ }
1019
+ }
1020
+ }
1021
+ function foldAndRewriteJoinParts(delimiter, parts, map, counter) {
1022
+ const out = [];
1023
+ let changed = false;
1024
+ let i = 0;
1025
+ while (i < parts.length) {
1026
+ const folded = foldablePartValue(parts[i], map);
1027
+ if (folded === void 0) {
1028
+ out.push(parts[i]);
1029
+ i++;
1030
+ continue;
1031
+ }
1032
+ const runValues = [folded];
1033
+ let j = i + 1;
1034
+ for (; j < parts.length; j++) {
1035
+ const v = foldablePartValue(parts[j], map);
1036
+ if (v === void 0) break;
1037
+ runValues.push(v);
1038
+ }
1039
+ const literal = runValues.join(delimiter);
1040
+ if (j - i > 1 && containsAnySource(literal, map)) {
1041
+ out.push(rewriteString(literal, map, counter));
1042
+ changed = true;
1043
+ } else for (let k = i; k < j; k++) out.push(parts[k]);
1044
+ i = j;
1045
+ }
1046
+ return changed ? out : parts;
1047
+ }
1048
+ function rewriteNode(node, map, counter) {
1049
+ if (typeof node === "string") return rewriteString(node, map, counter);
1050
+ if (Array.isArray(node)) {
1051
+ for (let i = 0; i < node.length; i++) node[i] = rewriteNode(node[i], map, counter);
1052
+ return node;
1053
+ }
1054
+ if (node !== null && typeof node === "object") {
1055
+ const obj = node;
1056
+ const joinArgs = obj["Fn::Join"];
1057
+ if (Object.keys(obj).length === 1 && Array.isArray(joinArgs) && joinArgs.length === 2 && typeof joinArgs[0] === "string" && Array.isArray(joinArgs[1])) {
1058
+ const foldedParts = foldAndRewriteJoinParts(joinArgs[0], joinArgs[1], map, counter);
1059
+ obj["Fn::Join"] = [joinArgs[0], rewriteNode(foldedParts, map, counter)];
1060
+ return obj;
1061
+ }
1062
+ for (const key of Object.keys(obj)) obj[key] = rewriteNode(obj[key], map, counter);
1063
+ return obj;
1064
+ }
1065
+ return node;
1066
+ }
1067
+ function rewriteTemplateAssetReferences(template, map) {
1068
+ if (map.entries.length === 0) return 0;
1069
+ const counter = { n: 0 };
1070
+ rewriteNode(template, map, counter);
1071
+ return counter.n;
1072
+ }
1073
+ function auditNode(node, map, path, findings) {
1074
+ if (typeof node === "string") {
1075
+ for (const { source } of map.entries) {
1076
+ if (!node.includes(source)) continue;
1077
+ if (buildBoundaryRegex(source).test(node)) {
1078
+ findings.push({
1079
+ path,
1080
+ source
1081
+ });
1082
+ return;
1083
+ }
1084
+ }
1085
+ return;
1086
+ }
1087
+ if (Array.isArray(node)) {
1088
+ node.forEach((item, i) => auditNode(item, map, `${path}[${i}]`, findings));
1089
+ return;
1090
+ }
1091
+ if (node !== null && typeof node === "object") for (const [key, value] of Object.entries(node)) auditNode(value, map, path ? `${path}.${key}` : key, findings);
1092
+ }
1093
+ function findUnrewrittenAssetReferences(resolvedProperties, map) {
1094
+ const findings = [];
1095
+ auditNode(resolvedProperties, map, "", findings);
1096
+ return findings;
1097
+ }
1098
+ function redirectFileAsset(asset, map) {
1099
+ let changed = false;
1100
+ const destinations = {};
1101
+ for (const [id, dest] of Object.entries(asset.destinations ?? {})) {
1102
+ const flattened = flattenAssetPlaceholders(dest.bucketName, map.accountId, map.region, map.partition);
1103
+ const target = map.buckets.get(flattened);
1104
+ if (target && destRegionMatches(dest, map)) {
1105
+ destinations[id] = {
1106
+ ...dest,
1107
+ bucketName: target
1108
+ };
1109
+ changed = true;
1110
+ } else destinations[id] = dest;
1111
+ }
1112
+ return changed ? {
1113
+ ...asset,
1114
+ destinations
1115
+ } : asset;
1116
+ }
1117
+ function redirectDockerAsset(asset, map) {
1118
+ let changed = false;
1119
+ const destinations = {};
1120
+ for (const [id, dest] of Object.entries(asset.destinations ?? {})) {
1121
+ const flattened = flattenAssetPlaceholders(dest.repositoryName, map.accountId, map.region, map.partition);
1122
+ const target = map.repos.get(flattened);
1123
+ if (target && destRegionMatches(dest, map)) {
1124
+ destinations[id] = {
1125
+ ...dest,
1126
+ repositoryName: target
1127
+ };
1128
+ changed = true;
1129
+ } else destinations[id] = dest;
1130
+ }
1131
+ return changed ? {
1132
+ ...asset,
1133
+ destinations
1134
+ } : asset;
1135
+ }
1136
+ function destRegionMatches(dest, map) {
1137
+ if (!dest.region) return true;
1138
+ return flattenAssetPlaceholders(dest.region, map.accountId, map.region, map.partition) === map.region;
1139
+ }
1140
+ function loadPublishableAssetManifest(manifestPath) {
1141
+ let raw;
1142
+ try {
1143
+ raw = readFileSync(manifestPath, "utf-8");
1144
+ } catch (error) {
1145
+ if (error.code === "ENOENT") return null;
1146
+ throw error;
1147
+ }
1148
+ const manifest = parseAssetManifestBody(raw, manifestPath);
1149
+ if (Object.values(manifest.files ?? {}).filter((asset) => !isCfnTemplateAssetPath(asset.source.path)).length + Object.keys(manifest.dockerImages ?? {}).length === 0) return null;
1150
+ return manifest;
1151
+ }
1152
+ function createAssetRedirectResolver(opts, context = createLazyAssetModeContext(opts)) {
1153
+ return async (manifestPath, region) => {
1154
+ if (opts.useCdkBootstrapAssets || !manifestPath) return void 0;
1155
+ const manifest = loadPublishableAssetManifest(manifestPath);
1156
+ if (!manifest) return void 0;
1157
+ const accountId = await context.accountId();
1158
+ const mode = await context.resolveMode(region);
1159
+ if (mode.mode !== "cdkd-assets") return void 0;
1160
+ const map = buildAssetRedirectMap(manifest, mode.marker, accountId, region);
1161
+ return map.entries.length > 0 ? map : void 0;
1162
+ };
1163
+ }
1164
+ function createLazyAssetModeContext(opts) {
1165
+ let accountIdPromise;
1166
+ let modeResolver;
1167
+ const accountId = () => {
1168
+ accountIdPromise ??= (async () => {
1169
+ const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
1170
+ const stsClient = new STSClient({
1171
+ ...awsClientDefaults({ profile: opts.profile }),
1172
+ region: opts.stsRegion,
1173
+ ...opts.profile && { profile: opts.profile }
1174
+ });
1175
+ try {
1176
+ return (await stsClient.send(new GetCallerIdentityCommand({}))).Account;
1177
+ } finally {
1178
+ stsClient.destroy();
1179
+ }
1180
+ })();
1181
+ return accountIdPromise;
1182
+ };
1183
+ const resolveMode = async (region) => {
1184
+ if (opts.useCdkBootstrapAssets) return { mode: "legacy" };
1185
+ modeResolver ??= new AssetModeResolver(opts.stateBackend, await accountId(), {
1186
+ ...opts.profile && { profile: opts.profile },
1187
+ ...opts.suppressLegacyNotice && { suppressLegacyNotice: true }
1188
+ });
1189
+ return modeResolver.resolve(region);
1190
+ };
1191
+ return {
1192
+ accountId,
1193
+ resolveMode
1194
+ };
1195
+ }
1196
+
1197
+ // src/synthesis/synthesized-stacks.ts
1198
+ let lastSynthesizedStacks = [];
1199
+ function rememberSynthesizedStacks(stacks) {
1200
+ lastSynthesizedStacks = stacks;
1201
+ }
1202
+ function synthesizedStacks() {
1203
+ return lastSynthesizedStacks;
1204
+ }
1205
+
1206
+ // src/utils/s3-listing-keys.ts
1207
+ function decodeListingKey(value) {
1208
+ if (value === void 0) return void 0;
1209
+ try {
1210
+ return decodeURIComponent(value.replace(/\+/g, "%20"));
1211
+ } catch (error) {
1212
+ throw new Error(`S3 returned a listing key that is not valid URL encoding: ${JSON.stringify(value)}. cdkd takes every listing with EncodingType='url' so a key containing a carriage return survives the XML round-trip; a value that will not decode cannot be addressed safely, so this listing is refused rather than acted on.`, { cause: error });
1213
+ }
1214
+ }
1215
+
1216
+ // src/state/s3-replication-purge-gap.ts
1217
+ const DEFAULT_PURGED_OBJECT_DESCRIPTION = "the body of an object cdkd has just reported as removed";
1218
+ const replicationProbeCache = /* @__PURE__ */ new Map();
1219
+ const warnedWarnings = /* @__PURE__ */ new Set();
1220
+ const MAX_NAMED_DESTINATIONS = 3;
1221
+ const UNNAMED_DESTINATION = "<destination not named by the replication rule>";
1222
+ const PERMANENT_DENIALS = /* @__PURE__ */ new Set([
1223
+ "AccessDenied",
1224
+ "AccessDeniedException",
1225
+ "AllAccessDisabled",
1226
+ "MethodNotAllowed",
1227
+ "NotImplemented"
1228
+ ]);
1229
+ const TRANSIENT_CREDENTIAL_CODES = /* @__PURE__ */ new Set([
1230
+ "InvalidAccessKeyId",
1231
+ "ExpiredToken",
1232
+ "ExpiredTokenException",
1233
+ "InvalidToken",
1234
+ "TokenRefreshRequired",
1235
+ "RequestTimeTooSkewed",
1236
+ "RequestExpired"
1237
+ ]);
1238
+ const describe$1 = (error) => describeAwsFailure(error).detail;
1239
+ const errorCodes = (error) => {
1240
+ if (error === null || typeof error !== "object" && typeof error !== "function") return [];
1241
+ const e = error;
1242
+ const codes = [];
1243
+ if (typeof e.name === "string" && e.name.length > 0) codes.push(e.name);
1244
+ if (typeof e.Code === "string" && e.Code.length > 0) codes.push(e.Code);
1245
+ return codes;
1246
+ };
1247
+ const hasCode = (error, set) => errorCodes(error).some((code) => set.has(code));
1248
+ const httpStatus = (error) => {
1249
+ if (error === null || typeof error !== "object" && typeof error !== "function") return void 0;
1250
+ const meta = error.$metadata;
1251
+ return typeof meta?.httpStatusCode === "number" ? meta.httpStatusCode : void 0;
1252
+ };
1253
+ function destinationName(bucketArn, account) {
1254
+ if (bucketArn === void 0 || bucketArn === "") return UNNAMED_DESTINATION;
1255
+ const name = bucketArn.replace(/^arn:[^:]*:s3:::/, "");
1256
+ return account !== void 0 && account !== "" ? `${name} (account ${account})` : name;
1257
+ }
1258
+ function normalizeReplicationRules(config) {
1259
+ const targets = [];
1260
+ for (const rule of config.Rules ?? []) {
1261
+ const prefix = rule.Filter !== void 0 ? rule.Filter.Prefix ?? rule.Filter.And?.Prefix ?? "" : rule.Prefix ?? "";
1262
+ targets.push({
1263
+ prefix,
1264
+ destination: destinationName(rule.Destination?.Bucket, rule.Destination?.Account),
1265
+ enabled: rule.Status !== "Disabled"
1266
+ });
1267
+ }
1268
+ return targets;
1269
+ }
1270
+ async function runProbe(s3Client, bucket, requestFields) {
1271
+ try {
1272
+ const config = (await s3Client.send(new GetBucketReplicationCommand({
1273
+ Bucket: bucket,
1274
+ ...requestFields
1275
+ }))).ReplicationConfiguration;
1276
+ if (config === void 0) return { kind: "none" };
1277
+ const rules = normalizeReplicationRules(config);
1278
+ return rules.length === 0 ? { kind: "none" } : {
1279
+ kind: "rules",
1280
+ rules
1281
+ };
1282
+ } catch (error) {
1283
+ if (errorCodes(error).includes("ReplicationConfigurationNotFoundError")) return { kind: "none" };
1284
+ if (hasCode(error, TRANSIENT_CREDENTIAL_CODES)) return {
1285
+ kind: "unknown",
1286
+ reason: describe$1(error),
1287
+ retry: true
1288
+ };
1289
+ const permanent = hasCode(error, PERMANENT_DENIALS) || httpStatus(error) === 403;
1290
+ return {
1291
+ kind: "unknown",
1292
+ reason: describe$1(error),
1293
+ retry: !permanent
1294
+ };
1295
+ }
1296
+ }
1297
+ function probe(s3Client, bucket, requestFields) {
1298
+ const key = injectiveKey(bucket, requestFields.ExpectedBucketOwner ?? "");
1299
+ const cached = replicationProbeCache.get(key);
1300
+ if (cached) return cached;
1301
+ const pending = runProbe(s3Client, bucket, requestFields).then((result) => {
1302
+ if (result.kind === "unknown" && result.retry) evictIfOwn(key, pending);
1303
+ return result;
1304
+ }, (error) => {
1305
+ evictIfOwn(key, pending);
1306
+ return {
1307
+ kind: "unknown",
1308
+ reason: describe$1(error),
1309
+ retry: true
1310
+ };
1311
+ });
1312
+ replicationProbeCache.set(key, pending);
1313
+ return pending;
1314
+ }
1315
+ function evictIfOwn(key, own) {
1316
+ if (replicationProbeCache.get(key) === own) replicationProbeCache.delete(key);
1317
+ }
1318
+ async function warnIfPurgeIsReplicated(s3Client, bucket, keys, options = {}) {
1319
+ if (keys.length === 0) return;
1320
+ const emitDebug = (message) => {
1321
+ const sink = options.logger;
1322
+ if (sink?.debug) sink.debug(message);
1323
+ else getLogger().child("s3-replication-check").debug(message);
1324
+ };
1325
+ try {
1326
+ const safeBucket = displaySafe(bucket, { asciiOnly: true });
1327
+ const result = await probe(s3Client, bucket, options.requestFields ?? {});
1328
+ if (result.kind === "none") return;
1329
+ if (result.kind === "unknown") {
1330
+ emitDebug(`Could not determine whether s3://${safeBucket} is replicated (grant s3:GetReplicationConfiguration to enable the check): ${displaySafe(result.reason)}`);
1331
+ return;
1332
+ }
1333
+ const covered = result.rules.filter((rule) => keys.some((key) => key.startsWith(rule.prefix)));
1334
+ if (covered.length === 0) return;
1335
+ const destinations = [...new Set(covered.map((rule) => rule.enabled ? rule.destination : `${rule.destination} (rule currently Disabled -- it stops FUTURE replication, not what it already copied)`))].sort();
1336
+ const warnKey = injectiveKey(bucket, options.objectDescription ?? "", ...destinations);
1337
+ if (warnedWarnings.has(warnKey)) {
1338
+ emitDebug(`S3 replication on s3://${safeBucket} still covers purged keys (${options.objectDescription ?? "the body of an object cdkd has just reported as removed"}); already reported once this run for ${destinations.map((d) => displaySafe(d, { asciiOnly: true })).join(", ")}.`);
1339
+ return;
1340
+ }
1341
+ const named = destinations.slice(0, MAX_NAMED_DESTINATIONS).map((d) => displaySafe(d, { asciiOnly: true }));
1342
+ const elided = destinations.length - named.length;
1343
+ (options.logger ?? getLogger().child("s3-replication-check")).warn(`S3 replication is enabled on s3://${safeBucket} and covers the key(s) cdkd just purged. S3 NEVER replicates a version-id delete, so the purge removed those versions from THIS bucket only — the copies in the destination bucket survive and remain readable there via GetObject with a VersionId (${options.objectDescription ?? "the body of an object cdkd has just reported as removed"}). cdkd cannot delete them. Remove them in the destination bucket yourself (aws s3api list-object-versions, then delete-object --version-id), or narrow the replication rule so it excludes the prefixes cdkd purges under. Destination(s): ${named.join(", ")}` + (elided > 0 ? ` (and ${elided} more; ${withPasteableAwsProfile("aws s3api get-bucket-replication")} --bucket ${safeBucket} lists them all)` : ""));
1344
+ warnedWarnings.add(warnKey);
1345
+ } catch {}
1346
+ }
1347
+
1348
+ // src/state/s3-noncurrent-version-purge.ts
1349
+ const CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION = "a custom-resource response object, which is the handler's full cfn-response body including `Data`";
1350
+ const DELETE_BATCH_SIZE = 1e3;
1351
+ const MAX_NAMED_FAILURES = 5;
1352
+ const UNKNOWN_KEY_PREFIX = "<unknown key #";
1353
+ const TRUNCATED_NO_MARKER = "listing reported IsTruncated with no NextKeyMarker; the walk stopped early and versions may remain";
1354
+ function recordFailure(failed, key, reason) {
1355
+ const existing = failed.get(key);
1356
+ if (existing) existing.push(reason);
1357
+ else failed.set(key, [reason]);
1358
+ }
1359
+ const describe = (error) => describeAwsFailure(error).detail;
1360
+ const PREFIX_HANDLE_SUFFIX = "* (every key under this prefix)";
1361
+ async function purgeNoncurrentVersionsUnderPrefix(s3Client, bucket, prefix, options = {}) {
1362
+ const logger = options.logger ?? getLogger().child("s3-version-purge");
1363
+ if (!prefix.endsWith("/") || prefix.replace(/\/+/g, "") === "") {
1364
+ logger.warn(safeMsg`Refused to purge noncurrent versions under ${JSON.stringify(prefix)}: ` + `a prefix-wide purge needs a non-empty prefix ending in '/'. Nothing was purged.`);
1365
+ return {
1366
+ deletedBodies: 0,
1367
+ complete: false
1368
+ };
1369
+ }
1370
+ const handle = `${prefix}${PREFIX_HANDLE_SUFFIX}`;
1371
+ return purgeWalk(s3Client, bucket, [prefix], {
1372
+ scope: {
1373
+ covers: (key) => key.startsWith(prefix),
1374
+ unsettledUnder: () => [handle],
1375
+ ownsEveryListedKey: true
1376
+ },
1377
+ listingFailureHandles: () => [handle],
1378
+ options: {
1379
+ ...options,
1380
+ logger
1381
+ }
1382
+ });
1383
+ }
1384
+ async function purgeNoncurrentKeyVersions(s3Client, bucket, keys, options = {}) {
1385
+ if (keys.length === 0) return;
1386
+ const wanted = new Set(keys);
1387
+ await purgeWalk(s3Client, bucket, options.listPrefix !== void 0 ? [options.listPrefix] : keys, {
1388
+ scope: {
1389
+ covers: (key) => wanted.has(key),
1390
+ unsettledUnder: (prefix) => [...wanted].filter((key) => key.startsWith(prefix)),
1391
+ ownsEveryListedKey: false
1392
+ },
1393
+ listingFailureHandles: (prefix) => options.listPrefix !== void 0 ? [...keys] : [prefix],
1394
+ options
1395
+ });
1396
+ }
1397
+ async function purgeWalk(s3Client, bucket, prefixes, params) {
1398
+ const { scope, listingFailureHandles, options } = params;
1399
+ const logger = options.logger ?? getLogger().child("s3-version-purge");
1400
+ const requestFields = options.requestFields ?? {};
1401
+ const failed = /* @__PURE__ */ new Map();
1402
+ const unknown = { n: 0 };
1403
+ const purged = /* @__PURE__ */ new Set();
1404
+ const unsettledBodies = /* @__PURE__ */ new Set();
1405
+ const removed = { n: 0 };
1406
+ for (const prefix of prefixes) try {
1407
+ await purgeUnderPrefix(s3Client, bucket, prefix, scope, requestFields, failed, unknown, purged, unsettledBodies, removed);
1408
+ } catch (error) {
1409
+ for (const key of listingFailureHandles(prefix)) {
1410
+ recordFailure(failed, key, describe(error));
1411
+ unsettledBodies.add(key);
1501
1412
  }
1502
1413
  }
1414
+ if (failed.size > 0) {
1415
+ const named = [...failed.entries()].slice(0, MAX_NAMED_FAILURES).map(([key, reasons]) => displaySafe(`${key} (${reasons.join("; ")})`));
1416
+ const elided = failed.size - named.length;
1417
+ const prefixCount = [...failed.keys()].filter((k) => k.endsWith(PREFIX_HANDLE_SUFFIX)).length;
1418
+ const keyCount = failed.size - prefixCount;
1419
+ const subject = [keyCount > 0 ? `${keyCount} key(s)` : "", prefixCount > 0 ? `every key under ${prefixCount} prefix(es)` : ""].filter((part) => part !== "").join(" and ");
1420
+ logger.warn(`Could not purge noncurrent versions of ${subject} in s3://${displaySafe(bucket, { asciiOnly: true })}. Their previous versions survive and remain readable via GetObject with a VersionId (${options.objectDescription ?? "the body of an object cdkd has just reported as removed"}). Grant s3:ListBucketVersions and s3:DeleteObjectVersion on the state bucket, or purge the key(s) by hand. Failures: ${named.join(", ")}` + (elided > 0 ? ` (and ${elided} more)` : ""));
1421
+ }
1422
+ const replicationKeys = [.../* @__PURE__ */ new Set([...purged, ...unsettledBodies])];
1423
+ await warnIfPurgeIsReplicated(s3Client, bucket, replicationKeys, {
1424
+ requestFields,
1425
+ logger,
1426
+ ...options.objectDescription !== void 0 && { objectDescription: options.objectDescription }
1427
+ });
1428
+ return {
1429
+ deletedBodies: removed.n,
1430
+ complete: failed.size === 0
1431
+ };
1503
1432
  }
1504
- function foldAndRewriteJoinParts(delimiter, parts, map, counter) {
1505
- const out = [];
1506
- let changed = false;
1507
- let i = 0;
1508
- while (i < parts.length) {
1509
- const folded = foldablePartValue(parts[i], map);
1510
- if (folded === void 0) {
1511
- out.push(parts[i]);
1512
- i++;
1513
- continue;
1433
+ async function purgeUnderPrefix(s3Client, bucket, prefix, scope, requestFields, failed, unknown, purged, unsettledBodies, removed) {
1434
+ let keyMarker;
1435
+ let versionIdMarker;
1436
+ do {
1437
+ const resp = await s3Client.send(new ListObjectVersionsCommand({
1438
+ Bucket: bucket,
1439
+ ...requestFields,
1440
+ Prefix: prefix,
1441
+ EncodingType: "url",
1442
+ ...keyMarker !== void 0 && { KeyMarker: keyMarker },
1443
+ ...versionIdMarker !== void 0 && { VersionIdMarker: versionIdMarker }
1444
+ }));
1445
+ const stale = [];
1446
+ const staleBodies = /* @__PURE__ */ new Map();
1447
+ const isStaleBody = (key, versionId) => key !== void 0 && versionId !== void 0 && staleBodies.get(key)?.has(versionId) === true;
1448
+ const entries = [...(resp.Versions ?? []).map((entry) => ({
1449
+ entry,
1450
+ hasBody: true
1451
+ })), ...(resp.DeleteMarkers ?? []).map((entry) => ({
1452
+ entry,
1453
+ hasBody: false
1454
+ }))];
1455
+ for (const { entry, hasBody } of entries) {
1456
+ let decodedKey;
1457
+ try {
1458
+ decodedKey = decodeListingKey(entry.Key);
1459
+ } catch {
1460
+ if (hasBody && entry.Key !== void 0) unsettledBodies.add(`${entry.Key} [key not decodable; shown as S3 returned it]`);
1461
+ if (scope.ownsEveryListedKey && entry.Key !== void 0 && entry.IsLatest !== true) recordFailure(failed, `${entry.Key} [key not decodable; shown as S3 returned it]`, `version ${entry.VersionId ?? "<unknown>"}: listing key could not be decoded, so the entry was left alone`);
1462
+ continue;
1463
+ }
1464
+ if (decodedKey === void 0 || !scope.covers(decodedKey)) continue;
1465
+ if (entry.IsLatest === void 0) {
1466
+ recordFailure(failed, decodedKey, `version ${entry.VersionId ?? "<unknown>"}: listing omitted IsLatest, so the entry was left alone rather than risk deleting a current version`);
1467
+ if (hasBody) unsettledBodies.add(decodedKey);
1468
+ }
1469
+ if (entry.IsLatest !== false) continue;
1470
+ if (!entry.VersionId) {
1471
+ recordFailure(failed, decodedKey, `listing returned a noncurrent entry with no VersionId, so it could not be deleted`);
1472
+ if (hasBody) unsettledBodies.add(decodedKey);
1473
+ continue;
1474
+ }
1475
+ stale.push({
1476
+ Key: decodedKey,
1477
+ VersionId: entry.VersionId
1478
+ });
1479
+ if (hasBody) {
1480
+ const ids = staleBodies.get(decodedKey) ?? /* @__PURE__ */ new Set();
1481
+ ids.add(entry.VersionId);
1482
+ staleBodies.set(decodedKey, ids);
1483
+ }
1484
+ if (hasBody) purged.add(decodedKey);
1514
1485
  }
1515
- const runValues = [folded];
1516
- let j = i + 1;
1517
- for (; j < parts.length; j++) {
1518
- const v = foldablePartValue(parts[j], map);
1519
- if (v === void 0) break;
1520
- runValues.push(v);
1486
+ for (let i = 0; i < stale.length; i += DELETE_BATCH_SIZE) {
1487
+ const batch = stale.slice(i, i + DELETE_BATCH_SIZE);
1488
+ try {
1489
+ const deleted = await s3Client.send(new DeleteObjectsCommand({
1490
+ Bucket: bucket,
1491
+ ...requestFields,
1492
+ Delete: {
1493
+ Objects: batch,
1494
+ Quiet: true
1495
+ }
1496
+ }));
1497
+ let bodiesRemoved = batch.filter((o) => isStaleBody(o.Key, o.VersionId)).length;
1498
+ for (const err of deleted.Errors ?? []) if (err.Key === void 0 || err.VersionId === void 0 || isStaleBody(err.Key, err.VersionId)) bodiesRemoved -= 1;
1499
+ removed.n += Math.max(0, bodiesRemoved);
1500
+ for (const err of deleted.Errors ?? []) {
1501
+ if (err.Code === "NoSuchVersion") continue;
1502
+ const reason = `version ${err.VersionId ?? "<unknown>"}: ${err.Code ?? "Error"}` + (err.Message ? ` - ${err.Message}` : "");
1503
+ if (err.Key !== void 0) recordFailure(failed, err.Key, reason);
1504
+ else {
1505
+ unknown.n += 1;
1506
+ recordFailure(failed, `${UNKNOWN_KEY_PREFIX}${unknown.n}>`, reason);
1507
+ }
1508
+ }
1509
+ } catch (error) {
1510
+ for (const object of batch) recordFailure(failed, object.Key, describe(error));
1511
+ }
1521
1512
  }
1522
- const literal = runValues.join(delimiter);
1523
- if (j - i > 1 && containsAnySource(literal, map)) {
1524
- out.push(rewriteString(literal, map, counter));
1525
- changed = true;
1526
- } else for (let k = i; k < j; k++) out.push(parts[k]);
1527
- i = j;
1528
- }
1529
- return changed ? out : parts;
1530
- }
1531
- function rewriteNode(node, map, counter) {
1532
- if (typeof node === "string") return rewriteString(node, map, counter);
1533
- if (Array.isArray(node)) {
1534
- for (let i = 0; i < node.length; i++) node[i] = rewriteNode(node[i], map, counter);
1535
- return node;
1536
- }
1537
- if (node !== null && typeof node === "object") {
1538
- const obj = node;
1539
- const joinArgs = obj["Fn::Join"];
1540
- if (Object.keys(obj).length === 1 && Array.isArray(joinArgs) && joinArgs.length === 2 && typeof joinArgs[0] === "string" && Array.isArray(joinArgs[1])) {
1541
- const foldedParts = foldAndRewriteJoinParts(joinArgs[0], joinArgs[1], map, counter);
1542
- obj["Fn::Join"] = [joinArgs[0], rewriteNode(foldedParts, map, counter)];
1543
- return obj;
1513
+ if (resp.IsTruncated === true && resp.NextKeyMarker === void 0) for (const key of scope.unsettledUnder(prefix)) {
1514
+ recordFailure(failed, key, TRUNCATED_NO_MARKER);
1515
+ unsettledBodies.add(key);
1544
1516
  }
1545
- for (const key of Object.keys(obj)) obj[key] = rewriteNode(obj[key], map, counter);
1546
- return obj;
1547
- }
1548
- return node;
1517
+ keyMarker = resp.IsTruncated === true ? decodeListingKey(resp.NextKeyMarker) : void 0;
1518
+ versionIdMarker = keyMarker !== void 0 ? resp.NextVersionIdMarker : void 0;
1519
+ } while (keyMarker !== void 0);
1549
1520
  }
1550
- function rewriteTemplateAssetReferences(template, map) {
1551
- if (map.entries.length === 0) return 0;
1552
- const counter = { n: 0 };
1553
- rewriteNode(template, map, counter);
1554
- return counter.n;
1521
+
1522
+ // src/utils/parameter-types.ts
1523
+ function isListParameterType(type) {
1524
+ if (type === "CommaDelimitedList") return true;
1525
+ return type.length > 6 && type.startsWith("List<") && type.endsWith(">");
1555
1526
  }
1556
- function auditNode(node, map, path, findings) {
1557
- if (typeof node === "string") {
1558
- for (const { source } of map.entries) {
1559
- if (!node.includes(source)) continue;
1560
- if (buildBoundaryRegex(source).test(node)) {
1561
- findings.push({
1562
- path,
1563
- source
1564
- });
1565
- return;
1566
- }
1567
- }
1568
- return;
1569
- }
1570
- if (Array.isArray(node)) {
1571
- node.forEach((item, i) => auditNode(item, map, `${path}[${i}]`, findings));
1572
- return;
1573
- }
1574
- if (node !== null && typeof node === "object") for (const [key, value] of Object.entries(node)) auditNode(value, map, path ? `${path}.${key}` : key, findings);
1527
+ const SSM_PARAMETER_VALUE_PREFIX = "AWS::SSM::Parameter::Value<";
1528
+ function ssmResolvedValueType(type) {
1529
+ if (!type.startsWith("AWS::SSM::Parameter::Value<") || !type.endsWith(">")) return void 0;
1530
+ const inner = type.slice(27, -1);
1531
+ return inner.length > 0 ? inner : void 0;
1575
1532
  }
1576
- function findUnrewrittenAssetReferences(resolvedProperties, map) {
1577
- const findings = [];
1578
- auditNode(resolvedProperties, map, "", findings);
1579
- return findings;
1533
+
1534
+ // src/utils/nested-template-cycle.ts
1535
+ const NESTED_STACK_TYPE$5 = "AWS::CloudFormation::Stack";
1536
+ function isAbsoluteAssetPath(p) {
1537
+ return path.isAbsolute(p) || p.startsWith("/");
1580
1538
  }
1581
- function redirectFileAsset(asset, map) {
1582
- let changed = false;
1583
- const destinations = {};
1584
- for (const [id, dest] of Object.entries(asset.destinations ?? {})) {
1585
- const flattened = flattenAssetPlaceholders(dest.bucketName, map.accountId, map.region, map.partition);
1586
- const target = map.buckets.get(flattened);
1587
- if (target && destRegionMatches(dest, map)) {
1588
- destinations[id] = {
1589
- ...dest,
1590
- bucketName: target
1591
- };
1592
- changed = true;
1593
- } else destinations[id] = dest;
1539
+ function templateIdentity(templatePath) {
1540
+ const dir = path.dirname(templatePath);
1541
+ let realDir;
1542
+ try {
1543
+ realDir = fs.realpathSync.native(dir);
1544
+ } catch {
1545
+ realDir = path.resolve(dir);
1594
1546
  }
1595
- return changed ? {
1596
- ...asset,
1597
- destinations
1598
- } : asset;
1547
+ return path.join(realDir, path.basename(templatePath));
1599
1548
  }
1600
- function redirectDockerAsset(asset, map) {
1601
- let changed = false;
1602
- const destinations = {};
1603
- for (const [id, dest] of Object.entries(asset.destinations ?? {})) {
1604
- const flattened = flattenAssetPlaceholders(dest.repositoryName, map.accountId, map.region, map.partition);
1605
- const target = map.repos.get(flattened);
1606
- if (target && destRegionMatches(dest, map)) {
1607
- destinations[id] = {
1608
- ...dest,
1609
- repositoryName: target
1610
- };
1611
- changed = true;
1612
- } else destinations[id] = dest;
1549
+ function listNestedTemplateRows(template) {
1550
+ if (template === null || typeof template !== "object") return [];
1551
+ const resources = template.Resources;
1552
+ if (resources === null || resources === void 0) return [];
1553
+ const rows = [];
1554
+ for (const [logicalId, resource] of Object.entries(resources)) {
1555
+ const row = resource;
1556
+ if (row?.Type !== NESTED_STACK_TYPE$5) continue;
1557
+ const assetPath = row.Metadata?.["aws:asset:path"];
1558
+ if (typeof assetPath !== "string" || assetPath.length === 0) continue;
1559
+ rows.push({
1560
+ logicalId,
1561
+ assetPath
1562
+ });
1613
1563
  }
1614
- return changed ? {
1615
- ...asset,
1616
- destinations
1617
- } : asset;
1618
- }
1619
- function destRegionMatches(dest, map) {
1620
- if (!dest.region) return true;
1621
- return flattenAssetPlaceholders(dest.region, map.accountId, map.region, map.partition) === map.region;
1564
+ return rows;
1622
1565
  }
1623
- function loadPublishableAssetManifest(manifestPath) {
1624
- let raw;
1566
+ function readNestedRows(templatePath) {
1567
+ let parsed;
1625
1568
  try {
1626
- raw = readFileSync(manifestPath, "utf-8");
1627
- } catch (error) {
1628
- if (error.code === "ENOENT") return null;
1629
- throw error;
1569
+ parsed = JSON.parse(fs.readFileSync(templatePath, "utf-8"));
1570
+ } catch {
1571
+ return;
1630
1572
  }
1631
- const manifest = parseAssetManifestBody(raw, manifestPath);
1632
- if (Object.values(manifest.files ?? {}).filter((asset) => !isCfnTemplateAssetPath(asset.source.path)).length + Object.keys(manifest.dockerImages ?? {}).length === 0) return null;
1633
- return manifest;
1573
+ return listNestedTemplateRows(parsed);
1634
1574
  }
1635
- function createAssetRedirectResolver(opts) {
1636
- let accountIdPromise;
1637
- let modeResolver;
1638
- const getAccountId = () => {
1639
- accountIdPromise ??= (async () => {
1640
- const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
1641
- const stsClient = new STSClient({
1642
- ...awsClientDefaults({ profile: opts.profile }),
1643
- region: opts.stsRegion,
1644
- ...opts.profile && { profile: opts.profile }
1645
- });
1575
+ const MAX_NESTING_DEPTH = 512;
1576
+ const MAX_ROWS_FOLLOWED = 1e4;
1577
+ function findNestedTemplateTreeDefect(nestedTemplates, ancestorTemplatePaths = []) {
1578
+ const onChain = /* @__PURE__ */ new Set();
1579
+ for (const p of ancestorTemplatePaths) onChain.add(templateIdentity(p));
1580
+ const clean = /* @__PURE__ */ new Set();
1581
+ const chain = [];
1582
+ let rowsFollowed = 0;
1583
+ const visit = (logicalId, templatePath) => {
1584
+ if (typeof templatePath !== "string") return void 0;
1585
+ const identity = templateIdentity(templatePath);
1586
+ const lexical = path.resolve(templatePath);
1587
+ chain.push({
1588
+ logicalId,
1589
+ templatePath: identity
1590
+ });
1591
+ try {
1592
+ if (onChain.has(identity)) return {
1593
+ kind: "cycle",
1594
+ chain: [...chain]
1595
+ };
1596
+ if (chain.length > 512) return {
1597
+ kind: "too-deep",
1598
+ chain: [...chain]
1599
+ };
1600
+ if (++rowsFollowed > 1e4) return {
1601
+ kind: "too-large",
1602
+ chain: [...chain]
1603
+ };
1604
+ if (clean.has(lexical)) return void 0;
1605
+ const rows = readNestedRows(templatePath);
1606
+ if (rows === void 0) return void 0;
1607
+ onChain.add(identity);
1646
1608
  try {
1647
- return (await stsClient.send(new GetCallerIdentityCommand({}))).Account;
1609
+ const dir = path.dirname(templatePath);
1610
+ for (const row of rows) {
1611
+ if (isAbsoluteAssetPath(row.assetPath)) return {
1612
+ kind: "absolute-path",
1613
+ chain: [...chain],
1614
+ logicalId: row.logicalId,
1615
+ assetPath: row.assetPath
1616
+ };
1617
+ const resolved = resolveAssemblyPath(dir, row.assetPath);
1618
+ if (!resolved.contained) return {
1619
+ kind: "escaping-path",
1620
+ chain: [...chain],
1621
+ logicalId: row.logicalId,
1622
+ assetPath: row.assetPath,
1623
+ escape: resolved,
1624
+ dir
1625
+ };
1626
+ const defect = visit(row.logicalId, resolved.path);
1627
+ if (defect) return defect;
1628
+ }
1648
1629
  } finally {
1649
- stsClient.destroy();
1630
+ onChain.delete(identity);
1650
1631
  }
1651
- })();
1652
- return accountIdPromise;
1632
+ clean.add(lexical);
1633
+ return;
1634
+ } finally {
1635
+ chain.pop();
1636
+ }
1653
1637
  };
1654
- return async (manifestPath, region) => {
1655
- if (opts.useCdkBootstrapAssets || !manifestPath) return void 0;
1656
- const manifest = loadPublishableAssetManifest(manifestPath);
1657
- if (!manifest) return void 0;
1658
- const accountId = await getAccountId();
1659
- modeResolver ??= new AssetModeResolver(opts.stateBackend, accountId, {
1660
- ...opts.profile && { profile: opts.profile },
1661
- ...opts.suppressLegacyNotice && { suppressLegacyNotice: true }
1662
- });
1663
- const mode = await modeResolver.resolve(region);
1664
- if (mode.mode !== "cdkd-assets") return void 0;
1665
- const map = buildAssetRedirectMap(manifest, mode.marker, accountId, region);
1666
- return map.entries.length > 0 ? map : void 0;
1638
+ for (const [logicalId, templatePath] of Object.entries(nestedTemplates)) {
1639
+ const defect = visit(logicalId, templatePath);
1640
+ if (defect) return defect;
1641
+ }
1642
+ }
1643
+ const MAX_RENDERED_HOPS = 8;
1644
+ function renderChain(chain) {
1645
+ const hop = (h) => `${displayIdent(h.logicalId)} (${displayAssemblyPath(h.templatePath)})`;
1646
+ if (chain.length <= MAX_RENDERED_HOPS) return chain.map(hop).join(" then ");
1647
+ const keep = MAX_RENDERED_HOPS / 2;
1648
+ return [
1649
+ ...chain.slice(0, keep).map(hop),
1650
+ `... ${chain.length - 8} more ...`,
1651
+ ...chain.slice(-4).map(hop)
1652
+ ].join(" then ");
1653
+ }
1654
+ function renderNestedTemplateTreeDefect(defect, stackName, action) {
1655
+ const provenance = `CDK emits an acyclic nested template tree with relative asset paths, so this indicates the synth output was hand-modified or generated by a non-CDK toolchain. Refusing to ${action}.`;
1656
+ const owner = (chain) => {
1657
+ const ids = chain.slice(0, -1).map((h) => h.logicalId);
1658
+ const keep = MAX_RENDERED_HOPS / 2;
1659
+ if (ids.length <= MAX_RENDERED_HOPS) return displayStackName([stackName, ...ids].join("~"));
1660
+ const head = displayStackName([stackName, ...ids.slice(0, keep)].join("~"));
1661
+ const tail = displayStackName(ids.slice(-4).join("~"));
1662
+ return `${head}~...${ids.length - 8} more...~${tail}`;
1667
1663
  };
1664
+ if (defect.kind === "cycle") {
1665
+ const closing = defect.chain[defect.chain.length - 1];
1666
+ return `The nested template tree under stack ${displayStackName(stackName)} contains a cycle: ${renderChain(defect.chain)}. Nested stack ${displayIdent(closing.logicalId)} (declared in stack ${owner(defect.chain)}) resolves to a template that is already on that nesting chain, so its Metadata['aws:asset:path'] closes a cycle. ${provenance}`;
1667
+ }
1668
+ if (defect.kind === "too-large") return `The nested template tree under stack ${displayStackName(stackName)} has more than ${MAX_ROWS_FOLLOWED} nested-stack rows to follow (the walk stopped at ${renderChain(defect.chain)}). That is far beyond any CDK-generated assembly. Symlinked directories can give one template file many paths, which multiplies the tree without ever repeating on one chain. Refusing to ${action}.`;
1669
+ if (defect.kind === "too-deep") return `The nested template tree under stack ${displayStackName(stackName)} nests more than ${512} levels deep: ${renderChain(defect.chain)}. No tree that deep can deploy, because each level lengthens the child's state key and S3 caps a key at 1024 bytes. ${provenance}`;
1670
+ if (defect.kind === "escaping-path") return `The nested template tree under stack ${displayStackName(stackName)} has nested stack ${displayIdent(defect.logicalId)} (reached through ${renderChain(defect.chain)}) with Metadata['aws:asset:path']=${displayAssemblyPath(defect.assetPath)} which ${renderAssemblyPathEscape(defect.escape, defect.dir, action)}`;
1671
+ return `The nested template tree under stack ${displayStackName(stackName)} has nested stack ${displayIdent(defect.logicalId)} (reached through ${renderChain(defect.chain)}) with Metadata['aws:asset:path']=${displayAssemblyPath(defect.assetPath)} which is absolute. ${provenance}`;
1672
+ }
1673
+
1674
+ // src/utils/missing-state-bucket-remedy.ts
1675
+ function missingStateBucketRemedy(what) {
1676
+ if (!awsEndpointOverrideActive()) return `Run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} to create ${what}.`;
1677
+ return `AWS Emulator keeps nothing across restarts, so a new or restarted emulator has no cdkd bootstrap yet. A cdkd deploy without --dry-run creates the state bucket on its own; or bootstrap the emulator now with:\n${cdkdRemedy("cdkd bootstrap")}`;
1668
1678
  }
1669
1679
 
1670
1680
  // src/utils/stringify.ts
@@ -19124,7 +19134,7 @@ async function deleteInIdLogScope(logicalId, physicalId, resourceType, propertie
19124
19134
  const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
19125
19135
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
19126
19136
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
19127
- const { ASGProvider } = await import("./asg-provider-B_4pcw4I.js");
19137
+ const { ASGProvider } = await import("./asg-provider-DY41BqOf.js");
19128
19138
  const delegateRegion = ambientRegion();
19129
19139
  let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
19130
19140
  if (asgProvider === void 0) {
@@ -19278,7 +19288,7 @@ async function sdkDeleteDelegateInCcRegion(resourceType, logicalId, physicalId)
19278
19288
  const family = SDK_DELETE_FAMILIES.get(resourceType);
19279
19289
  const cached = this.sdkDeleteDelegates.get(family);
19280
19290
  if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
19281
- const provider = family === "rds" ? new (await (import("./rds-provider-C0ApHlEg.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-DvIWf3JD.js"))).NeptuneProvider({ region: ccRegion });
19291
+ const provider = family === "rds" ? new (await (import("./rds-provider-BXsZQCfA.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-CaTWycXB.js"))).NeptuneProvider({ region: ccRegion });
19282
19292
  this.sdkDeleteDelegates.set(family, {
19283
19293
  region: ccRegion,
19284
19294
  provider
@@ -21964,7 +21974,7 @@ async function publishToSns(topicArn, request) {
21964
21974
  }
21965
21975
  async function invokeLambda(serviceToken, request) {
21966
21976
  if (localCustomResourceRuntimeActive()) {
21967
- const { invokeCustomResourceFunctionLocally } = await import("./custom-resource-runtime-CqgBKNa_.js");
21977
+ const { invokeCustomResourceFunctionLocally } = await import("./custom-resource-runtime-QfwICca8.js");
21968
21978
  const local = await invokeCustomResourceFunctionLocally({
21969
21979
  lambda: this.lambdaClient,
21970
21980
  s3: this.s3Client
@@ -25483,7 +25493,7 @@ async function ccRoutedInstanceTakesNoSnapshot(input) {
25483
25493
  if (resourceType !== "AWS::RDS::DBInstance") return false;
25484
25494
  if (region === void 0 || region === "") return false;
25485
25495
  const mask = input.mask ?? ((text) => text);
25486
- const { describeDBInstanceInRegion, isLiveReadReplica } = await import("./read-replica-B1uGbZ_1.js").then((n) => n.l);
25496
+ const { describeDBInstanceInRegion, isLiveReadReplica } = await import("./read-replica-CaWHwB3m.js").then((n) => n.l);
25487
25497
  let reason;
25488
25498
  try {
25489
25499
  const live = await describeDBInstanceInRegion(physicalId, region);
@@ -28798,7 +28808,7 @@ function keepPersistedPlainLeaves(redacted, raw, persisted) {
28798
28808
  }
28799
28809
  return out ?? redacted;
28800
28810
  }
28801
- if (!isPlainRecord$3(raw) || !isPlainRecord$3(persisted) || !isPlainRecord$3(redacted)) return redacted;
28811
+ if (!isPlainRecord$4(raw) || !isPlainRecord$4(persisted) || !isPlainRecord$4(redacted)) return redacted;
28802
28812
  let out;
28803
28813
  for (const key of Object.keys(redacted)) {
28804
28814
  if (!hasOwnKey(raw, key) || !hasOwnKey(persisted, key)) continue;
@@ -28809,7 +28819,7 @@ function keepPersistedPlainLeaves(redacted, raw, persisted) {
28809
28819
  }
28810
28820
  return out ?? redacted;
28811
28821
  }
28812
- function isPlainRecord$3(value) {
28822
+ function isPlainRecord$4(value) {
28813
28823
  return typeof value === "object" && value !== null && !Array.isArray(value) && hasPlainPrototype(value);
28814
28824
  }
28815
28825
 
@@ -32760,12 +32770,12 @@ const IDENTITY_KEYS$1 = [
32760
32770
  "DestinationSecurityGroupId",
32761
32771
  "DestinationPrefixListId"
32762
32772
  ];
32763
- function isPlainRecord$2(value) {
32773
+ function isPlainRecord$3(value) {
32764
32774
  return typeof value === "object" && value !== null && !Array.isArray(value);
32765
32775
  }
32766
32776
  function namesGroup(groupId, logicalId, physicalId) {
32767
32777
  if (groupId === physicalId) return true;
32768
- if (!isPlainRecord$2(groupId)) return false;
32778
+ if (!isPlainRecord$3(groupId)) return false;
32769
32779
  if (groupId["Ref"] === logicalId) return true;
32770
32780
  const getAtt = groupId["Fn::GetAtt"];
32771
32781
  return Array.isArray(getAtt) && getAtt[0] === logicalId && getAtt[1] === "GroupId";
@@ -32774,7 +32784,7 @@ async function buildSgRuleCaptureSiblings(deps, capturedLogicalId, capturedPhysi
32774
32784
  const siblings = {};
32775
32785
  for (const [lid, rec] of Object.entries(stateResources)) {
32776
32786
  if (lid === capturedLogicalId || !RULE_TYPES.has(rec?.resourceType)) continue;
32777
- if (!isPlainRecord$2(rec.properties) || rec.properties["GroupId"] !== capturedPhysicalId) continue;
32787
+ if (!isPlainRecord$3(rec.properties) || rec.properties["GroupId"] !== capturedPhysicalId) continue;
32778
32788
  siblings[lid] = {
32779
32789
  resourceType: rec.resourceType,
32780
32790
  properties: rec.properties
@@ -32785,7 +32795,7 @@ async function buildSgRuleCaptureSiblings(deps, capturedLogicalId, capturedPhysi
32785
32795
  if (lid === capturedLogicalId || !RULE_TYPES.has(res.Type)) continue;
32786
32796
  if (conditions !== void 0 && res.Condition !== void 0 && conditions[res.Condition] === false) continue;
32787
32797
  const props = res.Properties;
32788
- if (!isPlainRecord$2(props) || !namesGroup(props["GroupId"], capturedLogicalId, capturedPhysicalId)) continue;
32798
+ if (!isPlainRecord$3(props) || !namesGroup(props["GroupId"], capturedLogicalId, capturedPhysicalId)) continue;
32789
32799
  resolverContext ??= deps.buildResolverContext({
32790
32800
  template,
32791
32801
  resources: stateResources,
@@ -32799,7 +32809,7 @@ async function buildSgRuleCaptureSiblings(deps, capturedLogicalId, capturedPhysi
32799
32809
  } catch {
32800
32810
  continue;
32801
32811
  }
32802
- if (!isPlainRecord$2(resolved)) continue;
32812
+ if (!isPlainRecord$3(resolved)) continue;
32803
32813
  const key = siblings[lid] === void 0 ? lid : `${lid}#template`;
32804
32814
  siblings[key] = {
32805
32815
  resourceType: res.Type,
@@ -32812,6 +32822,209 @@ async function buildSgRuleCaptureSiblings(deps, capturedLogicalId, capturedPhysi
32812
32822
  return Object.keys(siblings).length > 0 ? { siblings } : void 0;
32813
32823
  }
32814
32824
 
32825
+ // src/utils/ip-protocol.ts
32826
+ const PROTOCOL_NUMBER_TO_NAME = /* @__PURE__ */ new Map([
32827
+ ["1", "icmp"],
32828
+ ["6", "tcp"],
32829
+ ["17", "udp"],
32830
+ ["58", "icmpv6"]
32831
+ ]);
32832
+ const CANONICAL_PROTOCOL_NAMES = new Set(PROTOCOL_NUMBER_TO_NAME.values());
32833
+ function canonicalizeIpProtocolValue(value) {
32834
+ let text;
32835
+ if (typeof value === "string") text = value;
32836
+ else if (typeof value === "number") text = String(value);
32837
+ else return value;
32838
+ const renamed = PROTOCOL_NUMBER_TO_NAME.get(text);
32839
+ if (renamed !== void 0) return renamed;
32840
+ const lowered = text.toLowerCase();
32841
+ if (CANONICAL_PROTOCOL_NAMES.has(lowered)) return lowered;
32842
+ return text;
32843
+ }
32844
+
32845
+ // src/provisioning/sg-rule-identity.ts
32846
+ function sgProtocolKey(value) {
32847
+ return canonicalizeIpProtocolValue(value ?? "-1");
32848
+ }
32849
+ function cfnIngressPortValue(value) {
32850
+ if (value === void 0 || value === null) return -1;
32851
+ if (typeof value === "number") return Number.isFinite(value) ? value : NaN;
32852
+ if (typeof value === "string") {
32853
+ const trimmed = value.trim();
32854
+ if (trimmed === "") return -1;
32855
+ const parsed = Number(trimmed);
32856
+ return Number.isFinite(parsed) ? parsed : NaN;
32857
+ }
32858
+ return NaN;
32859
+ }
32860
+
32861
+ // src/provisioning/sg-sibling-rules.ts
32862
+ const RULE_TYPE = {
32863
+ ingress: "AWS::EC2::SecurityGroupIngress",
32864
+ egress: "AWS::EC2::SecurityGroupEgress"
32865
+ };
32866
+ const LIST_KEY = {
32867
+ ingress: "SecurityGroupIngress",
32868
+ egress: "SecurityGroupEgress"
32869
+ };
32870
+ const PEER_KEYS = {
32871
+ ingress: [
32872
+ "CidrIp",
32873
+ "CidrIpv6",
32874
+ "SourceSecurityGroupId",
32875
+ "SourceSecurityGroupName",
32876
+ "SourcePrefixListId"
32877
+ ],
32878
+ egress: [
32879
+ "CidrIp",
32880
+ "CidrIpv6",
32881
+ "DestinationSecurityGroupId",
32882
+ "DestinationPrefixListId"
32883
+ ]
32884
+ };
32885
+ function isPlainRecord$2(value) {
32886
+ return typeof value === "object" && value !== null && !Array.isArray(value);
32887
+ }
32888
+ function sgRuleOwnershipIdentity(rule, direction) {
32889
+ if (!isPlainRecord$2(rule)) return void 0;
32890
+ if ([
32891
+ "IpProtocol",
32892
+ "FromPort",
32893
+ "ToPort",
32894
+ ...PEER_KEYS[direction]
32895
+ ].some((key) => isRedactedRecordedValue(rule[key]))) return void 0;
32896
+ const from = cfnIngressPortValue(rule["FromPort"]);
32897
+ const to = cfnIngressPortValue(rule["ToPort"]);
32898
+ if (!Number.isFinite(from) || !Number.isFinite(to)) return void 0;
32899
+ return JSON.stringify([
32900
+ sgProtocolKey(rule["IpProtocol"]),
32901
+ from,
32902
+ to,
32903
+ ...PEER_KEYS[direction].map((key) => rule[key] ?? null)
32904
+ ]);
32905
+ }
32906
+ function siblingOwnedSgRuleIdentities(groupId, direction, properties, context) {
32907
+ const owned = /* @__PURE__ */ new Set();
32908
+ if (typeof groupId !== "string" || groupId === "") return owned;
32909
+ for (const sibling of Object.values(context?.siblings ?? {})) {
32910
+ if (sibling.resourceType !== RULE_TYPE[direction]) continue;
32911
+ const props = sibling.properties;
32912
+ if (!isPlainRecord$2(props) || props["GroupId"] !== groupId) continue;
32913
+ const identity = sgRuleOwnershipIdentity(props, direction);
32914
+ if (identity !== void 0) owned.add(identity);
32915
+ }
32916
+ if (owned.size === 0) return owned;
32917
+ const inline = properties?.[LIST_KEY[direction]];
32918
+ if (Array.isArray(inline)) for (const entry of inline) {
32919
+ const identity = sgRuleOwnershipIdentity(entry, direction);
32920
+ if (identity !== void 0) owned.delete(identity);
32921
+ }
32922
+ return owned;
32923
+ }
32924
+ function withoutSiblingOwnedSgRules(rules, owned, direction) {
32925
+ if (owned.size === 0) return [...rules];
32926
+ return rules.filter((rule) => {
32927
+ const identity = sgRuleOwnershipIdentity(rule, direction);
32928
+ return identity === void 0 || !owned.has(identity);
32929
+ });
32930
+ }
32931
+ function stripSiblingOwnedSgRules(resourceType, physicalId, baseline, aws, properties, context) {
32932
+ if (resourceType !== "AWS::EC2::SecurityGroup") return {
32933
+ baseline,
32934
+ aws
32935
+ };
32936
+ let out = {
32937
+ baseline,
32938
+ aws
32939
+ };
32940
+ for (const direction of ["ingress", "egress"]) {
32941
+ const owned = siblingOwnedSgRuleIdentities(physicalId, direction, properties, context);
32942
+ if (owned.size === 0) continue;
32943
+ const key = LIST_KEY[direction];
32944
+ const strip = (bag) => {
32945
+ const list = bag[key];
32946
+ if (!Array.isArray(list)) return bag;
32947
+ const kept = withoutSiblingOwnedSgRules(list, owned, direction);
32948
+ return kept.length === list.length ? bag : {
32949
+ ...bag,
32950
+ [key]: kept
32951
+ };
32952
+ };
32953
+ out = {
32954
+ baseline: strip(out.baseline),
32955
+ aws: strip(out.aws)
32956
+ };
32957
+ }
32958
+ return out;
32959
+ }
32960
+ function ruleWriteOf(record) {
32961
+ const direction = record.resourceType === RULE_TYPE.ingress ? "ingress" : record.resourceType === RULE_TYPE.egress ? "egress" : void 0;
32962
+ const props = record.properties;
32963
+ if (direction === void 0 || !isPlainRecord$2(props)) return void 0;
32964
+ const group = props["GroupId"];
32965
+ if (typeof group !== "string" || group === "" || isRedactedRecordedValue(group)) return void 0;
32966
+ const identity = sgRuleOwnershipIdentity(props, direction);
32967
+ return identity === void 0 ? void 0 : [
32968
+ group,
32969
+ direction,
32970
+ identity
32971
+ ];
32972
+ }
32973
+ function sgRulesSiblingsStoppedWriting(previous, next, oldMaySurvive = () => false, templatePolicies) {
32974
+ const key = (w) => JSON.stringify(w);
32975
+ const stillWritten = /* @__PURE__ */ new Set();
32976
+ const unreadable = /* @__PURE__ */ new Set();
32977
+ for (const record of Object.values(next)) {
32978
+ const w = ruleWriteOf(record);
32979
+ if (w !== void 0) stillWritten.add(key(w));
32980
+ else if (record.resourceType === RULE_TYPE.ingress) unreadable.add("ingress");
32981
+ else if (record.resourceType === RULE_TYPE.egress) unreadable.add("egress");
32982
+ }
32983
+ const stoppedByGroup = /* @__PURE__ */ new Map();
32984
+ for (const [logicalId, record] of Object.entries(previous)) {
32985
+ const w = ruleWriteOf(record);
32986
+ if (w === void 0 || stillWritten.has(key(w))) continue;
32987
+ if (previousMaySurvive(logicalId, record, next, oldMaySurvive, templatePolicies)) continue;
32988
+ const [group, direction, identity] = w;
32989
+ if (unreadable.has(direction)) continue;
32990
+ let entry = stoppedByGroup.get(group);
32991
+ if (entry === void 0) stoppedByGroup.set(group, entry = {
32992
+ ingress: /* @__PURE__ */ new Set(),
32993
+ egress: /* @__PURE__ */ new Set()
32994
+ });
32995
+ entry[direction].add(identity);
32996
+ }
32997
+ const result = /* @__PURE__ */ new Map();
32998
+ if (stoppedByGroup.size === 0) return result;
32999
+ for (const [logicalId, record] of Object.entries(next)) {
33000
+ if (record.resourceType !== "AWS::EC2::SecurityGroup") continue;
33001
+ const stopped = typeof record.physicalId === "string" ? stoppedByGroup.get(record.physicalId) : void 0;
33002
+ if (stopped !== void 0) result.set(logicalId, stopped);
33003
+ }
33004
+ return result;
33005
+ }
33006
+ function withoutStoppedSiblingSgRules(bag, stopped, properties) {
33007
+ let out = bag;
33008
+ for (const direction of ["ingress", "egress"]) {
33009
+ const drop = new Set(stopped[direction]);
33010
+ const inline = properties?.[LIST_KEY[direction]];
33011
+ if (Array.isArray(inline)) for (const entry of inline) {
33012
+ const identity = sgRuleOwnershipIdentity(entry, direction);
33013
+ if (identity !== void 0) drop.delete(identity);
33014
+ }
33015
+ if (drop.size === 0) continue;
33016
+ const listKey = LIST_KEY[direction];
33017
+ const list = out[listKey];
33018
+ if (!Array.isArray(list)) continue;
33019
+ const kept = withoutSiblingOwnedSgRules(list, drop, direction);
33020
+ if (kept.length !== list.length) out = {
33021
+ ...out,
33022
+ [listKey]: kept
33023
+ };
33024
+ }
33025
+ return out;
33026
+ }
33027
+
32815
33028
  // src/deployment/deploy-engine/observed-capture.ts
32816
33029
  var ObservedCapture = class {
32817
33030
  observedCaptureTasks = /* @__PURE__ */ new Map();
@@ -32987,6 +33200,18 @@ function pruneMembersSiblingsStoppedWriting(previous, next, replacementRun, temp
32987
33200
  };
32988
33201
  changed++;
32989
33202
  }
33203
+ for (const [logicalId, stopped] of sgRulesSiblingsStoppedWriting(previous, next, oldMaySurvive, templatePolicies)) {
33204
+ const record = next[logicalId];
33205
+ const observed = record?.observedProperties;
33206
+ if (record === void 0 || observed === void 0) continue;
33207
+ const pruned = withoutStoppedSiblingSgRules(observed, stopped, record.properties);
33208
+ if (pruned === observed) continue;
33209
+ next[logicalId] = {
33210
+ ...record,
33211
+ observedProperties: carryRedactionMarks(observed, pruned)
33212
+ };
33213
+ changed++;
33214
+ }
32990
33215
  return changed;
32991
33216
  }
32992
33217
  function pruneStoppedSiblingMembersBestEffort(logger, ...args) {
@@ -32994,7 +33219,7 @@ function pruneStoppedSiblingMembersBestEffort(logger, ...args) {
32994
33219
  pruneMembersSiblingsStoppedWriting(...args);
32995
33220
  } catch (err) {
32996
33221
  const cause = err instanceof Error ? err.name : typeof err;
32997
- logger.debug(safeMsg`Sibling-written IAM members were not pruned from the observed baselines (${cause}); they stay until 'cdkd state refresh-observed'.`);
33222
+ logger.debug(safeMsg`Sibling-written IAM members and security-group rules were not pruned from the observed baselines (${cause}); they stay until 'cdkd state refresh-observed'.`);
32998
33223
  }
32999
33224
  }
33000
33225
  const STANDALONE_SIBLING = {
@@ -50193,5 +50418,5 @@ var DeployEngine = class {
50193
50418
  }
50194
50419
  };
50195
50420
 
50196
- export { planVectorIndexUpdates as $, withSecretPhysicalIdsMaskedInState as $a, CrossPrefixReadError as $c, refusesFinalSnapshot as $i, hasPlainPrototype as $l, settleUnsettledPrevious as $n, replacementSidesForLog as $o, exportNameNoEchoParameters as $r, refuseMalformedResourcePropertiesForExport as $s, displacedOpClause as $t, recordedProtectionEvidence as A, withCustomResourceStack as Aa, withheldAccountClause as Ac, noEchoComparisonForTemplate as Ai, AssetManifestLoader as Al, constructPathOf as An, lacksRecordedRefArn as Ao, segmentCleanupOptions as Ar, refuseMalformedOrphansForOrphan as As, hasCdkAutoDeleteTag as At, declaredStreamTagsMember as B, deleteSkipReason as Ba, withoutAcceptedSdkUnwiredProperties as Bc, secretNamePrintingBag as Bi, listNestedTemplateRows as Bl, changedReferenceReason as Bn, referenceProvenanceOf as Bo, getCurrentProducerRegions as Br, refuseMalformedResourceEntries as Bs, updateRefactorMarker as Bt, pendingMovesOutOf as C, NO_LOCAL_CUSTOM_RESOURCES_FLAG as Ca, refuseMalformedResourcesForDeploy as Cc, bold as Ci, isCrossRegionRedirect as Cl, crossStackReadsForPartialSave as Cn, coerceParameterTypedValue as Co, resolveReplacementOldType as Cr, isReadableOrphanRecord as Cs, TABLE_INDEX_NOUN as Ct, findServiceTokenRefusals as D, localCustomResourceCommand as Da, repairMalformedResourcesForReadOnly as Dc, red as Di, validateAssetBucketName as Dl, noEchoMacParametersOf as Dn, cfnRefValueFromPhysicalId as Do, isRedactedRecordedValue as Dr, previewableOrphanRecords as Ds, waitForIndexesSettled as Dt, deferredServiceTokenWarning as E, customResourcesRunWithoutApp as Ea, refuseMalformedState as Ec, green as Ei, readBootstrapMarkerBody as El, noEchoMacBinding as En, AWS_NO_VALUE as Eo, REDACTED_DELETE_ADDRESS_SKIP_REASON as Er, malformedOrphanRowsKeptWarning as Es, relayedIndexBusyDelete as Et, readProtection as F, setResolvedResourceTimeouts as Fa, hasReadableResources as Fc, completedReplayEntries as Fi, warnAbsoluteAssetPath as Fl, movedToHint as Fn, keepHeldTokenProvenance as Fo, nameScopeOf as Fr, malformedLocalResourceEntriesWarning as Fs, readRefactorMarkerOnce as Ft, streamMemberRefusals as G, isAlwaysLiveAttribute as Ga, PROPERTY_COVERAGE_BY_TYPE as Gc, storedSecretNameNeedles as Gi, ssmResolvedValueType as Gl, parseMappingFile as Gn, isNamelessDynamicReferenceError as Go, resourcesNamingDeclaredParameter as Gr, refuseMalformedResourceEntriesForOrphan as Gs, formatResourceLine as Gt, reverseMapStreamPolicy as H, isWaitAbandonedError as Ha, withoutUnwrittenSdkUnwiredProperties as Hc, secretNamedAttributeNamesOf as Hi, templateIdentity as Hl, isPairableType as Hn, getAccountInfo as Ho, computeParameterTaint as Hr, refuseMalformedResourceEntriesForDestroy as Hs, readsOnlyNoEchoParameters as Ht, DynamoDBGlobalTableProvider as I, RollbackInlinePolicyWriters as Ia, findActionableSdkUnwired as Ic, journaledOrphanPrintingBag as Ii, warnWholeAssemblyAsSource as Il, rollbackOrphanIds as In, outputReferenceProvenanceOf as Io, retiredAfterRollback as Ir, malformedLocalResourcesWarning as Is, refactorMarkerMovesOf as It, isTtlAlreadyDisabled as J, isSettledInstanceState as Ja, splitImportedOps as Jc, PRE_DELETE_SNAPSHOT_TYPES as Ji, decodeListingKey as Jl, referencedLogicalIds as Jn, withSharedDrainBudget as Jo, exportAliasCollisionScrubWarning as Jr, malformedDriftResourcePropertiesWarning as Js, lookupEachName as Jt, streamPolicyMatchesDeclared as K, poisonRenderedSpellingsCollidingIn as Ka, TemplateParser as Kc, extractDeploymentEventError as Ki, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Kl, propertiesChangedReason as Kn, carriesDynamicReference as Ko, WITHHELD_NAME_DISPLAY as Kr, repairMalformedResourceEntriesForReadOnly as Ks, chunks as Kt, STREAM_POLICY_KEY as L, UNSPECIFIED_SKIP_REASON as La, findHandledUnwrittenCreateOnly as Lc, maskEventTextWithBoundBags as Li, missingStateBucketRemedy as Ll, withMovedTo as Ln, recordedOutputReferenceRegions as Lo, retiredNameGenerationsAfter as Lr, malformedResourceEntriesWarning as Ls, refactorMarkerRefusalMessage as Lt, PROTECTION_PROPERTY_BY_TYPE as M, CloudControlProvider as Ma, UNREADABLE_RESOURCES_MAP_ROW as Mc, noEchoParameterNamesOf as Mi, isCfnTemplateAssetPath as Ml, formatDestructiveChange as Mn, parseWebACLArn as Mo, orphanNeedsIdentity as Mr, unpreviewableOrphanRecords as Ms, keptForRetainedRecord as Mt, isProtectionValueActive as N, waitForGoneAfterDelete as Na, displayLogicalId as Nc, withAttemptedItemsMasked as Ni, parseAssetManifestBody as Nl, findRefactorHints as Nn, extractGetAttRefs as No, nameGenerationCarriedFrom as Nr, unreadableOrphanRecords as Ns, recordRetainedForReadoption as Nt, serviceTokenBlockingReason as O, localCustomResourceRuntimeActive as Oa, JSON_LISTING_HOLE_VALUE as Oc, yellow as Oi, validateContainerRepoName as Ol, noEchoMacVerdict as On, isStalePlaceholderArnAttribute as Oo, redactedDeleteAddressFields as Or, refuseMalformedOrphanRecords as Os, ECR_AUTO_DELETE_IMAGES_TAG as Ot, perType as P, resolvedResourceTimeoutMs as Pa, hasReadableOutputs as Pc, createReadOnlyAttributeHealerFactory as Pi, resolveFileAssetSourcePath as Pl, hintSidesOf as Pn, promoteInPlaceAttributeDependents as Po, nameGenerationHighWaterOf as Pr, isReadableResourceEntry as Ps, readRefactorMarker as Pt, sendTtlWaitingOutRateLimit as Q, secretSegmentsOfState as Qa, rebuildClientForBucketRegion as Qc, isFinalSnapshotError as Qi, hasOwnKey as Ql, recordAfterRollbackUpdate as Qn, markNewValueKnownAfterDeploy as Qo, carriedExportAliasExposure as Qr, refuseMalformedResourcePropertiesForDrift as Qs, NESTED_PENDING_PARENT_REASON as Qt, STREAM_TAGS_KEY as R, deleteIndeterminateGuards as Ra, findSdkUnwiredProperties as Rc, namingSecretsWithRecordedNoEcho as Ri, findNestedTemplateTreeDefect as Rl, changedReferenceInDiff as Rn, recordedProvenanceOf as Ro, retiredNameGenerationsLeaving as Rr, malformedScrubResourceEntriesRefusalMessage as Rs, refuseRefactorMarker as Rt, hasPendingMovesOut as S, withPrintingSecrets as Sa, malformedStateRefusalMessage as Sc, withoutSuperseded as Si, assertAssetBucketRegion as Sl, DeploymentEventsStore as Sn, s3BucketWebsiteUrl as So, computeImplicitDeleteEdges as Sr, deployRefusesOrphanRowsReason as Ss, INDEX_SETTLE_POLL_INTERVAL_MS as St, refusePendingMovesOut as T, customResourcesFailedWithoutApp as Ta, refuseMalformedResourcesForExport as Tc, gray as Ti, parseBootstrapMarker as Tl, createNoEchoValueMacs as Tn, parameterTypeMayLoseSecretIdentity as To, findNestedStackTypeChanges as Tr, malformedOrphanRecordsWarning as Ts, maskedLogger as Tt, streamDeclaresPolicy as U, IntrinsicFunctionResolver as Ua, NO_CC_HANDLERS_REASON as Uc, secretNamedRecordNeedles as Ui, SSM_PARAMETER_VALUE_PREFIX as Ul, looselyEqual as Un, isImpossibleEmptyStoredAttribute as Uo, namesAnyDeclaredParameter as Ur, refuseMalformedResourceEntriesForImport as Us, getPriorAttempts as Ut, planStreamMemberOps as V, withIndeterminateGuard as Va, withoutSdkUnwiredProperties as Vc, secretNamePrintingBags as Vi, renderNestedTemplateTreeDefect as Vl, differingRemedy as Vn, referenceTokensIn as Vo, inheritProducerRegions as Vr, refuseMalformedResourceEntriesForDeploy as Vs, macWriteOnlyKeys as Vt, streamDeclaresTags as W, isSelectOutOfBounds as Wa, hasNoCloudControlHandlers as Wc, stateSecretNameNeedles as Wi, isListParameterType as Wl, mappingPairs as Wn, carriesFetchableDynamicReference as Wo, reachableDivergentParameters as Wr, refuseMalformedResourceEntriesForImportSave as Ws, markRefusedBeforeApplying as Wt, planTimeToLive as X, maskedSecretSegment as Xa, hasReasonlessBaselineRefusal as Xc, ccRoutedInstanceTakesNoSnapshot as Xi, synthesizedStacks as Xl, replayRollback as Xn, INTRINSIC_KEYS as Xo, secretBearingStateKeyWarning as Xr, refuseMalformedResourceProperties as Xs, pendingRequestCount as Xt, isTtlRateLimited as Y, APPSYNC_APIKEY_ARN_RESOURCE_PATH as Ya, isKnownTokenFreeState as Yc, ccRoutedFinalSnapshotError as Yi, rememberSynthesizedStacks as Yl, replayFailedOperations as Yn, namesRecreatedParent as Yo, secretBearing as Yr, malformedResourcePropertiesWarning as Ys, withApiLimit as Yt, readTtlSpec as Z, secretPhysicalIdSegment as Za, hasUnverifiableParameterRefusal as Zc, effectiveDeletionPolicy as Zi, defineOwnKey as Zl, DELETED_RESOURCE_REMEDY as Zn, containsIntrinsic as Zo, secretSafeKeyDisplay as Zr, refuseMalformedResourcePropertiesForDestroy as Zs, resolvePendingCloudControlRequests as Zt, conditionFingerprint as _, responsePresignClient as _a, repairMalformedOutputsForReadOnly as _c, isSupersededResourceRecord as _i, redirectFileAsset as _l, sameJournaledOrphans as _n, regionLessSecretName as _o, planFailedOps as _r, parameterInputsFor as _s, compensateRemovedDeletionProtection as _t, scanActiveConsumers as a, collectPrincipalsAttachingPolicy as aa, malformedOrphansWarning as ac, isExportAliasCollision as ai, stackInstanceIdOf as al, revertNestedChildFromJournal as an, assertSendableRoleArn as ao, updatePartialMessage as ar, isStatefulRecreateTargetForReplace as as, contributorInsightsRefusals as at, displayAssemblyPath as au, readRecordedConditionVerdicts as b, isCustomResourceType as ba, malformedRenderedContainersWarning as bc, supersededHolderOf as bi, ensureAssetStorage as bl, planOrphanAdoption as bn, s3BucketDualStackDomainName as bo, replacementNeverSwapped as br, declaresNoEcho as bs, resolveDynamoDbDeleteBudgetMs as bt, nestedSsmNameDeferredNote as c, withoutSiblingOwned as ca, repairMalformedOrphansForReadOnly as cc, DEFAULT_RESOURCE_WARN_AFTER_MS as ci, isSensitiveAttributeName as cl, collectNestedChildUnaddressed as cn, parseIamRoleArn as co, ledgerForStack as cr, WARM_THROUGHPUT_MEMBERS as cs, planIndexContributorInsightsOps as ct, resolveAssemblyPath as cu, slashedSsmNameHealAdoptedNote as d, ccBrokenReason as da, malformedLocalOutputsWarning as dc, destroyStackRecordsView as di, createAssetRedirectResolver as dl, deleteJournaledOrphans as dn, applyCallerIdentityCredentials as do, acquireIdempotencyToken as dr, toCfnInteger as ds, reverseMapTableContributorInsights as dt, unsupportedFinalSnapshotError as ea, refuseMalformedResourcePropertiesForOrphan as ec, exportNameSecretExposure as ei, CrossPrefixScanCache as el, displacedPhysicalIdShown as en, resolveDynamicReferences as eo, withUnprovenUnsettled as er, siblingsOf as es, readbackVectorIndexes as et, nullPrototypeRecord as eu, slashedSsmNameHealNote as f, isCustomResource as fa, malformedOutputsRefusalMessage as fc, getStackRecords as fi, flattenAssetPlaceholders as fl, dropFailedCommands as fn, callerEnvCredentials as fo, planRollback as fr, toFiniteNumber as fs, stripIndexContributorInsights as ft, makeCanonicalizePropertiesFn as g, customResourceResponseExpirationWarning as ga, refuseMalformedOutputsForDestroy as gc, holdsSupersededResources as gi, redirectDockerAsset as gl, loadJournaledOrphans as gn, producerRegionsFromState as go, isReplacementOrphan as gr, movedMaskedProperties as gs, beginDeleteWait as gt, inheritedProvenanceForChildDiff as h, applyCustomResourceResponseExpiration as ha, refuseMalformedOutputs as hc, deleteSupersededEntry as hi, loadPublishableAssetManifest as hl, journaledOrphanLines as hn, classifyReplaySecretRegion as ho, isJournaledOrphan as hr, maskedPropertyFingerprintsOf as hs, DYNAMODB_DELETE_POLL_COST_MS as ht, mergeNoChangeOutputs as i, collectManagedPolicyArnsAttachedBySiblings as ia, malformedOrphansRefusalMessage as ic, collectPublishedOutputNames as ii, isNotImplemented as il, recordDisplacedSkips as in, assertFlagRoleArn as io, undeclaredEmptyObservedKeys as ir, MULTI_REGION_RECREATE_BLOCKED_TYPES as is, CONTRIBUTOR_INSIGHTS_KEY as it, describeFileReadFailure as iu, recordedProtectionNote as j, waitForLambdaFunctionActive as ja, STATE_RESOURCES_MALFORMED as jc, noEchoExactEchoLeavesOf as ji, getDockerImageBySourceHash as jl, findDestructiveChanges as jn, lacksRecordedTableArn as jo, removeProtectionTypeList as jr, repairMalformedOrphanRecordsForReadOnly as js, isTruthyCfnBoolean as jt, diffSecurity as k, setLocalCustomResourceRuntimeEnabled as ka, accountArgs as kc, noEchoAttributeNamesOf as ki, BOOTSTRAP_MARKER_PREFIX as kl, noEchoValueMacsOf as kn, refStateLookupFromResource as ko, redactedDeleteAddressSkip as kr, refuseMalformedOrphanRecordsForDestroy as ks, S3_AUTO_DELETE_OBJECTS_TAG as kt, nestedSsmNameRowNote as l, CC_BROKEN_REASON as la, malformedExportNamesWarning as lc, maskingRetryLogger as li, stringifyValue as ll, getCurrentNestedStackContext as ln, sendableAssumeRoleCommand as lo, reserveStackCreateToken as lr, coerceWarmThroughput as ls, readContributorInsightsSpec as lt, clearBucketRegionCache as lu, crossStackOutputProvenanceSource as m, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as ma, refuseMalformedNestedChildOutputs as mc, replacedDeleteFailureVerdict as mi, isDefaultBootstrapRepoName as ml, isHandledOrphan as mn, classifyRecordedSecretRegion as mo, demoteSupersededOrphans as mr, inputFingerprinter as ms, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as mt, isSecretBearingReferenceString as n, buildFinalSnapshotIdentifier as na, UNREADABLE_ORPHANS_CONTAINER_ROW as nc, noEchoParameterValueSeed as ni, crossPrefixDeniedWarning as nl, getNestedRevertRun as nn, refuseUnreadableCdkCrossAccountRefs as no, equalModuloMarkedMask as nr, isPlainReferenceTo as ns, vectorIndexesSettled as nt, absoluteAssemblyPathEscape as nu, inRunStackKey as o, stripSiblingOwnedMembers as oa, refuseMalformedOrphans as oc, bindingSkippedOutputs as oi, withStackInstanceIdWithheld as ol, revertedNestedRowIds as on, explicitRoleArnOrThrow as oo, updatePartialReason as or, isStatefulRecreateTargetSync as os, indexDeclaresContributorInsights as ot, namesTheSameDirectory as ou, slashedSsmNameHealPendingNote as p, wouldReturnToSdkProvider as pa, malformedOutputsWarning as pc, withStackRecords as pi, isDefaultBootstrapBucketName as pl, dropFailedHint as pn, envCredentialsAreAssumedRole as po, seedsDeleteFirstGuard as pr, tryGetTopLevelWriteOnlyProperties as ps, DYNAMODB_DELETE_DEADLINE_MARGIN_MS as pt, streamTagsMatchDeclared as q, stackIdTailOf as qa, S3StateBackend as qc, ATOMIC_FINAL_SNAPSHOT_TYPES as qi, purgeNoncurrentKeyVersions as ql, proposeRenames as qn, keepsSecretReferenceToken as qo, displayTextOrWithheld as qr, unreadableResourceEntries as qs, isAccessDeniedError as qt, keptWholeReasonText as r, collectGroupsAddedBySiblings as ra, hasReadableOrphans as rc, collectDeclaredOutputNames as ri, isAccessDenied$1 as rl, nestedChildStackName as rn, applyRoleArnIfSet as ro, equalModuloMask as rr, shownType as rs, vectorIndexesShapeDetail as rt, assemblyPathEscape as ru, checkNestedSsmNames as s, withoutSiblingAttachedArns as sa, refuseMalformedOrphansForDestroy as sc, DEFAULT_RESOURCE_TIMEOUT_MS as si, isSecretValuedAttribute as sl, withNestedRevertRun as sn, isIamRoleArn as so, earliestDefined as sr, renderStatefulReason as ss, planContributorInsightsOp as st, renderAssemblyPathEscape as su, DeployEngine as t, createPreDeleteFinalSnapshot as ta, repairMalformedResourcePropertiesForReadOnly as tc, isWholeDynamicReferenceValue as ti, applyCrossPrefixScan as tl, dropSettledNestedJournals as tn, producerLookupOver as to, calculateResourceDrift as tr, findReplacedReadersOfRecreateTargets as ts, vectorIndexesForCreate as tt, ownValue as tu, healSlashedSsmParameterNames as u, ProviderRegistry as ua, malformedExportSourceWarning as uc, awaitInFlightSibling as ui, buildAssetRedirectMap as ul, withNestedStackContext as un, AWS_CREDENTIAL_ENV_KEYS as uo, withCreateTokenLedger as ur, isWarmThroughputDecrease as us, reverseMapIndexContributorInsights as ut, resolveBucketRegion as uu, conditionInputsFrom as v, TemplateNoEchoReresolver as va, STATE_REGION_DIVERGED as vc, supersededAfterRollback as vi, rewriteTemplateAssetReferences as vl, makeForeignHolderScan as vn, s3BucketArn as vo, recheckFailedPlan as vr, maskedInputProof as vs, deleteBudgetKey as vt, pendingMovesRefusalMessage as w, customResourceStackName as wa, refuseMalformedResourcesForDestroy as wc, cyan as wi, getBootstrapMarkerKey as wl, NOECHO_MAC_KEY_ALIAS as wn, isUnboundTemplateParameter as wo, withPreviousPolicies as wr, malformedOrphanRecordsRefusalMessage as ws, deleteTableWithIndexBusyRetry as wt, childTemplateLoader as x, getCurrentResourceSecrets as xa, malformedResourcesWarning as xc, supersededResourcesOf as xi, buildDenyExternalAccessPolicy as xl, DeploymentEventsReader as xn, s3BucketRegionalDomainName as xo, IMPLICIT_DELETE_DEPENDENCIES as xr, maskedPropertyFingerprint as xs, DELETE_INDEX_WAIT_PROCEED_NOTE as xt, parentSuppliedValues as y, readsNoEchoDeleteValues as ya, refuseDivergentRecordRegionForDestroy as yc, supersededHeldByOtherTypeWarning as yi, AssetModeResolver as yl, makeSiblingClaimReader as yn, s3BucketDomainName as yo, recordUnderIdIsNotOwn as yr, passedParameterClassesOf as ys, resolveDynamoDbDeleteBudgetClock as yt, declaredStreamPolicyMember as z, deleteLeftInPlace as za, unwrittenCreateOnlyReplacement as zc, orphanRecordsPrintingBag as zi, isAbsoluteAssetPath as zl, changedReferencePath as zn, recordedReferenceRegions as zo, withNameGenerationReached as zr, refuseMalformedResourceAttributesForOrphan as zs, sameMove as zt };
50197
- //# sourceMappingURL=deploy-engine-DvGT0BH-.js.map
50421
+ export { planVectorIndexUpdates as $, stackIdTailOf as $a, S3StateBackend as $c, ATOMIC_FINAL_SNAPSHOT_TYPES as $i, parseBootstrapMarker as $l, sgProtocolKey as $n, keepsSecretReferenceToken as $o, displayTextOrWithheld as $r, unreadableResourceEntries as $s, displacedOpClause as $t, recordedProtectionEvidence as A, customResourceStackName as Aa, refuseMalformedResourcesForDestroy as Ac, cyan as Ai, buildAssetRedirectMap as Al, constructPathOf as An, isUnboundTemplateParameter as Ao, withPreviousPolicies as Ar, malformedOrphanRecordsRefusalMessage as As, hasCdkAutoDeleteTag as At, declaredStreamTagsMember as B, resolvedResourceTimeoutMs as Ba, hasReadableOutputs as Bc, createReadOnlyAttributeHealerFactory as Bi, AssetManifestLoader as Bl, changedReferenceReason as Bn, promoteInPlaceAttributeDependents as Bo, nameGenerationHighWaterOf as Br, isReadableResourceEntry as Bs, updateRefactorMarker as Bt, pendingMovesOutOf as C, responsePresignClient as Ca, repairMalformedOutputsForReadOnly as Cc, isSupersededResourceRecord as Ci, isListParameterType as Cl, crossStackReadsForPartialSave as Cn, regionLessSecretName as Co, planFailedOps as Cr, parameterInputsFor as Cs, TABLE_INDEX_NOUN as Ct, findServiceTokenRefusals as D, getCurrentResourceSecrets as Da, malformedResourcesWarning as Dc, supersededResourcesOf as Di, decodeListingKey as Dl, noEchoMacParametersOf as Dn, s3BucketRegionalDomainName as Do, IMPLICIT_DELETE_DEPENDENCIES as Dr, maskedPropertyFingerprint as Ds, waitForIndexesSettled as Dt, deferredServiceTokenWarning as E, isCustomResourceType as Ea, malformedRenderedContainersWarning as Ec, supersededHolderOf as Ei, purgeNoncurrentKeyVersions as El, noEchoMacBinding as En, s3BucketDualStackDomainName as Eo, replacementNeverSwapped as Er, declaresNoEcho as Es, relayedIndexBusyDelete as Et, readProtection as F, setLocalCustomResourceRuntimeEnabled as Fa, accountArgs as Fc, noEchoAttributeNamesOf as Fi, isDefaultBootstrapRepoName as Fl, movedToHint as Fn, refStateLookupFromResource as Fo, redactedDeleteAddressSkip as Fr, refuseMalformedOrphanRecordsForDestroy as Fs, readRefactorMarkerOnce as Ft, streamMemberRefusals as G, deleteLeftInPlace as Ga, unwrittenCreateOnlyReplacement as Gc, orphanRecordsPrintingBag as Gi, warnAbsoluteAssetPath as Gl, parseMappingFile as Gn, recordedReferenceRegions as Go, withNameGenerationReached as Gr, refuseMalformedResourceAttributesForOrphan as Gs, formatResourceLine as Gt, reverseMapStreamPolicy as H, RollbackInlinePolicyWriters as Ha, findActionableSdkUnwired as Hc, journaledOrphanPrintingBag as Hi, isCfnTemplateAssetPath as Hl, isPairableType as Hn, outputReferenceProvenanceOf as Ho, retiredAfterRollback as Hr, malformedLocalResourcesWarning as Hs, readsOnlyNoEchoParameters as Ht, DynamoDBGlobalTableProvider as I, withCustomResourceStack as Ia, withheldAccountClause as Ic, noEchoComparisonForTemplate as Ii, loadPublishableAssetManifest as Il, rollbackOrphanIds as In, lacksRecordedRefArn as Io, segmentCleanupOptions as Ir, refuseMalformedOrphansForOrphan as Is, refactorMarkerMovesOf as It, isTtlAlreadyDisabled as J, isWaitAbandonedError as Ja, withoutUnwrittenSdkUnwiredProperties as Jc, secretNamedAttributeNamesOf as Ji, ensureAssetStorage as Jl, referencedLogicalIds as Jn, getAccountInfo as Jo, computeParameterTaint as Jr, refuseMalformedResourceEntriesForDestroy as Js, lookupEachName as Jt, streamPolicyMatchesDeclared as K, deleteSkipReason as Ka, withoutAcceptedSdkUnwiredProperties as Kc, secretNamePrintingBag as Ki, warnWholeAssemblyAsSource as Kl, propertiesChangedReason as Kn, referenceProvenanceOf as Ko, getCurrentProducerRegions as Kr, refuseMalformedResourceEntries as Ks, chunks as Kt, STREAM_POLICY_KEY as L, waitForLambdaFunctionActive as La, STATE_RESOURCES_MALFORMED as Lc, noEchoExactEchoLeavesOf as Li, redirectDockerAsset as Ll, withMovedTo as Ln, lacksRecordedTableArn as Lo, removeProtectionTypeList as Lr, repairMalformedOrphanRecordsForReadOnly as Ls, refactorMarkerRefusalMessage as Lt, PROTECTION_PROPERTY_BY_TYPE as M, customResourcesRunWithoutApp as Ma, refuseMalformedState as Mc, green as Mi, createLazyAssetModeContext as Ml, formatDestructiveChange as Mn, AWS_NO_VALUE as Mo, REDACTED_DELETE_ADDRESS_SKIP_REASON as Mr, malformedOrphanRowsKeptWarning as Ms, keptForRetainedRecord as Mt, isProtectionValueActive as N, localCustomResourceCommand as Na, repairMalformedResourcesForReadOnly as Nc, red as Ni, flattenAssetPlaceholders as Nl, findRefactorHints as Nn, cfnRefValueFromPhysicalId as No, isRedactedRecordedValue as Nr, previewableOrphanRecords as Ns, recordRetainedForReadoption as Nt, serviceTokenBlockingReason as O, withPrintingSecrets as Oa, malformedStateRefusalMessage as Oc, withoutSuperseded as Oi, rememberSynthesizedStacks as Ol, noEchoMacVerdict as On, s3BucketWebsiteUrl as Oo, computeImplicitDeleteEdges as Or, deployRefusesOrphanRowsReason as Os, ECR_AUTO_DELETE_IMAGES_TAG as Ot, perType as P, localCustomResourceRuntimeActive as Pa, JSON_LISTING_HOLE_VALUE as Pc, yellow as Pi, isDefaultBootstrapBucketName as Pl, hintSidesOf as Pn, isStalePlaceholderArnAttribute as Po, redactedDeleteAddressFields as Pr, refuseMalformedOrphanRecords as Ps, readRefactorMarker as Pt, sendTtlWaitingOutRateLimit as Q, poisonRenderedSpellingsCollidingIn as Qa, TemplateParser as Qc, extractDeploymentEventError as Qi, getBootstrapMarkerKey as Ql, cfnIngressPortValue as Qn, carriesDynamicReference as Qo, WITHHELD_NAME_DISPLAY as Qr, repairMalformedResourceEntriesForReadOnly as Qs, NESTED_PENDING_PARENT_REASON as Qt, STREAM_TAGS_KEY as R, CloudControlProvider as Ra, UNREADABLE_RESOURCES_MAP_ROW as Rc, noEchoParameterNamesOf as Ri, redirectFileAsset as Rl, changedReferenceInDiff as Rn, parseWebACLArn as Ro, orphanNeedsIdentity as Rr, unpreviewableOrphanRecords as Rs, refuseRefactorMarker as Rt, hasPendingMovesOut as S, customResourceResponseExpirationWarning as Sa, refuseMalformedOutputsForDestroy as Sc, holdsSupersededResources as Si, SSM_PARAMETER_VALUE_PREFIX as Sl, DeploymentEventsStore as Sn, producerRegionsFromState as So, isReplacementOrphan as Sr, movedMaskedProperties as Ss, INDEX_SETTLE_POLL_INTERVAL_MS as St, refusePendingMovesOut as T, readsNoEchoDeleteValues as Ta, refuseDivergentRecordRegionForDestroy as Tc, supersededHeldByOtherTypeWarning as Ti, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Tl, createNoEchoValueMacs as Tn, s3BucketDomainName as To, recordUnderIdIsNotOwn as Tr, passedParameterClassesOf as Ts, maskedLogger as Tt, streamDeclaresPolicy as U, UNSPECIFIED_SKIP_REASON as Ua, findHandledUnwrittenCreateOnly as Uc, maskEventTextWithBoundBags as Ui, parseAssetManifestBody as Ul, looselyEqual as Un, recordedOutputReferenceRegions as Uo, retiredNameGenerationsAfter as Ur, malformedResourceEntriesWarning as Us, getPriorAttempts as Ut, planStreamMemberOps as V, setResolvedResourceTimeouts as Va, hasReadableResources as Vc, completedReplayEntries as Vi, getDockerImageBySourceHash as Vl, differingRemedy as Vn, keepHeldTokenProvenance as Vo, nameScopeOf as Vr, malformedLocalResourceEntriesWarning as Vs, macWriteOnlyKeys as Vt, streamDeclaresTags as W, deleteIndeterminateGuards as Wa, findSdkUnwiredProperties as Wc, namingSecretsWithRecordedNoEcho as Wi, resolveFileAssetSourcePath as Wl, mappingPairs as Wn, recordedProvenanceOf as Wo, retiredNameGenerationsLeaving as Wr, malformedScrubResourceEntriesRefusalMessage as Ws, markRefusedBeforeApplying as Wt, planTimeToLive as X, isSelectOutOfBounds as Xa, hasNoCloudControlHandlers as Xc, stateSecretNameNeedles as Xi, assertAssetBucketRegion as Xl, stripSiblingOwnedSgRules as Xn, carriesFetchableDynamicReference as Xo, reachableDivergentParameters as Xr, refuseMalformedResourceEntriesForImportSave as Xs, pendingRequestCount as Xt, isTtlRateLimited as Y, IntrinsicFunctionResolver as Ya, NO_CC_HANDLERS_REASON as Yc, secretNamedRecordNeedles as Yi, buildDenyExternalAccessPolicy as Yl, siblingOwnedSgRuleIdentities as Yn, isImpossibleEmptyStoredAttribute as Yo, namesAnyDeclaredParameter as Yr, refuseMalformedResourceEntriesForImport as Ys, withApiLimit as Yt, readTtlSpec as Z, isAlwaysLiveAttribute as Za, PROPERTY_COVERAGE_BY_TYPE as Zc, storedSecretNameNeedles as Zi, isCrossRegionRedirect as Zl, withoutSiblingOwnedSgRules as Zn, isNamelessDynamicReferenceError as Zo, resourcesNamingDeclaredParameter as Zr, refuseMalformedResourceEntriesForOrphan as Zs, resolvePendingCloudControlRequests as Zt, conditionFingerprint as _, ccBrokenReason as _a, malformedLocalOutputsWarning as _c, destroyStackRecordsView as _i, findNestedTemplateTreeDefect as _l, sameJournaledOrphans as _n, applyCallerIdentityCredentials as _o, acquireIdempotencyToken as _r, toCfnInteger as _s, compensateRemovedDeletionProtection as _t, resolveAssemblyPath as _u, scanActiveConsumers as a, refusesFinalSnapshot as aa, refuseMalformedResourcePropertiesForExport as ac, exportNameNoEchoParameters as ai, CrossPrefixReadError as al, revertNestedChildFromJournal as an, withSecretPhysicalIdsMaskedInState as ao, settleUnsettledPrevious as ar, replacementSidesForLog as as, contributorInsightsRefusals as at, getCdkdContainerRepoName as au, readRecordedConditionVerdicts as b, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as ba, refuseMalformedNestedChildOutputs as bc, replacedDeleteFailureVerdict as bi, renderNestedTemplateTreeDefect as bl, planOrphanAdoption as bn, classifyRecordedSecretRegion as bo, demoteSupersededOrphans as br, inputFingerprinter as bs, resolveDynamoDbDeleteBudgetMs as bt, nestedSsmNameDeferredNote as c, buildFinalSnapshotIdentifier as ca, UNREADABLE_ORPHANS_CONTAINER_ROW as cc, noEchoParameterValueSeed as ci, crossPrefixDeniedWarning as cl, collectNestedChildUnaddressed as cn, refuseUnreadableCdkCrossAccountRefs as co, equalModuloMarkedMask as cr, isPlainReferenceTo as cs, planIndexContributorInsightsOps as ct, hasPlainPrototype as cu, slashedSsmNameHealAdoptedNote as d, collectPrincipalsAttachingPolicy as da, malformedOrphansWarning as dc, isExportAliasCollision as di, stackInstanceIdOf as dl, deleteJournaledOrphans as dn, assertSendableRoleArn as do, updatePartialMessage as dr, isStatefulRecreateTargetForReplace as ds, reverseMapTableContributorInsights as dt, absoluteAssemblyPathEscape as du, PRE_DELETE_SNAPSHOT_TYPES as ea, malformedDriftResourcePropertiesWarning as ec, exportAliasCollisionScrubWarning as ei, splitImportedOps as el, displacedPhysicalIdShown as en, isSettledInstanceState as eo, canonicalizeIpProtocolValue as er, withSharedDrainBudget as es, readbackVectorIndexes as et, readBootstrapMarkerBody as eu, slashedSsmNameHealNote as f, stripSiblingOwnedMembers as fa, refuseMalformedOrphans as fc, bindingSkippedOutputs as fi, withStackInstanceIdWithheld as fl, dropFailedCommands as fn, explicitRoleArnOrThrow as fo, updatePartialReason as fr, isStatefulRecreateTargetSync as fs, stripIndexContributorInsights as ft, assemblyPathEscape as fu, makeCanonicalizePropertiesFn as g, ProviderRegistry as ga, malformedExportSourceWarning as gc, awaitInFlightSibling as gi, missingStateBucketRemedy as gl, loadJournaledOrphans as gn, AWS_CREDENTIAL_ENV_KEYS as go, withCreateTokenLedger as gr, isWarmThroughputDecrease as gs, beginDeleteWait as gt, renderAssemblyPathEscape as gu, inheritedProvenanceForChildDiff as h, CC_BROKEN_REASON as ha, malformedExportNamesWarning as hc, maskingRetryLogger as hi, stringifyValue as hl, journaledOrphanLines as hn, sendableAssumeRoleCommand as ho, reserveStackCreateToken as hr, coerceWarmThroughput as hs, DYNAMODB_DELETE_POLL_COST_MS as ht, namesTheSameDirectory as hu, mergeNoChangeOutputs as i, isFinalSnapshotError as ia, refuseMalformedResourcePropertiesForDrift as ic, carriedExportAliasExposure as ii, rebuildClientForBucketRegion as il, recordDisplacedSkips as in, secretSegmentsOfState as io, recordAfterRollbackUpdate as ir, markNewValueKnownAfterDeploy as is, CONTRIBUTOR_INSIGHTS_KEY as it, getCdkdAssetBucketName as iu, recordedProtectionNote as j, customResourcesFailedWithoutApp as ja, refuseMalformedResourcesForExport as jc, gray as ji, createAssetRedirectResolver as jl, findDestructiveChanges as jn, parameterTypeMayLoseSecretIdentity as jo, findNestedStackTypeChanges as jr, malformedOrphanRecordsWarning as js, isTruthyCfnBoolean as jt, diffSecurity as k, NO_LOCAL_CUSTOM_RESOURCES_FLAG as ka, refuseMalformedResourcesForDeploy as kc, bold as ki, synthesizedStacks as kl, noEchoValueMacsOf as kn, coerceParameterTypedValue as ko, resolveReplacementOldType as kr, isReadableOrphanRecord as ks, S3_AUTO_DELETE_OBJECTS_TAG as kt, nestedSsmNameRowNote as l, collectGroupsAddedBySiblings as la, hasReadableOrphans as lc, collectDeclaredOutputNames as li, isAccessDenied$1 as ll, getCurrentNestedStackContext as ln, applyRoleArnIfSet as lo, equalModuloMask as lr, shownType as ls, readContributorInsightsSpec as lt, nullPrototypeRecord as lu, crossStackOutputProvenanceSource as m, withoutSiblingOwned as ma, repairMalformedOrphansForReadOnly as mc, DEFAULT_RESOURCE_WARN_AFTER_MS as mi, isSensitiveAttributeName as ml, isHandledOrphan as mn, parseIamRoleArn as mo, ledgerForStack as mr, WARM_THROUGHPUT_MEMBERS as ms, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as mt, displayAssemblyPath as mu, isSecretBearingReferenceString as n, ccRoutedInstanceTakesNoSnapshot as na, refuseMalformedResourceProperties as nc, secretBearingStateKeyWarning as ni, hasReasonlessBaselineRefusal as nl, getNestedRevertRun as nn, maskedSecretSegment as no, replayRollback as nr, INTRINSIC_KEYS as ns, vectorIndexesSettled as nt, validateContainerRepoName as nu, inRunStackKey as o, unsupportedFinalSnapshotError as oa, refuseMalformedResourcePropertiesForOrphan as oc, exportNameSecretExposure as oi, CrossPrefixScanCache as ol, revertedNestedRowIds as on, resolveDynamicReferences as oo, withUnprovenUnsettled as or, siblingsOf as os, indexDeclaresContributorInsights as ot, defineOwnKey as ou, slashedSsmNameHealPendingNote as p, withoutSiblingAttachedArns as pa, refuseMalformedOrphansForDestroy as pc, DEFAULT_RESOURCE_TIMEOUT_MS as pi, isSecretValuedAttribute as pl, dropFailedHint as pn, isIamRoleArn as po, earliestDefined as pr, renderStatefulReason as ps, DYNAMODB_DELETE_DEADLINE_MARGIN_MS as pt, describeFileReadFailure as pu, streamTagsMatchDeclared as q, withIndeterminateGuard as qa, withoutSdkUnwiredProperties as qc, secretNamePrintingBags as qi, AssetModeResolver as ql, proposeRenames as qn, referenceTokensIn as qo, inheritProducerRegions as qr, refuseMalformedResourceEntriesForDeploy as qs, isAccessDeniedError as qt, keptWholeReasonText as r, effectiveDeletionPolicy as ra, refuseMalformedResourcePropertiesForDestroy as rc, secretSafeKeyDisplay as ri, hasUnverifiableParameterRefusal as rl, nestedChildStackName as rn, secretPhysicalIdSegment as ro, DELETED_RESOURCE_REMEDY as rr, containsIntrinsic as rs, vectorIndexesShapeDetail as rt, BOOTSTRAP_MARKER_PREFIX as ru, checkNestedSsmNames as s, createPreDeleteFinalSnapshot as sa, repairMalformedResourcePropertiesForReadOnly as sc, isWholeDynamicReferenceValue as si, applyCrossPrefixScan as sl, withNestedRevertRun as sn, producerLookupOver as so, calculateResourceDrift as sr, findReplacedReadersOfRecreateTargets as ss, planContributorInsightsOp as st, hasOwnKey as su, DeployEngine as t, ccRoutedFinalSnapshotError as ta, malformedResourcePropertiesWarning as tc, secretBearing as ti, isKnownTokenFreeState as tl, dropSettledNestedJournals as tn, APPSYNC_APIKEY_ARN_RESOURCE_PATH as to, replayFailedOperations as tr, namesRecreatedParent as ts, vectorIndexesForCreate as tt, validateAssetBucketName as tu, healSlashedSsmParameterNames as u, collectManagedPolicyArnsAttachedBySiblings as ua, malformedOrphansRefusalMessage as uc, collectPublishedOutputNames as ui, isNotImplemented as ul, withNestedStackContext as un, assertFlagRoleArn as uo, undeclaredEmptyObservedKeys as ur, MULTI_REGION_RECREATE_BLOCKED_TYPES as us, reverseMapIndexContributorInsights as ut, ownValue as uu, conditionInputsFrom as v, isCustomResource as va, malformedOutputsRefusalMessage as vc, getStackRecords as vi, isAbsoluteAssetPath as vl, makeForeignHolderScan as vn, callerEnvCredentials as vo, planRollback as vr, toFiniteNumber as vs, deleteBudgetKey as vt, clearBucketRegionCache as vu, pendingMovesRefusalMessage as w, TemplateNoEchoReresolver as wa, STATE_REGION_DIVERGED as wc, supersededAfterRollback as wi, ssmResolvedValueType as wl, NOECHO_MAC_KEY_ALIAS as wn, s3BucketArn as wo, recheckFailedPlan as wr, maskedInputProof as ws, deleteTableWithIndexBusyRetry as wt, childTemplateLoader as x, applyCustomResourceResponseExpiration as xa, refuseMalformedOutputs as xc, deleteSupersededEntry as xi, templateIdentity as xl, DeploymentEventsReader as xn, classifyReplaySecretRegion as xo, isJournaledOrphan as xr, maskedPropertyFingerprintsOf as xs, DELETE_INDEX_WAIT_PROCEED_NOTE as xt, parentSuppliedValues as y, wouldReturnToSdkProvider as ya, malformedOutputsWarning as yc, withStackRecords as yi, listNestedTemplateRows as yl, makeSiblingClaimReader as yn, envCredentialsAreAssumedRole as yo, seedsDeleteFirstGuard as yr, tryGetTopLevelWriteOnlyProperties as ys, resolveDynamoDbDeleteBudgetClock as yt, resolveBucketRegion as yu, declaredStreamPolicyMember as z, waitForGoneAfterDelete as za, displayLogicalId as zc, withAttemptedItemsMasked as zi, rewriteTemplateAssetReferences as zl, changedReferencePath as zn, extractGetAttRefs as zo, nameGenerationCarriedFrom as zr, unreadableOrphanRecords as zs, sameMove as zt };
50422
+ //# sourceMappingURL=deploy-engine-BQral6za.js.map