@go-to-k/cdkd 0.278.20 → 0.278.21

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 isThrottlingError, $t as setAwsClients, A as red, At as getLegacyStateBucketName, B as isTerminationProtectionPropagationError, Bt as CFN_TEMPLATE_BODY_LIMIT, C as isStatefulRecreateTargetSync, Ct as runDockerForeground, D as cyan, Dt as Synthesizer, E as bold, Et as getDockerImageBySourceHash, F as ProviderRegistry, Ft as resolveStateBucketWithDefault, G as normalizeAwsTagsToCfn, Gt as expectedOwnerParam, H as cfnRefValueFromPhysicalId, Ht as MIGRATE_TMP_PREFIX, I as findActionableSilentDrops, It as resolveStateBucketWithDefaultAndSource, J as applyRoleArnIfSet, K as resolveExplicitPhysicalId, Kt as AssemblyReader, L as CloudControlProvider, Lt as resolveUseCdkBootstrapAssets, M as IAMRoleProvider, Mt as resolveAutoAssetStorage, N as collectInlinePolicyNamesManagedBySiblings, Nt as resolveCaptureObservedState, O as gray, Ot as synthesisStatusMessage, P as clearOnUpdateRemoval, Pt as resolveSkipPrefix, Q as isRetryableTransientError, Qt as resetAwsClients, R as slowCcOperationTimeoutMs, Rt as stateBucketExistenceConfirmed, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, Sn as withErrorHandling, St as getDockerCmd, T as formatResourceLine, Tt as AssetManifestLoader, U as refStateLookupFromResource, Ut as findLargeInlineResources, V as IntrinsicFunctionResolver, Vt as CFN_TEMPLATE_URL_LIMIT, W as WAFv2WebACLProvider, Wt as uploadCfnTemplate, X as describeTypeWithThrottleRetry, Xt as AwsClients, Y as DiffCalculator, Yt as resolveBucketRegion, Z as withRetry, Zt as getAwsClients, _ as createPreDeleteFinalSnapshot, _t as parseBootstrapMarker, a as DeploymentEventsStore, an as LocalInvokeBuildError$1, at as shouldRetainResource, b as unsupportedFinalSnapshotError, bt as buildDockerImage, c as replayFailedOperations, ct as WorkGraph, d as IMPLICIT_DELETE_DEPENDENCIES, dn as PartialFailureError, dt as loadPublishableAssetManifest, et as DagBuilder, f as computeImplicitDeleteEdges, fn as ProvisioningError, ft as rewriteTemplateAssetReferences, g as ccRoutedFinalSnapshotError, gn as StackTerminationProtectionError, gt as getBootstrapMarkerKey, h as buildFinalSnapshotIdentifier, hn as StackHasActiveImportsError, ht as ensureAssetStorage, i as DeploymentEventsReader, in as DeployCancelledError, it as rebuildClientForBucketRegion, j as yellow, jt as resolveApp, k as green, kt as getDefaultStateBucketName, l as replayRollback, ln as MissingCdkCliError, lt as buildAssetRedirectMap, m as PRE_DELETE_SNAPSHOT_TYPES, mn as ResourceUpdateNotSupportedError, mt as BOOTSTRAP_MARKER_PREFIX, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as LockManager, o as planFailedOps, on as LocalMigrateError, ot as AssetPublisher, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as ResourceTimeoutError, pt as AssetModeResolver, q as assertRegionMatch, qt as processStackMessages, r as DeployEngine, rt as S3StateBackend, s as planRollback, sn as LocalStartServiceError, st as stringifyValue, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as CdkdError, tt as TemplateParser, u as withResourceDeadline, un as NestedStackChildDirectDestroyError, ut as createAssetRedirectResolver, v as isFinalSnapshotError, vt as validateAssetBucketName, w as renderStatefulReason, wt as runDockerStreaming, x as extractDeploymentEventError, xn as normalizeAwsError, xt as formatDockerLoginError, y as refusesFinalSnapshot, yt as validateContainerRepoName, z as disableInstanceApiTermination, zt as warnDeprecatedNoPrefixCliFlag } from "./deploy-engine-Bv3IEbrU.js";
2
+ import { $ as isThrottlingError, $t as setAwsClients, A as red, At as getLegacyStateBucketName, B as isTerminationProtectionPropagationError, Bt as CFN_TEMPLATE_BODY_LIMIT, C as isStatefulRecreateTargetSync, Ct as runDockerForeground, D as cyan, Dt as Synthesizer, E as bold, Et as getDockerImageBySourceHash, F as ProviderRegistry, Ft as resolveStateBucketWithDefault, G as normalizeAwsTagsToCfn, Gt as expectedOwnerParam, H as cfnRefValueFromPhysicalId, Ht as MIGRATE_TMP_PREFIX, I as findActionableSilentDrops, It as resolveStateBucketWithDefaultAndSource, J as applyRoleArnIfSet, K as resolveExplicitPhysicalId, Kt as AssemblyReader, L as CloudControlProvider, Lt as resolveUseCdkBootstrapAssets, M as IAMRoleProvider, Mt as resolveAutoAssetStorage, N as collectInlinePolicyNamesManagedBySiblings, Nt as resolveCaptureObservedState, O as gray, Ot as synthesisStatusMessage, P as clearOnUpdateRemoval, Pt as resolveSkipPrefix, Q as isRetryableTransientError, Qt as resetAwsClients, R as slowCcOperationTimeoutMs, Rt as stateBucketExistenceConfirmed, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, Sn as withErrorHandling, St as getDockerCmd, T as formatResourceLine, Tt as AssetManifestLoader, U as refStateLookupFromResource, Ut as findLargeInlineResources, V as IntrinsicFunctionResolver, Vt as CFN_TEMPLATE_URL_LIMIT, W as WAFv2WebACLProvider, Wt as uploadCfnTemplate, X as describeTypeWithThrottleRetry, Xt as AwsClients, Y as DiffCalculator, Yt as resolveBucketRegion, Z as withRetry, Zt as getAwsClients, _ as createPreDeleteFinalSnapshot, _t as parseBootstrapMarker, a as DeploymentEventsStore, an as LocalInvokeBuildError$1, at as shouldRetainResource, b as unsupportedFinalSnapshotError, bt as buildDockerImage, c as replayFailedOperations, ct as WorkGraph, d as IMPLICIT_DELETE_DEPENDENCIES, dn as PartialFailureError, dt as loadPublishableAssetManifest, et as DagBuilder, f as computeImplicitDeleteEdges, fn as ProvisioningError, ft as rewriteTemplateAssetReferences, g as ccRoutedFinalSnapshotError, gn as StackTerminationProtectionError, gt as getBootstrapMarkerKey, h as buildFinalSnapshotIdentifier, hn as StackHasActiveImportsError, ht as ensureAssetStorage, i as DeploymentEventsReader, in as DeployCancelledError, it as rebuildClientForBucketRegion, j as yellow, jt as resolveApp, k as green, kt as getDefaultStateBucketName, l as replayRollback, ln as MissingCdkCliError, lt as buildAssetRedirectMap, m as PRE_DELETE_SNAPSHOT_TYPES, mn as ResourceUpdateNotSupportedError, mt as BOOTSTRAP_MARKER_PREFIX, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as LockManager, o as planFailedOps, on as LocalMigrateError, ot as AssetPublisher, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as ResourceTimeoutError, pt as AssetModeResolver, q as assertRegionMatch, qt as processStackMessages, r as DeployEngine, rt as S3StateBackend, s as planRollback, sn as LocalStartServiceError, st as stringifyValue, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as CdkdError, tt as TemplateParser, u as withResourceDeadline, un as NestedStackChildDirectDestroyError, ut as createAssetRedirectResolver, v as isFinalSnapshotError, vt as validateAssetBucketName, w as renderStatefulReason, wt as runDockerStreaming, x as extractDeploymentEventError, xn as normalizeAwsError, xt as formatDockerLoginError, y as refusesFinalSnapshot, yt as validateContainerRepoName, z as disableInstanceApiTermination, zt as warnDeprecatedNoPrefixCliFlag } from "./deploy-engine-dvS1K_ET.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-OB2CvUwn.js";
4
+ import { t as ASGProvider } from "./asg-provider-BN1QMZlz.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";
@@ -33019,13 +33019,14 @@ var GlueProvider = class {
33019
33019
  const tableName = tableInput["Name"] ?? properties["Name"];
33020
33020
  if (!tableName) throw new ProvisioningError(`TableInput.Name or top-level Name is required for Glue Table ${logicalId}`, resourceType, logicalId);
33021
33021
  const catalogId = properties["CatalogId"];
33022
+ assertIcebergTableInputAbsent(logicalId, resourceType, properties);
33022
33023
  const openTableFormatInput = properties["OpenTableFormatInput"];
33023
33024
  try {
33024
33025
  await this.getClient().send(new CreateTableCommand$1({
33025
33026
  CatalogId: catalogId,
33026
33027
  DatabaseName: databaseName,
33027
33028
  TableInput: this.buildTableInput(tableInput, tableName),
33028
- ...openTableFormatInput !== void 0 && { OpenTableFormatInput: toSdkOpenTableFormatInput(openTableFormatInput) }
33029
+ ...openTableFormatInput !== void 0 && { OpenTableFormatInput: openTableFormatInput }
33029
33030
  }));
33030
33031
  const physicalId = `${databaseName}|${tableName}`;
33031
33032
  this.logger.debug(`Successfully created Glue Table ${logicalId}: ${physicalId}`);
@@ -33045,6 +33046,8 @@ var GlueProvider = class {
33045
33046
  const tableInput = properties["TableInput"];
33046
33047
  if (!tableInput) throw new ProvisioningError(`TableInput is required for Glue Table update ${logicalId}`, resourceType, logicalId, physicalId);
33047
33048
  const catalogId = properties["CatalogId"];
33049
+ const updateIcebergKey = findIcebergTableInputKey(properties);
33050
+ if (updateIcebergKey !== void 0) this.logger.warn(icebergTableInputRefusalMessage(logicalId, updateIcebergKey, "update"));
33048
33051
  try {
33049
33052
  await this.getClient().send(new UpdateTableCommand$1({
33050
33053
  CatalogId: catalogId,
@@ -33600,32 +33603,100 @@ function sleep$1(ms) {
33600
33603
  return new Promise((resolve) => setTimeout(resolve, ms));
33601
33604
  }
33602
33605
  /**
33603
- * Convert the CFn `AWS::Glue::Table.OpenTableFormatInput` blob to the SDK
33604
- * `OpenTableFormatInput` shape.
33605
- *
33606
- * Every key matches the SDK model except one: CFn's
33607
- * `IcebergInput.IcebergTableInput` is the SDK's
33608
- * `IcebergInput.CreateIcebergTableInput` (@aws-sdk/client-glue `models_1.d.ts`
33609
- * `IcebergInput`). The AWS SDK v3 serializer drops unknown members, so leaving
33610
- * the CFn spelling in place silently discarded the ENTIRE Iceberg table spec
33611
- * (`Location` / `Schema` / `PartitionSpec` / `WriteOrder` / `Properties`) while
33612
- * `CreateTable` still reported success. The renamed object's own members match
33613
- * CFn 1:1, so this is a single key rename.
33614
- *
33615
- * Non-object inputs (an unresolved intrinsic) pass through untouched so AWS
33616
- * surfaces the real validation error.
33617
- */
33618
- function toSdkOpenTableFormatInput(input) {
33619
- const iceberg = input["IcebergInput"];
33620
- if (typeof iceberg !== "object" || iceberg === null || Array.isArray(iceberg) || !("IcebergTableInput" in iceberg)) return input;
33621
- const { IcebergTableInput: icebergTableInput, ...rest } = iceberg;
33622
- return {
33623
- ...input,
33624
- IcebergInput: {
33625
- ...rest,
33626
- CreateIcebergTableInput: icebergTableInput
33627
- }
33628
- };
33606
+ * Both spellings of the Iceberg table spec cdkd refuses inside
33607
+ * `OpenTableFormatInput.IcebergInput`: the CFn registry schema's
33608
+ * `IcebergTableInput` and `@aws-sdk/client-glue`'s `CreateIcebergTableInput`.
33609
+ * A hand-written template can carry either, and neither is deployable, so the
33610
+ * pre-flight matches both and names whichever it found.
33611
+ */
33612
+ const ICEBERG_TABLE_INPUT_KEYS = ["IcebergTableInput", "CreateIcebergTableInput"];
33613
+ /**
33614
+ * Return whichever {@link ICEBERG_TABLE_INPUT_KEYS} spelling the template
33615
+ * carries under `OpenTableFormatInput.IcebergInput`, or `undefined`.
33616
+ *
33617
+ * Non-object shapes at either level (an unresolved intrinsic) are treated as
33618
+ * "absent" so AWS surfaces the real validation error rather than this refusal.
33619
+ */
33620
+ function findIcebergTableInputKey(properties) {
33621
+ const openTableFormatInput = properties["OpenTableFormatInput"];
33622
+ if (typeof openTableFormatInput !== "object" || openTableFormatInput === null || Array.isArray(openTableFormatInput)) return;
33623
+ const iceberg = openTableFormatInput["IcebergInput"];
33624
+ if (typeof iceberg !== "object" || iceberg === null || Array.isArray(iceberg)) return;
33625
+ return ICEBERG_TABLE_INPUT_KEYS.find((key) => key in iceberg);
33626
+ }
33627
+ /**
33628
+ * PRE-FLIGHT REFUSAL of `AWS::Glue::Table`
33629
+ * `OpenTableFormatInput.IcebergInput.IcebergTableInput` (issue #1454).
33630
+ *
33631
+ * **This is a deliberate PARITY DIVERGENCE, and it was a conscious choice.**
33632
+ * cdkd's compatibility target is CloudFormation, and CloudFormation does not
33633
+ * validate this property — it forwards it and lets the deploy roll back. cdkd
33634
+ * refuses it EARLIER and with a better message instead. The justification is
33635
+ * that no user is losing a working deployment: the live probe on issue #1408
33636
+ * (2026-08-09, us-east-1 — 5 raw `glue:CreateTable` shapes plus 5
33637
+ * `AWS::Glue::Table` CloudFormation stacks) proved the property is undeployable
33638
+ * on BOTH paths.
33639
+ *
33640
+ * - **The raw `glue:CreateTable` API — the call cdkd itself makes** — rejects
33641
+ * every `CreateIcebergTableInput` shape: without a
33642
+ * `TableInput.StorageDescriptor` it fails `Location information cannot be
33643
+ * null while creating an iceberg table`, and with one it fails `Table
33644
+ * metadata information present at multiple parts of input request`. The
33645
+ * spec's own `Location` is never read. So this is NOT merely cdkd declining
33646
+ * what CloudFormation declines — cdkd's own path cannot deploy it either.
33647
+ * - **CloudFormation** rolls back all three variants with `Table metadata is
33648
+ * expected only via TableInput or via IcebergTableInputProperties inside
33649
+ * OpenTableFormatInput` — naming a property that exists in NEITHER the CFn
33650
+ * registry schema (`IcebergInput.IcebergTableInput`) NOR
33651
+ * `@aws-sdk/client-glue` (`IcebergInput.CreateIcebergTableInput`). That
33652
+ * three-way contract mismatch is an AWS-side bug.
33653
+ *
33654
+ * Because there is no shape in which the property works, forwarding it can only
33655
+ * produce a late, cryptic AWS error. Failing fast with the working shape spelled
33656
+ * out is strictly more useful.
33657
+ *
33658
+ * **CREATE only — update WARNS instead.** See the comment at the `updateTable`
33659
+ * call site: rollback replays from cdkd STATE, and a table created by a
33660
+ * pre-#1390 build carries the key in its state record, so refusing on update
33661
+ * would make such a table unrollbackable with no template-side remedy. cdkd
33662
+ * does not wire Glue's update-only `UpdateOpenTableFormatInput` shape and
33663
+ * `buildTableInput` is an explicit allow-list, so warning there forwards
33664
+ * nothing and loses no protection. One rollback arm is still exposed — the
33665
+ * reverse-replacement re-create replays a state record through `create()`;
33666
+ * see issue #1463 and the note at the `updateTable` call site.
33667
+ *
33668
+ * **Known bypass: the sticky Cloud Control route.** This is a GlueProvider
33669
+ * pre-flight, so it only runs on the SDK route. When a table's state record
33670
+ * carries `provisionedBy: 'cc-api'`, `ProviderRegistry.getProviderFor` sticky-
33671
+ * routes it to `CloudControlProvider`, which forwards the property to
33672
+ * CloudFormation and gets AWS's rollback instead of this message. That route is
33673
+ * opt-in only (`--recreate-via-cc-api`, or a legacy state record) —
33674
+ * `AWS::Glue::Table` has an empty `silentDrop` map, so no ordinary deploy takes
33675
+ * it. The outcome there is still a failure, just a later and less helpful one,
33676
+ * which is why this is documented rather than duplicated into the CC provider.
33677
+ *
33678
+ * **WARNING before relaxing this refusal.** cdkd used to RENAME the CFn
33679
+ * `IcebergTableInput` to the SDK's `CreateIcebergTableInput` (issue #1390); that
33680
+ * rename existed because the AWS SDK v3 serializer DROPS unknown members, so the
33681
+ * CFn spelling silently discarded the entire Iceberg spec while `CreateTable`
33682
+ * reported success. The rename was removed here as unreachable once this
33683
+ * refusal landed. If AWS ever ships a deployable shape and this check is
33684
+ * relaxed, the rename MUST be restored in the same change — otherwise the
33685
+ * silent-drop bug of #1390 comes straight back.
33686
+ */
33687
+ function assertIcebergTableInputAbsent(logicalId, resourceType, properties, physicalId) {
33688
+ const key = findIcebergTableInputKey(properties);
33689
+ if (key === void 0) return;
33690
+ throw new ProvisioningError(icebergTableInputRefusalMessage(logicalId, key, "create"), resourceType, logicalId, physicalId);
33691
+ }
33692
+ /**
33693
+ * The shared #1454 message body, so the CREATE refusal and the UPDATE warning
33694
+ * cannot drift apart. `mode` only changes the lead clause — everything after it
33695
+ * (the probe evidence and the working shape) is identical, because the user's
33696
+ * next action is the same either way.
33697
+ */
33698
+ function icebergTableInputRefusalMessage(logicalId, key, mode) {
33699
+ return `AWS::Glue::Table ${logicalId}: OpenTableFormatInput.IcebergInput.${key} ${mode === "create" ? `cannot be deployed by AWS in any shape, so cdkd refuses it before calling Glue (issue #1454).` : "cannot be deployed by AWS in any shape and is IGNORED on update — cdkd does not wire Glue's update-only UpdateOpenTableFormatInput shape, so it forwards nothing here and only warns (issue #1454). A CREATE of this table would be refused outright."}\n Live-probed 2026-08-09 in us-east-1 (issue #1408): glue:CreateTable — the API cdkd calls — rejects every Iceberg table spec ("Location information cannot be null while creating an iceberg table" without a TableInput.StorageDescriptor, "Table metadata information present at multiple parts of input request" with one), and CloudFormation rolls the same template back with "Table metadata is expected only via TableInput or via IcebergTableInputProperties inside OpenTableFormatInput" — a property name that exists in neither the CFn registry schema (IcebergInput.IcebergTableInput) nor @aws-sdk/client-glue (IcebergInput.CreateIcebergTableInput).\n Working shape — put the table metadata in TableInput and leave IcebergInput carrying only the create-time directive:\n TableInput: { Name, TableType: 'EXTERNAL_TABLE', StorageDescriptor: { Location: 's3://your-bucket/prefix/', Columns: [...] } }\n OpenTableFormatInput: { IcebergInput: { MetadataOperation: 'CREATE' } } // Version: '2' is also accepted\n Glue then writes the Iceberg metadata itself — the created table comes back with Parameters.table_type = ICEBERG and a populated Parameters.metadata_location.`;
33629
33700
  }
33630
33701
  /**
33631
33702
  * Build the SDK `EncryptionConfiguration` from the CFn-shape input
@@ -65415,7 +65486,7 @@ function createMigrateCommand() {
65415
65486
  */
65416
65487
  function buildProgram() {
65417
65488
  const program = new Command();
65418
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.20");
65489
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.21");
65419
65490
  program.hook("preAction", (_thisCommand, actionCommand) => {
65420
65491
  const { profile } = actionCommand.optsWithGlobals();
65421
65492
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;