@znemz/cfn-include 2.1.0 → 2.1.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/index.js +8 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -236,7 +236,10 @@ async function recurse({ base, scope, cft, ...opts }) {
|
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
|
-
if (cft['Fn::Eval']
|
|
239
|
+
if (cft['Fn::Eval']) {
|
|
240
|
+
if (!opts.doEval) {
|
|
241
|
+
return Promise.reject(new Error('Fn::Eval is not allowed doEval is falsy'));
|
|
242
|
+
}
|
|
240
243
|
return recurse({ base, scope, cft: cft['Fn::Eval'], ...opts }).then(function (json) {
|
|
241
244
|
// **WARNING** you have now enabled god mode
|
|
242
245
|
// eslint-disable-next-line no-unused-vars, prefer-const
|
|
@@ -391,7 +394,10 @@ async function recurse({ base, scope, cft, ...opts }) {
|
|
|
391
394
|
return isString ? seq.map((i) => String.fromCharCode(i)) : seq;
|
|
392
395
|
}
|
|
393
396
|
|
|
394
|
-
if (cft['Fn::IfEval']
|
|
397
|
+
if (cft['Fn::IfEval']) {
|
|
398
|
+
if (!opts.doEval) {
|
|
399
|
+
return Promise.reject(new Error('Fn::IfEval is not allowed doEval is falsy'));
|
|
400
|
+
}
|
|
395
401
|
return recurse({ base, scope, cft: cft['Fn::IfEval'], ...opts }).then(function (json) {
|
|
396
402
|
// eslint-disable-next-line prefer-const
|
|
397
403
|
let { truthy, falsy, evalCond, inject, doLog } = json;
|