Tracks the app that was already in place (capture, treatment, outreach, WhatsApp integration, server, frontend, tests, docs) so future feature work can branch and use isolated worktrees.
19 lines
666 B
JavaScript
19 lines
666 B
JavaScript
import { loadDotEnv, paths } from '../src/env.mjs';
|
|
import { downloadRfbDataset } from '../src/extract/rfb-downloader.mjs';
|
|
|
|
await loadDotEnv();
|
|
|
|
downloadRfbDataset({
|
|
rawDir: paths.rfbRaw,
|
|
onProgress: (progress) => {
|
|
const pct = progress.pct == null ? '' : `${progress.pct}% `;
|
|
console.log(`[RFB] ${pct}${progress.message}`);
|
|
}
|
|
}).then((result) => {
|
|
if (result.cancelled) process.exitCode = 2;
|
|
else console.log(`[RFB] snapshot ${result.snapshot} pronto: ${result.downloaded.length} baixados, ${result.skipped.length} reutilizados.`);
|
|
}).catch((error) => {
|
|
console.error(`[RFB] erro: ${error.stack || error.message}`);
|
|
process.exitCode = 1;
|
|
});
|