@go-to-k/cdkd 0.174.0 → 0.176.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-D5QbP-ot.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-DgR-Ev-E.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";
@@ -8762,6 +8762,7 @@ var DynamoDBTableProvider = class {
8762
8762
  "AttributeDefinitions",
8763
8763
  "BillingMode",
8764
8764
  "ProvisionedThroughput",
8765
+ "OnDemandThroughput",
8765
8766
  "StreamSpecification",
8766
8767
  "GlobalSecondaryIndexes",
8767
8768
  "LocalSecondaryIndexes",
@@ -8802,6 +8803,7 @@ var DynamoDBTableProvider = class {
8802
8803
  WriteCapacityUnits: Number(pt?.["WriteCapacityUnits"] ?? 5)
8803
8804
  };
8804
8805
  }
8806
+ if (properties["OnDemandThroughput"]) createParams.OnDemandThroughput = properties["OnDemandThroughput"];
8805
8807
  if (properties["StreamSpecification"]) createParams.StreamSpecification = {
8806
8808
  StreamEnabled: true,
8807
8809
  StreamViewType: properties["StreamSpecification"]["StreamViewType"]
@@ -8852,6 +8854,15 @@ var DynamoDBTableProvider = class {
8852
8854
  try {
8853
8855
  const table = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }))).Table;
8854
8856
  if (table?.TableArn) await this.applyTagDiff(table.TableArn, previousProperties["Tags"], properties["Tags"]);
8857
+ if (JSON.stringify(properties["OnDemandThroughput"]) !== JSON.stringify(previousProperties["OnDemandThroughput"])) {
8858
+ if (properties["OnDemandThroughput"]) {
8859
+ await this.dynamoDBClient.send(new UpdateTableCommand({
8860
+ TableName: physicalId,
8861
+ OnDemandThroughput: properties["OnDemandThroughput"]
8862
+ }));
8863
+ this.logger.debug(`Updated OnDemandThroughput on DynamoDB table ${physicalId}`);
8864
+ }
8865
+ }
8855
8866
  if (JSON.stringify(properties["PointInTimeRecoverySpecification"]) !== JSON.stringify(previousProperties["PointInTimeRecoverySpecification"])) await this.applyPointInTimeRecovery(physicalId, properties["PointInTimeRecoverySpecification"], previousProperties["PointInTimeRecoverySpecification"]);
8856
8867
  if (JSON.stringify(properties["TimeToLiveSpecification"]) !== JSON.stringify(previousProperties["TimeToLiveSpecification"])) await this.applyTimeToLive(physicalId, properties["TimeToLiveSpecification"], previousProperties["TimeToLiveSpecification"]);
8857
8868
  return {
@@ -9126,6 +9137,12 @@ var DynamoDBTableProvider = class {
9126
9137
  ReadCapacityUnits: table.ProvisionedThroughput.ReadCapacityUnits,
9127
9138
  WriteCapacityUnits: table.ProvisionedThroughput.WriteCapacityUnits
9128
9139
  };
9140
+ if (table.OnDemandThroughput) {
9141
+ const odt = {};
9142
+ if (table.OnDemandThroughput.MaxReadRequestUnits !== void 0) odt["MaxReadRequestUnits"] = table.OnDemandThroughput.MaxReadRequestUnits;
9143
+ if (table.OnDemandThroughput.MaxWriteRequestUnits !== void 0) odt["MaxWriteRequestUnits"] = table.OnDemandThroughput.MaxWriteRequestUnits;
9144
+ if (Object.keys(odt).length > 0) result["OnDemandThroughput"] = odt;
9145
+ }
9129
9146
  if (table.StreamSpecification?.StreamEnabled && table.StreamSpecification.StreamViewType) result["StreamSpecification"] = {
9130
9147
  StreamEnabled: true,
9131
9148
  StreamViewType: table.StreamSpecification.StreamViewType
@@ -14725,7 +14742,9 @@ var ApiGatewayProvider = class ApiGatewayProvider {
14725
14742
  "StageName",
14726
14743
  "DeploymentId",
14727
14744
  "Description",
14728
- "Tags"
14745
+ "Tags",
14746
+ "TracingEnabled",
14747
+ "Variables"
14729
14748
  ])],
14730
14749
  ["AWS::ApiGateway::Method", new Set([
14731
14750
  "RestApiId",
@@ -15213,6 +15232,8 @@ var ApiGatewayProvider = class ApiGatewayProvider {
15213
15232
  stageName,
15214
15233
  deploymentId,
15215
15234
  description: properties["Description"],
15235
+ tracingEnabled: properties["TracingEnabled"],
15236
+ variables: properties["Variables"],
15216
15237
  tags: this.cfnTagsToRecord(properties["Tags"])
15217
15238
  }));
15218
15239
  this.logger.debug(`Successfully created API Gateway Stage ${logicalId}: ${stageName}`);
@@ -15248,6 +15269,23 @@ var ApiGatewayProvider = class ApiGatewayProvider {
15248
15269
  path: "/description",
15249
15270
  value: description ?? ""
15250
15271
  });
15272
+ const tracingEnabled = properties["TracingEnabled"];
15273
+ if (tracingEnabled !== previousProperties["TracingEnabled"]) patchOperations.push({
15274
+ op: "replace",
15275
+ path: "/tracingEnabled",
15276
+ value: String(tracingEnabled ?? false)
15277
+ });
15278
+ const variables = properties["Variables"] ?? {};
15279
+ const prevVariables = previousProperties["Variables"] ?? {};
15280
+ for (const [key, value] of Object.entries(variables)) if (prevVariables[key] !== value) patchOperations.push({
15281
+ op: "replace",
15282
+ path: `/variables/${key}`,
15283
+ value
15284
+ });
15285
+ for (const key of Object.keys(prevVariables)) if (!(key in variables)) patchOperations.push({
15286
+ op: "remove",
15287
+ path: `/variables/${key}`
15288
+ });
15251
15289
  try {
15252
15290
  if (patchOperations.length > 0) await this.apiGatewayClient.send(new UpdateStageCommand({
15253
15291
  restApiId,
@@ -15749,6 +15787,8 @@ var ApiGatewayProvider = class ApiGatewayProvider {
15749
15787
  if (resp.stageName !== void 0) result["StageName"] = resp.stageName;
15750
15788
  result["DeploymentId"] = resp.deploymentId ?? "";
15751
15789
  result["Description"] = resp.description ?? "";
15790
+ if (resp.tracingEnabled !== void 0) result["TracingEnabled"] = resp.tracingEnabled;
15791
+ if (resp.variables !== void 0) result["Variables"] = resp.variables;
15752
15792
  return result;
15753
15793
  } catch (err) {
15754
15794
  if (err instanceof NotFoundException$1) return void 0;
@@ -51321,7 +51361,7 @@ function reorderArgs(argv) {
51321
51361
  */
51322
51362
  async function main() {
51323
51363
  const program = new Command();
51324
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.174.0");
51364
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.176.0");
51325
51365
  program.addCommand(createBootstrapCommand());
51326
51366
  program.addCommand(createSynthCommand());
51327
51367
  program.addCommand(createListCommand());