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.
- package/AGENTS.md +21 -0
- package/README.md +286 -0
- package/bin/git +5 -0
- package/bin/shim +5 -0
- package/bin/shimwrappercheck +2 -0
- package/bin/supabase +5 -0
- package/dashboard/.next/cache/config.json +7 -0
- package/dashboard/.next/package.json +1 -0
- package/dashboard/.next/routes-manifest.json +1 -0
- package/dashboard/.next/trace +1 -0
- package/dashboard/README.md +32 -0
- package/dashboard/app/agents/page.tsx +88 -0
- package/dashboard/app/api/agents-md/route.ts +68 -0
- package/dashboard/app/api/config/route.ts +51 -0
- package/dashboard/app/api/run-checks/route.ts +54 -0
- package/dashboard/app/api/settings/route.ts +126 -0
- package/dashboard/app/api/status/route.ts +38 -0
- package/dashboard/app/config/page.tsx +77 -0
- package/dashboard/app/globals.css +20 -0
- package/dashboard/app/layout.tsx +23 -0
- package/dashboard/app/page.tsx +122 -0
- package/dashboard/app/settings/page.tsx +422 -0
- package/dashboard/components/Nav.tsx +33 -0
- package/dashboard/components/StatusCard.tsx +27 -0
- package/dashboard/lib/presets.ts +97 -0
- package/dashboard/lib/projectRoot.ts +25 -0
- package/dashboard/next.config.js +6 -0
- package/dashboard/package-lock.json +5307 -0
- package/dashboard/package.json +28 -0
- package/dashboard/postcss.config.js +6 -0
- package/dashboard/tailwind.config.js +14 -0
- package/dashboard/tsconfig.json +20 -0
- package/docs/SHIM_WRAPPER_CONCEPT.md +79 -0
- package/docs/WORKFLOW_AND_GAP_ANALYSIS.md +159 -0
- package/package.json +24 -0
- package/scripts/cli-checked.sh +307 -0
- package/scripts/cli.js +23 -0
- package/scripts/fetch-edge-logs.sh +96 -0
- package/scripts/git-checked.sh +194 -0
- package/scripts/init.js +341 -0
- package/scripts/install.js +303 -0
- package/scripts/ping-edge-health.sh +113 -0
- package/scripts/setup.js +55 -0
- package/scripts/supabase-checked.sh +330 -0
- package/templates/ai-code-review.sh +217 -0
- package/templates/git-pre-push +41 -0
- package/templates/husky-pre-push +46 -0
- 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
|