(base: string, potential: string)
| 262 | |
| 263 | function findProjectByPath(workspace: AngularWorkspace, location: string): string | null { |
| 264 | const isInside = (base: string, potential: string): boolean => { |
| 265 | const absoluteBase = path.resolve(workspace.basePath, base); |
| 266 | const absolutePotential = path.resolve(workspace.basePath, potential); |
| 267 | const relativePotential = path.relative(absoluteBase, absolutePotential); |
| 268 | if (!relativePotential.startsWith('..') && !path.isAbsolute(relativePotential)) { |
| 269 | return true; |
| 270 | } |
| 271 | |
| 272 | return false; |
| 273 | }; |
| 274 | |
| 275 | const projects = Array.from(workspace.projects) |
| 276 | .map(([name, project]) => [project.root, name] as [string, string]) |
no test coverage detected