@go-to-k/cdkd 0.278.5 → 0.278.7
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--hs1COdE.js → asg-provider-Cqw9Gzck.js} +2 -2
- package/dist/{asg-provider--hs1COdE.js.map → asg-provider-Cqw9Gzck.js.map} +1 -1
- package/dist/cli.js +57 -11
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-BWPBsNGL.js → deploy-engine-DQxqNiZR.js} +199 -5
- package/dist/deploy-engine-DQxqNiZR.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-BWPBsNGL.js.map +0 -1
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-
|
|
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-DQxqNiZR.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
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-Cqw9Gzck.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";
|
|
@@ -42869,6 +42869,40 @@ var ECRProvider = class {
|
|
|
42869
42869
|
return out;
|
|
42870
42870
|
}
|
|
42871
42871
|
/**
|
|
42872
|
+
* Map CFn `ImageTagMutabilityExclusionFilters`
|
|
42873
|
+
* (`[{ ImageTagMutabilityExclusionFilterType, ImageTagMutabilityExclusionFilterValue }]`)
|
|
42874
|
+
* to the SDK shape (`[{ filterType, filter }]`). The member NAMES diverge —
|
|
42875
|
+
* not just their casing — so forwarding the CFn-shaped array verbatim makes
|
|
42876
|
+
* the SDK drop every member and send `[{}]`, and AWS rejects the call (or,
|
|
42877
|
+
* worse, silently loses the exclusions). Returns `undefined` for an absent /
|
|
42878
|
+
* empty list so the caller can omit the field entirely.
|
|
42879
|
+
*/
|
|
42880
|
+
toSdkTagMutabilityExclusionFilters(cfn) {
|
|
42881
|
+
if (!Array.isArray(cfn) || cfn.length === 0) return void 0;
|
|
42882
|
+
return cfn.map((entry) => {
|
|
42883
|
+
const e = entry ?? {};
|
|
42884
|
+
return {
|
|
42885
|
+
filterType: e["ImageTagMutabilityExclusionFilterType"],
|
|
42886
|
+
filter: e["ImageTagMutabilityExclusionFilterValue"]
|
|
42887
|
+
};
|
|
42888
|
+
});
|
|
42889
|
+
}
|
|
42890
|
+
/**
|
|
42891
|
+
* Inverse of {@link toSdkTagMutabilityExclusionFilters}: SDK
|
|
42892
|
+
* `[{ filterType, filter }]` back to the CFn property shape, so
|
|
42893
|
+
* `cdkd drift` compares the AWS-current exclusions against the
|
|
42894
|
+
* template-shaped baseline instead of a guaranteed false positive.
|
|
42895
|
+
* Returns `undefined` for an absent / empty list so `readCurrentState`
|
|
42896
|
+
* omits the key (a repository with no exclusions).
|
|
42897
|
+
*/
|
|
42898
|
+
toCfnTagMutabilityExclusionFilters(sdk) {
|
|
42899
|
+
if (!sdk || sdk.length === 0) return void 0;
|
|
42900
|
+
return sdk.map((f) => ({
|
|
42901
|
+
...f.filterType !== void 0 && { ImageTagMutabilityExclusionFilterType: f.filterType },
|
|
42902
|
+
...f.filter !== void 0 && { ImageTagMutabilityExclusionFilterValue: f.filter }
|
|
42903
|
+
}));
|
|
42904
|
+
}
|
|
42905
|
+
/**
|
|
42872
42906
|
* Create an ECR Repository
|
|
42873
42907
|
*/
|
|
42874
42908
|
async create(logicalId, resourceType, properties) {
|
|
@@ -42878,10 +42912,12 @@ var ECRProvider = class {
|
|
|
42878
42912
|
const tags = properties["Tags"];
|
|
42879
42913
|
const scanningConfig = this.toSdkScanningConfig(properties["ImageScanningConfiguration"]);
|
|
42880
42914
|
const encryptionConfig = this.toSdkEncryptionConfig(properties["EncryptionConfiguration"]);
|
|
42915
|
+
const exclusionFilters = this.toSdkTagMutabilityExclusionFilters(properties["ImageTagMutabilityExclusionFilters"]);
|
|
42881
42916
|
const repo = (await this.getClient().send(new CreateRepositoryCommand({
|
|
42882
42917
|
repositoryName,
|
|
42883
42918
|
...scanningConfig ? { imageScanningConfiguration: scanningConfig } : {},
|
|
42884
42919
|
...properties["ImageTagMutability"] ? { imageTagMutability: properties["ImageTagMutability"] } : {},
|
|
42920
|
+
...exclusionFilters ? { imageTagMutabilityExclusionFilters: exclusionFilters } : {},
|
|
42885
42921
|
...encryptionConfig ? { encryptionConfiguration: encryptionConfig } : {},
|
|
42886
42922
|
...tags ? { tags } : {}
|
|
42887
42923
|
}))).repository;
|
|
@@ -42922,7 +42958,8 @@ var ECRProvider = class {
|
|
|
42922
42958
|
* Update an ECR Repository
|
|
42923
42959
|
*
|
|
42924
42960
|
* Mutable properties: ImageScanningConfiguration, ImageTagMutability,
|
|
42925
|
-
* LifecyclePolicy, RepositoryPolicyText,
|
|
42961
|
+
* ImageTagMutabilityExclusionFilters, LifecyclePolicy, RepositoryPolicyText,
|
|
42962
|
+
* Tags.
|
|
42926
42963
|
* Immutable: RepositoryName, EncryptionConfiguration (require replacement).
|
|
42927
42964
|
*/
|
|
42928
42965
|
async update(logicalId, physicalId, _resourceType, properties, previousProperties) {
|
|
@@ -42938,10 +42975,14 @@ var ECRProvider = class {
|
|
|
42938
42975
|
this.logger.debug(`Updated image scanning configuration for ${physicalId}`);
|
|
42939
42976
|
}
|
|
42940
42977
|
const newMutability = properties["ImageTagMutability"];
|
|
42941
|
-
|
|
42978
|
+
const oldMutability = previousProperties["ImageTagMutability"];
|
|
42979
|
+
const newExclusionFilters = this.toSdkTagMutabilityExclusionFilters(properties["ImageTagMutabilityExclusionFilters"]);
|
|
42980
|
+
const oldExclusionFilters = this.toSdkTagMutabilityExclusionFilters(previousProperties["ImageTagMutabilityExclusionFilters"]);
|
|
42981
|
+
if (newMutability !== oldMutability || JSON.stringify(newExclusionFilters) !== JSON.stringify(oldExclusionFilters)) {
|
|
42942
42982
|
await this.getClient().send(new PutImageTagMutabilityCommand({
|
|
42943
42983
|
repositoryName: physicalId,
|
|
42944
|
-
imageTagMutability: newMutability ?? "MUTABLE"
|
|
42984
|
+
imageTagMutability: newMutability ?? "MUTABLE",
|
|
42985
|
+
...newExclusionFilters ? { imageTagMutabilityExclusionFilters: newExclusionFilters } : {}
|
|
42945
42986
|
}));
|
|
42946
42987
|
this.logger.debug(`Updated image tag mutability for ${physicalId}`);
|
|
42947
42988
|
}
|
|
@@ -43051,17 +43092,20 @@ var ECRProvider = class {
|
|
|
43051
43092
|
* (which `DescribeRepositories` doesn't return).
|
|
43052
43093
|
*
|
|
43053
43094
|
* Surfaced keys: `RepositoryName`, `ImageTagMutability`,
|
|
43054
|
-
* `
|
|
43055
|
-
*
|
|
43056
|
-
*
|
|
43095
|
+
* `ImageTagMutabilityExclusionFilters` (when the repository has any —
|
|
43096
|
+
* `DescribeRepositories` returns them on the `Repository` shape, mapped back
|
|
43097
|
+
* to the CFn member names), `ImageScanningConfiguration`,
|
|
43098
|
+
* `EncryptionConfiguration`, `LifecyclePolicy` (when configured —
|
|
43099
|
+
* `LifecyclePolicyNotFoundException` is caught and the key omitted, NOT
|
|
43100
|
+
* propagated as repo-gone).
|
|
43057
43101
|
*
|
|
43058
43102
|
* Intentionally omitted:
|
|
43059
43103
|
* - `RepositoryPolicyText`: requires a separate `GetRepositoryPolicy`
|
|
43060
43104
|
* round-trip; cdkd state holds the policy as either a string or an
|
|
43061
43105
|
* object (depending on user input), and the comparator round-trip
|
|
43062
43106
|
* is not yet handled here.
|
|
43063
|
-
* - `EmptyOnDelete
|
|
43064
|
-
*
|
|
43107
|
+
* - `EmptyOnDelete`: a cdkd/CDK delete-time intent flag, not part of the
|
|
43108
|
+
* persisted AWS state visible via standard Describe.
|
|
43065
43109
|
*
|
|
43066
43110
|
* `Tags` is surfaced via a follow-up `ListTagsForResource(arn)` call
|
|
43067
43111
|
* (using the repository ARN that `DescribeRepositories` returns). CDK's
|
|
@@ -43083,6 +43127,8 @@ var ECRProvider = class {
|
|
|
43083
43127
|
const result = {};
|
|
43084
43128
|
if (r.repositoryName !== void 0) result["RepositoryName"] = r.repositoryName;
|
|
43085
43129
|
if (r.imageTagMutability !== void 0) result["ImageTagMutability"] = r.imageTagMutability;
|
|
43130
|
+
const cfnExclusionFilters = this.toCfnTagMutabilityExclusionFilters(r.imageTagMutabilityExclusionFilters);
|
|
43131
|
+
if (cfnExclusionFilters) result["ImageTagMutabilityExclusionFilters"] = cfnExclusionFilters;
|
|
43086
43132
|
result["ImageScanningConfiguration"] = { ScanOnPush: r.imageScanningConfiguration?.scanOnPush ?? false };
|
|
43087
43133
|
{
|
|
43088
43134
|
const encType = r.encryptionConfiguration?.encryptionType ?? "AES256";
|
|
@@ -64408,7 +64454,7 @@ function createMigrateCommand() {
|
|
|
64408
64454
|
*/
|
|
64409
64455
|
function buildProgram() {
|
|
64410
64456
|
const program = new Command();
|
|
64411
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.
|
|
64457
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.7");
|
|
64412
64458
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
64413
64459
|
const { profile } = actionCommand.optsWithGlobals();
|
|
64414
64460
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|