(file, target, report)
| 182 | }; |
| 183 | |
| 184 | const install = (file, target, report) => { |
| 185 | const frame = frameFor(report, target); |
| 186 | const key = keyOf(target); |
| 187 | const previous = builders.get(key); |
| 188 | if (report.ok) removedTargets.delete(key); |
| 189 | const status = withoutPayload(frame); |
| 190 | builders.set(key, { |
| 191 | file, |
| 192 | target, |
| 193 | status, |
| 194 | good: report.ok ? frame : previous?.good, |
| 195 | }); |
| 196 | printReport(report, { json: false, file }); |
| 197 | |
| 198 | return { |
| 199 | upsert: |
| 200 | report.ok && frame.payloadHash !== previous?.good?.payloadHash |
| 201 | ? frame |
| 202 | : null, |
| 203 | report: status, |
| 204 | }; |
| 205 | }; |
| 206 | |
| 207 | const rebuildFile = async (file, why) => { |
| 208 | if (!(await exists(file))) { |
no test coverage detected