import { PrismaClient } from '@prisma/client';
import { resolveSeedMode, runSeed } from './run-seed';

const prisma = new PrismaClient();
const mode = resolveSeedMode();

runSeed(prisma, { mode })
  .catch((err) => {
    console.error(err);
    process.exit(1);
  })
  .finally(() => prisma.$disconnect());
