The FileRecord for a fresh-index store (nodeCount is the PRE-filter count).
(
filePath: string,
content: string,
language: Language,
stats: fs.Stats,
nodeCount: number,
resultErrors: ExtractionResult['errors']
)
| 2411 | */ |
| 2412 | /** The FileRecord for a fresh-index store (nodeCount is the PRE-filter count). */ |
| 2413 | private buildFileRecord( |
| 2414 | filePath: string, |
| 2415 | content: string, |
| 2416 | language: Language, |
| 2417 | stats: fs.Stats, |
| 2418 | nodeCount: number, |
| 2419 | resultErrors: ExtractionResult['errors'] |
| 2420 | ): FileRecord { |
| 2421 | return { |
| 2422 | path: filePath, |
| 2423 | contentHash: hashContent(content), |
| 2424 | language, |
| 2425 | size: stats.size, |
| 2426 | modifiedAt: stats.mtimeMs, |
| 2427 | indexedAt: Date.now(), |
| 2428 | nodeCount, |
| 2429 | errors: resultErrors.length > 0 ? resultErrors : undefined, |
| 2430 | }; |
| 2431 | } |
| 2432 | |
| 2433 | private buildFreshStoreBundle( |
| 2434 | filePath: string, |
no test coverage detected