@go-to-k/cdkd 0.278.3 → 0.278.5

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
- import { $ as DagBuilder, A as red, At as resolveApp, B as isTerminationProtectionPropagationError, Bt as CFN_TEMPLATE_URL_LIMIT, C as isStatefulRecreateTargetSync, Ct as runDockerStreaming, D as cyan, Dt as synthesisStatusMessage, E as bold, Et as Synthesizer, F as ProviderRegistry, Ft as resolveStateBucketWithDefaultAndSource, G as normalizeAwsTagsToCfn, Gt as AssemblyReader, H as cfnRefValueFromPhysicalId, Ht as findLargeInlineResources, I as findActionableSilentDrops, It as resolveUseCdkBootstrapAssets, J as applyRoleArnIfSet, Jt as resolveBucketRegion, K as resolveExplicitPhysicalId, Kt as processStackMessages, L as CloudControlProvider, Lt as stateBucketExistenceConfirmed, M as IAMRoleProvider, Mt as resolveCaptureObservedState, N as collectInlinePolicyNamesManagedBySiblings, Nt as resolveSkipPrefix, O as gray, Ot as getDefaultStateBucketName, P as clearOnUpdateRemoval, Pt as resolveStateBucketWithDefault, Q as isRetryableTransientError, Qt as setAwsClients, R as slowCcOperationTimeoutMs, Rt as warnDeprecatedNoPrefixCliFlag, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as runDockerForeground, T as formatResourceLine, Tt as getDockerImageBySourceHash, U as refStateLookupFromResource, Ut as uploadCfnTemplate, V as IntrinsicFunctionResolver, Vt as MIGRATE_TMP_PREFIX, W as WAFv2WebACLProvider, Wt as expectedOwnerParam, X as describeTypeWithThrottleRetry, Xt as getAwsClients, Y as DiffCalculator, Yt as AwsClients, Z as withRetry, Zt as resetAwsClients, _ as createPreDeleteFinalSnapshot, _t as validateAssetBucketName, a as DeploymentEventsStore, an as LocalMigrateError, at as AssetPublisher, b as unsupportedFinalSnapshotError, bn as normalizeAwsError, bt as formatDockerLoginError, c as replayFailedOperations, cn as MissingCdkCliError, ct as buildAssetRedirectMap, d as IMPLICIT_DELETE_DEPENDENCIES, dn as ProvisioningError, dt as rewriteTemplateAssetReferences, en as CdkdError, et as TemplateParser, f as computeImplicitDeleteEdges, fn as ResourceTimeoutError, ft as AssetModeResolver, g as ccRoutedFinalSnapshotError, gt as parseBootstrapMarker, h as buildFinalSnapshotIdentifier, hn as StackTerminationProtectionError, ht as getBootstrapMarkerKey, i as DeploymentEventsReader, in as LocalInvokeBuildError$1, it as shouldRetainResource, j as yellow, jt as resolveAutoAssetStorage, k as green, kt as getLegacyStateBucketName, l as replayRollback, ln as NestedStackChildDirectDestroyError, lt as createAssetRedirectResolver, m as PRE_DELETE_SNAPSHOT_TYPES, mn as StackHasActiveImportsError, mt as ensureAssetStorage, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as S3StateBackend, o as planFailedOps, on as LocalStartServiceError, ot as stringifyValue, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as ResourceUpdateNotSupportedError, pt as BOOTSTRAP_MARKER_PREFIX, q as assertRegionMatch, r as DeployEngine, rn as DeployCancelledError, rt as rebuildClientForBucketRegion, s as planRollback, st as WorkGraph, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as LockManager, u as withResourceDeadline, un as PartialFailureError, ut as loadPublishableAssetManifest, v as isFinalSnapshotError, vt as validateContainerRepoName, w as renderStatefulReason, wt as AssetManifestLoader, x as extractDeploymentEventError, xn as withErrorHandling, xt as getDockerCmd, y as refusesFinalSnapshot, yt as buildDockerImage, z as disableInstanceApiTermination, zt as CFN_TEMPLATE_BODY_LIMIT } from "./deploy-engine-BemRUhiN.js";
2
+ import { $ as DagBuilder, A as red, At as resolveApp, B as isTerminationProtectionPropagationError, Bt as CFN_TEMPLATE_URL_LIMIT, C as isStatefulRecreateTargetSync, Ct as runDockerStreaming, D as cyan, Dt as synthesisStatusMessage, E as bold, Et as Synthesizer, F as ProviderRegistry, Ft as resolveStateBucketWithDefaultAndSource, G as normalizeAwsTagsToCfn, Gt as AssemblyReader, H as cfnRefValueFromPhysicalId, Ht as findLargeInlineResources, I as findActionableSilentDrops, It as resolveUseCdkBootstrapAssets, J as applyRoleArnIfSet, Jt as resolveBucketRegion, K as resolveExplicitPhysicalId, Kt as processStackMessages, L as CloudControlProvider, Lt as stateBucketExistenceConfirmed, M as IAMRoleProvider, Mt as resolveCaptureObservedState, N as collectInlinePolicyNamesManagedBySiblings, Nt as resolveSkipPrefix, O as gray, Ot as getDefaultStateBucketName, P as clearOnUpdateRemoval, Pt as resolveStateBucketWithDefault, Q as isRetryableTransientError, Qt as setAwsClients, R as slowCcOperationTimeoutMs, Rt as warnDeprecatedNoPrefixCliFlag, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as runDockerForeground, T as formatResourceLine, Tt as getDockerImageBySourceHash, U as refStateLookupFromResource, Ut as uploadCfnTemplate, V as IntrinsicFunctionResolver, Vt as MIGRATE_TMP_PREFIX, W as WAFv2WebACLProvider, Wt as expectedOwnerParam, X as describeTypeWithThrottleRetry, Xt as getAwsClients, Y as DiffCalculator, Yt as AwsClients, Z as withRetry, Zt as resetAwsClients, _ as createPreDeleteFinalSnapshot, _t as validateAssetBucketName, a as DeploymentEventsStore, an as LocalMigrateError, at as AssetPublisher, b as unsupportedFinalSnapshotError, bn as normalizeAwsError, bt as formatDockerLoginError, c as replayFailedOperations, cn as MissingCdkCliError, ct as buildAssetRedirectMap, d as IMPLICIT_DELETE_DEPENDENCIES, dn as ProvisioningError, dt as rewriteTemplateAssetReferences, en as CdkdError, et as TemplateParser, f as computeImplicitDeleteEdges, fn as ResourceTimeoutError, ft as AssetModeResolver, g as ccRoutedFinalSnapshotError, gt as parseBootstrapMarker, h as buildFinalSnapshotIdentifier, hn as StackTerminationProtectionError, ht as getBootstrapMarkerKey, i as DeploymentEventsReader, in as LocalInvokeBuildError$1, it as shouldRetainResource, j as yellow, jt as resolveAutoAssetStorage, k as green, kt as getLegacyStateBucketName, l as replayRollback, ln as NestedStackChildDirectDestroyError, lt as createAssetRedirectResolver, m as PRE_DELETE_SNAPSHOT_TYPES, mn as StackHasActiveImportsError, mt as ensureAssetStorage, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as S3StateBackend, o as planFailedOps, on as LocalStartServiceError, ot as stringifyValue, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as ResourceUpdateNotSupportedError, pt as BOOTSTRAP_MARKER_PREFIX, q as assertRegionMatch, r as DeployEngine, rn as DeployCancelledError, rt as rebuildClientForBucketRegion, s as planRollback, st as WorkGraph, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as LockManager, u as withResourceDeadline, un as PartialFailureError, ut as loadPublishableAssetManifest, v as isFinalSnapshotError, vt as validateContainerRepoName, w as renderStatefulReason, wt as AssetManifestLoader, x as extractDeploymentEventError, xn as withErrorHandling, xt as getDockerCmd, y as refusesFinalSnapshot, yt as buildDockerImage, z as disableInstanceApiTermination, zt as CFN_TEMPLATE_BODY_LIMIT } from "./deploy-engine-BWPBsNGL.js";
3
3
  import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as withSkipPrefix, i as runStackBuffered, n as getLogger, o as PATTERN_B_NAME_OPTIONS, p as withStackName, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-BYMEE-BS.js";
