@go-to-k/cdkd 0.152.2 → 0.153.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-EtWSTAje.js";
|
|
3
|
-
import { $ as CdkdError, A as shouldRetainResource, B as resolveSkipPrefix, C as IntrinsicFunctionResolver, D as TemplateParser, E as DagBuilder, F as Synthesizer, G as CFN_TEMPLATE_URL_LIMIT, H as resolveStateBucketWithDefaultAndSource, I as getDefaultStateBucketName, J as uploadCfnTemplate, K as MIGRATE_TMP_PREFIX, L as getLegacyStateBucketName, M as stringifyValue, N as WorkGraph, O as LockManager, P as buildDockerImage, R as resolveApp, S as assertRegionMatch, T as DiffCalculator, U as warnDeprecatedNoPrefixCliFlag, V as resolveStateBucketWithDefault, W as CFN_TEMPLATE_BODY_LIMIT, Y as AssemblyReader, Z as resolveBucketRegion, _ as matchesCdkPath, a as withRetry, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as PartialFailureError, d as green, dt as ResourceUpdateNotSupportedError, f as red, ft as RouteDiscoveryError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalStartServiceError, j as AssetPublisher, k as S3StateBackend, l as cyan, lt as ProvisioningError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as LocalInvokeBuildError, o as IMPLICIT_DELETE_DEPENDENCIES, ot as MissingCdkCliError, p as yellow, pt as StackHasActiveImportsError, q as findLargeInlineResources, r as DeployEngine, rt as LocalMigrateError, s as formatResourceLine, st as NestedStackChildDirectDestroyError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ResourceTimeoutError, v as normalizeAwsTagsToCfn, w as applyRoleArnIfSet, x as CloudControlProvider, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveCaptureObservedState } from "./deploy-engine-
|
|
3
|
+
import { $ as CdkdError, A as shouldRetainResource, B as resolveSkipPrefix, C as IntrinsicFunctionResolver, D as TemplateParser, E as DagBuilder, F as Synthesizer, G as CFN_TEMPLATE_URL_LIMIT, H as resolveStateBucketWithDefaultAndSource, I as getDefaultStateBucketName, J as uploadCfnTemplate, K as MIGRATE_TMP_PREFIX, L as getLegacyStateBucketName, M as stringifyValue, N as WorkGraph, O as LockManager, P as buildDockerImage, R as resolveApp, S as assertRegionMatch, T as DiffCalculator, U as warnDeprecatedNoPrefixCliFlag, V as resolveStateBucketWithDefault, W as CFN_TEMPLATE_BODY_LIMIT, Y as AssemblyReader, Z as resolveBucketRegion, _ as matchesCdkPath, a as withRetry, b as ProviderRegistry, bt as withErrorHandling, c as bold, ct as PartialFailureError, d as green, dt as ResourceUpdateNotSupportedError, f as red, ft as RouteDiscoveryError, g as CDK_PATH_TAG, h as collectInlinePolicyNamesManagedBySiblings, i as withResourceDeadline, it as LocalStartServiceError, j as AssetPublisher, k as S3StateBackend, l as cyan, lt as ProvisioningError, m as IAMRoleProvider, mt as StackTerminationProtectionError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as LocalInvokeBuildError, o as IMPLICIT_DELETE_DEPENDENCIES, ot as MissingCdkCliError, p as yellow, pt as StackHasActiveImportsError, q as findLargeInlineResources, r as DeployEngine, rt as LocalMigrateError, s as formatResourceLine, st as NestedStackChildDirectDestroyError, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, ut as ResourceTimeoutError, v as normalizeAwsTagsToCfn, w as applyRoleArnIfSet, x as CloudControlProvider, y as resolveExplicitPhysicalId, yt as normalizeAwsError, z as resolveCaptureObservedState } from "./deploy-engine-9Ct1Z9oH.js";
|
|
4
4
|
import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-BF03Alpe.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { createHash, createHmac, createPublicKey, createVerify, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -58041,7 +58041,7 @@ function reorderArgs(argv) {
|
|
|
58041
58041
|
*/
|
|
58042
58042
|
async function main() {
|
|
58043
58043
|
const program = new Command();
|
|
58044
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
58044
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.153.0");
|
|
58045
58045
|
program.addCommand(createBootstrapCommand());
|
|
58046
58046
|
program.addCommand(createSynthCommand());
|
|
58047
58047
|
program.addCommand(createListCommand());
|
|
@@ -5423,6 +5423,69 @@ async function applyRoleArnIfSet(opts) {
|
|
|
5423
5423
|
* This is used for conditional property omission in CloudFormation templates.
|
|
5424
5424
|
*/
|
|
5425
5425
|
const AWS_NO_VALUE = Symbol("AWS::NoValue");
|
|
5426
|
+
/**
|
|
5427
|
+
* Intrinsic-function keys the resolver knows how to handle.
|
|
5428
|
+
*
|
|
5429
|
+
* A CloudFormation intrinsic is ALWAYS a single-key object — `{ "Ref": ... }`
|
|
5430
|
+
* or `{ "Fn::X": ... }`. When `resolveValue` encounters a single-key object
|
|
5431
|
+
* whose key is `Ref` or starts with `Fn::` but is NOT in this set, it throws
|
|
5432
|
+
* (rather than silently passing the broken value through to the provider).
|
|
5433
|
+
*
|
|
5434
|
+
* `Fn::Transform` (CloudFormation macros) is intentionally treated as handled:
|
|
5435
|
+
* it is expanded server-side at the SYNTHESIS layer (see
|
|
5436
|
+
* `src/synthesis/macro-expander.ts`, routed via `Synthesizer`) BEFORE the
|
|
5437
|
+
* resolver ever runs, so by resolution time it should already be gone. Listing
|
|
5438
|
+
* it here keeps a stray (already-expanded) occurrence from hard-erroring.
|
|
5439
|
+
*/
|
|
5440
|
+
const HANDLED_INTRINSIC_KEYS = new Set([
|
|
5441
|
+
"Ref",
|
|
5442
|
+
"Fn::GetAtt",
|
|
5443
|
+
"Fn::Join",
|
|
5444
|
+
"Fn::Sub",
|
|
5445
|
+
"Fn::Select",
|
|
5446
|
+
"Fn::Split",
|
|
5447
|
+
"Fn::If",
|
|
5448
|
+
"Fn::Equals",
|
|
5449
|
+
"Fn::And",
|
|
5450
|
+
"Fn::Or",
|
|
5451
|
+
"Fn::Not",
|
|
5452
|
+
"Fn::ImportValue",
|
|
5453
|
+
"Fn::GetStackOutput",
|
|
5454
|
+
"Fn::FindInMap",
|
|
5455
|
+
"Fn::Base64",
|
|
5456
|
+
"Fn::GetAZs",
|
|
5457
|
+
"Fn::Cidr",
|
|
5458
|
+
"Fn::Transform"
|
|
5459
|
+
]);
|
|
5460
|
+
/**
|
|
5461
|
+
* Detect an unresolved / unknown CloudFormation intrinsic function.
|
|
5462
|
+
*
|
|
5463
|
+
* A CloudFormation intrinsic is ALWAYS a single-key object whose key is `Ref`
|
|
5464
|
+
* or starts with `Fn::`. Requiring EXACTLY ONE key avoids false positives on a
|
|
5465
|
+
* real resource property that happens to be literally named `Ref` or
|
|
5466
|
+
* `Fn::Something` (those would be multi-key objects, or sit alongside sibling
|
|
5467
|
+
* keys), so only a genuine lone intrinsic node is flagged.
|
|
5468
|
+
*
|
|
5469
|
+
* @returns the unknown intrinsic key (e.g. `Fn::ToJsonString`) or `undefined`
|
|
5470
|
+
* when the object is not an unknown single-key intrinsic.
|
|
5471
|
+
*/
|
|
5472
|
+
function detectUnknownIntrinsicKey(obj) {
|
|
5473
|
+
const keys = Object.keys(obj);
|
|
5474
|
+
if (keys.length !== 1) return;
|
|
5475
|
+
const key = keys[0];
|
|
5476
|
+
if (key !== "Ref" && !key.startsWith("Fn::")) return;
|
|
5477
|
+
if (HANDLED_INTRINSIC_KEYS.has(key)) return;
|
|
5478
|
+
return key;
|
|
5479
|
+
}
|
|
5480
|
+
/**
|
|
5481
|
+
* Build a clear, English error message for an unsupported intrinsic, including
|
|
5482
|
+
* a one-click pre-filled GitHub issue link so users can request support.
|
|
5483
|
+
*/
|
|
5484
|
+
function buildUnknownIntrinsicError(key) {
|
|
5485
|
+
const title = `Support intrinsic ${key}`;
|
|
5486
|
+
const issueUrl = `https://github.com/go-to-k/cdkd/issues/new?title=${encodeURIComponent(title)}&labels=intrinsic-support`;
|
|
5487
|
+
return /* @__PURE__ */ new Error(`Unsupported CloudFormation intrinsic function "${key}": cdkd does not support resolving it yet. Deploying this template would produce a broken value. Please request support by opening an issue: ${issueUrl}`);
|
|
5488
|
+
}
|
|
5426
5489
|
let cachedAccountInfo = null;
|
|
5427
5490
|
/**
|
|
5428
5491
|
* Cache for availability zones per region
|
|
@@ -5588,6 +5651,8 @@ var IntrinsicFunctionResolver = class {
|
|
|
5588
5651
|
if ("Fn::Base64" in obj) return await this.resolveBase64(obj["Fn::Base64"], context);
|
|
5589
5652
|
if ("Fn::GetAZs" in obj) return await this.resolveGetAZs(obj["Fn::GetAZs"], context);
|
|
5590
5653
|
if ("Fn::Cidr" in obj) return await this.resolveCidr(obj["Fn::Cidr"], context);
|
|
5654
|
+
const unknownIntrinsicKey = detectUnknownIntrinsicKey(obj);
|
|
5655
|
+
if (unknownIntrinsicKey !== void 0) throw buildUnknownIntrinsicError(unknownIntrinsicKey);
|
|
5591
5656
|
const resolved = {};
|
|
5592
5657
|
for (const [key, val] of Object.entries(obj)) {
|
|
5593
5658
|
const resolvedVal = await this.resolveValue(val, context);
|
|
@@ -10000,4 +10065,4 @@ var DeployEngine = class {
|
|
|
10000
10065
|
|
|
10001
10066
|
//#endregion
|
|
10002
10067
|
export { CdkdError as $, shouldRetainResource as A, resolveSkipPrefix as B, IntrinsicFunctionResolver as C, TemplateParser as D, DagBuilder as E, Synthesizer as F, CFN_TEMPLATE_URL_LIMIT as G, resolveStateBucketWithDefaultAndSource as H, getDefaultStateBucketName as I, uploadCfnTemplate as J, MIGRATE_TMP_PREFIX as K, getLegacyStateBucketName as L, stringifyValue as M, WorkGraph as N, LockManager as O, buildDockerImage as P, AssetError as Q, resolveApp as R, assertRegionMatch as S, DiffCalculator as T, warnDeprecatedNoPrefixCliFlag as U, resolveStateBucketWithDefault as V, CFN_TEMPLATE_BODY_LIMIT as W, clearBucketRegionCache as X, AssemblyReader as Y, resolveBucketRegion as Z, matchesCdkPath as _, formatError as _t, withRetry as a, LockError as at, ProviderRegistry as b, withErrorHandling as bt, bold as c, PartialFailureError as ct, green as d, ResourceUpdateNotSupportedError as dt, ConfigError as et, red as f, RouteDiscoveryError as ft, CDK_PATH_TAG as g, SynthesisError as gt, collectInlinePolicyNamesManagedBySiblings as h, StateError as ht, withResourceDeadline as i, LocalStartServiceError as it, AssetPublisher as j, S3StateBackend as k, cyan as l, ProvisioningError as lt, IAMRoleProvider as m, StackTerminationProtectionError as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, LocalInvokeBuildError as nt, IMPLICIT_DELETE_DEPENDENCIES as o, MissingCdkCliError as ot, yellow as p, StackHasActiveImportsError as pt, findLargeInlineResources as q, DeployEngine as r, LocalMigrateError as rt, formatResourceLine as s, NestedStackChildDirectDestroyError as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, DependencyError as tt, gray as u, ResourceTimeoutError as ut, normalizeAwsTagsToCfn as v, isCdkdError as vt, applyRoleArnIfSet as w, CloudControlProvider as x, resolveExplicitPhysicalId as y, normalizeAwsError as yt, resolveCaptureObservedState as z };
|
|
10003
|
-
//# sourceMappingURL=deploy-engine-
|
|
10068
|
+
//# sourceMappingURL=deploy-engine-9Ct1Z9oH.js.map
|