@cdkd/cli 0.352.12 → 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-zXLYCPYh.js → ambient-client-defaults-_b32vSt-.js} +3 -3
  2. package/dist/{ambient-client-defaults-zXLYCPYh.js.map → ambient-client-defaults-_b32vSt-.js.map} +1 -1
  3. package/dist/{asg-provider-vzD1uanW.js → asg-provider-DY41BqOf.js} +6 -6
  4. package/dist/{asg-provider-vzD1uanW.js.map → asg-provider-DY41BqOf.js.map} +1 -1
  5. package/dist/cli.js +3 -3
  6. package/dist/{custom-resource-runtime-5yuSHn1E.js → custom-resource-runtime-QfwICca8.js} +6 -6
  7. package/dist/{custom-resource-runtime-5yuSHn1E.js.map → custom-resource-runtime-QfwICca8.js.map} +1 -1
  8. package/dist/{db-associated-roles-D6FzrHrq.js → db-associated-roles-ChWaJgql.js} +2 -2
  9. package/dist/{db-associated-roles-D6FzrHrq.js.map → db-associated-roles-ChWaJgql.js.map} +1 -1
  10. package/dist/{delete-started-BYb5bEiw.js → delete-started-BAl80KJ-.js} +4 -4
  11. package/dist/{delete-started-BYb5bEiw.js.map → delete-started-BAl80KJ-.js.map} +1 -1
  12. package/dist/{deploy-engine-DIe64g1M.js → deploy-engine-BQral6za.js} +865 -855
  13. package/dist/deploy-engine-BQral6za.js.map +1 -0
  14. package/dist/{diff-calculator-e0X8wg5d.js → diff-calculator-Dj6UGllF.js} +297 -23
  15. package/dist/diff-calculator-Dj6UGllF.js.map +1 -0
  16. package/dist/{ec2-termination-protection-BhINWGSK.js → ec2-termination-protection-D1fp1UTY.js} +6 -6
  17. package/dist/{ec2-termination-protection-BhINWGSK.js.map → ec2-termination-protection-D1fp1UTY.js.map} +1 -1
  18. package/dist/{ecr-uri-B4jEXWEo.js → ecr-uri-BNOBWmtv.js} +2 -2
  19. package/dist/{ecr-uri-B4jEXWEo.js.map → ecr-uri-BNOBWmtv.js.map} +1 -1
  20. package/dist/{expected-bucket-owner-BiM4Hy8G.js → expected-bucket-owner-DvEnZMQG.js} +2 -2
  21. package/dist/{expected-bucket-owner-BiM4Hy8G.js.map → expected-bucket-owner-DvEnZMQG.js.map} +1 -1
  22. package/dist/{iam-role-provider-CRAkOXUR.js → iam-role-provider-DWk5DUSX.js} +8 -8
  23. package/dist/{iam-role-provider-CRAkOXUR.js.map → iam-role-provider-DWk5DUSX.js.map} +1 -1
  24. package/dist/{image-plan-BZ-0TCSM.js → image-plan-DQ0trmM_.js} +8 -8
  25. package/dist/{image-plan-BZ-0TCSM.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-DGUlDiYH.js → logger-BmVyKPL2.js} +2 -2
  30. package/dist/{logger-DGUlDiYH.js.map → logger-BmVyKPL2.js.map} +1 -1
  31. package/dist/{neptune-provider-CHVuPvHJ.js → neptune-provider-CaTWycXB.js} +7 -7
  32. package/dist/{neptune-provider-CHVuPvHJ.js.map → neptune-provider-CaTWycXB.js.map} +1 -1
  33. package/dist/{program-pfwGZi1I.js → program-B8pMildk.js} +136 -24
  34. package/dist/program-B8pMildk.js.map +1 -0
  35. package/dist/{provider-classes-CaogwY3K.js → provider-classes-D3-D7HGf.js} +21 -21
  36. package/dist/{provider-classes-CaogwY3K.js.map → provider-classes-D3-D7HGf.js.map} +1 -1
  37. package/dist/{rds-provider-I6YAiIv3.js → rds-provider-BXsZQCfA.js} +10 -10
  38. package/dist/{rds-provider-I6YAiIv3.js.map → rds-provider-BXsZQCfA.js.map} +1 -1
  39. package/dist/{read-replica-BbDOKi8I.js → read-replica-CaWHwB3m.js} +3 -3
  40. package/dist/{read-replica-BbDOKi8I.js.map → read-replica-CaWHwB3m.js.map} +1 -1
  41. package/dist/{replacement-rules-DEMSUsSU.js → replacement-rules-BuvJdDDu.js} +3 -3
  42. package/dist/{replacement-rules-DEMSUsSU.js.map → replacement-rules-BuvJdDDu.js.map} +1 -1
  43. package/dist/{resource-deadline-B34RyqEU.js → resource-deadline-CB5xO4LO.js} +4 -4
  44. package/dist/{resource-deadline-B34RyqEU.js.map → resource-deadline-CB5xO4LO.js.map} +1 -1
  45. package/dist/{run-cli-D_mCCBi9.js → run-cli-DlUy-Xfz.js} +2 -2
  46. package/dist/{run-cli-D_mCCBi9.js.map → run-cli-DlUy-Xfz.js.map} +1 -1
  47. package/dist/{update-removal-Cr8BZ_MT.js → update-removal-i8K9a3aR.js} +22 -22
  48. package/dist/{update-removal-Cr8BZ_MT.js.map → update-removal-i8K9a3aR.js.map} +1 -1
  49. package/dist/{version-C3ovda8-.js → version-CK4KyY8m.js} +2 -2
  50. package/dist/{version-C3ovda8-.js.map → version-CK4KyY8m.js.map} +1 -1
  51. package/package.json +1 -1
  52. package/dist/deploy-engine-DIe64g1M.js.map +0 -1
  53. package/dist/diff-calculator-e0X8wg5d.js.map +0 -1
  54. package/dist/program-pfwGZi1I.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-C3ovda8-.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-DGUlDiYH.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-zXLYCPYh.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-BhINWGSK.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-BiM4Hy8G.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-Cr8BZ_MT.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-BYb5bEiw.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-DEMSUsSU.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-B34RyqEU.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-BiM4Hy8G.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)
