(baseURL, data)
| 323 | // src in a html document). |
| 324 | // If the sources are absolute paths, the sources are converted to absolute file URLs. |
| 325 | function sourcesToAbsolute(baseURL, data) { |
| 326 | data.sources = data.sources.map((source) => { |
| 327 | source = (data.sourceRoot || '') + source; |
| 328 | if (isAbsolute(source)) { |
| 329 | return pathToFileURL(source).href; |
| 330 | } |
| 331 | return new URL(source, baseURL).href; |
| 332 | }); |
| 333 | // The sources array is now resolved to absolute URLs, sourceRoot should |
| 334 | // be updated to noop. |
| 335 | data.sourceRoot = ''; |
| 336 | return data; |
| 337 | } |
| 338 | |
| 339 | // WARNING: The `sourceMapCacheToObject` runs during shutdown. In particular, |
| 340 | // it also runs when Workers are terminated, making it important that it does |
no test coverage detected
searching dependent graphs…