( projects: string[] | undefined, options: VisibleStatsProjectNamesOptions )
| 133 | } |
| 134 | |
| 135 | export function getVisibleStatsProjectNames( |
| 136 | projects: string[] | undefined, |
| 137 | options: VisibleStatsProjectNamesOptions |
| 138 | ): string[] { |
| 139 | if (!Array.isArray(projects)) { |
| 140 | return [options.noProjectLabel]; |
| 141 | } |
| 142 | |
| 143 | const filteredProjects = filterEmptyProjects(projects); |
| 144 | if (filteredProjects.length === 0) { |
| 145 | return [options.noProjectLabel]; |
| 146 | } |
| 147 | |
| 148 | return filteredProjects |
| 149 | .filter((project) => !options.isArchivedProjectReference?.(project)) |
| 150 | .map((project) => options.consolidateProjectName(project)) |
| 151 | .filter((project): project is string => typeof project === "string" && project.length > 0); |
| 152 | } |
| 153 | |
| 154 | interface ProjectDrilldownData { |
| 155 | projectName: string; |
no test coverage detected