shimwrappercheck 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/AGENTS.md +21 -0
  2. package/README.md +286 -0
  3. package/bin/git +5 -0
  4. package/bin/shim +5 -0
  5. package/bin/shimwrappercheck +2 -0
  6. package/bin/supabase +5 -0
  7. package/dashboard/.next/cache/config.json +7 -0
  8. package/dashboard/.next/package.json +1 -0
  9. package/dashboard/.next/routes-manifest.json +1 -0
  10. package/dashboard/.next/trace +1 -0
  11. package/dashboard/README.md +32 -0
  12. package/dashboard/app/agents/page.tsx +88 -0
  13. package/dashboard/app/api/agents-md/route.ts +68 -0
  14. package/dashboard/app/api/config/route.ts +51 -0
  15. package/dashboard/app/api/run-checks/route.ts +54 -0
  16. package/dashboard/app/api/settings/route.ts +126 -0
  17. package/dashboard/app/api/status/route.ts +38 -0
  18. package/dashboard/app/config/page.tsx +77 -0
  19. package/dashboard/app/globals.css +20 -0
  20. package/dashboard/app/layout.tsx +23 -0
  21. package/dashboard/app/page.tsx +122 -0
  22. package/dashboard/app/settings/page.tsx +422 -0
  23. package/dashboard/components/Nav.tsx +33 -0
  24. package/dashboard/components/StatusCard.tsx +27 -0
  25. package/dashboard/lib/presets.ts +97 -0
  26. package/dashboard/lib/projectRoot.ts +25 -0
  27. package/dashboard/next.config.js +6 -0
  28. package/dashboard/package-lock.json +5307 -0
  29. package/dashboard/package.json +28 -0
  30. package/dashboard/postcss.config.js +6 -0
  31. package/dashboard/tailwind.config.js +14 -0
  32. package/dashboard/tsconfig.json +20 -0
  33. package/docs/SHIM_WRAPPER_CONCEPT.md +79 -0
  34. package/docs/WORKFLOW_AND_GAP_ANALYSIS.md +159 -0
  35. package/package.json +24 -0
  36. package/scripts/cli-checked.sh +307 -0
  37. package/scripts/cli.js +23 -0
  38. package/scripts/fetch-edge-logs.sh +96 -0
  39. package/scripts/git-checked.sh +194 -0
  40. package/scripts/init.js +341 -0
  41. package/scripts/install.js +303 -0
  42. package/scripts/ping-edge-health.sh +113 -0
  43. package/scripts/setup.js +55 -0
  44. package/scripts/supabase-checked.sh +330 -0
  45. package/templates/ai-code-review.sh +217 -0
  46. package/templates/git-pre-push +41 -0
  47. package/templates/husky-pre-push +46 -0
  48. package/templates/run-checks.sh +67 -0
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env bash
2
+ # Shared checks for pre-push (GitHub) and supabase-checked (Supabase deploy).
3
+ # Usage: run-checks.sh [--frontend] [--backend] [--no-frontend] [--no-backend] [--no-ai-review]
4
+ # With no args: run frontend and backend checks (same as --frontend --backend).
5
+ # With args: set what runs (e.g. --no-frontend --no-ai-review to run only backend, no AI review).
6
+ # AI review runs by default after frontend/backend checks; use --no-ai-review to disable (or SKIP_AI_REVIEW=1).
7
+ # Includes security: npm audit (frontend), deno audit (backend). Optional: Snyk (frontend, skip with SKIP_SNYK=1).
8
+ set -euo pipefail
9
+
10
+ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
11
+ cd "$ROOT_DIR"
12
+
13
+ run_frontend=false
14
+ run_backend=false
15
+ run_ai_review=true
16
+
17
+ if [[ $# -eq 0 ]]; then
18
+ run_frontend=true
19
+ run_backend=true
20
+ else
21
+ for arg in "$@"; do
22
+ case "$arg" in
23
+ --frontend) run_frontend=true ;;
24
+ --backend) run_backend=true ;;
25
+ --no-frontend) run_frontend=false ;;
26
+ --no-backend) run_backend=false ;;
27
+ --no-ai-review) run_ai_review=false ;;
28
+ *) echo "Unknown option: $arg. Use --frontend, --backend, --no-frontend, --no-backend, and/or --no-ai-review." >&2; exit 1 ;;
29
+ esac
30
+ done
31
+ fi
32
+
33
+ # Opt-out via env: SKIP_AI_REVIEW=1 disables AI review
34
+ [[ -n "${SKIP_AI_REVIEW:-}" ]] && run_ai_review=false
35
+
36
+ if [[ "$run_frontend" = true ]]; then
37
+ echo "Running frontend checks..."
38
+ npm run lint
39
+ npm run check:mock-data
40
+ npm run build
41
+ npm run test:run
42
+ echo "Running frontend security (npm audit)..."
43
+ npm audit --audit-level=high
44
+ if [[ -z "${SKIP_SNYK:-}" ]]; then
45
+ if command -v snyk >/dev/null 2>&1; then
46
+ echo "Running Snyk (dependency scan)..."
47
+ snyk test
48
+ elif npm exec --yes snyk -- --version >/dev/null 2>&1; then
49
+ echo "Running Snyk (dependency scan)..."
50
+ npx snyk test
51
+ else
52
+ echo "Skipping Snyk: not installed (optional; set SKIP_SNYK=1 to suppress)." >&2
53
+ fi
54
+ fi
55
+ fi
56
+
57
+ if [[ "$run_backend" = true ]]; then
58
+ echo "Running Supabase edge function checks..."
59
+ deno fmt --check supabase/functions
60
+ deno lint supabase/functions
61
+ echo "Running backend security (deno audit)..."
62
+ (cd supabase/functions/server && deno audit)
63
+ fi
64
+
65
+ if [[ "$run_ai_review" = true ]] && { [[ "$run_frontend" = true ]] || [[ "$run_backend" = true ]]; }; then
66
+ bash "$ROOT_DIR/scripts/ai-code-review.sh"
67
+ fi