Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
options: async () => {
let types: string[] = []
let procfile = path.join(process.cwd(), 'Procfile')
try {
let buff = await deps.file.readFile(procfile)
types = buff
.toString()
.split('\n')
.map(s => {
if (!s) return false
let m = s.match(/^([A-Za-z0-9_-]+)/)
return m ? m[0] : false
})
.filter(t => t) as string[]
} catch (err) {
if (err.code !== 'ENOENT') throw err
}
return types
},
}
options: async () => {
let files = await deps.file.readdir(process.cwd())
return files
},
}