Files
supabase/apps/studio/lib/constants/api.ts
T
Joshen Lim d6d644ec24 Update project name if dashboard is local CLI (#45864)
## Context

Very minor one, just updates the project name for local CLI, to show
"Supabase Studio (CLI)" instead of "Default project" which is a bit more
meaningful

<img width="1450" height="374" alt="image"
src="https://github.com/user-attachments/assets/b6c60172-99e2-43b7-a095-2914248ed292"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **UI Updates**
* Refined Project dropdown styling in non-platform mode with improved
spacing and text sizing
* Default project name now dynamically displays as "Supabase Studio
(CLI)" when applicable
* Minor header layout tweaks for more consistent spacing and transitions
* Improved local version indicator initialization for more reliable
version display

* **Other Updates**
  * Small code and organization refinements

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45864)

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45864)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-13 16:38:28 +08:00

24 lines
794 B
TypeScript

const PUBLIC_URL = new URL(process.env.SUPABASE_PUBLIC_URL || 'http://localhost:8000')
// Use LOGFLARE_URL until analytics/v1/ routing is supported
export const PROJECT_ANALYTICS_URL = process.env.LOGFLARE_URL
? `${process.env.LOGFLARE_URL}/api/`
: undefined
export const PROJECT_REST_URL = `${PUBLIC_URL.origin}/rest/v1/`
export const PROJECT_ENDPOINT = PUBLIC_URL.host
export const PROJECT_ENDPOINT_PROTOCOL = PUBLIC_URL.protocol.replace(':', '')
export const DEFAULT_PROJECT = {
id: 1,
ref: 'default',
name: !!process.env.CURRENT_CLI_VERSION
? 'Supabase Studio (CLI)'
: process.env.DEFAULT_PROJECT_NAME || 'Default Project',
organization_id: 1,
cloud_provider: 'localhost',
status: 'ACTIVE_HEALTHY',
region: 'local',
inserted_at: '2021-08-02T06:40:40.646Z',
}