Initialize the API and add managed app banners.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
MIRROR="${NPM_REGISTRY:-https://registry.npmmirror.com}"
|
||||
|
||||
echo "==> بیلد لوکال بدون Docker"
|
||||
echo "==> registry: $MIRROR"
|
||||
echo "==> node: $(node -v)"
|
||||
|
||||
npm config set registry "$MIRROR"
|
||||
|
||||
# Prisma postinstall باید اجازه اجرا داشته باشد
|
||||
npm config set ignore-scripts false || true
|
||||
|
||||
if [ ! -d node_modules ]; then
|
||||
echo "==> npm ci..."
|
||||
npm ci --no-audit --no-fund
|
||||
fi
|
||||
|
||||
# اگر اسکریپتهای prisma بلاک شده باشند
|
||||
npx --yes prisma generate
|
||||
|
||||
echo "==> nest/tsc build (با پاک کردن کش)..."
|
||||
rm -rf dist tsconfig.build.tsbuildinfo
|
||||
npx nest build
|
||||
|
||||
if [ ! -f dist/main.js ]; then
|
||||
echo "==> nest build خروجی نداد؛ fallback به tsc..."
|
||||
rm -rf dist tsconfig.build.tsbuildinfo
|
||||
npx tsc -p tsconfig.build.json
|
||||
fi
|
||||
|
||||
if [ ! -f dist/main.js ]; then
|
||||
echo "ERROR: dist/main.js ساخته نشد"
|
||||
ls -la dist || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "==> OK: dist/main.js ($(wc -c < dist/main.js) bytes)"
|
||||
Reference in New Issue
Block a user