@go-to-k/cdkd 0.291.9 → 0.291.11

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.
@@ -1,8 +1,8 @@
1
- import { $ as yellow, $a as markRedactedCause, $i as PARTITION_TABLE, $n as repairMalformedResourcePropertiesForReadOnly, $r as AssetModeResolver, $t as requireConfigObject, A as createPreDeleteFinalSnapshot, Aa as LocalStartServiceError, Ai as getLegacyStateBucketName, An as malformedOutputsRefusalMessage, Ar as buildForceUnlockCommand, At as carriesDynamicReference, B as isStatefulRecreateTargetSync, Bi as ssmResolvedValueType, Bn as refuseMalformedOrphansForDestroy, Br as importableOutputKeys, Bt as isSettledInstanceState, C as namesAnyDeclaredParameter, Ci as escapeRegExp, Cn as isReadableResourceEntry, Cr as recoverMaskedOutput, Ct as slowCcOperationTimeoutMs, D as PRE_DELETE_SNAPSHOT_TYPES, Da as DynamicReferenceRegionAmbiguousError, Di as Synthesizer, Dn as malformedOrphanRecordsWarning, Dr as S3StateBackend, Dt as disableInstanceApiTermination, E as ATOMIC_FINAL_SNAPSHOT_TYPES, Ea as DeployCancelledError, Ei as getDockerImageBySourceHash, En as malformedLocalOutputsWarning, Er as LockManager, Et as deleteSkipReason, F as extractDeploymentEventError, Fa as ProvisioningError, Fi as resolveStateBucketWithDefault, Fn as malformedResourcesWarning, Fr as DEFAULT_STATE_PREFIX, Ft as isImpossibleEmptyStoredAttribute, G as toCfnInteger, Ga as withErrorHandling, Gi as uploadCfnTemplate, Gn as refuseMalformedResourceEntries, Gr as shouldRetainResource, Gt as coerceCfnBoolean, H as WARM_THROUGHPUT_MEMBERS, Hi as CFN_TEMPLATE_URL_LIMIT, Hn as refuseMalformedOutputs, Hr as isReadableBag, Ht as normalizeAwsTagsToCfn, I as makeSiblingClaimReader, Ia as ResourceTimeoutError, Ii as resolveStateBucketWithDefaultAndSource, In as malformedStateRefusalMessage, Ir as exportNamesCarriedFrom, It as isNamelessDynamicReferenceError, J as bold, Ja as isMarkedNonRetryable, Ji as injectiveKeyPrefix, Jn as refuseMalformedResourcesForDestroy, Jr as WorkGraph, Jt as configIntegerRefusal, K as toFiniteNumber, Ka as pasteableCommand, Ki as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Kn as refuseMalformedResourceEntriesForOrphan, Kr as AssetPublisher, Kt as coerceCfnInteger, L as planOrphanAdoption, La as ResourceUpdateNotSupportedError, Li as resolveUseCdkBootstrapAssets, Ln as refuseDivergentRecordRegionForDestroy, Lr as hasReadableExportSet, Lt as isUnboundTemplateParameter, M as refusesFinalSnapshot, Ma as MalformedProducerRecordRefusalError, Mi as resolveAutoAssetStorage, Mn as malformedRenderedContainersWarning, Mr as forceQuitRecoveryClause, Mt as cfnRefValueFromPhysicalId, N as unsupportedFinalSnapshotError, Na as NestedStackChildDirectDestroyError, Ni as resolveCaptureObservedState, Nn as malformedResourceEntriesWarning, Nr as formatLockExpiry, Nt as coerceParameterTypedValue, O as buildFinalSnapshotIdentifier, Oa as IntrinsicResolutionRefusalError, Oi as synthesisStatusMessage, On as malformedOrphansRefusalMessage, Or as rebuildClientForBucketRegion, Ot as isTerminationProtectionPropagationError, P as makeCanonicalizePropertiesFn, Pa as PartialFailureError, Pi as resolveSkipPrefix, Pn as malformedResourcePropertiesWarning, Pr as CUSTOM_RESOURCE_RESPONSE_PREFIX, Pt as getAccountInfo, Q as red, Qa as markNonRetryable, Qi as expectedOwnerParam, Qn as repairMalformedResourceEntriesForReadOnly, Qr as rewriteTemplateAssetReferences, Qt as requireConfigArray, R as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ra as StackHasActiveImportsError, Ri as stateBucketExistenceConfirmed, Rn as refuseMalformedNestedChildOutputs, Rr as hasReasonlessBaselineRefusal, Rt as parameterTypeMayLoseSecretIdentity, S as computeParameterTaint, Sa as CdkdError, Si as runDockerStreaming, Sn as hasReadableResources, Sr as recordMaskOnlyValue, St as isWaitAbandonedError, T as resourcesNamingDeclaredParameter, Ti as AssetManifestLoader, Tn as malformedExportSourceWarning, Tr as scrubResourceRecord, Tt as deleteIndeterminateGuards, U as coerceWarmThroughput$1, Ui as MIGRATE_TMP_PREFIX, Un as refuseMalformedOutputsForDestroy, Ur as orphansAfterRollback, Ut as resolveExplicitPhysicalId, V as renderStatefulReason, Va as SynthesisError, Vi as CFN_TEMPLATE_BODY_LIMIT, Vn as refuseMalformedOrphansForOrphan, Vr as importableOutputs, Vt as WAFv2WebACLProvider, W as isWarmThroughputDecrease, Wa as normalizeAwsError, Wi as findLargeInlineResources, Wn as refuseMalformedResourceAttributesForOrphan, Wr as orphansCarriedFrom, Wt as assertRegionMatch, X as gray, Xa as isThrottlingError, Xi as producerRecordKey, Xn as repairMalformedOrphansForReadOnly, Xr as createAssetRedirectResolver, Xt as readConfigString, Y as cyan, Ya as isRetryableTransientError, Yi as producerCoordinateKey, Yn as refuseMalformedState, Yr as buildAssetRedirectMap, Yt as configStringRefusal, Z as green, Za as isTransientServerError, Zi as decodeListingKey, Zn as repairMalformedOutputsForReadOnly, Zr as loadPublishableAssetManifest, Zt as replayWarn, _ as bagHoldsSecretExpression, _a as getAwsClients, _i as formatDockerLoginError, _n as UNREADABLE_ORPHANS_CONTAINER_ROW, _r as identityKeyFor, _t as endCommandInterruptScope, a as DeploymentEventsStore, aa as processStackMessages, ai as parseBootstrapMarker, an as s3BucketDomainName, ar as describeTypeWithThrottleRetry, at as secretBearingStateKeyWarning, b as mergeNoChangeOutputs, ba as setAwsClients, bi as redactDockerArgvValues, bn as hasReadableOrphans, br as maskSecretsInError, bt as startInterruptWatch, c as replayFailedOperations, ca as hasPlainPrototype, ci as validateContainerRepoName, cn as s3BucketWebsiteUrl, cr as TemplateParser, ct as IAMRoleProvider, d as updatePartialMessage, da as absoluteAssemblyPathEscape, di as resolveDockerContextDirectory, dn as applyCallerIdentityCredentials, dr as STATE_SOURCED_READBACK_RULES, dt as ProviderRegistry, ea as canonicalizeRegion, ei as BOOTSTRAP_MARKER_PREFIX, en as requireConfigString, eo as retryClassificationText, er as repairMalformedResourcesForReadOnly, et as collectDeclaredOutputNames, f as updatePartialReason, fa as renderAssemblyPathEscape, fi as warnManifestExecutable, fn as callerEnvCredentials, fr as TEMPLATE_SOURCED_RULES, ft as wouldReturnToSdkProvider, g as computeImplicitDeleteEdges, ga as AwsClients, gi as dockerSpawnEnvWithSensitive, gn as STATE_RESOURCES_MALFORMED, gr as errorCauseChain, gt as beginCommandInterruptScope, h as IMPLICIT_DELETE_DEPENDENCIES, ha as resolveBucketRegion, hi as describeDockerFailure, hn as INTRINSIC_KEYS, hr as dynamicReferenceTokens, ht as maskerOrIdentity, i as DeploymentEventsReader, ia as globMatches, ii as isCrossRegionRedirect, in as s3BucketArn, ir as findSilentDropProperties, it as secretBearing, j as isFinalSnapshotError, ji as resolveApp, jn as malformedOutputsWarning, jr as buildLockContentionMessage, jt as carriesFetchableDynamicReference, k as ccRoutedFinalSnapshotError, ka as LocalInvokeBuildError$1, ki as getDefaultStateBucketName, kn as malformedOrphansWarning, kr as UNREPRODUCIBLE_LOCK_CLAUSE, kt as IntrinsicFunctionResolver, l as replayRollback, la as nullPrototypeRecord, li as buildDenyExternalAccessPolicy, ln as applyRoleArnIfSet, lr as STATE_SOURCED_BASELINE_RULES, lt as collectInlinePolicyNamesManagedBySiblings, m as maskingRetryLogger, mi as describeDockerExecFailure, mn as DiffCalculator, mr as createSecretMasker, mt as maskDeep, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as AssemblyReader, ni as ensureAssetStorage, nn as producerRegionsFromState, no as safeStringify, nr as safeStackName, nt as exportAliasCollisionScrubWarning, o as planFailedOps, oa as defineOwnKey, oi as readBootstrapMarkerBody, on as s3BucketDualStackDomainName, or as withRetry, ot as secretSafeKeyDisplay, p as withResourceDeadline, pa as resolveAssemblyPath, pi as describeDockerCapturedOutput, pn as envCredentialsAreAssumedRole, pr as carriesSecretMask, pt as createMaskedRetryLogger, q as formatResourceLine, qa as shellQuote, qi as injectiveKey, qn as refuseMalformedResourcePropertiesForOrphan, qr as stringifyValue, qt as configBooleanRefusal, r as DeployEngine, ra as failedStageNote, ri as getBootstrapMarkerKey, rn as withSharedDrainBudget, rr as findActionableSilentDrops, rt as isExportAliasCollision, s as planRollback, sa as hasOwnKey, si as validateAssetBucketName, sn as s3BucketRegionalDomainName, sr as DagBuilder, st as getCurrentResourceSecrets, t as DEFAULT_RESOURCE_TIMEOUT_MS, ta as derivePartitionAndUrlSuffix, ti as assertAssetBucketRegion, tn as classifyReplaySecretRegion, to as describeAwsFailure, tr as safeRegion, tt as collectPublishedOutputNames, u as resolveReplacementOldType, ua as ownValue, ui as buildDockerImage, un as AWS_CREDENTIAL_ENV_KEYS, ur as STATE_SOURCED_CROSS_GENERATION_RULES, ut as clearOnUpdateRemoval, v as isSecretBearingReferenceString, va as resetAwsClients, vi as getDockerCmd, vn as UNREADABLE_RESOURCES_MAP_ROW, vr as isSingleDynamicReferenceToken, vt as interruptWatchListenerCount, w as reachableDivergentParameters, wa as CrossAccountSecretRefusalError, wi as stripControlChars, wn as malformedExportNamesWarning, wr as redactSecretsForState, wt as UNSPECIFIED_SKIP_REASON, x as bindingSkippedOutputs, xi as runDockerForeground, xn as hasReadableOutputs, xr as maskSecretsInText, xt as CloudControlProvider, y as keptWholeReasonText, ya as runWithStackAwsClients, yi as partitionSensitiveEnv, yn as displayLogicalId, yr as markSameGenerationBag, yt as isInterruptedWaitError, z as isStatefulRecreateTargetForReplace, za as StackTerminationProtectionError, zi as warnDeprecatedNoPrefixCliFlag, zn as refuseMalformedOrphans, zr as hasUnverifiableParameterRefusal, zt as refStateLookupFromResource } from "./deploy-engine-TkL9nyq8.js";
1
+ import { $ as yellow, $a as isMarkedNonRetryable, $i as injectiveKeyPrefix, $n as repairMalformedResourcePropertiesForReadOnly, $r as AssetModeResolver, $t as requireConfigObject, A as createPreDeleteFinalSnapshot, Ai as AssetManifestLoader, An as malformedOutputsRefusalMessage, Ar as buildForceUnlockCommand, At as carriesDynamicReference, B as isStatefulRecreateTargetSync, Ba as ProvisioningError, Bi as resolveStateBucketWithDefault, Bn as refuseMalformedOrphansForDestroy, Br as importableOutputKeys, Bt as isSettledInstanceState, C as namesAnyDeclaredParameter, Ca as resetAwsClients, Ci as partitionSensitiveEnv, Cn as isReadableResourceEntry, Cr as recoverMaskedOutput, Ct as UNSPECIFIED_SKIP_REASON, D as PRE_DELETE_SNAPSHOT_TYPES, Da as CdkdError, Di as warnFinchArgvExposure, Dn as malformedOrphanRecordsWarning, Dr as S3StateBackend, Dt as disableInstanceApiTermination, E as ATOMIC_FINAL_SNAPSHOT_TYPES, Ei as runDockerStreaming, En as malformedLocalOutputsWarning, Er as LockManager, Et as isWaitAbandonedError, F as extractDeploymentEventError, Fa as LocalStartServiceError, Fi as getLegacyStateBucketName, Fn as malformedResourcesWarning, Fr as DEFAULT_STATE_PREFIX, Ft as isImpossibleEmptyStoredAttribute, G as toCfnInteger, Gi as ssmResolvedValueType, Gn as refuseMalformedResourceEntries, Gr as shouldRetainResource, Gt as coerceCfnBoolean, H as WARM_THROUGHPUT_MEMBERS, Ha as ResourceUpdateNotSupportedError, Hi as resolveUseCdkBootstrapAssets, Hn as refuseMalformedOutputs, Hr as isReadableBag, Ht as normalizeAwsTagsToCfn, I as makeSiblingClaimReader, Ii as resolveApp, In as malformedStateRefusalMessage, Ir as exportNamesCarriedFrom, It as isNamelessDynamicReferenceError, J as bold, Ji as MIGRATE_TMP_PREFIX, Jn as refuseMalformedResourcesForDestroy, Jr as WorkGraph, Jt as configIntegerRefusal, K as toFiniteNumber, Ka as SynthesisError, Ki as CFN_TEMPLATE_BODY_LIMIT, Kn as refuseMalformedResourceEntriesForOrphan, Kr as AssetPublisher, Kt as coerceCfnInteger, L as planOrphanAdoption, La as MalformedProducerRecordRefusalError, Li as resolveAutoAssetStorage, Ln as refuseDivergentRecordRegionForDestroy, Lr as hasReadableExportSet, Lt as isUnboundTemplateParameter, M as refusesFinalSnapshot, Ma as DynamicReferenceRegionAmbiguousError, Mi as Synthesizer, Mn as malformedRenderedContainersWarning, Mr as forceQuitRecoveryClause, Mt as cfnRefValueFromPhysicalId, N as unsupportedFinalSnapshotError, Na as IntrinsicResolutionRefusalError, Ni as synthesisStatusMessage, Nn as malformedResourceEntriesWarning, Nr as formatLockExpiry, Nt as coerceParameterTypedValue, O as buildFinalSnapshotIdentifier, Oi as escapeRegExp, On as malformedOrphansRefusalMessage, Or as rebuildClientForBucketRegion, Ot as isTerminationProtectionPropagationError, P as makeCanonicalizePropertiesFn, Pa as LocalInvokeBuildError$1, Pi as getDefaultStateBucketName, Pn as malformedResourcePropertiesWarning, Pr as CUSTOM_RESOURCE_RESPONSE_PREFIX, Pt as getAccountInfo, Q as red, Qa as shellQuote, Qi as injectiveKey, Qn as repairMalformedResourceEntriesForReadOnly, Qr as rewriteTemplateAssetReferences, Qt as requireConfigArray, R as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ra as NestedStackChildDirectDestroyError, Ri as resolveCaptureObservedState, Rn as refuseMalformedNestedChildOutputs, Rr as hasReasonlessBaselineRefusal, Rt as parameterTypeMayLoseSecretIdentity, S as computeParameterTaint, Sa as getAwsClients, Si as isMalformedEnvKey, Sn as hasReadableResources, Sr as recordMaskOnlyValue, St as slowCcOperationTimeoutMs, T as resourcesNamingDeclaredParameter, Ta as setAwsClients, Ti as runDockerForeground, Tn as malformedExportSourceWarning, Tr as scrubResourceRecord, Tt as deleteSkipReason, U as coerceWarmThroughput$1, Ua as StackHasActiveImportsError, Ui as stateBucketExistenceConfirmed, Un as refuseMalformedOutputsForDestroy, Ur as orphansAfterRollback, Ut as resolveExplicitPhysicalId, V as renderStatefulReason, Va as ResourceTimeoutError, Vi as resolveStateBucketWithDefaultAndSource, Vn as refuseMalformedOrphansForOrphan, Vr as importableOutputs, Vt as WAFv2WebACLProvider, W as isWarmThroughputDecrease, Wa as StackTerminationProtectionError, Wi as warnDeprecatedNoPrefixCliFlag, Wn as refuseMalformedResourceAttributesForOrphan, Wr as orphansCarriedFrom, Wt as assertRegionMatch, X as gray, Xa as withErrorHandling, Xi as uploadCfnTemplate, Xn as repairMalformedOrphansForReadOnly, Xr as createAssetRedirectResolver, Xt as readConfigString, Y as cyan, Ya as normalizeAwsError, Yi as findLargeInlineResources, Yn as refuseMalformedState, Yr as buildAssetRedirectMap, Yt as configStringRefusal, Z as green, Za as pasteableCommand, Zi as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Zn as repairMalformedOutputsForReadOnly, Zr as loadPublishableAssetManifest, Zt as replayWarn, _ as bagHoldsSecretExpression, _a as renderAssemblyPathEscape, _i as dockerSpawnEnvWithSensitive, _n as UNREADABLE_ORPHANS_CONTAINER_ROW, _r as identityKeyFor, _t as endCommandInterruptScope, a as DeploymentEventsStore, aa as canonicalizeRegion, ai as parseBootstrapMarker, an as s3BucketDomainName, ao as retryClassificationText, ar as describeTypeWithThrottleRetry, at as secretBearingStateKeyWarning, b as mergeNoChangeOutputs, ba as resolveBucketRegion, bi as getDockerCmd, bn as hasReadableOrphans, br as maskSecretsInError, bt as startInterruptWatch, c as replayFailedOperations, ca as failedStageNote, ci as validateContainerRepoName, cn as s3BucketWebsiteUrl, cr as TemplateParser, ct as IAMRoleProvider, d as updatePartialMessage, da as defineOwnKey, di as buildDockerImage, dn as applyCallerIdentityCredentials, dr as STATE_SOURCED_READBACK_RULES, dt as ProviderRegistry, ea as producerCoordinateKey, ei as BOOTSTRAP_MARKER_PREFIX, en as requireConfigString, eo as isRetryableTransientError, er as repairMalformedResourcesForReadOnly, et as collectDeclaredOutputNames, f as updatePartialReason, fa as hasOwnKey, fi as resolveDockerContextDirectory, fn as callerEnvCredentials, fr as TEMPLATE_SOURCED_RULES, ft as wouldReturnToSdkProvider, g as computeImplicitDeleteEdges, ga as absoluteAssemblyPathEscape, gi as describeDockerFailure, gn as STATE_RESOURCES_MALFORMED, gr as errorCauseChain, gt as beginCommandInterruptScope, h as IMPLICIT_DELETE_DEPENDENCIES, ha as ownValue, hi as describeDockerExecFailure, hn as INTRINSIC_KEYS, hr as dynamicReferenceTokens, ht as maskerOrIdentity, i as DeploymentEventsReader, ia as PARTITION_TABLE, ii as isCrossRegionRedirect, in as s3BucketArn, io as markRedactedCause, ir as findSilentDropProperties, it as secretBearing, j as isFinalSnapshotError, ja as DeployCancelledError, ji as getDockerImageBySourceHash, jn as malformedOutputsWarning, jr as buildLockContentionMessage, jt as carriesFetchableDynamicReference, k as ccRoutedFinalSnapshotError, ka as CrossAccountSecretRefusalError, ki as stripControlChars, kn as malformedOrphansWarning, kr as UNREPRODUCIBLE_LOCK_CLAUSE, kt as IntrinsicFunctionResolver, l as replayRollback, la as globMatches, li as buildDenyExternalAccessPolicy, ln as applyRoleArnIfSet, lr as STATE_SOURCED_BASELINE_RULES, lt as collectInlinePolicyNamesManagedBySiblings, m as maskingRetryLogger, ma as nullPrototypeRecord, mi as describeDockerCapturedOutput, mn as DiffCalculator, mr as createSecretMasker, mt as maskDeep, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as decodeListingKey, ni as ensureAssetStorage, nn as producerRegionsFromState, no as isTransientServerError, nr as safeStackName, nt as exportAliasCollisionScrubWarning, o as planFailedOps, oa as derivePartitionAndUrlSuffix, oi as readBootstrapMarkerBody, on as s3BucketDualStackDomainName, oo as describeAwsFailure, or as withRetry, ot as secretSafeKeyDisplay, p as withResourceDeadline, pa as hasPlainPrototype, pi as warnManifestExecutable, pn as envCredentialsAreAssumedRole, pr as carriesSecretMask, pt as createMaskedRetryLogger, q as formatResourceLine, qi as CFN_TEMPLATE_URL_LIMIT, qn as refuseMalformedResourcePropertiesForOrphan, qr as stringifyValue, qt as configBooleanRefusal, r as DeployEngine, ra as expectedOwnerParam, ri as getBootstrapMarkerKey, rn as withSharedDrainBudget, ro as markNonRetryable, rr as findActionableSilentDrops, rt as isExportAliasCollision, s as planRollback, sa as AssemblyReader, si as validateAssetBucketName, sn as s3BucketRegionalDomainName, so as safeStringify, sr as DagBuilder, st as getCurrentResourceSecrets, t as DEFAULT_RESOURCE_TIMEOUT_MS, ta as producerRecordKey, ti as assertAssetBucketRegion, tn as classifyReplaySecretRegion, to as isThrottlingError, tr as safeRegion, tt as collectPublishedOutputNames, u as resolveReplacementOldType, ua as processStackMessages, ui as assertCdkLocalDockerContextContained, un as AWS_CREDENTIAL_ENV_KEYS, ur as STATE_SOURCED_CROSS_GENERATION_RULES, ut as clearOnUpdateRemoval, v as isSecretBearingReferenceString, va as resolveAssemblyPath, vi as finchSecretArgvRefusal, vn as UNREADABLE_RESOURCES_MAP_ROW, vr as isSingleDynamicReferenceToken, vt as interruptWatchListenerCount, w as reachableDivergentParameters, wa as runWithStackAwsClients, wi as redactDockerArgvValues, wn as malformedExportNamesWarning, wr as redactSecretsForState, wt as deleteIndeterminateGuards, x as bindingSkippedOutputs, xa as AwsClients, xi as isDockerClientEnvKey, xn as hasReadableOutputs, xr as maskSecretsInText, xt as CloudControlProvider, y as keptWholeReasonText, yi as formatDockerLoginError, yn as displayLogicalId, yr as markSameGenerationBag, yt as isInterruptedWaitError, z as isStatefulRecreateTargetForReplace, za as PartialFailureError, zi as resolveSkipPrefix, zn as refuseMalformedOrphans, zr as hasUnverifiableParameterRefusal, zt as refStateLookupFromResource } from "./deploy-engine-D4svwrnK.js";
2
2
  import { C as displayAwsMessage, D as truncateCodePoints, E as isPasteableIdent, S as UNRENDERABLE, T as displaySafe, _ as withSkipPrefix, b as SECRET_REF_MAX_CODE_POINTS, c as PATTERN_B_NAME_OPTIONS, f as explicitNamePropertyFor, h as getCurrentStackName, i as reserveStdoutForPayload, l as PATTERN_B_NAME_PROPERTIES, m as generateResourceNameWithFallback, n as getLogger, o as runStackBuffered, p as generateResourceName, s as getLiveRenderer, u as PATTERN_B_RESOURCE_TYPES, v as withStackName, w as displayIdent, x as STACK_REF_MAX_CODE_POINTS } from "./logger-GASr9bAF.js";
