| 130 | } |
| 131 | |
| 132 | async function processFile( |
| 133 | file: AnalysisResult, |
| 134 | outDir: string | null, |
| 135 | compiler: HybridCompiler, |
| 136 | options: RunOptions, |
| 137 | chunkContext: ChunkContext, |
| 138 | rootDir: string, |
| 139 | tracer: Tracer, |
| 140 | ) { |
| 141 | const {filePath} = file; |
| 142 | |
| 143 | // Declaration files are program inputs, not compilation outputs, so avoid emitting them. |
| 144 | if (filePath.endsWith('.d.ts')) { |
| 145 | return; |
| 146 | } |
| 147 | |
| 148 | const fileId = tracer.newFileId(filePath); |
| 149 | try { |
| 150 | await emitFile(file, outDir, compiler, options, chunkContext, rootDir, tracer, fileId); |
| 151 | } finally { |
| 152 | tracer.asyncEnd(SpanKind.File, fileId); |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | async function emitFile( |
| 157 | file: AnalysisResult, |