(candidate: string)
| 70 | function resolveAbsoluteChunkPath(rootPath: string, chunk: IndexedChunk): string | null { |
| 71 | const resolvedRoot = path.resolve(rootPath); |
| 72 | const isWithinRoot = (candidate: string): boolean => { |
| 73 | const resolvedCandidate = path.resolve(candidate); |
| 74 | const relative = path.relative(resolvedRoot, resolvedCandidate); |
| 75 | return Boolean(relative) && !relative.startsWith('..') && !path.isAbsolute(relative); |
| 76 | }; |
| 77 | |
| 78 | if (typeof chunk.filePath === 'string' && chunk.filePath.trim()) { |
| 79 | const raw = chunk.filePath.trim(); |
no outgoing calls
no test coverage detected