Merge branch 'develop'

This commit is contained in:
parsa aghaei committed 2026-07-27 20:00:26 +03:30
commit 9fdb652570
3 files changed
+10 -6

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
export async function main() {
console.log('Seeding Home Page Components...');
// 1. Seed Hero Banners
+1 -1
View File
@@ -151,7 +151,7 @@ const PRODUCT_TAGLINES_MAP: Record<string, string> = {
'canina-novagard-green-pfotenpflege': "مومیایی محافظ پنجه‌ها برای التیام خشکی، قرمزی و ترک خوردگی پنجه‌ها در برف و سرما"
};
async function main() {
export async function main() {
console.log('Seeding products from seed-products-data.json...');
// 2. Read JSON data
+8 -4
View File
@@ -296,8 +296,10 @@ async function main() {
// 3. Seed Products & Categories
console.log('Seeding Products & Categories...');
try {
const { execSync } = require('child_process');
execSync('npx ts-node prisma/seed-products.ts', { stdio: 'inherit' });
const seedProducts = require('./seed-products');
if (seedProducts && typeof seedProducts.main === 'function') {
await seedProducts.main();
}
} catch (err) {
console.error('Failed to seed products:', err);
}
@@ -305,8 +307,10 @@ async function main() {
// 4. Seed Home Components & Testimonials
console.log('Seeding Home Components...');
try {
const { execSync } = require('child_process');
execSync('npx ts-node prisma/seed-home.ts', { stdio: 'inherit' });
const seedHome = require('./seed-home');
if (seedHome && typeof seedHome.main === 'function') {
await seedHome.main();
}
} catch (err) {
console.error('Failed to seed home components:', err);
}