feat: optimize event capturing and playback accuracy

This commit is contained in:
2026-02-15 18:06:50 +01:00
parent e615d88fd8
commit a136e7b4a7
38 changed files with 2847 additions and 523 deletions

View File

@@ -9,7 +9,7 @@ if [ -z "$ENV" ]; then
exit 1
fi
PRJ_ID=$(jq -r .name package.json | sed 's/@mintel\///' | sed 's/\.com$//' | sed 's/-nextjs$//')
PRJ_ID=$(jq -r .name package.json | sed 's/@mintel\///' | sed 's/\.com$//' | sed 's/-nextjs$//' | sed 's/-cables$//')
case $ENV in
local)
@@ -26,8 +26,8 @@ case $ENV in
testing) PROJECT_NAME="${PRJ_ID}-testing" ;;
staging) PROJECT_NAME="${PRJ_ID}-staging" ;;
production)
PROJECT_NAME="${PRJ_ID}-prod"
OLD_PROJECT_NAME="${PRJ_ID}com" # Fallback for legacy naming
PROJECT_NAME="${PRJ_ID}-production"
OLD_PROJECT_NAME="${PRJ_ID}-prod" # Fallback for previous convention
;;
esac

View File

@@ -5,7 +5,7 @@ REMOTE_HOST="root@alpha.mintel.me"
REMOTE_DIR="/home/deploy/sites/klz-cables.com"
# DB Details (matching docker-compose defaults)
DB_USER="directus"
DB_USER="klz_db_user"
DB_NAME="directus"
ACTION=$1
@@ -49,9 +49,9 @@ esac
# Detect local container
echo "🔍 Detecting local database..."
# Use a more robust way to find the container if multiple projects exist locally
LOCAL_DB_CONTAINER=$(docker compose ps -q directus-db)
LOCAL_DB_CONTAINER=$(docker compose ps -q klz-directus-db)
if [ -z "$LOCAL_DB_CONTAINER" ]; then
echo "❌ Local directus-db container not found. Is it running? (npm run dev)"
echo "❌ Local klz-directus-db container not found. Is it running? (npm run dev)"
exit 1
fi