29 lines
1.1 KiB
PowerShell
29 lines
1.1 KiB
PowerShell
# اسکریپت کپی کردن Prisma generated files برای deployment
|
|
|
|
Write-Host "Copying Prisma generated files..." -ForegroundColor Cyan
|
|
|
|
# ساخت پوشه
|
|
New-Item -ItemType Directory -Force -Path "prisma/generated" | Out-Null
|
|
|
|
# بررسی وجود فایلها
|
|
if (-not (Test-Path "node_modules/.prisma/client")) {
|
|
Write-Host "Error: Prisma client not found!" -ForegroundColor Red
|
|
Write-Host "Please run: npm install && npx prisma generate" -ForegroundColor Yellow
|
|
exit 1
|
|
}
|
|
|
|
# کپی کردن
|
|
Write-Host "Copying .prisma/client..." -ForegroundColor Green
|
|
Copy-Item -Recurse -Force "node_modules/.prisma/client" "prisma/generated/.prisma-client"
|
|
|
|
Write-Host "Copying @prisma/client..." -ForegroundColor Green
|
|
Copy-Item -Recurse -Force "node_modules/@prisma/client" "prisma/generated/@prisma-client"
|
|
|
|
Write-Host ""
|
|
Write-Host "✓ Files copied successfully!" -ForegroundColor Green
|
|
Write-Host ""
|
|
Write-Host "Now commit and push:" -ForegroundColor Cyan
|
|
Write-Host "git add prisma/generated"
|
|
Write-Host "git commit -m 'Add pre-generated Prisma client'"
|
|
Write-Host "git push"
|