@go-to-k/cdkd 0.281.28 → 0.282.1
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-s09zJlib.js} +2 -2
- package/dist/{asg-provider-CPA-dc1x.js.map → asg-provider-s09zJlib.js.map} +1 -1
- package/dist/cli.js +81 -23
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-DnvhlIW5.js → deploy-engine-DGoHusjU.js} +4 -4
- package/dist/{deploy-engine-DnvhlIW5.js.map → deploy-engine-DGoHusjU.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
|
|
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 NestedStackChildDirectDestroyError, Ct as rewriteTemplateAssetReferences, D as bold, Dn as ResourceUpdateNotSupportedError, Dt as getBootstrapMarkerKey, E as formatResourceLine, En as ResourceTimeoutError, Et as ensureAssetStorage, F as clearOnUpdateRemoval, Fn as withErrorHandling, 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, Nt as getDockerCmd, O as cyan, On as StackHasActiveImportsError, Ot as parseBootstrapMarker, P as collectInlinePolicyNamesManagedBySiblings, Pn as normalizeAwsError, Pt as runDockerForeground, Q as configBooleanRefusal, Qt as CFN_TEMPLATE_URL_LIMIT, R as findSilentDropProperties, Rt as Synthesizer, S as extractDeploymentEventError, Sn as MissingCdkCliError, St as loadPublishableAssetManifest, T as renderStatefulReason, Tn as ProvisioningError, 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 DeployCancelledError, _t as AssetPublisher, a as DeploymentEventsStore, an as AssemblyReader, at as applyRoleArnIfSet, b as unsupportedFinalSnapshotError, bn as LocalStartServiceError, bt as buildAssetRedirectMap, c as replayFailedOperations, cn as resolveBucketRegion, ct as withRetry, d as IMPLICIT_DELETE_DEPENDENCIES, dn as resetAwsClients, dt as DagBuilder, en as findLargeInlineResources, et as readConfigString, f as computeImplicitDeleteEdges, fn as setAwsClients, ft as TemplateParser, g as ccRoutedFinalSnapshotError, gt as shouldRetainResource, h as buildFinalSnapshotIdentifier, ht as rebuildClientForBucketRegion, i as DeploymentEventsReader, in as derivePartitionAndUrlSuffix, it as requireConfigString, j as red, jt as buildDockerImage, k as gray, kn as StackTerminationProtectionError, kt as validateAssetBucketName, l as replayRollback, ln as AwsClients, lt as isRetryableTransientError, m as PRE_DELETE_SNAPSHOT_TYPES, mn as CdkdError, mt as S3StateBackend, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as expectedOwnerParam, nt as requireConfigArray, o as planFailedOps, on as processStackMessages, ot as DiffCalculator, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pt as LockManager, q as WAFv2WebACLProvider, qt as resolveStateBucketWithDefaultAndSource, r as DeployEngine, rn as PARTITION_TABLE, rt as requireConfigObject, s as planRollback, st as describeTypeWithThrottleRetry, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as uploadCfnTemplate, tt as replayWarn, u as withResourceDeadline, un as getAwsClients, ut as isThrottlingError, v as isFinalSnapshotError, vn as LocalInvokeBuildError$1, vt as stringifyValue, w as isStatefulRecreateTargetSync, wn as PartialFailureError, wt as AssetModeResolver, x as makeCanonicalizePropertiesFn, xt as createAssetRedirectResolver, y as refusesFinalSnapshot, yn as LocalMigrateError, yt as WorkGraph, z as CloudControlProvider, zt as synthesisStatusMessage } from "./deploy-engine-DGoHusjU.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-s09zJlib.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
|
|
@@ -63511,6 +63558,24 @@ function escapeRegExp(value) {
|
|
|
63511
63558
|
*/
|
|
63512
63559
|
const KEY_TERMINATORS = "[^\\s\"'?]";
|
|
63513
63560
|
/**
|
|
63561
|
+
* URL suffixes gc must match that {@link PARTITION_TABLE} does NOT carry.
|
|
63562
|
+
*
|
|
63563
|
+
* Empty today, and deliberately kept as a declared seam rather than dropped:
|
|
63564
|
+
* it is what makes gc able to LEAD the derive table (issue #1785) now that
|
|
63565
|
+
* {@link AWS_URL_SUFFIXES} is built from it. Two directions need it:
|
|
63566
|
+
*
|
|
63567
|
+
* - A partition cdkd has recorded state for but whose region prefix is not in
|
|
63568
|
+
* the derive table yet. Adding it here is a one-line, reviewable change that
|
|
63569
|
+
* does not have to wait on the partition-table row.
|
|
63570
|
+
* - A suffix RETIRED from the derive table. Coupling propagates additions, but
|
|
63571
|
+
* a row EDITED or removed there would silently stop gc matching state files
|
|
63572
|
+
* already written with the old suffix — the irreversible direction. Such a
|
|
63573
|
+
* suffix moves here rather than disappearing. `tests/unit/cli/gc.test.ts`
|
|
63574
|
+
* fences that with a hand-written floor of the suffixes known today, so a
|
|
63575
|
+
* removal reds until it is carried over deliberately.
|
|
63576
|
+
*/
|
|
63577
|
+
const GC_EXTRA_URL_SUFFIXES = [];
|
|
63578
|
+
/**
|
|
63514
63579
|
* `(?:amazonaws\.com\.cn|amazonaws\.com|...)` — {@link AWS_URL_SUFFIXES} as a
|
|
63515
63580
|
* non-capturing alternation, LONGEST FIRST so `amazonaws.com.cn` is tried
|
|
63516
63581
|
* before its own `amazonaws.com` prefix instead of relying on backtracking.
|
|
@@ -63521,15 +63586,7 @@ const KEY_TERMINATORS = "[^\\s\"'?]";
|
|
|
63521
63586
|
* patterns. Making it capturing would shift every index by one and silently
|
|
63522
63587
|
* collect the suffix as if it were a key.
|
|
63523
63588
|
*/
|
|
63524
|
-
const URL_SUFFIX_ALTERNATION = `(?:${[...[
|
|
63525
|
-
"amazonaws.com",
|
|
63526
|
-
"amazonaws.com.cn",
|
|
63527
|
-
"amazonaws.eu",
|
|
63528
|
-
"c2s.ic.gov",
|
|
63529
|
-
"sc2s.sgov.gov",
|
|
63530
|
-
"cloud.adc-e.uk",
|
|
63531
|
-
"csp.hci.ic.gov"
|
|
63532
|
-
]].sort((a, b) => b.length - a.length).map(escapeRegExp).join("|")})`;
|
|
63589
|
+
const URL_SUFFIX_ALTERNATION = `(?:${[...[.../* @__PURE__ */ new Set([...PARTITION_TABLE.map((row) => row.urlSuffix), ...GC_EXTRA_URL_SUFFIXES])]].sort((a, b) => b.length - a.length).map(escapeRegExp).join("|")})`;
|
|
63533
63590
|
/**
|
|
63534
63591
|
* The HOST half of an ECR registry, as an alternation over the forms AWS
|
|
63535
63592
|
* serves: `<acct>.dkr.ecr.<region>.<urlSuffix>`, its FIPS sibling
|
|
@@ -63547,9 +63604,10 @@ const URL_SUFFIX_ALTERNATION = `(?:${[...[
|
|
|
63547
63604
|
* Account and region are matched loosely on purpose (see the extractor doc):
|
|
63548
63605
|
* collecting a reference from another account's or region's URI can only KEEP
|
|
63549
63606
|
* more, never delete more — which is also why the two extra forms are worth
|
|
63550
|
-
* carrying even though cdkd's own publisher writes the plain one. Issue #
|
|
63607
|
+
* carrying even though cdkd's own publisher writes the plain one. Issue #1793
|
|
63551
63608
|
* tracks deriving these host forms from ONE place shared with
|
|
63552
|
-
* `src/utils/ecr-uri.ts` instead of two hand-kept copies
|
|
63609
|
+
* `src/utils/ecr-uri.ts` instead of two hand-kept copies — that module matches
|
|
63610
|
+
* only the plain `dkr.ecr` form today, so the two already disagree.
|
|
63553
63611
|
*
|
|
63554
63612
|
* Every group is non-capturing, for the {@link URL_SUFFIX_ALTERNATION} reason.
|
|
63555
63613
|
*/
|
|
@@ -75436,7 +75494,7 @@ function createMigrateCommand() {
|
|
|
75436
75494
|
*/
|
|
75437
75495
|
function buildProgram() {
|
|
75438
75496
|
const program = new Command();
|
|
75439
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
75497
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.282.1");
|
|
75440
75498
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
75441
75499
|
const { profile } = actionCommand.optsWithGlobals();
|
|
75442
75500
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|