@go-to-k/cdkd 0.278.14 → 0.278.16

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-CLNqGpsK.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-D6QqEKHy.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-Abhz9gSY.js";
4
+ import { t as ASGProvider } from "./asg-provider-D-qU5M9e.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";
@@ -12558,7 +12558,13 @@ var DynamoDBGlobalTableProvider = class {
12558
12558
  if (gsiHandledByBillingFlip.has(gsi.IndexName)) continue;
12559
12559
  const billingFlipped = oldBilling !== newBilling;
12560
12560
  const update = { IndexName: gsi.IndexName };
12561
- if (gsi.OnDemandThroughput) update.OnDemandThroughput = gsi.OnDemandThroughput;
12561
+ const previousOnDemand = previousSdkByName.get(gsi.IndexName)?.OnDemandThroughput;
12562
+ const onDemand = { ...gsi.OnDemandThroughput };
12563
+ if (!billingFlipped && previousOnDemand) {
12564
+ if (previousOnDemand.MaxReadRequestUnits !== void 0 && onDemand.MaxReadRequestUnits === void 0) onDemand.MaxReadRequestUnits = ON_DEMAND_LIMIT_RESET;
12565
+ if (previousOnDemand.MaxWriteRequestUnits !== void 0 && onDemand.MaxWriteRequestUnits === void 0) onDemand.MaxWriteRequestUnits = ON_DEMAND_LIMIT_RESET;
12566
+ }
12567
+ if (Object.keys(onDemand).length > 0) update.OnDemandThroughput = onDemand;
12562
12568
  if (!billingFlipped && gsi.ProvisionedThroughput) update.ProvisionedThroughput = gsi.ProvisionedThroughput;
12563
12569
  const previousSdk = previousSdkByName.get(gsi.IndexName);
12564
12570
  if (gsi.WarmThroughput !== void 0 && !deepEqual$1(gsi.WarmThroughput, previousSdk?.WarmThroughput)) update.WarmThroughput = gsi.WarmThroughput;
@@ -13377,6 +13383,15 @@ const DEFAULT_CAPACITY_UNITS = 5;
13377
13383
  function asRecord(value) {
13378
13384
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
13379
13385
  }
13386
+ /**
13387
+ * The sentinel DynamoDB accepts to CLEAR a per-GSI on-demand request-unit
13388
+ * ceiling (issue #1423). Live-verified against real AWS: `UpdateTable` with
13389
+ * `GlobalSecondaryIndexUpdates[].Update.OnDemandThroughput = {-1, -1}` is
13390
+ * accepted, and the member reads back ABSENT from `DescribeTable` afterwards —
13391
+ * so it is genuinely reset to unlimited rather than stored as -1. Any drift /
13392
+ * read-back comparison must therefore expect ABSENCE, not this value.
13393
+ */
13394
+ const ON_DEMAND_LIMIT_RESET = -1;
13380
13395
  /** Coerce a CFn numeric (CFn is stringly-typed) to a finite number. */
13381
13396
  function toFiniteNumber(value) {
13382
13397
  if (value === void 0 || value === null || value === "") return void 0;
@@ -13633,10 +13648,36 @@ var LogsLogGroupProvider = class {
13633
13648
  "DataProtectionPolicy",
13634
13649
  "LogGroupClass",
13635
13650
  "FieldIndexPolicies",
13636
- "ResourcePolicyDocument",
13637
13651
  "DeletionProtectionEnabled",
13638
13652
  "BearerTokenAuthenticationEnabled"
13639
13653
  ])]]);
