(file: string, url: string)
| 88 | |
| 89 | // Support URLs relative to a directory, but be careful about a protocol prefix |
| 90 | function supportRelativeURL(file: string, url: string) { |
| 91 | if (!file) return url |
| 92 | const dir = posixDirname(slash(file)) |
| 93 | const match = /^\w+:\/\/[^/]*/.exec(dir) |
| 94 | let protocol = match ? match[0] : '' |
| 95 | const startPath = dir.slice(protocol.length) |
| 96 | if (protocol && /^\/\w:/.test(startPath)) { |
| 97 | // handle file:///C:/ paths |
| 98 | protocol += '/' |
| 99 | return protocol + slash(posixResolve(startPath, url)) |
| 100 | } |
| 101 | return protocol + posixResolve(startPath, url) |
| 102 | } |
| 103 | |
| 104 | function getRunnerSourceMap(position: OriginalMapping): CachedMapEntry | null { |
| 105 | for (const moduleGraph of evaluatedModulesCache) { |
no test coverage detected