@go-to-k/cdkd 0.290.31 → 0.290.33

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 secretBearing, $n as recordMaskOnlyValue, $r as AssetManifestLoader, $t as s3BucketArn, A as extractDeploymentEventError, Ai as getAwsClients, An as refuseMalformedState, Ar as BOOTSTRAP_MARKER_PREFIX, At as isImpossibleEmptyStoredAttribute, B as toCfnInteger, Bi as IntrinsicResolutionRefusalError, Bn as STATE_SOURCED_BASELINE_RULES, Br as buildDockerImage, Bt as coerceCfnBoolean, C as buildFinalSnapshotIdentifier, Ci as canonicalizeRegion, Cn as producerRecordKey, Cr as stringifyValue, Ct as isTerminationProtectionPropagationError, D as refusesFinalSnapshot, Dn as refuseMalformedOutputsForDestroy, Dr as loadPublishableAssetManifest, Dt as cfnRefValueFromPhysicalId, E as isFinalSnapshotError, Ei as processStackMessages, En as refuseMalformedOutputs, Er as createAssetRedirectResolver, Et as carriesFetchableDynamicReference, F as isStatefulRecreateTargetSync, Fn as findSilentDropProperties, Fr as parseBootstrapMarker, Ft as isSettledInstanceState, G as gray, Gi as NestedStackChildDirectDestroyError, Gn as createSecretMasker, Gr as formatDockerLoginError, Gt as readConfigString, H as formatResourceLine, Hi as LocalStartServiceError, Hn as STATE_SOURCED_READBACK_RULES, Hr as describeDockerExecFailure, Ht as configBooleanRefusal, I as renderStatefulReason, Ii as CrossAccountSecretRefusalError, In as describeTypeWithThrottleRetry, Ir as readBootstrapMarkerBody, It as WAFv2WebACLProvider, J as yellow, Ji as ResourceTimeoutError, Jn as identityKeyFor, Jr as redactDockerArgvValues, Jt as requireConfigObject, K as green, Ki as PartialFailureError, Kn as dynamicReferenceTokens, Kr as getDockerCmd, Kt as replayWarn, L as WARM_THROUGHPUT_MEMBERS, Ln as withRetry, Lr as validateAssetBucketName, Lt as normalizeAwsTagsToCfn, M as planOrphanAdoption, Mi as setAwsClients, Mn as repairMalformedResourcePropertiesForReadOnly, Mr as ensureAssetStorage, Mt as isUnboundTemplateParameter, N as MULTI_REGION_RECREATE_BLOCKED_TYPES, Nn as repairMalformedResourcesForReadOnly, Nr as getBootstrapMarkerKey, Nt as parameterTypeMayLoseSecretIdentity, O as unsupportedFinalSnapshotError, Oi as resolveBucketRegion, On as refuseMalformedResourcePropertiesForOrphan, Or as rewriteTemplateAssetReferences, Ot as coerceParameterTypedValue, P as isStatefulRecreateTargetForReplace, Pi as CdkdError, Pn as findActionableSilentDrops, Pr as isCrossRegionRedirect, Pt as refStateLookupFromResource, Q as isExportAliasCollision, Qn as maskSecretsInText, Qr as stripControlChars, Qt as withSharedDrainBudget, R as coerceWarmThroughput$1, Ri as DeployCancelledError, Rn as DagBuilder, Rr as validateContainerRepoName, Rt as resolveExplicitPhysicalId, S as PRE_DELETE_SNAPSHOT_TYPES, Si as PARTITION_TABLE, Sn as malformedStateRefusalMessage, Sr as AssetPublisher, St as disableInstanceApiTermination, T as createPreDeleteFinalSnapshot, Ti as AssemblyReader, Tn as refuseMalformedNestedChildOutputs, Tr as buildAssetRedirectMap, Tt as carriesDynamicReference, U as bold, Un as TEMPLATE_SOURCED_RULES, Ur as describeDockerFailure, Ut as configIntegerRefusal, V as toFiniteNumber, Vi as LocalInvokeBuildError$1, Vn as STATE_SOURCED_CROSS_GENERATION_RULES, Vr as describeDockerCapturedOutput, Vt as coerceCfnInteger, W as cyan, Wi as MalformedProducerRecordRefusalError, Wn as carriesSecretMask, Wr as dockerSpawnEnvWithSensitive, Wt as configStringRefusal, X as collectPublishedOutputNames, Xi as StackHasActiveImportsError, Xn as markSameGenerationBag, Xr as runDockerStreaming, Xt as classifyReplaySecretRegion, Y as collectDeclaredOutputNames, Yi as ResourceUpdateNotSupportedError, Yn as isSingleDynamicReferenceToken, Yr as runDockerForeground, Yt as requireConfigString, Z as exportAliasCollisionScrubWarning, Zi as StackTerminationProtectionError, Zn as maskSecretsInError, Zr as escapeRegExp, Zt as producerRegionsFromState, _ as isSecretBearingReferenceString, _i as findLargeInlineResources, _n as malformedOutputsRefusalMessage, _r as importableOutputs, _t as isWaitAbandonedError, a as DeploymentEventsStore, aa as isRetryableTransientError, ai as resolveApp, an as AWS_CREDENTIAL_ENV_KEYS, ar as rebuildClientForBucketRegion, at as clearOnUpdateRemoval, b as bindingSkippedOutputs, bi as decodeListingKey, bn as malformedResourcePropertiesWarning, br as orphansCarriedFrom, bt as deleteIndeterminateGuards, c as replayFailedOperations, ca as markNonRetryable, ci as resolveSkipPrefix, cn as envCredentialsAreAssumedRole, cr as buildLockContentionMessage, ct as createMaskedRetryLogger, d as updatePartialReason, da as describeAwsFailure, di as resolveUseCdkBootstrapAssets, dn as STATE_RESOURCES_MALFORMED, dr as shellQuote, dt as beginCommandInterruptScope, ei as getDockerImageBySourceHash, en as s3BucketDomainName, er as recoverMaskedOutput, et as secretBearingStateKeyWarning, f as withResourceDeadline, fa as safeStringify, fi as stateBucketExistenceConfirmed, fn as hasReadableOutputs, fr as CUSTOM_RESOURCE_RESPONSE_PREFIX, ft as endCommandInterruptScope, g as bagHoldsSecretExpression, gi as MIGRATE_TMP_PREFIX, gn as malformedLocalOutputsWarning, gr as importableOutputKeys, gt as CloudControlProvider, h as computeImplicitDeleteEdges, hi as CFN_TEMPLATE_URL_LIMIT, hn as malformedExportSourceWarning, hr as hasReadableExportSet, ht as startInterruptWatch, i as DeploymentEventsReader, ia as isMarkedNonRetryable, ii as getLegacyStateBucketName, in as applyRoleArnIfSet, ir as S3StateBackend, it as collectInlinePolicyNamesManagedBySiblings, j as makeSiblingClaimReader, ji as resetAwsClients, jn as repairMalformedOutputsForReadOnly, jr as assertAssetBucketRegion, jt as isNamelessDynamicReferenceError, k as makeCanonicalizePropertiesFn, ki as AwsClients, kn as refuseMalformedResourcesForDestroy, kr as AssetModeResolver, kt as getAccountInfo, l as replayRollback, la as markRedactedCause, li as resolveStateBucketWithDefault, ln as DiffCalculator, lr as forceQuitRecoveryClause, lt as maskDeep, m as IMPLICIT_DELETE_DEPENDENCIES, mi as CFN_TEMPLATE_BODY_LIMIT, mn as malformedExportNamesWarning, mr as exportNamesCarriedFrom, mt as isInterruptedWaitError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as normalizeAwsError, ni as synthesisStatusMessage, nn as s3BucketRegionalDomainName, nr as scrubResourceRecord, nt as getCurrentResourceSecrets, o as planFailedOps, oa as isThrottlingError, oi as resolveAutoAssetStorage, on as applyCallerIdentityCredentials, or as UNREPRODUCIBLE_LOCK_CLAUSE, ot as ProviderRegistry, p as maskingRetryLogger, pi as warnDeprecatedNoPrefixCliFlag, pn as hasReadableResources, pr as DEFAULT_STATE_PREFIX, pt as interruptWatchListenerCount, q as red, qi as ProvisioningError, qn as errorCauseChain, qr as partitionSensitiveEnv, qt as requireConfigArray, r as DeployEngine, ra as withErrorHandling, ri as getDefaultStateBucketName, rn as s3BucketWebsiteUrl, rr as LockManager, rt as IAMRoleProvider, s as planRollback, sa as isTransientServerError, si as resolveCaptureObservedState, sn as callerEnvCredentials, sr as buildForceUnlockCommand, st as wouldReturnToSdkProvider, t as DEFAULT_RESOURCE_TIMEOUT_MS, ti as Synthesizer, tn as s3BucketDualStackDomainName, tr as redactSecretsForState, tt as secretSafeKeyDisplay, u as updatePartialMessage, ua as retryClassificationText, ui as resolveStateBucketWithDefaultAndSource, un as INTRINSIC_KEYS, ur as formatLockExpiry, ut as maskerOrIdentity, v as keptWholeReasonText, vi as uploadCfnTemplate, vn as malformedOutputsWarning, vr as isReadableBag, vt as slowCcOperationTimeoutMs, w as ccRoutedFinalSnapshotError, wi as derivePartitionAndUrlSuffix, wn as refuseDivergentRecordRegionForDestroy, wr as WorkGraph, wt as IntrinsicFunctionResolver, x as ATOMIC_FINAL_SNAPSHOT_TYPES, xi as expectedOwnerParam, xn as malformedResourcesWarning, xr as shouldRetainResource, xt as deleteSkipReason, y as mergeNoChangeOutputs, yi as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, yn as malformedRenderedContainersWarning, yr as orphansAfterRollback, yt as UNSPECIFIED_SKIP_REASON, z as isWarmThroughputDecrease, zi as DynamicReferenceRegionAmbiguousError, zn as TemplateParser, zr as buildDenyExternalAccessPolicy, zt as assertRegionMatch } from "./deploy-engine-21iNqwR3.js";
2
- import { C as displayAwsMessage, E as truncateCodePoints, 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-BjWM-UVj.js";
1
+ import { $ as secretBearing, $n as recordMaskOnlyValue, $r as AssetManifestLoader, $t as s3BucketArn, A as extractDeploymentEventError, Ai as getAwsClients, An as refuseMalformedState, Ar as BOOTSTRAP_MARKER_PREFIX, At as isImpossibleEmptyStoredAttribute, B as toCfnInteger, Bi as IntrinsicResolutionRefusalError, Bn as STATE_SOURCED_BASELINE_RULES, Br as buildDockerImage, Bt as coerceCfnBoolean, C as buildFinalSnapshotIdentifier, Ci as canonicalizeRegion, Cn as producerRecordKey, Cr as stringifyValue, Ct as isTerminationProtectionPropagationError, D as refusesFinalSnapshot, Dn as refuseMalformedOutputsForDestroy, Dr as loadPublishableAssetManifest, Dt as cfnRefValueFromPhysicalId, E as isFinalSnapshotError, Ei as processStackMessages, En as refuseMalformedOutputs, Er as createAssetRedirectResolver, Et as carriesFetchableDynamicReference, F as isStatefulRecreateTargetSync, Fn as findSilentDropProperties, Fr as parseBootstrapMarker, Ft as isSettledInstanceState, G as gray, Gi as NestedStackChildDirectDestroyError, Gn as createSecretMasker, Gr as formatDockerLoginError, Gt as readConfigString, H as formatResourceLine, Hi as LocalStartServiceError, Hn as STATE_SOURCED_READBACK_RULES, Hr as describeDockerExecFailure, Ht as configBooleanRefusal, I as renderStatefulReason, Ii as CrossAccountSecretRefusalError, In as describeTypeWithThrottleRetry, Ir as readBootstrapMarkerBody, It as WAFv2WebACLProvider, J as yellow, Ji as ResourceTimeoutError, Jn as identityKeyFor, Jr as redactDockerArgvValues, Jt as requireConfigObject, K as green, Ki as PartialFailureError, Kn as dynamicReferenceTokens, Kr as getDockerCmd, Kt as replayWarn, L as WARM_THROUGHPUT_MEMBERS, Ln as withRetry, Lr as validateAssetBucketName, Lt as normalizeAwsTagsToCfn, M as planOrphanAdoption, Mi as setAwsClients, Mn as repairMalformedResourcePropertiesForReadOnly, Mr as ensureAssetStorage, Mt as isUnboundTemplateParameter, N as MULTI_REGION_RECREATE_BLOCKED_TYPES, Nn as repairMalformedResourcesForReadOnly, Nr as getBootstrapMarkerKey, Nt as parameterTypeMayLoseSecretIdentity, O as unsupportedFinalSnapshotError, Oi as resolveBucketRegion, On as refuseMalformedResourcePropertiesForOrphan, Or as rewriteTemplateAssetReferences, Ot as coerceParameterTypedValue, P as isStatefulRecreateTargetForReplace, Pi as CdkdError, Pn as findActionableSilentDrops, Pr as isCrossRegionRedirect, Pt as refStateLookupFromResource, Q as isExportAliasCollision, Qn as maskSecretsInText, Qr as stripControlChars, Qt as withSharedDrainBudget, R as coerceWarmThroughput$1, Ri as DeployCancelledError, Rn as DagBuilder, Rr as validateContainerRepoName, Rt as resolveExplicitPhysicalId, S as PRE_DELETE_SNAPSHOT_TYPES, Si as PARTITION_TABLE, Sn as malformedStateRefusalMessage, Sr as AssetPublisher, St as disableInstanceApiTermination, T as createPreDeleteFinalSnapshot, Ti as AssemblyReader, Tn as refuseMalformedNestedChildOutputs, Tr as buildAssetRedirectMap, Tt as carriesDynamicReference, U as bold, Un as TEMPLATE_SOURCED_RULES, Ur as describeDockerFailure, Ut as configIntegerRefusal, V as toFiniteNumber, Vi as LocalInvokeBuildError$1, Vn as STATE_SOURCED_CROSS_GENERATION_RULES, Vr as describeDockerCapturedOutput, Vt as coerceCfnInteger, W as cyan, Wi as MalformedProducerRecordRefusalError, Wn as carriesSecretMask, Wr as dockerSpawnEnvWithSensitive, Wt as configStringRefusal, X as collectPublishedOutputNames, Xi as StackHasActiveImportsError, Xn as markSameGenerationBag, Xr as runDockerStreaming, Xt as classifyReplaySecretRegion, Y as collectDeclaredOutputNames, Yi as ResourceUpdateNotSupportedError, Yn as isSingleDynamicReferenceToken, Yr as runDockerForeground, Yt as requireConfigString, Z as exportAliasCollisionScrubWarning, Zi as StackTerminationProtectionError, Zn as maskSecretsInError, Zr as escapeRegExp, Zt as producerRegionsFromState, _ as isSecretBearingReferenceString, _i as findLargeInlineResources, _n as malformedOutputsRefusalMessage, _r as importableOutputs, _t as isWaitAbandonedError, a as DeploymentEventsStore, aa as isRetryableTransientError, ai as resolveApp, an as AWS_CREDENTIAL_ENV_KEYS, ar as rebuildClientForBucketRegion, at as clearOnUpdateRemoval, b as bindingSkippedOutputs, bi as decodeListingKey, bn as malformedResourcePropertiesWarning, br as orphansCarriedFrom, bt as deleteIndeterminateGuards, c as replayFailedOperations, ca as markNonRetryable, ci as resolveSkipPrefix, cn as envCredentialsAreAssumedRole, cr as buildLockContentionMessage, ct as createMaskedRetryLogger, d as updatePartialReason, da as describeAwsFailure, di as resolveUseCdkBootstrapAssets, dn as STATE_RESOURCES_MALFORMED, dr as shellQuote, dt as beginCommandInterruptScope, ei as getDockerImageBySourceHash, en as s3BucketDomainName, er as recoverMaskedOutput, et as secretBearingStateKeyWarning, f as withResourceDeadline, fa as safeStringify, fi as stateBucketExistenceConfirmed, fn as hasReadableOutputs, fr as CUSTOM_RESOURCE_RESPONSE_PREFIX, ft as endCommandInterruptScope, g as bagHoldsSecretExpression, gi as MIGRATE_TMP_PREFIX, gn as malformedLocalOutputsWarning, gr as importableOutputKeys, gt as CloudControlProvider, h as computeImplicitDeleteEdges, hi as CFN_TEMPLATE_URL_LIMIT, hn as malformedExportSourceWarning, hr as hasReadableExportSet, ht as startInterruptWatch, i as DeploymentEventsReader, ia as isMarkedNonRetryable, ii as getLegacyStateBucketName, in as applyRoleArnIfSet, ir as S3StateBackend, it as collectInlinePolicyNamesManagedBySiblings, j as makeSiblingClaimReader, ji as resetAwsClients, jn as repairMalformedOutputsForReadOnly, jr as assertAssetBucketRegion, jt as isNamelessDynamicReferenceError, k as makeCanonicalizePropertiesFn, ki as AwsClients, kn as refuseMalformedResourcesForDestroy, kr as AssetModeResolver, kt as getAccountInfo, l as replayRollback, la as markRedactedCause, li as resolveStateBucketWithDefault, ln as DiffCalculator, lr as forceQuitRecoveryClause, lt as maskDeep, m as IMPLICIT_DELETE_DEPENDENCIES, mi as CFN_TEMPLATE_BODY_LIMIT, mn as malformedExportNamesWarning, mr as exportNamesCarriedFrom, mt as isInterruptedWaitError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as normalizeAwsError, ni as synthesisStatusMessage, nn as s3BucketRegionalDomainName, nr as scrubResourceRecord, nt as getCurrentResourceSecrets, o as planFailedOps, oa as isThrottlingError, oi as resolveAutoAssetStorage, on as applyCallerIdentityCredentials, or as UNREPRODUCIBLE_LOCK_CLAUSE, ot as ProviderRegistry, p as maskingRetryLogger, pi as warnDeprecatedNoPrefixCliFlag, pn as hasReadableResources, pr as DEFAULT_STATE_PREFIX, pt as interruptWatchListenerCount, q as red, qi as ProvisioningError, qn as errorCauseChain, qr as partitionSensitiveEnv, qt as requireConfigArray, r as DeployEngine, ra as withErrorHandling, ri as getDefaultStateBucketName, rn as s3BucketWebsiteUrl, rr as LockManager, rt as IAMRoleProvider, s as planRollback, sa as isTransientServerError, si as resolveCaptureObservedState, sn as callerEnvCredentials, sr as buildForceUnlockCommand, st as wouldReturnToSdkProvider, t as DEFAULT_RESOURCE_TIMEOUT_MS, ti as Synthesizer, tn as s3BucketDualStackDomainName, tr as redactSecretsForState, tt as secretSafeKeyDisplay, u as updatePartialMessage, ua as retryClassificationText, ui as resolveStateBucketWithDefaultAndSource, un as INTRINSIC_KEYS, ur as formatLockExpiry, ut as maskerOrIdentity, v as keptWholeReasonText, vi as uploadCfnTemplate, vn as malformedOutputsWarning, vr as isReadableBag, vt as slowCcOperationTimeoutMs, w as ccRoutedFinalSnapshotError, wi as derivePartitionAndUrlSuffix, wn as refuseDivergentRecordRegionForDestroy, wr as WorkGraph, wt as IntrinsicFunctionResolver, x as ATOMIC_FINAL_SNAPSHOT_TYPES, xi as expectedOwnerParam, xn as malformedResourcesWarning, xr as shouldRetainResource, xt as deleteSkipReason, y as mergeNoChangeOutputs, yi as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, yn as malformedRenderedContainersWarning, yr as orphansAfterRollback, yt as UNSPECIFIED_SKIP_REASON, z as isWarmThroughputDecrease, zi as DynamicReferenceRegionAmbiguousError, zn as TemplateParser, zr as buildDenyExternalAccessPolicy, zt as assertRegionMatch } from "./deploy-engine-B6TcGQSU.js";
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-BX4pJk0T.js";
3
3
  import { n as awsClientDefaults } from "./aws-client-defaults-BoIxyCir.js";
4
- import { t as getCdkdVersion } from "./version-IwTfNQ-K.js";
5
- import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-DNzgk-BS.js";
4
+ import { t as getCdkdVersion } from "./version-xHGBnQbJ.js";
5
+ import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-BCpZ70Ws.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";
@@ -270,35 +270,6 @@ function describeStateKey(key, suffix = STATE_FILE_SUFFIX, knownPrefix) {
270
270
  return region === void 0 ? name : `${name} (${displayIdent(region)})`;
271
271
  }
272
272
  /**
273
- * The shape a state-key segment must have before it may be interpolated into a
274
- * command cdkd invites an operator to PASTE.
275
- *
276
- * An ALLOW-LIST, and deliberately so: the first cut of this predicate was a
277
- * deny-list that refused a leading `-`, and review defeated it with a leading
278
- * `~`. A deny-list has to enumerate every character a shell treats specially
279
- * BEFORE cdkd sees the word, and the set of things nobody thought of is
280
- * unbounded. The repo already settled this once — `rollback-executor.ts`'s
281
- * `PASTEABLE_LOGICAL_ID` is `/^[A-Za-z0-9]{1,255}$/`, with a comment naming
282
- * `~user` and `=x` by name.
283
- *
284
- * This one is wider than that because the values here are not logical ids: a
285
- * cdkd state record's stack name carries `~` (a nested-stack child is minted
286
- * `${parent}~${logicalId}`) and a region carries `-`. What it keeps from the
287
- * precedent is the LEADING character, which is where the danger is. MEASURED
288
- * in bash on a real host rather than reasoned:
289
- *
290
- * ~root -> /var/root ~/x -> $HOME/x ~- -> $OLDPWD
291
- * a=~/x -> a=$HOME/x
292
- * Parent~Child -> inert a:~/x -> inert
293
- *
294
- * So `~` is dangerous only in the leading position or straight after `=`,
295
- * which is why a medial `~` stays in the set and `=` stays out of it entirely.
296
- * A leading digit or letter also closes the option case: `--state-bucket=x`
297
- * cannot match, and that one is NOT about shell quoting — it is still an
298
- * OPTION after quoting, which is why the answer is refusal rather than quoting.
299
- */
300
- const PASTEABLE_STATE_IDENT = /^[A-Za-z0-9][A-Za-z0-9~_.-]*$/;
301
- /**
302
273
  * The cap for rendering a whole state or lock KEY, as opposed to one segment.
303
274
  *
304
275
  * A key CONTAINS a stack name, so capping it at `STACK_REF_MAX_CODE_POINTS`
@@ -314,28 +285,6 @@ const PASTEABLE_STATE_IDENT = /^[A-Za-z0-9][A-Za-z0-9~_.-]*$/;
314
285
  * BUDGET, not an enforced bound. Nothing in `src/` validates key length.
315
286
  */
316
287
  const STATE_KEY_MAX_CODE_POINTS = STACK_REF_MAX_CODE_POINTS + 64;
317
- /**
318
- * Is this value safe to interpolate into a command we tell an operator to RUN?
319
- *
320
- * Two independent tests, and BOTH are load-bearing:
321
- *
322
- * 1. {@link PASTEABLE_STATE_IDENT}, which decides the shell question — see its
323
- * own note for why it is an allow-list and what was measured.
324
- * 2. It renders byte-identically through `displayIdent`, which adds the LENGTH
325
- * cap and the ASCII rule the regex does not carry, asked through the public
326
- * API rather than by re-spelling `PLAIN_IDENT` (a second spelling of a
327
- * security predicate is how the two drift).
328
- *
329
- * Deliberately NOT shell-quoting instead. Quoting answers test 2's population
330
- * and none of the option case — `'--state-bucket=attacker'` is still parsed as
331
- * a flag — and a command that LOOKS runnable is the thing being handed over, so
332
- * the honest answer for a value failing either test is to print the S3 key and
333
- * let the operator decide.
334
- */
335
- function isPasteableIdent(value) {
336
- if (!PASTEABLE_STATE_IDENT.test(value)) return false;
337
- return displayIdent(value, { maxCodePoints: STACK_REF_MAX_CODE_POINTS }) === value;
338
- }
339
288
 
340
289
  //#endregion
341
290
  //#region src/cli/options.ts
@@ -61169,6 +61118,64 @@ var S3VectorsProvider = class {
61169
61118
  //#endregion
61170
61119
  //#region src/provisioning/providers/s3-directory-bucket-provider.ts
61171
61120
  /**
61121
+ * What `delete()` throws for a non-empty bucket with no auto-empty opt-in
61122
+ * (issue [#1344](https://github.com/go-to-k/cdkd/issues/1344)), with the bucket
61123
+ * name rendered safely (issue
61124
+ * [#3270](https://github.com/go-to-k/cdkd/issues/3270)).
61125
+ *
61126
+ * `bucketName` on the delete path is the STATE-borne physical id, which for
61127
+ * this type is the TEMPLATE-chosen name, and this message is THROWN from
61128
+ * `delete()` — so it reaches the operator's terminal AND the durable
61129
+ * `deployments/*.jsonl` store. It used to interpolate the name BARE into
61130
+ * `aws s3 rm s3://<name> --recursive`, so a name carrying `;`, a backtick,
61131
+ * `$(...)` or a newline APPENDED a command to a recursive delete when pasted.
61132
+ *
61133
+ * The command goes through the shared `renderDisableCommand`
61134
+ * (`displaySafe(asciiOnly)`, then `shellQuote`, then SUPPRESS the whole command
61135
+ * when sanitizing CHANGED the value, since a command naming the sanitized name
61136
+ * would empty a DIFFERENT bucket). Three things are specific to this site:
61137
+ *
61138
+ * - **The quoted unit is the ASSEMBLED `s3://<name>` argument**, not the name:
61139
+ * `aws s3 rm` has no `--bucket <name>` form, and quoting only the name would
61140
+ * put a quote in the middle of a word. `shellQuote` leaves `:` and `/` bare,
61141
+ * so a clean name renders exactly as before.
61142
+ * - **The NAME is compared against its own sanitized form HERE, before the
61143
+ * shared renderer sees it.** The renderer's changed-by-sanitizing test runs
61144
+ * over the assembled argument, where the `s3://` prefix shields a LEADING
61145
+ * space of the name from the sanitizer's trim — so without this check a
61146
+ * padded name would be shown in a command while the prose beside it named
61147
+ * the trimmed one.
61148
+ * - **A name containing `/` is suppressed here**, which the shared renderer
61149
+ * cannot know to do: `s3://a/b` addresses the prefix `b` in bucket `a`, a
61150
+ * DIFFERENT bucket, and both characters pass sanitizing and quoting
61151
+ * unchanged. An empty name is suppressed for the same reason (`s3://` names
61152
+ * no bucket at all).
61153
+ * - **No `maskSecrets` is passed.** `DeleteContext` carries no masker by
61154
+ * contract (issue [#2007](https://github.com/go-to-k/cdkd/issues/2007) tracks
61155
+ * the threading), and an identity masker would claim a check that never ran.
61156
+ *
61157
+ * The PROSE name goes through `displayIdent`, because this message is
61158
+ * persisted: a control byte or a newline in it would otherwise forge lines in
61159
+ * the events store even with the command suppressed. A clean name is a plain
61160
+ * identifier, which `displayIdent` renders unchanged.
61161
+ *
61162
+ * The caller marks the refusal NON-RETRYABLE: it is a deterministic verdict,
61163
+ * and `delete()` wraps it in a message carrying the LOGICAL id, which the
61164
+ * destroy runner and the deploy engine's replacement delete classify as
61165
+ * "already deleted" by SUBSTRING (`NotFoundException` there, a bare `NotFound`
61166
+ * here). A logical id containing the needle would otherwise have its non-empty
61167
+ * bucket read as gone; both classifiers skip a marked error.
61168
+ */
61169
+ function notEmptyRefusalMessage(bucketName) {
61170
+ const command = bucketName !== "" && !bucketName.includes("/") && displaySafe(bucketName, { asciiOnly: true }) === bucketName ? renderDisableCommand({
61171
+ before: "aws s3 rm",
61172
+ identifier: `s3://${bucketName}`,
61173
+ after: "--recursive"
61174
+ }) : "";
61175
+ const remedy = command ? `Delete all objects first (e.g. ${command}) and destroy again.` : "Delete all objects first, via the console, and destroy again: the bucket name cdkd recorded cannot be reproduced safely on a command line, so any command shown here would act on a different bucket.";
61176
+ return `bucket ${displayIdent(bucketName)} is not empty. Matching CloudFormation, cdkd does not delete a non-empty directory bucket without an explicit opt-in. ${remedy}`;
61177
+ }
61178
+ /**
61172
61179
  * SDK Provider for AWS::S3Express::DirectoryBucket
61173
61180
  *
61174
61181
  * Uses S3 SDK directly for S3 Express Directory Bucket operations.
@@ -61413,7 +61420,7 @@ var S3DirectoryBucketProvider = class {
61413
61420
  } catch (error) {
61414
61421
  const msg = describeAwsFailure(error).detail;
61415
61422
  if (msg.includes("not empty") || msg.includes("BucketNotEmpty")) {
61416
- if (!allowAutoEmpty) throw new Error(`bucket ${bucketName} is not empty. Matching CloudFormation, cdkd does not delete a non-empty directory bucket without an explicit opt-in. Delete all objects first (e.g. aws s3 rm s3://${bucketName} --recursive) and destroy again.`);
61423
+ if (!allowAutoEmpty) throw markNonRetryable(new Error(notEmptyRefusalMessage(bucketName)));
61417
61424
  this.logger.info(`Directory bucket ${bucketName} not empty (attempt ${attempt}/${maxAttempts}), emptying (auto-delete opt-in present)...`);
61418
61425
  await this.emptyBucket(bucketName);
61419
61426
  continue;
@@ -69751,17 +69758,31 @@ function isTemplateShapeResolutionFailure(err) {
69751
69758
  * Per-pattern throw sites, and the fence that keeps them true, are in
69752
69759
  * `tests/unit/cli/scrub-abandoned-scan-origin.test.ts`.
69753
69760
  *
69754
- * ONE CLASSIFICATION CHANGE, recorded because it is a GATE and this file does
69755
- * not otherwise mention it. go-to-k/cdkd#3426 routed the `Ref <id> not found`
69756
- * throw through the resolver's display builder, which strips control
69761
+ * TWO CLASSIFICATION CHANGES, recorded because they are a GATE and this file
69762
+ * does not otherwise mention them. go-to-k/cdkd#3426 routed the `Ref <id> not
69763
+ * found` throw through the resolver's display builder, which strips control
69757
69764
  * characters and trims — so an id carrying a CR or padding, which `\S+` could
69758
69765
  * not match before, matches now, and such a unit moves from `count` (gateable
69759
- * by `cdkd scrub --dry-run --fail`) to `warn` (not). The SAFE direction would
69760
- * have been the other one, and it is accepted for a reason: a plain dangling
69761
- * `Ref` already warned, so this adds no NEW bypass — it extends an existing
69762
- * classification to ids that differ from an ordinary one only by characters
69763
- * nobody can see. The alternative is a gate whose verdict depends on invisible
69764
- * bytes in a logical id, which is worse to reason about. Pinned by
69766
+ * by `cdkd scrub --dry-run --fail`) to `warn` (not). go-to-k/cdkd#3432 did the
69767
+ * same to `Resource <id> not found for Fn::GetAtt`, the SECOND pattern below,
69768
+ * for the same reason and with the same effect. Both are listed here rather
69769
+ * than one, because a note naming a single pattern reads as a property of that
69770
+ * pattern instead of a property of every id-bearing shape in the list. THE
69771
+ * THIRD moved too, in go-to-k/cdkd#3432's own review round: `Parameter <name>
69772
+ * is required ...` carried the same premise one expression name over — a
69773
+ * `Parameters` KEY is arbitrary JSON just as a `Resources` key is — and a
69774
+ * reviewer measured it putting a live terminal-rewriting sequence on that
69775
+ * throw. So all THREE patterns now see a sanitized id, and this note names no
69776
+ * exception; an earlier revision of it described the third as the one still
69777
+ * rendered raw, which would have shipped as a standing description of a live
69778
+ * exposure.
69779
+ *
69780
+ * The SAFE direction would have been the other one, and it is accepted for a
69781
+ * reason: a plain dangling `Ref`, `Fn::GetAtt` or unbound parameter already
69782
+ * warned, so this adds no NEW bypass — it extends an existing classification to
69783
+ * ids that differ from an ordinary one only by characters nobody can see. The
69784
+ * alternative is a gate whose verdict depends on invisible bytes in a logical
69785
+ * id, which is worse to reason about. All three are pinned by
69765
69786
  * `tests/unit/cli/scrub-abandoned-scan-origin.test.ts`.
69766
69787
  */
69767
69788
  const TEMPLATE_SHAPE_FAILURE_PATTERNS = [
@@ -84098,19 +84119,20 @@ async function orphanCommand(pathArgs, options) {
84098
84119
  })).stacks);
