@go-to-k/cdkd 0.230.21 → 0.230.23

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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { A as withErrorHandling, B as generateResourceName, C as StackHasActiveImportsError, F as getLiveRenderer, H as withSkipPrefix, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, M as getLogger, P as runStackBuffered, R as PATTERN_B_RESOURCE_TYPES, S as ResourceUpdateNotSupportedError, U as withStackName, V as generateResourceNameWithFallback, _ as MissingCdkCliError, a as assertRegionMatch, b as ProvisioningError, f as LocalInvokeBuildError$1, i as resolveExplicitPhysicalId, k as normalizeAwsError, l as CdkdError, m as LocalStartServiceError, n as matchesCdkPath, o as disableInstanceApiTermination, p as LocalMigrateError, r as normalizeAwsTagsToCfn, s as isTerminationProtectionPropagationError, t as CDK_PATH_TAG, v as NestedStackChildDirectDestroyError, w as StackTerminationProtectionError, x as ResourceTimeoutError, y as PartialFailureError } from "./import-helpers-DayvBD4T.js";
3
3
  import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-pjPwZz1r.js";
4
- import { $ as resolveStateBucketWithDefaultAndSource, A as TemplateParser, B as getDockerCmd, C as findActionableSilentDrops, D as applyRoleArnIfSet, E as cfnRefValueFromPhysicalId, F as AssetPublisher, G as Synthesizer, H as runDockerStreaming, I as stringifyValue, J as getLegacyStateBucketName, K as synthesisStatusMessage, L as WorkGraph, M as S3StateBackend, N as rebuildClientForBucketRegion, O as DiffCalculator, P as shouldRetainResource, Q as resolveStateBucketWithDefault, R as buildDockerImage, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as AssetManifestLoader, V as runDockerForeground, W as getDockerImageBySourceHash, X as resolveCaptureObservedState, Y as resolveApp, Z as resolveSkipPrefix, _ as green, a as withRetry, at as uploadCfnTemplate, b as IAMRoleProvider, c as computeImplicitDeleteEdges, ct as resolveBucketRegion, d as isStatefulRecreateTargetSync, et as warnDeprecatedNoPrefixCliFlag, f as renderStatefulReason, g as gray, h as cyan, i as withResourceDeadline, it as findLargeInlineResources, j as LockManager, k as DagBuilder, l as extractDeploymentEventError, m as bold, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as CFN_TEMPLATE_URL_LIMIT, o as isRetryableTransientError, ot as AssemblyReader, p as formatResourceLine, q as getDefaultStateBucketName, r as DeployEngine, rt as MIGRATE_TMP_PREFIX, s as IMPLICIT_DELETE_DEPENDENCIES, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as CFN_TEMPLATE_BODY_LIMIT, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, v as red, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, y as yellow, z as formatDockerLoginError } from "./deploy-engine-C92fYX-D.js";
4
+ import { $ as resolveStateBucketWithDefaultAndSource, A as TemplateParser, B as getDockerCmd, C as findActionableSilentDrops, D as applyRoleArnIfSet, E as cfnRefValueFromPhysicalId, F as AssetPublisher, G as Synthesizer, H as runDockerStreaming, I as stringifyValue, J as getLegacyStateBucketName, K as synthesisStatusMessage, L as WorkGraph, M as S3StateBackend, N as rebuildClientForBucketRegion, O as DiffCalculator, P as shouldRetainResource, Q as resolveStateBucketWithDefault, R as buildDockerImage, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as AssetManifestLoader, V as runDockerForeground, W as getDockerImageBySourceHash, X as resolveCaptureObservedState, Y as resolveApp, Z as resolveSkipPrefix, _ as green, a as withRetry, at as uploadCfnTemplate, b as IAMRoleProvider, c as computeImplicitDeleteEdges, ct as resolveBucketRegion, d as isStatefulRecreateTargetSync, et as warnDeprecatedNoPrefixCliFlag, f as renderStatefulReason, g as gray, h as cyan, i as withResourceDeadline, it as findLargeInlineResources, j as LockManager, k as DagBuilder, l as extractDeploymentEventError, m as bold, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as CFN_TEMPLATE_URL_LIMIT, o as isRetryableTransientError, ot as AssemblyReader, p as formatResourceLine, q as getDefaultStateBucketName, r as DeployEngine, rt as MIGRATE_TMP_PREFIX, s as IMPLICIT_DELETE_DEPENDENCIES, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as CFN_TEMPLATE_BODY_LIMIT, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, v as red, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, y as yellow, z as formatDockerLoginError } from "./deploy-engine-BERaDgMo.js";
5
5
  import { t as ASGProvider } from "./asg-provider-Dgj3loIG.js";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
