@go-to-k/cdkd 0.281.0 → 0.281.1
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-BSx4Vrth.js → asg-provider-DYdmsCfd.js} +2 -2
- package/dist/{asg-provider-BSx4Vrth.js.map → asg-provider-DYdmsCfd.js.map} +1 -1
- package/dist/cli.js +35 -8
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-Bebl98bx.js → deploy-engine-CGL3Vw1P.js} +3 -3
- package/dist/{deploy-engine-Bebl98bx.js.map → deploy-engine-CGL3Vw1P.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as requireConfigArray, $t as expectedOwnerParam, A as green, An as withErrorHandling, At as getDockerCmd, B as slowCcOperationTimeoutMs, Bt as resolveAutoAssetStorage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackHasActiveImportsError, Ct as ensureAssetStorage, D as bold, Dt as validateContainerRepoName, E as formatResourceLine, Et as validateAssetBucketName, F as clearOnUpdateRemoval, Ft as Synthesizer, G as refStateLookupFromResource, Gt as resolveUseCdkBootstrapAssets, H as isTerminationProtectionPropagationError, Ht as resolveSkipPrefix, I as ProviderRegistry, It as synthesisStatusMessage, J as resolveExplicitPhysicalId, Jt as CFN_TEMPLATE_BODY_LIMIT, K as WAFv2WebACLProvider, Kt as stateBucketExistenceConfirmed, L as findActionableSilentDrops, Lt as getDefaultStateBucketName, M as yellow, Mt as runDockerStreaming, N as IAMRoleProvider, Nt as AssetManifestLoader, O as cyan, Ot as buildDockerImage, P as collectInlinePolicyNamesManagedBySiblings, Pt as getDockerImageBySourceHash, Q as replayWarn, Qt as uploadCfnTemplate, R as findSilentDropProperties, Rt as getLegacyStateBucketName, S as extractDeploymentEventError, Sn as ResourceUpdateNotSupportedError, St as BOOTSTRAP_MARKER_PREFIX, T as renderStatefulReason, Tt as parseBootstrapMarker, U as IntrinsicFunctionResolver, Ut as resolveStateBucketWithDefault, V as disableInstanceApiTermination, Vt as resolveCaptureObservedState, W as cfnRefValueFromPhysicalId, Wt as resolveStateBucketWithDefaultAndSource, X as configStringRefusal, Xt as MIGRATE_TMP_PREFIX, Y as assertRegionMatch, Yt as CFN_TEMPLATE_URL_LIMIT, Z as readConfigString, Zt as findLargeInlineResources, _ as createPreDeleteFinalSnapshot, _n as MissingCdkCliError, _t as buildAssetRedirectMap, a as DeploymentEventsStore, an as getAwsClients, at as withRetry, b as unsupportedFinalSnapshotError, bn as ProvisioningError, bt as rewriteTemplateAssetReferences, c as replayFailedOperations, ct as DagBuilder, d as IMPLICIT_DELETE_DEPENDENCIES, dt as S3StateBackend, en as AssemblyReader, et as requireConfigObject, f as computeImplicitDeleteEdges, fn as DeployCancelledError, ft as rebuildClientForBucketRegion, g as ccRoutedFinalSnapshotError, gt as WorkGraph, h as buildFinalSnapshotIdentifier, hn as LocalStartServiceError, ht as stringifyValue, i as DeploymentEventsReader, in as AwsClients, it as describeTypeWithThrottleRetry, j as red, jt as runDockerForeground, k as gray, kn as normalizeAwsError, kt as formatDockerLoginError, l as replayRollback, ln as CdkdError, lt as TemplateParser, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalMigrateError, mt as AssetPublisher, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as applyRoleArnIfSet, o as planFailedOps, on as resetAwsClients, ot as isRetryableTransientError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalInvokeBuildError$1, pt as shouldRetainResource, q as normalizeAwsTagsToCfn, qt as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, rn as resolveBucketRegion, rt as DiffCalculator, s as planRollback, sn as setAwsClients, st as isThrottlingError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as processStackMessages, tt as requireConfigString, u as withResourceDeadline, ut as LockManager, v as isFinalSnapshotError, vn as NestedStackChildDirectDestroyError, vt as createAssetRedirectResolver, w as isStatefulRecreateTargetSync, wn as StackTerminationProtectionError, wt as getBootstrapMarkerKey, x as makeCanonicalizePropertiesFn, xn as ResourceTimeoutError, xt as AssetModeResolver, y as refusesFinalSnapshot, yn as PartialFailureError, yt as loadPublishableAssetManifest, z as CloudControlProvider, zt as resolveApp } from "./deploy-engine-
|
|
2
|
+
import { $ as requireConfigArray, $t as expectedOwnerParam, A as green, An as withErrorHandling, At as getDockerCmd, B as slowCcOperationTimeoutMs, Bt as resolveAutoAssetStorage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackHasActiveImportsError, Ct as ensureAssetStorage, D as bold, Dt as validateContainerRepoName, E as formatResourceLine, Et as validateAssetBucketName, F as clearOnUpdateRemoval, Ft as Synthesizer, G as refStateLookupFromResource, Gt as resolveUseCdkBootstrapAssets, H as isTerminationProtectionPropagationError, Ht as resolveSkipPrefix, I as ProviderRegistry, It as synthesisStatusMessage, J as resolveExplicitPhysicalId, Jt as CFN_TEMPLATE_BODY_LIMIT, K as WAFv2WebACLProvider, Kt as stateBucketExistenceConfirmed, L as findActionableSilentDrops, Lt as getDefaultStateBucketName, M as yellow, Mt as runDockerStreaming, N as IAMRoleProvider, Nt as AssetManifestLoader, O as cyan, Ot as buildDockerImage, P as collectInlinePolicyNamesManagedBySiblings, Pt as getDockerImageBySourceHash, Q as replayWarn, Qt as uploadCfnTemplate, R as findSilentDropProperties, Rt as getLegacyStateBucketName, S as extractDeploymentEventError, Sn as ResourceUpdateNotSupportedError, St as BOOTSTRAP_MARKER_PREFIX, T as renderStatefulReason, Tt as parseBootstrapMarker, U as IntrinsicFunctionResolver, Ut as resolveStateBucketWithDefault, V as disableInstanceApiTermination, Vt as resolveCaptureObservedState, W as cfnRefValueFromPhysicalId, Wt as resolveStateBucketWithDefaultAndSource, X as configStringRefusal, Xt as MIGRATE_TMP_PREFIX, Y as assertRegionMatch, Yt as CFN_TEMPLATE_URL_LIMIT, Z as readConfigString, Zt as findLargeInlineResources, _ as createPreDeleteFinalSnapshot, _n as MissingCdkCliError, _t as buildAssetRedirectMap, a as DeploymentEventsStore, an as getAwsClients, at as withRetry, b as unsupportedFinalSnapshotError, bn as ProvisioningError, bt as rewriteTemplateAssetReferences, c as replayFailedOperations, ct as DagBuilder, d as IMPLICIT_DELETE_DEPENDENCIES, dt as S3StateBackend, en as AssemblyReader, et as requireConfigObject, f as computeImplicitDeleteEdges, fn as DeployCancelledError, ft as rebuildClientForBucketRegion, g as ccRoutedFinalSnapshotError, gt as WorkGraph, h as buildFinalSnapshotIdentifier, hn as LocalStartServiceError, ht as stringifyValue, i as DeploymentEventsReader, in as AwsClients, it as describeTypeWithThrottleRetry, j as red, jt as runDockerForeground, k as gray, kn as normalizeAwsError, kt as formatDockerLoginError, l as replayRollback, ln as CdkdError, lt as TemplateParser, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalMigrateError, mt as AssetPublisher, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as applyRoleArnIfSet, o as planFailedOps, on as resetAwsClients, ot as isRetryableTransientError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalInvokeBuildError$1, pt as shouldRetainResource, q as normalizeAwsTagsToCfn, qt as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, rn as resolveBucketRegion, rt as DiffCalculator, s as planRollback, sn as setAwsClients, st as isThrottlingError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as processStackMessages, tt as requireConfigString, u as withResourceDeadline, ut as LockManager, v as isFinalSnapshotError, vn as NestedStackChildDirectDestroyError, vt as createAssetRedirectResolver, w as isStatefulRecreateTargetSync, wn as StackTerminationProtectionError, wt as getBootstrapMarkerKey, x as makeCanonicalizePropertiesFn, xn as ResourceTimeoutError, xt as AssetModeResolver, y as refusesFinalSnapshot, yn as PartialFailureError, yt as loadPublishableAssetManifest, z as CloudControlProvider, zt as resolveApp } from "./deploy-engine-CGL3Vw1P.js";
|
|
3
3
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, 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-DYdmsCfd.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";
|
|
@@ -10727,6 +10727,7 @@ var LambdaUrlProvider = class {
|
|
|
10727
10727
|
this.logger.debug(`Creating Lambda URL ${logicalId}`);
|
|
10728
10728
|
const targetFunctionArn = properties["TargetFunctionArn"];
|
|
10729
10729
|
if (!targetFunctionArn) throw new ProvisioningError(`TargetFunctionArn is required for Lambda URL ${logicalId}`, resourceType, logicalId);
|
|
10730
|
+
if (context?.replayingState === true && properties["AuthType"] === void 0) this.logger.warn(`Lambda URL ${logicalId} is being restored from a cdkd state record that carries no AuthType, so cdkd cannot vouch for the auth type the URL had. Creating it with the default (NONE), which makes the function URL PUBLIC. Verify the URL's auth type after the rollback completes and set 'authType' explicitly in your CDK code if it should be AWS_IAM.`);
|
|
10730
10731
|
const authType = requireConfigString(properties["AuthType"], "NONE", "AWS::Lambda::Url AuthType", replayWarn(this.logger, context));
|
|
10731
10732
|
try {
|
|
10732
10733
|
const cors = properties["Cors"];
|
|
@@ -10776,6 +10777,12 @@ var LambdaUrlProvider = class {
|
|
|
10776
10777
|
} });
|
|
10777
10778
|
const previousAuthType = previousProperties["AuthType"];
|
|
10778
10779
|
const authType = authTypeUnusable ? typeof previousAuthType === "string" && previousAuthType.trim() !== "" ? previousAuthType : void 0 : requestedAuthType;
|
|
10780
|
+
let effectiveProperties;
|
|
10781
|
+
if (authTypeUnusable) {
|
|
10782
|
+
effectiveProperties = { ...properties };
|
|
10783
|
+
if (authType === void 0) delete effectiveProperties["AuthType"];
|
|
10784
|
+
else effectiveProperties["AuthType"] = authType;
|
|
10785
|
+
}
|
|
10779
10786
|
const updateParams = {
|
|
10780
10787
|
FunctionName: physicalId,
|
|
10781
10788
|
...authType !== void 0 && { AuthType: authType }
|
|
@@ -10796,7 +10803,8 @@ var LambdaUrlProvider = class {
|
|
|
10796
10803
|
attributes: {
|
|
10797
10804
|
FunctionUrl: response.FunctionUrl,
|
|
10798
10805
|
FunctionArn: response.FunctionArn
|
|
10799
|
-
}
|
|
10806
|
+
},
|
|
10807
|
+
...effectiveProperties && { effectiveProperties }
|
|
10800
10808
|
};
|
|
10801
10809
|
} catch (error) {
|
|
10802
10810
|
const cause = error instanceof Error ? error : void 0;
|
|
@@ -13621,12 +13629,18 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
13621
13629
|
};
|
|
13622
13630
|
const diagnostics = [];
|
|
13623
13631
|
if (billingMode === "PROVISIONED") createParams.ProvisionedThroughput = derivePerCallProvisionedThroughput(properties, currentRegion, "min", diagnostics);
|
|
13632
|
+
let effectiveProperties;
|
|
13624
13633
|
const streamSpecInput = properties["StreamSpecification"];
|
|
13625
13634
|
const needsStream = replicas.some((r) => r["Region"] !== currentRegion) || replicas.length > 1;
|
|
13626
13635
|
if (streamSpecInput != null) {
|
|
13627
13636
|
let streamViewType;
|
|
13637
|
+
let streamSpecSubstituted = false;
|
|
13628
13638
|
try {
|
|
13629
|
-
|
|
13639
|
+
const replayDowngrade = replayWarn(this.logger, context).onUnusable;
|
|
13640
|
+
streamViewType = readConfigString(streamSpecInput, "StreamViewType", "NEW_AND_OLD_IMAGES", "AWS::DynamoDB::GlobalTable StreamSpecification", replayDowngrade ? { onUnusable: (message) => {
|
|
13641
|
+
streamSpecSubstituted = true;
|
|
13642
|
+
replayDowngrade(message);
|
|
13643
|
+
} } : {});
|
|
13630
13644
|
} catch (error) {
|
|
13631
13645
|
throw new ProvisioningError(error instanceof Error ? error.message : String(error), resourceType, logicalId, void 0, error instanceof Error ? error : void 0);
|
|
13632
13646
|
}
|
|
@@ -13634,6 +13648,10 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
13634
13648
|
StreamEnabled: true,
|
|
13635
13649
|
StreamViewType: streamViewType
|
|
13636
13650
|
};
|
|
13651
|
+
if (streamSpecSubstituted) effectiveProperties = {
|
|
13652
|
+
...properties,
|
|
13653
|
+
StreamSpecification: { StreamViewType: streamViewType }
|
|
13654
|
+
};
|
|
13637
13655
|
} else if (needsStream) {
|
|
13638
13656
|
this.logger.info(`Auto-enabling streams (NEW_AND_OLD_IMAGES) on ${logicalId} — required for cross-region replication`);
|
|
13639
13657
|
createParams.StreamSpecification = {
|
|
@@ -13720,7 +13738,8 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
13720
13738
|
TableId: tableInfo.tableId,
|
|
13721
13739
|
StreamArn: tableInfo.streamArn,
|
|
13722
13740
|
TableName: tableName
|
|
13723
|
-
}
|
|
13741
|
+
},
|
|
13742
|
+
...effectiveProperties && { effectiveProperties }
|
|
13724
13743
|
};
|
|
13725
13744
|
} catch (wiringError) {
|
|
13726
13745
|
this.logger.warn(`Wiring failed after CreateTable for ${tableName}; attempting best-effort cleanup`);
|
|
@@ -13844,6 +13863,7 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
13844
13863
|
const removedButStillReferenced = oldAttrs.filter((o) => !newAttrs.some((n) => n.AttributeName === o.AttributeName)).filter((a) => a.AttributeName !== void 0 && desiredKeyAttrNames.has(a.AttributeName));
|
|
13845
13864
|
if (removedButStillReferenced.length > 0) throw new ProvisioningError(`AttributeDefinitions removals are immutable on AWS::DynamoDB::GlobalTable while a key schema still references them (offenders: ${removedButStillReferenced.map((a) => a.AttributeName).join(", ")}); replacement required`, resourceType, logicalId, physicalId);
|
|
13846
13865
|
const currentRegion = await this.dynamoDBClient.config.region() ?? "";
|
|
13866
|
+
let effectiveProperties;
|
|
13847
13867
|
try {
|
|
13848
13868
|
await this.waitForTableActiveAfterUpdate(physicalId, logicalId);
|
|
13849
13869
|
const describeResp = await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }));
|
|
@@ -13914,7 +13934,7 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
13914
13934
|
let streamSpecUnusable = false;
|
|
13915
13935
|
const streamViewType = readConfigString(properties["StreamSpecification"], "StreamViewType", "NEW_AND_OLD_IMAGES", "AWS::DynamoDB::GlobalTable StreamSpecification", { onUnusable: (message) => {
|
|
13916
13936
|
streamSpecUnusable = true;
|
|
13917
|
-
this.logger.warn(
|
|
13937
|
+
this.logger.warn(`AWS::DynamoDB::GlobalTable ${logicalId}: ${message} The table's existing stream configuration is left untouched for this update rather than re-pointed at the default.`);
|
|
13918
13938
|
} });
|
|
13919
13939
|
if (!streamSpecUnusable) {
|
|
13920
13940
|
flatUpdate.StreamSpecification = {
|
|
@@ -13922,6 +13942,12 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
13922
13942
|
StreamViewType: streamViewType
|
|
13923
13943
|
};
|
|
13924
13944
|
flatChanged = true;
|
|
13945
|
+
} else {
|
|
13946
|
+
const previousStreamSpec = previousProperties["StreamSpecification"];
|
|
13947
|
+
const previousStreamSpecUsable = previousStreamSpec !== void 0 && previousStreamSpec !== null && configStringRefusal(previousStreamSpec, "StreamViewType", "NEW_AND_OLD_IMAGES", "AWS::DynamoDB::GlobalTable StreamSpecification") === void 0;
|
|
13948
|
+
effectiveProperties = { ...properties };
|
|
13949
|
+
if (previousStreamSpecUsable) effectiveProperties["StreamSpecification"] = { ...previousStreamSpec };
|
|
13950
|
+
else delete effectiveProperties["StreamSpecification"];
|
|
13925
13951
|
}
|
|
13926
13952
|
}
|
|
13927
13953
|
const awsOnDemand = describeResp.Table?.OnDemandThroughput;
|
|
@@ -14202,7 +14228,8 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
14202
14228
|
TableId: finalDescribe.Table?.TableId,
|
|
14203
14229
|
StreamArn: finalDescribe.Table?.LatestStreamArn,
|
|
14204
14230
|
TableName: physicalId
|
|
14205
|
-
}
|
|
14231
|
+
},
|
|
14232
|
+
...effectiveProperties && { effectiveProperties }
|
|
14206
14233
|
};
|
|
14207
14234
|
} catch (error) {
|
|
14208
14235
|
if (error instanceof ProvisioningError) throw error;
|
|
@@ -72349,7 +72376,7 @@ function createMigrateCommand() {
|
|
|
72349
72376
|
*/
|
|
72350
72377
|
function buildProgram() {
|
|
72351
72378
|
const program = new Command();
|
|
72352
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.
|
|
72379
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.1");
|
|
72353
72380
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
72354
72381
|
const { profile } = actionCommand.optsWithGlobals();
|
|
72355
72382
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|