84099
84120
  const stackInfo = resolved.stack;
84100
84121
  const orphanLogicalIds = resolved.logicalIds;
84101
- const targetRegion = await pickStackRegion(stateBackend, stackInfo.stackName, stackInfo.region, options.stackRegion);
84122
+ const { region: targetRegion, recordRegion } = await pickStackRegion(stateBackend, stackInfo.stackName, stackInfo.region, options.stackRegion);
84102
84123
  logger.info(`Target: ${stackInfo.stackName} (${targetRegion}); orphaning ${orphanLogicalIds.length} resource(s): ${orphanLogicalIds.join(", ")}`);
84103
84124
  const owner = `${process.env["USER"] || "unknown"}@${process.env["HOSTNAME"] || "host"}:${process.pid}`;
84125
+ const recovery = {
84126
+ profile: options.profile,
84127
+ stateBucket,
84128
+ statePrefix: options.statePrefix
84129
+ };
84104
84130
  if (!options.dryRun) {
84105
84131
  if (!await lockManager.acquireLock(stackInfo.stackName, targetRegion, owner, "orphan")) throw new Error(await buildLockContentionMessage({
84106
84132
  lockManager,
84107
84133
  stackName: stackInfo.stackName,
84108
84134
  region: targetRegion,
84109
- recovery: {
84110
- profile: options.profile,
84111
- stateBucket,
84112
- statePrefix: options.statePrefix
84113
- }
84135
+ recovery
84114
84136
  }));
84115
84137
  }
