Kind: Class
Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/mega-file-indexer.ts
Mega File Indexer - Handles extremely large files with phased extraction
Methods
| Method | Signature | Returns |
|---|---|---|
detectMegaFile | detectMegaFile(filePath: string) | Promise<MegaFileDetectionResult> |
createIndex | createIndex(filePath: string) | Promise<MegaFileIndex> |
extractAllPhases | extractAllPhases(filePath: string) | Promise<MegaFilePhaseExtractionResult> |
loadSection | loadSection(filePath: string, startLine: number, endLine: number) | Promise<string> |
loadEntity | loadEntity(index: MegaFileIndex, entityName: string) | `Promise<string |
Where it refuses work
MegaFileIndexerstops the work with an early return whenseen.has(key).MegaFileIndexerstops the work with an early return whencallPattern.test(content).MegaFileIndexerstops the work with an early return whenextendsPattern.test(content).MegaFileIndexerstops the work with an early return when!entity.
When something fails
MegaFileIndexerhandles failure in 2 places: it logs it and continues in 1, and turns it into a return value in 1.
Was this page helpful?