Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function buildTemplate (level: number, supportRecursive: boolean, restart = false) {
const miniComponents = createMiniComponents(internalComponents, Adapter.type === BUILD_TYPES.ALIPAY)
const components = Object.keys(miniComponents).filter(c => componentConfig.includes.size ? componentConfig.includes.has(c) : true)
let template = ''
for (const nodeName of components) {
const attributes: Attributes = miniComponents[nodeName]
template += buildComponentTemplate({ nodeName, attributes }, level, supportRecursive)
}
template += buildPlainTextTemplate(level)
template += buildThirdPartyTemplate(level, supportRecursive)
template += buildContainerTemplate(level, restart)
return template
}