import { initDatabase } from '../models/index.js';
import { logger } from '../utils/logger.js';
import { XiaohongshuAccountOverviewImportService } from '../services/XiaohongshuAccountOverviewImportService.js';

async function main() {
  try {
    await initDatabase();
    logger.info('[XHS Import] Manual run start...');
    const svc = new XiaohongshuAccountOverviewImportService();
    await svc.runDailyImportForAllXhsAccounts();
    logger.info('[XHS Import] Manual run done.');
    process.exit(0);
  } catch (e) {
    logger.error('[XHS Import] Manual run failed:', e);
    process.exit(1);
  }
}

void main();

