@go-to-k/cdkd 0.284.35 → 0.284.36
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-bJ8nim2C.js → asg-provider-2wQUtu7f.js} +2 -2
- package/dist/{asg-provider-bJ8nim2C.js.map → asg-provider-2wQUtu7f.js.map} +1 -1
- package/dist/cli.js +45 -3
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-Wei5Yw-_.js → deploy-engine-Csb2eS97.js} +296 -222
- package/dist/deploy-engine-Csb2eS97.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-Wei5Yw-_.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as startInterruptWatch, $t as buildAssetRedirectMap, A as renderStatefulReason, An as resolveStateBucketWithDefaultAndSource, At as redactSecretsForState, B as exportAliasCollisionScrubWarning, Bn as PARTITION_TABLE, Bt as DiffCalculator, C as isFinalSnapshotError, Cn as getDefaultStateBucketName, Cr as isRetryableTransientError, Ct as TEMPLATE_SOURCED_RULES, D as extractDeploymentEventError, Dn as resolveCaptureObservedState, Dt as isSingleDynamicReferenceToken, E as makeCanonicalizePropertiesFn, En as resolveAutoAssetStorage, Et as errorCauseChain, F as green, Fn as CFN_TEMPLATE_URL_LIMIT, Ft as s3BucketDomainName, G as collectInlinePolicyNamesManagedBySiblings, Gt as TemplateParser, H as secretBearingStateKeyWarning, Hn as derivePartitionAndUrlSuffix, Ht as describeTypeWithThrottleRetry, I as red, In as MIGRATE_TMP_PREFIX, It as s3BucketDualStackDomainName, J as findActionableSilentDrops, Jn as getAwsClients, Jt as rebuildClientForBucketRegion, K as clearOnUpdateRemoval, Kn as resolveBucketRegion, Kt as LockManager, L as yellow, Ln as findLargeInlineResources, Lt as s3BucketRegionalDomainName, M as bold, Mn as stateBucketExistenceConfirmed, Mt as classifyReplaySecretRegion, N as cyan, Nn as warnDeprecatedNoPrefixCliFlag, Nt as producerRegionsFromState, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as resolveSkipPrefix, Ot as maskSecretsInError, P as gray, Pn as CFN_TEMPLATE_BODY_LIMIT, Pt as s3BucketArn, Q as isInterruptedWaitError, Qn as CdkdError, Qt as WorkGraph, R as collectDeclaredOutputNames, Rn as uploadCfnTemplate, Rt as s3BucketWebsiteUrl, S as createPreDeleteFinalSnapshot, Sn as synthesisStatusMessage, Sr as isMarkedNonRetryable, St as STATE_SOURCED_READBACK_RULES, T as unsupportedFinalSnapshotError, Tn as resolveApp, Tr as markNonRetryable, Tt as dynamicReferenceTokens, U as stateKeySecretExposure, Un as AssemblyReader, Ut as withRetry, V as isExportAliasCollision, Vn as canonicalizeRegion, Vt as INTRINSIC_KEYS, W as IAMRoleProvider, Wn as processStackMessages, Wt as DagBuilder, X as beginCommandInterruptScope, Xn as setAwsClients, Xt as AssetPublisher, Y as findSilentDropProperties, Yn as resetAwsClients, Yt as shouldRetainResource, Z as endCommandInterruptScope, Zt as stringifyValue, _ as computeImplicitDeleteEdges, _n as runDockerForeground, _t as replayWarn, a as DeploymentEventsStore, an as AssetModeResolver, ar as LocalMigrateError, at as carriesDynamicReference, b as buildFinalSnapshotIdentifier, bn as getDockerImageBySourceHash, br as normalizeAwsError, bt as requireConfigString, c as replayFailedOperations, cn as getBootstrapMarkerKey, cr as MissingCdkCliError, ct as refStateLookupFromResource, d as updatePartialReason, dn as validateAssetBucketName, dr as ProvisioningError, dt as resolveExplicitPhysicalId, en as createAssetRedirectResolver, er as CrossAccountSecretRefusalError, et as CloudControlProvider, f as UNSPECIFIED_SKIP_REASON, fn as validateContainerRepoName, fr as ResourceTimeoutError, ft as assertRegionMatch, g as IMPLICIT_DELETE_DEPENDENCIES, gn as getDockerCmd, gt as readConfigString, h as maskingRetryLogger, hn as formatDockerLoginError, hr as StackTerminationProtectionError, ht as configStringRefusal, i as DeploymentEventsReader, in as stripControlChars, ir as LocalInvokeBuildError$1, it as IntrinsicFunctionResolver, j as formatResourceLine, jn as resolveUseCdkBootstrapAssets, jt as scrubResourceRecord, k as isStatefulRecreateTargetSync, kn as resolveStateBucketWithDefault, kt as maskSecretsInText, l as replayRollback, ln as parseBootstrapMarker, lr as NestedStackChildDirectDestroyError, lt as WAFv2WebACLProvider, m as withResourceDeadline, mn as buildDockerImage, mr as StackHasActiveImportsError, mt as configBooleanRefusal, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as rewriteTemplateAssetReferences, nr as DeployCancelledError, nt as disableInstanceApiTermination, o as planFailedOps, on as BOOTSTRAP_MARKER_PREFIX, or as LocalStartServiceError, ot as cfnRefValueFromPhysicalId, p as deleteSkipReason, pn as buildDenyExternalAccessPolicy, pr as ResourceUpdateNotSupportedError, pt as coerceCfnBoolean, q as ProviderRegistry, qn as AwsClients, qt as S3StateBackend, r as DeployEngine, rn as escapeRegExp, rr as DynamicReferenceRegionAmbiguousError, rt as isTerminationProtectionPropagationError, s as planRollback, sn as ensureAssetStorage, st as getAccountInfo, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as loadPublishableAssetManifest, tt as slowCcOperationTimeoutMs, u as updatePartialMessage, un as readBootstrapMarkerBody, ur as PartialFailureError, ut as normalizeAwsTagsToCfn, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as runDockerStreaming, vt as requireConfigArray, w as refusesFinalSnapshot, wn as getLegacyStateBucketName, wr as isThrottlingError, wt as createSecretMasker, x as ccRoutedFinalSnapshotError, xn as Synthesizer, xr as withErrorHandling, xt as STATE_SOURCED_CROSS_GENERATION_RULES, y as PRE_DELETE_SNAPSHOT_TYPES, yn as AssetManifestLoader, yt as requireConfigObject, z as collectPublishedOutputNames, zn as expectedOwnerParam, zt as applyRoleArnIfSet } from "./deploy-engine-Csb2eS97.js";
|
|
3
3
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as getCurrentStackName, h as withStackName, i as runStackBuffered, m as withSkipPrefix, n as getLogger, o as PATTERN_B_NAME_OPTIONS, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-zRrlbaQt.js";
|
|
4
|
-
import { t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-2wQUtu7f.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
7
7
|
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, 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";
|
|
@@ -63637,6 +63637,44 @@ function buildExportOwnerIndex(templates) {
|
|
|
63637
63637
|
return owners;
|
|
63638
63638
|
}
|
|
63639
63639
|
/**
|
|
63640
|
+
* Is this the issue #2134 refusal -- a `{{resolve:...}}` reference whose region
|
|
63641
|
+
* cdkd cannot establish?
|
|
63642
|
+
*
|
|
63643
|
+
* WHY IT IS NOT BEST-EFFORT, which is the whole reason this predicate exists.
|
|
63644
|
+
* `scrubStack` wraps each resolution pass in a `catch { logger.debug }` so one
|
|
63645
|
+
* unresolvable resource does not abandon the rest of the scrub. Every other
|
|
63646
|
+
* error reaching those catches means "this resource resolved partially, carry
|
|
63647
|
+
* on". This one means cdkd could not tell which region owns a secret reference,
|
|
63648
|
+
* so NO NEEDLE was recorded for it and the plaintext is still in `state.json` --
|
|
63649
|
+
* and swallowed, the command then reports `No plaintext secrets found` and
|
|
63650
|
+
* exits 0 over exactly the state it exists to clean. That is why the pre-pass
|
|
63651
|
+
* refusals are placed OUTSIDE those catches; this one is raised from inside
|
|
63652
|
+
* `resolveDynamicReferences`, so it cannot be placed and has to be re-raised.
|
|
63653
|
+
*
|
|
63654
|
+
* By CAUSE CHAIN rather than a bare `instanceof`, for the reason
|
|
63655
|
+
* {@link isByDesignRefusal} states: the refusal reaches those catches through
|
|
63656
|
+
* `resolver.resolve`, which wraps in several places, so a top-link-only test
|
|
63657
|
+
* silently swallows a wrapped one.
|
|
63658
|
+
*
|
|
63659
|
+
* TWO SITES IN THIS CALL GRAPH STILL SWALLOW IT, named rather than left to be
|
|
63660
|
+
* rediscovered (issue #2134 review round 2):
|
|
63661
|
+
*
|
|
63662
|
+
* - `evaluateConditions` (`intrinsic-function-resolver.ts`) warns and degrades
|
|
63663
|
+
* the condition to `false`. Accepted for now: a condition evaluates to a
|
|
63664
|
+
* boolean and carries no secret INTO state, and this file's own note above
|
|
63665
|
+
* `resolveCrossStackReads` records why the conditions pass is deliberately
|
|
63666
|
+
* not refusal-armed -- it runs BEFORE scrub knows which branch the deploy
|
|
63667
|
+
* took, so refusing there can reject a whole stack over a branch never taken.
|
|
63668
|
+
* The residual is that the FALSE branch is then selected, which that note
|
|
63669
|
+
* already states.
|
|
63670
|
+
* - the `!nodeCanRefuse` arm of the cross-stack pre-pass, which debugs and
|
|
63671
|
+
* returns. Defensible: a SUPPRESSED output writes no state key, so there is
|
|
63672
|
+
* no persisted plaintext for a missing needle to leave behind.
|
|
63673
|
+
*/
|
|
63674
|
+
function isRegionAmbiguousRefusal(err) {
|
|
63675
|
+
return err instanceof Error && errorCauseChain(err).some((link) => link instanceof DynamicReferenceRegionAmbiguousError);
|
|
63676
|
+
}
|
|
63677
|
+
/**
|
|
63640
63678
|
* Build the CROSS-STACK pre-pass for ONE stack's scrub (issue
|
|
63641
63679
|
* [#2133](https://github.com/go-to-k/cdkd/issues/2133)).
|
|
63642
63680
|
*
|
|
@@ -63969,6 +64007,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
63969
64007
|
stackName: stack.stackName,
|
|
63970
64008
|
stateBackend: resolverStateBackend,
|
|
63971
64009
|
...recordedSecretValues && { recordedSecretValues },
|
|
64010
|
+
producerRegions,
|
|
63972
64011
|
bestEffort: true
|
|
63973
64012
|
});
|
|
63974
64013
|
const resolveCrossStackReads = makeCrossStackPrePass({
|
|
@@ -64002,6 +64041,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
64002
64041
|
try {
|
|
64003
64042
|
await resolver.resolve(resolveInput, resourceContext);
|
|
64004
64043
|
} catch (err) {
|
|
64044
|
+
if (isRegionAmbiguousRefusal(err)) throw err;
|
|
64005
64045
|
logger.debug(`Resolution of ${logicalId} during scrub was partial: ${maskSecretsInText(err instanceof Error ? err.message : String(err), recordedSecretValues)}`);
|
|
64006
64046
|
}
|
|
64007
64047
|
perResourceTemplateProps.set(logicalId, templateResource.Properties);
|
|
@@ -64029,6 +64069,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
64029
64069
|
try {
|
|
64030
64070
|
exportName = await resolver.resolve(nameSource, nameContext);
|
|
64031
64071
|
} catch (err) {
|
|
64072
|
+
if (isRegionAmbiguousRefusal(err)) throw err;
|
|
64032
64073
|
outputsSourceUntrusted = true;
|
|
64033
64074
|
logger.warn(`Export.Name of output ${name} could not be resolved during scrub (${maskSecretsInText(err instanceof Error ? err.message : String(err), outputSecrets)}) — redacting this stack's outputs by value match instead of by template position, since state may be keyed under a name this run cannot reproduce.`);
|
|
64034
64075
|
}
|
|
@@ -64063,6 +64104,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
64063
64104
|
try {
|
|
64064
64105
|
await resolver.resolve(valueSource, valueContext);
|
|
64065
64106
|
} catch (err) {
|
|
64107
|
+
if (isRegionAmbiguousRefusal(err)) throw err;
|
|
64066
64108
|
logger.debug(`Resolution of output ${name} during scrub was partial: ${maskSecretsInText(err instanceof Error ? err.message : String(err), outputSecrets)}`);
|
|
64067
64109
|
}
|
|
64068
64110
|
}
|
|
@@ -86049,7 +86091,7 @@ function createMigrateCommand() {
|
|
|
86049
86091
|
*/
|
|
86050
86092
|
function buildProgram() {
|
|
86051
86093
|
const program = new Command();
|
|
86052
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.
|
|
86094
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.36");
|
|
86053
86095
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
86054
86096
|
const { profile } = actionCommand.optsWithGlobals();
|
|
86055
86097
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|