(filePath: string, input: string)
| 44 | }; |
| 45 | |
| 46 | const mapPath = (filePath: string, input: string): string | undefined => { |
| 47 | for (const [k, v] of Object.entries(mapping!)) { |
| 48 | if (input.startsWith(k) && !isExternal(input)) { |
| 49 | const absoluteFile = path.resolve(v, input.substring(k.length)); |
| 50 | return `./${path.relative(path.dirname(filePath), absoluteFile).replaceAll('\\', '/')}`; |
| 51 | } |
| 52 | } |
| 53 | return undefined; |
| 54 | }; |
| 55 | |
| 56 | return (source: ts.SourceFile | ts.Bundle) => { |
| 57 | const sourceFilePath = ts.isSourceFile(source) ? source.fileName : source.sourceFiles[0].fileName; |
no test coverage detected