- Remove client IP removal capability (keep backend methods removed too) - Add copy-to-clipboard buttons for IP addresses with tooltip feedback - Replace OS dropdown with tile gallery (grouped, searchable, brand colors, EOL badges) in rebuild panel and checkout page - Add inline server rename with friendly name generator and RFC 1123 validation - Add traffic statistics canvas chart with responsive resize in resources panel - Add backup listing timeline in manage panel with show-all expansion - Add VNC enable/disable toggle with connection details and password copy - Add server root password reset with auto-clipboard copy (never displayed) - Add skeleton loading placeholders, action cooldowns (power 3s, rebuild 30s), progress indicator with elapsed timer - Sanitize all client-facing error messages (no raw API errors exposed) - Convert all state-mutating AJAX calls from GET to POST - Add explicit break after all output() calls in client.php - Add Redis-backed API response caching (Cache.php): OS templates 10min, traffic/backups 2min, currencies 30min, packages 10min - Add GitHub Actions workflow for weekly VirtFusion API change detection - Move cache busting step after semantic-release in publish workflow - Add endpoint doc generator script and OpenAPI baseline placeholder - Improve hostname generation entropy (bin2hex random_bytes) - Add .superpowers/ to .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
34 lines
1.1 KiB
Bash
Executable File
34 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Generate API endpoint documentation from PHP source files
|
|
# Usage: bash scripts/generate-endpoint-doc.sh > docs/API-ENDPOINTS.md
|
|
|
|
MODULE_DIR="modules/servers/VirtFusionDirect"
|
|
|
|
echo "# VirtFusion WHMCS Module — API Endpoints"
|
|
echo ""
|
|
echo "Auto-generated from source code. Do not edit manually."
|
|
echo ""
|
|
echo "| Endpoint Pattern | HTTP Method | PHP File | Function |"
|
|
echo "|---|---|---|---|"
|
|
|
|
# Extract API URL patterns from PHP files
|
|
grep -rn "->get\|->post\|->put\|->patch\|->delete" "$MODULE_DIR/lib/" 2>/dev/null | \
|
|
grep -oP "(?<=>)(get|post|put|patch|delete)\(.*?'[^']*'" | \
|
|
while IFS= read -r line; do
|
|
method=$(echo "$line" | grep -oP "^(get|post|put|patch|delete)" | tr '[:lower:]' '[:upper:]')
|
|
url=$(echo "$line" | grep -oP "'[^']*'" | tr -d "'")
|
|
echo "| \`$url\` | $method | - | - |"
|
|
done
|
|
|
|
echo ""
|
|
echo "## Client Endpoints (client.php)"
|
|
echo ""
|
|
echo "| Action | Description |"
|
|
echo "|---|---|"
|
|
|
|
grep -n "case '" "$MODULE_DIR/client.php" 2>/dev/null | \
|
|
while IFS= read -r line; do
|
|
action=$(echo "$line" | grep -oP "case '\K[^']+")
|
|
echo "| \`$action\` | - |"
|
|
done
|