@go-to-k/cdkd 0.229.0 → 0.229.2
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.
|
@@ -5597,6 +5597,12 @@ async function applyRoleArnIfSet(opts) {
|
|
|
5597
5597
|
*/
|
|
5598
5598
|
const AWS_NO_VALUE = Symbol("AWS::NoValue");
|
|
5599
5599
|
/**
|
|
5600
|
+
* Resource types whose CloudFormation `Ref` returns the segment AFTER the pipe
|
|
5601
|
+
* in cdkd's compound Cloud Control physical id `<restApiId>|<ref>` (rather than
|
|
5602
|
+
* the whole physical id). See {@link IntrinsicFunctionResolver.resolveRefValue}.
|
|
5603
|
+
*/
|
|
5604
|
+
const REF_RETURNS_SEGMENT_AFTER_PIPE = new Set(["AWS::ApiGateway::Model", "AWS::ApiGateway::RequestValidator"]);
|
|
5605
|
+
/**
|
|
5600
5606
|
* Intrinsic-function keys the resolver knows how to handle.
|
|
5601
5607
|
*
|
|
5602
5608
|
* A CloudFormation intrinsic is ALWAYS a single-key object — `{ "Ref": ... }`
|
|
@@ -5878,8 +5884,9 @@ var IntrinsicFunctionResolver = class {
|
|
|
5878
5884
|
async resolveRef(logicalId, context) {
|
|
5879
5885
|
const resource = context.resources[logicalId];
|
|
5880
5886
|
if (resource) {
|
|
5881
|
-
this.
|
|
5882
|
-
|
|
5887
|
+
const refValue = this.resolveRefValue(resource);
|
|
5888
|
+
this.logger.debug(`Resolved Ref to resource: ${logicalId} -> ${refValue}`);
|
|
5889
|
+
return refValue;
|
|
5883
5890
|
}
|
|
5884
5891
|
if (context.parameters && logicalId in context.parameters) {
|
|
5885
5892
|
const value = context.parameters[logicalId];
|
|
@@ -5896,6 +5903,38 @@ var IntrinsicFunctionResolver = class {
|
|
|
5896
5903
|
throw new Error(`Ref ${logicalId} not found`);
|
|
5897
5904
|
}
|
|
5898
5905
|
/**
|
|
5906
|
+
* Resolve the value a CloudFormation `Ref` returns for a resource.
|
|
5907
|
+
*
|
|
5908
|
+
* For most resource types `Ref` returns the physical id, which is what cdkd
|
|
5909
|
+
* stores. But for a few types CFn's `Ref` returns a sub-component of the
|
|
5910
|
+
* physical id, and returning the raw physical id breaks downstream consumers.
|
|
5911
|
+
*
|
|
5912
|
+
* Two API Gateway child types are provisioned via Cloud Control (no SDK
|
|
5913
|
+
* provider), whose primary identifier — and thus cdkd's physical id — is the
|
|
5914
|
+
* compound `<restApiId>|<ref>`, while CFn's `Ref` returns only the `<ref>`
|
|
5915
|
+
* segment:
|
|
5916
|
+
* - `AWS::ApiGateway::Model` → Ref is the model NAME; physical id is
|
|
5917
|
+
* `<restApiId>|<modelName>`. A method wiring
|
|
5918
|
+
* `RequestModels: { "application/json": { "Ref": <Model> } }` would
|
|
5919
|
+
* otherwise get the compound id and API Gateway rejects it with
|
|
5920
|
+
* "Invalid model identifier specified".
|
|
5921
|
+
* - `AWS::ApiGateway::RequestValidator` → Ref is the RequestValidatorId;
|
|
5922
|
+
* physical id is `<restApiId>|<requestValidatorId>`. A method wiring
|
|
5923
|
+
* `RequestValidatorId: { "Ref": <Validator> }` would otherwise get the
|
|
5924
|
+
* compound id and API Gateway rejects it with
|
|
5925
|
+
* "Invalid Request Validator identifier specified".
|
|
5926
|
+
* In both cases the `Ref` value is the segment after the pipe (RestApiId is
|
|
5927
|
+
* the first identifier component).
|
|
5928
|
+
*/
|
|
5929
|
+
resolveRefValue(resource) {
|
|
5930
|
+
const physicalId = resource.physicalId;
|
|
5931
|
+
if (REF_RETURNS_SEGMENT_AFTER_PIPE.has(resource.resourceType)) {
|
|
5932
|
+
const pipeIdx = physicalId.indexOf("|");
|
|
5933
|
+
if (pipeIdx >= 0) return physicalId.substring(pipeIdx + 1);
|
|
5934
|
+
}
|
|
5935
|
+
return physicalId;
|
|
5936
|
+
}
|
|
5937
|
+
/**
|
|
5899
5938
|
* Resolve Fn::GetAtt intrinsic function
|
|
5900
5939
|
*/
|
|
5901
5940
|
async resolveGetAtt(getAtt, context) {
|
|
@@ -13442,4 +13481,4 @@ var DeployEngine = class {
|
|
|
13442
13481
|
|
|
13443
13482
|
//#endregion
|
|
13444
13483
|
export { findLargeInlineResources as $, shouldRetainResource as A, getDockerImageBySourceHash as B, applyRoleArnIfSet as C, LockManager as D, TemplateParser as E, formatDockerLoginError as F, resolveCaptureObservedState as G, getDefaultStateBucketName as H, getDockerCmd as I, resolveStateBucketWithDefaultAndSource as J, resolveSkipPrefix as K, runDockerForeground as L, stringifyValue as M, WorkGraph as N, S3StateBackend as O, buildDockerImage as P, MIGRATE_TMP_PREFIX as Q, runDockerStreaming as R, IntrinsicFunctionResolver as S, DagBuilder as T, getLegacyStateBucketName as U, Synthesizer as V, resolveApp as W, CFN_TEMPLATE_BODY_LIMIT as X, warnDeprecatedNoPrefixCliFlag as Y, CFN_TEMPLATE_URL_LIMIT as Z, IAMRoleProvider as _, withRetry as a, findActionableSilentDrops as b, computeImplicitDeleteEdges as c, bold as d, uploadCfnTemplate as et, cyan as f, yellow as g, red as h, withResourceDeadline as i, AssetPublisher as j, rebuildClientForBucketRegion as k, extractDeploymentEventError as l, green as m, DEFAULT_RESOURCE_WARN_AFTER_MS as n, clearBucketRegionCache as nt, isRetryableTransientError as o, gray as p, resolveStateBucketWithDefault as q, DeployEngine as r, resolveBucketRegion as rt, IMPLICIT_DELETE_DEPENDENCIES as s, DEFAULT_RESOURCE_TIMEOUT_MS as t, AssemblyReader as tt, formatResourceLine as u, collectInlinePolicyNamesManagedBySiblings as v, DiffCalculator as w, CloudControlProvider as x, ProviderRegistry as y, AssetManifestLoader as z };
|
|
13445
|
-
//# sourceMappingURL=deploy-engine-
|
|
13484
|
+
//# sourceMappingURL=deploy-engine-DGgI1zCL.js.map
|