@go-to-k/cdkd 0.252.1 → 0.252.3

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 BOOTSTRAP_MARKER_PREFIX, A as refStateLookupFromResource, At as AssemblyReader, B as TemplateParser, C as ProviderRegistry, Ct as warnDeprecatedNoPrefixCliFlag, D as isTerminationProtectionPropagationError, Dt as findLargeInlineResources, E as disableInstanceApiTermination, Et as MIGRATE_TMP_PREFIX, F as resolveExplicitPhysicalId, Ft as resetAwsClients, G as AssetPublisher, Gt as MissingCdkCliError, H as S3StateBackend, Ht as LocalMigrateError, I as assertRegionMatch, It as setAwsClients, J as buildAssetRedirectMap, Jt as ProvisioningError, K as stringifyValue, Kt as NestedStackChildDirectDestroyError, L as applyRoleArnIfSet, M as CDK_PATH_TAG, Mt as resolveBucketRegion, N as matchesCdkPath, Nt as AwsClients, O as IntrinsicFunctionResolver, Ot as uploadCfnTemplate, P as normalizeAwsTagsToCfn, Pt as getAwsClients, Q as AssetModeResolver, Qt as StackTerminationProtectionError, R as DiffCalculator, Rt as CdkdError, S as collectInlinePolicyNamesManagedBySiblings, St as resolveUseCdkBootstrapAssets, T as CloudControlProvider, Tt as CFN_TEMPLATE_URL_LIMIT, U as rebuildClientForBucketRegion, Ut as LocalStartServiceError, V as LockManager, Vt as LocalInvokeBuildError$1, W as shouldRetainResource, X as loadPublishableAssetManifest, Xt as ResourceUpdateNotSupportedError, Y as createAssetRedirectResolver, Yt as ResourceTimeoutError, Z as rewriteTemplateAssetReferences, Zt as StackHasActiveImportsError, _ as gray, _t as resolveAutoAssetStorage, a as withRetry, at as buildDockerImage, b as yellow, bt as resolveStateBucketWithDefault, c as IMPLICIT_DELETE_DEPENDENCIES, ct as runDockerForeground, d as MULTI_REGION_RECREATE_BLOCKED_TYPES, dt as getDockerImageBySourceHash, et as ensureAssetStorage, f as isStatefulRecreateTargetSync, ft as Synthesizer, g as cyan, gt as resolveApp, h as bold, ht as getLegacyStateBucketName, i as withResourceDeadline, in as withErrorHandling, it as validateContainerRepoName, j as WAFv2WebACLProvider, k as cfnRefValueFromPhysicalId, kt as expectedOwnerParam, l as computeImplicitDeleteEdges, lt as runDockerStreaming, m as formatResourceLine, mt as getDefaultStateBucketName, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as parseBootstrapMarker, o as isRetryableTransientError, ot as formatDockerLoginError, p as renderStatefulReason, pt as synthesisStatusMessage, q as WorkGraph, qt as PartialFailureError, r as DeployEngine, rn as normalizeAwsError, rt as validateAssetBucketName, s as isThrottlingError, st as getDockerCmd, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as getBootstrapMarkerKey, u as extractDeploymentEventError, ut as AssetManifestLoader, v as green, vt as resolveCaptureObservedState, w as findActionableSilentDrops, wt as CFN_TEMPLATE_BODY_LIMIT, x as IAMRoleProvider, xt as resolveStateBucketWithDefaultAndSource, y as red, yt as resolveSkipPrefix, z as DagBuilder } from "./deploy-engine-IkhnJXWR.js";
2
+ import { $ as BOOTSTRAP_MARKER_PREFIX, A as refStateLookupFromResource, At as AssemblyReader, B as TemplateParser, C as ProviderRegistry, Ct as warnDeprecatedNoPrefixCliFlag, D as isTerminationProtectionPropagationError, Dt as findLargeInlineResources, E as disableInstanceApiTermination, Et as MIGRATE_TMP_PREFIX, F as resolveExplicitPhysicalId, Ft as resetAwsClients, G as AssetPublisher, Gt as MissingCdkCliError, H as S3StateBackend, Ht as LocalMigrateError, I as assertRegionMatch, It as setAwsClients, J as buildAssetRedirectMap, Jt as ProvisioningError, K as stringifyValue, Kt as NestedStackChildDirectDestroyError, L as applyRoleArnIfSet, M as CDK_PATH_TAG, Mt as resolveBucketRegion, N as matchesCdkPath, Nt as AwsClients, O as IntrinsicFunctionResolver, Ot as uploadCfnTemplate, P as normalizeAwsTagsToCfn, Pt as getAwsClients, Q as AssetModeResolver, Qt as StackTerminationProtectionError, R as DiffCalculator, Rt as CdkdError, S as collectInlinePolicyNamesManagedBySiblings, St as resolveUseCdkBootstrapAssets, T as CloudControlProvider, Tt as CFN_TEMPLATE_URL_LIMIT, U as rebuildClientForBucketRegion, Ut as LocalStartServiceError, V as LockManager, Vt as LocalInvokeBuildError$1, W as shouldRetainResource, X as loadPublishableAssetManifest, Xt as ResourceUpdateNotSupportedError, Y as createAssetRedirectResolver, Yt as ResourceTimeoutError, Z as rewriteTemplateAssetReferences, Zt as StackHasActiveImportsError, _ as gray, _t as resolveAutoAssetStorage, a as withRetry, at as buildDockerImage, b as yellow, bt as resolveStateBucketWithDefault, c as IMPLICIT_DELETE_DEPENDENCIES, ct as runDockerForeground, d as MULTI_REGION_RECREATE_BLOCKED_TYPES, dt as getDockerImageBySourceHash, et as ensureAssetStorage, f as isStatefulRecreateTargetSync, ft as Synthesizer, g as cyan, gt as resolveApp, h as bold, ht as getLegacyStateBucketName, i as withResourceDeadline, in as withErrorHandling, it as validateContainerRepoName, j as WAFv2WebACLProvider, k as cfnRefValueFromPhysicalId, kt as expectedOwnerParam, l as computeImplicitDeleteEdges, lt as runDockerStreaming, m as formatResourceLine, mt as getDefaultStateBucketName, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as parseBootstrapMarker, o as isRetryableTransientError, ot as formatDockerLoginError, p as renderStatefulReason, pt as synthesisStatusMessage, q as WorkGraph, qt as PartialFailureError, r as DeployEngine, rn as normalizeAwsError, rt as validateAssetBucketName, s as isThrottlingError, st as getDockerCmd, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as getBootstrapMarkerKey, u as extractDeploymentEventError, ut as AssetManifestLoader, v as green, vt as resolveCaptureObservedState, w as findActionableSilentDrops, wt as CFN_TEMPLATE_BODY_LIMIT, x as IAMRoleProvider, xt as resolveStateBucketWithDefaultAndSource, y as red, yt as resolveSkipPrefix, z as DagBuilder } from "./deploy-engine-BHpSZlZr.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-BzBdoSYp.js";
4
+ import { t as ASGProvider } from "./asg-provider-D4zKdIrY.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, ListBucketsCommand, ListDirectoryBucketsCommand, 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";
@@ -1888,7 +1888,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1888
1888
  const FLUSH_EVENT_THRESHOLD = 50;