13654
+ /**
13655
+ * Issue #1412. `ResourcePolicyDocument` used to sit in
13656
+ * {@link handledProperties} purely to keep the log group off the Cloud
13657
+ * Control fallback path — but nothing ever wired it, so a template setting
13658
+ * it deployed "successfully" with the policy silently discarded (the
13659
+ * #1392 silent-drop class the `handled-property-wiring` critic exists to
13660
+ * catch).
13661
+ *
13662
+ * It cannot be honestly wired from here. The value maps to the SEPARATE
13663
+ * `AWS::Logs::ResourcePolicy` resource type, whose CloudWatch Logs API
13664
+ * counterpart (`PutResourcePolicy` / `DeleteResourcePolicy`) is
13665
+ * **account-wide**, not per-log-group: the policy is keyed by a policy NAME
13666
+ * in the account, not by the log group. Owning it from the log group's
13667
+ * lifecycle would mean inventing an ownership/lifecycle answer cdkd has no
13668
+ * basis for — which policy name to claim, what to do on delete when the
13669
+ * account-wide policy may be shared, and how to resolve two log groups
13670
+ * declaring conflicting documents. Managing the sibling
13671
+ * `AWS::Logs::ResourcePolicy` resource is a separate feature (option 1 in
13672
+ * issue #1412), deliberately not attempted here.
13673
+ *
13674
+ * Declaring the drop instead makes the omission visible: the #614 routing
13675
+ * pass sends any log group whose template sets `ResourcePolicyDocument`
13676
+ * through the Cloud Control fallback, where AWS's own resource handler
13677
+ * applies the policy. This provider does NOT set `disableCcApiFallback`,
13678
+ * so that route is always available and no template is hard-rejected.
13679
+ */
13680
+ unhandledByDesign = /* @__PURE__ */ new Map([["AWS::Logs::LogGroup", /* @__PURE__ */ new Map([["ResourcePolicyDocument", "covered by the separate account-wide AWS::Logs::ResourcePolicy resource type; logs:PutResourcePolicy is account-scoped, not per-log-group, so it has no CreateLogGroup / PutRetentionPolicy counterpart — routed via Cloud Control instead"]])]]);
13640
13681
  constructor() {
13641
13682
  const awsClients = getAwsClients();
13642
13683
  this.logsClient = awsClients.cloudWatchLogs;
@@ -13909,9 +13950,11 @@ var LogsLogGroupProvider = class {
13909
13950
  * `deletionProtectionEnabled` / `bearerTokenAuthenticationEnabled`),
13910
13951
  * and `FieldIndexPolicies` (via `DescribeIndexPolicies`, filtered to
13911
13952
  * log-group-level policies and JSON-parsed). Still out of scope:
13912
- * `ResourcePolicyDocument` (managed by the separate
13913
- * `AWS::Logs::ResourcePolicy` resource type — account-wide, not
13914
- * per-log-group).
13953
+ * `ResourcePolicyDocument`, which is declared in
13954
+ * {@link unhandledByDesign} (issue #1412) — it is managed by the separate
13955
+ * account-wide `AWS::Logs::ResourcePolicy` resource type, so a log group
13956
+ * whose template sets it routes via Cloud Control rather than through this
13957
+ * provider at all.
13915
13958
  *
13916
13959
  * Write-side coverage: `FieldIndexPolicies` is applied via
13917
13960
  * `PutIndexPolicy` (CloudWatch Logs allows at most one log-group-level
@@ -15894,7 +15937,6 @@ var EC2Provider = class {
15894
15937
  "SecondaryAllocationIds",
15895
15938
  "SecondaryPrivateIpAddresses",
15896
15939
  "SecondaryPrivateIpAddressCount",
15897
- "MaxDrainDurationSeconds",
15898
15940
  "Tags"
15899
15941
  ])],
15900
15942
  ["AWS::EC2::RouteTable", /* @__PURE__ */ new Set(["VpcId", "Tags"])],
@@ -15966,7 +16008,7 @@ var EC2Provider = class {
15966
16008
  unhandledByDesign = /* @__PURE__ */ new Map([
15967
16009
  ["AWS::EC2::Instance", /* @__PURE__ */ new Map([["ElasticGpuSpecifications", "AWS Elastic GPU end-of-life (announced 2023-11); no replacement API"], ["ElasticInferenceAccelerators", "AWS Elastic Inference end-of-life 2024-04; use AWS Inferentia / Trainium accelerator instance families instead"]])],
15968
16010
  ["AWS::EC2::SecurityGroupIngress", /* @__PURE__ */ new Map([["GroupName", "EC2-Classic-only — use GroupId for VPC security groups (EC2-Classic retired 2022-08-15)"], ["SourceSecurityGroupName", "EC2-Classic-only — use SourceSecurityGroupId for VPC peer security groups (EC2-Classic retired 2022-08-15)"]])],
15969
- ["AWS::EC2::NatGateway", /* @__PURE__ */ new Map([["VpcId", "AWS derives the VPC from SubnetId; the ec2:CreateNatGateway API has no VpcId parameter"]])],
16011
+ ["AWS::EC2::NatGateway", /* @__PURE__ */ new Map([["VpcId", "AWS derives the VPC from SubnetId; the ec2:CreateNatGateway API has no VpcId parameter"], ["MaxDrainDurationSeconds", "write-only address-drain timeout with no CreateNatGateway member and no NAT gateway modify API; only ec2:DisassociateNatGatewayAddress / UnassignPrivateNatGatewayAddress accept it, and cdkd rejects NatGateway updates outright — routed via Cloud Control instead"]])],
15970
16012
  ["AWS::EC2::EIP", /* @__PURE__ */ new Map([
15971
16013
  ["Address", "Bring-your-own-IP: allocating a specific address you own is not yet supported; cdkd allocates an Amazon-owned address"],
15972
16014
  ["IpamPoolId", "Allocation from an IPAM pool is not yet supported"],
@@ -64968,7 +65010,7 @@ function createMigrateCommand() {
64968
65010
  */
64969
65011
  function buildProgram() {
64970
65012
  const program = new Command();
64971
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.14");
65013
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.16");
64972
65014
  program.hook("preAction", (_thisCommand, actionCommand) => {
64973
65015
  const { profile } = actionCommand.optsWithGlobals();
64974
65016
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;