Config and housekeeping cleanup
- .gitignore: add coverage/, .vscode/, .idea/ - .env.example files: add header comments clarifying production vs dev, add SMTP vars to server dev template - Validate SavedView filters on load with safeParse fallback Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# Production — used with docker-compose (see server/.env.example for local dev)
|
||||
|
||||
# ── Registry ──────────────────────────────────────────────────────────────────
|
||||
# Hostname of your container registry (no trailing slash)
|
||||
REGISTRY=gitea.thewrightserver.net
|
||||
|
||||
@@ -15,5 +15,12 @@ dist/
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# IDE
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
# Test coverage
|
||||
coverage/
|
||||
|
||||
# Claude Code
|
||||
.claude/
|
||||
|
||||
@@ -11,6 +11,7 @@ import type { CreateTicketInput, UpdateTicketInput } from '../../../shared/schem
|
||||
import type { CreateUserInput, UpdateUserInput } from '../../../shared/schemas/user';
|
||||
import type { UpdateWebhookInput } from '../../../shared/schemas/notification';
|
||||
import type { CreateSavedViewInput } from '../../../shared/schemas/savedView';
|
||||
import { savedViewFiltersSchema } from '../../../shared/schemas/savedView';
|
||||
|
||||
// ── Keys ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -378,7 +379,13 @@ export function useRotateWebhookSecret() {
|
||||
export function useSavedViews() {
|
||||
return useQuery({
|
||||
queryKey: qk.savedViews(),
|
||||
queryFn: async () => (await api.get<SavedView[]>('/saved-views')).data,
|
||||
queryFn: async () => {
|
||||
const views = (await api.get<SavedView[]>('/saved-views')).data;
|
||||
return views.map((v) => ({
|
||||
...v,
|
||||
filters: savedViewFiltersSchema.catch({}).parse(v.filters),
|
||||
}));
|
||||
},
|
||||
staleTime: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
# Development — used with 'npm run dev' (see root .env.example for Docker/production)
|
||||
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/ticketing"
|
||||
JWT_SECRET="change-this-to-a-long-random-secret"
|
||||
CLIENT_URL="http://localhost:5173"
|
||||
PORT=3000
|
||||
|
||||
# Email notifications (optional) — leave SMTP_HOST empty to disable
|
||||
SMTP_HOST=
|
||||
SMTP_PORT=587
|
||||
SMTP_USER=
|
||||
SMTP_PASS=
|
||||
SMTP_FROM=noreply@localhost
|
||||
SMTP_SECURE=false
|
||||
|
||||
Reference in New Issue
Block a user