1889
1889
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1890
1890
  function getCdkdVersion() {
1891
- return "0.252.1";
1891
+ return "0.252.3";
1892
1892
  }
1893
1893
  /**
1894
1894
  * Generate a time-sortable unique run id, e.g.
@@ -24565,19 +24565,15 @@ var RDSDBProxyProvider = class {
24565
24565
  return {
24566
24566
  physicalId,
24567
24567
  attributes: {
24568
- DBProxyArn: proxy?.DBProxyArn ?? "",
24569
- Endpoint: proxy?.Endpoint ?? "",
24570
- VpcId: proxy?.VpcId ?? ""
24568
+ ...proxy?.DBProxyArn && { DBProxyArn: proxy.DBProxyArn },
24569
+ ...proxy?.Endpoint && { Endpoint: proxy.Endpoint },
24570
+ ...proxy?.VpcId && { VpcId: proxy.VpcId }
24571
24571
  }
24572
24572
  };
24573
24573
  } catch {
24574
24574
  return {
24575
24575
  physicalId,
24576
- attributes: {
24577
- DBProxyArn: "",
24578
- Endpoint: "",
24579
- VpcId: ""
24580
- }
24576
+ attributes: {}
24581
24577
  };
24582
24578
  }
24583
24579
  }
@@ -24892,21 +24888,16 @@ var RDSDBProxyEndpointProvider = class {
24892
24888
  return {
24893
24889
  physicalId,
24894
24890
  attributes: {
24895
- Endpoint: ep?.Endpoint ?? "",
24896
- DBProxyEndpointArn: ep?.DBProxyEndpointArn ?? "",
24897
- IsDefault: ep?.IsDefault ?? false,
24898
- VpcId: ep?.VpcId ?? ""
24891
+ ...ep?.Endpoint && { Endpoint: ep.Endpoint },
24892
+ ...ep?.DBProxyEndpointArn && { DBProxyEndpointArn: ep.DBProxyEndpointArn },
24893
+ ...ep && { IsDefault: ep.IsDefault ?? false },
24894
+ ...ep?.VpcId && { VpcId: ep.VpcId }
24899
24895
  }
24900
24896
  };
24901
24897
  } catch {
24902
24898
  return {
24903
24899
  physicalId,
24904
- attributes: {
24905
- Endpoint: "",
24906
- DBProxyEndpointArn: "",
24907
- IsDefault: false,
24908
- VpcId: ""
24909
- }
24900
+ attributes: {}
24910
24901
  };
24911
24902
  }
24912
24903
  }
@@ -33774,13 +33765,14 @@ var SchedulerScheduleProvider = class {
33774
33765
  const groupName = this.groupNameOf(properties);
33775
33766
  this.logger.debug(`Creating Schedule ${logicalId}: ${name}${groupName ? ` (group: ${groupName})` : ""}`);
33776
33767
  try {
33768
+ const response = await this.getClient().send(new CreateScheduleCommand({
33769
+ Name: name,
33770
+ ...groupName && { GroupName: groupName },
33771
+ ...this.toSdkFields(properties)
33772
+ }));
33777
33773
  return {
33778
33774
  physicalId: name,
33779
- attributes: { Arn: (await this.getClient().send(new CreateScheduleCommand({
33780
- Name: name,
33781
- ...groupName && { GroupName: groupName },
33782
- ...this.toSdkFields(properties)
33783
- }))).ScheduleArn ?? "" }
33775
+ attributes: response.ScheduleArn ? { Arn: response.ScheduleArn } : {}
33784
33776
  };
33785
33777
  } catch (error) {
33786
33778
  const cause = error instanceof Error ? error : void 0;
@@ -33798,10 +33790,11 @@ var SchedulerScheduleProvider = class {
33798
33790
  ...groupName && { GroupName: groupName },
33799
33791
  ...this.toSdkFields(properties)
33800
33792
  };
33793
+ const response = await this.getClient().send(new UpdateScheduleCommand(input));
33801
33794
  return {
33802
33795
  physicalId,
33803
33796
  wasReplaced: false,
33804
- attributes: { Arn: (await this.getClient().send(new UpdateScheduleCommand(input))).ScheduleArn ?? "" }
33797
+ attributes: response.ScheduleArn ? { Arn: response.ScheduleArn } : {}
33805
33798
  };
33806
33799
  } catch (error) {
33807
33800
  if (error instanceof ResourceUpdateNotSupportedError) throw error;
@@ -33889,12 +33882,13 @@ var SchedulerScheduleProvider = class {
33889
33882
  if (!explicit) return null;
33890
33883
  const groupName = this.groupNameOf(input.properties);
33891
33884
  try {
33885
+ const response = await this.getClient().send(new GetScheduleCommand({
33886
+ Name: explicit,
33887
+ ...groupName && { GroupName: groupName }
33888
+ }));
33892
33889
  return {
33893
33890
  physicalId: explicit,
33894
- attributes: { Arn: (await this.getClient().send(new GetScheduleCommand({
33895
- Name: explicit,
33896
- ...groupName && { GroupName: groupName }
33897
- }))).Arn ?? "" }
33891
+ attributes: response.Arn ? { Arn: response.Arn } : {}
33898
33892
  };
33899
33893
  } catch (error) {
33900
33894
  if (error instanceof ResourceNotFoundException$9) return null;
@@ -39979,7 +39973,7 @@ var DLMLifecyclePolicyProvider = class {
39979
39973
  const response = await this.getClient().send(new GetLifecyclePolicyCommand$1({ PolicyId: input.knownPhysicalId }));
39980
39974
  return response.Policy?.PolicyId ? {
39981
39975
  physicalId: input.knownPhysicalId,
39982
- attributes: { Arn: response.Policy.PolicyArn ?? "" }
39976
+ attributes: response.Policy.PolicyArn ? { Arn: response.Policy.PolicyArn } : {}
39983
39977
  } : null;
39984
39978
  } catch (err) {
39985
39979
  if (err instanceof ResourceNotFoundException$12) return null;
@@ -52024,7 +52018,8 @@ async function importOne(task) {
52024
52018
  logicalId,
52025
52019
  resourceType: resource.Type,
52026
52020
  outcome: "imported",
52027
- physicalId: result.physicalId
52021
+ physicalId: result.physicalId,
52022
+ ...result.attributes !== void 0 && { attributes: result.attributes }
52028
52023
  };
52029
52024
  } catch (error) {
52030
52025
  const msg = error instanceof Error ? error.message : String(error);
@@ -52167,11 +52162,14 @@ function buildStackState(stackName, region, rows, templateParser, template, exis
52167
52162
  const tmplResource = template.Resources[row.logicalId];
52168
52163
  if (!tmplResource) continue;
52169
52164
  const deps = [...templateParser.extractDependencies(tmplResource)].filter((dep) => !parameterNames.has(dep));
52165
+ const prior = existingState?.resources[row.logicalId];
52166
+ const priorAttributes = prior && prior.physicalId === row.physicalId ? prior.attributes : void 0;
52167
+ const rowAttributes = row.attributes && Object.keys(row.attributes).length > 0 ? row.attributes : void 0;
52170
52168
  resources[row.logicalId] = {
52171
52169
  physicalId: row.physicalId,
52172
52170
  resourceType: row.resourceType,
52173
52171
  properties: tmplResource.Properties ?? {},
52174
- attributes: {},
52172
+ attributes: rowAttributes ?? priorAttributes ?? {},
52175
52173
  dependencies: deps,
52176
52174
  provisionedBy: "sdk"
52177
52175
  };
@@ -62140,7 +62138,7 @@ function reorderArgs(argv) {
62140
62138
  async function main() {
62141
62139
  installPipeCloseHandler();
62142
62140
  const program = new Command();
62143
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.252.1");
62141
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.252.3");
62144
62142
  program.addCommand(createBootstrapCommand());
62145
62143
  program.addCommand(createSynthCommand());
62146
62144
  program.addCommand(createListCommand());