mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-09 06:55:07 +00:00
* fix(v4): serve registries from directory * fix(v4): statically cache registries route * fix
17 lines
342 B
TypeScript
17 lines
342 B
TypeScript
import { NextResponse } from "next/server"
|
|
|
|
import directory from "@/registry/directory.json"
|
|
|
|
export const dynamic = "force-static"
|
|
|
|
export async function GET() {
|
|
const registries = directory.map(({ name, homepage, url, description }) => ({
|
|
name,
|
|
homepage,
|
|
url,
|
|
description,
|
|
}))
|
|
|
|
return NextResponse.json(registries)
|
|
}
|