mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 18:35:07 +03:00
Revert changing env
This commit is contained in:
1 parent
2c6847794a
commit
692cbfc792
6 files changed
+9
-15
No files matched your search
+2
-2
@@ -21,7 +21,7 @@ import { useIntegrationsVercelInstalledConnectionDeleteMutation } from 'data/int
|
||||
import { useVercelProjectsQuery } from 'data/integrations/integrations-vercel-projects-query'
|
||||
import { IntegrationName, IntegrationProjectConnection } from 'data/integrations/integrations.types'
|
||||
import { useSelectedOrganization, useStore } from 'hooks'
|
||||
import { BASE_PATH, ENVIRONMENT } from 'lib/constants'
|
||||
import { BASE_PATH } from 'lib/constants'
|
||||
import { pluralize } from 'lib/helpers'
|
||||
import { getIntegrationConfigurationUrl } from 'lib/integration-utils'
|
||||
import { useSidePanelsStateSnapshot } from 'state/side-panels'
|
||||
@@ -166,7 +166,7 @@ You can change the scope of the access for Supabase by configuring
|
||||
: ''
|
||||
|
||||
const integrationUrl =
|
||||
ENVIRONMENT === 'staging'
|
||||
process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging'
|
||||
? 'https://vercel.com/integrations/supabase-v2-staging'
|
||||
: 'https://vercel.com/integrations/supabase-v2'
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import { useProjectSettingsQuery } from 'data/config/project-settings-query'
|
||||
import { useSSLEnforcementQuery } from 'data/ssl-enforcement/ssl-enforcement-query'
|
||||
import { useSSLEnforcementUpdateMutation } from 'data/ssl-enforcement/ssl-enforcement-update-mutation'
|
||||
import { useCheckPermissions, useFlag, useStore } from 'hooks'
|
||||
import { ENVIRONMENT } from 'lib/constants'
|
||||
|
||||
const SSLConfiguration = () => {
|
||||
const { ui } = useStore()
|
||||
@@ -58,7 +57,7 @@ const SSLConfiguration = () => {
|
||||
: false
|
||||
|
||||
const hasAccessToSSLEnforcement = !sslEnforcementConfiguration?.isNotAllowed
|
||||
const env = ENVIRONMENT === 'prod' ? 'prod' : 'staging'
|
||||
const env = process.env.NEXT_PUBLIC_ENVIRONMENT === 'prod' ? 'prod' : 'staging'
|
||||
const hasSSLCertificate =
|
||||
projectSettings?.project !== undefined &&
|
||||
new Date(projectSettings.project.inserted_at) >= new Date('2021-04-30')
|
||||
|
||||
+1
-2
@@ -28,7 +28,6 @@ import ShimmeringLoader from 'components/ui/ShimmeringLoader'
|
||||
import { useGithubBranchesQuery } from 'data/integrations/integrations-github-branches-query'
|
||||
import { Integration } from 'data/integrations/integrations.types'
|
||||
import { useSidePanelsStateSnapshot } from 'state/side-panels'
|
||||
import { ENVIRONMENT } from 'lib/constants'
|
||||
|
||||
interface GithubRepositorySelectionProps {
|
||||
integration?: Integration
|
||||
@@ -54,7 +53,7 @@ const GithubRepositorySelection = ({
|
||||
|
||||
const sidePanels = useSidePanelsStateSnapshot()
|
||||
const githubIntegrationAppUrl =
|
||||
ENVIRONMENT === 'prod'
|
||||
process.env.NEXT_PUBLIC_ENVIRONMENT === 'prod'
|
||||
? ' https://github.com/apps/supabase'
|
||||
: 'https://github.com/apps/supabase-local-testing'
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
export * from './infrastructure'
|
||||
export * from './metrics'
|
||||
|
||||
export const ENVIRONMENT: 'prod' | 'staging' =
|
||||
(process.env.NEXT_PUBLIC_ENVIRONMENT as 'prod' | 'staging') ?? 'staging'
|
||||
export const IS_PLATFORM = process.env.NEXT_PUBLIC_IS_PLATFORM === 'true'
|
||||
export const DEFAULT_HOME = IS_PLATFORM ? '/projects' : '/project/default'
|
||||
export const API_URL = IS_PLATFORM ? process.env.NEXT_PUBLIC_API_URL : '/api'
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { ENVIRONMENT } from '.'
|
||||
|
||||
export type CloudProvider = 'FLY' | 'AWS'
|
||||
export type Region = typeof AWS_REGIONS | typeof FLY_REGIONS
|
||||
|
||||
@@ -29,7 +27,7 @@ export const FLY_REGIONS = {
|
||||
} as const
|
||||
|
||||
export const AWS_REGIONS_DEFAULT =
|
||||
ENVIRONMENT !== 'prod' ? AWS_REGIONS.SOUTHEAST_ASIA : AWS_REGIONS.WEST_US
|
||||
process.env.NEXT_PUBLIC_ENVIRONMENT !== 'prod' ? AWS_REGIONS.SOUTHEAST_ASIA : AWS_REGIONS.WEST_US
|
||||
|
||||
// TO DO, change default to US region for prod
|
||||
export const FLY_REGIONS_DEFAULT = FLY_REGIONS.SOUTHEAST_ASIA
|
||||
@@ -56,7 +54,8 @@ export const PRICING_TIER_PRODUCT_IDS = {
|
||||
export const PRICING_TIER_FREE_KEY = 'FREE'
|
||||
export const PRICING_TIER_DEFAULT_KEY = 'FREE'
|
||||
|
||||
export const DEFAULT_PROVIDER: CloudProvider = ENVIRONMENT !== 'prod' ? 'FLY' : 'AWS'
|
||||
export const DEFAULT_PROVIDER: CloudProvider =
|
||||
process.env.NEXT_PUBLIC_ENVIRONMENT !== 'prod' ? 'FLY' : 'AWS'
|
||||
|
||||
export const PROVIDERS = {
|
||||
FLY: {
|
||||
|
||||
@@ -44,7 +44,6 @@ import {
|
||||
CloudProvider,
|
||||
DEFAULT_MINIMUM_PASSWORD_STRENGTH,
|
||||
DEFAULT_PROVIDER,
|
||||
ENVIRONMENT,
|
||||
FLY_REGIONS,
|
||||
PRICING_TIER_DEFAULT_KEY,
|
||||
PRICING_TIER_FREE_KEY,
|
||||
@@ -116,7 +115,7 @@ const Wizard: NextPageWithLayout = () => {
|
||||
const isSelectFreeTier = dbPricingTierKey === PRICING_TIER_FREE_KEY
|
||||
const hasMembersExceedingFreeTierLimit = (membersExceededLimit || []).length > 0
|
||||
|
||||
const showNonProdFields = ENVIRONMENT !== 'prod'
|
||||
const showNonProdFields = process.env.NEXT_PUBLIC_ENVIRONMENT !== 'prod'
|
||||
|
||||
const freePlanWithExceedingLimits =
|
||||
((isSelectFreeTier && !billedViaOrg) || orgSubscription?.plan?.id === 'free') &&
|
||||
@@ -237,7 +236,7 @@ const Wizard: NextPageWithLayout = () => {
|
||||
// [Fran] Enforce APSE1 region on staging
|
||||
function getAvailableRegions(cloudProvider: CloudProvider): Region {
|
||||
if (cloudProvider === 'AWS') {
|
||||
return ENVIRONMENT === 'staging'
|
||||
return process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging'
|
||||
? pluckObjectFields(AWS_REGIONS, ['SOUTHEAST_ASIA'])
|
||||
: AWS_REGIONS
|
||||
// to do - may need to pluck regions for staging for FLY also
|
||||
|
||||
Reference in new issue
Block a user