3
3
  import { n as awsClientDefaults, s as ambientRegion } from "./aws-client-defaults-jISU4PHo.js";
4
- import { t as getCdkdVersion } from "./version-RzKz4JAW.js";
5
- import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-D9EJApN9.js";
4
+ import { t as getCdkdVersion } from "./version-CuVd0lOr.js";
5
+ import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-BDhrXE5Y.js";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
7
7
  import { createHash, randomBytes, randomUUID } from "node:crypto";
8
8
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -7363,86 +7363,41 @@ function isPlainObject$2(value) {
7363
7363
  return typeof value === "object" && value !== null && !Array.isArray(value);
7364
7364
  }
7365
7365
  /**
7366
- * Is this `Destination` block written in the CFn FLATTENED form
7367
- * (`{ BucketArn, Format, ... }`) rather than the SDK NESTED one
7368
- * (`{ S3BucketDestination: { ... } }`)?
7369
- *
7370
- * ONE predicate, called from both `resolveS3BucketDestination` (which picks the
7371
- * bag) and `s3BucketDestinationPath` (which names it). They were written out
7372
- * twice and a reviewer rightly pointed out that two copies of a branch
7373
- * condition must be edited together or a refusal starts naming the wrong key.
7374
- *
7375
- * `Bucket` is probed alongside `BucketArn` because the readers accept it
7376
- * (`s3Dest['BucketArn'] ?? s3Dest['Bucket']`); omitting it made a
7377
- * `{ Bucket }`-only block take the nested branch, find nothing, and drop — the
7378
- * same silent drop one shape over.
7379
- */
7380
- function isFlattenedDestination(dest) {
7381
- return Boolean(dest["BucketArn"] || dest["Bucket"] || dest["BucketAccountId"] || dest["Format"]);
7382
- }
7383
- /**
7384
- * The CFn path of the destination bag `resolveS3BucketDestination` will pick —
7385
- * issue #1493 item 3, which is a MESSAGE concern, not a value one.
7386
- *
7387
- * Kept separate from the resolver rather than returned alongside the bag:
7388
- * `gen-nested-key-coverage`'s write-evidence walk follows a plain
7389
- * `const x = this.helper(...)` binding to the members written beneath it, and
7390
- * a DESTRUCTURED `const { bag, path } = ...` is a shape it cannot follow — so
7391
- * pairing the two silently withdrew the write evidence for
7392
- * `Destination.BucketArn` / `.BucketAccountId` and turned an opted-in target
7393
- * red with no behavior change at all. Measured against the pre-change provider
7394
- * via the critic's `--providers-dir=` seam.
7395
- */
7396
- function s3BucketDestinationPath(dest, destinationPath) {
7397
- return isPlainObject$2(dest) && isFlattenedDestination(dest) ? destinationPath : `${destinationPath}.S3BucketDestination`;
7398
- }
7399
- /**
7400
- * The FLATTENED CFn `Destination` block cdkd actually SENDS for `declared`
7401
- * (issue #1707) — the shared fold behind BOTH halves of the #1633 pair: the
7402
- * per-item `effectiveProperties` record and
7366
+ * The CFn `Destination` block cdkd actually SENDS for `declared` (issue #1707) —
7367
+ * the shared fold behind BOTH halves of the #1633 pair: the per-item
7368
+ * `effectiveProperties` record and
7403
7369
  * {@link S3BucketProvider.canonicalizeDesiredProperties}.
7404
7370
  *
7405
- * The desired side accepts TWO spellings (`resolveS3BucketDestination` picks
7406
- * either the flattened CFn block or the nested SDK `S3BucketDestination` one)
7407
- * plus a `Bucket` / `BucketArn` alias inside either, while the readback
7408
- * (`inventorySdkToCfn` / `analyticsSdkToCfn`) emits ONLY the flattened form with
7409
- * `BucketArn`. So a record written in any other spelling can never match what
7410
- * `readCurrentState` returns: `cdkd drift` re-reports it forever and `--revert`
7411
- * re-issues the same Put — the never-emitted-KEY class of issue #1686, reached
7412
- * through the SHAPE rather than through a value. The live CFn registry schema
7413
- * agrees the flattened form is the only CFn spelling (`Destination` is
7414
- * `{BucketArn, BucketAccountId, Format, Prefix}` with `additionalProperties:
7415
- * false`), so `S3BucketDestination` and `Bucket` are cdkd-only tolerances.
7416
- *
7417
- * This NORMALIZES rather than retracting the tolerance, per the #1686 rule:
7418
- * refusing the SDK spelling would break templates that deploy today. It also
7419
- * supersedes #1670's write-back-at-the-DECLARED-branch decision, whose whole
7420
- * reason was that writing at a hardcoded branch would leave the malformed value
7421
- * alive at the other key and add a stray one — there is no other key left once
7422
- * the block is normalized wholesale.
7371
+ * The readback (`inventorySdkToCfn` / `analyticsSdkToCfn`) emits only
7372
+ * `{BucketArn, BucketAccountId, Format, Prefix}`, the members the live CFn
7373
+ * registry schema declares (`additionalProperties: false`). The block is rebuilt
7374
+ * from exactly those members so a record never carries a key the readback cannot
7375
+ * report.
7376
+ *
7377
+ * The SDK spellings this once also folded (the nested
7378
+ * `{ S3BucketDestination: { ... } }` shape and a `Bucket` alias for
7379
+ * `BucketArn`) are gone: `BucketArn` and `Format` are schema-required here and
7380
+ * `AWS::S3::Bucket` is in `CFN_ENFORCED_TYPES`, so a template using either is
7381
+ * refused pre-flight by `nested-required.ts` (issue #3602).
7423
7382
  *
7424
7383
  * `Format` is the one member a caller can override: the applier passes the
7425
7384
  * value it SENT, which differs from the declared one when the warn-and-
7426
- * SUBSTITUTE read replaced it (#1670). Absent on BOTH sides it defaults to the
7427
- * `'CSV'` the appliers send, so the record carries what AWS will report back
7428
- * rather than one key fewer.
7385
+ * SUBSTITUTE read replaced a malformed value (#1670). Absent on BOTH sides it
7386
+ * defaults to the `'CSV'` the appliers send, so the record carries what AWS
7387
+ * will report back rather than one key fewer.
7429
7388
  *
7430
- * @returns the flattened block, or `declared` BY IDENTITY when it already is
7431
- * one (so an ordinary template records byte-for-byte what it declared) or is
7432
- * not a shape this can fold at all (absent / malformed — left for the
7433
- * resolver's own refusal to report).
7389
+ * @returns the rebuilt block, or `declared` BY IDENTITY when it already is one
7390
+ * (so an ordinary template records byte-for-byte what it declared) or is not
7391
+ * a shape this can fold at all (absent / malformed / no `BucketArn` — left for
7392
+ * the resolver's own refusal to report).
7434
7393
  */
