mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
docs: wire @supabase/server v1 into the reference pipeline (#47570)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Docs update. * https://docs-git-docs-wire-server-v1-reference-supabase.vercel.app/docs/reference/server/introduction * <img width="417" height="628" alt="Screenshot 2026-07-06 at 6 13 33 PM" src="https://github.com/user-attachments/assets/9fc27b04-038b-4434-8855-94051f898b5d" /> ## What is the current behavior? `@supabase/server` has no reference documentation page in the Supabase docs. The library publishes a TypeDoc spec to GitHub Pages but the docs pipeline was not wired up to consume it. ## What is the new behavior? - Adds `spec/reference/server/v1/` with a `config.json` (category order: Middleware, Primitives, Adapters, Errors, Types) and `partials/` for the introduction and installing pages. - Adds a `download.server.v1` Makefile target that fetches `https://supabase.github.io/server/spec.json` into `spec/reference/server/v1/server.json`, and wires it into the top-level `download` target so it runs with the rest. - Registers `server-v1` in `SUPPORTS_NEW_REFERENCE_PROCESS` so the build pipeline picks up the new spec directory and generates `content/reference/server/v1/` at build time. - Seeds the generated `docs/ref/server/` partials (introduction and installing) that the reference router serves. ## Additional context The TypeDoc spec is produced by `@supabase/server`'s `docs.yml` workflow on every push to `main`, so `make download.server.v1` will always pull the latest published API surface. The companion PR in the server repo ([supabase/server#95](https://github.com/supabase/server/pull/95)) adds the `@category` tags that the pipeline requires for symbols to appear in navigation. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a new **Server SDK** item under **Reference**, linking to `/reference/server` and marked with a **New** badge. * Published **Server Reference v1** documentation for `@supabase/server`, including **Introduction** and **Installing** pages. * **Chores / Improvements** * Enhanced the reference documentation generation to include Server v1 content. * Improved reference detail handling (including clearer TypeDoc output such as **Deprecated** notes). <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
This commit is contained in:
1 parent
a84fd10a4f
commit
f77e8e75b6
17 files changed
+316
-5
No files matched your search
@@ -18,6 +18,10 @@ import matter from 'gray-matter'
|
||||
|
||||
import {
|
||||
buildMap,
|
||||
KIND_CLASS,
|
||||
KIND_INTERFACE,
|
||||
KIND_PROPERTY,
|
||||
KIND_TYPE_ALIAS,
|
||||
KIND_VARIABLE,
|
||||
normalizeComment,
|
||||
parseSignature,
|
||||
@@ -365,6 +369,52 @@ function collectFunctions(
|
||||
isConst: node.flags?.isConst ?? false,
|
||||
}
|
||||
out.typeSpec.variables[ref] = variableEntry
|
||||
} else if (node.kind === KIND_TYPE_ALIAS && node.type) {
|
||||
// Type alias — store description and underlying type definition
|
||||
const variableEntry: VariableTypes = {
|
||||
name: ref,
|
||||
type: parseType(node.type, idMap),
|
||||
comment: node.comment ? normalizeComment(node.comment as any) : undefined,
|
||||
isConst: false,
|
||||
}
|
||||
out.typeSpec.variables[ref] = variableEntry
|
||||
} else if (node.kind === KIND_INTERFACE && node.children) {
|
||||
// Interface — store as a method-like entry so the renderer shows properties as a param table
|
||||
const params = (node.children as any[])
|
||||
.filter((child: any) => child.kind === KIND_PROPERTY)
|
||||
.map((prop: any) => ({
|
||||
name: prop.name,
|
||||
comment: prop.comment ? normalizeComment(prop.comment as any) : undefined,
|
||||
isOptional: prop.flags?.isOptional ?? false,
|
||||
type: prop.type ? parseType(prop.type, idMap) : undefined,
|
||||
}))
|
||||
const methodEntry: MethodTypes = {
|
||||
name: ref,
|
||||
params,
|
||||
ret: undefined,
|
||||
comment: node.comment ? normalizeComment(node.comment as any) : undefined,
|
||||
}
|
||||
out.typeSpec.methods[ref] = methodEntry
|
||||
} else if (node.kind === KIND_CLASS && node.children) {
|
||||
// Class — store as a method-like entry so the renderer shows the class
|
||||
// description plus its public properties as a param table. Without this,
|
||||
// classes fall through every branch and only their constructor child is
|
||||
// stored, leaving the class ref (which functions.json points at) empty.
|
||||
const params = (node.children as any[])
|
||||
.filter((child: any) => child.kind === KIND_PROPERTY)
|
||||
.map((prop: any) => ({
|
||||
name: prop.name,
|
||||
comment: prop.comment ? normalizeComment(prop.comment as any) : undefined,
|
||||
isOptional: prop.flags?.isOptional ?? false,
|
||||
type: prop.type ? parseType(prop.type, idMap) : undefined,
|
||||
}))
|
||||
const methodEntry: MethodTypes = {
|
||||
name: ref,
|
||||
params,
|
||||
ret: undefined,
|
||||
comment: node.comment ? normalizeComment(node.comment as any) : undefined,
|
||||
}
|
||||
out.typeSpec.methods[ref] = methodEntry
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user