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:
parent
416dc897e2
commit
571664e725
|
|
@ -0,0 +1,6 @@
|
|||
import { NextResponse } from 'next/server'
|
||||
import buildInfo from '@/generated/build-info.json'
|
||||
|
||||
export async function GET() {
|
||||
return NextResponse.json(buildInfo)
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
Loading…
Reference in New Issue