(files: readonly FeedbackCodebaseFile[])
| 193 | } |
| 194 | |
| 195 | function fingerprintFiles(files: readonly FeedbackCodebaseFile[]): string { |
| 196 | const hash = createHash('sha256'); |
| 197 | for (const file of files) { |
| 198 | hash.update(file.path); |
| 199 | hash.update('\0'); |
| 200 | hash.update(String(file.size)); |
| 201 | hash.update('\0'); |
| 202 | hash.update(String(Math.trunc(file.mtimeMs))); |
| 203 | hash.update('\n'); |
| 204 | } |
| 205 | return hash.digest('hex'); |
| 206 | } |
| 207 | |
| 208 | function splitNull(buffer: Buffer): string[] { |
| 209 | return buffer |