@go-to-k/cdkd 0.175.0 → 0.177.0

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/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { _ as withSkipPrefix, a as runDockerStreaming, c as getLogger, d as getLiveRenderer, f as PATTERN_B_NAME_PROPERTIES, g as generateResourceNameWithFallback, h as generateResourceName, i as runDockerForeground, n as formatDockerLoginError, p as PATTERN_B_RESOURCE_TYPES, r as getDockerCmd, u as runStackBuffered, v as withStackName } from "./docker-cmd-iDMcWcre.js";
3
- import { A as S3StateBackend, B as resolveCaptureObservedState, C as assertRegionMatch, D as DagBuilder, E as DiffCalculator, F as buildDockerImage, G as CFN_TEMPLATE_BODY_LIMIT, H as resolveStateBucketWithDefault, I as Synthesizer, J as findLargeInlineResources, K as CFN_TEMPLATE_URL_LIMIT, L as getDefaultStateBucketName, M as AssetPublisher, N as stringifyValue, O as TemplateParser, P as WorkGraph, Q as resolveBucketRegion, R as getLegacyStateBucketName, S as CloudControlProvider, T as applyRoleArnIfSet, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as warnDeprecatedNoPrefixCliFlag, X as AssemblyReader, Y as uploadCfnTemplate, _ as matchesCdkPath, a as withRetry, at as LocalStartServiceError, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as NestedStackChildDirectDestroyError, d as green, dt as ResourceTimeoutError, et as CdkdError, f as red, ft as ResourceUpdateNotSupportedError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalMigrateError, j as shouldRetainResource, k as LockManager, l as cyan, lt as PartialFailureError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, o as IMPLICIT_DELETE_DEPENDENCIES, p as yellow, pt as StackHasActiveImportsError, q as MIGRATE_TMP_PREFIX, r as DeployEngine, rt as LocalInvokeBuildError$1, s as formatResourceLine, st as MissingCdkCliError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ProvisioningError, v as normalizeAwsTagsToCfn, w as IntrinsicFunctionResolver, x as findActionableSilentDrops, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveApp } from "./deploy-engine-D8JZ8p6A.js";
3
+ import { A as S3StateBackend, B as resolveCaptureObservedState, C as assertRegionMatch, D as DagBuilder, E as DiffCalculator, F as buildDockerImage, G as CFN_TEMPLATE_BODY_LIMIT, H as resolveStateBucketWithDefault, I as Synthesizer, J as findLargeInlineResources, K as CFN_TEMPLATE_URL_LIMIT, L as getDefaultStateBucketName, M as AssetPublisher, N as stringifyValue, O as TemplateParser, P as WorkGraph, Q as resolveBucketRegion, R as getLegacyStateBucketName, S as CloudControlProvider, T as applyRoleArnIfSet, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as warnDeprecatedNoPrefixCliFlag, X as AssemblyReader, Y as uploadCfnTemplate, _ as matchesCdkPath, a as withRetry, at as LocalStartServiceError, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as NestedStackChildDirectDestroyError, d as green, dt as ResourceTimeoutError, et as CdkdError, f as red, ft as ResourceUpdateNotSupportedError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalMigrateError, j as shouldRetainResource, k as LockManager, l as cyan, lt as PartialFailureError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, o as IMPLICIT_DELETE_DEPENDENCIES, p as yellow, pt as StackHasActiveImportsError, q as MIGRATE_TMP_PREFIX, r as DeployEngine, rt as LocalInvokeBuildError$1, s as formatResourceLine, st as MissingCdkCliError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ProvisioningError, v as normalizeAwsTagsToCfn, w as IntrinsicFunctionResolver, x as findActionableSilentDrops, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveApp } from "./deploy-engine-C4CvmQbh.js";
4
4
  import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-B15NAPbL.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { randomBytes, randomUUID } from "node:crypto";
@@ -8763,6 +8763,7 @@ var DynamoDBTableProvider = class {
8763
8763
  "BillingMode",
8764
8764
  "ProvisionedThroughput",
8765
8765
  "OnDemandThroughput",
8766
+ "WarmThroughput",
8766
8767
  "StreamSpecification",
8767
8768
  "GlobalSecondaryIndexes",
8768
8769
  "LocalSecondaryIndexes",
@@ -8804,6 +8805,7 @@ var DynamoDBTableProvider = class {
8804
8805
  };
8805
8806
  }
8806
8807
  if (properties["OnDemandThroughput"]) createParams.OnDemandThroughput = properties["OnDemandThroughput"];
8808
+ if (properties["WarmThroughput"]) createParams.WarmThroughput = properties["WarmThroughput"];
8807
8809
  if (properties["StreamSpecification"]) createParams.StreamSpecification = {
8808
8810
  StreamEnabled: true,
8809
8811
  StreamViewType: properties["StreamSpecification"]["StreamViewType"]
@@ -8863,6 +8865,15 @@ var DynamoDBTableProvider = class {
8863
8865
  this.logger.debug(`Updated OnDemandThroughput on DynamoDB table ${physicalId}`);
8864
8866
  }
8865
8867
  }