84116
84138
  try {
@@ -84119,7 +84141,7 @@ async function orphanCommand(pathArgs, options) {
84119
84141
  const { state, etag, migrationPending } = stateData;
84120
84142
  refuseMalformedState(state, stackInfo.stackName, targetRegion);
84121
84143
  refuseMalformedOutputs(state, stackInfo.stackName, targetRegion);
84122
- refuseMalformedResourcePropertiesForOrphan(state, orphanLogicalIds, stackInfo.stackName, targetRegion);
84144
+ refuseMalformedResourcePropertiesForOrphan(state, orphanLogicalIds, stackInfo.stackName, recordRegion, recovery);
84123
84145
  const missing = orphanLogicalIds.filter((id) => !(id in state.resources));
84124
84146
  if (missing.length > 0) {
84125
84147
  const have = Object.keys(state.resources ?? {}).join(", ");
@@ -84214,8 +84236,14 @@ function resolveConstructPaths(paths, stacks) {
84214
84236
  async function pickStackRegion(stateBackend, stackName, synthRegion, flag) {
84215
84237
  const refs = (await stateBackend.listStacks()).filter((r) => r.stackName === stackName);
84216
84238
  if (refs.length === 0) {
84217
- if (flag) return flag;
84218
- if (synthRegion) return synthRegion;
84239
+ if (flag) return {
84240
+ region: flag,
84241
+ recordRegion: flag
84242
+ };
84243
+ if (synthRegion) return {
84244
+ region: synthRegion,
84245
+ recordRegion: synthRegion
84246
+ };
84219
84247
  throw new Error(`No state found for stack '${stackName}'. Run 'cdkd state list' to see available stacks.`);
84220
84248
  }
84221
84249
  if (flag) {
@@ -84223,12 +84251,24 @@ async function pickStackRegion(stateBackend, stackName, synthRegion, flag) {
84223
84251
  const seen = refs.map((r) => r.region ?? "(legacy)").join(", ");
84224
84252
  throw new Error(`No state found for stack '${stackName}' in region '${flag}'. Available regions: ${seen}.`);
84225
84253
  }
84226
- return flag;
84254
+ return {
84255
+ region: flag,
84256
+ recordRegion: flag
84257
+ };
84227
84258
  }
84228
84259
  if (synthRegion) {
84229
- if (refs.find((r) => r.region === synthRegion)) return synthRegion;
84260
+ if (refs.find((r) => r.region === synthRegion)) return {
84261
+ region: synthRegion,
84262
+ recordRegion: synthRegion
84263
+ };
84264
+ }
84265
+ if (refs.length === 1) {
84266
+ const recordRegion = refs[0].region;
84267
+ return {
84268
+ region: recordRegion ?? synthRegion ?? "",
84269
+ recordRegion
84270
+ };
84230
84271
  }
84231
- if (refs.length === 1) return refs[0].region ?? synthRegion ?? "";
84232
84272
  const regions = refs.map((r) => r.region ?? "(legacy)").join(", ");
84233
84273
  throw new Error(`Stack '${stackName}' has state in multiple regions: ${regions}. Re-run with --stack-region <region> to disambiguate.`);
84234
84274
  }
@@ -88998,11 +89038,12 @@ const CONTAINER_AWS_CREDENTIALS_PATH = "/cdkd-aws/credentials";
88998
89038
  * file behind in `/tmp` is a security smell (temp credentials live on
88999
89039
  * disk).
89000
89040
  */
89001
- async function writeProfileCredentialsFile(profileName, creds) {
89041
+ async function writeProfileCredentialsFile(profileName, creds, opts) {
89002
89042
  if (profileName === "") throw new Error("writeProfileCredentialsFile: profile name must not be empty.");
89003
89043
  if (/[\r\n[\]]/.test(profileName)) throw new Error(`writeProfileCredentialsFile: profile name ${displayIdent(profileName)} contains a forbidden character (any of CR, LF, '[', ']' would corrupt the INI file or the docker -e env var).`);
89004
89044
  const dir = await mkdtemp(path.join(tmpdir(), "cdkd-profile-creds-"));
89005
89045
  const hostPath = path.join(dir, "credentials");
89046
+ opts?.onDirCreated?.(hostPath);
89006
89047
  const lines = [
89007
89048
  `[${profileName}]`,
89008
89049
  `aws_access_key_id = ${creds.accessKeyId}`,
@@ -89012,10 +89053,16 @@ async function writeProfileCredentialsFile(profileName, creds) {
89012
89053
  try {
89013
89054
  await writeFile(hostPath, lines.join("\n") + "\n", { mode: 384 });
89014
89055
  } catch (err) {
89056
+ let removed = true;
89015
89057
  await rm(dir, {
89016
89058
  recursive: true,
89017
89059
  force: true
89018
- }).catch(() => {});
89060
+ }).catch(() => {
89061
+ removed = false;
89062
+ });
89063
+ if (removed) try {
89064
+ opts?.onDirRemoved?.(hostPath);
89065
+ } catch {}
89019
89066
  throw err;
89020
89067
  }
89021
89068
  return {
@@ -89030,6 +89077,46 @@ async function writeProfileCredentialsFile(profileName, creds) {
89030
89077
  }
89031
89078
  };
89032
89079
  }
89080
+ /**
89081
+ * The sentence an exit path owes when it leaves this file on disk
89082
+ * (issue [#3410](https://github.com/go-to-k/cdkd/issues/3410)).
89083
+ *
89084
+ * Takes the PATH rather than the `ProfileCredentialsFile` (go-to-k/cdkd#3435
89085
+ * review): a caller on a signal path may hold the path from
89086
+ * `writeProfileCredentialsFile`'s `onDirCreated` hook while the file object
89087
+ * itself is still an unresolved promise, and the sentence is the same either
89088
+ * way. `undefined` renders nothing, so a run that passed no `--profile` is not
89089
+ * told about a path that does not exist.
89090
+ *
89091
+ * ## Why the remedy is to NAME the path rather than to remove it
89092
+ *
89093
+ * Every exit path that can reach this notice leaves the CONTAINERS running with
89094
+ * this file bind-mounted, and that is the premise `local-run-task.ts`'s detach
89095
+ * arm already records: the file cannot be disposed there precisely because the
89096
+ * containers outlive the process. A force-exit is the same situation reached a
89097
+ * different way -- "container cleanup skipped" is what it announces -- so the
89098
+ * synchronous `rmSync` that suggests itself would be removing a mount the
89099
+ * surviving containers are still reading, on the strength of a premise this
89100
+ * repo has not measured either way. What the file is instead is INVISIBLE: it
89101
+ * is mode-0600 in `$TMPDIR`, nothing reports it, and one accumulates per
89102
+ * force-quit. Naming it is what the operator can act on, and it is what the
89103
+ * detach arm already does.
89104
+ *
89105
+ * ONE BUILDER FOR ALL THREE SITES, not three sentences that agree today. They
89106
+ * say the same thing for the same reason -- the two force-exit arms
89107
+ * (`local-run-task.ts`, `local-start-api.ts`) and the detach notice -- and a
89108
+ * wording that drifts between them is how an operator learns to read one shape
89109
+ * and miss another. Each CALLER supplies its own cause clause; this supplies
89110
+ * the remedy.
89111
+ *
89112
+ * `displayIdent` for the same reason the detach arm gives: the path is cdkd's
89113
+ * own `mkdtemp` output, so sanitization is the identity on it, but the rule
89114
+ * belongs to the SURFACE rather than to the value.
89115
+ */
89116
+ function strandedProfileCredentialsNotice(hostPath) {
89117
+ if (hostPath === void 0) return void 0;
89118
+ return `The AWS credentials file mounted into the containers is NOT removed: delete ${displayIdent(hostPath)} once you tear them down.`;
89119
+ }
89033
89120
 
89034
89121
  //#endregion
89035
89122
  //#region src/local/websocket-body.ts
@@ -89907,6 +89994,7 @@ async function localStartApiCommand(target, options) {
89907
89994
  const inlineTmpDirs = /* @__PURE__ */ new Set();
89908
89995
  const layerTmpDirs = /* @__PURE__ */ new Set();
89909
89996
  let profileCredsFile;
89997
+ let credsHostPath;
89910
89998
  const authorizerCache = createAuthorizerCache();
89911
89999
  const jwksCache = createJwksCache();
89912
90000
  const jwksWarnedAt = /* @__PURE__ */ new Map();
@@ -89984,7 +90072,14 @@ async function localStartApiCommand(target, options) {
89984
90072
  }
89985
90073
  const stateByStack = options.fromState || isCfnFlagPresent(options) ? await loadStateForRoutedStacks(targetStacks, routes, routesWithAuth, options) : /* @__PURE__ */ new Map();
89986
90074
  const profileCredentials = options.profile ? await resolveProfileCredentials(options.profile) : void 0;
89987
- if (options.profile && profileCredentials && !profileCredsFile) profileCredsFile = await writeProfileCredentialsFile(options.profile, profileCredentials);
90075
+ if (options.profile && profileCredentials && !profileCredsFile) profileCredsFile = await writeProfileCredentialsFile(options.profile, profileCredentials, {
90076
+ onDirCreated: (hostPath) => {
90077
+ credsHostPath = hostPath;
90078
+ },
90079
+ onDirRemoved: () => {
90080
+ credsHostPath = void 0;
90081
+ }
90082
+ });
89988
90083
  const lambdaIds = uniqueLambdaIds(routes, routesWithAuth, webSocketApis);
89989
90084
  const specs = /* @__PURE__ */ new Map();
89990
90085
  for (let i = 0; i < lambdaIds.length; i++) {
@@ -90270,7 +90365,7 @@ async function localStartApiCommand(target, options) {
90270
90365
  if (shutdownStarted) {
90271
90366
  if (!forceExitArmed) {
90272
90367
  forceExitArmed = true;
90273
- logger.warn(`Received second ${signal}; force-exiting. Orphan containers may remain — run 'docker ps --filter name=cdkd-local-' and 'docker rm -f' to clean up.`);
90368
+ logger.warn(forceExitShutdownWarning(signal, credsHostPath));
90274
90369
  process.exit(130);
90275
90370
  }
90276
90371
  return;
@@ -91045,6 +91140,28 @@ async function resolveProfileCredentials(profile) {
91045
91140
  }
91046
91141
  }
91047
91142
  /**
91143
+ * The line the force-exit arm of {@link localStartApiCommand}'s shutdown
91144
+ * prints (go-to-k/cdkd#3435 review).
91145
+ *
91146
+ * PURE and EXPORTED for one reason: nothing stands this long-running server
91147
+ * command up in a unit test, so the force-exit arm's only fence was a
91148
+ * source-shape rule over the file — "does it CALL the notice builder". A
91149
+ * reviewer measured that predicate: mutating the rendered line to drop
91150
+ * `stranded` while keeping the call left the entire suite green, with the
91151
+ * operator never told the mode-0600 credentials tmpdir exists. That is exactly
91152
+ * go-to-k/cdkd#3410's defect, re-openable inside its own fix. The
91153
+ * CONCATENATION is what has to be asserted, so it lives here rather than
91154
+ * inline.
91155
+ *
91156
+ * `hostPath` is the credentials tmpdir's path or `undefined`; a run that passed
91157
+ * no `--profile` gets the container sentence alone, with no trailing space and
91158
+ * no mention of a file that does not exist.
91159
+ */
91160
+ function forceExitShutdownWarning(signal, hostPath) {
91161
+ const stranded = strandedProfileCredentialsNotice(hostPath);
91162
+ return `Received second ${signal}; force-exiting. Orphan containers may remain — run 'docker ps --filter name=cdkd-local-' and 'docker rm -f' to clean up.` + (stranded === void 0 ? "" : ` ${stranded}`);
91163
+ }
91164
+ /**
91048
91165
  * Issue an STS AssumeRole and return temporary credentials. Mirrors
91049
91166
  * `cdkd local invoke`'s helper byte-for-byte; lifted here so the
91050
91167
  * start-api command stays self-contained.
@@ -92306,6 +92423,7 @@ async function localRunTaskCommand(target, options) {
92306
92423
  let detachedSuccessfully = false;
92307
92424
  let stateProvider;
92308
92425
  let channels;
92426
+ let credsHostPath;
92309
92427
  let cleanupPromise;
92310
92428
  const cleanup = async () => {
92311
92429
  if (!cleanupPromise) cleanupPromise = (async () => {
@@ -92366,7 +92484,8 @@ async function localRunTaskCommand(target, options) {
92366
92484
  sigintHandler = () => {
92367
92485
  sigintCount += 1;
92368
92486
  if (sigintCount >= 2) {
92369
- process.stderr.write("Force-exit on second ^C; container cleanup skipped.\n");
92487
+ const stranded = strandedProfileCredentialsNotice(credsHostPath);
92488
+ process.stderr.write(`Force-exit on second ^C; container cleanup skipped.${stranded ? ` ${stranded}` : ""}\n`);
92370
92489
  process.exit(130);
92371
92490
  }
92372
92491
  logger.info("Stopping task...");
@@ -92383,7 +92502,14 @@ async function localRunTaskCommand(target, options) {
92383
92502
  resolvedRoleArn = options.assumeTaskRole;
92384
92503
  assumedCredentials = await assumeTaskRole(resolvedRoleArn, options.region);
92385
92504
  }
92386
- channels = await resolveTaskCredentialChannels(options, assumedCredentials);
92505
+ channels = await resolveTaskCredentialChannels(options, assumedCredentials, {
92506
+ onDirCreated: (hostPath) => {
92507
+ credsHostPath = hostPath;
92508
+ },
92509
+ onDirRemoved: () => {
92510
+ credsHostPath = void 0;
92511
+ }
92512
+ });
92387
92513
  const envOverrides = readEnvOverridesFile$2(options.envVars);
92388
92514
  const runOpts = buildRunEcsTaskOptions(options, channels, {
92389
92515
  ...envOverrides !== void 0 && { envOverrides },
@@ -92395,7 +92521,8 @@ async function localRunTaskCommand(target, options) {
92395
92521
  if (options.detach) {
92396
92522
  logger.info("Task containers started in detached mode; cdkd is exiting.");
92397
92523
  logger.info(`Use 'docker ps -a --filter network=${result.state.network?.networkName ?? "<network>"}' to inspect; tear down with 'docker rm -f' and 'docker network rm'.`);
92398
- if (channels.profileCredsFile) logger.info(`The AWS credentials file mounted into the containers is NOT removed in detached mode: delete ${displayIdent(channels.profileCredsFile.hostPath)} once you tear them down.`);
92524
+ const detachedNotice = strandedProfileCredentialsNotice(channels.profileCredsFile?.hostPath);
92525
+ if (detachedNotice) logger.info(`Detached mode leaves the mounted credentials file behind. ${detachedNotice}`);
92399
92526
  detachedSuccessfully = true;
92400
92527
  sigintCount = 99;
92401
92528
  return;
@@ -92677,11 +92804,11 @@ async function resolveSidecarCredentials(options, assumedCredentials) {
92677
92804
  * never the `--role-arn` role — and never an `--assume-task-role` STS result,
92678
92805
  * which wins earlier and is served by the metadata sidecar instead.
92679
92806
  */
92680
- async function resolveTaskCredentialChannels(options, assumedCredentials) {
92807
+ async function resolveTaskCredentialChannels(options, assumedCredentials, opts) {
92681
92808
  const sidecarCredentials = await resolveSidecarCredentials(options, assumedCredentials);
92682
92809
  if (options.profile && sidecarCredentials && !assumedCredentials) return {
92683
92810
  sidecarCredentials,
92684
- profileCredsFile: await writeProfileCredentialsFile(options.profile, sidecarCredentials)
92811
+ profileCredsFile: await writeProfileCredentialsFile(options.profile, sidecarCredentials, opts)
92685
92812
  };
92686
92813
  return {
92687
92814
  sidecarCredentials,
@@ -95546,4 +95673,4 @@ function buildProgram() {
95546
95673
 
95547
95674
  //#endregion
95548
95675
  export { buildProgram };
95549
- //# sourceMappingURL=program-CnSaRdY9.js.map
95676
+ //# sourceMappingURL=program-D75-DVWT.js.map