chore: comprehensive commit of all debugging, infrastructure, and extension fixes
All checks were successful
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 6s
Monorepo Pipeline / 🧪 Test (push) Successful in 56s
Monorepo Pipeline / 🧹 Lint (push) Successful in 2m22s
Monorepo Pipeline / 🏗️ Build (push) Successful in 3m51s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Directus (Base) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
All checks were successful
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 6s
Monorepo Pipeline / 🧪 Test (push) Successful in 56s
Monorepo Pipeline / 🧹 Lint (push) Successful in 2m22s
Monorepo Pipeline / 🏗️ Build (push) Successful in 3m51s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Directus (Base) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped
Summary of changes: - Corrected Directus extensions to use 'vue-router' for 'useRouter' instead of '@directus/extensions-sdk' (Fixed runtime crash). - Standardized extension folder structure and moved built extensions to the root 'directus/extensions' directory. - Updated 'scripts/sync-extensions.sh' and 'scripts/validate-extensions.sh' for better extension management. - Added 'scripts/validate-sdk-imports.sh' as a safeguard against future invalid SDK imports. - Integrated import validation into the '.husky/pre-push' hook. - Standardized Docker restart policies and network configurations in 'cms-infra/docker-compose.yml'. - Updated tracked 'data.db' with the correct 'module_bar' settings to ensure extension visibility. - Cleaned up legacy files and consolidated extension package source code. This commit captures the full state of the repository after resolving the 'missing extensions' issue.
This commit is contained in:
46
scripts/verify-extensions-live.sh
Executable file
46
scripts/verify-extensions-live.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
HOST="http://cms.localhost"
|
||||
EXTENSIONS=("customer-manager" "people-manager" "company-manager" "feedback-commander" "unified-dashboard")
|
||||
|
||||
echo "🔍 Verifying extensions at $HOST..."
|
||||
|
||||
# 1. Check Main Manifest
|
||||
MANIFEST=$(curl -s "$HOST/extensions/sources/index.js")
|
||||
|
||||
if [ -z "$MANIFEST" ]; then
|
||||
echo "❌ Error: Manifest returned empty response."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ Manifest loaded (${#MANIFEST} bytes)."
|
||||
|
||||
# 2. Check for unexpected 404/500
|
||||
if echo "$MANIFEST" | grep -q "<!DOCTYPE html>"; then
|
||||
echo "❌ Error: Manifest returned HTML (likely 404 or error page) instead of JS."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 3. Verify each extension is in the bundle
|
||||
FAILURE=0
|
||||
for EXT in "${EXTENSIONS[@]}"; do
|
||||
# Directus bundles strings usually, or imports them.
|
||||
# We look for the ID or the unique module name from src (e.g. "Customer Manager")
|
||||
# Or simply the path matching.
|
||||
|
||||
if echo "$MANIFEST" | grep -q "$EXT"; then
|
||||
echo "✅ Found '$EXT' in manifest."
|
||||
else
|
||||
echo "❌ MISSING '$EXT' in manifest!"
|
||||
FAILURE=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $FAILURE -eq 1 ]; then
|
||||
echo "🚨 VERIFICATION FAILED: One or more extensions are missing from the public bundle."
|
||||
exit 1
|
||||
else
|
||||
echo "🎉 ALL EXTENSIONS VERIFIED."
|
||||
exit 0
|
||||
fi
|
||||
Reference in New Issue
Block a user