@go-to-k/cdkd 0.281.28 → 0.282.0
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/{asg-provider-CPA-dc1x.js → asg-provider-BSI5xl1o.js} +2 -2
- package/dist/{asg-provider-CPA-dc1x.js.map → asg-provider-BSI5xl1o.js.map} +1 -1
- package/dist/cli.js +59 -12
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-DnvhlIW5.js → deploy-engine-CfcQQzbs.js} +3 -3
- package/dist/{deploy-engine-DnvhlIW5.js.map → deploy-engine-CfcQQzbs.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as configStringRefusal, $t as MIGRATE_TMP_PREFIX, A as green, At as validateContainerRepoName, B as slowCcOperationTimeoutMs, Bt as getDefaultStateBucketName, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as PartialFailureError, Ct as rewriteTemplateAssetReferences, D as bold, Dn as StackHasActiveImportsError, Dt as getBootstrapMarkerKey, E as formatResourceLine, En as ResourceUpdateNotSupportedError, Et as ensureAssetStorage, F as clearOnUpdateRemoval, Ft as runDockerStreaming, G as getAccountInfo, Gt as resolveSkipPrefix, H as isTerminationProtectionPropagationError, Ht as resolveApp, I as ProviderRegistry, It as AssetManifestLoader, J as normalizeAwsTagsToCfn, Jt as resolveUseCdkBootstrapAssets, K as refStateLookupFromResource, Kt as resolveStateBucketWithDefault, L as findActionableSilentDrops, Lt as getDockerImageBySourceHash, M as yellow, Mt as formatDockerLoginError, N as IAMRoleProvider, Nn as normalizeAwsError, Nt as getDockerCmd, O as cyan, On as StackTerminationProtectionError, Ot as parseBootstrapMarker, P as collectInlinePolicyNamesManagedBySiblings, Pn as withErrorHandling, Pt as runDockerForeground, Q as configBooleanRefusal, Qt as CFN_TEMPLATE_URL_LIMIT, R as findSilentDropProperties, Rt as Synthesizer, S as extractDeploymentEventError, Sn as NestedStackChildDirectDestroyError, St as loadPublishableAssetManifest, T as renderStatefulReason, Tn as ResourceTimeoutError, Tt as BOOTSTRAP_MARKER_PREFIX, U as IntrinsicFunctionResolver, Ut as resolveAutoAssetStorage, V as disableInstanceApiTermination, Vt as getLegacyStateBucketName, W as cfnRefValueFromPhysicalId, Wt as resolveCaptureObservedState, X as assertRegionMatch, Xt as warnDeprecatedNoPrefixCliFlag, Y as resolveExplicitPhysicalId, Yt as stateBucketExistenceConfirmed, Z as coerceCfnBoolean, Zt as CFN_TEMPLATE_BODY_LIMIT, _ as createPreDeleteFinalSnapshot, _n as LocalInvokeBuildError$1, _t as AssetPublisher, a as DeploymentEventsStore, an as processStackMessages, at as applyRoleArnIfSet, b as unsupportedFinalSnapshotError, bt as buildAssetRedirectMap, c as replayFailedOperations, cn as AwsClients, ct as withRetry, d as IMPLICIT_DELETE_DEPENDENCIES, dn as setAwsClients, dt as DagBuilder, en as findLargeInlineResources, et as readConfigString, f as computeImplicitDeleteEdges, ft as TemplateParser, g as ccRoutedFinalSnapshotError, gn as DeployCancelledError, gt as shouldRetainResource, h as buildFinalSnapshotIdentifier, ht as rebuildClientForBucketRegion, i as DeploymentEventsReader, in as AssemblyReader, it as requireConfigString, j as red, jt as buildDockerImage, k as gray, kt as validateAssetBucketName, l as replayRollback, ln as getAwsClients, lt as isRetryableTransientError, m as PRE_DELETE_SNAPSHOT_TYPES, mt as S3StateBackend, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as expectedOwnerParam, nt as requireConfigArray, o as planFailedOps, ot as DiffCalculator, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as CdkdError, pt as LockManager, q as WAFv2WebACLProvider, qt as resolveStateBucketWithDefaultAndSource, r as DeployEngine, rn as derivePartitionAndUrlSuffix, rt as requireConfigObject, s as planRollback, sn as resolveBucketRegion, st as describeTypeWithThrottleRetry, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as uploadCfnTemplate, tt as replayWarn, u as withResourceDeadline, un as resetAwsClients, ut as isThrottlingError, v as isFinalSnapshotError, vn as LocalMigrateError, vt as stringifyValue, w as isStatefulRecreateTargetSync, wn as ProvisioningError, wt as AssetModeResolver, x as makeCanonicalizePropertiesFn, xn as MissingCdkCliError, xt as createAssetRedirectResolver, y as refusesFinalSnapshot, yn as LocalStartServiceError, yt as WorkGraph, z as CloudControlProvider, zt as synthesisStatusMessage } from "./deploy-engine-
|
|
2
|
+
import { $ as configStringRefusal, $t as MIGRATE_TMP_PREFIX, A as green, At as validateContainerRepoName, B as slowCcOperationTimeoutMs, Bt as getDefaultStateBucketName, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as PartialFailureError, Ct as rewriteTemplateAssetReferences, D as bold, Dn as StackHasActiveImportsError, Dt as getBootstrapMarkerKey, E as formatResourceLine, En as ResourceUpdateNotSupportedError, Et as ensureAssetStorage, F as clearOnUpdateRemoval, Ft as runDockerStreaming, G as getAccountInfo, Gt as resolveSkipPrefix, H as isTerminationProtectionPropagationError, Ht as resolveApp, I as ProviderRegistry, It as AssetManifestLoader, J as normalizeAwsTagsToCfn, Jt as resolveUseCdkBootstrapAssets, K as refStateLookupFromResource, Kt as resolveStateBucketWithDefault, L as findActionableSilentDrops, Lt as getDockerImageBySourceHash, M as yellow, Mt as formatDockerLoginError, N as IAMRoleProvider, Nn as normalizeAwsError, Nt as getDockerCmd, O as cyan, On as StackTerminationProtectionError, Ot as parseBootstrapMarker, P as collectInlinePolicyNamesManagedBySiblings, Pn as withErrorHandling, Pt as runDockerForeground, Q as configBooleanRefusal, Qt as CFN_TEMPLATE_URL_LIMIT, R as findSilentDropProperties, Rt as Synthesizer, S as extractDeploymentEventError, Sn as NestedStackChildDirectDestroyError, St as loadPublishableAssetManifest, T as renderStatefulReason, Tn as ResourceTimeoutError, Tt as BOOTSTRAP_MARKER_PREFIX, U as IntrinsicFunctionResolver, Ut as resolveAutoAssetStorage, V as disableInstanceApiTermination, Vt as getLegacyStateBucketName, W as cfnRefValueFromPhysicalId, Wt as resolveCaptureObservedState, X as assertRegionMatch, Xt as warnDeprecatedNoPrefixCliFlag, Y as resolveExplicitPhysicalId, Yt as stateBucketExistenceConfirmed, Z as coerceCfnBoolean, Zt as CFN_TEMPLATE_BODY_LIMIT, _ as createPreDeleteFinalSnapshot, _n as LocalInvokeBuildError$1, _t as AssetPublisher, a as DeploymentEventsStore, an as processStackMessages, at as applyRoleArnIfSet, b as unsupportedFinalSnapshotError, bt as buildAssetRedirectMap, c as replayFailedOperations, cn as AwsClients, ct as withRetry, d as IMPLICIT_DELETE_DEPENDENCIES, dn as setAwsClients, dt as DagBuilder, en as findLargeInlineResources, et as readConfigString, f as computeImplicitDeleteEdges, ft as TemplateParser, g as ccRoutedFinalSnapshotError, gn as DeployCancelledError, gt as shouldRetainResource, h as buildFinalSnapshotIdentifier, ht as rebuildClientForBucketRegion, i as DeploymentEventsReader, in as AssemblyReader, it as requireConfigString, j as red, jt as buildDockerImage, k as gray, kt as validateAssetBucketName, l as replayRollback, ln as getAwsClients, lt as isRetryableTransientError, m as PRE_DELETE_SNAPSHOT_TYPES, mt as S3StateBackend, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as expectedOwnerParam, nt as requireConfigArray, o as planFailedOps, ot as DiffCalculator, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as CdkdError, pt as LockManager, q as WAFv2WebACLProvider, qt as resolveStateBucketWithDefaultAndSource, r as DeployEngine, rn as derivePartitionAndUrlSuffix, rt as requireConfigObject, s as planRollback, sn as resolveBucketRegion, st as describeTypeWithThrottleRetry, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as uploadCfnTemplate, tt as replayWarn, u as withResourceDeadline, un as resetAwsClients, ut as isThrottlingError, v as isFinalSnapshotError, vn as LocalMigrateError, vt as stringifyValue, w as isStatefulRecreateTargetSync, wn as ProvisioningError, wt as AssetModeResolver, x as makeCanonicalizePropertiesFn, xn as MissingCdkCliError, xt as createAssetRedirectResolver, y as refusesFinalSnapshot, yn as LocalStartServiceError, yt as WorkGraph, z as CloudControlProvider, zt as synthesisStatusMessage } from "./deploy-engine-CfcQQzbs.js";
|
|
3
3
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, h as withStackName, i as runStackBuffered, m as withSkipPrefix, n as getLogger, o as PATTERN_B_NAME_OPTIONS, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-zRrlbaQt.js";
|
|
4
|
-
import { t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-BSI5xl1o.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, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, 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";
|
|
@@ -56182,20 +56182,61 @@ function canonicalizeIdArraysDeep(v) {
|
|
|
56182
56182
|
return v;
|
|
56183
56183
|
}
|
|
56184
56184
|
/**
|
|
56185
|
+
* Suffix marking a provider-declared path entry as LEAF-ONLY — the path
|
|
56186
|
+
* itself, and nothing beneath it (issue
|
|
56187
|
+
* [#1783](https://github.com/go-to-k/cdkd/issues/1783)).
|
|
56188
|
+
*
|
|
56189
|
+
* Spelled `[]` because every real consumer is an ARRAY at the declared path
|
|
56190
|
+
* whose ELEMENTS must be left alone: `'GlobalSecondaryIndexes[]'` reads as
|
|
56191
|
+
* "the index list is an unordered set", which is exactly the claim being
|
|
56192
|
+
* made, while `'GlobalSecondaryIndexes'` would additionally claim it about
|
|
56193
|
+
* every array inside each element.
|
|
56194
|
+
*/
|
|
56195
|
+
const LEAF_ONLY_PATH_SUFFIX = "[]";
|
|
56196
|
+
/**
|
|
56185
56197
|
* Match a dotted property path against a provider-declared path list.
|
|
56186
56198
|
*
|
|
56187
56199
|
* An entry matches when the path is exactly equal to it, OR when the entry is
|
|
56188
|
-
* a prefix followed by
|
|
56200
|
+
* a prefix followed by `.` — so a plain entry is a SUBTREE declaration:
|
|
56189
56201
|
* `'VpcConfig'` matches `VpcConfig`, `VpcConfig.SubnetIds`, and anything
|
|
56190
|
-
* deeper.
|
|
56191
|
-
*
|
|
56192
|
-
*
|
|
56193
|
-
*
|
|
56194
|
-
*
|
|
56202
|
+
* deeper.
|
|
56203
|
+
*
|
|
56204
|
+
* An entry ending in {@link LEAF_ONLY_PATH_SUFFIX} is LEAF-ONLY and matches
|
|
56205
|
+
* that one path exactly. It exists because a subtree declaration is the wrong
|
|
56206
|
+
* unit whenever a declared array's ELEMENTS contain a member the claim must
|
|
56207
|
+
* not extend to (issue [#1783](https://github.com/go-to-k/cdkd/issues/1783)):
|
|
56208
|
+
* `AWS::DynamoDB::Table.GlobalSecondaryIndexes` is an unordered set keyed by
|
|
56209
|
+
* `IndexName`, but each element carries a `KeySchema` that is order-SIGNIFICANT
|
|
56210
|
+
* (HASH before RANGE), and the unordered walk descends into array elements
|
|
56211
|
+
* giving them their parent's path — so `'GlobalSecondaryIndexes'` would sort
|
|
56212
|
+
* the per-index key schema too and HIDE a real key change. Declaring
|
|
56213
|
+
* `'GlobalSecondaryIndexes[]'` sorts the list and stops there.
|
|
56214
|
+
*
|
|
56215
|
+
* The marker is understood by BOTH provider-declared lists rather than only by
|
|
56216
|
+
* the one that needed it, so their spellings cannot diverge — which is the
|
|
56217
|
+
* whole reason this matcher is shared: `getDriftUnknownPaths` (via
|
|
56218
|
+
* `isIgnoredPath` in `drift-calculator.ts`) and `getDriftUnorderedPaths` (via
|
|
56195
56219
|
* {@link canonicalizeUnorderedArraysAtPaths} below).
|
|
56220
|
+
*
|
|
56221
|
+
* A bare `'[]'` entry (empty base path) matches NOTHING. It would otherwise
|
|
56222
|
+
* name the root bag, which no caller can mean, and silently sorting a root
|
|
56223
|
+
* array is a worse answer than ignoring a malformed declaration.
|
|
56224
|
+
*
|
|
56225
|
+
* NOTE not every entry is a hand-written declaration: `drift.ts` also feeds
|
|
56226
|
+
* `undeclaredEmptyObservedKeys`' output (raw top-level STATE keys, issue
|
|
56227
|
+
* #1498) into the ignore-path list. Those are data-derived, so the marker
|
|
56228
|
+
* would be a misreading if a key could end in `[]` — it cannot, because a
|
|
56229
|
+
* CloudFormation property name is alphanumeric, so no state key reaches this
|
|
56230
|
+
* matcher carrying the suffix. Keep that true if the ignore-path list ever
|
|
56231
|
+
* gains a source with freer key syntax.
|
|
56196
56232
|
*/
|
|
56197
56233
|
function matchesPathPrefix(path, entries) {
|
|
56198
56234
|
for (const entry of entries) {
|
|
56235
|
+
if (entry.endsWith("[]")) {
|
|
56236
|
+
const leaf = entry.slice(0, -2);
|
|
56237
|
+
if (leaf !== "" && path === leaf) return true;
|
|
56238
|
+
continue;
|
|
56239
|
+
}
|
|
56199
56240
|
if (path === entry) return true;
|
|
56200
56241
|
if (path.startsWith(`${entry}.`)) return true;
|
|
56201
56242
|
}
|
|
@@ -56211,8 +56252,10 @@ function matchesPathPrefix(path, entries) {
|
|
|
56211
56252
|
* Paths use dot-notation for nested keys and are matched by the shared
|
|
56212
56253
|
* {@link matchesPathPrefix} rule, the same one `getDriftUnknownPaths` uses. So
|
|
56213
56254
|
* `'WindowsConfiguration'` covers every plain-string array in that subtree, and
|
|
56214
|
-
* `'WindowsConfiguration.Aliases'` covers that path and everything beneath it
|
|
56215
|
-
*
|
|
56255
|
+
* `'WindowsConfiguration.Aliases'` covers that path and everything beneath it.
|
|
56256
|
+
* Append {@link LEAF_ONLY_PATH_SUFFIX} to claim the path ALONE —
|
|
56257
|
+
* `'GlobalSecondaryIndexes[]'` sorts that list without reaching the arrays
|
|
56258
|
+
* inside its elements.
|
|
56216
56259
|
*
|
|
56217
56260
|
* One semantic DIVERGENCE from `getDriftUnknownPaths`, required for this pass
|
|
56218
56261
|
* to work: `isIgnoredPath` never sees a path that crosses an array, because the
|
|
@@ -57236,7 +57279,11 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
57236
57279
|
const observedIgnorePaths = useObserved ? undeclaredEmptyObservedKeys(resource.observedProperties, resource.properties ?? {}) : [];
|
|
57237
57280
|
const normalized = await canonicalizePrincipalUniqueIds(baseline, aws, resolvePrincipalUniqueId);
|
|
57238
57281
|
const protocolNormalized = canonicalizeIpProtocols(normalized.baseline, normalized.aws, resource.resourceType);
|
|
57239
|
-
const
|
|
57282
|
+
const canonicalized = provider.canonicalizeDriftProperties ? {
|
|
57283
|
+
baseline: provider.canonicalizeDriftProperties(resource.resourceType, protocolNormalized.baseline),
|
|
57284
|
+
aws: provider.canonicalizeDriftProperties(resource.resourceType, protocolNormalized.aws)
|
|
57285
|
+
} : protocolNormalized;
|
|
57286
|
+
const changes = calculateResourceDrift(canonicalized.baseline, canonicalized.aws, {
|
|
57240
57287
|
ignorePaths: observedIgnorePaths.length ? [...ignorePaths, ...observedIgnorePaths] : ignorePaths,
|
|
57241
57288
|
unionWalkObjects: useObserved,
|
|
57242
57289
|
unorderedPaths
|
|
@@ -75436,7 +75483,7 @@ function createMigrateCommand() {
|
|
|
75436
75483
|
*/
|
|
75437
75484
|
function buildProgram() {
|
|
75438
75485
|
const program = new Command();
|
|
75439
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
75486
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.282.0");
|
|
75440
75487
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
75441
75488
|
const { profile } = actionCommand.optsWithGlobals();
|
|
75442
75489
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|