| 124 | const report = JSON.parse(readFileSync(sidecar, 'utf8').trim().split('\n').pop()); |
| 125 | |
| 126 | const pick = (path) => { |
| 127 | const f = report.files.find((x) => x.path === path); |
| 128 | if (!f) return null; |
| 129 | return { |
| 130 | path, rank: f.rank, score: f.score, graph: f.graphScore, hits: f.termHits, |
| 131 | penalty: f.penalty, generated: f.generated, render: f.render, |
| 132 | named: f.named, entry: f.entry, central: f.central, |
| 133 | allocatedShare: f.allocatedShare, share: f.share, |
| 134 | emitted: f.emittedChars, final: f.finalChars, skipped: f.skipped, |
| 135 | }; |
| 136 | }; |
| 137 | const declPaths = new Set([GENERATED_DECL, HANDWRITTEN_DECL]); |
| 138 | const totalSource = report.files.reduce((a, f) => a + f.finalChars, 0); |
| 139 | const declSource = report.files |