feat: add build info API endpoint

Add API route to serve deployment information and TypeScript definitions for type safety.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock 2025-10-05 06:37:05 -05:00
parent 416dc897e2
commit 571664e725
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,6 @@
import { NextResponse } from 'next/server'
import buildInfo from '@/generated/build-info.json'
export async function GET() {
return NextResponse.json(buildInfo)
}

20
apps/web/src/types/build-info.d.ts vendored Normal file
View File

@ -0,0 +1,20 @@
declare module '@/generated/build-info.json' {
interface BuildInfo {
version: string
buildTime: string
buildTimestamp: number
git: {
commit: string | null
commitShort: string | null
branch: string | null
tag: string | null
isDirty: boolean
}
environment: string
buildNumber: string | null
nodeVersion: string
}
const buildInfo: BuildInfo
export default buildInfo
}