7435
7394
  function effectiveS3BucketDestination(declared, sentFormat) {
7436
7395
  if (!isPlainObject$2(declared)) return declared;
7437
- const bag = isFlattenedDestination(declared) ? declared : declared["S3BucketDestination"];
7438
- if (!isPlainObject$2(bag)) return declared;
7439
- if (!bag["BucketArn"] && !bag["Bucket"]) return declared;
7440
- const out = {};
7441
- const bucketArn = bag["BucketArn"] ?? bag["Bucket"];
7442
- if (bucketArn !== void 0) out["BucketArn"] = bucketArn;
7443
- if (bag["BucketAccountId"] !== void 0) out["BucketAccountId"] = bag["BucketAccountId"];
7444
- out["Format"] = sentFormat ?? declaredOrDefault(bag, "Format", INVENTORY_DESTINATION_DEFAULT_FORMAT);
7445
- if (bag["Prefix"] !== void 0) out["Prefix"] = bag["Prefix"];
7396
+ if (!declared["BucketArn"]) return declared;
7397
+ const out = { BucketArn: declared["BucketArn"] };
7398
+ if (declared["BucketAccountId"] !== void 0) out["BucketAccountId"] = declared["BucketAccountId"];
7399
+ out["Format"] = sentFormat ?? declaredOrDefault(declared, "Format", INVENTORY_DESTINATION_DEFAULT_FORMAT);
7400
+ if (declared["Prefix"] !== void 0) out["Prefix"] = declared["Prefix"];
7446
7401
  return sameScalarRecord(out, declared) ? declared : out;
7447
7402
  }
