@go-to-k/cdkd 0.83.0 → 0.83.1
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 +34 -1
- package/dist/cli.js.map +2 -2
- package/dist/go-to-k-cdkd-0.83.1.tgz +0 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.83.0.tgz +0 -0
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -3833,6 +3833,39 @@ var TemplateParser = class {
|
|
|
3833
3833
|
}
|
|
3834
3834
|
return;
|
|
3835
3835
|
}
|
|
3836
|
+
if ("Fn::Sub" in obj) {
|
|
3837
|
+
const subValue = obj["Fn::Sub"];
|
|
3838
|
+
let body;
|
|
3839
|
+
let mapKeys;
|
|
3840
|
+
if (typeof subValue === "string") {
|
|
3841
|
+
body = subValue;
|
|
3842
|
+
} else if (Array.isArray(subValue) && subValue.length >= 1 && typeof subValue[0] === "string") {
|
|
3843
|
+
body = subValue[0];
|
|
3844
|
+
const variables = subValue[1];
|
|
3845
|
+
if (variables && typeof variables === "object" && !Array.isArray(variables)) {
|
|
3846
|
+
const varMap = variables;
|
|
3847
|
+
mapKeys = new Set(Object.keys(varMap));
|
|
3848
|
+
Object.values(varMap).forEach((v) => this.extractRefsFromValue(v, dependencies));
|
|
3849
|
+
}
|
|
3850
|
+
}
|
|
3851
|
+
if (body !== void 0) {
|
|
3852
|
+
for (const match of body.matchAll(/\$\{([^}]+)\}/g)) {
|
|
3853
|
+
const placeholder = match[1];
|
|
3854
|
+
if (!placeholder)
|
|
3855
|
+
continue;
|
|
3856
|
+
const dot = placeholder.indexOf(".");
|
|
3857
|
+
const name = dot >= 0 ? placeholder.slice(0, dot) : placeholder;
|
|
3858
|
+
if (!name)
|
|
3859
|
+
continue;
|
|
3860
|
+
if (name.startsWith("AWS::"))
|
|
3861
|
+
continue;
|
|
3862
|
+
if (mapKeys?.has(name))
|
|
3863
|
+
continue;
|
|
3864
|
+
dependencies.add(name);
|
|
3865
|
+
}
|
|
3866
|
+
}
|
|
3867
|
+
return;
|
|
3868
|
+
}
|
|
3836
3869
|
Object.values(obj).forEach((v) => this.extractRefsFromValue(v, dependencies));
|
|
3837
3870
|
}
|
|
3838
3871
|
/**
|