@go-to-k/cdkd 0.278.12 → 0.278.13
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-BAnnBKci.js → asg-provider-QQOSO3LR.js} +2 -2
- package/dist/{asg-provider-BAnnBKci.js.map → asg-provider-QQOSO3LR.js.map} +1 -1
- package/dist/cli.js +74 -14
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-BKfqbjsz.js → deploy-engine-BpbIYUuG.js} +3 -3
- package/dist/{deploy-engine-BKfqbjsz.js.map → deploy-engine-BpbIYUuG.js.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 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-BpbIYUuG.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-QQOSO3LR.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";
|
|
@@ -4813,6 +4813,52 @@ function isTruthyCfnBoolean(value) {
|
|
|
4813
4813
|
//#endregion
|
|
4814
4814
|
//#region src/provisioning/providers/s3-bucket-provider.ts
|
|
4815
4815
|
/**
|
|
4816
|
+
* A plain (non-array) object. `typeof x === 'object'` alone accepts arrays and
|
|
4817
|
+
* `null`; a `Transition: []` or an unresolved intrinsic pushed through as a
|
|
4818
|
+
* single transition entry makes S3 answer `MalformedXML` for the WHOLE
|
|
4819
|
+
* lifecycle configuration, so the legacy singular readers screen with this.
|
|
4820
|
+
*/
|
|
4821
|
+
function isPlainObject$1(value) {
|
|
4822
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4823
|
+
}
|
|
4824
|
+
/**
|
|
4825
|
+
* Coerce a CFn numeric to a finite number. CloudFormation is stringly typed —
|
|
4826
|
+
* a hand-written or imported template (the audience the legacy lifecycle
|
|
4827
|
+
* branches exist for) can carry `"365"` where the schema says number.
|
|
4828
|
+
*/
|
|
4829
|
+
function coerceCfnNumber(value) {
|
|
4830
|
+
if (typeof value !== "number" && typeof value !== "string") return void 0;
|
|
4831
|
+
if (value === "") return void 0;
|
|
4832
|
+
const n = Number(value);
|
|
4833
|
+
return Number.isFinite(n) ? n : void 0;
|
|
4834
|
+
}
|
|
4835
|
+
/**
|
|
4836
|
+
* Merge a legacy SINGULAR action object into its modern plural array.
|
|
4837
|
+
*
|
|
4838
|
+
* S3 rejects two transitions with the same `StorageClass` and fails the whole
|
|
4839
|
+
* `PutBucketLifecycleConfiguration`, so a blind concatenation is unsafe. But
|
|
4840
|
+
* dropping the singular wholesale loses a legitimate template: a plural
|
|
4841
|
+
* `[{GLACIER, 30}]` alongside a singular `{DEEP_ARCHIVE, 90}` is two different
|
|
4842
|
+
* classes, which S3 accepts. So: keep both, let the PLURAL win on a
|
|
4843
|
+
* StorageClass collision, and say so rather than dropping in silence.
|
|
4844
|
+
*/
|
|
4845
|
+
function mergeLegacySingular(plural, singular, onCollision) {
|
|
4846
|
+
const out = (Array.isArray(plural) ? plural : []).filter(isPlainObject$1);
|
|
4847
|
+
if (!isPlainObject$1(singular)) return out;
|
|
4848
|
+
const sc = singular["StorageClass"];
|
|
4849
|
+
if (typeof sc === "string" && out.some((e) => e["StorageClass"] === sc)) {
|
|
4850
|
+
onCollision(sc);
|
|
4851
|
+
return out;
|
|
4852
|
+
}
|
|
4853
|
+
return [...out, singular];
|
|
4854
|
+
}
|
|
4855
|
+
/** Coerce a CFn boolean, which may arrive as the string `"true"` / `"false"`. */
|
|
4856
|
+
function coerceCfnBoolean(value) {
|
|
4857
|
+
if (typeof value === "boolean") return value;
|
|
4858
|
+
if (value === "true") return true;
|
|
4859
|
+
if (value === "false") return false;
|
|
4860
|
+
}
|
|
4861
|
+
/**
|
|
4816
4862
|
* SDK Provider for AWS::S3::Bucket
|
|
4817
4863
|
*
|
|
4818
4864
|
* Uses S3 SDK directly instead of CC API for synchronous bucket creation.
|
|
@@ -4982,7 +5028,7 @@ var S3BucketProvider = class {
|
|
|
4982
5028
|
const filter = rule["Filter"];
|
|
4983
5029
|
return {
|
|
4984
5030
|
prefix: filter?.["Prefix"] ?? rule["Prefix"],
|
|
4985
|
-
tagFilters: filter?.["TagFilters"],
|
|
5031
|
+
tagFilters: filter?.["TagFilters"] ?? rule["TagFilters"],
|
|
4986
5032
|
sizeGt: filter?.["ObjectSizeGreaterThan"] ?? rule["ObjectSizeGreaterThan"],
|
|
4987
5033
|
sizeLt: filter?.["ObjectSizeLessThan"] ?? rule["ObjectSizeLessThan"]
|
|
4988
5034
|
};
|
|
@@ -5010,24 +5056,37 @@ var S3BucketProvider = class {
|
|
|
5010
5056
|
ExpiredObjectDeleteMarker: exp["ExpiredObjectDeleteMarker"]
|
|
5011
5057
|
};
|
|
5012
5058
|
}
|
|
5013
|
-
|
|
5059
|
+
if (coerceCfnBoolean(rule["ExpiredObjectDeleteMarker"]) === true) {
|
|
5060
|
+
const exp = sdkRule.Expiration;
|
|
5061
|
+
if (!(exp?.["Days"] !== void 0 || exp?.["Date"] !== void 0)) sdkRule.Expiration = { ExpiredObjectDeleteMarker: true };
|
|
5062
|
+
else this.logger.warn(`Lifecycle rule '${rule["Id"] ?? "<unnamed>"}' on ${bucketName} sets ExpiredObjectDeleteMarker alongside an expiration Days/Date; S3 forbids combining them, so the delete-marker cleanup was not applied.`);
|
|
5063
|
+
}
|
|
5064
|
+
const nve = isPlainObject$1(rule["NoncurrentVersionExpiration"]) ? rule["NoncurrentVersionExpiration"] : void 0;
|
|
5065
|
+
const legacyNveDays = rule["NoncurrentVersionExpirationInDays"];
|
|
5014
5066
|
if (nve) sdkRule.NoncurrentVersionExpiration = {
|
|
5015
5067
|
NoncurrentDays: nve["NoncurrentDays"],
|
|
5016
5068
|
NewerNoncurrentVersions: nve["NewerNoncurrentVersions"]
|
|
5017
5069
|
};
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
NoncurrentDays: nvt["NoncurrentDays"],
|
|
5070
|
+
else if (coerceCfnNumber(legacyNveDays) !== void 0) sdkRule.NoncurrentVersionExpiration = { NoncurrentDays: coerceCfnNumber(legacyNveDays) };
|
|
5071
|
+
const toSdkNvt = (nvt) => ({
|
|
5072
|
+
NoncurrentDays: nvt["TransitionInDays"] ?? nvt["NoncurrentDays"],
|
|
5021
5073
|
StorageClass: nvt["StorageClass"],
|
|
5022
5074
|
NewerNoncurrentVersions: nvt["NewerNoncurrentVersions"]
|
|
5023
|
-
})
|
|
5024
|
-
const
|
|
5025
|
-
|
|
5075
|
+
});
|
|
5076
|
+
const nvts = rule["NoncurrentVersionTransitions"];
|
|
5077
|
+
const singularNvt = rule["NoncurrentVersionTransition"];
|
|
5078
|
+
const allNvts = mergeLegacySingular(nvts, singularNvt, (sc) => this.logger.warn(`Lifecycle rule '${rule["Id"] ?? "<unnamed>"}' on ${bucketName} declares both NoncurrentVersionTransitions and the legacy NoncurrentVersionTransition for storage class ${sc}; S3 rejects duplicates, so the legacy singular was ignored.`));
|
|
5079
|
+
if (allNvts.length > 0) sdkRule.NoncurrentVersionTransitions = allNvts.map(toSdkNvt);
|
|
5080
|
+
const toSdkTransition = (t) => ({
|
|
5026
5081
|
Days: t["TransitionInDays"] ?? t["Days"],
|
|
5027
5082
|
Date: t["TransitionDate"] ?? t["Date"] ? new Date(t["TransitionDate"] ?? t["Date"]) : void 0,
|
|
5028
5083
|
StorageClass: t["StorageClass"]
|
|
5029
|
-
})
|
|
5030
|
-
const
|
|
5084
|
+
});
|
|
5085
|
+
const transitions = rule["Transitions"];
|
|
5086
|
+
const singularTransition = rule["Transition"];
|
|
5087
|
+
const allTransitions = mergeLegacySingular(transitions, singularTransition, (sc) => this.logger.warn(`Lifecycle rule '${rule["Id"] ?? "<unnamed>"}' on ${bucketName} declares both Transitions and the legacy Transition for storage class ${sc}; S3 rejects duplicates, so the legacy singular was ignored.`));
|
|
5088
|
+
if (allTransitions.length > 0) sdkRule.Transitions = allTransitions.map(toSdkTransition);
|
|
5089
|
+
const abort = isPlainObject$1(rule["AbortIncompleteMultipartUpload"]) ? rule["AbortIncompleteMultipartUpload"] : void 0;
|
|
5031
5090
|
if (abort) sdkRule.AbortIncompleteMultipartUpload = { DaysAfterInitiation: abort["DaysAfterInitiation"] };
|
|
5032
5091
|
const { prefix, tagFilters, sizeGt, sizeLt } = gatherScope(rule);
|
|
5033
5092
|
const hasTags = tagFilters !== void 0 && tagFilters.length > 0;
|
|
@@ -5037,6 +5096,7 @@ var S3BucketProvider = class {
|
|
|
5037
5096
|
ObjectSizeGreaterThan: sizeGt,
|
|
5038
5097
|
ObjectSizeLessThan: sizeLt
|
|
5039
5098
|
} };
|
|
5099
|
+
else if (hasTags && tagFilters.length > 1) sdkRule.Filter = { And: { Tags: tagFilters } };
|
|
5040
5100
|
else if (hasTags) sdkRule.Filter = { Tag: tagFilters[0] };
|
|
5041
5101
|
else if (sizeGt !== void 0) sdkRule.Filter = { ObjectSizeGreaterThan: sizeGt };
|
|
5042
5102
|
else if (sizeLt !== void 0) sdkRule.Filter = { ObjectSizeLessThan: sizeLt };
|
|
@@ -5872,7 +5932,7 @@ var S3BucketProvider = class {
|
|
|
5872
5932
|
}
|
|
5873
5933
|
if (r.NoncurrentVersionTransitions && r.NoncurrentVersionTransitions.length > 0) out["NoncurrentVersionTransitions"] = r.NoncurrentVersionTransitions.map((nvt) => {
|
|
5874
5934
|
const item = {};
|
|
5875
|
-
if (nvt.NoncurrentDays !== void 0) item["
|
|
5935
|
+
if (nvt.NoncurrentDays !== void 0) item["TransitionInDays"] = nvt.NoncurrentDays;
|
|
5876
5936
|
if (nvt.StorageClass !== void 0) item["StorageClass"] = nvt.StorageClass;
|
|
5877
5937
|
if (nvt.NewerNoncurrentVersions !== void 0) item["NewerNoncurrentVersions"] = nvt.NewerNoncurrentVersions;
|
|
5878
5938
|
return item;
|
|
@@ -64846,7 +64906,7 @@ function createMigrateCommand() {
|
|
|
64846
64906
|
*/
|
|
64847
64907
|
function buildProgram() {
|
|
64848
64908
|
const program = new Command();
|
|
64849
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.
|
|
64909
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.13");
|
|
64850
64910
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
64851
64911
|
const { profile } = actionCommand.optsWithGlobals();
|
|
64852
64912
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|