UNPKG

decocms

Version:

Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools

2 lines (1 loc) • 562 B
function e(r){if(!r)return null;const t=typeof r=="string"?r:r.url;if(!t)return null;const n=t.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function a(r){const t=e(r);if(!t)return null;const n=`https://github.com/${t.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}const u="mcp.studio",o="mcp.mesh";function i(r){const t=r?.[u];if(t&&typeof t=="object"&&!Array.isArray(t))return t;const n=r?.[o];if(n&&typeof n=="object"&&!Array.isArray(n))return n}export{a,i as g};