@go-to-k/cdkd 0.284.18 → 0.284.20
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-IPF2MfAC.js → asg-provider-Cq-oDB62.js} +2 -2
- package/dist/{asg-provider-IPF2MfAC.js.map → asg-provider-Cq-oDB62.js.map} +1 -1
- package/dist/cli.js +16 -55
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-HK-oROJf.js → deploy-engine-C6gt7NcL.js} +237 -23
- package/dist/deploy-engine-C6gt7NcL.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-HK-oROJf.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as isTerminationProtectionPropagationError, $n as
|
|
2
|
+
import { $ as isTerminationProtectionPropagationError, $n as PartialFailureError, $t as getBootstrapMarkerKey, A as renderStatefulReason, An as expectedOwnerParam, At as applyRoleArnIfSet, B as exportAliasCollisionScrubWarning, Bn as resetAwsClients, Bt as shouldRetainResource, C as isFinalSnapshotError, Cn as stateBucketExistenceConfirmed, Ct as redactSecretsForState, D as extractDeploymentEventError, Dn as MIGRATE_TMP_PREFIX, Dt as s3BucketDualStackDomainName, E as makeCanonicalizePropertiesFn, En as CFN_TEMPLATE_URL_LIMIT, Et as s3BucketDomainName, F as green, Fn as processStackMessages, Ft as DagBuilder, G as collectInlinePolicyNamesManagedBySiblings, Gt as createAssetRedirectResolver, H as secretBearingStateKeyWarning, Ht as stringifyValue, I as red, It as TemplateParser, J as findActionableSilentDrops, Jn as LocalMigrateError, Jt as escapeRegExp, K as clearOnUpdateRemoval, Kn as DeployCancelledError, Kt as loadPublishableAssetManifest, L as yellow, Ln as resolveBucketRegion, Lt as LockManager, M as bold, Mn as canonicalizeRegion, Mt as INTRINSIC_KEYS, N as cyan, Nn as derivePartitionAndUrlSuffix, Nt as describeTypeWithThrottleRetry, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as findLargeInlineResources, Ot as s3BucketRegionalDomainName, P as gray, Pn as AssemblyReader, Pt as withRetry, Q as disableInstanceApiTermination, Qn as NestedStackChildDirectDestroyError, Qt as ensureAssetStorage, R as collectDeclaredOutputNames, Rn as AwsClients, Rt as S3StateBackend, S as createPreDeleteFinalSnapshot, Sn as resolveUseCdkBootstrapAssets, St as maskSecretsInText, T as unsupportedFinalSnapshotError, Tn as CFN_TEMPLATE_BODY_LIMIT, Tt as s3BucketArn, U as stateKeySecretExposure, Un as CdkdError, Ut as WorkGraph, V as isExportAliasCollision, Vn as setAwsClients, Vt as AssetPublisher, W as IAMRoleProvider, Wt as buildAssetRedirectMap, X as CloudControlProvider, Xt as AssetModeResolver, Y as findSilentDropProperties, Yn as LocalStartServiceError, Yt as stripControlChars, Z as slowCcOperationTimeoutMs, Zn as MissingCdkCliError, Zt as BOOTSTRAP_MARKER_PREFIX, _ as computeImplicitDeleteEdges, _n as resolveAutoAssetStorage, _t as STATE_SOURCED_READBACK_RULES, a as DeploymentEventsStore, an as buildDockerImage, at as normalizeAwsTagsToCfn, b as buildFinalSnapshotIdentifier, bn as resolveStateBucketWithDefault, bt as dynamicReferenceTokens, c as replayFailedOperations, cn as runDockerForeground, ct as coerceCfnBoolean, d as updatePartialReason, dn as getDockerImageBySourceHash, dr as isMarkedNonRetryable, dt as readConfigString, en as parseBootstrapMarker, er as ProvisioningError, et as IntrinsicFunctionResolver, f as UNSPECIFIED_SKIP_REASON, fn as Synthesizer, fr as isRetryableTransientError, ft as replayWarn, g as IMPLICIT_DELETE_DEPENDENCIES, gn as resolveApp, gt as STATE_SOURCED_CROSS_GENERATION_RULES, h as maskingRetryLogger, hn as getLegacyStateBucketName, ht as requireConfigString, i as DeploymentEventsReader, in as buildDenyExternalAccessPolicy, ir as StackTerminationProtectionError, it as WAFv2WebACLProvider, j as formatResourceLine, jn as PARTITION_TABLE, jt as DiffCalculator, k as isStatefulRecreateTargetSync, kn as uploadCfnTemplate, kt as s3BucketWebsiteUrl, l as replayRollback, ln as runDockerStreaming, lr as normalizeAwsError, lt as configBooleanRefusal, m as withResourceDeadline, mn as getDefaultStateBucketName, mr as markNonRetryable, mt as requireConfigObject, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as validateAssetBucketName, nr as ResourceUpdateNotSupportedError, nt as getAccountInfo, o as planFailedOps, on as formatDockerLoginError, ot as resolveExplicitPhysicalId, p as deleteSkipReason, pn as synthesisStatusMessage, pr as isThrottlingError, pt as requireConfigArray, q as ProviderRegistry, qn as LocalInvokeBuildError$1, qt as rewriteTemplateAssetReferences, r as DeployEngine, rn as validateContainerRepoName, rr as StackHasActiveImportsError, rt as refStateLookupFromResource, s as planRollback, sn as getDockerCmd, st as assertRegionMatch, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as readBootstrapMarkerBody, tr as ResourceTimeoutError, tt as cfnRefValueFromPhysicalId, u as updatePartialMessage, un as AssetManifestLoader, ur as withErrorHandling, ut as configStringRefusal, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as resolveCaptureObservedState, vt as TEMPLATE_SOURCED_RULES, w as refusesFinalSnapshot, wn as warnDeprecatedNoPrefixCliFlag, wt as scrubResourceRecord, x as ccRoutedFinalSnapshotError, xn as resolveStateBucketWithDefaultAndSource, xt as isSingleDynamicReferenceToken, y as PRE_DELETE_SNAPSHOT_TYPES, yn as resolveSkipPrefix, yt as createSecretMasker, z as collectPublishedOutputNames, zn as getAwsClients, zt as rebuildClientForBucketRegion } from "./deploy-engine-C6gt7NcL.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-Cq-oDB62.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";
|
|
@@ -1096,14 +1096,9 @@ async function bootstrapDestroyCommand(options) {
|
|
|
1096
1096
|
let markerBody;
|
|
1097
1097
|
let resolvedMarkerKey = markerKey;
|
|
1098
1098
|
try {
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
if (markerBody !== null) {
|
|
1103
|
-
resolvedMarkerKey = rawMarkerKey;
|
|
1104
|
-
logger.debug(`Bootstrap marker found at the un-folded key '${rawMarkerKey}' (none at '${markerKey}') — an upper-cased region was used at 'cdkd bootstrap' time.`);
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1099
|
+
const read = await readBootstrapMarkerBody(stateBackend, rawRegion);
|
|
1100
|
+
markerBody = read.body;
|
|
1101
|
+
resolvedMarkerKey = read.resolvedKey;
|
|
1107
1102
|
} catch (error) {
|
|
1108
1103
|
if (error.name === "NoSuchBucket") {
|
|
1109
1104
|
logger.info(`State bucket '${bucketName}' does not exist — this account/region was never bootstrapped; nothing to delete.`);
|
|
@@ -63412,7 +63407,7 @@ function isSecretBySpelling(token) {
|
|
|
63412
63407
|
* token is a reference NAME and carries no value, so it is always safe to show.
|
|
63413
63408
|
*/
|
|
63414
63409
|
function survivingDynamicReferences(value) {
|
|
63415
|
-
return value
|
|
63410
|
+
return dynamicReferenceTokens(value);
|
|
63416
63411
|
}
|
|
63417
63412
|
/**
|
|
63418
63413
|
* Record the dotted path of every leaf holding a `{{resolve:...}}` string.
|
|
@@ -63554,29 +63549,10 @@ function redactDriftValue(value, secrets, secretBearing) {
|
|
|
63554
63549
|
const redacted = redactSecretsForState(value, secrets);
|
|
63555
63550
|
if (!secretBearing) return redacted;
|
|
63556
63551
|
if (redacted === void 0 || redacted === null) return redacted;
|
|
63557
|
-
if (typeof redacted === "string" &&
|
|
63552
|
+
if (typeof redacted === "string" && isSingleDynamicReferenceToken(redacted)) return redacted;
|
|
63558
63553
|
return "***";
|
|
63559
63554
|
}
|
|
63560
63555
|
/**
|
|
63561
|
-
* Is the WHOLE string a single `{{resolve:...}}` token and nothing else?
|
|
63562
|
-
*
|
|
63563
|
-
* Byte-for-byte `secret-redaction.ts`'s `isSingleDynamicReferenceToken`,
|
|
63564
|
-
* including the `[^{}]*` character class. The difference from `[^}]+` is
|
|
63565
|
-
* narrow and worth stating correctly: it is a `{` INSIDE the token, e.g.
|
|
63566
|
-
* `{{resolve:ssm:/a{b}}`. (A previous version of this comment claimed
|
|
63567
|
-
* `{{resolve:a}}{{resolve:b}}` would pass under `[^}]+` — it would not, since
|
|
63568
|
-
* `[^}]+` cannot span the `}` in the middle either.) Matching the sibling
|
|
63569
|
-
* exactly is what matters here: this predicate decides whether a value may be
|
|
63570
|
-
* shown INSTEAD of `SECRET_MASK`, and `redactByPath` uses its copy to decide
|
|
63571
|
-
* whether a leaf is already an expression, so a disagreement would let one of
|
|
63572
|
-
* them treat as a token what the other treats as data. Copied rather than
|
|
63573
|
-
* imported because that helper is module-private and this file may not widen
|
|
63574
|
-
* that module's exports.
|
|
63575
|
-
*/
|
|
63576
|
-
function isWholeDynamicReference(value) {
|
|
63577
|
-
return /^\{\{resolve:[^{}]*\}\}$/.test(value);
|
|
63578
|
-
}
|
|
63579
|
-
/**
|
|
63580
63556
|
* Why `--accept` must not persist this drift, or `undefined` when it may.
|
|
63581
63557
|
*
|
|
63582
63558
|
* Shared by the WRITE (`runAccept`) and the PLAN (`printAcceptPlan`) so the two
|
|
@@ -64301,7 +64277,7 @@ function mergeUntemplatedValue(awsValue, desiredValue) {
|
|
|
64301
64277
|
function preserveLiveValuesAtUnresolvedTokens(send, awsProperties, secrets) {
|
|
64302
64278
|
const walk = (value, live) => {
|
|
64303
64279
|
if (typeof value === "string" && value.includes("{{resolve:")) {
|
|
64304
|
-
if (!
|
|
64280
|
+
if (!isSingleDynamicReferenceToken(value)) return value;
|
|
64305
64281
|
if (live === void 0) return value;
|
|
64306
64282
|
if (typeof live === "string" && live.length >= MIN_SECRET_NEEDLE_LENGTH && isSecretBySpelling(value)) secrets.set(live, value);
|
|
64307
64283
|
return live;
|
|
@@ -71919,14 +71895,9 @@ async function gcCommand(options) {
|
|
|
71919
71895
|
let markerBody;
|
|
71920
71896
|
let resolvedMarkerKey = markerKey;
|
|
71921
71897
|
try {
|
|
71922
|
-
|
|
71923
|
-
|
|
71924
|
-
|
|
71925
|
-
if (markerBody !== null) {
|
|
71926
|
-
resolvedMarkerKey = rawMarkerKey;
|
|
71927
|
-
logger.debug(`Bootstrap marker found at the un-folded key '${rawMarkerKey}' (none at '${markerKey}') — an upper-cased region was used at 'cdkd bootstrap' time.`);
|
|
71928
|
-
}
|
|
71929
|
-
}
|
|
71898
|
+
const read = await readBootstrapMarkerBody(stateBackend, rawRegion);
|
|
71899
|
+
markerBody = read.body;
|
|
71900
|
+
resolvedMarkerKey = read.resolvedKey;
|
|
71930
71901
|
} catch (error) {
|
|
71931
71902
|
if (error.name === "NoSuchBucket") {
|
|
71932
71903
|
logger.info(`State bucket '${bucketName}' does not exist — this account was never bootstrapped; nothing to garbage-collect.`);
|
|
@@ -74126,23 +74097,13 @@ async function loadBootstrapContainerRepo(synthRegion, opts) {
|
|
|
74126
74097
|
bucket: stateBucket,
|
|
74127
74098
|
prefix: opts.statePrefix
|
|
74128
74099
|
};
|
|
74129
|
-
const
|
|
74100
|
+
const { body, resolvedKey } = await readBootstrapMarkerBody(new S3StateBackend(awsClients.s3, stateConfig, {
|
|
74130
74101
|
...clientRegion !== void 0 && { region: clientRegion },
|
|
74131
74102
|
...opts.profile !== void 0 && { profile: opts.profile }
|
|
74132
|
-
});
|
|
74133
|
-
const markerKey = getBootstrapMarkerKey(region);
|
|
74134
|
-
let resolvedKey = markerKey;
|
|
74135
|
-
let body = await stateBackend.getRawObject(markerKey);
|
|
74136
|
-
if (body === null && rawRegion !== region) {
|
|
74137
|
-
const rawKey = getBootstrapMarkerKey(rawRegion);
|
|
74138
|
-
body = await stateBackend.getRawObject(rawKey);
|
|
74139
|
-
if (body !== null) {
|
|
74140
|
-
resolvedKey = rawKey;
|
|
74141
|
-
logger.debug(`${prefix}: bootstrap marker found at the un-folded key '${rawKey}' (no '${markerKey}') — an upper-cased region was used at 'cdkd bootstrap' time.`);
|
|
74142
|
-
}
|
|
74143
|
-
}
|
|
74103
|
+
}), rawRegion, { logPrefix: prefix });
|
|
74144
74104
|
if (body === null) {
|
|
74145
|
-
|
|
74105
|
+
const rawKey = getBootstrapMarkerKey(rawRegion);
|
|
74106
|
+
logger.debug(`${prefix}: no bootstrap marker at '${resolvedKey}'${rawKey !== resolvedKey ? ` (nor '${rawKey}')` : ""} in bucket '${stateBucket}' — assuming conventional asset-repo names.`);
|
|
74146
74107
|
return;
|
|
74147
74108
|
}
|
|
74148
74109
|
const marker = parseBootstrapMarker(body, resolvedKey);
|
|
@@ -83770,7 +83731,7 @@ function createMigrateCommand() {
|
|
|
83770
83731
|
*/
|
|
83771
83732
|
function buildProgram() {
|
|
83772
83733
|
const program = new Command();
|
|
83773
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.
|
|
83734
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.20");
|
|
83774
83735
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
83775
83736
|
const { profile } = actionCommand.optsWithGlobals();
|
|
83776
83737
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|