mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem `supabase/tanstack-db` (a frontend data layer syncing TanStack DB collections with Postgres via Supabase) has no reference documentation on supabase.com/docs. ## Solution Adds a new `/reference/tanstack-db` SDK reference page documenting `supabaseCollectionOptions()`, `queryOnce()`, and live-query/mutation usage. Since the package has no TypeDoc pipeline (unlike `middleware`/`server`), it uses the legacy hand-written YAML spec pattern already used for Python, Swift, C#, and Dart v1 (`apps/docs/spec/supabase_tanstack_db_v1.yml`), wired into `navigation.references.ts` and the sidebar/breadcrumb constants the same way as the existing `middleware` entry. Content is sourced from the public `supabase/tanstack-db` README and source, since there's no internal ticket for this. ## Review instructions 1. Run `pnpm run codegen:references:legacy` in `apps/docs` and confirm `features/docs/generated/tanstack_db.v1.*.json` are generated. 2. Start local Supabase (`pnpm supabase start`) and `pnpm dev:docs`, then visit `/docs/reference/tanstack_db` and confirm the sidebar entry and content render. ## Checklist - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Tiago Antunes <tiagoantunespt@gmail.com>
26 lines
956 B
TypeScript
26 lines
956 B
TypeScript
/**
|
|
* Standalone constants for the reference pipeline.
|
|
*
|
|
* This file intentionally has no runtime dependencies — and in particular,
|
|
* it must NOT import anything that transitively pulls in `next/navigation`,
|
|
* `next/headers`, or any other client-only module. It is loaded by both UI
|
|
* code (e.g. `Reference.generated.singleton.ts` used in app routes) and
|
|
* server-only scripts run with `tsx --conditions=react-server`
|
|
* (e.g. `scripts/llms.ts`), where the server React build lacks
|
|
* `createContext` and Next.js client modules crash on import.
|
|
*/
|
|
|
|
/**
|
|
* SDK/version pairs (`${sdkId}-${version}`) that opt into the new reference
|
|
* content pipeline produced by `scripts/build-reference-content.ts`. Anything
|
|
* not listed here keeps reading from the legacy `features/docs/generated/`
|
|
* outputs.
|
|
*/
|
|
export const SUPPORTS_NEW_REFERENCE_PROCESS = new Set([
|
|
'javascript-v2',
|
|
'dart-v2',
|
|
'server-v1',
|
|
'middleware-v1',
|
|
'tanstack_db-v1',
|
|
])
|