mirror of
https://github.com/supabase/supabase.git
synced 2026-07-25 08:52:43 -04:00
30b02aa0b7
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added new public MCP base URL environment variables for hosted and self-hosted setups. * Introduced reusable MDX components to render custom MCP configuration content. * **Documentation** * Updated the MCP guide to reference shared MCP server template values for examples. * Swapped the CI configuration example for a component-rendered snippet for consistency. * **Bug Fixes** * Improved self-hosted MCP base URL fallback so it prefers the new non-platform URL when no custom API URL is provided. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
25 lines
704 B
TypeScript
25 lines
704 B
TypeScript
import { resolveSharedDataPath } from '~/components/SharedData.utils'
|
|
import {
|
|
getCustomContent,
|
|
type CustomContent as CustomContentKey,
|
|
} from '~/lib/custom-content/getCustomContent'
|
|
|
|
export const CustomContent = ({
|
|
props,
|
|
children,
|
|
}: {
|
|
props: Record<string, unknown>
|
|
children: string
|
|
}): string => {
|
|
const key = String(props.data ?? '') as CustomContentKey
|
|
const result = getCustomContent([key])
|
|
const value = Object.values(result)[0]
|
|
if (value == null) return ''
|
|
|
|
const path = children.trim()
|
|
if (!path) return typeof value === 'string' ? value : JSON.stringify(value)
|
|
|
|
const resolved = resolveSharedDataPath(value, path)
|
|
return resolved != null ? String(resolved) : ''
|
|
}
|