import { exec } from 'child_process';
import util from 'util';

const execPromise = util.promisify(exec);

async function runSeed() {
  try {
    await execPromise('npx ts-node prisma/seed.ts');
    console.log('Seeding completed successfully.');
  } catch (error) {
    console.error('Error executing the seed script:', error);
    process.exit(1);
  }
}

runSeed();