| 219 | } |
| 220 | |
| 221 | private singleFileIndexOps( |
| 222 | results: RefreshIndexResults, |
| 223 | lastUpdated: PathAndCacheKey[], |
| 224 | filePath: string, |
| 225 | ): [RefreshIndexResults, PathAndCacheKey[]] { |
| 226 | const filterFn = (item: PathAndCacheKey) => item.path === filePath; |
| 227 | const compute = results.compute.filter(filterFn); |
| 228 | const del = results.del.filter(filterFn); |
| 229 | const addTag = results.addTag.filter(filterFn); |
| 230 | const removeTag = results.removeTag.filter(filterFn); |
| 231 | const newResults = { |
| 232 | compute, |
| 233 | del, |
| 234 | addTag, |
| 235 | removeTag, |
| 236 | }; |
| 237 | const newLastUpdated = lastUpdated.filter(filterFn); |
| 238 | return [newResults, newLastUpdated]; |
| 239 | } |
| 240 | |
| 241 | public async refreshFile( |
| 242 | file: string, |