@go-to-k/cdkd 0.170.0 → 0.171.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/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { _ as withSkipPrefix, a as runDockerStreaming, c as getLogger, d as getLiveRenderer, f as PATTERN_B_NAME_PROPERTIES, g as generateResourceNameWithFallback, h as generateResourceName, i as runDockerForeground, n as formatDockerLoginError, p as PATTERN_B_RESOURCE_TYPES, r as getDockerCmd, u as runStackBuffered, v as withStackName } from "./docker-cmd-iDMcWcre.js";
|
|
3
|
-
import { A as S3StateBackend, B as resolveCaptureObservedState, C as assertRegionMatch, D as DagBuilder, E as DiffCalculator, F as buildDockerImage, G as CFN_TEMPLATE_BODY_LIMIT, H as resolveStateBucketWithDefault, I as Synthesizer, J as findLargeInlineResources, K as CFN_TEMPLATE_URL_LIMIT, L as getDefaultStateBucketName, M as AssetPublisher, N as stringifyValue, O as TemplateParser, P as WorkGraph, Q as resolveBucketRegion, R as getLegacyStateBucketName, S as CloudControlProvider, T as applyRoleArnIfSet, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as warnDeprecatedNoPrefixCliFlag, X as AssemblyReader, Y as uploadCfnTemplate, _ as matchesCdkPath, a as withRetry, at as LocalStartServiceError, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as NestedStackChildDirectDestroyError, d as green, dt as ResourceTimeoutError, et as CdkdError, f as red, ft as ResourceUpdateNotSupportedError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalMigrateError, j as shouldRetainResource, k as LockManager, l as cyan, lt as PartialFailureError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, o as IMPLICIT_DELETE_DEPENDENCIES, p as yellow, pt as StackHasActiveImportsError, q as MIGRATE_TMP_PREFIX, r as DeployEngine, rt as LocalInvokeBuildError$1, s as formatResourceLine, st as MissingCdkCliError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ProvisioningError, v as normalizeAwsTagsToCfn, w as IntrinsicFunctionResolver, x as findActionableSilentDrops, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveApp } from "./deploy-engine-
|
|
3
|
+
import { A as S3StateBackend, B as resolveCaptureObservedState, C as assertRegionMatch, D as DagBuilder, E as DiffCalculator, F as buildDockerImage, G as CFN_TEMPLATE_BODY_LIMIT, H as resolveStateBucketWithDefault, I as Synthesizer, J as findLargeInlineResources, K as CFN_TEMPLATE_URL_LIMIT, L as getDefaultStateBucketName, M as AssetPublisher, N as stringifyValue, O as TemplateParser, P as WorkGraph, Q as resolveBucketRegion, R as getLegacyStateBucketName, S as CloudControlProvider, T as applyRoleArnIfSet, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as warnDeprecatedNoPrefixCliFlag, X as AssemblyReader, Y as uploadCfnTemplate, _ as matchesCdkPath, a as withRetry, at as LocalStartServiceError, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as NestedStackChildDirectDestroyError, d as green, dt as ResourceTimeoutError, et as CdkdError, f as red, ft as ResourceUpdateNotSupportedError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalMigrateError, j as shouldRetainResource, k as LockManager, l as cyan, lt as PartialFailureError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, o as IMPLICIT_DELETE_DEPENDENCIES, p as yellow, pt as StackHasActiveImportsError, q as MIGRATE_TMP_PREFIX, r as DeployEngine, rt as LocalInvokeBuildError$1, s as formatResourceLine, st as MissingCdkCliError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ProvisioningError, v as normalizeAwsTagsToCfn, w as IntrinsicFunctionResolver, x as findActionableSilentDrops, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveApp } from "./deploy-engine-BqNTKqFf.js";
|
|
4
4
|
import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-B15NAPbL.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
@@ -10826,7 +10826,11 @@ var CloudWatchAlarmProvider = class {
|
|
|
10826
10826
|
"Namespace",
|
|
10827
10827
|
"Period",
|
|
10828
10828
|
"Statistic",
|
|
10829
|
-
"Dimensions"
|
|
10829
|
+
"Dimensions",
|
|
10830
|
+
"Tags",
|
|
10831
|
+
"ExtendedStatistic",
|
|
10832
|
+
"EvaluateLowSampleCountPercentile",
|
|
10833
|
+
"ThresholdMetricId"
|
|
10830
10834
|
])]]);
|
|
10831
10835
|
constructor() {
|
|
10832
10836
|
const awsClients = getAwsClients();
|
|
@@ -10839,7 +10843,10 @@ var CloudWatchAlarmProvider = class {
|
|
|
10839
10843
|
this.logger.debug(`Creating CloudWatch alarm ${logicalId}`);
|
|
10840
10844
|
const alarmName = properties["AlarmName"] || generateResourceName(logicalId, { maxLength: 256 });
|
|
10841
10845
|
try {
|
|
10842
|
-
|
|
10846
|
+
const createParams = this.buildAlarmParams(alarmName, properties);
|
|
10847
|
+
const tags = this.buildCreateTags(properties["Tags"]);
|
|
10848
|
+
if (tags) createParams.Tags = tags;
|
|
10849
|
+
await this.cloudWatchClient.send(new PutMetricAlarmCommand(createParams));
|
|
10843
10850
|
this.logger.debug(`Successfully created CloudWatch alarm ${logicalId}: ${alarmName}`);
|
|
10844
10851
|
return {
|
|
10845
10852
|
physicalId: alarmName,
|
|
@@ -10911,6 +10918,21 @@ var CloudWatchAlarmProvider = class {
|
|
|
10911
10918
|
}
|
|
10912
10919
|
}
|
|
10913
10920
|
/**
|
|
10921
|
+
* Build the PutMetricAlarm `Tags` param from CFn-shape `[{Key, Value}]`
|
|
10922
|
+
* Tags for the create path. Returns `undefined` when no tags are present
|
|
10923
|
+
* so the field is omitted from the AWS call (matching create()'s
|
|
10924
|
+
* omit-when-unset convention for other optional fields).
|
|
10925
|
+
*/
|
|
10926
|
+
buildCreateTags(raw) {
|
|
10927
|
+
if (!Array.isArray(raw) || raw.length === 0) return void 0;
|
|
10928
|
+
const tags = [];
|
|
10929
|
+
for (const t of raw) if (t.Key !== void 0 && t.Value !== void 0) tags.push({
|
|
10930
|
+
Key: t.Key,
|
|
10931
|
+
Value: t.Value
|
|
10932
|
+
});
|
|
10933
|
+
return tags.length > 0 ? tags : void 0;
|
|
10934
|
+
}
|
|
10935
|
+
/**
|
|
10914
10936
|
* Apply a diff between old and new CFn-shape Tags arrays via CloudWatch's
|
|
10915
10937
|
* `TagResource` / `UntagResource` APIs (keyed by `ResourceARN`).
|
|
10916
10938
|
*/
|
|
@@ -10961,7 +10983,10 @@ var CloudWatchAlarmProvider = class {
|
|
|
10961
10983
|
InsufficientDataActions: properties["InsufficientDataActions"],
|
|
10962
10984
|
OKActions: properties["OKActions"],
|
|
10963
10985
|
TreatMissingData: emptyToUndefined(properties["TreatMissingData"]),
|
|
10964
|
-
Unit: emptyToUndefined(properties["Unit"])
|
|
10986
|
+
Unit: emptyToUndefined(properties["Unit"]),
|
|
10987
|
+
ExtendedStatistic: emptyToUndefined(properties["ExtendedStatistic"]),
|
|
10988
|
+
EvaluateLowSampleCountPercentile: emptyToUndefined(properties["EvaluateLowSampleCountPercentile"]),
|
|
10989
|
+
ThresholdMetricId: emptyToUndefined(properties["ThresholdMetricId"])
|
|
10965
10990
|
};
|
|
10966
10991
|
const metricsValue = properties["Metrics"];
|
|
10967
10992
|
if (Array.isArray(metricsValue) && metricsValue.length > 0) params["Metrics"] = metricsValue.map((m) => {
|
|
@@ -11048,6 +11073,9 @@ var CloudWatchAlarmProvider = class {
|
|
|
11048
11073
|
...d.Value !== void 0 ? { Value: d.Value } : {}
|
|
11049
11074
|
}));
|
|
11050
11075
|
result["Metrics"] = (alarm.Metrics ?? []).map((m) => m);
|
|
11076
|
+
if (alarm.ExtendedStatistic !== void 0) result["ExtendedStatistic"] = alarm.ExtendedStatistic;
|
|
11077
|
+
if (alarm.EvaluateLowSampleCountPercentile !== void 0) result["EvaluateLowSampleCountPercentile"] = alarm.EvaluateLowSampleCountPercentile;
|
|
11078
|
+
if (alarm.ThresholdMetricId !== void 0) result["ThresholdMetricId"] = alarm.ThresholdMetricId;
|
|
11051
11079
|
if (alarm.AlarmArn) try {
|
|
11052
11080
|
result["Tags"] = normalizeAwsTagsToCfn((await this.cloudWatchClient.send(new ListTagsForResourceCommand$4({ ResourceARN: alarm.AlarmArn }))).Tags);
|
|
11053
11081
|
} catch (err) {
|
|
@@ -51097,7 +51125,7 @@ function reorderArgs(argv) {
|
|
|
51097
51125
|
*/
|
|
51098
51126
|
async function main() {
|
|
51099
51127
|
const program = new Command();
|
|
51100
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
51128
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.171.0");
|
|
51101
51129
|
program.addCommand(createBootstrapCommand());
|
|
51102
51130
|
program.addCommand(createSynthCommand());
|
|
51103
51131
|
program.addCommand(createListCommand());
|