4
- import { t as ASGProvider } from "./asg-provider-ACQwFzcN.js";
4
+ import { t as ASGProvider } from "./asg-provider--hs1COdE.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, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, 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";
@@ -9754,6 +9754,48 @@ function classifyEventSourceFromProperties(properties) {
9754
9754
  DocumentDBEventSourceConfig: properties["DocumentDBEventSourceConfig"]
9755
9755
  });
9756
9756
  }
9757
+ /**
9758
+ * CFn spells the self-managed-Kafka bootstrap-server list
9759
+ * `SelfManagedEventSource.Endpoints.KafkaBootstrapServers`, while the SDK
9760
+ * models `Endpoints` as `Partial<Record<EndPointType, string[]>>` keyed by the
9761
+ * enum VALUE `KAFKA_BOOTSTRAP_SERVERS` (`@aws-sdk/client-lambda`
9762
+ * `EndPointType`). Because `Endpoints` is a MAP rather than a modeled
9763
+ * structure, the serializer forwards the unknown CFn key verbatim and the
9764
+ * service rejects the whole request — so every CDK `SelfManagedKafkaEventSource`
9765
+ * user hit a hard `CreateEventSourceMapping` failure (issue #1384).
9766
+ *
9767
+ * Both directions are pure key renames of the ONE diverging key; every other
9768
+ * member of the blob (both inside `Endpoints` and beside it) is copied through
9769
+ * untouched. Note that a future `EndPointType` whose CFn spelling also diverges
9770
+ * would reproduce this bug exactly — it needs its own entry here, the pass-
9771
+ * through is not a general solution.
9772
+ *
9773
+ * Anything that is not a re-shapeable object — a non-object blob, a missing or
9774
+ * non-object `Endpoints`, an array `Endpoints` — is returned VERBATIM rather
9775
+ * than dropped. Dropping would be a silent-drop regression against the raw
9776
+ * pass-through this replaced: AWS must stay the one that rejects a malformed
9777
+ * template, not this layer.
9778
+ */
9779
+ const CFN_KAFKA_ENDPOINTS_KEY = "KafkaBootstrapServers";
9780
+ const SDK_KAFKA_ENDPOINTS_KEY = "KAFKA_BOOTSTRAP_SERVERS";
9781
+ function renameEndpointsKey(selfManagedEventSource, from, to) {
9782
+ if (typeof selfManagedEventSource !== "object" || selfManagedEventSource === null) return selfManagedEventSource;
9783
+ const source = { ...selfManagedEventSource };
9784
+ const endpoints = source["Endpoints"];
9785
+ if (typeof endpoints !== "object" || endpoints === null || Array.isArray(endpoints)) return source;
9786
+ const renamed = {};
9787
+ for (const [key, value] of Object.entries(endpoints)) renamed[key === from ? to : key] = value;
9788
+ source["Endpoints"] = renamed;
9789
+ return source;
9790
+ }
9791
+ /** CFn property bag -> `CreateEventSourceMapping` input shape. */
9792
+ function toSdkSelfManagedEventSource(selfManagedEventSource) {
9793
+ return renameEndpointsKey(selfManagedEventSource, CFN_KAFKA_ENDPOINTS_KEY, SDK_KAFKA_ENDPOINTS_KEY);
9794
+ }
9795
+ /** `GetEventSourceMapping` response -> CFn property shape (drift readback). */
9796
+ function toCfnSelfManagedEventSource(selfManagedEventSource) {
9797
+ return renameEndpointsKey(selfManagedEventSource, SDK_KAFKA_ENDPOINTS_KEY, CFN_KAFKA_ENDPOINTS_KEY);
9798
+ }
9757
9799
  const KINDS_WITH_FUNCTION_RESPONSE_TYPES = /* @__PURE__ */ new Set([
9758
9800
  "sqs",
9759
9801
  "kinesis",
@@ -9853,7 +9895,7 @@ var LambdaEventSourceMappingProvider = class {
9853
9895
  if (properties["TumblingWindowInSeconds"]) params.TumblingWindowInSeconds = properties["TumblingWindowInSeconds"];
9854
9896
  if (properties["FunctionResponseTypes"]) params.FunctionResponseTypes = properties["FunctionResponseTypes"];
9855
9897
  if (properties["SourceAccessConfigurations"]) params.SourceAccessConfigurations = properties["SourceAccessConfigurations"];
9856
- if (properties["SelfManagedEventSource"]) params.SelfManagedEventSource = properties["SelfManagedEventSource"];
9898
+ if (properties["SelfManagedEventSource"]) params.SelfManagedEventSource = toSdkSelfManagedEventSource(properties["SelfManagedEventSource"]);
9857
9899
  if (properties["SelfManagedKafkaEventSourceConfig"]) params.SelfManagedKafkaEventSourceConfig = properties["SelfManagedKafkaEventSourceConfig"];
9858
9900
  if (properties["AmazonManagedKafkaEventSourceConfig"]) params.AmazonManagedKafkaEventSourceConfig = properties["AmazonManagedKafkaEventSourceConfig"];
9859
9901
  if (properties["DocumentDBEventSourceConfig"]) params.DocumentDBEventSourceConfig = properties["DocumentDBEventSourceConfig"];
@@ -10081,7 +10123,7 @@ var LambdaEventSourceMappingProvider = class {
10081
10123
  else if (resp.FunctionResponseTypes !== void 0) result["FunctionResponseTypes"] = [...resp.FunctionResponseTypes];
10082
10124
  if (KINDS_WITH_SOURCE_ACCESS_CONFIGURATIONS.has(kind)) result["SourceAccessConfigurations"] = resp.SourceAccessConfigurations ?? [];
10083
10125
  else if (resp.SourceAccessConfigurations !== void 0) result["SourceAccessConfigurations"] = resp.SourceAccessConfigurations;
10084
- if (resp.SelfManagedEventSource !== void 0) result["SelfManagedEventSource"] = resp.SelfManagedEventSource;
10126
+ if (resp.SelfManagedEventSource !== void 0) result["SelfManagedEventSource"] = toCfnSelfManagedEventSource(resp.SelfManagedEventSource);
10085
10127
  if (resp.SelfManagedKafkaEventSourceConfig !== void 0) result["SelfManagedKafkaEventSourceConfig"] = resp.SelfManagedKafkaEventSourceConfig;
10086
10128
  if (resp.AmazonManagedKafkaEventSourceConfig !== void 0) result["AmazonManagedKafkaEventSourceConfig"] = resp.AmazonManagedKafkaEventSourceConfig;
10087
10129
  if (resp.DocumentDBEventSourceConfig !== void 0) result["DocumentDBEventSourceConfig"] = resp.DocumentDBEventSourceConfig;
@@ -41832,8 +41874,8 @@ var S3VectorsProvider = class {
41832
41874
  const vectorBucketArn = (await this.getClient().send(new CreateVectorBucketCommand({
41833
41875
  vectorBucketName,
41834
41876
  encryptionConfiguration: encryptionConfiguration ? {
41835
- sseType: encryptionConfiguration["SSEType"],
41836
- kmsKeyArn: encryptionConfiguration["KMSKeyArn"]
41877
+ sseType: encryptionConfiguration["SseType"],
41878
+ kmsKeyArn: encryptionConfiguration["KmsKeyArn"]
41837
41879
  } : void 0,
41838
41880
  ...tags && Object.keys(tags).length > 0 ? { tags } : {}
41839
41881
  }))).vectorBucketArn ?? "";
@@ -41891,8 +41933,8 @@ var S3VectorsProvider = class {
41891
41933
  *
41892
41934
  * Issues `GetVectorBucket` for the bucket name (the physical id) and
41893
41935
  * surfaces `VectorBucketName` and `EncryptionConfiguration` (re-shaping
41894
- * the camelCase SDK response back to PascalCase CFn property names —
41895
- * `sseType` → `SSEType`, `kmsKeyArn` → `KMSKeyArn`).
41936
+ * the camelCase SDK response back to the CFn property names —
41937
+ * `sseType` → `SseType`, `kmsKeyArn` → `KmsKeyArn`).
41896
41938
  *
41897
41939
  * Returns `undefined` when the bucket is gone (`NotFoundException` /
41898
41940
  * `NoSuchVectorBucket`).
@@ -41912,8 +41954,8 @@ var S3VectorsProvider = class {
41912
41954
  if (bucket?.encryptionConfiguration) {
41913
41955
  const enc = {};
41914
41956
  const sseType = bucket.encryptionConfiguration.sseType;
41915
- if (sseType !== void 0) enc["SSEType"] = sseType;
41916
- if (sseType === "aws:kms" && bucket.encryptionConfiguration.kmsKeyArn !== void 0) enc["KMSKeyArn"] = bucket.encryptionConfiguration.kmsKeyArn;
41957
+ if (sseType !== void 0) enc["SseType"] = sseType;
41958
+ if (sseType === "aws:kms" && bucket.encryptionConfiguration.kmsKeyArn !== void 0) enc["KmsKeyArn"] = bucket.encryptionConfiguration.kmsKeyArn;
41917
41959
  if (Object.keys(enc).length > 0) result["EncryptionConfiguration"] = enc;
41918
41960
  }
41919
41961
  if (bucket?.vectorBucketArn) try {
@@ -64366,7 +64408,7 @@ function createMigrateCommand() {
64366
64408
  */
64367
64409
  function buildProgram() {
64368
64410
  const program = new Command();
64369
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.3");
64411
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.5");
64370
64412
  program.hook("preAction", (_thisCommand, actionCommand) => {
64371
64413
  const { profile } = actionCommand.optsWithGlobals();
64372
64414
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;