| 1 | import { capabilityViews, runtimeCapabilityContext } from "@/lib/capabilities"; |
| 2 | import { BUILD_FACTS } from "@/lib/facts"; |
| 3 | import { FEATURE_CATALOGUE } from "@/lib/features"; |
| 4 | |
| 5 | export const dynamic = "force-static"; |
| 6 | |
| 7 | export function GET() { |
| 8 | const context = runtimeCapabilityContext(BUILD_FACTS); |
| 9 | return Response.json({ |
| 10 | ...FEATURE_CATALOGUE, |
| 11 | publishedRelease: context.release?.tag ?? null, |
| 12 | features: capabilityViews(context).map(({ feature, availability, name, summary }) => ({ ...feature, name, summary, availability })), |
| 13 | }, { |
| 14 | headers: { "cache-control": "public, max-age=3600" }, |
| 15 | }); |
| 16 | } |
| 17 |