* Returns the hash of the file with the given name within the source root, or * if the name refers to a file generated by a data loader, the hash of the * corresponding data loader source and its modification time. The latter * ensures that if the data loader is “touched” (even without chan
(name: string)
| 290 | * contents) that the data loader will be re-run. |
| 291 | */ |
| 292 | getSourceFileHash(name: string): string { |
| 293 | const path = this.getSourceFilePath(name); |
| 294 | const info = getFileInfo(this.root, path); |
| 295 | if (!info) return createHash("sha256").digest("hex"); |
| 296 | const {hash} = info; |
| 297 | return path === name ? hash : createHash("sha256").update(hash).update(String(info.mtimeMs)).digest("hex"); |
| 298 | } |
| 299 | |
| 300 | getOutputFileHash(name: string): string { |
| 301 | const info = this.getOutputInfo(name); |
no test coverage detected