Add browser inbox receiver

This commit is contained in:
2026-06-27 18:39:01 +08:00
parent fb68c54409
commit a2791c494f
14 changed files with 734 additions and 32 deletions
+7 -5
View File
@@ -41,7 +41,7 @@ report "go mod download" $?
report "go vet" $?
# ── Go fmt (non-destructive — only report unformatted files) ──
UNFORMATTED=$(cd "$ROOT" && gofmt -l . 2>/dev/null || go fmt -n ./... 2>&1 || true)
UNFORMATTED=$(cd "$ROOT" && find . -path ./vendor -prune -o -name '*.go' -print | xargs gofmt -l 2>/dev/null || go fmt -n ./... 2>&1 || true)
if [ -z "$UNFORMATTED" ]; then
echo " ✅ gofmt: all files formatted"
else
@@ -58,15 +58,17 @@ report "go mod tidy" $?
echo "[frontend]"
if ensure_npm_deps "$ROOT/frontend"; then
if grep -q '"lint"' "$ROOT/frontend/package.json" 2>/dev/null; then
(cd "$ROOT/frontend" && npm run lint 2>&1 || true)
report "frontend lint" $?
FRONTEND_LINT_STATUS=0
(cd "$ROOT/frontend" && npm run lint 2>&1) || FRONTEND_LINT_STATUS=$?
report "frontend lint" "$FRONTEND_LINT_STATUS"
else
echo " ️ no lint script in frontend/package.json"
fi
# Always run tsc --noEmit if typescript is available
if [ -f "$ROOT/frontend/node_modules/.bin/tsc" ]; then
(cd "$ROOT/frontend" && npx tsc --noEmit 2>&1 || true)
report "frontend tsc --noEmit" $?
FRONTEND_TSC_STATUS=0
(cd "$ROOT/frontend" && npx tsc --noEmit 2>&1) || FRONTEND_TSC_STATUS=$?
report "frontend tsc --noEmit" "$FRONTEND_TSC_STATUS"
fi
else
echo " ️ no frontend/package.json"
+6 -4
View File
@@ -34,16 +34,18 @@ echo "=== verstak-desktop test ==="
# ── Go tests ──
(cd "$ROOT" && go mod download)
OUTPUT=$(cd "$ROOT" && go test -count=1 -v ./... 2>&1) || true
GO_TEST_STATUS=0
OUTPUT=$(cd "$ROOT" && go test -count=1 -v ./... 2>&1) || GO_TEST_STATUS=$?
echo "$OUTPUT" | grep -E '(FAIL|PASS|---)' || true
report "go test" $?
report "go test" "$GO_TEST_STATUS"
# ── Frontend tests ──
echo "[frontend]"
if ensure_npm_deps "$ROOT/frontend"; then
if grep -q '"test"' "$ROOT/frontend/package.json" 2>/dev/null; then
(cd "$ROOT/frontend" && npm test 2>&1 || true)
report "frontend test" $?
FRONTEND_TEST_STATUS=0
(cd "$ROOT/frontend" && npm test 2>&1) || FRONTEND_TEST_STATUS=$?
report "frontend test" "$FRONTEND_TEST_STATUS"
else
echo " ️ no test script in frontend/package.json"
fi