( bazelWorkspaceRoot: string, tsConfigDirs: readonly TsConfigDir[], )
| 338 | } |
| 339 | |
| 340 | function computeSourceMapPathOverrides( |
| 341 | bazelWorkspaceRoot: string, |
| 342 | tsConfigDirs: readonly TsConfigDir[], |
| 343 | ): { [key: string]: string } { |
| 344 | const output: { [key: string]: string } = {}; |
| 345 | |
| 346 | for (const tsConfigDir of tsConfigDirs) { |
| 347 | for (const matchedTarget of tsConfigDir.matchedTargets) { |
| 348 | if (matchedTarget.target.label.name) { |
| 349 | const key = `/${matchedTarget.target.label.name}/*`; |
| 350 | const relativePath = relativePathTo(bazelWorkspaceRoot, tsConfigDir.dir); |
| 351 | const expected = `\${workspaceRoot}/${relativePath}/*`; |
| 352 | |
| 353 | const existing = output[key]; |
| 354 | if (existing && existing !== expected) { |
| 355 | console.error(`Conflicting target name ${matchedTarget.target.label.name}: '${expected}' vs ${existing}`); |
| 356 | } else { |
| 357 | output[key] = expected; |
| 358 | } |
| 359 | } |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | return output; |
| 364 | } |
| 365 | |
| 366 | async function processLaunchJSONFile( |
| 367 | launchJsonFilePath: string | undefined, |
no test coverage detected