7
7
  import { createHash, randomBytes, randomUUID } from "node:crypto";
@@ -1445,7 +1445,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1445
1445
  const FLUSH_EVENT_THRESHOLD = 50;
1446
1446
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1447
1447
  function getCdkdVersion() {
1448
- return "0.230.21";
1448
+ return "0.230.23";
1449
1449
  }
1450
1450
  /**
1451
1451
  * Generate a time-sortable unique run id, e.g.
@@ -13582,10 +13582,14 @@ var EventBridgeRuleProvider = class {
13582
13582
  async delete(logicalId, physicalId, resourceType, _properties, context) {
13583
13583
  this.logger.debug(`Deleting EventBridge rule ${logicalId}: ${physicalId}`);
13584
13584
  const ruleName = this.extractRuleNameFromArn(physicalId);
13585
+ const busParam = this.busParamFromArn(physicalId);
13585
13586
  try {
13586
13587
  let targetIds = [];
13587
13588
  try {
13588
- targetIds = ((await this.eventBridgeClient.send(new ListTargetsByRuleCommand({ Rule: ruleName }))).Targets || []).map((t) => t.Id).filter((id) => id !== void 0);
13589
+ targetIds = ((await this.eventBridgeClient.send(new ListTargetsByRuleCommand({
13590
+ Rule: ruleName,
13591
+ ...busParam
13592
+ }))).Targets || []).map((t) => t.Id).filter((id) => id !== void 0);
13589
13593
  } catch (error) {
13590
13594
  if (error instanceof ResourceNotFoundException$2) {
13591
13595
  assertRegionMatch(await this.eventBridgeClient.config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
@@ -13597,11 +13601,15 @@ var EventBridgeRuleProvider = class {
13597
13601
  if (targetIds.length > 0) {
13598
13602
  await this.eventBridgeClient.send(new RemoveTargetsCommand({
13599
13603
  Rule: ruleName,
13600
- Ids: targetIds
13604
+ Ids: targetIds,
13605
+ ...busParam
13601
13606
  }));
13602
13607
  this.logger.debug(`Removed ${targetIds.length} targets from rule ${ruleName}`);
13603
13608
  }
13604
- await this.eventBridgeClient.send(new DeleteRuleCommand({ Name: ruleName }));
13609
+ await this.eventBridgeClient.send(new DeleteRuleCommand({
13610
+ Name: ruleName,
13611
+ ...busParam
13612
+ }));
13605
13613
  this.logger.debug(`Successfully deleted EventBridge rule ${logicalId}`);
13606
13614
  } catch (error) {
13607
13615
  if (error instanceof ResourceNotFoundException$2) {
@@ -13618,7 +13626,10 @@ var EventBridgeRuleProvider = class {
13618
13626
  */
13619
13627
  async getAttribute(physicalId, _resourceType, attributeName) {
13620
13628
  const ruleName = this.extractRuleNameFromArn(physicalId);
13621
- if (attributeName === "Arn") return (await this.eventBridgeClient.send(new DescribeRuleCommand({ Name: ruleName }))).Arn;
13629
+ if (attributeName === "Arn") return (await this.eventBridgeClient.send(new DescribeRuleCommand({
13630
+ Name: ruleName,
13631
+ ...this.busParamFromArn(physicalId)
13632
+ }))).Arn;
13622
13633
  throw new Error(`Unsupported attribute: ${attributeName} for AWS::Events::Rule`);
13623
13634
  }
