mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
## 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>
202 lines
4.7 KiB
TypeScript
202 lines
4.7 KiB
TypeScript
import { isFeatureEnabled } from 'common/enabled-features'
|
|
|
|
const {
|
|
sdkCsharp: sdkCsharpEnabled,
|
|
sdkDart: sdkDartEnabled,
|
|
sdkKotlin: sdkKotlinEnabled,
|
|
sdkPython: sdkPythonEnabled,
|
|
sdkSwift: sdkSwiftEnabled,
|
|
} = isFeatureEnabled(['sdk:csharp', 'sdk:dart', 'sdk:kotlin', 'sdk:python', 'sdk:swift'])
|
|
|
|
export const REFERENCES = {
|
|
javascript: {
|
|
type: 'sdk',
|
|
name: 'JavaScript',
|
|
library: 'supabase-js',
|
|
libPath: 'javascript',
|
|
versions: ['v2', 'v1'],
|
|
typeSpec: true,
|
|
icon: 'reference-javascript',
|
|
meta: {
|
|
v2: {
|
|
// JS v2 is driven by the new reference pipeline
|
|
// (`scripts/build-reference-content.ts` + `spec/reference/javascript/v2/`).
|
|
// It intentionally has no `specFile` — the legacy YAML loader skips it.
|
|
libId: 'reference_javascript_v2',
|
|
},
|
|
v1: {
|
|
libId: 'reference_javascript_v1',
|
|
specFile: 'supabase_js_v1',
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
type: 'sdk',
|
|
name: 'Server',
|
|
library: '@supabase/server',
|
|
libPath: 'server',
|
|
versions: ['v1'],
|
|
typeSpec: true,
|
|
icon: 'reference-javascript',
|
|
meta: {
|
|
v1: {
|
|
libId: 'reference_server_v1',
|
|
},
|
|
},
|
|
},
|
|
dart: {
|
|
type: 'sdk',
|
|
name: 'Flutter',
|
|
library: 'supabase-dart',
|
|
libPath: 'dart',
|
|
versions: ['v2', 'v1'],
|
|
icon: 'reference-dart',
|
|
meta: {
|
|
v2: {
|
|
// Dart v2 is driven by the new reference pipeline
|
|
// (`scripts/build-reference-content.ts` + `spec/reference/dart/v2/`).
|
|
// It intentionally has no `specFile`, so the legacy YAML loader skips it.
|
|
libId: 'reference_dart_v2',
|
|
},
|
|
v1: {
|
|
libId: 'reference_dart_v1',
|
|
specFile: 'supabase_dart_v1',
|
|
},
|
|
},
|
|
enabled: sdkDartEnabled,
|
|
},
|
|
csharp: {
|
|
type: 'sdk',
|
|
name: 'C#',
|
|
library: 'supabase-csharp',
|
|
libPath: 'csharp',
|
|
versions: ['v1', 'v0'],
|
|
icon: 'reference-csharp',
|
|
meta: {
|
|
v1: {
|
|
libId: 'reference_csharp_v1',
|
|
specFile: 'supabase_csharp_v1',
|
|
},
|
|
v0: {
|
|
libId: 'reference_csharp_v0',
|
|
specFile: 'supabase_csharp_v0',
|
|
},
|
|
},
|
|
enabled: sdkCsharpEnabled,
|
|
},
|
|
swift: {
|
|
type: 'sdk',
|
|
name: 'Swift',
|
|
library: 'supabase-swift',
|
|
libPath: 'swift',
|
|
versions: ['v2', 'v1'],
|
|
icon: 'reference-swift',
|
|
meta: {
|
|
v2: {
|
|
libId: 'reference_swift_v2',
|
|
specFile: 'supabase_swift_v2',
|
|
},
|
|
v1: {
|
|
libId: 'reference_swift_v1',
|
|
specFile: 'supabase_swift_v1',
|
|
},
|
|
},
|
|
enabled: sdkSwiftEnabled,
|
|
},
|
|
kotlin: {
|
|
type: 'sdk',
|
|
name: 'Kotlin',
|
|
library: 'supabase-kt',
|
|
libPath: 'kotlin',
|
|
versions: ['v3', 'v2', 'v1'],
|
|
icon: 'reference-kotlin',
|
|
meta: {
|
|
v3: {
|
|
libId: 'reference_kotlin_v3',
|
|
specFile: 'supabase_kt_v3',
|
|
},
|
|
v2: {
|
|
libId: 'reference_kotlin_v2',
|
|
specFile: 'supabase_kt_v2',
|
|
},
|
|
v1: {
|
|
libId: 'reference_kotlin_v1',
|
|
specFile: 'supabase_kt_v1',
|
|
},
|
|
},
|
|
enabled: sdkKotlinEnabled,
|
|
},
|
|
python: {
|
|
type: 'sdk',
|
|
name: 'Python',
|
|
library: 'supabase-py',
|
|
libPath: 'python',
|
|
versions: ['v2'],
|
|
icon: 'reference-python',
|
|
meta: {
|
|
v2: {
|
|
libId: 'reference_python_v2',
|
|
specFile: 'supabase_py_v2',
|
|
},
|
|
},
|
|
enabled: sdkPythonEnabled,
|
|
},
|
|
cli: {
|
|
type: 'cli',
|
|
name: 'CLI',
|
|
libPath: 'cli',
|
|
versions: [],
|
|
icon: 'reference-cli',
|
|
},
|
|
api: {
|
|
type: 'api',
|
|
name: 'API',
|
|
libPath: 'api',
|
|
versions: [],
|
|
icon: 'reference-api',
|
|
},
|
|
self_hosting_analytics: {
|
|
type: 'self-hosting',
|
|
name: 'Self-Hosting Analytics',
|
|
libPath: 'self-hosting-analytics',
|
|
versions: [],
|
|
icon: 'reference-analytics',
|
|
},
|
|
self_hosting_auth: {
|
|
type: 'self-hosting',
|
|
name: 'Self-Hosting Auth',
|
|
libPath: 'self-hosting-auth',
|
|
versions: [],
|
|
icon: 'self-hosting',
|
|
},
|
|
self_hosting_functions: {
|
|
type: 'self-hosting',
|
|
name: 'Self-Hosting Functions',
|
|
libPath: 'self-hosting-functions',
|
|
versions: [],
|
|
icon: 'reference-functions',
|
|
},
|
|
self_hosting_realtime: {
|
|
type: 'self-hosting',
|
|
name: 'Self-Hosting Realtime',
|
|
libPath: 'self-hosting-realtime',
|
|
versions: [],
|
|
icon: 'self-hosting',
|
|
},
|
|
self_hosting_storage: {
|
|
type: 'self-hosting',
|
|
name: 'Self-Hosting Storage',
|
|
libPath: 'self-hosting-storage',
|
|
versions: [],
|
|
icon: 'self-hosting',
|
|
},
|
|
} as const
|
|
|
|
export const clientSdkIds = Object.keys(REFERENCES).filter(
|
|
(reference) => REFERENCES[reference].type === 'sdk' && REFERENCES[reference].enabled !== false
|
|
)
|
|
|
|
export const selfHostingServices = Object.keys(REFERENCES).filter(
|
|
(reference) => REFERENCES[reference].type === 'self-hosting'
|
|
)
|