@@ -278,833 +278,224 @@ function nullPrototypeRecord() {
278
278
  return Object.create(null);
279
279
  }
280
280
 
281
- // src/synthesis/synthesized-stacks.ts
282
- let lastSynthesizedStacks = [];
283
- function rememberSynthesizedStacks(stacks) {
284
- lastSynthesizedStacks = stacks;
281
+ // src/assets/asset-storage/names.ts
282
+ const BOOTSTRAP_MARKER_PREFIX = "cdkd-bootstrap/";
283
+ function getCdkdAssetBucketName(accountId, region) {
284
+ return `cdkd-assets-${accountId}-${region}`;
285
285
  }
286
- function synthesizedStacks() {
287
- return lastSynthesizedStacks;
286
+ function getCdkdContainerRepoName(accountId, region) {
287
+ return `cdkd-container-assets-${accountId}-${region}`;
288
288
  }
289
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
- }
290
+ // src/assets/asset-storage/marker.ts
291
+ function getBootstrapMarkerKey(region) {
292
+ return `${BOOTSTRAP_MARKER_PREFIX}${region}.json`;
298
293
  }
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;
294
+ async function readBootstrapMarkerBody(stateBackend, rawRegion, opts = {}) {
295
+ const canonicalKey = getBootstrapMarkerKey(canonicalizeRegion(rawRegion));
296
+ const rawKey = getBootstrapMarkerKey(rawRegion);
297
+ const body = await stateBackend.getRawObject(canonicalKey);
298
+ if (body !== null || rawKey === canonicalKey) return {
299
+ body,
300
+ resolvedKey: canonicalKey
301
+ };
302
+ const rawBody = await stateBackend.getRawObject(rawKey);
303
+ if (rawBody === null) return {
304
+ body: null,
305
+ resolvedKey: canonicalKey
306
+ };
307
+ const subject = opts.logPrefix ? `${opts.logPrefix}: bootstrap marker` : "Bootstrap marker";
308
+ getLogger().debug(`${subject} found at the un-folded key '${rawKey}' (none at '${canonicalKey}') — an upper-cased region was used at 'cdkd bootstrap' time.`);
309
+ return {
310
+ body: rawBody,
311
+ resolvedKey: rawKey
312
+ };
341
313
  }
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;
314
+ const ASSET_BUCKET_NAME_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;
315
+ const CONTAINER_REPO_NAME_PATTERN = /^[a-z0-9]+(?:[._\-/][a-z0-9]+)*$/;
316
+ function validateAssetBucketName(name) {
317
+ if (!ASSET_BUCKET_NAME_PATTERN.test(name)) throw new CdkdError(`--asset-bucket '${name}' is not a valid S3 bucket name. Bucket names must be 3-63 characters of lowercase letters, digits, dots, and hyphens, and must start and end with a letter or digit.`, "INVALID_ASSET_STORAGE_NAME");
353
318
  }
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
- }
319
+ function isValidContainerRepoName(name) {
320
+ return name.length >= 2 && name.length <= 256 && CONTAINER_REPO_NAME_PATTERN.test(name);
380
321
  }
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;
322
+ function validateContainerRepoName(name) {
323
+ if (!isValidContainerRepoName(name)) throw new CdkdError(`--container-repo '${name}' is not a valid ECR repository name. Repository names must be 2-256 characters of lowercase letters and digits, optionally separated by single '.', '_', '-', or '/' characters (no leading, trailing, or doubled separators).`, "INVALID_ASSET_STORAGE_NAME");
398
324
  }
