feat(supabase): owner trial sandbox commands and the V1-2.6 trial guide

This commit is contained in:
bchanot committed 2026-11-04 14:11:23 +01:00
1 parent aa5c10d73c
commit ac5fbfbc44
5 files changed
+297 -2

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import { defineConfig, mergeConfig } from 'vite'
import base from '../vite.config'
/**
* Dev server of `pnpm db:sandbox trial` (docs/development/V1-2-6_OWNER_TRIAL.md).
* The browser talks to this origin only: the three Supabase routes are
* forwarded to the trial gateway on loopback, so no CORS rule is involved.
*/
const target = process.env.FAUNOSTEO_TRIAL_GATEWAY
if (!target || new URL(target).hostname !== '127.0.0.1')
throw new Error('FAUNOSTEO_TRIAL_GATEWAY must be an http://127.0.0.1:<port> URL')
const SUPABASE_ROUTES = ['/auth/v1', '/rest/v1', '/storage/v1']
export default defineConfig((env) =>
mergeConfig(base(env), {
server: {
proxy: Object.fromEntries(
SUPABASE_ROUTES.map((route) => [route, { target }]),
),
},
}),
)