7448
7403
  /**
@@ -7450,14 +7405,6 @@ function effectiveS3BucketDestination(declared, sentFormat) {
7450
7405
  * NEVER `??`, and that distinction is the whole guard against issue #1670's
7451
7406
  * finding 3.
7452
7407
  *
7453
- * The ONE licensed `??` in these folds is the ALIAS read
7454
- * `bag['BucketArn'] ?? bag['Bucket']`, and it is not an exception to this rule —
7455
- * it supplies no DEFAULT. It picks between two spellings of the same declared
7456
- * value, exactly as the applier's own read does, so a nullish `BucketArn`
7457
- * correctly falls through to the alias the wire would have used. When neither is
7458
- * declared the key is simply absent from the fold's output, which is what makes
7459
- * a bucket-less block identity-return rather than gain a phantom key.
7460
- *
7461
7408
  * The default belongs to a key the template OMITTED: there the provider sends
7462
7409
  * it, the readback reports it, and folding both sides is what makes them agree.
7463
7410
  * A key DECLARED with a malformed value is a different case entirely — the
@@ -7679,10 +7626,14 @@ function foldToleratedAliases(bag, aliases) {
7679
7626
  }
7680
7627
  /** The transition date member, held in a CONST so the fold writes it COMPUTED. */
7681
7628
  const TRANSITION_DATE_KEY = "TransitionDate";
7682
- /** The lifecycle `Transitions[]` aliases the applier accepts (issue #1748). */
7629
+ /**
7630
+ * The lifecycle `Transitions[]` aliases the applier accepts (issue #1748).
7631
+ *
7632
+ * `NoncurrentVersionTransitions[]` has none: its `TransitionInDays` is a
7633
+ * schema-required member, so a template spelling it `NoncurrentDays` is refused
7634
+ * pre-flight by `nested-required.ts` and the alias was dropped (issue #3585).
7635
+ */
7683
7636
  const TRANSITION_ALIASES = [["TransitionInDays", "Days"], ["TransitionDate", "Date"]];
7684
- /** The lifecycle `NoncurrentVersionTransitions[]` alias (issue #1748). */
7685
- const NONCURRENT_VERSION_TRANSITION_ALIASES = [["TransitionInDays", "NoncurrentDays"]];
7686
7637
  /** The refusal path for the notification EventBridge boolean (issue #1759). */
7687
7638
  const EVENTBRIDGE_CONFIG_PATH = "AWS::S3::Bucket NotificationConfiguration.EventBridgeConfiguration";
7688
7639
  /**
@@ -7753,27 +7704,25 @@ function dropEmptyNotificationFamilies(config) {
7753
7704
  }
7754
7705
  return out ?? config;
7755
7706
  }
7756
- /** The `NotificationConfiguration` ARN aliases, per family (issue #1748). */
7757
- const NOTIFICATION_ARN_ALIASES = [
7758
- ["TopicConfigurations", [["Topic", "TopicArn"]]],
7759
- ["QueueConfigurations", [["Queue", "QueueArn"]]],
7760
- ["LambdaConfigurations", [["Function", "LambdaFunctionArn"]]]
7761
- ];
7762
7707
  /**
7763
- * The `Event` / `Events` half of the same item (issue #1748).
7708
+ * The `Event` / `Events` spelling on a notification item (issue #1748).
7764
7709
  *
7765
- * The ARN alias is not the only never-emitted spelling on a notification item,
7766
- * and this one is the WIDER of the two: `TopicArn` is a cdkd-only tolerance
7767
- * almost no template uses, while `Event` is the member the CFn registry schema
7768
- * declares (`TopicConfiguration` is `{Event, Filter, Topic}` — there is no
7769
- * `Events`) and therefore the one EVERY template carries. The applier accepts
7770
- * both (`t['Event'] !== undefined ? [t['Event']] : t['Events']`).
7710
+ * `Event` is the member the CFn registry schema declares (`TopicConfiguration`
7711
+ * is `{Event, Filter, Topic}` — there is no `Events`) and therefore the one
7712
+ * EVERY template carries. The applier accepts both
7713
+ * (`t['Event'] !== undefined ? [t['Event']] : t['Events']`), because the
7714
+ * readback emits `Events` for a multi-event live configuration and
7715
+ * `drift --revert` sends a readback-shaped bag.
7771
7716
  *
7772
- * Unlike the ARN pair this is not a pure rename — the SDK member is a LIST — so
7773
- * it folds by ARITY: a single-element list is the CFn `Event`, and a longer one
7774
- * has no CFn spelling at all and is left as `Events`, which is what the readback
7775
- * emits for it. That asymmetry is why it is a separate step rather than another
7776
- * {@link foldToleratedAliases} entry.
7717
+ * This is not a pure rename — the SDK member is a LIST — so it folds by ARITY:
7718
+ * a single-element list is the CFn `Event`, and a longer one has no CFn
7719
+ * spelling at all and is left as `Events`, which is what the readback emits for
7720
+ * it.
7721
+ *
7722
+ * The destination ARN has no alias: `Topic` / `Queue` / `Function` are
7723
+ * schema-required members, so the SDK spellings (`TopicArn`, …) are refused
7724
+ * pre-flight by `nested-required.ts` and the applier no longer reads them
7725
+ * (issue #3585).
7777
7726
  *
7778
7727
  * `readNotification` was emitting `Events` unconditionally, so the record and
7779
7728
  * the readback disagreed on every notification-configured bucket; it now
@@ -7798,20 +7747,12 @@ function foldNotificationEvents(item) {
7798
7747
  * `readNotification` emits (issue #1748) — the never-emitted-KEY class of issue
7799
7748
  * #1686 reached through the SHAPE rather than through a value.
7800
7749
  *
7801
- * `applyNotificationConfiguration` accepts the SDK spelling of each destination
7802
- * ARN alongside the CFn one (`t['Topic'] ?? t['TopicArn']`, and the two
7803
- * siblings), while `readNotification` emits only `Topic` / `Queue` /
7804
- * `Function` — the spellings the live CFn registry schema declares
7805
- * (`TopicConfiguration` is `{Event, Filter, Topic}`, with no `TopicArn`
7806
- * member at all, so the SDK spellings are cdkd-only tolerances). A record
7807
- * written in the tolerated spelling therefore can never match the readback:
7808
- * `cdkd drift` re-reports it forever and `--revert` re-issues the same Put,
7809
- * with NO warning anywhere, because nothing is malformed and nothing is
7810
- * substituted.
7811
- *
7812
- * This NORMALIZES rather than retracting the tolerance, per #1686's third
7813
- * generalization: refusing the SDK spelling would break templates that deploy
7814
- * today, and buys nothing the normalization does not.
7750
+ * `applyNotificationConfiguration` accepts a single-element `Events` list
7751
+ * alongside the CFn scalar `Event` ({@link foldNotificationEvents}), while
7752
+ * `readNotification` emits `Event` for it. A record written in the list
7753
+ * spelling therefore can never match the readback: `cdkd drift` re-reports it
7754
+ * forever and `--revert` re-issues the same Put, with NO warning anywhere,
7755
+ * because nothing is malformed and nothing is substituted.
7815
7756
  *
7816
7757
  * The Put is a FULL REPLACE with no skip arm, so there is no
7817
7758
  * previous-value-retained case to distinguish — whenever it succeeds, this is
@@ -7824,7 +7765,7 @@ function foldNotificationEvents(item) {
7824
7765
  function effectiveNotificationConfiguration(config) {
7825
7766
  if (!isPlainObject$2(config)) return config;
7826
7767
  let out = config;
7827
- for (const [listKey, aliases] of NOTIFICATION_ARN_ALIASES) out = canonicalizeItemList(out, listKey, (item) => foldNotificationEvents(foldToleratedAliases(item, aliases)));
7768
+ for (const listKey of NOTIFICATION_LIST_KEYS) out = canonicalizeItemList(out, listKey, foldNotificationEvents);
7828
7769
  out = dropEmptyNotificationFamilies(out);
7829
7770
  return foldEventBridgeConfiguration(out);
7830
7771
  }
@@ -8265,18 +8206,13 @@ function foldLifecycleScope(rule, useFilterForm) {
8265
8206
  * `readLifecycle` emits (issue #1748) — the lifecycle half of the same class.
8266
8207
  *
8267
8208
  * `applyLifecycleConfiguration` accepts the SDK day/date spellings alongside the
8268
- * CFn ones on both transition families (`t['TransitionInDays'] ?? t['Days']`,
8269
- * `t['TransitionDate'] ?? t['Date']`, `nvt['TransitionInDays'] ??
8270
- * nvt['NoncurrentDays']`) while `readLifecycle` emits only `TransitionInDays` /
8271
- * `TransitionDate` — again the only spellings the registry schema declares
8272
- * (`Transition` is `{StorageClass, TransitionDate, TransitionInDays}`,
8273
- * `NoncurrentVersionTransition` is `{StorageClass, TransitionInDays,
8274
- * NewerNoncurrentVersions}`).
8275
- *
8276
- * The issue named the `Date` alias; the mechanical audit it asks for (match the
8277
- * `(a['X'] ?? a['Y'])` ALIAS form, not a plain bracket read) found all THREE in
8278
- * the same two item shapes, so fixing only the reported one would have left its
8279
- * siblings broken — the "diff the WHOLE blob, not the reported key" rule.
8209
+ * CFn ones on `Transitions` (`t['TransitionInDays'] ?? t['Days']`,
8210
+ * `t['TransitionDate'] ?? t['Date']`) while `readLifecycle` emits only
8211
+ * `TransitionInDays` / `TransitionDate` — again the only spellings the registry
8212
+ * schema declares (`Transition` is `{StorageClass, TransitionDate,
8213
+ * TransitionInDays}`). `NoncurrentVersionTransitions` has no alias to fold: its
8214
+ * `TransitionInDays` is schema-required, so the `NoncurrentDays` spelling is
8215
+ * refused pre-flight and the applier no longer reads it (issue #3585).
8280
8216
  *
8281
8217
  * Issues #1754 / #1755 finished the block, so the "still differs on those keys"
8282
8218
  * caveat this doc carried is gone: the legacy SINGULAR `Transition` /
@@ -8326,7 +8262,6 @@ function effectiveLifecycleConfiguration(config) {
8326
8262
  function effectiveLifecycleRule(rule, useFilterForm) {
8327
8263
  let out = foldLegacySingularTransitions(rule);
8328
8264
  out = canonicalizeItemList(out, "Transitions", (t) => foldTransitionDate(foldToleratedAliases(t, TRANSITION_ALIASES)));
8329
- out = canonicalizeItemList(out, "NoncurrentVersionTransitions", (nvt) => foldToleratedAliases(nvt, NONCURRENT_VERSION_TRANSITION_ALIASES));
8330
8265
  out = dropEmptyTransitionLists(out);
8331
8266
  out = foldLifecycleExpiration(out);
8332
8267
  out = foldNoncurrentVersionExpiration(out);
@@ -8393,8 +8328,8 @@ function canonicalizeItemList(properties, key, fold) {
8393
8328
  /**
8394
8329
  * Name a malformed value in a refusal message, the way `config-shape.ts`'s
8395
8330
  * private `describe` does for the string-reading guards. Kept local rather than
8396
- * exported from there because `resolveS3BucketDestination` is S3-specific
8397
- * branch selection, not a shared shape guard — the two only share the wording.
8331
+ * exported from there because `resolveS3BucketDestination` is an S3-specific
8332
+ * refusal, not a shared shape guard — the two only share the wording.
8398
8333
  */
