mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
## This PR - Adds a v4 alpha reference for Kotlin at `/reference/kotlin/v4`, using the prerelease flag from #53896. - v3 stays the default at `/reference/kotlin`. v4 shows the alpha notice and is listed under "Prereleases" in the version menu. - `spec/supabase_kt_v4.yml` is the v3 spec with links updated to `supabase/supabase-kt`. The API is the same in v4. - New `introduction`, `installing` (with `io.supabase` coordinates) and `upgrade-guide` pages under `docs/ref/kotlin/v4/`. ## Why - supabase-kt `4.0.0-alpha-1` is on Maven Central. It's the first official release of the Kotlin SDK and moves it to the `io.supabase` Maven group and package. The current reference only shows the v3 coordinates. ## Note - Guides, quickstarts and the existing v3 pages are unchanged. They switch to `io.supabase` with the stable 4.0.0 release. - Search doesn't index prerelease versions yet, same as Swift v3. - I didn't run the docs build locally. Please check `/docs/reference/kotlin/v4` and `/docs/reference/kotlin/v4/upgrade-guide` on the preview. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Safa <4990386+safaorhan@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
256 lines
6.2 KiB
TypeScript
256 lines
6.2 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',
|
|
},
|
|
},
|
|
},
|
|
middleware: {
|
|
type: 'sdk',
|
|
name: 'Middleware',
|
|
library: '@supabase/middleware',
|
|
libPath: 'middleware',
|
|
versions: ['v1'],
|
|
typeSpec: true,
|
|
icon: 'reference-javascript',
|
|
meta: {
|
|
v1: {
|
|
libId: 'reference_middleware_v1',
|
|
},
|
|
},
|
|
},
|
|
tanstack_db: {
|
|
type: 'sdk',
|
|
name: 'TanStack DB',
|
|
library: '@supabase-labs/tanstack-db',
|
|
libPath: 'tanstack_db',
|
|
versions: ['v1'],
|
|
icon: 'reference-javascript',
|
|
meta: {
|
|
v1: {
|
|
libId: 'reference_tanstack_db_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: ['v8', 'v1', 'v0'],
|
|
icon: 'reference-csharp',
|
|
meta: {
|
|
v8: {
|
|
libId: 'reference_csharp_v8',
|
|
specFile: 'supabase_csharp_v8',
|
|
},
|
|
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[0]` is the default. A prerelease version goes after it, so the
|
|
// stable version keeps the `/reference/swift` URL.
|
|
versions: ['v2', 'v3', 'v1'],
|
|
icon: 'reference-swift',
|
|
meta: {
|
|
v2: {
|
|
libId: 'reference_swift_v2',
|
|
specFile: 'supabase_swift_v2',
|
|
},
|
|
v3: {
|
|
libId: 'reference_swift_v3',
|
|
specFile: 'supabase_swift_v3',
|
|
prerelease: 'alpha',
|
|
},
|
|
v1: {
|
|
libId: 'reference_swift_v1',
|
|
specFile: 'supabase_swift_v1',
|
|
},
|
|
},
|
|
enabled: sdkSwiftEnabled,
|
|
},
|
|
kotlin: {
|
|
type: 'sdk',
|
|
name: 'Kotlin',
|
|
library: 'supabase-kt',
|
|
libPath: 'kotlin',
|
|
// `versions[0]` is the default. A prerelease version goes after it, so the
|
|
// stable version keeps the `/reference/kotlin` URL.
|
|
versions: ['v3', 'v4', 'v2', 'v1'],
|
|
icon: 'reference-kotlin',
|
|
meta: {
|
|
v3: {
|
|
libId: 'reference_kotlin_v3',
|
|
specFile: 'supabase_kt_v3',
|
|
},
|
|
v4: {
|
|
libId: 'reference_kotlin_v4',
|
|
specFile: 'supabase_kt_v4',
|
|
prerelease: 'alpha',
|
|
},
|
|
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
|
|
)
|
|
|
|
/**
|
|
* Returns the prerelease stage (for example `alpha`) of an SDK version, or
|
|
* `undefined` for a stable version.
|
|
*/
|
|
export function getPrereleaseStage(sdkId: string, version: string): string | undefined {
|
|
const versionMeta = REFERENCES[sdkId]?.meta?.[version]
|
|
return versionMeta && 'prerelease' in versionMeta ? versionMeta.prerelease : undefined
|
|
}
|
|
|
|
export const selfHostingServices = Object.keys(REFERENCES).filter(
|
|
(reference) => REFERENCES[reference].type === 'self-hosting'
|
|
)
|