import { regEx } from '../../util/regex' ; import { TerragruntDependencyTypes } from './common' ; export const keyValueExtractionRegex = regEx ( /^\s*source\s+=\s+"(?<value>[^"]+)"\s*$/ ) ; export function getTerragruntDependencyType ( value ) { switch ( value ) { case 'terraform' : { return TerragruntDependencyTypes . terragrunt ; } default : { return TerragruntDependencyTypes . unknown ; } } } export function checkFileContainsDependency ( content , checkList ) { return checkList . some ( ( check ) => content . includes ( check ) ) ; }