(fileName: string)
| 366 | } |
| 367 | |
| 368 | function isFileNameOutsideOutputDirectory(fileName: string): boolean { |
| 369 | // Use join() to normalize ".." segments, then replace backslashes so the |
| 370 | // string checks below work identically on Windows and POSIX. |
| 371 | const normalized = join(fileName).replaceAll('\\', '/'); |
| 372 | return ( |
| 373 | normalized === '..' || |
| 374 | normalized.startsWith('../') || |
| 375 | normalized === '.' || |
| 376 | isAbsolute(normalized) |
| 377 | ); |
| 378 | } |
| 379 | |
| 380 | function validateOutputBundleFileNames(bundle: OutputBundleWithPlaceholders): void { |
| 381 | for (const [bundleKey, entry] of Object.entries(bundle)) { |
no test coverage detected
searching dependent graphs…