8868
+ if (JSON.stringify(properties["WarmThroughput"]) !== JSON.stringify(previousProperties["WarmThroughput"])) {
8869
+ if (properties["WarmThroughput"]) {
8870
+ await this.dynamoDBClient.send(new UpdateTableCommand({
8871
+ TableName: physicalId,
8872
+ WarmThroughput: properties["WarmThroughput"]
8873
+ }));
8874
+ this.logger.debug(`Updated WarmThroughput on DynamoDB table ${physicalId}`);
8875
+ }
8876
+ }
8866
8877
  if (JSON.stringify(properties["PointInTimeRecoverySpecification"]) !== JSON.stringify(previousProperties["PointInTimeRecoverySpecification"])) await this.applyPointInTimeRecovery(physicalId, properties["PointInTimeRecoverySpecification"], previousProperties["PointInTimeRecoverySpecification"]);
8867
8878
  if (JSON.stringify(properties["TimeToLiveSpecification"]) !== JSON.stringify(previousProperties["TimeToLiveSpecification"])) await this.applyTimeToLive(physicalId, properties["TimeToLiveSpecification"], previousProperties["TimeToLiveSpecification"]);
8868
8879
  return {
@@ -9143,6 +9154,12 @@ var DynamoDBTableProvider = class {
9143
9154
  if (table.OnDemandThroughput.MaxWriteRequestUnits !== void 0) odt["MaxWriteRequestUnits"] = table.OnDemandThroughput.MaxWriteRequestUnits;
9144
9155
  if (Object.keys(odt).length > 0) result["OnDemandThroughput"] = odt;
9145
9156
  }
9157
+ if (table.WarmThroughput) {
9158
+ const wt = {};
9159
+ if (table.WarmThroughput.ReadUnitsPerSecond !== void 0) wt["ReadUnitsPerSecond"] = table.WarmThroughput.ReadUnitsPerSecond;
9160
+ if (table.WarmThroughput.WriteUnitsPerSecond !== void 0) wt["WriteUnitsPerSecond"] = table.WarmThroughput.WriteUnitsPerSecond;
9161
+ if (Object.keys(wt).length > 0) result["WarmThroughput"] = wt;
9162
+ }
9146
9163
  if (table.StreamSpecification?.StreamEnabled && table.StreamSpecification.StreamViewType) result["StreamSpecification"] = {
9147
9164
  StreamEnabled: true,
9148
9165
  StreamViewType: table.StreamSpecification.StreamViewType
@@ -14742,7 +14759,9 @@ var ApiGatewayProvider = class ApiGatewayProvider {
14742
14759
  "StageName",
14743
14760
  "DeploymentId",
14744
14761
  "Description",
14745
- "Tags"
14762
+ "Tags",
14763
+ "TracingEnabled",
14764
+ "Variables"
14746
14765
  ])],
14747
14766
  ["AWS::ApiGateway::Method", new Set([
14748
14767
  "RestApiId",
@@ -15230,6 +15249,8 @@ var ApiGatewayProvider = class ApiGatewayProvider {
15230
15249
  stageName,
15231
15250
  deploymentId,
15232
15251
  description: properties["Description"],
15252
+ tracingEnabled: properties["TracingEnabled"],
15253
+ variables: properties["Variables"],
15233
15254
  tags: this.cfnTagsToRecord(properties["Tags"])
15234
15255
  }));
15235
15256
  this.logger.debug(`Successfully created API Gateway Stage ${logicalId}: ${stageName}`);
@@ -15265,6 +15286,23 @@ var ApiGatewayProvider = class ApiGatewayProvider {
15265
15286
  path: "/description",
15266
15287
  value: description ?? ""
15267
15288
  });
15289
+ const tracingEnabled = properties["TracingEnabled"];
15290
+ if (tracingEnabled !== previousProperties["TracingEnabled"]) patchOperations.push({
15291
+ op: "replace",
15292
+ path: "/tracingEnabled",
15293
+ value: String(tracingEnabled ?? false)
15294
+ });
15295
+ const variables = properties["Variables"] ?? {};
15296
+ const prevVariables = previousProperties["Variables"] ?? {};
15297
+ for (const [key, value] of Object.entries(variables)) if (prevVariables[key] !== value) patchOperations.push({
15298
+ op: "replace",
15299
+ path: `/variables/${key}`,
15300
+ value
15301
+ });
15302
+ for (const key of Object.keys(prevVariables)) if (!(key in variables)) patchOperations.push({
15303
+ op: "remove",
15304
+ path: `/variables/${key}`
15305
+ });
15268
15306
  try {
15269
15307
  if (patchOperations.length > 0) await this.apiGatewayClient.send(new UpdateStageCommand({
15270
15308
  restApiId,
@@ -15766,6 +15804,8 @@ var ApiGatewayProvider = class ApiGatewayProvider {
15766
15804
  if (resp.stageName !== void 0) result["StageName"] = resp.stageName;
15767
15805
  result["DeploymentId"] = resp.deploymentId ?? "";
15768
15806
  result["Description"] = resp.description ?? "";
15807
+ if (resp.tracingEnabled !== void 0) result["TracingEnabled"] = resp.tracingEnabled;
15808
+ if (resp.variables !== void 0) result["Variables"] = resp.variables;
15769
15809
  return result;
15770
15810
  } catch (err) {
15771
15811
  if (err instanceof NotFoundException$1) return void 0;
@@ -51338,7 +51378,7 @@ function reorderArgs(argv) {
51338
51378
  */
51339
51379
  async function main() {
51340
51380
  const program = new Command();
51341
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.175.0");
51381
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.177.0");
51342
51382
  program.addCommand(createBootstrapCommand());
51343
51383
  program.addCommand(createSynthCommand());
51344
51384
  program.addCommand(createListCommand());