@go-to-k/cdkd 0.290.44 → 0.290.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-BwN09Zcn.js → asg-provider-BL_yHnHI.js} +3 -3
- package/dist/{asg-provider-BwN09Zcn.js.map → asg-provider-BL_yHnHI.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-CMD4BtQe.js → deploy-engine-BRy8S7QH.js} +275 -73
- package/dist/deploy-engine-BRy8S7QH.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{logger-DjBU2Ap3.js → logger-GASr9bAF.js} +25 -7
- package/dist/logger-GASr9bAF.js.map +1 -0
- package/dist/{program-CGhtrsw6.js → program-OigOAssB.js} +214 -33
- package/dist/{program-CGhtrsw6.js.map → program-OigOAssB.js.map} +1 -1
- package/dist/{version-4uhXCFhs.js → version-THOL_1Cg.js} +2 -2
- package/dist/{version-4uhXCFhs.js.map → version-THOL_1Cg.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-CMD4BtQe.js.map +0 -1
- package/dist/logger-DjBU2Ap3.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as yellow, $i as AssemblyReader, $n as safeStackName, $r as assertAssetBucketRegion, $t as requireConfigObject, A as createPreDeleteFinalSnapshot, Aa as ResourceTimeoutError, Ai as resolveCaptureObservedState, An as malformedOutputsRefusalMessage, Ar as formatLockExpiry, At as carriesDynamicReference, B as isStatefulRecreateTargetSync, Ba as isMarkedNonRetryable, Bi as MIGRATE_TMP_PREFIX, Bn as refuseMalformedOrphansForDestroy, Br as isReadableBag, Bt as isSettledInstanceState, C as namesAnyDeclaredParameter, Ca as LocalInvokeBuildError$1, Ci as getDockerImageBySourceHash, Cn as isReadableResourceEntry, Cr as LockManager, Ct as slowCcOperationTimeoutMs, D as PRE_DELETE_SNAPSHOT_TYPES, Da as NestedStackChildDirectDestroyError, Di as getLegacyStateBucketName, Dn as malformedOrphanRecordsWarning, Dr as buildForceUnlockCommand, Dt as disableInstanceApiTermination, E as ATOMIC_FINAL_SNAPSHOT_TYPES, Ea as MalformedProducerRecordRefusalError, Ei as getDefaultStateBucketName, En as malformedLocalOutputsWarning, Er as UNREPRODUCIBLE_LOCK_CLAUSE, Et as deleteSkipReason, F as extractDeploymentEventError, Fa as SynthesisError, Fi as stateBucketExistenceConfirmed, Fn as malformedResourcesWarning, Fr as hasReadableExportSet, Ft as isImpossibleEmptyStoredAttribute, G as toCfnInteger, Ga as markRedactedCause, Gi as injectiveKeyPrefix, Gn as refuseMalformedResourcesForDestroy, Gr as stringifyValue, Gt as coerceCfnBoolean, H as WARM_THROUGHPUT_MEMBERS, Ha as isThrottlingError, Hi as uploadCfnTemplate, Hn as refuseMalformedOutputsForDestroy, Hr as orphansCarriedFrom, Ht as normalizeAwsTagsToCfn, I as makeSiblingClaimReader, Ii as warnDeprecatedNoPrefixCliFlag, In as malformedStateRefusalMessage, Ir as hasReasonlessBaselineRefusal, It as isNamelessDynamicReferenceError, J as bold, Ja as safeStringify, Ji as decodeListingKey, Jn as repairMalformedOutputsForReadOnly, Jr as createAssetRedirectResolver, Jt as configIntegerRefusal, K as toFiniteNumber, Ka as retryClassificationText, Ki as producerCoordinateKey, Kn as refuseMalformedState, Kr as WorkGraph, Kt as coerceCfnInteger, L as planOrphanAdoption, Li as ssmResolvedValueType, Ln as refuseDivergentRecordRegionForDestroy, Lr as hasUnverifiableParameterRefusal, Lt as isUnboundTemplateParameter, M as refusesFinalSnapshot, Ma as StackHasActiveImportsError, Mi as resolveStateBucketWithDefault, Mn as malformedRenderedContainersWarning, Mr as CUSTOM_RESOURCE_RESPONSE_PREFIX, Mt as cfnRefValueFromPhysicalId, N as unsupportedFinalSnapshotError, Na as StackTerminationProtectionError, Ni as resolveStateBucketWithDefaultAndSource, Nn as malformedResourceEntriesWarning, Nr as DEFAULT_STATE_PREFIX, Nt as coerceParameterTypedValue, O as buildFinalSnapshotIdentifier, Oa as PartialFailureError, Oi as resolveApp, On as malformedOrphansRefusalMessage, Or as buildLockContentionMessage, Ot as isTerminationProtectionPropagationError, P as makeCanonicalizePropertiesFn, Pi as resolveUseCdkBootstrapAssets, Pn as malformedResourcePropertiesWarning, Pr as exportNamesCarriedFrom, Pt as getAccountInfo, Q as red, Qi as derivePartitionAndUrlSuffix, Qn as safeRegion, Qr as BOOTSTRAP_MARKER_PREFIX, Qt as requireConfigArray, R as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ra as normalizeAwsError, Ri as CFN_TEMPLATE_BODY_LIMIT, Rn as refuseMalformedNestedChildOutputs, Rr as importableOutputKeys, Rt as parameterTypeMayLoseSecretIdentity, S as computeParameterTaint, Sa as IntrinsicResolutionRefusalError, Si as AssetManifestLoader, Sn as hasReadableResources, Sr as scrubResourceRecord, St as isWaitAbandonedError, T as resourcesNamingDeclaredParameter, Ti as synthesisStatusMessage, Tn as malformedExportSourceWarning, Tr as rebuildClientForBucketRegion, Tt as deleteIndeterminateGuards, U as coerceWarmThroughput$1, Ua as isTransientServerError, Ui as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Un as refuseMalformedResourceEntries, Ur as shouldRetainResource, Ut as resolveExplicitPhysicalId, V as renderStatefulReason, Va as isRetryableTransientError, Vi as findLargeInlineResources, Vn as refuseMalformedOutputs, Vr as orphansAfterRollback, Vt as WAFv2WebACLProvider, W as isWarmThroughputDecrease, Wa as markNonRetryable, Wi as injectiveKey, Wn as refuseMalformedResourcePropertiesForOrphan, Wr as AssetPublisher, Wt as assertRegionMatch, X as gray, Xi as PARTITION_TABLE, Xn as repairMalformedResourcePropertiesForReadOnly, Xr as rewriteTemplateAssetReferences, Xt as readConfigString, Y as cyan, Yi as expectedOwnerParam, Yn as repairMalformedResourceEntriesForReadOnly, Yr as loadPublishableAssetManifest, Yt as configStringRefusal, Z as green, Zi as canonicalizeRegion, Zn as repairMalformedResourcesForReadOnly, Zr as AssetModeResolver, Zt as replayWarn, _ as bagHoldsSecretExpression, _i as redactDockerArgvValues, _n as UNREADABLE_ORPHANS_CONTAINER_ROW, _r as maskSecretsInError, _t as endCommandInterruptScope, a as DeploymentEventsStore, aa as nullPrototypeRecord, ai as validateAssetBucketName, an as s3BucketDomainName, ar as TemplateParser, at as secretBearingStateKeyWarning, b as mergeNoChangeOutputs, ba as DeployCancelledError, bi as escapeRegExp, bn as hasReadableOrphans, br as recoverMaskedOutput, bt as startInterruptWatch, c as replayFailedOperations, ca as resolveAssemblyPath, ci as buildDockerImage, cn as s3BucketWebsiteUrl, cr as STATE_SOURCED_READBACK_RULES, ct as IAMRoleProvider, d as updatePartialMessage, da as AwsClients, di as describeDockerExecFailure, dn as applyCallerIdentityCredentials, dr as createSecretMasker, dt as ProviderRegistry, ea as failedStageNote, ei as ensureAssetStorage, en as requireConfigString, er as findActionableSilentDrops, et as collectDeclaredOutputNames, f as updatePartialReason, fa as getAwsClients, fi as describeDockerFailure, fn as callerEnvCredentials, fr as dynamicReferenceTokens, ft as wouldReturnToSdkProvider, g as computeImplicitDeleteEdges, ga as CdkdError, gi as partitionSensitiveEnv, gn as STATE_RESOURCES_MALFORMED, gr as markSameGenerationBag, gt as beginCommandInterruptScope, h as IMPLICIT_DELETE_DEPENDENCIES, hi as getDockerCmd, hn as INTRINSIC_KEYS, hr as isSingleDynamicReferenceToken, ht as maskerOrIdentity, i as DeploymentEventsReader, ia as hasPlainPrototype, ii as readBootstrapMarkerBody, in as s3BucketArn, ir as DagBuilder, it as secretBearing, j as isFinalSnapshotError, ja as ResourceUpdateNotSupportedError, ji as resolveSkipPrefix, jn as malformedOutputsWarning, jr as shellQuote, jt as carriesFetchableDynamicReference, k as ccRoutedFinalSnapshotError, ka as ProvisioningError, ki as resolveAutoAssetStorage, kn as malformedOrphansWarning, kr as forceQuitRecoveryClause, kt as IntrinsicFunctionResolver, l as replayRollback, li as resolveDockerContextDirectory, ln as applyRoleArnIfSet, lr as TEMPLATE_SOURCED_RULES, lt as collectInlinePolicyNamesManagedBySiblings, m as maskingRetryLogger, ma as setAwsClients, mi as formatDockerLoginError, mn as DiffCalculator, mr as identityKeyFor, mt as maskDeep, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as defineOwnKey, ni as isCrossRegionRedirect, nn as producerRegionsFromState, nr as describeTypeWithThrottleRetry, nt as exportAliasCollisionScrubWarning, o as planFailedOps, oa as ownValue, oi as validateContainerRepoName, on as s3BucketDualStackDomainName, or as STATE_SOURCED_BASELINE_RULES, ot as secretSafeKeyDisplay, p as withResourceDeadline, pa as resetAwsClients, pi as dockerSpawnEnvWithSensitive, pn as envCredentialsAreAssumedRole, pr as errorCauseChain, pt as createMaskedRetryLogger, q as formatResourceLine, qa as describeAwsFailure, qi as producerRecordKey, qn as repairMalformedOrphansForReadOnly, qr as buildAssetRedirectMap, qt as configBooleanRefusal, r as DeployEngine, ra as hasOwnKey, ri as parseBootstrapMarker, rn as withSharedDrainBudget, rr as withRetry, rt as isExportAliasCollision, s as planRollback, sa as renderAssemblyPathEscape, si as buildDenyExternalAccessPolicy, sn as s3BucketRegionalDomainName, sr as STATE_SOURCED_CROSS_GENERATION_RULES, st as getCurrentResourceSecrets, t as DEFAULT_RESOURCE_TIMEOUT_MS, ta as processStackMessages, ti as getBootstrapMarkerKey, tn as classifyReplaySecretRegion, tr as findSilentDropProperties, tt as collectPublishedOutputNames, u as resolveReplacementOldType, ua as resolveBucketRegion, ui as describeDockerCapturedOutput, un as AWS_CREDENTIAL_ENV_KEYS, ur as carriesSecretMask, ut as clearOnUpdateRemoval, v as isSecretBearingReferenceString, va as CrossAccountSecretRefusalError, vi as runDockerForeground, vn as UNREADABLE_RESOURCES_MAP_ROW, vr as maskSecretsInText, vt as interruptWatchListenerCount, w as reachableDivergentParameters, wa as LocalStartServiceError, wi as Synthesizer, wn as malformedExportNamesWarning, wr as S3StateBackend, wt as UNSPECIFIED_SKIP_REASON, x as bindingSkippedOutputs, xa as DynamicReferenceRegionAmbiguousError, xi as stripControlChars, xn as hasReadableOutputs, xr as redactSecretsForState, xt as CloudControlProvider, y as keptWholeReasonText, yi as runDockerStreaming, yn as displayLogicalId, yr as recordMaskOnlyValue, yt as isInterruptedWaitError, z as isStatefulRecreateTargetForReplace, za as withErrorHandling, zi as CFN_TEMPLATE_URL_LIMIT, zn as refuseMalformedOrphans, zr as importableOutputs, zt as refStateLookupFromResource } from "./deploy-engine-
|
|
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-
|
|
1
|
+
import { $ as yellow, $i as AssemblyReader, $n as safeStackName, $r as assertAssetBucketRegion, $t as requireConfigObject, A as createPreDeleteFinalSnapshot, Aa as ResourceTimeoutError, Ai as resolveCaptureObservedState, An as malformedOutputsRefusalMessage, Ar as formatLockExpiry, At as carriesDynamicReference, B as isStatefulRecreateTargetSync, Ba as isMarkedNonRetryable, Bi as MIGRATE_TMP_PREFIX, Bn as refuseMalformedOrphansForDestroy, Br as isReadableBag, Bt as isSettledInstanceState, C as namesAnyDeclaredParameter, Ca as LocalInvokeBuildError$1, Ci as getDockerImageBySourceHash, Cn as isReadableResourceEntry, Cr as LockManager, Ct as slowCcOperationTimeoutMs, D as PRE_DELETE_SNAPSHOT_TYPES, Da as NestedStackChildDirectDestroyError, Di as getLegacyStateBucketName, Dn as malformedOrphanRecordsWarning, Dr as buildForceUnlockCommand, Dt as disableInstanceApiTermination, E as ATOMIC_FINAL_SNAPSHOT_TYPES, Ea as MalformedProducerRecordRefusalError, Ei as getDefaultStateBucketName, En as malformedLocalOutputsWarning, Er as UNREPRODUCIBLE_LOCK_CLAUSE, Et as deleteSkipReason, F as extractDeploymentEventError, Fa as SynthesisError, Fi as stateBucketExistenceConfirmed, Fn as malformedResourcesWarning, Fr as hasReadableExportSet, Ft as isImpossibleEmptyStoredAttribute, G as toCfnInteger, Ga as markRedactedCause, Gi as injectiveKeyPrefix, Gn as refuseMalformedResourcesForDestroy, Gr as stringifyValue, Gt as coerceCfnBoolean, H as WARM_THROUGHPUT_MEMBERS, Ha as isThrottlingError, Hi as uploadCfnTemplate, Hn as refuseMalformedOutputsForDestroy, Hr as orphansCarriedFrom, Ht as normalizeAwsTagsToCfn, I as makeSiblingClaimReader, Ii as warnDeprecatedNoPrefixCliFlag, In as malformedStateRefusalMessage, Ir as hasReasonlessBaselineRefusal, It as isNamelessDynamicReferenceError, J as bold, Ja as safeStringify, Ji as decodeListingKey, Jn as repairMalformedOutputsForReadOnly, Jr as createAssetRedirectResolver, Jt as configIntegerRefusal, K as toFiniteNumber, Ka as retryClassificationText, Ki as producerCoordinateKey, Kn as refuseMalformedState, Kr as WorkGraph, Kt as coerceCfnInteger, L as planOrphanAdoption, Li as ssmResolvedValueType, Ln as refuseDivergentRecordRegionForDestroy, Lr as hasUnverifiableParameterRefusal, Lt as isUnboundTemplateParameter, M as refusesFinalSnapshot, Ma as StackHasActiveImportsError, Mi as resolveStateBucketWithDefault, Mn as malformedRenderedContainersWarning, Mr as CUSTOM_RESOURCE_RESPONSE_PREFIX, Mt as cfnRefValueFromPhysicalId, N as unsupportedFinalSnapshotError, Na as StackTerminationProtectionError, Ni as resolveStateBucketWithDefaultAndSource, Nn as malformedResourceEntriesWarning, Nr as DEFAULT_STATE_PREFIX, Nt as coerceParameterTypedValue, O as buildFinalSnapshotIdentifier, Oa as PartialFailureError, Oi as resolveApp, On as malformedOrphansRefusalMessage, Or as buildLockContentionMessage, Ot as isTerminationProtectionPropagationError, P as makeCanonicalizePropertiesFn, Pi as resolveUseCdkBootstrapAssets, Pn as malformedResourcePropertiesWarning, Pr as exportNamesCarriedFrom, Pt as getAccountInfo, Q as red, Qi as derivePartitionAndUrlSuffix, Qn as safeRegion, Qr as BOOTSTRAP_MARKER_PREFIX, Qt as requireConfigArray, R as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ra as normalizeAwsError, Ri as CFN_TEMPLATE_BODY_LIMIT, Rn as refuseMalformedNestedChildOutputs, Rr as importableOutputKeys, Rt as parameterTypeMayLoseSecretIdentity, S as computeParameterTaint, Sa as IntrinsicResolutionRefusalError, Si as AssetManifestLoader, Sn as hasReadableResources, Sr as scrubResourceRecord, St as isWaitAbandonedError, T as resourcesNamingDeclaredParameter, Ti as synthesisStatusMessage, Tn as malformedExportSourceWarning, Tr as rebuildClientForBucketRegion, Tt as deleteIndeterminateGuards, U as coerceWarmThroughput$1, Ua as isTransientServerError, Ui as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Un as refuseMalformedResourceEntries, Ur as shouldRetainResource, Ut as resolveExplicitPhysicalId, V as renderStatefulReason, Va as isRetryableTransientError, Vi as findLargeInlineResources, Vn as refuseMalformedOutputs, Vr as orphansAfterRollback, Vt as WAFv2WebACLProvider, W as isWarmThroughputDecrease, Wa as markNonRetryable, Wi as injectiveKey, Wn as refuseMalformedResourcePropertiesForOrphan, Wr as AssetPublisher, Wt as assertRegionMatch, X as gray, Xi as PARTITION_TABLE, Xn as repairMalformedResourcePropertiesForReadOnly, Xr as rewriteTemplateAssetReferences, Xt as readConfigString, Y as cyan, Yi as expectedOwnerParam, Yn as repairMalformedResourceEntriesForReadOnly, Yr as loadPublishableAssetManifest, Yt as configStringRefusal, Z as green, Zi as canonicalizeRegion, Zn as repairMalformedResourcesForReadOnly, Zr as AssetModeResolver, Zt as replayWarn, _ as bagHoldsSecretExpression, _i as redactDockerArgvValues, _n as UNREADABLE_ORPHANS_CONTAINER_ROW, _r as maskSecretsInError, _t as endCommandInterruptScope, a as DeploymentEventsStore, aa as nullPrototypeRecord, ai as validateAssetBucketName, an as s3BucketDomainName, ar as TemplateParser, at as secretBearingStateKeyWarning, b as mergeNoChangeOutputs, ba as DeployCancelledError, bi as escapeRegExp, bn as hasReadableOrphans, br as recoverMaskedOutput, bt as startInterruptWatch, c as replayFailedOperations, ca as resolveAssemblyPath, ci as buildDockerImage, cn as s3BucketWebsiteUrl, cr as STATE_SOURCED_READBACK_RULES, ct as IAMRoleProvider, d as updatePartialMessage, da as AwsClients, di as describeDockerExecFailure, dn as applyCallerIdentityCredentials, dr as createSecretMasker, dt as ProviderRegistry, ea as failedStageNote, ei as ensureAssetStorage, en as requireConfigString, er as findActionableSilentDrops, et as collectDeclaredOutputNames, f as updatePartialReason, fa as getAwsClients, fi as describeDockerFailure, fn as callerEnvCredentials, fr as dynamicReferenceTokens, ft as wouldReturnToSdkProvider, g as computeImplicitDeleteEdges, ga as CdkdError, gi as partitionSensitiveEnv, gn as STATE_RESOURCES_MALFORMED, gr as markSameGenerationBag, gt as beginCommandInterruptScope, h as IMPLICIT_DELETE_DEPENDENCIES, hi as getDockerCmd, hn as INTRINSIC_KEYS, hr as isSingleDynamicReferenceToken, ht as maskerOrIdentity, i as DeploymentEventsReader, ia as hasPlainPrototype, ii as readBootstrapMarkerBody, in as s3BucketArn, ir as DagBuilder, it as secretBearing, j as isFinalSnapshotError, ja as ResourceUpdateNotSupportedError, ji as resolveSkipPrefix, jn as malformedOutputsWarning, jr as shellQuote, jt as carriesFetchableDynamicReference, k as ccRoutedFinalSnapshotError, ka as ProvisioningError, ki as resolveAutoAssetStorage, kn as malformedOrphansWarning, kr as forceQuitRecoveryClause, kt as IntrinsicFunctionResolver, l as replayRollback, li as resolveDockerContextDirectory, ln as applyRoleArnIfSet, lr as TEMPLATE_SOURCED_RULES, lt as collectInlinePolicyNamesManagedBySiblings, m as maskingRetryLogger, ma as setAwsClients, mi as formatDockerLoginError, mn as DiffCalculator, mr as identityKeyFor, mt as maskDeep, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as defineOwnKey, ni as isCrossRegionRedirect, nn as producerRegionsFromState, nr as describeTypeWithThrottleRetry, nt as exportAliasCollisionScrubWarning, o as planFailedOps, oa as ownValue, oi as validateContainerRepoName, on as s3BucketDualStackDomainName, or as STATE_SOURCED_BASELINE_RULES, ot as secretSafeKeyDisplay, p as withResourceDeadline, pa as resetAwsClients, pi as dockerSpawnEnvWithSensitive, pn as envCredentialsAreAssumedRole, pr as errorCauseChain, pt as createMaskedRetryLogger, q as formatResourceLine, qa as describeAwsFailure, qi as producerRecordKey, qn as repairMalformedOrphansForReadOnly, qr as buildAssetRedirectMap, qt as configBooleanRefusal, r as DeployEngine, ra as hasOwnKey, ri as parseBootstrapMarker, rn as withSharedDrainBudget, rr as withRetry, rt as isExportAliasCollision, s as planRollback, sa as renderAssemblyPathEscape, si as buildDenyExternalAccessPolicy, sn as s3BucketRegionalDomainName, sr as STATE_SOURCED_CROSS_GENERATION_RULES, st as getCurrentResourceSecrets, t as DEFAULT_RESOURCE_TIMEOUT_MS, ta as processStackMessages, ti as getBootstrapMarkerKey, tn as classifyReplaySecretRegion, tr as findSilentDropProperties, tt as collectPublishedOutputNames, u as resolveReplacementOldType, ua as resolveBucketRegion, ui as describeDockerCapturedOutput, un as AWS_CREDENTIAL_ENV_KEYS, ur as carriesSecretMask, ut as clearOnUpdateRemoval, v as isSecretBearingReferenceString, va as CrossAccountSecretRefusalError, vi as runDockerForeground, vn as UNREADABLE_RESOURCES_MAP_ROW, vr as maskSecretsInText, vt as interruptWatchListenerCount, w as reachableDivergentParameters, wa as LocalStartServiceError, wi as Synthesizer, wn as malformedExportNamesWarning, wr as S3StateBackend, wt as UNSPECIFIED_SKIP_REASON, x as bindingSkippedOutputs, xa as DynamicReferenceRegionAmbiguousError, xi as stripControlChars, xn as hasReadableOutputs, xr as redactSecretsForState, xt as CloudControlProvider, y as keptWholeReasonText, yi as runDockerStreaming, yn as displayLogicalId, yr as recordMaskOnlyValue, yt as isInterruptedWaitError, z as isStatefulRecreateTargetForReplace, za as withErrorHandling, zi as CFN_TEMPLATE_URL_LIMIT, zn as refuseMalformedOrphans, zr as importableOutputs, zt as refStateLookupFromResource } from "./deploy-engine-BRy8S7QH.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-GASr9bAF.js";
|
|
3
3
|
import { n as awsClientDefaults } from "./aws-client-defaults-BoIxyCir.js";
|
|
4
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
-
import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as getCdkdVersion } from "./version-THOL_1Cg.js";
|
|
5
|
+
import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-BL_yHnHI.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";
|
|
@@ -2482,17 +2482,58 @@ function sortByDependency(stacks) {
|
|
|
2482
2482
|
}
|
|
2483
2483
|
/**
|
|
2484
2484
|
* Convert a StackInfo to its `--long` JSON representation.
|
|
2485
|
+
*
|
|
2486
|
+
* Every field is manifest-derived, so each renders through `displaySafe`
|
|
2487
|
+
* ([#3479](https://github.com/go-to-k/cdkd/issues/3479)). **The encoder is not
|
|
2488
|
+
* the boundary here** — measured per character rather than assumed: **neither
|
|
2489
|
+
* `JSON.stringify` nor `yaml` escapes DEL, the C1 range, `U+2028`/`U+2029` or
|
|
2490
|
+
* the bidi overrides.** So a `displayName` carrying `U+009B` reached the
|
|
2491
|
+
* terminal as a CSI byte inside what looks like a machine-readable document, on
|
|
2492
|
+
* stdout at default verbosity.
|
|
2493
|
+
*
|
|
2494
|
+
* Stated as the weakest claim that carries the argument, because the stronger
|
|
2495
|
+
* one was wrong twice: the two encoders do NOT agree on C0 (`JSON.stringify`
|
|
2496
|
+
* escapes all of it; `yaml` escapes NUL, CR and ESC, emits TAB raw and renders a
|
|
2497
|
+
* value containing LF as a literal block scalar). That half was never what this
|
|
2498
|
+
* rests on.
|
|
2499
|
+
*
|
|
2500
|
+
* Fidelity costs nothing: `displaySafe` neither quotes nor truncates, so every
|
|
2501
|
+
* legitimate name, account, region and dependency name is byte-identical, and
|
|
2502
|
+
* the only values it changes are ones no assembly should produce.
|
|
2503
|
+
*
|
|
2504
|
+
* One residual this does NOT close, recorded rather than implied away: a value
|
|
2505
|
+
* with nothing renderable left sanitizes to the EMPTY string, so a control-only
|
|
2506
|
+
* `displayName` emits `id: ""` here and a BLANK line in the default mode — which
|
|
2507
|
+
* reads as absent rather than as unrenderable. `UNRENDERABLE` is the repo's
|
|
2508
|
+
* answer for a field slot, and picking between them per slot is the open
|
|
2509
|
+
* "Helper choice, not only helper presence" row on
|
|
2510
|
+
* [#3479](https://github.com/go-to-k/cdkd/issues/3479), which covers the same
|
|
2511
|
+
* question for `assembly-reader.ts`. Deciding it here alone would leave the two
|
|
2512
|
+
* disagreeing.
|
|
2513
|
+
*
|
|
2514
|
+
* THE RESIDUAL THAT MATTERS HERE IS A COLLISION, not the empty string. This is
|
|
2515
|
+
* a MACHINE-READABLE payload, and sanitizing is many-to-one: `Prod<U+0085>Stack`
|
|
2516
|
+
* and a genuine `Prod Stack` both emit `name: "Prod Stack"`, and so do `Prod`
|
|
2517
|
+
* and `Prod ` (the trim). Pre-PR their bytes differed. So
|
|
2518
|
+
* `jq 'select(.name=="Prod Stack") | .environment.account'` can return TWO
|
|
2519
|
+
* accounts for what reads as one stack, and a script taking the first may take
|
|
2520
|
+
* the planted one. It fails safe for SELECTION — `matchStacks` matches the RAW
|
|
2521
|
+
* name, so `cdkd deploy` still resolves to the genuine stack and never the
|
|
2522
|
+
* planted one — which is why this is recorded rather than blocking, and why
|
|
2523
|
+
* `UNRENDERABLE`-vs-empty-vs-collision is one question rather than three. It is
|
|
2524
|
+
* folded into the open "Helper choice, not only helper presence" row on
|
|
2525
|
+
* [#3479](https://github.com/go-to-k/cdkd/issues/3479).
|
|
2485
2526
|
*/
|
|
2486
2527
|
function toLongRecord(stack, includeDeps) {
|
|
2487
2528
|
const record = {
|
|
2488
|
-
id: stack.displayName,
|
|
2489
|
-
name: stack.stackName,
|
|
2529
|
+
id: displaySafe(stack.displayName),
|
|
2530
|
+
name: displaySafe(stack.stackName),
|
|
2490
2531
|
environment: {
|
|
2491
|
-
account: stack.account ?? "unknown-account",
|
|
2492
|
-
region: stack.region ?? "unknown-region"
|
|
2532
|
+
account: displaySafe(stack.account ?? "unknown-account", { asciiOnly: true }),
|
|
2533
|
+
region: displaySafe(stack.region ?? "unknown-region", { asciiOnly: true })
|
|
2493
2534
|
}
|
|
2494
2535
|
};
|
|
2495
|
-
if (includeDeps) record.dependencies =
|
|
2536
|
+
if (includeDeps) record.dependencies = stack.dependencyNames.map((name) => displaySafe(name));
|
|
2496
2537
|
return record;
|
|
2497
2538
|
}
|
|
2498
2539
|
/**
|
|
@@ -2535,7 +2576,7 @@ async function listCommand(patterns, options) {
|
|
|
2535
2576
|
if (options.showDependencies) {
|
|
2536
2577
|
emitStructured(sorted.map((s) => ({
|
|
2537
2578
|
id: formatDisplayId(s),
|
|
2538
|
-
dependencies:
|
|
2579
|
+
dependencies: s.dependencyNames.map((name) => displaySafe(name))
|
|
2539
2580
|
})), options.json);
|
|
2540
2581
|
return;
|
|
2541
2582
|
}
|
|
@@ -2550,9 +2591,41 @@ async function listCommand(patterns, options) {
|
|
|
2550
2591
|
* in parens: `MyStage/MyStack (MyStage-MyStack)`. Otherwise just the display
|
|
2551
2592
|
* path. CDK CLI does this in `CloudFormationArtifact.displayName`; see
|
|
2552
2593
|
* aws-cdk-cli/packages/@aws-cdk/cloud-assembly-api/lib/artifacts/cloudformation-artifact.ts.
|
|
2594
|
+
*
|
|
2595
|
+
* Both names come from the Cloud Assembly and this is the MOST reachable render
|
|
2596
|
+
* of either in cdkd: the default mode writes one of these per line to stdout at
|
|
2597
|
+
* default verbosity, no error path involved, so `cdkd list -a ./cdk.out` over
|
|
2598
|
+
* someone else's assembly prints it. Hence `displaySafe`
|
|
2599
|
+
* ([#3479](https://github.com/go-to-k/cdkd/issues/3479)).
|
|
2600
|
+
*
|
|
2601
|
+
* `displaySafe`, and deliberately NOT `describeStack` from
|
|
2602
|
+
* `src/cli/stack-matcher.ts`, which sanitizes the same two fields for every
|
|
2603
|
+
* other command. Two reasons, either of which alone decides it:
|
|
2604
|
+
*
|
|
2605
|
+
* - `describeStack` renders `<stackName> (<displayName>)`; this format is the
|
|
2606
|
+
* other way round, because it is CDK CLI's "display id" and a `cdkd list`
|
|
2607
|
+
* line is fed back to `cdkd deploy`. Routing through the shared helper would
|
|
2608
|
+
* silently swap the two fields in a payload.
|
|
2609
|
+
* - `describeStack` uses `displayIdent`, which QUOTES a value that is not a
|
|
2610
|
+
* plain identifier — correct in the prose it serves ("which stack did you
|
|
2611
|
+
* mean"), wrong here: `new Stack(app, 'My Stack')` is legal and would start
|
|
2612
|
+
* printing `"My Stack"` into a stream a shell loop reads.
|
|
2613
|
+
*
|
|
2614
|
+
* Two residuals, shared with `describeStack` and recorded there too.
|
|
2615
|
+
* `displaySafe` TRIMS, so a construct id with a leading or trailing space
|
|
2616
|
+
* prints without it and the printed line is then not re-usable verbatim as a
|
|
2617
|
+
* pattern. And because sanitizing is MANY-TO-ONE, two distinct manifest entries
|
|
2618
|
+
* can print one identical line here — `MyStage/<U+0085>Api` and a genuine
|
|
2619
|
+
* `MyStage/ Api` both emit `MyStage/ Api`, so a `sort -u` over this stream
|
|
2620
|
+
* collapses them and a per-line consumer sees one stack where the assembly
|
|
2621
|
+
* declared two. `matchStacks` matches the RAW name, so SELECTION is unaffected
|
|
2622
|
+
* and a pasted line still resolves to the genuine stack; the collision is
|
|
2623
|
+
* recorded at `toLongRecord` and folded into the open helper-choice row on
|
|
2624
|
+
* [#3479](https://github.com/go-to-k/cdkd/issues/3479).
|
|
2553
2625
|
*/
|
|
2554
2626
|
function formatDisplayId(stack) {
|
|
2555
|
-
|
|
2627
|
+
const displayName = displaySafe(stack.displayName);
|
|
2628
|
+
return stack.displayName === stack.stackName ? displayName : `${displayName} (${displaySafe(stack.stackName)})`;
|
|
2556
2629
|
}
|
|
2557
2630
|
/**
|
|
2558
2631
|
* Emit a structured payload as either YAML (default, CDK CLI parity) or
|
|
@@ -85420,6 +85493,108 @@ async function rewriteSubTemplate(template, ownerLogicalId, pathPrefix, orphanSe
|
|
|
85420
85493
|
//#endregion
|
|
85421
85494
|
//#region src/cli/commands/orphan.ts
|
|
85422
85495
|
/**
|
|
85496
|
+
* `cdkd orphan` renders assembly-derived values — a stack's `stackName` /
|
|
85497
|
+
* `displayName`, a template logical id, an `aws:cdk:path` from the template's
|
|
85498
|
+
* own `Metadata`, a rewritten template VALUE — plus their state-derived
|
|
85499
|
+
* neighbours, in thrown messages AND in default-verbosity `logger.info` lines.
|
|
85500
|
+
* All of them go through a display helper
|
|
85501
|
+
* ([#3479](https://github.com/go-to-k/cdkd/issues/3479)), and which helper is
|
|
85502
|
+
* chosen per SENTENCE rather than per value:
|
|
85503
|
+
*
|
|
85504
|
+
* - `displaySafe` is the default. It neither quotes nor truncates, so every
|
|
85505
|
+
* legitimate value is byte-identical — including in a message whose own prose
|
|
85506
|
+
* already supplies the quotes (`stack '<name>'`), where `displayIdent` would
|
|
85507
|
+
* double-quote.
|
|
85508
|
+
* - `displayIdent` (capped at `STACK_REF_MAX_CODE_POINTS`, so a deep nested path
|
|
85509
|
+
* is not cut) serves every UNQUOTED LIST whose job is the value's IDENTITY —
|
|
85510
|
+
* which names the user could have meant. That is each `Available: ...` list
|
|
85511
|
+
* and, since they share one sentence with one, the `missing` half of
|
|
85512
|
+
* `Resource(s) not in state`. There `displaySafe`
|
|
85513
|
+
* is not enough: it maps the stripped character to a space and then TRIMS, so a
|
|
85514
|
+
* planted `us-east-1` plus a line terminator renders byte-identical to the
|
|
85515
|
+
* genuine `us-east-1` and the message lists the very value it says is missing
|
|
85516
|
+
* (measured). This is the same choice `describeStack` makes for the same class
|
|
85517
|
+
* of sentence. The population is `grep displayIdent` — which catches
|
|
85518
|
+
* `displayIdentList` and `displayRegionList` alike — rather than a count here,
|
|
85519
|
+
* which is what goes stale.
|
|
85520
|
+
*
|
|
85521
|
+
* A JOINED list sanitizes per ELEMENT — load-bearing for `displayIdent`, whose
|
|
85522
|
+
* boundary is per value, and a formatting rule for `displaySafe`; its own doc
|
|
85523
|
+
* carries the difference.
|
|
85524
|
+
*
|
|
85525
|
+
* Deliberately NOT sanitized: `pathArgs` and the `<head>` segment parsed out of
|
|
85526
|
+
* one. Those are the operator's own argv echoed back, a different trust bucket
|
|
85527
|
+
* from the assembly, and `renderNoStackMatch` renders a user-supplied pattern
|
|
85528
|
+
* the same way. The one place argv goes into a PASTEABLE command
|
|
85529
|
+
* (`cdkd state orphan <p>`) is `isPasteableIdent`'s class rather than this
|
|
85530
|
+
* one — [.claude/rules/pasteable-ident.md](../../../.claude/rules/pasteable-ident.md),
|
|
85531
|
+
* tracked on go-to-k/cdkd#3436.
|
|
85532
|
+
*/
|
|
85533
|
+
/** Every element sanitized, then joined with the list separator. */
|
|
85534
|
+
function displaySafeList(values) {
|
|
85535
|
+
return values.map((value) => displaySafe(value)).join(", ");
|
|
85536
|
+
}
|
|
85537
|
+
/**
|
|
85538
|
+
* One `Available:` entry per element, each with a visible boundary.
|
|
85539
|
+
*
|
|
85540
|
+
* **This helper is NOT the identity on every legitimate value**, and the
|
|
85541
|
+
* difference is the point: `displayIdent` JSON-quotes anything outside
|
|
85542
|
+
* `PLAIN_IDENT`, and a construct id may legitimately carry a space
|
|
85543
|
+
* (`new Table(this, 'My Table')` is legal — `constructs` rewrites only `/`), so
|
|
85544
|
+
* `MyStack/My Table/Resource` renders quoted in `Available paths:`. Accepted
|
|
85545
|
+
* here for the reason `describeStack` accepts it: these sentences exist to say
|
|
85546
|
+
* which values are valid, and the alternative passes the spaces and quotes a
|
|
85547
|
+
* crafted value needs. It is why `cdkd list`'s PAYLOAD does not use it.
|
|
85548
|
+
*/
|
|
85549
|
+
function displayIdentList(values, separator) {
|
|
85550
|
+
return values.map((value) => displayIdent(value, { maxCodePoints: STACK_REF_MAX_CODE_POINTS })).join(separator);
|
|
85551
|
+
}
|
|
85552
|
+
/**
|
|
85553
|
+
* The `Available regions: ...` lists, which are identity sentences over a
|
|
85554
|
+
* STATE-derived region.
|
|
85555
|
+
*
|
|
85556
|
+
* A REGION has a known ASCII charset, so every OTHER render of one in this file
|
|
85557
|
+
* passes `asciiOnly` — the positive allowlist `display-safe.ts`'s own header
|
|
85558
|
+
* asks such a caller for, and the only mode with no invisible-formatter
|
|
85559
|
+
* residual. Measured: plain `displaySafe` keeps a zero-width space planted
|
|
85560
|
+
* inside a region name; `{ asciiOnly: true }` does not. `displayIdent` already
|
|
85561
|
+
* applies that allowlist, so these two lists need no second spelling of it.
|
|
85562
|
+
*
|
|
85563
|
+
* `displayIdent` for a real region and the bare literal for a legacy ref with
|
|
85564
|
+
* none. Measured: `displaySafe('us-east-1' + U+0085)` is `'us-east-1'`, so
|
|
85565
|
+
* under `displaySafe` a planted state key makes `pickStackRegion` print
|
|
85566
|
+
* `Available regions: us-east-1.` in the sentence that just said that region
|
|
85567
|
+
* holds no state, and `multiple regions: us-east-1, us-east-1` in the other.
|
|
85568
|
+
* THE CAP IS THE 255 DEFAULT, deliberately, and NOT the
|
|
85569
|
+
* `STACK_REF_MAX_CODE_POINTS` its sibling `displayIdentList` passes. A region's
|
|
85570
|
+
* grammar is ~25 characters, so the default is already generous, and
|
|
85571
|
+
* `display-safe.ts` asks each caller to keep the TIGHTEST cap its grammar
|
|
85572
|
+
* allows — a region read out of a planted S3 key segment is unbounded, and the
|
|
85573
|
+
* tighter cap is what bounds that payload. The wider one was passed here first
|
|
85574
|
+
* for symmetry with the path list, which is the wrong reason: a construct path
|
|
85575
|
+
* genuinely exceeds 255 and a region never does.
|
|
85576
|
+
*
|
|
85577
|
+
* `(legacy)` is cdkd's OWN placeholder, not a value read from anywhere, and it
|
|
85578
|
+
* is outside `PLAIN_IDENT`, so routing it through the helper would quote a
|
|
85579
|
+
* string no attacker controls. **The carve-out is SAFE because of that same
|
|
85580
|
+
* fact**: `PLAIN_IDENT` excludes `(` and `)`, so a state key segment literally
|
|
85581
|
+
* named `(legacy)` renders QUOTED through `displayIdent` and cannot be mistaken
|
|
85582
|
+
* for this bare placeholder. A future widening of `PLAIN_IDENT` to admit
|
|
85583
|
+
* parentheses would silently break that, which is why the dependency is written
|
|
85584
|
+
* down rather than left to be re-derived.
|
|
85585
|
+
*
|
|
85586
|
+
* ONE RENDERING CHANGES, recorded rather than implied away: a ref whose `region`
|
|
85587
|
+
* is the EMPTY string used to print an empty slot (`us-east-1, , eu-west-1`) and
|
|
85588
|
+
* now prints `<unrenderable>`. `s3-state-backend.ts` only sets `region` when the
|
|
85589
|
+
* key segment is non-empty, so it is reachable at most from a hand-written
|
|
85590
|
+
* record; and an invisible entry in a comma list is the failure `UNRENDERABLE`
|
|
85591
|
+
* exists to prevent, so this is the direction to fail in. `undefined` — the
|
|
85592
|
+
* shape a legacy ref actually has — is unaffected.
|
|
85593
|
+
*/
|
|
85594
|
+
function displayRegionList(refs) {
|
|
85595
|
+
return refs.map((ref) => ref.region === void 0 ? "(legacy)" : displayIdent(ref.region)).join(", ");
|
|
85596
|
+
}
|
|
85597
|
+
/**
|
|
85423
85598
|
* `cdkd orphan <constructPath>...` — per-resource orphan, mirrors upstream
|
|
85424
85599
|
* `cdk orphan --unstable=orphan`.
|
|
85425
85600
|
*
|
|
@@ -85505,7 +85680,7 @@ async function orphanCommand(pathArgs, options) {
|
|
|
85505
85680
|
const stackInfo = resolved.stack;
|
|
85506
85681
|
const orphanLogicalIds = resolved.logicalIds;
|
|
85507
85682
|
const { region: targetRegion, recordRegion } = await pickStackRegion(stateBackend, stackInfo.stackName, stackInfo.region, options.stackRegion);
|
|
85508
|
-
logger.info(`Target: ${stackInfo.stackName} (${targetRegion}); orphaning ${orphanLogicalIds.length} resource(s): ${orphanLogicalIds
|
|
85683
|
+
logger.info(`Target: ${displaySafe(stackInfo.stackName)} (${displaySafe(targetRegion, { asciiOnly: true })}); orphaning ${orphanLogicalIds.length} resource(s): ${displaySafeList(orphanLogicalIds)}`);
|
|
85509
85684
|
const owner = `${process.env["USER"] || "unknown"}@${process.env["HOSTNAME"] || "host"}:${process.pid}`;
|
|
85510
85685
|
const recovery = {
|
|
85511
85686
|
profile: options.profile,
|
|
@@ -85522,15 +85697,15 @@ async function orphanCommand(pathArgs, options) {
|
|
|
85522
85697
|
}
|
|
85523
85698
|
try {
|
|
85524
85699
|
const stateData = await stateBackend.getState(stackInfo.stackName, targetRegion);
|
|
85525
|
-
if (!stateData) throw new Error(`No state found for stack '${stackInfo.stackName}' (${targetRegion}). Nothing to orphan. (Did the stack get deployed?)`);
|
|
85700
|
+
if (!stateData) throw new Error(`No state found for stack '${displaySafe(stackInfo.stackName)}' (${displaySafe(targetRegion, { asciiOnly: true })}). Nothing to orphan. (Did the stack get deployed?)`);
|
|
85526
85701
|
const { state, etag, migrationPending } = stateData;
|
|
85527
85702
|
refuseMalformedState(state, stackInfo.stackName, targetRegion);
|
|
85528
85703
|
refuseMalformedOutputs(state, stackInfo.stackName, targetRegion);
|
|
85529
85704
|
refuseMalformedResourcePropertiesForOrphan(state, orphanLogicalIds, stackInfo.stackName, recordRegion, recovery);
|
|
85530
85705
|
const missing = orphanLogicalIds.filter((id) => !(id in state.resources));
|
|
85531
85706
|
if (missing.length > 0) {
|
|
85532
|
-
const have = Object.keys(state.resources
|
|
85533
|
-
throw new Error(`Resource(s) not in state for stack '${stackInfo.stackName}' (${targetRegion}): ${missing
|
|
85707
|
+
const have = displayIdentList(Object.keys(state.resources), ", ");
|
|
85708
|
+
throw new Error(`Resource(s) not in state for stack '${displaySafe(stackInfo.stackName)}' (${displaySafe(targetRegion, { asciiOnly: true })}): ${displayIdentList(missing, ", ")}.\nAvailable logical IDs: ${have}`);
|
|
85534
85709
|
}
|
|
85535
85710
|
const providerRegistry = new ProviderRegistry();
|
|
85536
85711
|
registerAllProviders(providerRegistry);
|
|
@@ -85549,7 +85724,7 @@ async function orphanCommand(pathArgs, options) {
|
|
|
85549
85724
|
return;
|
|
85550
85725
|
}
|
|
85551
85726
|
if (!options.yes && !options.force) {
|
|
85552
|
-
if (!await confirmPrompt$1(`Orphan ${orphanLogicalIds.length} resource(s) from cdkd state for ${stackInfo.stackName} (${targetRegion})? AWS resources will NOT be deleted.`)) {
|
|
85727
|
+
if (!await confirmPrompt$1(`Orphan ${orphanLogicalIds.length} resource(s) from cdkd state for ${displaySafe(stackInfo.stackName)} (${displaySafe(targetRegion, { asciiOnly: true })})? AWS resources will NOT be deleted.`)) {
|
|
85553
85728
|
logger.info("Orphan cancelled.");
|
|
85554
85729
|
return;
|
|
85555
85730
|
}
|
|
@@ -85558,10 +85733,10 @@ async function orphanCommand(pathArgs, options) {
|
|
|
85558
85733
|
expectedEtag: etag,
|
|
85559
85734
|
...migrationPending && { migrateLegacy: true }
|
|
85560
85735
|
});
|
|
85561
|
-
logger.info(`Orphaned ${orphanLogicalIds.length} resource(s) from state: ${stackInfo.stackName} (${targetRegion}). AWS resources are still in AWS; cdkd will no longer manage them.`);
|
|
85736
|
+
logger.info(`Orphaned ${orphanLogicalIds.length} resource(s) from state: ${displaySafe(stackInfo.stackName)} (${displaySafe(targetRegion, { asciiOnly: true })}). AWS resources are still in AWS; cdkd will no longer manage them.`);
|
|
85562
85737
|
} finally {
|
|
85563
85738
|
if (!options.dryRun) await lockManager.releaseLock(stackInfo.stackName, targetRegion).catch((err) => {
|
|
85564
|
-
logger.warn(`Failed to release lock: ${err instanceof Error ? err.message : String(err)}`);
|
|
85739
|
+
logger.warn(`Failed to release lock: ${displayAwsMessage(err instanceof Error ? err.message : String(err))}`);
|
|
85565
85740
|
});
|
|
85566
85741
|
}
|
|
85567
85742
|
} finally {
|
|
@@ -85593,16 +85768,16 @@ function resolveConstructPaths(paths, stacks) {
|
|
|
85593
85768
|
const head = p.slice(0, slash);
|
|
85594
85769
|
const candidate = byDisplayName.get(head) ?? byStackName.get(head);
|
|
85595
85770
|
if (!candidate) {
|
|
85596
|
-
const available = stacks.map((s) => s.displayName ?? s.stackName)
|
|
85771
|
+
const available = displayIdentList(stacks.map((s) => s.displayName ?? s.stackName), ", ");
|
|
85597
85772
|
throw new Error(`Construct path '${p}': stack '${head}' not found in synthesized app. Available: ${available}`);
|
|
85598
85773
|
}
|
|
85599
85774
|
if (stack === void 0) stack = candidate;
|
|
85600
|
-
else if (stack.stackName !== candidate.stackName) throw new Error(`All construct paths must reference the same stack. Got '${stack.stackName}' and '${candidate.stackName}'. Run 'cdkd orphan' once per stack.`);
|
|
85775
|
+
else if (stack.stackName !== candidate.stackName) throw new Error(`All construct paths must reference the same stack. Got '${displaySafe(stack.stackName)}' and '${displaySafe(candidate.stackName)}'. Run 'cdkd orphan' once per stack.`);
|
|
85601
85776
|
const index = buildCdkPathIndex(candidate.template);
|
|
85602
85777
|
const matches = resolveCdkPathToLogicalIds(p, index);
|
|
85603
85778
|
if (matches.length === 0) {
|
|
85604
|
-
const available = [...index.keys()].sort()
|
|
85605
|
-
throw new Error(`Construct path '${p}' not found in template for stack '${candidate.stackName}'.\nAvailable paths:\n ${available}`);
|
|
85779
|
+
const available = displayIdentList([...index.keys()].sort(), "\n ");
|
|
85780
|
+
throw new Error(`Construct path '${p}' not found in template for stack '${displaySafe(candidate.stackName)}'.\nAvailable paths:\n ${available}`);
|
|
85606
85781
|
}
|
|
85607
85782
|
for (const { logicalId } of matches) if (!logicalIds.includes(logicalId)) logicalIds.push(logicalId);
|
|
85608
85783
|
}
|
|
@@ -85629,12 +85804,12 @@ async function pickStackRegion(stateBackend, stackName, synthRegion, flag) {
|
|
|
85629
85804
|
region: synthRegion,
|
|
85630
85805
|
recordRegion: synthRegion
|
|
85631
85806
|
};
|
|
85632
|
-
throw new Error(`No state found for stack '${stackName}'. Run 'cdkd state list' to see available stacks.`);
|
|
85807
|
+
throw new Error(`No state found for stack '${displaySafe(stackName)}'. Run 'cdkd state list' to see available stacks.`);
|
|
85633
85808
|
}
|
|
85634
85809
|
if (flag) {
|
|
85635
85810
|
if (!refs.find((r) => r.region === flag)) {
|
|
85636
|
-
const seen = refs
|
|
85637
|
-
throw new Error(`No state found for stack '${stackName}' in region '${flag}'. Available regions: ${seen}.`);
|
|
85811
|
+
const seen = displayRegionList(refs);
|
|
85812
|
+
throw new Error(`No state found for stack '${displaySafe(stackName)}' in region '${flag}'. Available regions: ${seen}.`);
|
|
85638
85813
|
}
|
|
85639
85814
|
return {
|
|
85640
85815
|
region: flag,
|
|
@@ -85654,13 +85829,13 @@ async function pickStackRegion(stateBackend, stackName, synthRegion, flag) {
|
|
|
85654
85829
|
recordRegion
|
|
85655
85830
|
};
|
|
85656
85831
|
}
|
|
85657
|
-
const regions = refs
|
|
85658
|
-
throw new Error(`Stack '${stackName}' has state in multiple regions: ${regions}. Re-run with --stack-region <region> to disambiguate.`);
|
|
85832
|
+
const regions = displayRegionList(refs);
|
|
85833
|
+
throw new Error(`Stack '${displaySafe(stackName)}' has state in multiple regions: ${regions}. Re-run with --stack-region <region> to disambiguate.`);
|
|
85659
85834
|
}
|
|
85660
85835
|
function printRewriteSummary(rewrites, orphanLogicalIds) {
|
|
85661
85836
|
const logger = getLogger();
|
|
85662
85837
|
logger.info("");
|
|
85663
|
-
logger.info(`Orphaning ${orphanLogicalIds.length} resource(s): ${orphanLogicalIds
|
|
85838
|
+
logger.info(`Orphaning ${orphanLogicalIds.length} resource(s): ${displaySafeList(orphanLogicalIds)}`);
|
|
85664
85839
|
if (rewrites.length === 0) {
|
|
85665
85840
|
logger.info(" No sibling references — every reference was already to a non-orphan resource.");
|
|
85666
85841
|
return;
|
|
@@ -85669,17 +85844,23 @@ function printRewriteSummary(rewrites, orphanLogicalIds) {
|
|
|
85669
85844
|
for (const r of rewrites) {
|
|
85670
85845
|
const before = stringifyForAudit(r.before);
|
|
85671
85846
|
const after = r.kind === "dependency" ? "(dropped)" : stringifyForAudit(r.after);
|
|
85672
|
-
logger.info(` [${r.kind}] ${r.logicalId}.${r.path}: ${before} → ${after}`);
|
|
85847
|
+
logger.info(` [${r.kind}] ${displaySafe(r.logicalId)}.${displaySafe(r.path)}: ${before} → ${after}`);
|
|
85673
85848
|
}
|
|
85674
85849
|
}
|
|
85675
85850
|
function printUnresolvable(unresolvable) {
|
|
85676
85851
|
const logger = getLogger();
|
|
85677
85852
|
logger.error(`${unresolvable.length} reference(s) could not be resolved:`);
|
|
85678
|
-
for (const u of unresolvable) logger.error(` ${u.logicalId}.${u.path}: ${u.orphanLogicalId}.${u.attribute} — ${u.reason}`);
|
|
85853
|
+
for (const u of unresolvable) logger.error(` ${displaySafe(u.logicalId)}.${displaySafe(u.path)}: ${displaySafe(u.orphanLogicalId)}.${displaySafe(u.attribute)} — ${displaySafe(u.reason)}`);
|
|
85679
85854
|
}
|
|
85855
|
+
/**
|
|
85856
|
+
* A rewrite's before / after is a TEMPLATE value, so it is sanitized after
|
|
85857
|
+
* serialization ([#3479](https://github.com/go-to-k/cdkd/issues/3479)).
|
|
85858
|
+
* `JSON.stringify` is not the boundary on its own — measured: it escapes C0 but
|
|
85859
|
+
* nothing above, so DEL, the C1 range, `U+2028`/`U+2029` and the bidi overrides
|
|
85860
|
+
* pass straight through, and `U+009B` is read as CSI by a UTF-8 xterm.
|
|
85861
|
+
*/
|
|
85680
85862
|
function stringifyForAudit(value) {
|
|
85681
|
-
|
|
85682
|
-
return JSON.stringify(value);
|
|
85863
|
+
return displaySafe(JSON.stringify(value) ?? String(value));
|
|
85683
85864
|
}
|
|
85684
85865
|
/**
|
|
85685
85866
|
* `cdkd orphan`'s confirmation prompt. Its only call site is inside the
|
|
@@ -97361,4 +97542,4 @@ function buildProgram() {
|
|
|
97361
97542
|
|
|
97362
97543
|
//#endregion
|
|
97363
97544
|
export { buildProgram };
|
|
97364
|
-
//# sourceMappingURL=program-
|
|
97545
|
+
//# sourceMappingURL=program-OigOAssB.js.map
|