@go-to-k/cdkd 0.281.16 → 0.281.18
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-B1pHGT_X.js → asg-provider-CRgl7pV6.js} +2 -2
- package/dist/{asg-provider-B1pHGT_X.js.map → asg-provider-CRgl7pV6.js.map} +1 -1
- package/dist/cli.js +110 -11
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-CfnMSwyx.js → deploy-engine-D-0t_IlI.js} +150 -99
- package/dist/deploy-engine-D-0t_IlI.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-CfnMSwyx.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as replayWarn, $t as findLargeInlineResources, A as green, At as buildDockerImage, B as slowCcOperationTimeoutMs, Bt as getLegacyStateBucketName, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as ResourceTimeoutError, Ct as
|
|
2
|
+
import { $ as replayWarn, $t as findLargeInlineResources, A as green, At as buildDockerImage, B as slowCcOperationTimeoutMs, Bt as getLegacyStateBucketName, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as ResourceTimeoutError, Ct as BOOTSTRAP_MARKER_PREFIX, D as bold, Dt as validateAssetBucketName, E as formatResourceLine, En as StackTerminationProtectionError, Et as parseBootstrapMarker, F as clearOnUpdateRemoval, Ft as AssetManifestLoader, G as getAccountInfo, Gt as resolveStateBucketWithDefault, H as isTerminationProtectionPropagationError, Ht as resolveAutoAssetStorage, I as ProviderRegistry, It as getDockerImageBySourceHash, J as normalizeAwsTagsToCfn, Jt as stateBucketExistenceConfirmed, K as refStateLookupFromResource, Kt as resolveStateBucketWithDefaultAndSource, L as findActionableSilentDrops, Lt as Synthesizer, M as yellow, Mn as withErrorHandling, Mt as getDockerCmd, N as IAMRoleProvider, Nt as runDockerForeground, O as cyan, Ot as validateContainerRepoName, P as collectInlinePolicyNamesManagedBySiblings, Pt as runDockerStreaming, Q as readConfigString, Qt as MIGRATE_TMP_PREFIX, R as findSilentDropProperties, Rt as synthesisStatusMessage, S as extractDeploymentEventError, Sn as ProvisioningError, St as AssetModeResolver, T as renderStatefulReason, Tn as StackHasActiveImportsError, Tt as getBootstrapMarkerKey, U as IntrinsicFunctionResolver, Ut as resolveCaptureObservedState, V as disableInstanceApiTermination, Vt as resolveApp, W as cfnRefValueFromPhysicalId, Wt as resolveSkipPrefix, X as assertRegionMatch, Xt as CFN_TEMPLATE_BODY_LIMIT, Y as resolveExplicitPhysicalId, Yt as warnDeprecatedNoPrefixCliFlag, Z as configStringRefusal, Zt as CFN_TEMPLATE_URL_LIMIT, _ as createPreDeleteFinalSnapshot, _n as LocalStartServiceError, _t as WorkGraph, a as DeploymentEventsStore, an as resolveBucketRegion, at as describeTypeWithThrottleRetry, b as unsupportedFinalSnapshotError, bn as NestedStackChildDirectDestroyError, bt as loadPublishableAssetManifest, c as replayFailedOperations, cn as resetAwsClients, ct as isThrottlingError, d as IMPLICIT_DELETE_DEPENDENCIES, dn as CdkdError, dt as LockManager, en as uploadCfnTemplate, et as requireConfigArray, f as computeImplicitDeleteEdges, ft as S3StateBackend, g as ccRoutedFinalSnapshotError, gn as LocalMigrateError, gt as stringifyValue, h as buildFinalSnapshotIdentifier, hn as LocalInvokeBuildError$1, ht as AssetPublisher, i as DeploymentEventsReader, it as DiffCalculator, j as red, jn as normalizeAwsError, jt as formatDockerLoginError, k as gray, kt as derivePartitionAndUrlSuffix, l as replayRollback, ln as setAwsClients, lt as DagBuilder, m as PRE_DELETE_SNAPSHOT_TYPES, mn as DeployCancelledError, mt as shouldRetainResource, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as AssemblyReader, nt as requireConfigString, o as planFailedOps, on as AwsClients, ot as withRetry, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pt as rebuildClientForBucketRegion, q as WAFv2WebACLProvider, qt as resolveUseCdkBootstrapAssets, r as DeployEngine, rn as processStackMessages, rt as applyRoleArnIfSet, s as planRollback, sn as getAwsClients, st as isRetryableTransientError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as expectedOwnerParam, tt as requireConfigObject, u as withResourceDeadline, ut as TemplateParser, v as isFinalSnapshotError, vt as buildAssetRedirectMap, w as isStatefulRecreateTargetSync, wn as ResourceUpdateNotSupportedError, wt as ensureAssetStorage, x as makeCanonicalizePropertiesFn, xn as PartialFailureError, xt as rewriteTemplateAssetReferences, y as refusesFinalSnapshot, yn as MissingCdkCliError, yt as createAssetRedirectResolver, z as CloudControlProvider, zt as getDefaultStateBucketName } from "./deploy-engine-D-0t_IlI.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-CRgl7pV6.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";
|
|
@@ -14256,13 +14256,17 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
14256
14256
|
if (!attributeDefinitions) throw new ProvisioningError(`AttributeDefinitions is required for DynamoDB GlobalTable ${logicalId}`, resourceType, logicalId);
|
|
14257
14257
|
let billingMode;
|
|
14258
14258
|
let billingModeSubstituted = false;
|
|
14259
|
+
let billingModeAbsentOnReplay = false;
|
|
14259
14260
|
try {
|
|
14260
14261
|
const billingReplayWarn = replayWarn(this.logger, context).onUnusable;
|
|
14261
14262
|
billingMode = requireConfigString(properties["BillingMode"], "PAY_PER_REQUEST", "AWS::DynamoDB::GlobalTable BillingMode", billingReplayWarn ? { onUnusable: (message) => {
|
|
14262
14263
|
billingModeSubstituted = true;
|
|
14263
14264
|
billingReplayWarn(message);
|
|
14264
14265
|
} } : {});
|
|
14265
|
-
if (billingReplayWarn && properties["BillingMode"] === void 0)
|
|
14266
|
+
if (billingReplayWarn && properties["BillingMode"] === void 0) {
|
|
14267
|
+
billingModeAbsentOnReplay = true;
|
|
14268
|
+
this.logger.warn(`AWS::DynamoDB::GlobalTable ${logicalId}: the state record declares no BillingMode, so this replay creates the table PAY_PER_REQUEST. If it was PROVISIONED, set the mode in the template and redeploy.`);
|
|
14269
|
+
}
|
|
14266
14270
|
} catch (error) {
|
|
14267
14271
|
throw new ProvisioningError(error instanceof Error ? error.message : String(error), resourceType, logicalId, void 0, error instanceof Error ? error : void 0);
|
|
14268
14272
|
}
|
|
@@ -14277,10 +14281,11 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
14277
14281
|
const diagnostics = [];
|
|
14278
14282
|
if (billingMode === "PROVISIONED") createParams.ProvisionedThroughput = derivePerCallProvisionedThroughput(properties, currentRegion, "min", diagnostics);
|
|
14279
14283
|
let effectiveProperties;
|
|
14280
|
-
if (billingModeSubstituted) effectiveProperties = {
|
|
14284
|
+
if (billingModeSubstituted) effectiveProperties = stripProvisionedCapacityKeys({
|
|
14281
14285
|
...properties,
|
|
14282
14286
|
BillingMode: billingMode
|
|
14283
|
-
};
|
|
14287
|
+
});
|
|
14288
|
+
else if (billingModeAbsentOnReplay) effectiveProperties = stripProvisionedCapacityKeys(properties);
|
|
14284
14289
|
const streamSpecInput = properties["StreamSpecification"];
|
|
14285
14290
|
const needsStream = replicas.some((r) => r["Region"] !== currentRegion) || replicas.length > 1;
|
|
14286
14291
|
if (streamSpecInput != null) {
|
|
@@ -14311,12 +14316,28 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
14311
14316
|
};
|
|
14312
14317
|
}
|
|
14313
14318
|
let sdkIndexes;
|
|
14319
|
+
let indexesOmitted = false;
|
|
14314
14320
|
try {
|
|
14315
14321
|
const onUnusableCreateIndexes = replayWarn(this.logger, context).onUnusable;
|
|
14316
|
-
sdkIndexes = toSdkGlobalSecondaryIndexes(properties, currentRegion, billingMode, "min", diagnostics, onUnusableCreateIndexes && ((message) =>
|
|
14322
|
+
sdkIndexes = toSdkGlobalSecondaryIndexes(properties, currentRegion, billingMode, "min", diagnostics, onUnusableCreateIndexes && ((message) => {
|
|
14323
|
+
indexesOmitted = true;
|
|
14324
|
+
onUnusableCreateIndexes(`${message} Omitting the malformed block, so this create carries NO indexes; the same value is REFUSED on a template-path create`);
|
|
14325
|
+
}));
|
|
14317
14326
|
} catch (error) {
|
|
14318
14327
|
throw new ProvisioningError(error instanceof Error ? error.message : String(error), resourceType, logicalId, void 0, error instanceof Error ? error : void 0);
|
|
14319
14328
|
}
|
|
14329
|
+
if (indexesOmitted) {
|
|
14330
|
+
effectiveProperties = { ...effectiveProperties ?? properties };
|
|
14331
|
+
delete effectiveProperties["GlobalSecondaryIndexes"];
|
|
14332
|
+
const replicasForOmit = effectiveProperties["Replicas"];
|
|
14333
|
+
if (Array.isArray(replicasForOmit)) effectiveProperties["Replicas"] = replicasForOmit.map((entry) => {
|
|
14334
|
+
const replica = asRecord$1(entry);
|
|
14335
|
+
if (!replica || replica["Region"] !== currentRegion) return entry;
|
|
14336
|
+
const copy = { ...replica };
|
|
14337
|
+
delete copy["GlobalSecondaryIndexes"];
|
|
14338
|
+
return copy;
|
|
14339
|
+
});
|
|
14340
|
+
}
|
|
14320
14341
|
if (sdkIndexes.length > 0) createParams.GlobalSecondaryIndexes = sdkIndexes;
|
|
14321
14342
|
if (properties["LocalSecondaryIndexes"]) createParams.LocalSecondaryIndexes = properties["LocalSecondaryIndexes"];
|
|
14322
14343
|
if (properties["SSESpecification"]) {
|
|
@@ -16462,6 +16483,82 @@ function toSdkGlobalSecondaryIndexes(properties, region, billingMode, source = "
|
|
|
16462
16483
|
return result;
|
|
16463
16484
|
}
|
|
16464
16485
|
/**
|
|
16486
|
+
* Remove every PROVISIONED-only capacity member from a desired-property bag
|
|
16487
|
+
* (issue #1726).
|
|
16488
|
+
*
|
|
16489
|
+
* Used by `create()`'s `BillingMode` warn-and-SUBSTITUTE arm and by its ABSENT
|
|
16490
|
+
* sibling: whenever the create resolves to `PAY_PER_REQUEST` on a bag that was
|
|
16491
|
+
* not written for it, the same create skips `createParams.ProvisionedThroughput`
|
|
16492
|
+
* and every per-index / per-replica provisioned member is dropped before the
|
|
16493
|
+
* call (each of the reads below is gated on `billingMode === 'PROVISIONED'`).
|
|
16494
|
+
* Recording those keys describes capacity AWS never received.
|
|
16495
|
+
*
|
|
16496
|
+
* The set is the intersection of two questions, and BOTH are needed — taking
|
|
16497
|
+
* either alone is what the review of the first cut corrected:
|
|
16498
|
+
*
|
|
16499
|
+
* - **what could not have been SENT** — every member `toSdkGlobalSecondaryIndexes`
|
|
16500
|
+
* / `toSdkReplicaThroughputOverrides` read behind a PROVISIONED gate, which
|
|
16501
|
+
* includes the two legacy SDK-shaped spellings a pre-#1387 cdkd wrote into
|
|
16502
|
+
* state (`GlobalSecondaryIndexes[].ProvisionedThroughput`,
|
|
16503
|
+
* `Replicas[].ProvisionedThroughputOverride`). A state replay is exactly that
|
|
16504
|
+
* population, so leaving them out made the strip narrower than its own rule.
|
|
16505
|
+
* - **what `readCurrentState` can REPORT under the new mode** — the top-level
|
|
16506
|
+
* `WriteProvisionedThroughputSettings` emits `{}` for an on-demand table and
|
|
16507
|
+
* every other member here is omitted entirely, so a surviving key is a record
|
|
16508
|
+
* the readback can never match.
|
|
16509
|
+
*
|
|
16510
|
+
* DELIBERATELY NOT removed: every `*OnDemand*` member. `OnDemandThroughput` is
|
|
16511
|
+
* attached to `CreateTable` precisely when the mode is not PROVISIONED, so those
|
|
16512
|
+
* WERE sent — a blanket "strip anything throughput-shaped" would record a loss
|
|
16513
|
+
* that did not happen, and a unit row plus an integ phase fence exactly that.
|
|
16514
|
+
*
|
|
16515
|
+
* Pure and non-mutating at every level — the caller's bag is
|
|
16516
|
+
* `previousState.properties` on the replay path and the rollback executor
|
|
16517
|
+
* spreads the answer shallowly, so an in-place edit would corrupt a record the
|
|
16518
|
+
* caller still holds.
|
|
16519
|
+
*/
|
|
16520
|
+
function stripProvisionedCapacityKeys(properties) {
|
|
16521
|
+
const result = { ...properties };
|
|
16522
|
+
delete result["WriteProvisionedThroughputSettings"];
|
|
16523
|
+
const indexes = result["GlobalSecondaryIndexes"];
|
|
16524
|
+
if (Array.isArray(indexes)) result["GlobalSecondaryIndexes"] = indexes.map((entry) => {
|
|
16525
|
+
const gsi = asRecord$1(entry);
|
|
16526
|
+
if (!gsi) return entry;
|
|
16527
|
+
const copy = { ...gsi };
|
|
16528
|
+
delete copy["WriteProvisionedThroughputSettings"];
|
|
16529
|
+
delete copy["ReadProvisionedThroughputSettings"];
|
|
16530
|
+
delete copy["ProvisionedThroughput"];
|
|
16531
|
+
return copy;
|
|
16532
|
+
});
|
|
16533
|
+
const replicas = result["Replicas"];
|
|
16534
|
+
if (Array.isArray(replicas)) result["Replicas"] = replicas.map((entry) => {
|
|
16535
|
+
const replica = asRecord$1(entry);
|
|
16536
|
+
if (!replica) return entry;
|
|
16537
|
+
const copy = { ...replica };
|
|
16538
|
+
delete copy["ReadProvisionedThroughputSettings"];
|
|
16539
|
+
delete copy["ProvisionedThroughputOverride"];
|
|
16540
|
+
const replicaIndexes = copy["GlobalSecondaryIndexes"];
|
|
16541
|
+
if (Array.isArray(replicaIndexes)) {
|
|
16542
|
+
const kept = replicaIndexes.map((indexEntry) => {
|
|
16543
|
+
const gsi = asRecord$1(indexEntry);
|
|
16544
|
+
if (!gsi) return indexEntry;
|
|
16545
|
+
const indexCopy = { ...gsi };
|
|
16546
|
+
delete indexCopy["ReadProvisionedThroughputSettings"];
|
|
16547
|
+
delete indexCopy["ProvisionedThroughputOverride"];
|
|
16548
|
+
return indexCopy;
|
|
16549
|
+
}).filter((entry) => {
|
|
16550
|
+
const gsi = asRecord$1(entry);
|
|
16551
|
+
if (!gsi) return true;
|
|
16552
|
+
return Object.keys(gsi).some((k) => k !== "IndexName");
|
|
16553
|
+
});
|
|
16554
|
+
if (kept.length > 0) copy["GlobalSecondaryIndexes"] = kept;
|
|
16555
|
+
else delete copy["GlobalSecondaryIndexes"];
|
|
16556
|
+
}
|
|
16557
|
+
return copy;
|
|
16558
|
+
});
|
|
16559
|
+
return result;
|
|
16560
|
+
}
|
|
16561
|
+
/**
|
|
16465
16562
|
* True when a CFn sub-object is nothing but an unresolved intrinsic
|
|
16466
16563
|
* (`{"Fn::If": […]}` / `{"Ref": …}`), i.e. the template DID declare the block
|
|
16467
16564
|
* but its value could not be resolved to a shape with members.
|
|
@@ -35556,8 +35653,9 @@ var CognitoUserPoolProvider = class {
|
|
|
35556
35653
|
createdUserPoolId = userPoolId;
|
|
35557
35654
|
const userPoolArn = userPool.Arn;
|
|
35558
35655
|
const region = await this.getClient().config.region();
|
|
35559
|
-
const
|
|
35560
|
-
const
|
|
35656
|
+
const { urlSuffix } = derivePartitionAndUrlSuffix(region);
|
|
35657
|
+
const providerName = `cognito-idp.${region}.${urlSuffix}/${userPoolId}`;
|
|
35658
|
+
const providerUrl = `https://cognito-idp.${region}.${urlSuffix}/${userPoolId}`;
|
|
35561
35659
|
await this.applyMfaConfig(userPoolId, properties);
|
|
35562
35660
|
this.logger.debug(`Successfully created Cognito User Pool ${logicalId}: ${userPoolId}`);
|
|
35563
35661
|
return {
|
|
@@ -35650,8 +35748,9 @@ var CognitoUserPoolProvider = class {
|
|
|
35650
35748
|
this.logger.debug(`Successfully updated Cognito User Pool ${logicalId}`);
|
|
35651
35749
|
const userPool = (await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: physicalId }))).UserPool;
|
|
35652
35750
|
const region = await this.getClient().config.region();
|
|
35653
|
-
const
|
|
35654
|
-
const
|
|
35751
|
+
const { urlSuffix } = derivePartitionAndUrlSuffix(region);
|
|
35752
|
+
const providerName = `cognito-idp.${region}.${urlSuffix}/${physicalId}`;
|
|
35753
|
+
const providerUrl = `https://cognito-idp.${region}.${urlSuffix}/${physicalId}`;
|
|
35655
35754
|
return {
|
|
35656
35755
|
physicalId,
|
|
35657
35756
|
wasReplaced: false,
|
|
@@ -73965,7 +74064,7 @@ function createMigrateCommand() {
|
|
|
73965
74064
|
*/
|
|
73966
74065
|
function buildProgram() {
|
|
73967
74066
|
const program = new Command();
|
|
73968
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.
|
|
74067
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.18");
|
|
73969
74068
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
73970
74069
|
const { profile } = actionCommand.optsWithGlobals();
|
|
73971
74070
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|