(...patterns: string[])
| 192 | } |
| 193 | |
| 194 | public hashFiles(...patterns: string[]): string { |
| 195 | const cwd = this.defaultWorkingDirectory; |
| 196 | const workspacePath = path.resolve(cwd); |
| 197 | |
| 198 | // Use glob to find matching files across all patterns |
| 199 | const filePaths = fg.sync(patterns, { |
| 200 | cwd, |
| 201 | absolute: true, |
| 202 | onlyFiles: true, |
| 203 | }); |
| 204 | |
| 205 | if (filePaths.length === 0) { |
| 206 | return ''; |
| 207 | } |
| 208 | |
| 209 | const validFilePaths = filePaths.filter(file => file.startsWith(`${workspacePath}${path.sep}`)); |
| 210 | |
| 211 | if (validFilePaths.length === 0) { |
| 212 | return ''; |
| 213 | } |
| 214 | |
| 215 | return hashFiles(validFilePaths); |
| 216 | } |
| 217 | |
| 218 | public serialize(): SerializedBuildStepGlobalContext { |
| 219 | return { |
no test coverage detected