mirror of
https://github.com/supabase/supabase.git
synced 2026-07-03 19:54:38 +08:00
This produces more complete type information (unions, following type alias refererences that aren't successfully dereferenced at an earlier stage, etc.), in a format that is much easier to query from UI components. Also adds a snapshot test for easier future iteration. I had a lot of trouble configuring Jest for the snapshot tests (something to do with imports and compile targets), and there are zero other tests in this directory right now, so I just tore out the test setup and replaced it with Vitest. Much faster!
13 lines
710 B
TypeScript
13 lines
710 B
TypeScript
export const API_URL = (
|
|
process.env.NODE_ENV === 'development'
|
|
? process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080'
|
|
: process.env.NEXT_PUBLIC_API_URL
|
|
)?.replace(/\/platform$/, '')
|
|
export const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH || '/docs'
|
|
export const BUILD_PREVIEW_HTML = process.env.NEXT_PUBLIC_BUILD_PREVIEW_HTML === 'true'
|
|
export const IS_DEV = process.env.NODE_ENV === 'development'
|
|
export const IS_PLATFORM = process.env.NEXT_PUBLIC_IS_PLATFORM === 'true'
|
|
export const IS_PREVIEW = process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
|
|
export const LOCAL_SUPABASE = process.env.NEXT_PUBLIC_LOCAL_SUPABASE === 'true'
|
|
export const MISC_URL = process.env.NEXT_PUBLIC_MISC_URL ?? ''
|