@go-to-k/cdkd 0.231.2 → 0.231.4
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.
|
@@ -6553,14 +6553,41 @@ const REF_RETURNS_SEGMENT_BEFORE_FIRST_PIPE = new Set([
|
|
|
6553
6553
|
*/
|
|
6554
6554
|
const REF_RETURNS_NAME_FROM_ARN = new Map([["AWS::Events::Rule", ":rule/"], ["AWS::CloudTrail::Trail", ":trail/"]]);
|
|
6555
6555
|
/**
|
|
6556
|
+
* Build a {@link RefStateLookup} from a resource's stored state maps, checking
|
|
6557
|
+
* `properties` first (the template value CFn `Ref` mirrors) then `attributes`.
|
|
6558
|
+
* Only non-empty string values qualify — an intrinsic-shaped or empty value is
|
|
6559
|
+
* skipped so the caller falls back to the raw physical id rather than emitting
|
|
6560
|
+
* a broken `[object Object]` / `''`.
|
|
6561
|
+
*/
|
|
6562
|
+
function refStateLookupFromResource(resource) {
|
|
6563
|
+
return (keys) => {
|
|
6564
|
+
for (const source of [resource.properties, resource.attributes]) {
|
|
6565
|
+
if (!source) continue;
|
|
6566
|
+
for (const key of keys) {
|
|
6567
|
+
const value = source[key];
|
|
6568
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
6569
|
+
}
|
|
6570
|
+
}
|
|
6571
|
+
};
|
|
6572
|
+
}
|
|
6573
|
+
/**
|
|
6556
6574
|
* Resolve the value CloudFormation's `Ref` returns for a resource, given its
|
|
6557
6575
|
* type and cdkd-stored physical id. Pure function shared by the deploy-time
|
|
6558
6576
|
* resolver ({@link IntrinsicFunctionResolver.resolveRefValue}) and the
|
|
6559
6577
|
* `cdkd orphan` rewriter's `{Ref: <orphan>}` substitution, so both derive
|
|
6560
6578
|
* identical CFn `Ref` semantics (after-pipe / before-first-pipe compound-id
|
|
6561
6579
|
* extraction and name-from-ARN extraction included).
|
|
6580
|
+
*
|
|
6581
|
+
* `stateLookup` (optional) recovers a `Ref` value that the physical id cannot
|
|
6582
|
+
* yield — the `AWS::S3Tables::Table` CC-routed case, whose bare TableARN ends
|
|
6583
|
+
* in a UUID (not the table name CFn `Ref` returns), so the name is read from
|
|
6584
|
+
* the stored `TableName` property/attribute instead (issue #974).
|
|
6562
6585
|
*/
|
|
6563
|
-
function cfnRefValueFromPhysicalId(resourceType, physicalId) {
|
|
6586
|
+
function cfnRefValueFromPhysicalId(resourceType, physicalId, stateLookup) {
|
|
6587
|
+
if (resourceType === "AWS::S3Tables::Table" && !physicalId.includes("|") && stateLookup) {
|
|
6588
|
+
const tableName = stateLookup(["TableName", "Name"]);
|
|
6589
|
+
if (tableName) return tableName;
|
|
6590
|
+
}
|
|
6564
6591
|
if (resourceType === "AWS::WAFv2::WebACL" && physicalId.startsWith("arn:")) {
|
|
6565
6592
|
const { id, name, scope } = parseWebACLArn(physicalId);
|
|
6566
6593
|
if (name && id) return `${name}|${id}|${scope}`;
|
|
@@ -6927,9 +6954,16 @@ var IntrinsicFunctionResolver = class {
|
|
|
6927
6954
|
* calling `events:*` APIs by name or composing the name into another string
|
|
6928
6955
|
* would otherwise get the full ARN) and `AWS::CloudTrail::Trail` (`Ref` is
|
|
6929
6956
|
* the trail name). The name is extracted from the stored ARN.
|
|
6957
|
+
*
|
|
6958
|
+
* `AWS::S3Tables::Table` is a hybrid: on the SDK path its compound physical
|
|
6959
|
+
* id yields the table name via the after-pipe extraction, but a #614-routed
|
|
6960
|
+
* (Cloud Control) Table stores only the bare TableARN (which ends in a UUID,
|
|
6961
|
+
* not the name), so the resolver passes the resource's stored `properties` /
|
|
6962
|
+
* `attributes` as a `stateLookup` and `cfnRefValueFromPhysicalId` recovers
|
|
6963
|
+
* the name from the `TableName` property (issue #974).
|
|
6930
6964
|
*/
|
|
6931
6965
|
resolveRefValue(resource) {
|
|
6932
|
-
return cfnRefValueFromPhysicalId(resource.resourceType, resource.physicalId);
|
|
6966
|
+
return cfnRefValueFromPhysicalId(resource.resourceType, resource.physicalId, refStateLookupFromResource(resource));
|
|
6933
6967
|
}
|
|
6934
6968
|
/**
|
|
6935
6969
|
* Resolve Fn::GetAtt intrinsic function
|
|
@@ -14859,5 +14893,5 @@ var DeployEngine = class {
|
|
|
14859
14893
|
};
|
|
14860
14894
|
|
|
14861
14895
|
//#endregion
|
|
14862
|
-
export {
|
|
14863
|
-
//# sourceMappingURL=deploy-engine-
|
|
14896
|
+
export { resolveSkipPrefix as $, DiffCalculator as A, buildDockerImage as B, findActionableSilentDrops as C, refStateLookupFromResource as D, cfnRefValueFromPhysicalId as E, rebuildClientForBucketRegion as F, AssetManifestLoader as G, getDockerCmd as H, shouldRetainResource as I, synthesisStatusMessage as J, getDockerImageBySourceHash as K, AssetPublisher as L, TemplateParser as M, LockManager as N, WAFv2WebACLProvider as O, S3StateBackend as P, resolveCaptureObservedState as Q, stringifyValue as R, ProviderRegistry as S, IntrinsicFunctionResolver as T, runDockerForeground as U, formatDockerLoginError as V, runDockerStreaming as W, getLegacyStateBucketName as X, getDefaultStateBucketName as Y, resolveApp as Z, green as _, withRetry as a, MIGRATE_TMP_PREFIX as at, IAMRoleProvider as b, computeImplicitDeleteEdges as c, AssemblyReader as ct, isStatefulRecreateTargetSync as d, resolveStateBucketWithDefault as et, renderStatefulReason as f, gray as g, cyan as h, withResourceDeadline as i, CFN_TEMPLATE_URL_LIMIT as it, DagBuilder as j, applyRoleArnIfSet as k, extractDeploymentEventError as l, clearBucketRegionCache as lt, bold as m, DEFAULT_RESOURCE_WARN_AFTER_MS as n, warnDeprecatedNoPrefixCliFlag as nt, isRetryableTransientError as o, findLargeInlineResources as ot, formatResourceLine as p, Synthesizer as q, DeployEngine as r, CFN_TEMPLATE_BODY_LIMIT as rt, IMPLICIT_DELETE_DEPENDENCIES as s, uploadCfnTemplate as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, resolveStateBucketWithDefaultAndSource as tt, MULTI_REGION_RECREATE_BLOCKED_TYPES as u, resolveBucketRegion as ut, red as v, CloudControlProvider as w, collectInlinePolicyNamesManagedBySiblings as x, yellow as y, WorkGraph as z };
|
|
14897
|
+
//# sourceMappingURL=deploy-engine-BVFck5_P.js.map
|