--- import { getEmDashCollection } from "emdash"; import Base from "../../layouts/Base.astro"; export const prerender = false; const { entries: cmses, cacheHint } = await getEmDashCollection("cmses", { orderBy: { title: "asc" }, }); Astro.cache.set(cacheHint); const PLUGIN_FETCH_CAP = 10000; const { entries: plugins } = await getEmDashCollection("plugins", { limit: PLUGIN_FETCH_CAP }); if (plugins.length >= PLUGIN_FETCH_CAP) console.warn("[cms] plugin fetch hit cap", PLUGIN_FETCH_CAP, "- counts/lists may be truncated"); const countBySource = new Map(); const countByTarget = new Map(); for (const p of plugins) { const s = p.data.source_cms; if (s) countBySource.set(s, (countBySource.get(s) ?? 0) + 1); const t = p.data.target_cms; if (t) countByTarget.set(t, (countByTarget.get(t) ?? 0) + 1); } ---

By CMS