decocms
Version:
Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools
24 lines (21 loc) • 576 B
text/typescript
import { getPackageVersion } from "../utils/package-json";
const FRAMEWORKS: Record<string, string> = {
next: "next",
nuxt: "nuxt",
"@remix-run/server-runtime": "remix",
astro: "astro",
"@sveltejs/kit": "sveltekit",
"solid-start": "solid-start",
"tanstack-start": "tanstack-start",
hono: "hono",
express: "express",
elysia: "elysia",
expo: "expo",
};
export async function detectFramework() {
for (const [pkg, name] of Object.entries(FRAMEWORKS)) {
const version = await getPackageVersion(pkg);
if (version) return { name, version };
}
return undefined;
}