@go-to-k/cdkd 0.278.7 → 0.278.8

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-DQxqNiZR.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-HAlYSktR.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-Cqw9Gzck.js";
4
+ import { t as ASGProvider } from "./asg-provider-De5hpQWP.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";
@@ -32268,7 +32268,7 @@ var GlueProvider = class {
32268
32268
  CatalogId: catalogId,
32269
32269
  DatabaseName: databaseName,
32270
32270
  TableInput: this.buildTableInput(tableInput, tableName),
32271
- ...openTableFormatInput !== void 0 && { OpenTableFormatInput: openTableFormatInput }
32271
+ ...openTableFormatInput !== void 0 && { OpenTableFormatInput: toSdkOpenTableFormatInput(openTableFormatInput) }
32272
32272
  }));
32273
32273
  const physicalId = `${databaseName}|${tableName}`;
32274
32274
  this.logger.debug(`Successfully created Glue Table ${logicalId}: ${physicalId}`);
@@ -32843,6 +32843,34 @@ function sleep$1(ms) {
32843
32843
  return new Promise((resolve) => setTimeout(resolve, ms));
32844
32844
  }
32845
32845
  /**
32846
+ * Convert the CFn `AWS::Glue::Table.OpenTableFormatInput` blob to the SDK
32847
+ * `OpenTableFormatInput` shape.
32848
+ *
32849
+ * Every key matches the SDK model except one: CFn's
32850
+ * `IcebergInput.IcebergTableInput` is the SDK's
32851
+ * `IcebergInput.CreateIcebergTableInput` (@aws-sdk/client-glue `models_1.d.ts`
32852
+ * `IcebergInput`). The AWS SDK v3 serializer drops unknown members, so leaving
32853
+ * the CFn spelling in place silently discarded the ENTIRE Iceberg table spec
32854
+ * (`Location` / `Schema` / `PartitionSpec` / `WriteOrder` / `Properties`) while
32855
+ * `CreateTable` still reported success. The renamed object's own members match
32856
+ * CFn 1:1, so this is a single key rename.
32857
+ *
32858
+ * Non-object inputs (an unresolved intrinsic) pass through untouched so AWS
32859
+ * surfaces the real validation error.
32860
+ */
32861
+ function toSdkOpenTableFormatInput(input) {
32862
+ const iceberg = input["IcebergInput"];
32863
+ if (typeof iceberg !== "object" || iceberg === null || Array.isArray(iceberg) || !("IcebergTableInput" in iceberg)) return input;
32864
+ const { IcebergTableInput: icebergTableInput, ...rest } = iceberg;
32865
+ return {
32866
+ ...input,
32867
+ IcebergInput: {
32868
+ ...rest,
32869
+ CreateIcebergTableInput: icebergTableInput
32870
+ }
32871
+ };
32872
+ }
32873
+ /**
32846
32874
  * Build the SDK `EncryptionConfiguration` from the CFn-shape input
32847
32875
  * (`AWS::Glue::SecurityConfiguration.EncryptionConfiguration`). Each
32848
32876
  * sub-config (`S3Encryptions[]` / `CloudWatchEncryption` /
@@ -33298,7 +33326,7 @@ var GlueCrawlerProvider = class {
33298
33326
  await this.getClient().send(new CreateCrawlerCommand({
33299
33327
  Name: name,
33300
33328
  Role: role,
33301
- Targets: targets,
33329
+ Targets: toSdkCrawlerTargets(targets),
33302
33330
  ...buildCrawlerCommonFields(properties),
33303
33331
  ...tags && { Tags: tags }
33304
33332
  }));
@@ -33318,7 +33346,7 @@ var GlueCrawlerProvider = class {
33318
33346
  const updateInput = {
33319
33347
  Name: physicalId,
33320
33348
  ...properties["Role"] !== void 0 && { Role: properties["Role"] },
33321
- ...properties["Targets"] !== void 0 && { Targets: properties["Targets"] },
33349
+ ...properties["Targets"] !== void 0 && { Targets: toSdkCrawlerTargets(properties["Targets"]) },
33322
33350
  ...buildCrawlerCommonFields(properties)
33323
33351
  };
33324
33352
  try {
@@ -33400,7 +33428,7 @@ var GlueCrawlerProvider = class {
33400
33428
  const result = {
33401
33429
  Name: crawler.Name ?? physicalId,
33402
33430
  Role: crawler.Role ?? "",
33403
- Targets: crawler.Targets ? pickDefined(crawler.Targets) : {},
33431
+ Targets: crawler.Targets ? toCfnCrawlerTargets(pickDefined(crawler.Targets)) : {},
33404
33432
  DatabaseName: crawler.DatabaseName ?? "",
33405
33433
  Description: crawler.Description ?? "",
33406
33434
  Schedule: crawler.Schedule?.ScheduleExpression ? { ScheduleExpression: crawler.Schedule.ScheduleExpression } : {},
@@ -33488,6 +33516,93 @@ function buildCrawlerCommonFields(p) {
33488
33516
  return r;
33489
33517
  }
33490
33518
  /**
33519
+ * CFn -> SDK key renames for `Targets.DynamoDBTargets[]`.
33520
+ *
33521
+ * The SDK's `DynamoDBTarget` is a lowercase island in an otherwise-PascalCase
33522
+ * model: `Path` is PascalCase but the scan-tuning members are `scanAll` /
33523
+ * `scanRate` (@aws-sdk/client-glue `models_0.d.ts` `DynamoDBTarget`), while CFn
33524
+ * spells them `ScanAll` / `ScanRate`. The AWS SDK v3 serializer drops unknown
33525
+ * members, so forwarding the CFn spelling silently loses the scan tuning while
33526
+ * the target itself (matched by `Path`) still reaches AWS. Every other
33527
+ * `CrawlerTargets` sub-type (`S3Target` / `JdbcTarget` / `MongoDBTarget` —
33528
+ * whose own `ScanAll` IS PascalCase — `CatalogTarget` / `DeltaTarget` /
33529
+ * `IcebergTarget` / `HudiTarget`) spells every member exactly as CFn does.
33530
+ */
33531
+ const CFN_TO_SDK_DYNAMODB_TARGET_KEYS = {
33532
+ ScanAll: "scanAll",
33533
+ ScanRate: "scanRate"
33534
+ };
33535
+ /**
33536
+ * CFn is stringly typed, so a template (or an unresolved-then-resolved
33537
+ * intrinsic) can carry `ScanRate: "0.9"`. The SDK models it as a double and the
33538
+ * serializer forwards a string verbatim, so the value has to be coerced HERE —
33539
+ * this converter is the wire boundary for `Targets` now that it re-shapes the
33540
+ * blob. Non-numeric input passes through so AWS surfaces the real validation
33541
+ * error rather than cdkd mangling it.
33542
+ */
33543
+ const SDK_DYNAMODB_TARGET_NUMERIC_KEYS = ["scanRate"];
33544
+ /**
33545
+ * Same stringly-typed-CFn reasoning as {@link SDK_DYNAMODB_TARGET_NUMERIC_KEYS},
33546
+ * for the boolean member: a hand-written `ScanAll: "false"` would otherwise
33547
+ * forward the STRING `"false"` — which is truthy — to a boolean member.
33548
+ */
33549
+ const SDK_DYNAMODB_TARGET_BOOLEAN_KEYS = ["scanAll"];
33550
+ /** CFn booleans arrive as `true` / `false` or as the strings `"true"` / `"false"`. */
33551
+ function coerceBoolean(value) {
33552
+ if (typeof value === "string") {
33553
+ if (value === "true") return true;
33554
+ if (value === "false") return false;
33555
+ }
33556
+ return value;
33557
+ }
33558
+ const SDK_TO_CFN_DYNAMODB_TARGET_KEYS = {
33559
+ scanAll: "ScanAll",
33560
+ scanRate: "ScanRate"
33561
+ };
33562
+ /**
33563
+ * Shallow-rename an object's keys per `renames`, leaving unlisted keys — and
33564
+ * non-object values (an unresolved intrinsic) — untouched.
33565
+ */
33566
+ function renameRecordKeys(entry, renames, numericKeys = [], booleanKeys = []) {
33567
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return entry;
33568
+ const out = {};
33569
+ for (const [k, v] of Object.entries(entry)) {
33570
+ const key = renames[k] ?? k;
33571
+ if (numericKeys.includes(key)) out[key] = coerceNumber(v);
33572
+ else if (booleanKeys.includes(key)) out[key] = coerceBoolean(v);
33573
+ else out[key] = v;
33574
+ }
33575
+ return out;
33576
+ }
33577
+ /**
33578
+ * Apply `renames` to every element of `targets[key]` when that entry is an
33579
+ * array, returning the original object untouched otherwise so a non-array value
33580
+ * reaches AWS verbatim and surfaces the real validation error.
33581
+ */
33582
+ function renameCrawlerTargetList(targets, key, renames, numericKeys = [], booleanKeys = []) {
33583
+ const list = targets[key];
33584
+ if (!Array.isArray(list)) return targets;
33585
+ return {
33586
+ ...targets,
33587
+ [key]: list.map((entry) => renameRecordKeys(entry, renames, numericKeys, booleanKeys))
33588
+ };
33589
+ }
33590
+ /**
33591
+ * Convert the CFn `AWS::Glue::Crawler.Targets` blob to the SDK `CrawlerTargets`
33592
+ * shape — see {@link CFN_TO_SDK_DYNAMODB_TARGET_KEYS} for the one divergence.
33593
+ */
33594
+ function toSdkCrawlerTargets(targets) {
33595
+ return renameCrawlerTargetList(targets, "DynamoDBTargets", CFN_TO_SDK_DYNAMODB_TARGET_KEYS, SDK_DYNAMODB_TARGET_NUMERIC_KEYS, SDK_DYNAMODB_TARGET_BOOLEAN_KEYS);
33596
+ }
33597
+ /**
33598
+ * Inverse of {@link toSdkCrawlerTargets}: re-shape a `GetCrawler` `Targets`
33599
+ * blob back into the CFn spelling so `cdkd drift` compares like with like
33600
+ * instead of reporting a phantom `ScanRate` removal + `scanRate` addition.
33601
+ */
33602
+ function toCfnCrawlerTargets(targets) {
33603
+ return renameCrawlerTargetList(targets, "DynamoDBTargets", SDK_TO_CFN_DYNAMODB_TARGET_KEYS);
33604
+ }
33605
+ /**
33491
33606
  * SDK Provider for `AWS::Glue::Connection`.
33492
33607
  *
33493
33608
  * `physicalId` is the connection name. `ConnectionInput.ConnectionProperties`
@@ -64454,7 +64569,7 @@ function createMigrateCommand() {
64454
64569
  */
64455
64570
  function buildProgram() {
64456
64571
  const program = new Command();
64457
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.7");
64572
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.8");
64458
64573
  program.hook("preAction", (_thisCommand, actionCommand) => {
64459
64574
  const { profile } = actionCommand.optsWithGlobals();
64460
64575
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;