Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
53 lines
1.5 KiB
Bash
Executable File
53 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Script to analyze controller patterns used in API routes
|
|
|
|
echo "Analyzing controller patterns in API v1 routes..."
|
|
echo "============================================="
|
|
echo ""
|
|
|
|
# Initialize counters
|
|
v2_count=0
|
|
standard_count=0
|
|
total_count=0
|
|
|
|
# Arrays to store categorized routes
|
|
declare -a v2_routes=()
|
|
declare -a standard_routes=()
|
|
|
|
# Function to check if a file uses V2 controller
|
|
check_controller_pattern() {
|
|
local file="$1"
|
|
local relative_path="${file#/home/coder/alga-psa/server/src/app/api/v1/}"
|
|
|
|
# Check for controller imports with V2 in the name
|
|
if grep -E "import.*Controller.*V2" "$file" 2>/dev/null; then
|
|
v2_routes+=("$relative_path")
|
|
((v2_count++))
|
|
return 0
|
|
else
|
|
standard_routes+=("$relative_path")
|
|
((standard_count++))
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
# Process all route files
|
|
while IFS= read -r route_file; do
|
|
((total_count++))
|
|
check_controller_pattern "$route_file"
|
|
done < <(find /home/coder/alga-psa/server/src/app/api/v1/ -name "route.ts" | sort)
|
|
|
|
# Output results
|
|
echo "=== V2 Controller Routes (${v2_count}) ==="
|
|
printf '%s\n' "${v2_routes[@]}" | sort
|
|
echo ""
|
|
|
|
echo "=== Standard Controller Routes (${standard_count}) ==="
|
|
printf '%s\n' "${standard_routes[@]}" | sort
|
|
echo ""
|
|
|
|
echo "=== Summary ==="
|
|
echo "Total routes: ${total_count}"
|
|
echo "V2 Controller: ${v2_count} ($(( v2_count * 100 / total_count ))%)"
|
|
echo "Standard Controller: ${standard_count} ($(( standard_count * 100 / total_count ))%)" |