From f804ad8a41ebf7631aa96ce385ae55f176d61b28 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Mon, 22 Jun 2026 03:08:40 -0700 Subject: [PATCH] feat: expanded toolchain check + install-all task check-toolchain.sh now covers: - golangci-lint - npm - web/ui node_modules (JS deps) - electron node_modules (electron deps) New install-all task (scripts/install-deps.sh): - mise install (go, node, golangci-lint) - cd web/ui && npm install - cd electron && npm install Usage: mise run check-toolchain # audit everything mise run install-all # install all deps from scratch --- mise.toml | 1 + scripts/check-toolchain.sh | 48 ++++++++++++++++++++++++++++++++++++++ scripts/install-deps.sh | 45 +++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100755 scripts/install-deps.sh diff --git a/mise.toml b/mise.toml index 3221f7d..f3c8aba 100644 --- a/mise.toml +++ b/mise.toml @@ -22,6 +22,7 @@ init = "mkdir -p output/isos output/wavs" docker-up = "mkdir -p output/isos output/wavs && docker compose up --build" docker-build = "docker build -t akai-fetch ." check-toolchain = "bash scripts/check-toolchain.sh" +install-all = "bash scripts/install-deps.sh" check-docker-toolchain = "bash scripts/check-docker-toolchain.sh" check-all = { run = "bash scripts/check-toolchain.sh && echo '' && bash scripts/check-docker-toolchain.sh" } gopls = "go install golang.org/x/tools/gopls@latest" diff --git a/scripts/check-toolchain.sh b/scripts/check-toolchain.sh index a7f7c9d..96d513b 100755 --- a/scripts/check-toolchain.sh +++ b/scripts/check-toolchain.sh @@ -123,6 +123,54 @@ else fi fi +echo "" + +# ─── golangci-lint ────────────────────────────────────────────────────── +echo "golangci-lint:" +if command -v golangci-lint &>/dev/null; then + gcl_ver=$(golangci-lint --version 2>/dev/null) + ok "golangci-lint found: $gcl_ver" +else + warn "golangci-lint not found" + echo " Install: mise install golangci-lint" +fi + +echo "" +echo "=== JS / Node ===" +echo "" + +# ─── npm ──────────────────────────────────────────────────────────────── +echo "npm:" +if command -v npm &>/dev/null; then + npm_ver=$(npm --version 2>/dev/null) + ok "npm found: v$npm_ver" +else + warn "npm not found" + echo " Install: mise install node" +fi + +echo "" + +# ─── web/ui deps (eslint, globals) ────────────────────────────────────── +echo "web/ui dependencies:" +if [ -d web/ui/node_modules ] && [ -f web/ui/node_modules/.bin/eslint ]; then + ok "web/ui/node_modules installed" +else + warn "web/ui/node_modules not installed" + echo " Install: cd web/ui && npm install" +fi + +echo "" + +# ─── electron deps ────────────────────────────────────────────────────── +echo "electron dependencies:" +if [ -d electron/node_modules ] && [ -f electron/node_modules/.bin/electron ]; then + ok "electron/node_modules installed" +else + warn "electron/node_modules not installed" + echo " Install: cd electron && npm install" +fi + echo "" echo "=== JS Linting (ESLint) ===" if [ -f web/ui/node_modules/.bin/eslint ]; then diff --git a/scripts/install-deps.sh b/scripts/install-deps.sh new file mode 100755 index 0000000..4d8eaca --- /dev/null +++ b/scripts/install-deps.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# Install all project dependencies — run after check-toolchain.sh for a plan. +# Usage: ./scripts/install-deps.sh +set -euo pipefail + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' + +cmd() { echo -e " ${YELLOW}→${NC} $*"; "$@"; } +skip() { echo -e " ${GREEN}✓${NC} $1 (already installed)"; } +fail() { echo -e " ${RED}✗${NC} $1"; exit 1; } + +echo "=== Installing Dependencies ===" +echo "" + +# ─── mise tools ───────────────────────────────────────────────────────── +echo "mise tools (go, node, golangci-lint):" +if command -v mise &>/dev/null; then + cmd mise install +else + fail "mise not found — run: curl https://mise.run | sh" +fi +echo "" + +# ─── web/ui JS deps ───────────────────────────────────────────────────── +echo "web/ui npm deps (eslint):" +if [ -f web/ui/package.json ]; then + cmd cd web/ui && npm install +else + skip "web/ui npm deps" +fi +echo "" + +# ─── electron deps ────────────────────────────────────────────────────── +echo "electron npm deps:" +if [ -f electron/package.json ]; then + cmd cd electron && npm install +else + skip "electron npm deps" +fi + +echo "" +echo "=== Install complete ===" \ No newline at end of file -- 2.52.0