/** * Regenerates derivatives that are missing while their Original is intact. * * npm run repair */ import { repairSite } from '../storage/repair.ts'; import { loadCliSite } from './site.ts'; const { dataDir } = await loadCliSite(); const report = await repairSite({ dataDir }); for (const line of report.fixed) console.log(`fixed: ${line}`); for (const line of report.unresolved) console.error(`unresolved: ${line}`); console.log(`${report.fixed.length} file(s) repaired, ${report.unresolved.length} unresolved`); if (report.unresolved.length > 0) process.exitCode = 1;