Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rules.push(...
parseFile(redirectParser.parseTomlFormat, 'generated netlify.toml', fs.readFileSync(generatedTOMLPath, 'utf-8'))
)
}
const baseTOMLPath = path.resolve(projectDir, 'netlify.toml')
if (fs.existsSync(baseTOMLPath)) {
rules.push(...
parseFile(redirectParser.parseTomlFormat, 'base netlify.toml', fs.readFileSync(baseTOMLPath, 'utf-8'))
)
}
const generatedYAMLPath = path.resolve(projectDir, 'netlify.yml')
if (fs.existsSync(generatedYAMLPath)) {
rules.push(...
parseFile(redirectParser.parseYamlFormat, 'generated netlify.yml', fs.readFileSync(generatedYAMLPath, 'utf-8'))
)
}
const baseYAMLPath = path.resolve(projectDir, 'netlify.yml')
if (fs.existsSync(baseYAMLPath)) {
rules.push(...
parseFile(redirectParser.parseYamlFormat, 'base netlify.yml', fs.readFileSync(baseYAMLPath, 'utf-8'))
)
}
return rules
}