The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(docs): guard federated-content schema reads when artifact is absent (#48144)
claude[bot]3a085f985b84
diff --git a/apps/docs/internals/markdown-schema/AiSkillsIndex.ts b/apps/docs/internals/markdown-schema/AiSkillsIndex.tsindex efa3e6174f4..d2e7f1cc31d 100644--- a/apps/docs/internals/markdown-schema/AiSkillsIndex.ts+++ b/apps/docs/internals/markdown-schema/AiSkillsIndex.ts@@ -1,4 +1,4 @@-import { readFileSync } from 'node:fs'+import { existsSync, readFileSync } from 'node:fs'import path from 'node:path'const SKILLS_PATH = path.join(process.cwd(), 'features/docs/generated/ai-skills.json')@@ -10,6 +10,12 @@ interface SkillSummary {}export const AiSkillsIndex = (): string => {+ // `build:guides-markdown` can run standalone (e.g. apps/www's prebuild) without+ // `build:federated-content`, so this generated artifact may not exist yet.+ if (!existsSync(SKILLS_PATH)) {+ return ''+ }+const skills: SkillSummary[] = JSON.parse(readFileSync(SKILLS_PATH, 'utf-8'))return skillsdiff --git a/apps/docs/internals/markdown-schema/TerraformProviderSchema.ts b/apps/docs/internals/markdown-schema/TerraformProviderSchema.tsindex 91c31732e28..fae407b18ed 100644--- a/apps/docs/internals/markdown-schema/TerraformProviderSchema.ts+++ b/apps/docs/internals/markdown-schema/TerraformProviderSchema.ts@@ -1,4 +1,4 @@-import { readFileSync } from 'node:fs'+import { existsSync, readFileSync } from 'node:fs'import path from 'node:path'const SCHEMA_PATH = path.join(process.cwd(), 'features/docs/generated/terraform.schema.json')@@ -15,6 +15,12 @@ function attributesTable(attributes: Record<string, any>, extraColumns: string[]}export const TerraformProviderSchema = (): string => {+ // `build:guides-markdown` can run standalone (e.g. apps/www's prebuild) without+ // `build:federated-content`, so this generated artifact may not exist yet.+ if (!existsSync(SCHEMA_PATH)) {+ return ''+ }+const schema = JSON.parse(readFileSync(SCHEMA_PATH, 'utf-8'))const provider = schema.provider_schemas['registry.terraform.io/supabase/supabase']