import { AppDataSource } from '../data-source';
import { seedVisibleVerticalSlice } from './vertical-slice.seed';

async function runSeed(): Promise<void> {
  await AppDataSource.initialize();

  try {
    await seedVisibleVerticalSlice(AppDataSource);
  } finally {
    await AppDataSource.destroy();
  }
}

void runSeed().catch((error: unknown) => {
  console.error('Demo seed failed:', error);
  process.exitCode = 1;
});