399
- function evictIfOwn(key, own) {
400
- if (replicationProbeCache.get(key) === own) replicationProbeCache.delete(key);
325
+ function quotedIfPlain(value, description) {
326
+ return isPlainName$1(value) ? `'${value}'` : description;
401
327
  }
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 {}
328
+ function isPlainName$1(value) {
329
+ return !/\s/.test(value) && displayIdent(value, { maxCodePoints: 1152 }) === value;
430
330
  }
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]);
331
+ function shownName(value) {
332
+ return displayIdent(value, { maxCodePoints: STACK_REF_MAX_CODE_POINTS });
442
333
  }
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
- };
334
+ function droppedMarkerNames(body, assetBucket, containerRepo) {
335
+ let parsed;
336
+ try {
337
+ parsed = JSON.parse(body);
338
+ } catch {
339
+ return "";
453
340
  }
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
- });
341
+ const fields = parsed ?? {};
342
+ const dropped = (value, kept) => typeof value === "string" && value !== "" && value !== kept;
343
+ const named = [dropped(fields.assetBucket, assetBucket) ? `asset bucket ${shownName(fields.assetBucket)}` : void 0, dropped(fields.containerRepo, containerRepo) ? `container repository ${shownName(fields.containerRepo)}` : void 0].filter((n) => n !== void 0);
344
+ return named.length === 0 ? "" : ` It recorded ${named.join(" and ")}; storage under those names is no longer tracked by cdkd.`;
467
345
  }
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
- });
346
+ function bucketNameSubject(bucketName) {
347
+ return isPlainName$1(bucketName) ? `Asset bucket name '${bucketName}'` : "An asset bucket name that is not a plain identifier";
480
348
  }
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);
349
+ function markerSubject(markerKey) {
350
+ return isPlainName$1(markerKey) ? `Bootstrap marker '${markerKey}'` : "A bootstrap marker whose key is not a plain identifier";
351
+ }
352
+ function parseBootstrapMarker(body, markerKey) {
353
+ let parsed;
354
+ try {
355
+ parsed = JSON.parse(body);
492
356
  } 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)` : ""));
357
+ getLogger().debug(safeMsg`${markerSubject(markerKey)} failed to parse: ${parseFailureDebugDetail(error)}`);
358
+ throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is not valid JSON. Re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER", jsonParseFailureStandIn(error, utf8ByteLength(body)));
505
359
  }
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
- });
360
+ const marker = parsed;
361
+ if (typeof marker.assetSupportVersion === "number" && marker.assetSupportVersion > 1) throw new CdkdError(`${markerSubject(markerKey)} has assetSupportVersion ${marker.assetSupportVersion}, but this cdkd only understands up to ${1}. Upgrade cdkd to deploy in this region.`, "UNSUPPORTED_BOOTSTRAP_MARKER_VERSION");
362
+ if (typeof marker.assetBucket !== "string" || marker.assetBucket.length === 0 || typeof marker.containerRepo !== "string" || marker.containerRepo.length === 0 || typeof marker.assetSupportVersion !== "number") throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is malformed (missing assetBucket / containerRepo / assetSupportVersion). Re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER");
363
+ if (!ASSET_BUCKET_NAME_PATTERN.test(marker.assetBucket) || !isValidContainerRepoName(marker.containerRepo)) throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is malformed (its asset bucket or container repository name is not a valid name). Re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER");
512
364
  return {
513
- deletedBodies: removed.n,
514
- complete: failed.size === 0
365
+ assetBucket: marker.assetBucket,
366
+ containerRepo: marker.containerRepo,
367
+ assetSupportVersion: marker.assetSupportVersion,
368
+ createdAt: typeof marker.createdAt === "string" ? marker.createdAt : ""
515
369
  };
516
370
  }
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 }
371
+
372
+ // src/assets/asset-storage/bucket-region.ts
373
+ function readBucketRegionHeader(error) {
374
+ const headers = error?.$response?.headers;
375
+ if (!headers) return void 0;
376
+ for (const [key, value] of Object.entries(headers)) if (key.toLowerCase() === "x-amz-bucket-region" && value) return value;
377
+ }
378
+ function bucketLocationToRegion$1(constraint) {
379
+ if (!constraint) return "us-east-1";
380
+ if (constraint === "EU") return "eu-west-1";
381
+ return constraint;
382
+ }
383
+ function isCrossRegionRedirect(error) {
384
+ const status = error?.$metadata?.httpStatusCode;
385
+ if (status === 301) return true;
386
+ return status === 400 && readBucketRegionHeader(error) !== void 0;
387
+ }
388
+ async function assertAssetBucketRegion(s3Client, bucketName, expectedRegion, accountId, cause) {
389
+ const want = canonicalizeRegion(expectedRegion);
390
+ const wantShown = plainIdentOr(want, "this deploy region");
391
+ const remedy = `Either bootstrap ${wantShown} with an asset-bucket name unique to it, or run this against the bucket's own region.\nBootstrap with: ${pasteableCommand("cdkd bootstrap", [{
392
+ flag: "--region",
393
+ value: want,
394
+ hole: "region"
395
+ }, {
396
+ flag: "--asset-bucket",
397
+ hole: "name"
398
+ }]).command}`;
399
+ let actual;
400
+ const fromHeader = readBucketRegionHeader(cause);
401
+ if (fromHeader) actual = canonicalizeRegion(fromHeader);
402
+ else try {
403
+ const location = await s3Client.send(new GetBucketLocationCommand({
404
+ Bucket: bucketName,
405
+ ExpectedBucketOwner: accountId
528
406
  }));
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);
407
+ actual = canonicalizeRegion(bucketLocationToRegion$1(location.LocationConstraint));
408
+ } catch (probeError) {
409
+ const fromProbe = readBucketRegionHeader(probeError);
410
+ if (fromProbe) actual = canonicalizeRegion(fromProbe);
411
+ else {
412
+ const failure = describeAwsFailure(probeError);
413
+ if (failure.redacted) getLogger().debug(`GetBucketLocation failed for asset bucket ${quotedIfPlain(bucketName, "with a name that is not a plain identifier")} while confirming it belongs to ${wantShown}: ${failure.detail}`);
414
+ throw new CdkdError(`${isPlainName$1(bucketName) ? `Asset bucket '${bucketName}'` : "An asset bucket whose name is not a plain identifier"} is claimed by an existing bucket, but cdkd could not determine which region that bucket is in, so it cannot confirm it belongs to ${wantShown}. Refusing to adopt it. (region probe failed: ${failure.summary}) ${remedy}`, "ASSET_STORAGE_FOREIGN_REGION_BUCKET", cause);
569
415
  }
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));
416
+ }
417
+ if (actual === want) return;
418
+ const actualShown = plainIdentOr(actual, "another region");
419
+ throw new CdkdError(`${bucketNameSubject(bucketName)} resolves to a bucket in ${actualShown}, while this operation targets ${wantShown}. S3 bucket names are globally unique, and both 'BucketAlreadyOwnedByYou' and a cross-region redirect report ACCOUNT ownership rather than the bucket's region, so cdkd cannot treat it as ${wantShown}'s asset bucket. cdkd asset storage is per-region by design: adopting it would publish ${wantShown}'s assets into ${actualShown} and apply ${wantShown}'s bucket configuration there. ${remedy}`, "ASSET_STORAGE_FOREIGN_REGION_BUCKET", cause);
420
+ }
421
+
422
+ // src/assets/asset-storage/verify.ts
423
+ async function verifyAssetStorageExists(marker, accountId, region, opts = {}) {
424
+ const rebootstrapHint = `cdkd never silently falls back to CDK bootstrap asset storage once a region is opted in.\nRecreate it with: ${pasteableCommand("cdkd bootstrap", [{
425
+ flag: "--region",
426
+ value: region,
427
+ hole: "region"
428
+ }]).command}`;
429
+ const clientOpts = {
430
+ region,
431
+ ...opts.profile && { profile: opts.profile }
432
+ };
433
+ const s3Client = new S3Client({
434
+ ...awsClientDefaults({ profile: opts.profile }),
435
+ ...s3ClientDefaults(),
436
+ ...clientOpts
437
+ });
438
+ const ecrClient = new ECRClient({
439
+ ...awsClientDefaults({ profile: opts.profile }),
440
+ ...clientOpts
441
+ });
442
+ try {
443
+ try {
444
+ await s3Client.send(new HeadBucketCommand({
445
+ Bucket: marker.assetBucket,
446
+ ExpectedBucketOwner: accountId
447
+ }));
448
+ } catch (error) {
449
+ const err = error;
450
+ if (err.name === "NotFound" || err.name === "NoSuchBucket") throw new CdkdError(`cdkd asset storage is bootstrapped for region '${region}' but the asset bucket ${quotedIfPlain(marker.assetBucket, "named by its marker")} is missing. ${rebootstrapHint}`, "ASSET_STORAGE_MISSING");
451
+ if (err.$metadata?.httpStatusCode === 403) throw new CdkdError(`${isPlainName$1(marker.assetBucket) ? `Asset bucket '${marker.assetBucket}'` : "The asset bucket named by the marker"} exists but is not owned by account ${accountId} (or access is denied). Refusing to use it. ${rebootstrapHint}`, "ASSET_STORAGE_FOREIGN_BUCKET", error);
452
+ if (isCrossRegionRedirect(error)) {
453
+ await assertAssetBucketRegion(s3Client, marker.assetBucket, region, accountId, error);
454
+ throw normalizeAwsError(error, {
455
+ bucket: marker.assetBucket,
456
+ operation: "HeadBucket"
457
+ });
595
458
  }
459
+ throw error;
596
460
  }
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);
461
+ try {
462
+ await ecrClient.send(new DescribeRepositoriesCommand({ repositoryNames: [marker.containerRepo] }));
463
+ } catch (error) {
464
+ if (error.name === "RepositoryNotFoundException") throw new CdkdError(`cdkd asset storage is bootstrapped for region '${region}' but the container-asset ECR repository ${quotedIfPlain(marker.containerRepo, "named by its marker")} is missing. ${rebootstrapHint}`, "ASSET_STORAGE_MISSING");
465
+ throw error;
600
466
  }
601
- keyMarker = resp.IsTruncated === true ? decodeListingKey(resp.NextKeyMarker) : void 0;
602
- versionIdMarker = keyMarker !== void 0 ? resp.NextVersionIdMarker : void 0;
603
- } while (keyMarker !== void 0);
467
+ } finally {
468
+ s3Client.destroy();
469
+ ecrClient.destroy();
470
+ }
604
471
  }
605
472
 
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;
473
+ // src/utils/deny-external-access-policy.ts
474
+ function buildDenyExternalAccessPolicy(bucketName, accountId, region) {
475
+ const { partition } = derivePartitionAndUrlSuffix(region);
476
+ return {
477
+ Version: "2012-10-17",
478
+ Statement: [{
479
+ Sid: "DenyExternalAccess",
480
+ Effect: "Deny",
481
+ Principal: "*",
482
+ Action: "s3:*",
483
+ Resource: [`arn:${partition}:s3:::${bucketName}`, `arn:${partition}:s3:::${bucketName}/*`],
484
+ Condition: { StringNotEquals: { "aws:PrincipalAccount": accountId } }
485
+ }]
486
+ };
616
487
  }
617
488
 
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
- };
883
- }
884
- }
885
- function extractHashFromImageUri(imageUri) {
886
- if (imageUri.includes("@sha256:")) return void 0;
887
- return /:([a-f0-9]{8,})$/.exec(imageUri)?.[1];
888
- }
889
-
890
- // src/assets/asset-storage/names.ts
891
- const BOOTSTRAP_MARKER_PREFIX = "cdkd-bootstrap/";
892
- function getCdkdAssetBucketName(accountId, region) {
893
- return `cdkd-assets-${accountId}-${region}`;
894
- }
895
- function getCdkdContainerRepoName(accountId, region) {
896
- return `cdkd-container-assets-${accountId}-${region}`;
897
- }
898
-
899
- // src/assets/asset-storage/marker.ts
900
- function getBootstrapMarkerKey(region) {
901
- return `${BOOTSTRAP_MARKER_PREFIX}${region}.json`;
902
- }
903
- async function readBootstrapMarkerBody(stateBackend, rawRegion, opts = {}) {
904
- const canonicalKey = getBootstrapMarkerKey(canonicalizeRegion(rawRegion));
905
- const rawKey = getBootstrapMarkerKey(rawRegion);
906
- const body = await stateBackend.getRawObject(canonicalKey);
907
- if (body !== null || rawKey === canonicalKey) return {
908
- body,
909
- resolvedKey: canonicalKey
910
- };
911
- const rawBody = await stateBackend.getRawObject(rawKey);
912
- if (rawBody === null) return {
913
- body: null,
914
- resolvedKey: canonicalKey
915
- };
916
- const subject = opts.logPrefix ? `${opts.logPrefix}: bootstrap marker` : "Bootstrap marker";
917
- getLogger().debug(`${subject} found at the un-folded key '${rawKey}' (none at '${canonicalKey}') — an upper-cased region was used at 'cdkd bootstrap' time.`);
918
- return {
919
- body: rawBody,
920
- resolvedKey: rawKey
921
- };
922
- }
923
- const ASSET_BUCKET_NAME_PATTERN = /^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/;
924
- const CONTAINER_REPO_NAME_PATTERN = /^[a-z0-9]+(?:[._\-/][a-z0-9]+)*$/;
925
- function validateAssetBucketName(name) {
926
- if (!ASSET_BUCKET_NAME_PATTERN.test(name)) throw new CdkdError(`--asset-bucket '${name}' is not a valid S3 bucket name. Bucket names must be 3-63 characters of lowercase letters, digits, dots, and hyphens, and must start and end with a letter or digit.`, "INVALID_ASSET_STORAGE_NAME");
927
- }
928
- function isValidContainerRepoName(name) {
929
- return name.length >= 2 && name.length <= 256 && CONTAINER_REPO_NAME_PATTERN.test(name);
930
- }
931
- function validateContainerRepoName(name) {
932
- if (!isValidContainerRepoName(name)) throw new CdkdError(`--container-repo '${name}' is not a valid ECR repository name. Repository names must be 2-256 characters of lowercase letters and digits, optionally separated by single '.', '_', '-', or '/' characters (no leading, trailing, or doubled separators).`, "INVALID_ASSET_STORAGE_NAME");
933
- }
934
- function quotedIfPlain(value, description) {
935
- return isPlainName$1(value) ? `'${value}'` : description;
936
- }
937
- function isPlainName$1(value) {
938
- return !/\s/.test(value) && displayIdent(value, { maxCodePoints: 1152 }) === value;
939
- }
940
- function shownName(value) {
941
- return displayIdent(value, { maxCodePoints: STACK_REF_MAX_CODE_POINTS });
942
- }
943
- function droppedMarkerNames(body, assetBucket, containerRepo) {
944
- let parsed;
945
- try {
946
- parsed = JSON.parse(body);
947
- } catch {
948
- return "";
949
- }
950
- const fields = parsed ?? {};
951
- const dropped = (value, kept) => typeof value === "string" && value !== "" && value !== kept;
952
- const named = [dropped(fields.assetBucket, assetBucket) ? `asset bucket ${shownName(fields.assetBucket)}` : void 0, dropped(fields.containerRepo, containerRepo) ? `container repository ${shownName(fields.containerRepo)}` : void 0].filter((n) => n !== void 0);
953
- return named.length === 0 ? "" : ` It recorded ${named.join(" and ")}; storage under those names is no longer tracked by cdkd.`;
954
- }
955
- function bucketNameSubject(bucketName) {
956
- return isPlainName$1(bucketName) ? `Asset bucket name '${bucketName}'` : "An asset bucket name that is not a plain identifier";
957
- }
958
- function markerSubject(markerKey) {
959
- return isPlainName$1(markerKey) ? `Bootstrap marker '${markerKey}'` : "A bootstrap marker whose key is not a plain identifier";
960
- }
961
- function parseBootstrapMarker(body, markerKey) {
962
- let parsed;
963
- try {
964
- parsed = JSON.parse(body);
965
- } catch (error) {
966
- getLogger().debug(safeMsg`${markerSubject(markerKey)} failed to parse: ${parseFailureDebugDetail(error)}`);
967
- throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is not valid JSON. Re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER", jsonParseFailureStandIn(error, utf8ByteLength(body)));
968
- }
969
- const marker = parsed;
970
- if (typeof marker.assetSupportVersion === "number" && marker.assetSupportVersion > 1) throw new CdkdError(`${markerSubject(markerKey)} has assetSupportVersion ${marker.assetSupportVersion}, but this cdkd only understands up to ${1}. Upgrade cdkd to deploy in this region.`, "UNSUPPORTED_BOOTSTRAP_MARKER_VERSION");
971
- if (typeof marker.assetBucket !== "string" || marker.assetBucket.length === 0 || typeof marker.containerRepo !== "string" || marker.containerRepo.length === 0 || typeof marker.assetSupportVersion !== "number") throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is malformed (missing assetBucket / containerRepo / assetSupportVersion). Re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER");
972
- if (!ASSET_BUCKET_NAME_PATTERN.test(marker.assetBucket) || !isValidContainerRepoName(marker.containerRepo)) throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is malformed (its asset bucket or container repository name is not a valid name). Re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER");
973
- return {
974
- assetBucket: marker.assetBucket,
975
- containerRepo: marker.containerRepo,
976
- assetSupportVersion: marker.assetSupportVersion,
977
- createdAt: typeof marker.createdAt === "string" ? marker.createdAt : ""
978
- };
979
- }
980
-
981
- // src/assets/asset-storage/bucket-region.ts
982
- function readBucketRegionHeader(error) {
983
- const headers = error?.$response?.headers;
984
- if (!headers) return void 0;
985
- for (const [key, value] of Object.entries(headers)) if (key.toLowerCase() === "x-amz-bucket-region" && value) return value;
986
- }
987
- function bucketLocationToRegion$1(constraint) {
988
- if (!constraint) return "us-east-1";
989
- if (constraint === "EU") return "eu-west-1";
990
- return constraint;
991
- }
992
- function isCrossRegionRedirect(error) {
993
- const status = error?.$metadata?.httpStatusCode;
994
- if (status === 301) return true;
995
- return status === 400 && readBucketRegionHeader(error) !== void 0;
996
- }
997
- async function assertAssetBucketRegion(s3Client, bucketName, expectedRegion, accountId, cause) {
998
- const want = canonicalizeRegion(expectedRegion);
999
- const wantShown = plainIdentOr(want, "this deploy region");
1000
- const remedy = `Either bootstrap ${wantShown} with an asset-bucket name unique to it, or run this against the bucket's own region.\nBootstrap with: ${pasteableCommand("cdkd bootstrap", [{
1001
- flag: "--region",
1002
- value: want,
1003
- hole: "region"
1004
- }, {
1005
- flag: "--asset-bucket",
1006
- hole: "name"
1007
- }]).command}`;
1008
- let actual;
1009
- const fromHeader = readBucketRegionHeader(cause);
1010
- if (fromHeader) actual = canonicalizeRegion(fromHeader);
1011
- else try {
1012
- const location = await s3Client.send(new GetBucketLocationCommand({
1013
- Bucket: bucketName,
1014
- ExpectedBucketOwner: accountId
1015
- }));
1016
- actual = canonicalizeRegion(bucketLocationToRegion$1(location.LocationConstraint));
1017
- } catch (probeError) {
1018
- const fromProbe = readBucketRegionHeader(probeError);
1019
- if (fromProbe) actual = canonicalizeRegion(fromProbe);
1020
- else {
1021
- const failure = describeAwsFailure(probeError);
1022
- if (failure.redacted) getLogger().debug(`GetBucketLocation failed for asset bucket ${quotedIfPlain(bucketName, "with a name that is not a plain identifier")} while confirming it belongs to ${wantShown}: ${failure.detail}`);
1023
- throw new CdkdError(`${isPlainName$1(bucketName) ? `Asset bucket '${bucketName}'` : "An asset bucket whose name is not a plain identifier"} is claimed by an existing bucket, but cdkd could not determine which region that bucket is in, so it cannot confirm it belongs to ${wantShown}. Refusing to adopt it. (region probe failed: ${failure.summary}) ${remedy}`, "ASSET_STORAGE_FOREIGN_REGION_BUCKET", cause);
1024
- }
1025
- }
1026
- if (actual === want) return;
1027
- const actualShown = plainIdentOr(actual, "another region");
1028
- throw new CdkdError(`${bucketNameSubject(bucketName)} resolves to a bucket in ${actualShown}, while this operation targets ${wantShown}. S3 bucket names are globally unique, and both 'BucketAlreadyOwnedByYou' and a cross-region redirect report ACCOUNT ownership rather than the bucket's region, so cdkd cannot treat it as ${wantShown}'s asset bucket. cdkd asset storage is per-region by design: adopting it would publish ${wantShown}'s assets into ${actualShown} and apply ${wantShown}'s bucket configuration there. ${remedy}`, "ASSET_STORAGE_FOREIGN_REGION_BUCKET", cause);
1029
- }
1030
-
1031
- // src/assets/asset-storage/verify.ts
1032
- async function verifyAssetStorageExists(marker, accountId, region, opts = {}) {
1033
- const rebootstrapHint = `cdkd never silently falls back to CDK bootstrap asset storage once a region is opted in.\nRecreate it with: ${pasteableCommand("cdkd bootstrap", [{
1034
- flag: "--region",
1035
- value: region,
1036
- hole: "region"
1037
- }]).command}`;
1038
- const clientOpts = {
1039
- region,
1040
- ...opts.profile && { profile: opts.profile }
1041
- };
1042
- const s3Client = new S3Client({
1043
- ...awsClientDefaults({ profile: opts.profile }),
1044
- ...s3ClientDefaults(),
1045
- ...clientOpts
1046
- });
1047
- const ecrClient = new ECRClient({
1048
- ...awsClientDefaults({ profile: opts.profile }),
1049
- ...clientOpts
1050
- });
1051
- try {
1052
- try {
1053
- await s3Client.send(new HeadBucketCommand({
1054
- Bucket: marker.assetBucket,
1055
- ExpectedBucketOwner: accountId
1056
- }));
1057
- } catch (error) {
1058
- const err = error;
1059
- if (err.name === "NotFound" || err.name === "NoSuchBucket") throw new CdkdError(`cdkd asset storage is bootstrapped for region '${region}' but the asset bucket ${quotedIfPlain(marker.assetBucket, "named by its marker")} is missing. ${rebootstrapHint}`, "ASSET_STORAGE_MISSING");
1060
- if (err.$metadata?.httpStatusCode === 403) throw new CdkdError(`${isPlainName$1(marker.assetBucket) ? `Asset bucket '${marker.assetBucket}'` : "The asset bucket named by the marker"} exists but is not owned by account ${accountId} (or access is denied). Refusing to use it. ${rebootstrapHint}`, "ASSET_STORAGE_FOREIGN_BUCKET", error);
1061
- if (isCrossRegionRedirect(error)) {
1062
- await assertAssetBucketRegion(s3Client, marker.assetBucket, region, accountId, error);
1063
- throw normalizeAwsError(error, {
1064
- bucket: marker.assetBucket,
1065
- operation: "HeadBucket"
1066
- });
1067
- }
1068
- throw error;
1069
- }
1070
- try {
1071
- await ecrClient.send(new DescribeRepositoriesCommand({ repositoryNames: [marker.containerRepo] }));
1072
- } catch (error) {
1073
- if (error.name === "RepositoryNotFoundException") throw new CdkdError(`cdkd asset storage is bootstrapped for region '${region}' but the container-asset ECR repository ${quotedIfPlain(marker.containerRepo, "named by its marker")} is missing. ${rebootstrapHint}`, "ASSET_STORAGE_MISSING");
1074
- throw error;
1075
- }
1076
- } finally {
1077
- s3Client.destroy();
1078
- ecrClient.destroy();
1079
- }
1080
- }
1081
-
1082
- // src/utils/deny-external-access-policy.ts
1083
- function buildDenyExternalAccessPolicy(bucketName, accountId, region) {
1084
- const { partition } = derivePartitionAndUrlSuffix(region);
1085
- return {
1086
- Version: "2012-10-17",
1087
- Statement: [{
1088
- Sid: "DenyExternalAccess",
1089
- Effect: "Deny",
1090
- Principal: "*",
1091
- Action: "s3:*",
1092
- Resource: [`arn:${partition}:s3:::${bucketName}`, `arn:${partition}:s3:::${bucketName}/*`],
1093
- Condition: { StringNotEquals: { "aws:PrincipalAccount": accountId } }
1094
- }]
1095
- };
1096
- }
1097
-
1098
- // src/assets/asset-storage/lifecycle.ts
1099
- const ABORT_INCOMPLETE_MULTIPART_LIFECYCLE_RULE_ID = "cdkd-abort-incomplete-multipart-uploads";
1100
- const ABORT_INCOMPLETE_MULTIPART_DAYS = 1;
1101
- function buildAbortIncompleteMultipartRule(legacyPrefix) {
1102
- return {
1103
- ID: ABORT_INCOMPLETE_MULTIPART_LIFECYCLE_RULE_ID,
1104
- Status: "Enabled",
1105
- ...legacyPrefix ? { Prefix: "" } : { Filter: { Prefix: "" } },
1106
- AbortIncompleteMultipartUpload: { DaysAfterInitiation: 1 }
1107
- };
489
+ // src/assets/asset-storage/lifecycle.ts
490
+ const ABORT_INCOMPLETE_MULTIPART_LIFECYCLE_RULE_ID = "cdkd-abort-incomplete-multipart-uploads";
491
+ const ABORT_INCOMPLETE_MULTIPART_DAYS = 1;
492
+ function buildAbortIncompleteMultipartRule(legacyPrefix) {
493
+ return {
494
+ ID: ABORT_INCOMPLETE_MULTIPART_LIFECYCLE_RULE_ID,
495
+ Status: "Enabled",
496
+ ...legacyPrefix ? { Prefix: "" } : { Filter: { Prefix: "" } },
497
+ AbortIncompleteMultipartUpload: { DaysAfterInitiation: 1 }
498
+ };
1108
499
  }
1109
500
  async function applyAbortIncompleteMultipartUpload(s3, bucket, opts = {}) {
1110
501
  const owner = opts.expectedBucketOwner ? { ExpectedBucketOwner: opts.expectedBucketOwner } : {};
@@ -1397,34 +788,160 @@ var AssetModeResolver = class {
1397
788
  }
1398
789
  };
1399
790
 
1400
- // src/assets/asset-redirect.ts
1401
- function flattenAssetPlaceholders(value, accountId, region, partition = "aws") {
1402
- return value.replace(/\$\{AWS::AccountId\}/g, accountId).replace(/\$\{AWS::Region\}/g, region).replace(/\$\{AWS::Partition\}/g, partition);
1403
- }
1404
- function isDefaultBootstrapBucketName(name, accountId, region) {
1405
- return new RegExp(`^cdk-[a-z0-9]+-assets-${accountId}-${escapeRegExp$1(region)}$`).test(name);
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.`);
1406
794
  }
1407
- function isDefaultBootstrapRepoName(name, accountId, region) {
1408
- return new RegExp(`^cdk-[a-z0-9]+-container-assets-${accountId}-${escapeRegExp$1(region)}$`).test(name);
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.`);
1409
797
  }
1410
- function buildAssetRedirectMap(manifest, marker, accountId, region, partition = "aws") {
1411
- const buckets = /* @__PURE__ */ new Map();
1412
- const repos = /* @__PURE__ */ new Map();
1413
- const sources = /* @__PURE__ */ new Map();
1414
- const addForms = (rawName, flattened, target) => {
1415
- sources.set(flattened, target);
1416
- if (rawName !== flattened) sources.set(rawName, target);
1417
- const suffixRe = new RegExp(`-${accountId}-${escapeRegExp$1(region)}$`);
1418
- for (const suffix of [
1419
- "-${AWS::AccountId}-${AWS::Region}",
1420
- `-\${AWS::AccountId}-${region}`,
1421
- `-${accountId}-\${AWS::Region}`
1422
- ]) {
1423
- const form = flattened.replace(suffixRe, suffix);
1424
- if (form !== flattened) sources.set(form, target);
1425
- }
1426
- };
1427
- const destTargetsDeployRegion = (dest) => {
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
+
917
+ // src/assets/asset-redirect.ts
918
+ function flattenAssetPlaceholders(value, accountId, region, partition = "aws") {
919
+ return value.replace(/\$\{AWS::AccountId\}/g, accountId).replace(/\$\{AWS::Region\}/g, region).replace(/\$\{AWS::Partition\}/g, partition);
920
+ }
921
+ function isDefaultBootstrapBucketName(name, accountId, region) {
922
+ return new RegExp(`^cdk-[a-z0-9]+-assets-${accountId}-${escapeRegExp$1(region)}$`).test(name);
923
+ }
924
+ function isDefaultBootstrapRepoName(name, accountId, region) {
925
+ return new RegExp(`^cdk-[a-z0-9]+-container-assets-${accountId}-${escapeRegExp$1(region)}$`).test(name);
926
+ }
927
+ function buildAssetRedirectMap(manifest, marker, accountId, region, partition = "aws") {
928
+ const buckets = /* @__PURE__ */ new Map();
929
+ const repos = /* @__PURE__ */ new Map();
930
+ const sources = /* @__PURE__ */ new Map();
931
+ const addForms = (rawName, flattened, target) => {
932
+ sources.set(flattened, target);
933
+ if (rawName !== flattened) sources.set(rawName, target);
934
+ const suffixRe = new RegExp(`-${accountId}-${escapeRegExp$1(region)}$`);
935
+ for (const suffix of [
936
+ "-${AWS::AccountId}-${AWS::Region}",
937
+ `-\${AWS::AccountId}-${region}`,
938
+ `-${accountId}-\${AWS::Region}`
939
+ ]) {
940
+ const form = flattened.replace(suffixRe, suffix);
941
+ if (form !== flattened) sources.set(form, target);
942
+ }
943
+ };
944
+ const destTargetsDeployRegion = (dest) => {
1428
945
  if (!dest.region) return true;
1429
946
  return flattenAssetPlaceholders(dest.region, accountId, region, partition) === region;
1430
947
  };
@@ -1632,10 +1149,22 @@ function loadPublishableAssetManifest(manifestPath) {
1632
1149
  if (Object.values(manifest.files ?? {}).filter((asset) => !isCfnTemplateAssetPath(asset.source.path)).length + Object.keys(manifest.dockerImages ?? {}).length === 0) return null;
1633
1150
  return manifest;
1634
1151
  }
1635
- function createAssetRedirectResolver(opts) {
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) {
1636
1165
  let accountIdPromise;
1637
1166
  let modeResolver;
1638
- const getAccountId = () => {
1167
+ const accountId = () => {
1639
1168
  accountIdPromise ??= (async () => {
1640
1169
  const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
1641
1170
  const stsClient = new STSClient({
@@ -1651,20 +1180,501 @@ function createAssetRedirectResolver(opts) {
1651
1180
  })();
1652
1181
  return accountIdPromise;
1653
1182
  };
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, {
1183
+ const resolveMode = async (region) => {
1184
+ if (opts.useCdkBootstrapAssets) return { mode: "legacy" };
1185
+ modeResolver ??= new AssetModeResolver(opts.stateBackend, await accountId(), {
1660
1186
  ...opts.profile && { profile: opts.profile },
1661
1187
  ...opts.suppressLegacyNotice && { suppressLegacyNotice: true }
1662
1188
  });
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;
1189
+ return modeResolver.resolve(region);
1667
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);
1412
+ }
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
+ };
1432
+ }
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);
1485
+ }
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
+ }
1512
+ }
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);
1516
+ }
1517
+ keyMarker = resp.IsTruncated === true ? decodeListingKey(resp.NextKeyMarker) : void 0;
1518
+ versionIdMarker = keyMarker !== void 0 ? resp.NextVersionIdMarker : void 0;
1519
+ } while (keyMarker !== void 0);
1520
+ }
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(">");
1526
+ }
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;
1532
+ }
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("/");
1538
+ }
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);
1546
+ }
1547
+ return path.join(realDir, path.basename(templatePath));
1548
+ }
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
+ });
1563
+ }
1564
+ return rows;
1565
+ }
1566
+ function readNestedRows(templatePath) {
1567
+ let parsed;
1568
+ try {
1569
+ parsed = JSON.parse(fs.readFileSync(templatePath, "utf-8"));
1570
+ } catch {
1571
+ return;
1572
+ }
1573
+ return listNestedTemplateRows(parsed);
1574
+ }
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);
1608
+ try {
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
+ }
1629
+ } finally {
1630
+ onChain.delete(identity);
1631
+ }
1632
+ clean.add(lexical);
1633
+ return;
1634
+ } finally {
1635
+ chain.pop();
1636
+ }
1637
+ };
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}`;
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-vzD1uanW.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-I6YAiIv3.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-CHVuPvHJ.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-5yuSHn1E.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-BbDOKi8I.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);
@@ -50408,5 +50418,5 @@ var DeployEngine = class {
50408
50418
  }
50409
50419
  };
50410
50420
 
50411
- export { planVectorIndexUpdates as $, stackIdTailOf as $a, S3StateBackend as $c, ATOMIC_FINAL_SNAPSHOT_TYPES as $i, purgeNoncurrentKeyVersions 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, getBootstrapMarkerKey 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, resolveFileAssetSourcePath 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, redirectFileAsset 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, buildDenyExternalAccessPolicy 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, ensureAssetStorage 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, BOOTSTRAP_MARKER_PREFIX 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, isAbsoluteAssetPath 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, warnWholeAssemblyAsSource 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, AssetManifestLoader 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, templateIdentity 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, listNestedTemplateRows 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, getDockerImageBySourceHash 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, readBootstrapMarkerBody 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, validateAssetBucketName 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, assertAssetBucketRegion 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, validateContainerRepoName 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, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION 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, isCfnTemplateAssetPath 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, redirectDockerAsset 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, AssetModeResolver 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, missingStateBucketRemedy 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, warnAbsoluteAssetPath 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, findNestedTemplateTreeDefect 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, isListParameterType 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, SSM_PARAMETER_VALUE_PREFIX 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, ssmResolvedValueType 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, createAssetRedirectResolver as _l, sameJournaledOrphans as _n, applyCallerIdentityCredentials as _o, acquireIdempotencyToken as _r, toCfnInteger as _s, compensateRemovedDeletionProtection as _t, 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, hasPlainPrototype as au, readRecordedConditionVerdicts as b, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as ba, refuseMalformedNestedChildOutputs as bc, replacedDeleteFailureVerdict as bi, isDefaultBootstrapRepoName 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, absoluteAssemblyPathEscape 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, displayAssemblyPath 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, decodeListingKey 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, namesTheSameDirectory as fu, makeCanonicalizePropertiesFn as g, ProviderRegistry as ga, malformedExportSourceWarning as gc, awaitInFlightSibling as gi, buildAssetRedirectMap as gl, loadJournaledOrphans as gn, AWS_CREDENTIAL_ENV_KEYS as go, withCreateTokenLedger as gr, isWarmThroughputDecrease as gs, beginDeleteWait as gt, resolveBucketRegion 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, clearBucketRegionCache 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, hasOwnKey as iu, recordedProtectionNote as j, customResourcesFailedWithoutApp as ja, refuseMalformedResourcesForExport as jc, gray as ji, parseBootstrapMarker 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, isCrossRegionRedirect 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, assemblyPathEscape 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, resolveAssemblyPath 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, synthesizedStacks 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, nullPrototypeRecord 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, renderAssemblyPathEscape as pu, streamTagsMatchDeclared as q, withIndeterminateGuard as qa, withoutSdkUnwiredProperties as qc, secretNamePrintingBags as qi, renderNestedTemplateTreeDefect 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, defineOwnKey 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, ownValue 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, rememberSynthesizedStacks 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, describeFileReadFailure as uu, conditionInputsFrom as v, isCustomResource as va, malformedOutputsRefusalMessage as vc, getStackRecords as vi, flattenAssetPlaceholders as vl, makeForeignHolderScan as vn, callerEnvCredentials as vo, planRollback as vr, toFiniteNumber as vs, deleteBudgetKey as vt, pendingMovesRefusalMessage as w, TemplateNoEchoReresolver as wa, STATE_REGION_DIVERGED as wc, supersededAfterRollback as wi, rewriteTemplateAssetReferences 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, loadPublishableAssetManifest 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, isDefaultBootstrapBucketName as yl, makeSiblingClaimReader as yn, envCredentialsAreAssumedRole as yo, seedsDeleteFirstGuard as yr, tryGetTopLevelWriteOnlyProperties as ys, resolveDynamoDbDeleteBudgetClock as yt, declaredStreamPolicyMember as z, waitForGoneAfterDelete as za, displayLogicalId as zc, withAttemptedItemsMasked as zi, parseAssetManifestBody as zl, changedReferencePath as zn, extractGetAttRefs as zo, nameGenerationCarriedFrom as zr, unreadableOrphanRecords as zs, sameMove as zt };
50412
- //# sourceMappingURL=deploy-engine-DIe64g1M.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