8399
8334
  function describeValue$1(value, maskSecrets = (text) => text) {
8400
8335
  if (value === null) return "null";
@@ -8932,7 +8867,7 @@ var S3BucketProvider = class S3BucketProvider {
8932
8867
  };
8933
8868
  else if (coerceCfnNumber(legacyNveDays) !== void 0) sdkRule.NoncurrentVersionExpiration = { NoncurrentDays: coerceCfnNumber(legacyNveDays) };
8934
8869
  const toSdkNvt = (nvt) => ({
8935
- NoncurrentDays: nvt["TransitionInDays"] ?? nvt["NoncurrentDays"],
8870
+ NoncurrentDays: nvt["TransitionInDays"],
8936
8871
  StorageClass: nvt["StorageClass"],
8937
8872
  NewerNoncurrentVersions: nvt["NewerNoncurrentVersions"]
8938
8873
  });
@@ -9143,21 +9078,21 @@ var S3BucketProvider = class S3BucketProvider {
9143
9078
  const topics = notifConfig["TopicConfigurations"];
9144
9079
  if (topics && Array.isArray(topics) && topics.length > 0) cfg.TopicConfigurations = topics.map((t) => ({
9145
9080
  Id: t["Id"],
9146
- TopicArn: t["Topic"] ?? t["TopicArn"],
9081
+ TopicArn: t["Topic"],
9147
9082
  Events: t["Event"] !== void 0 ? [t["Event"]] : t["Events"],
9148
9083
  Filter: this.cfnNotifFilterToSdk(t["Filter"])
9149
9084
  }));
9150
9085
  const queues = notifConfig["QueueConfigurations"];
9151
9086
  if (queues && Array.isArray(queues) && queues.length > 0) cfg.QueueConfigurations = queues.map((q) => ({
9152
9087
  Id: q["Id"],
9153
- QueueArn: q["Queue"] ?? q["QueueArn"],
9088
+ QueueArn: q["Queue"],
9154
9089
  Events: q["Event"] !== void 0 ? [q["Event"]] : q["Events"],
9155
9090
  Filter: this.cfnNotifFilterToSdk(q["Filter"])
9156
9091
  }));
9157
9092
  const lambdas = notifConfig["LambdaConfigurations"];
9158
9093
  if (lambdas && Array.isArray(lambdas) && lambdas.length > 0) cfg.LambdaFunctionConfigurations = lambdas.map((l) => ({
9159
9094
  Id: l["Id"],
9160
- LambdaFunctionArn: l["Function"] ?? l["LambdaFunctionArn"],
9095
+ LambdaFunctionArn: l["Function"],
9161
9096
  Events: l["Event"] !== void 0 ? [l["Event"]] : l["Events"],
9162
9097
  Filter: this.cfnNotifFilterToSdk(l["Filter"])
9163
9098
  }));
@@ -9242,39 +9177,32 @@ var S3BucketProvider = class S3BucketProvider {
9242
9177
  };
9243
9178
  }
9244
9179
  /**
9245
- * Pick the `S3BucketDestination` bag out of an analytics / inventory
9246
- * `Destination` block, refusing a shape that would otherwise be dropped.
9247
- *
9248
- * Two shapes are legitimate and both must keep working: the CFn FLATTENED
9249
- * form (`Destination: { BucketArn, Format, ... }`, what the schema declares)
9250
- * and the SDK NESTED form (`Destination: { S3BucketDestination: { ... } }`,
9251
- * accepted because state records and hand-written templates carry it).
9252
- *
9253
- * Issue #1493 item 2: the branch was picked by probing member presence
9254
- * (`dest?.['BucketAccountId'] || dest?.['BucketArn'] || dest?.['Format']`),
9255
- * so a `Destination` that is a STRING / array / unresolved intrinsic indexed
9256
- * every probe to `undefined`, fell through to an equally-`undefined`
9257
- * `S3BucketDestination`, and the caller's `s3Dest ? … : undefined` omitted
9258
- * the whole block from the Put — a configuration silently deployed without
9259
- * the destination it declared. Unlike the sibling defaulting class this is a
9260
- * DROP, not a substituted default, so `readConfigString` does not cover it:
9261
- * it needs its own decision, and per issue #1513's precedent that decision is
9262
- * REFUSE on the template-borne create path, WARN on the replay-reachable
9263
- * update path (`onUnusable`), where the desired bag can be a historical cdkd
9264
- * state record with no template-side remedy.
9265
- *
9266
- * Also returns the CFn path of the bag it picked (issue #1493 item 3): the
9267
- * callers used to hardcode `…Destination.S3BucketDestination` in the
9268
- * `containerPath` they pass to `readConfigString`, so a refusal on the
9269
- * FLATTENED branch — where the bag IS `dest` itself — named a key the user's
9270
- * template does not contain.
9271
- *
9272
- * @returns the picked bag, or `undefined` when the block was ABSENT or was
9273
- * refused on a warn-only path. The caller distinguishes the two by testing
9274
- * its own `Destination` value — see the `continue` at each call site.
9180
+ * Validate an analytics / inventory `Destination` block, refusing a shape
9181
+ * that would otherwise be dropped.
9182
+ *
9183
+ * The block is the CFn form the schema declares (`Destination: { BucketArn,
9184
+ * Format, ... }`). The SDK NESTED form (`{ S3BucketDestination: { ... } }`)
9185
+ * and a `Bucket` alias for `BucketArn` are no longer read: `BucketArn` and
9186
+ * `Format` are schema-required, so a template using either is refused
9187
+ * pre-flight by `nested-required.ts` (issue #3602). What still reaches this
9188
+ * guard with such a shape (an unresolved intrinsic on the path, or a replayed
9189
+ * pre-#1707 state record) is refused here like any other bucket-less block.
9190
+ *
9191
+ * Issue #1493 item 2: a `Destination` that is a STRING / array / unresolved
9192
+ * intrinsic used to index every probe to `undefined`, and the caller's
9193
+ * `s3Dest ? … : undefined` omitted the whole block from the Put — a
9194
+ * configuration silently deployed without the destination it declared. Unlike
9195
+ * the sibling defaulting class this is a DROP, not a substituted default, so
9196
+ * `readConfigString` does not cover it: per issue #1513's precedent the
9197
+ * decision is REFUSE on the template-borne create path, WARN on the
9198
+ * replay-reachable update path (`onUnusable`), where the desired bag can be a
9199
+ * historical cdkd state record with no template-side remedy.
9200
+ *
9201
+ * @returns the block, or `undefined` when it was ABSENT or was refused on a
9202
+ * warn-only path. The caller distinguishes the two by testing its own
9203
+ * `Destination` value — see the `continue` at each call site.
9275
9204
  */
9276
9205
  resolveS3BucketDestination(dest, destinationPath, onUnusable, maskSecrets = (text) => text) {
9277
- const nestedPath = `${destinationPath}.S3BucketDestination`;
9278
9206
  const drop = (message) => {
9279
9207
  if (onUnusable) {
9280
9208
  onUnusable(`${message}. Leaving this configuration unchanged; the same value is REFUSED on a template-path create`);
@@ -9284,11 +9212,8 @@ var S3BucketProvider = class S3BucketProvider {
9284
9212
  };
9285
9213
  if (dest === void 0 || dest === null) return;
9286
9214
  if (!isPlainObject$2(dest)) return drop(`${destinationPath} must be an object (got ${describeValue$1(dest, maskSecrets)}) — check for an unresolved intrinsic or a mis-nested template value; the destination would otherwise be dropped from the request with no error`);
9287
- const bag = isFlattenedDestination(dest) ? dest : dest["S3BucketDestination"];
9288
- if (bag === void 0 || bag === null) return drop(`${destinationPath} carries neither a bucket (BucketArn / Bucket) nor a nested S3BucketDestination object (got ${describeValue$1(dest, maskSecrets)}) — the destination would otherwise be dropped from the request with no error`);
9289
- if (!isPlainObject$2(bag)) return drop(`${nestedPath} must be an object (got ${describeValue$1(bag, maskSecrets)}) — check for an unresolved intrinsic or a mis-nested template value; the destination would otherwise be dropped from the request with no error`);
9290
- if (!bag["BucketArn"] && !bag["Bucket"]) return drop(`${bag === dest ? destinationPath : nestedPath} has no destination bucket (BucketArn / Bucket) (got ${describeValue$1(bag, maskSecrets)}) — the request would be rejected by S3, or silently carry no destination`);
9291
- return bag;
9215
+ if (!dest["BucketArn"]) return drop(`${destinationPath} has no destination bucket (BucketArn) (got ${describeValue$1(dest, maskSecrets)}) — the request would be rejected by S3, or silently carry no destination`);
9216
+ return dest;
9292
9217
  }
9293
9218
  /**
9294
9219
  * Apply analytics configurations
@@ -9349,13 +9274,12 @@ var S3BucketProvider = class S3BucketProvider {
9349
9274
  skipped.push(index);
9350
9275
  continue;
9351
9276
  }
9352
- const destPath = s3BucketDestinationPath(rawDest, analyticsDestPath);
9353
9277
  analyticsConfig.StorageClassAnalysis = { DataExport: {
9354
9278
  OutputSchemaVersion: sentOutputSchemaVersion = this.readSubstitutedConfigString(dataExport, "OutputSchemaVersion", ANALYTICS_DEFAULT_OUTPUT_SCHEMA_VERSION, "AWS::S3::Bucket AnalyticsConfigurations[].StorageClassAnalysis.DataExport", { ...onUnusable ? { onUnusable } : {} }),
9355
9279
  Destination: s3Dest ? { S3BucketDestination: {
9356
- Bucket: s3Dest["BucketArn"] ?? s3Dest["Bucket"],
9280
+ Bucket: s3Dest["BucketArn"],
9357
9281
  BucketAccountId: s3Dest["BucketAccountId"],
9358
- Format: sentFormat = this.readSubstitutedConfigString(s3Dest, "Format", INVENTORY_DESTINATION_DEFAULT_FORMAT, destPath, { ...onUnusable ? { onUnusable } : {} }),
9282
+ Format: sentFormat = this.readSubstitutedConfigString(s3Dest, "Format", INVENTORY_DESTINATION_DEFAULT_FORMAT, analyticsDestPath, { ...onUnusable ? { onUnusable } : {} }),
9359
9283
  Prefix: s3Dest["Prefix"]
9360
9284
  } } : void 0
9361
9285
  } };
@@ -9479,7 +9403,6 @@ var S3BucketProvider = class S3BucketProvider {
9479
9403
  skipped.push(index);
9480
9404
  continue;
9481
9405
  }
9482
- const destPath = s3BucketDestinationPath(rawDest, inventoryDestPath);
9483
9406
  let sentFormat;
9484
9407
  const scheduleFrequencyRefusal = onUnusable ? configStringRefusal(config, "ScheduleFrequency", "Weekly", "AWS::S3::Bucket InventoryConfigurations[]") : void 0;
9485
9408
  if (scheduleFrequencyRefusal !== void 0 && config["Schedule"] == null) {
@@ -9500,9 +9423,9 @@ var S3BucketProvider = class S3BucketProvider {
9500
9423
  IncludedObjectVersions: readConfigString(config, "IncludedObjectVersions", INVENTORY_DEFAULT_INCLUDED_OBJECT_VERSIONS, "AWS::S3::Bucket InventoryConfigurations[]"),
9501
9424
  Schedule: { Frequency: frequency },
9502
9425
  Destination: { S3BucketDestination: s3Dest ? {
9503
- Bucket: s3Dest["BucketArn"] ?? s3Dest["Bucket"],
9426
+ Bucket: s3Dest["BucketArn"],
9504
9427
  AccountId: s3Dest["BucketAccountId"],
9505
- Format: sentFormat = this.readSubstitutedConfigString(s3Dest, "Format", INVENTORY_DESTINATION_DEFAULT_FORMAT, destPath, { ...onUnusable ? { onUnusable } : {} }),
9428
+ Format: sentFormat = this.readSubstitutedConfigString(s3Dest, "Format", INVENTORY_DESTINATION_DEFAULT_FORMAT, inventoryDestPath, { ...onUnusable ? { onUnusable } : {} }),
9506
9429
  Prefix: s3Dest["Prefix"]
9507
9430
  } : void 0 },
9508
9431
  OptionalFields: config["OptionalFields"],
@@ -89582,7 +89505,9 @@ function resolveAssetCodeDirectory(opts) {
89582
89505
  * `process.cwd()` survives only for a `StackInfo` carrying NEITHER field, where
89583
89506
  * base and bound coincide again.
89584
89507
  *
89585
- * Exported for `local-start-api.ts`'s copy of the caller, and for unit testing.
89508
+ * Exported for `local-start-api.ts`'s copy of the caller, for the Docker
89509
+ * context check the ECS emulator commands run over cdk-local's `StackInfo`
89510
+ * (which is why it takes only the two fields it reads), and for unit testing.
89586
89511
  */
89587
89512
  function assetPathDirs(stack) {
89588
89513
  const manifestDir = stack.assetManifestPath ? dirname(stack.assetManifestPath) : stack.assetOutdir ?? process.cwd();
@@ -91087,6 +91012,10 @@ async function runDetached(opts) {
91087
91012
  const logger = getLogger().child("docker");
91088
91013
  logger.debug(`${getDockerCmd()} ${redactDockerArgvValues(args).join(" ")}`);
91089
91014
  if (collisions.length > 0) logger.warn(`Env var(s) ${collisions.map((k) => JSON.stringify(k)).join(", ")} share a name with a variable the container client reads (docker, or the CDK_DOCKER binary) or have a malformed name (empty, or containing '=' / NUL), and were NOT passed to the container at all (a colliding name would hijack that client; a malformed name cannot form a valid environment variable). Rename the env var if the container needs it.`);
91015
+ const forwardedKeys = Object.keys(passthroughEnv);
91016
+ const refusal = finchSecretArgvRefusal(forwardedKeys.filter((k) => opts.sensitiveEnvKeys?.has(k)), `Container for image ${displayIdent(opts.image)}`);
91017
+ if (refusal !== void 0) throw new DockerRunnerError(refusal);
91018
+ warnFinchArgvExposure(forwardedKeys);
91090
91019
  try {
91091
91020
  const { stdout } = await execFileAsync$3(getDockerCmd(), args, {
91092
91021
  maxBuffer: 10485760,
@@ -91218,13 +91147,25 @@ const SENSITIVE_ENV_KEYS = /* @__PURE__ */ new Set([
91218
91147
  * wrapper translates cdk-local's thrown error back to cdkd's class at the shim
91219
91148
  * boundary, so a local-invoke build failure still surfaces with cdkd's exit code
91220
91149
  * / branding. `architectureToPlatform` is a pure helper (re-exported directly).
91150
+ *
91151
+ * It is also where the build context is CONTAINED: cdk-local joins
91152
+ * `source.directory` onto `cdkOutDir` with no check, so the shim refuses an
91153
+ * escaping value before delegating, against a REQUIRED `assetOutdir` bound
91154
+ * (issue [#3503](https://github.com/go-to-k/cdkd/issues/3503)).
91221
91155
  * See cdk-local's `src/local/docker-image-builder.ts`.
91222
91156
  */
91223
- async function buildContainerImage$1(...args) {
91224
- const executable = args[0]?.source?.executable;
91157
+ async function buildContainerImage$1(asset, cdkOutDir, options) {
91158
+ const executable = asset?.source?.executable;
91225
91159
  if (executable && executable.length > 0) warnManifestExecutable(executable);
91160
+ const { assetOutdir, ...implOptions } = options;
91161
+ assertCdkLocalDockerContextContained({
91162
+ manifestDir: cdkOutDir,
91163
+ source: asset.source,
91164
+ assetOutdir,
91165
+ wrapError: (message) => new LocalInvokeBuildError$1(`Refusing to build the container image: ${message}`)
91166
+ });
91226
91167
  try {
91227
- return await buildContainerImage(...args);
91168
+ return await buildContainerImage(asset, cdkOutDir, implOptions);
91228
91169
  } catch (e) {
91229
91170
  if (e instanceof LocalInvokeBuildError) throw new LocalInvokeBuildError$1(e.message);
91230
91171
  throw e;
@@ -93456,7 +93397,10 @@ async function buildContainerSpec(args) {
93456
93397
  async function resolveContainerImageForStartApi(lambda, skipPull) {
93457
93398
  const logger = getLogger();
93458
93399
  const localBuild = await resolveLocalBuildPlan$1(lambda);
93459
- if (localBuild) return { imageRef: await buildContainerImage$1(localBuild.asset, localBuild.cdkOutDir, { architecture: lambda.architecture }) };
93400
+ if (localBuild) return { imageRef: await buildContainerImage$1(localBuild.asset, localBuild.cdkOutDir, {
93401
+ assetOutdir: localBuild.assetOutdir,
93402
+ architecture: lambda.architecture
93403
+ }) };
93460
93404
  if (!parseEcrUri(lambda.imageUri)) throw new Error(`Container Lambda '${lambda.logicalId}' has no matching asset in cdk.out, and Code.ImageUri '${lambda.imageUri}' is not an ECR URI cdkd can authenticate against. Re-synthesize the CDK app (so cdk.out includes the build context) or deploy the image to ECR first.`);
93461
93405
  logger.info(`No matching cdk.out asset for ${lambda.imageUri}; falling back to ECR pull (uses your own credentials — this command has no --ecr-role-arn, so a cross-account image needs cross-account ECR permissions)...`);
93462
93406
  return { imageRef: await pullEcrImage(lambda.imageUri, { skipPull }) };
@@ -93470,16 +93414,16 @@ async function resolveContainerImageForStartApi(lambda, skipPull) {
93470
93414
  * the two commands evolve their asset-lookup heuristics independently.
93471
93415
  */
93472
93416
  async function resolveLocalBuildPlan$1(lambda) {
93473
- const manifestPath = lambda.stack.assetManifestPath;
93474
- if (!manifestPath) return void 0;
93475
- const cdkOutDir = path.dirname(manifestPath);
93417
+ if (!lambda.stack.assetManifestPath) return void 0;
93418
+ const { manifestDir: cdkOutDir, assetOutdir } = assetPathDirs(lambda.stack);
93476
93419
  const manifest = await new AssetManifestLoader().loadManifest(cdkOutDir, lambda.stack.stackName);
93477
93420
  if (!manifest) return void 0;
93478
93421
  const entry = getDockerImageBySourceHash(manifest, lambda.imageUri);
93479
93422
  if (!entry) return void 0;
93480
93423
  return {
93481
93424
  asset: entry.asset,
93482
- cdkOutDir
93425
+ cdkOutDir,
93426
+ assetOutdir
93483
93427
  };
93484
93428
  }
93485
93429
  /**
@@ -94341,6 +94285,7 @@ async function createNetworkAndSidecar(args) {
94341
94285
  sidecarArgs.push(...sidecarFlags);
94342
94286
  if (sidecarCollisions.length > 0) logger.warn(`Sidecar env var(s) ${sidecarCollisions.map((k) => JSON.stringify(k)).join(", ")} share a name with a variable the container client reads (docker, or the CDK_DOCKER binary) and were NOT passed to the sidecar at all (they would hijack that client).`);
94343
94287
  sidecarArgs.push(METADATA_ENDPOINT_IMAGE);
94288
+ warnFinchArgvExposure(Object.keys(sidecarSensitiveEnv));
94344
94289
  logger.info(`Starting ECS local-container-endpoints sidecar at ${sidecarIp}...`);
94345
94290
  try {
94346
94291
  const { stdout } = await execFileAsync$2(getDockerCmd(), sidecarArgs, {
@@ -94655,6 +94600,12 @@ async function runEcsTask(task, options, state) {
94655
94600
  if (task.containers.length === 0) throw new EcsTaskRunnerError(`Task '${task.taskDefinitionLogicalId}' has no containers — nothing to run.`);
94656
94601
  for (const w of task.warnings) logger.warn(w);
94657
94602
  const startOrder = topoSort(buildDependencyGraph(task.containers), task.containers);
94603
+ const finchRefusals = [];
94604
+ for (const c of task.containers) {
94605
+ const refusal = finchSecretArgvRefusal(c.secrets.map((s) => s.name).filter((n) => !isMalformedEnvKey(n) && !isDockerClientEnvKey(n)), `Container ${displayIdent(c.name)}`);
94606
+ if (refusal !== void 0) finchRefusals.push(refusal);
94607
+ }
94608
+ if (finchRefusals.length > 0) throw new EcsTaskRunnerError(finchRefusals.join("\n"));
94658
94609
  const imagePlan = options.imagePlanByContainer ?? /* @__PURE__ */ new Map();
94659
94610
  if (!options.imagePlanByContainer) await prepareImages(task, imagePlan, options);
94660
94611
  const allSecrets = [];
@@ -94714,8 +94665,9 @@ async function runEcsTask(task, options, state) {
94714
94665
  const args = dockerCmds.get(container.name);
94715
94666
  logger.info(`Starting container '${container.name}' (image=${imagePlan.get(container.name)})`);
94716
94667
  let id;
94668
+ const sensitiveEnv = dockerEnvs.get(container.name);
94669
+ warnFinchArgvExposure(Object.keys(sensitiveEnv));
94717
94670
  try {
94718
- const sensitiveEnv = dockerEnvs.get(container.name);
94719
94671
  const { stdout } = await execFileAsync$1(getDockerCmd(), args, {
94720
94672
  maxBuffer: 10485760,
94721
94673
  env: dockerSpawnEnvWithSensitive(sensitiveEnv)
@@ -95604,6 +95556,130 @@ function createLocalRunTaskCommand() {
95604
95556
  return cmd;
95605
95557
  }
95606
95558
 
95559
+ //#endregion
95560
+ //#region src/cli/commands/emulator-docker-context.ts
95561
+ /**
95562
+ * Decorate an `EmulatorStrategy` so every Docker image asset the bundled
95563
+ * engine could build for this run is containment-checked BEFORE it builds one
95564
+ * (issue [#3503](https://github.com/go-to-k/cdkd/issues/3503)).
95565
+ *
95566
+ * `cdkd local start-service` / `start-alb` hand the whole run to cdk-local's
95567
+ * `runEcsServiceEmulator`, which reads each stack's asset manifest itself and
95568
+ * joins `source.directory` onto the manifest directory raw — for an ECS
95569
+ * container image and for an ALB Lambda target's container image alike. No
95570
+ * argument reaches that join, so cdkd judges the manifests here instead.
95571
+ *
95572
+ * `resolveBoots` is the seam because the engine calls it after every synth —
95573
+ * at boot, and again on every `--watch` reload — and before any image is
95574
+ * built on either path. A refusal at boot fails the command; on a reload the
95575
+ * engine logs it and keeps the previous replicas serving, which is the
95576
+ * fail-closed outcome.
95577
+ *
95578
+ * Every stack with a manifest is checked, not only the booted targets' stacks:
95579
+ * which stack a target resolves to is decided inside the engine, and the ALB
95580
+ * front door builds Lambda images from stacks no ECS boot names. An escaping
95581
+ * `source.directory` is never something a real `cdk synth` writes, so
95582
+ * refusing one anywhere in the assembly costs a legitimate run nothing, and
95583
+ * `cdkd deploy` refuses the same assembly.
95584
+ */
95585
+ function containEmulatorDockerContexts(strategy) {
95586
+ return {
95587
+ ...strategy,
95588
+ resolveBoots: (stacks, chosenTargets) => {
95589
+ assertEmulatorDockerContextsContained(stacks);
95590
+ return strategy.resolveBoots(stacks, chosenTargets);
95591
+ }
95592
+ };
95593
+ }
95594
+ /**
95595
+ * The check itself, over the manifests the engine will read. Exported for
95596
+ * unit testing.
95597
+ *
95598
+ * It reads the SAME file the engine does — `<manifest dir>/<stackName>.assets.json`,
95599
+ * not `assetManifestPath` verbatim — and refuses a `stackName` that would
95600
+ * carry that filename out of the manifest directory, as cdkd's own
95601
+ * `AssetManifestLoader.loadManifest` does.
95602
+ *
95603
+ * A manifest that is absent, unreadable or not JSON is skipped: the engine
95604
+ * reads it again and reports that failure itself, before building anything.
95605
+ */
95606
+ function assertEmulatorDockerContextsContained(stacks) {
95607
+ for (const stack of stacks) {
95608
+ if (!stack.assetManifestPath) continue;
95609
+ const dirs = assetPathDirs(stack);
95610
+ const { manifestDir } = dirs;
95611
+ const assetOutdir = stack.assetOutdir === void 0 || stack.assetOutdir === "" ? dirs.assetOutdir : engineAssemblyRoot(stack.assetOutdir);
95612
+ const manifestFile = resolveAssemblyPath(manifestDir, `${stack.stackName}.assets.json`);
95613
+ if (!manifestFile.contained) throw new LocalInvokeBuildError$1(`Refusing to build container images: the asset manifest for stack '${displaySafe(stack.stackName)}' ${renderAssemblyPathEscape(manifestFile, manifestDir)}`);
95614
+ const dockerImages = readDockerImages(manifestFile.path);
95615
+ for (const [assetId, asset] of Object.entries(dockerImages)) {
95616
+ const source = asset?.source;
95617
+ if (source === null || typeof source !== "object") continue;
95618
+ const { directory } = source;
95619
+ if (typeof directory !== "string") continue;
95620
+ assertCdkLocalDockerContextContained({
95621
+ manifestDir,
95622
+ source,
95623
+ assetOutdir,
95624
+ wrapError: (message) => new LocalInvokeBuildError$1(`Refusing to build container image asset '${displaySafe(assetId)}' of stack '${displaySafe(stack.stackName)}': ${message}`)
95625
+ });
95626
+ }
95627
+ }
95628
+ }
95629
+ /**
95630
+ * The containment bound the ENGINE itself uses for a stack it synthesized: its
95631
+ * `assetOutdir`, climbed to the parent assembly when `--app` names a
95632
+ * `cdk.Stage` sub-assembly. cdk-local enumerates no Stage stacks from an app
95633
+ * root, so `--app cdk.out/assembly-<Stage>` is the only way these commands run
95634
+ * a Stage, and its assets are staged one level up as `../asset.<hash>`.
95635
+ *
95636
+ * A copy of cdk-local's `assemblyRootOf` (not exported by the package): climb
95637
+ * only while the directory is named `assembly-*` AND its parent's
95638
+ * `manifest.json` declares it as a `cdk:cloud-assembly` artifact, and WARN
95639
+ * whenever a climb happens, since the predicate is read from the tree being
95640
+ * judged. Replace with the upstream export once one exists (go-to-k/cdkd#3597).
95641
+ */
95642
+ function engineAssemblyRoot(outdir) {
95643
+ let dir = resolve(outdir);
95644
+ let climbed = false;
95645
+ for (;;) {
95646
+ if (!basename(dir).startsWith("assembly-")) break;
95647
+ const parent = dirname(dir);
95648
+ if (parent === dir || !parentDeclaresNestedAssembly(parent, basename(dir))) break;
95649
+ dir = parent;
95650
+ climbed = true;
95651
+ }
95652
+ if (!climbed) return outdir;
95653
+ if (!warnedDerivedRoots.has(dir)) {
95654
+ warnedDerivedRoots.add(dir);
95655
+ getLogger().warn(`'${displaySafe(outdir)}' is a cdk.Stage sub-assembly, so cdkd is treating its parent '${displaySafe(dir)}' as the assembly root when it checks Docker build contexts — that is where cdk synth stages a Stage's assets. Everything under that parent is now inside the containment bound, including siblings of the directory you named.`);
95656
+ }
95657
+ return dir;
95658
+ }
95659
+ const warnedDerivedRoots = /* @__PURE__ */ new Set();
95660
+ function parentDeclaresNestedAssembly(parent, child) {
95661
+ try {
95662
+ const artifacts = JSON.parse(readFileSync(join(parent, "manifest.json"), "utf-8")).artifacts;
95663
+ if (artifacts === null || typeof artifacts !== "object") return false;
95664
+ return Object.values(artifacts).some((a) => {
95665
+ const art = a;
95666
+ return art?.type === "cdk:cloud-assembly" && art.properties?.directoryName === child;
95667
+ });
95668
+ } catch {
95669
+ return false;
95670
+ }
95671
+ }
95672
+ function readDockerImages(manifestPath) {
95673
+ let parsed;
95674
+ try {
95675
+ parsed = JSON.parse(readFileSync(manifestPath, "utf-8"));
95676
+ } catch {
95677
+ return {};
95678
+ }
95679
+ const dockerImages = parsed?.dockerImages;
95680
+ return dockerImages !== null && typeof dockerImages === "object" ? dockerImages : {};
95681
+ }
95682
+
95607
95683
  //#endregion
95608
95684
  //#region src/cli/commands/local-start-service.ts
95609
95685
  /**
@@ -95631,6 +95707,17 @@ function serviceStrategy() {
95631
95707
  };
95632
95708
  }
95633
95709
  /**
95710
+ * The `EmulatorStrategy` `cdkd local start-service` runs with:
95711
+ * {@link serviceStrategy}, decorated by `containEmulatorDockerContexts` so the
95712
+ * engine's own Docker builds are containment-checked (issue
95713
+ * [#3503](https://github.com/go-to-k/cdkd/issues/3503)). A NAMED seam for the
95714
+ * same reason `buildAlbEmulatorStrategy` is one: inline in the action, the
95715
+ * decorator was deletable at its only call site.
95716
+ */
95717
+ function buildServiceEmulatorStrategy() {
95718
+ return containEmulatorDockerContexts(serviceStrategy());
95719
+ }
95720
+ /**
95634
95721
  * `cdkl start-service <Stack/Service>...` — run one or more `AWS::ECS::Service`
95635
95722
  * resources locally as a long-running emulator. Spins up DesiredCount task
95636
95723
  * replicas per service (clamped by --max-tasks) using the same per-task
@@ -95643,7 +95730,7 @@ function serviceStrategy() {
95643
95730
  */
95644
95731
  function createLocalStartServiceCommand() {
95645
95732
  const cmd = new Command("start-service").description("Run one or more AWS::ECS::Service resources locally as a long-running emulator. Spins up DesiredCount task replicas per service (clamped by --max-tasks) using the same per-task docker network + metadata sidecar pattern as `cdkd local run-task`, then keeps each replica running and restarts it on exit per --restart-policy. ^C tears every replica + sidecar + network down. Each <target> accepts a CDK display path (MyStack/MyService) or stack-qualified logical ID (MyStack:MyServiceXYZ); single-stack apps may omit the stack prefix. When two or more <target>s are supplied, every service is booted into a shared Cloud Map / Service Connect registry so peer services discover each other via docker --add-host overlay (Issue #460). Omit <targets> in an interactive terminal to multi-select the ECS services from a list.").argument("[targets...]", "One or more CDK display paths or stack-qualified logical IDs of the AWS::ECS::Service resources to run (omit to multi-select interactively in a TTY)").addOption(new Option("--from-state", "Read cdkd's S3 state for the target stack and substitute Ref / Fn::GetAtt / Fn::Sub / Fn::ImportValue / Fn::GetStackOutput intrinsics in container images, environment variables, secrets, role ARNs, and volumes. Mutually exclusive with --from-cfn-stack.").default(false)).addOption(new Option("--state-bucket <bucket>", "S3 bucket for --from-state. Falls back to CDKD_STATE_BUCKET env or cdk.json context.cdkd.stateBucket.")).addOption(new Option("--state-prefix <prefix>", "S3 key prefix for --from-state state files.").default("cdkd")).action(withErrorHandling(async (targets, options) => {
95646
- await runEcsServiceEmulator(targets, options, serviceStrategy(), cdkdExtraStateProviders);
95733
+ await runEcsServiceEmulator(targets, options, buildServiceEmulatorStrategy(), cdkdExtraStateProviders);
95647
95734
  }));
95648
95735
  addStartServiceSpecificOptions(cmd);
95649
95736
  return adoptDeprecatedRegionFlag(addCommonEcsServiceOptions(cmd));
@@ -96539,6 +96626,7 @@ async function resolveAgentCoreImage(resolved, options, assemblyDir, loaded) {
96539
96626
  if (manifest) {
96540
96627
  const entry = getDockerImageBySourceHash(manifest, containerUri);
96541
96628
  if (entry) return buildContainerImage$1(entry.asset, cdkOutDir, {
96629
+ assetOutdir: assemblyDir,
96542
96630
  architecture,
96543
96631
  noBuild: options.build === false
96544
96632
  });
@@ -97331,7 +97419,8 @@ function warnUnresolvedLambdaTargetEnv(strategy, options) {
97331
97419
  }
97332
97420
  /**
97333
97421
  * The `EmulatorStrategy` `cdkd local start-alb` runs with: cdk-local's ALB
97334
- * strategy, decorated by {@link warnUnresolvedLambdaTargetEnv}.
97422
+ * strategy, decorated by {@link warnUnresolvedLambdaTargetEnv} and then by
97423
+ * `containEmulatorDockerContexts` (issue go-to-k/cdkd#3503).
97335
97424
  *
97336
97425
  * Extracted from the command's action for ONE reason, and it is the finding
97337
97426
  * that produced it: with the composition written inline in the `.action(...)`
@@ -97351,7 +97440,7 @@ function warnUnresolvedLambdaTargetEnv(strategy, options) {
97351
97440
  * can satisfy reads as coverage while providing none.
97352
97441
  */
97353
97442
  function buildAlbEmulatorStrategy(options) {
97354
- return warnUnresolvedLambdaTargetEnv(albStrategy(options), options);
97443
+ return containEmulatorDockerContexts(warnUnresolvedLambdaTargetEnv(albStrategy(options), options));
97355
97444
  }
97356
97445
  /**
97357
97446
  * `cdkl start-alb <Stack/Alb>` — Issue #86 v1. Names an
@@ -97909,6 +97998,7 @@ async function resolveContainerImagePlan(lambda, options) {
97909
97998
  const localBuild = await resolveLocalBuildPlan(lambda);
97910
97999
  let imageRef;
97911
98000
  if (localBuild) imageRef = await buildContainerImage$1(localBuild.asset, localBuild.cdkOutDir, {
98001
+ assetOutdir: localBuild.assetOutdir,
97912
98002
  architecture: lambda.architecture,
97913
98003
  noBuild: options.build === false
97914
98004
  });
@@ -97940,16 +98030,16 @@ async function resolveContainerImagePlan(lambda, options) {
97940
98030
  * apply either) — the caller falls back to the ECR-pull path.
97941
98031
  */
97942
98032
  async function resolveLocalBuildPlan(lambda) {
97943
- const manifestPath = lambda.stack.assetManifestPath;
97944
- if (!manifestPath) return void 0;
97945
- const cdkOutDir = dirname(manifestPath);
98033
+ if (!lambda.stack.assetManifestPath) return void 0;
98034
+ const { manifestDir: cdkOutDir, assetOutdir } = assetPathDirs(lambda.stack);
97946
98035
  const manifest = await new AssetManifestLoader().loadManifest(cdkOutDir, lambda.stack.stackName);
97947
98036
  if (!manifest) return void 0;
97948
98037
  const entry = getDockerImageBySourceHash(manifest, lambda.imageUri);
97949
98038
  if (!entry) return void 0;
97950
98039
  return {
97951
98040
  asset: entry.asset,
97952
- cdkOutDir
98041
+ cdkOutDir,
98042
+ assetOutdir
97953
98043
  };
97954
98044
  }
97955
98045
  /**
@@ -98488,4 +98578,4 @@ function buildProgram() {
98488
98578
 
98489
98579
  //#endregion
98490
98580
  export { buildProgram };
98491
- //# sourceMappingURL=program-CY92mXcX.js.map
98581
+ //# sourceMappingURL=program-Buh8Yn40.js.map