( packageManagerInfo: PackageManagerInfo, cacheDependencyPath: string )
| 164 | * @return list of files on which the cache depends |
| 165 | */ |
| 166 | const getCacheDirectoriesFromCacheDependencyPath = async ( |
| 167 | packageManagerInfo: PackageManagerInfo, |
| 168 | cacheDependencyPath: string |
| 169 | ): Promise<string[]> => { |
| 170 | const projectDirectories = |
| 171 | await getProjectDirectoriesFromCacheDependencyPath(cacheDependencyPath); |
| 172 | const cacheFoldersPaths = await Promise.all( |
| 173 | projectDirectories.map(async projectDirectory => { |
| 174 | const cacheFolderPath = |
| 175 | await packageManagerInfo.getCacheFolderPath(projectDirectory); |
| 176 | core.debug( |
| 177 | `${packageManagerInfo.name}'s cache folder "${cacheFolderPath}" configured for the directory "${projectDirectory}"` |
| 178 | ); |
| 179 | return cacheFolderPath; |
| 180 | }) |
| 181 | ); |
| 182 | // uniq in order to do not cache the same directories twice |
| 183 | return cacheFoldersPaths.filter(unique()); |
| 184 | }; |
| 185 | |
| 186 | /** |
| 187 | * Finds the cache directories configured for the repo ignoring cache-dependency-path |
no test coverage detected