The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
ci(docs): fix build timeouts (#35336)
Charisee87cc20e84e
diff --git a/apps/docs/features/docs/Reference.mdx.tsx b/apps/docs/features/docs/Reference.mdx.tsxindex 1024e5771ad..d6abe802323 100644--- a/apps/docs/features/docs/Reference.mdx.tsx+++ b/apps/docs/features/docs/Reference.mdx.tsx@@ -1,13 +1,14 @@import matter from 'gray-matter'import { readFile } from 'node:fs/promises'import { join } from 'node:path'-+import { type ComponentProps } from 'react'import CliGlobalFlagsHandler from '~/components/reference/enrichments/cli/CliGlobalFlagsHandler'import { MDXRemoteBase } from '~/features/docs/MdxBase'import { components } from '~/features/docs/MdxBase.shared'import { RefSubLayout } from '~/features/docs/Reference.ui'import { cache_fullProcess_withDevCacheBust } from '~/features/helpers.fs'import { REF_DOCS_DIRECTORY } from '~/lib/docs'+import { CodeBlock } from '../ui/CodeBlock/CodeBlock'async function getRefMarkdownInternal(relPath: string) {const fullPath = join(REF_DOCS_DIRECTORY, relPath + '.mdx')@@ -42,7 +43,14 @@ interface MDXRemoteRefsProps {}function MDXRemoteRefs({ source }: MDXRemoteRefsProps) {- const refComponents = { ...components, RefSubLayout, CliGlobalFlagsHandler }+ const refComponents = {+ ...components,+ // Override the CodeBlock used for normal guides to skip type generation+ // because it is too resource-intensive+ pre: (props: ComponentProps<typeof CodeBlock>) => <CodeBlock {...props} skipTypeGeneration />,+ RefSubLayout,+ CliGlobalFlagsHandler,+ }return <MDXRemoteBase source={source} components={refComponents} />}diff --git a/apps/docs/features/ui/CodeBlock/CodeBlock.tsx b/apps/docs/features/ui/CodeBlock/CodeBlock.tsxindex 57c33dc0c53..eb4ac260b6b 100644--- a/apps/docs/features/ui/CodeBlock/CodeBlock.tsx+++ b/apps/docs/features/ui/CodeBlock/CodeBlock.tsx@@ -25,17 +25,19 @@ export async function CodeBlock({lineNumbers = true,contents,children,+ skipTypeGeneration,}: PropsWithChildren<{className?: stringlang?: stringlineNumbers?: booleancontents?: string+ skipTypeGeneration?: boolean}>) {let code = (contents || extractCode(children)).trim()const lang = tryToBundledLanguage(langSetting) || extractLang(children)let twoslashed = null as null | Map<number, Map<number, Array<NodeHover>>>- if (TWOSLASHABLE_LANGS.includes(lang)) {+ if (!skipTypeGeneration && TWOSLASHABLE_LANGS.includes(lang)) {try {const { code: editedCode, nodes } = twoslasher(code)const hoverNodes: Array<NodeHover> = nodes.filter((node) => node.type === 'hover')