build: update dashboard dependencies and add a dev-db target
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

npm audit fix clears four high severity advisories. make dev-db starts
the local Postgres on its own, for the database tests.
This commit is contained in:
2026-10-04 17:32:44 +02:00
parent 4d57318e86
commit 75b145a213
2 changed files with 23 additions and 20 deletions

View File

@@ -10,7 +10,7 @@ DB_USER := gateway
DB_PASS := gateway
.DEFAULT_GOAL := help
.PHONY: help dev dev-stop run build ui migrate-up migrate-down test lint tidy clean
.PHONY: help dev dev-db dev-stop run build ui migrate-up migrate-down test lint tidy clean
help: ## List available targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) \
@@ -27,6 +27,14 @@ dev: .env ## Start Postgres, run the Go server, and the Vite dev server in paral
echo " ERROR: GATEWAY_SECURITY_ENCRYPTION_KEY is empty in .env"; \
echo " Run: echo GATEWAY_SECURITY_ENCRYPTION_KEY=\$$(openssl rand -hex 32) >> .env"; \
echo ""; exit 1; }
@$(MAKE) --no-print-directory dev-db
@# Run Go server and Vite dev server side-by-side, kill both on Ctrl-C
@trap 'kill 0' INT; \
go run ./cmd/server & \
(cd dashboard && npm run dev) & \
wait
dev-db: ## Start (or create) the dev Postgres container and wait until it is ready
@# Start Postgres container if not already running
@if ! docker ps --format '{{.Names}}' | grep -q '^$(DB_NAME)$$'; then \
if docker ps -a --format '{{.Names}}' | grep -q '^$(DB_NAME)$$'; then \
@@ -48,11 +56,6 @@ dev: .env ## Start Postgres, run the Go server, and the Vite dev server in paral
@echo "→ waiting for postgres…"; \
until docker exec $(DB_NAME) pg_isready -U $(DB_USER) -q 2>/dev/null; do sleep 1; done; \
echo "→ postgres ready"
@# Run Go server and Vite dev server side-by-side, kill both on Ctrl-C
@trap 'kill 0' INT; \
go run ./cmd/server & \
(cd dashboard && npm run dev) & \
wait
dev-stop: ## Stop and remove the dev Postgres container
docker rm -f $(DB_NAME) 2>/dev/null && echo "→ removed $(DB_NAME)" || echo "→ $(DB_NAME) not found"

View File

@@ -2067,9 +2067,9 @@
"license": "MIT"
},
"node_modules/nanoid": {
"version": "3.3.15",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz",
"integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==",
"version": "3.3.19",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz",
"integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==",
"funding": [
{
"type": "github",
@@ -2113,9 +2113,9 @@
}
},
"node_modules/postcss": {
"version": "8.5.15",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz",
"integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==",
"version": "8.5.28",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz",
"integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==",
"funding": [
{
"type": "opencollective",
@@ -2132,7 +2132,7 @@
],
"license": "MIT",
"dependencies": {
"nanoid": "^3.3.12",
"nanoid": "^3.3.18",
"picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
},
@@ -2172,9 +2172,9 @@
}
},
"node_modules/react-router": {
"version": "7.18.0",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.0.tgz",
"integrity": "sha512-pTTGt8J+ji1NOmYnjzT+bAJy/1zD+Jp4ziO6cL7T3ZLvXKtusO7BpFqlRXitqpcPVqllsIXFHRMt+2/k3Xn6HQ==",
"version": "7.18.4",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.18.4.tgz",
"integrity": "sha512-PUPQcMhMGRAslLcvtlPz/kmzBEWPhLdgLFrL7pLNepBL6dX0lWj4WD2cUYVgYCuT3jxvghYFg81cDTj44DhetQ==",
"license": "MIT",
"dependencies": {
"cookie": "^1.0.1",
@@ -2194,12 +2194,12 @@
}
},
"node_modules/react-router-dom": {
"version": "7.18.0",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.0.tgz",
"integrity": "sha512-Fi0yY6kgtKae/Th2xibdWK0KSdYZ4B53Gyf6wRtomOKWgpNm7H7+DyfDhncdz9FKbpS+1jmDhg3F4WoGJ+yFOA==",
"version": "7.18.4",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.18.4.tgz",
"integrity": "sha512-yrfmJHIpDG7taCpqKjT1G5B6q3O2K+RN8/fgNf0lTjCwiPbQ0ei6vXX9ZjQR+7ld8Tr7Z5xmyMnZ8YJrphWQUw==",
"license": "MIT",
"dependencies": {
"react-router": "7.18.0"
"react-router": "7.18.4"
},
"engines": {
"node": ">=20.0.0"