13624
13635
  /**
@@ -13641,12 +13652,12 @@ var EventBridgeRuleProvider = class {
13641
13652
  */
13642
13653
  async readCurrentState(physicalId, _logicalId, _resourceType) {
13643
13654
  const ruleName = this.extractRuleNameFromArn(physicalId);
13644
- const eventBusName = this.extractBusNameFromArn(physicalId);
13655
+ const busParam = this.busParamFromArn(physicalId);
13645
13656
  let resp;
13646
13657
  try {
13647
13658
  resp = await this.eventBridgeClient.send(new DescribeRuleCommand({
13648
13659
  Name: ruleName,
13649
- ...eventBusName && eventBusName !== "default" ? { EventBusName: eventBusName } : {}
13660
+ ...busParam
13650
13661
  }));
13651
13662
  } catch (err) {
13652
13663
  if (err instanceof ResourceNotFoundException$2) return void 0;
@@ -13667,7 +13678,7 @@ var EventBridgeRuleProvider = class {
13667
13678
  try {
13668
13679
  result["Targets"] = (await this.eventBridgeClient.send(new ListTargetsByRuleCommand({
13669
13680
  Rule: ruleName,
13670
- ...eventBusName && eventBusName !== "default" ? { EventBusName: eventBusName } : {}
13681
+ ...busParam
13671
13682
  }))).Targets ?? [];
13672
13683
  } catch (err) {
13673
13684
  if (!(err instanceof ResourceNotFoundException$2)) throw err;
@@ -13702,10 +13713,12 @@ var EventBridgeRuleProvider = class {
13702
13713
  const eventBusName = input.properties["EventBusName"];
13703
13714
  if (input.knownPhysicalId) try {
13704
13715
  const ruleName = this.extractRuleNameFromArn(input.knownPhysicalId);
13716
+ const arnBusParam = this.busParamFromArn(input.knownPhysicalId);
13717
+ const busParam = "EventBusName" in arnBusParam ? arnBusParam : typeof eventBusName === "string" && eventBusName ? { EventBusName: eventBusName } : {};
13705
13718
  return {
13706
13719
  physicalId: (await this.eventBridgeClient.send(new DescribeRuleCommand({
13707
13720
  Name: ruleName,
13708
- ...eventBusName && { EventBusName: eventBusName }
13721
+ ...busParam
13709
13722
  }))).Arn ?? input.knownPhysicalId,
13710
13723
  attributes: {}
13711
13724
  };
@@ -13765,10 +13778,19 @@ var EventBridgeRuleProvider = class {
13765
13778
  *
13766
13779
  * Returns `undefined` when the input is not an ARN (we can't tell which bus).
13767
13780
  */
13781
+ /**
13782
+ * `EventBusName` request parameter derived from a rule ARN — `{}` for
13783
+ * default-bus rules (preserves the Name-only wire shape) and for non-ARN
13784
+ * physical ids (bus unknowable).
13785
+ */
13786
+ busParamFromArn(arn) {
13787
+ const eventBusName = this.extractBusNameFromArn(arn);
13788
+ return eventBusName && eventBusName !== "default" ? { EventBusName: eventBusName } : {};
13789
+ }
13768
13790
  extractBusNameFromArn(arn) {
13769
13791
  if (!arn.startsWith("arn:")) return void 0;
13770
13792
  const parts = arn.split("/");
13771
- if (parts.length === 3) return parts[1];
13793
+ if (parts.length >= 3) return parts.slice(1, -1).join("/");
13772
13794
  return "default";
13773
13795
  }
13774
13796
  };
@@ -55383,7 +55405,7 @@ function reorderArgs(argv) {
55383
55405
  async function main() {
55384
55406
  installPipeCloseHandler();
55385
55407
  const program = new Command();
55386
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.230.21");
55408
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.230.23");
55387
55409
  program.addCommand(createBootstrapCommand());
55388
55410
  program.addCommand(createSynthCommand());
55389
55411
  program.addCommand(createListCommand());