Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: Fix the env vars for turbo (#31104)

Ivan Vasilov84311e7d090f
diff --git a/apps/docs/features/directives/utils.ts b/apps/docs/features/directives/utils.ts
index d52e1fd94cd..e4b172272e0 100644
--- a/apps/docs/features/directives/utils.ts
+++ b/apps/docs/features/directives/utils.ts
@@ -8,7 +8,6 @@ import { mdxjs } from 'micromark-extension-mdxjs'
import remarkMkDocsAdmonition from '~/lib/mdx/plugins/remarkAdmonition'
import remarkPyMdownTabs from '~/lib/mdx/plugins/remarkTabs'
-import { getGitHubFileContents } from '~/lib/octokit'
import { getGitHubFileContentsImmutableOnly } from '~/lib/octokit'
import { codeSampleRemark } from './CodeSample'
diff --git a/apps/docs/lib/constants.ts b/apps/docs/lib/constants.ts
index 60b43f4d101..8b44aaff023 100644
--- a/apps/docs/lib/constants.ts
+++ b/apps/docs/lib/constants.ts
@@ -6,8 +6,6 @@ export const API_URL = (
export const BASE_PATH = process.env.NEXT_PUBLIC_BASE_PATH || '/docs'
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 IS_PRODUCTION = process.env.NEXT_PUBLIC_VERCEL_ENV === 'production'
-export const LOCAL_SUPABASE = process.env.NEXT_PUBLIC_LOCAL_SUPABASE === 'true'
export const MISC_URL = process.env.NEXT_PUBLIC_MISC_URL ?? ''
export const PROD_URL = `https://supabase.com${BASE_PATH}`
diff --git a/apps/docs/lib/octokit.ts b/apps/docs/lib/octokit.ts
index 155e6f20720..7f18c36e327 100644
--- a/apps/docs/lib/octokit.ts
+++ b/apps/docs/lib/octokit.ts
@@ -30,7 +30,7 @@ function octokit() {
return octokitInstance
}
-export async function getGitHubFileContents({
+async function getGitHubFileContents({
org,
repo,
path,
diff --git a/apps/studio/components/interfaces/Database/Extensions/ExtensionCard.tsx b/apps/studio/components/interfaces/Database/Extensions/ExtensionCard.tsx
index 44386c6351f..cc0e297858c 100644
--- a/apps/studio/components/interfaces/Database/Extensions/ExtensionCard.tsx
+++ b/apps/studio/components/interfaces/Database/Extensions/ExtensionCard.tsx
@@ -29,7 +29,6 @@ interface ExtensionCardProps {
const ExtensionCard = ({ extension }: ExtensionCardProps) => {
const { project } = useProjectContext()
- const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || ''
const isOn = extension.installed_version !== null
const isOrioleDb = useIsOrioleDb()
@@ -44,12 +43,10 @@ const ExtensionCard = ({ extension }: ExtensionCardProps) => {
const disabled = !canUpdateExtensions || orioleDbCheck
const X_PADDING = 'px-5'
- const extensionMeta = extensions.find((item: any) => item.name === extension.name)
+ const extensionMeta = extensions.find((item) => item.name === extension.name)
const docsUrl = extensionMeta?.link.startsWith('/guides')
- ? siteUrl === 'http://localhost:8082'
- ? `http://localhost:3001/docs${extensions.find((item) => item.name === extension.name)?.link}`
- : `https://supabase.com/docs${extensions.find((item) => item.name === extension.name)?.link}`
- : extensions.find((item: any) => item.name === extension.name)?.link ?? undefined
+ ? `https://supabase.com/docs${extensionMeta?.link}`
+ : extensionMeta?.link ?? undefined
const { mutate: disableExtension, isLoading: isDisabling } = useDatabaseExtensionDisableMutation({
onSuccess: () => {
diff --git a/apps/studio/components/interfaces/Realtime/Inspector/useRealtimeMessages.ts b/apps/studio/components/interfaces/Realtime/Inspector/useRealtimeMessages.ts
index 13b6030c517..adfff8d9a1e 100644
--- a/apps/studio/components/interfaces/Realtime/Inspector/useRealtimeMessages.ts
+++ b/apps/studio/components/interfaces/Realtime/Inspector/useRealtimeMessages.ts
@@ -101,15 +101,10 @@ export const useRealtimeMessages = (
return
}
- const globalOptions = merge(DEFAULT_GLOBAL_OPTIONS, {
- headers: {
- 'User-Agent': `supabase-api/${process.env.VERCEL_GIT_COMMIT_SHA || 'unknown-sha'}`,
- },
- })
const realtimeOptions = merge(DEFAULT_REALTIME_OPTIONS, { params: { log_level: logLevel } })
const options = {
- headers: globalOptions.headers,
+ headers: DEFAULT_GLOBAL_OPTIONS.headers,
...realtimeOptions,
params: { apikey: token, ...realtimeOptions.params },
}
diff --git a/apps/studio/components/interfaces/SignIn/SignInWithGitHub.tsx b/apps/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
index b21631e82c5..b98d02ed6e1 100644
--- a/apps/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
+++ b/apps/studio/components/interfaces/SignIn/SignInWithGitHub.tsx
@@ -4,6 +4,7 @@ import { useState } from 'react'
import { toast } from 'sonner'
import { BASE_PATH } from 'lib/constants'
+
import { auth, buildPathWithParams } from 'lib/gotrue'
import { Button } from 'ui'
import { useLastSignIn } from 'hooks/misc/useLastSignIn'
diff --git a/apps/studio/lib/constants/index.ts b/apps/studio/lib/constants/index.ts
index bf29f79cefa..8e7a4d27a2d 100644
--- a/apps/studio/lib/constants/index.ts
+++ b/apps/studio/lib/constants/index.ts
@@ -4,6 +4,8 @@ export * from './infrastructure'
export const IS_PLATFORM = process.env.NEXT_PUBLIC_IS_PLATFORM === 'true'
export const DEFAULT_HOME = IS_PLATFORM ? '/projects' : '/project/default'
+
+// TODO: Replace PG_META_URL with STUDIO_PG_META_URL and remove all references to PLATFORM_PG_META_URL
export const API_URL = IS_PLATFORM ? process.env.NEXT_PUBLIC_API_URL! : '/api'
export const PG_META_URL = IS_PLATFORM
? process.env.PLATFORM_PG_META_URL
diff --git a/apps/studio/lib/helpers.ts b/apps/studio/lib/helpers.ts
index b8f64247e0e..424be253d6f 100644
--- a/apps/studio/lib/helpers.ts
+++ b/apps/studio/lib/helpers.ts
@@ -59,8 +59,9 @@ export const getURL = () => {
const url =
process?.env?.NEXT_PUBLIC_SITE_URL && process.env.NEXT_PUBLIC_SITE_URL !== ''
? process.env.NEXT_PUBLIC_SITE_URL
- : process?.env?.VERCEL_URL && process.env.VERCEL_URL !== ''
- ? process.env.VERCEL_URL
+ : process?.env?.NEXT_PUBLIC_VERCEL_BRANCH_URL &&
+ process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL !== ''
+ ? process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL
: 'https://supabase.com/dashboard'
return url.includes('http') ? url : `https://${url}`
}
diff --git a/apps/studio/next.config.js b/apps/studio/next.config.js
index a8c453c94e2..6b9fb11e30c 100644
--- a/apps/studio/next.config.js
+++ b/apps/studio/next.config.js
@@ -64,7 +64,7 @@ const STYLE_SRC_URLS = `${CLOUDFLARE_CDN_URL}`
const FONT_SRC_URLS = `${CLOUDFLARE_CDN_URL}`
const csp = [
- ...(process.env.VERCEL_ENV === 'preview' ||
+ ...(process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview' ||
process.env.NEXT_PUBLIC_ENVIRONMENT === 'local' ||
process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging'
? [
@@ -109,8 +109,7 @@ const nextConfig = {
return [
{
source: `/.well-known/vercel/flags`,
- // TODO: Replace this with supabase.com/.well-known/vercel/flags once this PR is merged.
- destination: `${process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : process.env.NEXT_PUBLIC_SITE_URL}${process.env.NEXT_PUBLIC_BASE_PATH}/.well-known/vercel/flags`,
+ destination: `https://supabase.com/.well-known/vercel/flags`,
basePath: false,
},
]
diff --git a/apps/www/components/LaunchWeek/13/Ticket/TicketForm.tsx b/apps/www/components/LaunchWeek/13/Ticket/TicketForm.tsx
index 843b920d9bd..0b111c67ed0 100644
--- a/apps/www/components/LaunchWeek/13/Ticket/TicketForm.tsx
+++ b/apps/www/components/LaunchWeek/13/Ticket/TicketForm.tsx
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react'
import { SupabaseClient } from '@supabase/supabase-js'
import { useRouter } from 'next/router'
-import { SITE_ORIGIN } from '~/lib/constants'
+import { LW_URL } from '~/lib/constants'
import { Button } from 'ui'
import { useKey } from 'react-use'
@@ -126,9 +126,7 @@ export default function TicketForm() {
setFormState('loading')
setTicketState('loading')
- const redirectTo = `${SITE_ORIGIN}/launch-week/${
- userData.username ? '?referral=' + userData.username : ''
- }`
+ const redirectTo = `${LW_URL}${userData.username ? '?referral=' + userData.username : ''}`
supabase?.auth.signInWithOAuth({
provider: 'github',
diff --git a/apps/www/components/LaunchWeek/hooks/useLwGame.tsx b/apps/www/components/LaunchWeek/hooks/useLwGame.tsx
index a9132f7119f..6f785536106 100644
--- a/apps/www/components/LaunchWeek/hooks/useLwGame.tsx
+++ b/apps/www/components/LaunchWeek/hooks/useLwGame.tsx
@@ -9,7 +9,7 @@ const SUPA_SECRET_CODE = 'ship'
// ============================================
import { RefObject, useEffect, useState } from 'react'
-import { SITE_ORIGIN } from '~/lib/constants'
+import { SITE_ORIGIN, LW_URL } from '~/lib/constants'
import useConfData from './use-conf-data'
const useLwGame = (inputRef?: RefObject<HTMLInputElement>, disabled?: boolean) => {
@@ -36,9 +36,7 @@ const useLwGame = (inputRef?: RefObject<HTMLInputElement>, disabled?: boolean) =
}
const handleGithubSignIn = async () => {
- const redirectTo = `${SITE_ORIGIN}/launch-week/${
- user.username ? '?referral=' + user.username : ''
- }`
+ const redirectTo = `${LW_URL}${user.username ? '?referral=' + user.username : ''}`
supabase?.auth.signInWithOAuth({
provider: 'github',
diff --git a/apps/www/lib/constants.ts b/apps/www/lib/constants.ts
index 008cd6e24b6..9408529a8ab 100644
--- a/apps/www/lib/constants.ts
+++ b/apps/www/lib/constants.ts
@@ -25,21 +25,18 @@ export enum PRODUCT_SHORTNAMES {
VECTOR = 'vector',
}
-// Launch Weeek
+// Launch Week
export const SAMPLE_TICKET_NUMBER = 1234
-export const SITE_URL =
- process.env.NEXT_PUBLIC_VERCEL_ENV === 'production'
- ? 'https://supabase.com/launch-week'
- : process.env.NEXT_PUBLIC_VERCEL_URL
- ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/launch-week`
- : 'http://localhost:3000/launch-week'
-export const LW_URL =
+
+export const SITE_ORIGIN =
process.env.NEXT_PUBLIC_VERCEL_ENV === 'production'
- ? 'https://supabase.com/launch-week'
- : process.env.NEXT_PUBLIC_VERCEL_URL
- ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/launch-week`
- : 'http://localhost:3000/launch-week'
-export const SITE_ORIGIN = new URL(SITE_URL).origin
+ ? 'https://supabase.com'
+ : process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL
+ ? `https://${process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL}`
+ : 'http://localhost:3000'
+
+export const LW_URL = `${SITE_ORIGIN}/launch-week`
+
export const TWITTER_USER_NAME = 'supabase'
export const LW7_DATE = 'April 10th 2023'
export const LW8_DATE = 'August 7-11'
diff --git a/apps/www/lib/supabaseAdmin.ts b/apps/www/lib/supabaseAdmin.ts
deleted file mode 100644
index cdafdb130e3..00000000000
--- a/apps/www/lib/supabaseAdmin.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { createClient } from '@supabase/supabase-js'
-import { Database } from './database.types'
-
-const supabaseAdmin = createClient<Database>(
- process.env.NEXT_PUBLIC_SUPABASE_URL!,
- process.env.LIVE_SUPABASE_COM_SERVICE_ROLE_KEY!
-)
-
-export type SupabaseClient = typeof supabaseAdmin
-
-export default supabaseAdmin
diff --git a/apps/www/lib/supabaseMiscAdmin.ts b/apps/www/lib/supabaseMiscAdmin.ts
deleted file mode 100644
index 2a9791fed85..00000000000
--- a/apps/www/lib/supabaseMiscAdmin.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { createClient } from '@supabase/supabase-js'
-import { Database } from './database.types'
-
-const supabaseMiscAdmin = createClient<Database>(
- process.env.NEXT_PUBLIC_MISC_USE_URL!,
- process.env.MISC_USE_SERVICE_ROLE_KEY!
-)
-
-export type SupabaseClient = typeof supabaseMiscAdmin
-
-export default supabaseMiscAdmin
diff --git a/apps/www/pages/events/[slug].tsx b/apps/www/pages/events/[slug].tsx
index 372d7ccc2d1..3e88da25306 100644
--- a/apps/www/pages/events/[slug].tsx
+++ b/apps/www/pages/events/[slug].tsx
@@ -191,12 +191,6 @@ const EventPage = ({ event }: InferGetStaticPropsType<typeof getStaticProps>) =>
await Telemetry.sendEvent(event, telemetryProps, router)
}
- const origin = isBrowser
- ? location.origin
- : process.env.VERCEL_URL
- ? process.env.VERCEL_URL
- : 'https://supabase.com'
-
return (
<>
<NextSeo
diff --git a/apps/www/pages/launch-week/7/index.tsx b/apps/www/pages/launch-week/7/index.tsx
index e5f61688ae2..a0880a15dd3 100644
--- a/apps/www/pages/launch-week/7/index.tsx
+++ b/apps/www/pages/launch-week/7/index.tsx
@@ -4,7 +4,7 @@ import { useEffect } from 'react'
import dynamic from 'next/dynamic'
import { createClient } from '@supabase/supabase-js'
-import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'
+import { LW_URL, SITE_ORIGIN } from '~/lib/constants'
import DefaultLayout from '~/components/Layouts/Default'
import SectionContainer from '~/components/Layouts/SectionContainer'
@@ -46,7 +46,7 @@ export default function TicketHome({ users }: Props) {
openGraph={{
title: TITLE,
description: DESCRIPTION,
- url: SITE_URL,
+ url: LW_URL,
images: [
{
url: OG_IMAGE,
diff --git a/apps/www/pages/launch-week/8/index.tsx b/apps/www/pages/launch-week/8/index.tsx
index 44d75858a11..5c95b0b948a 100644
--- a/apps/www/pages/launch-week/8/index.tsx
+++ b/apps/www/pages/launch-week/8/index.tsx
@@ -8,7 +8,7 @@ import Image from 'next/image'
import { useRouter } from 'next/router'
import { NextSeo } from 'next-seo'
import { createClient, Session, SupabaseClient } from '@supabase/supabase-js'
-import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'
+import { SITE_ORIGIN, LW_URL } from '~/lib/constants'
import DefaultLayout from '~/components/Layouts/Default'
import { TicketState, ConfDataContext, UserData } from '~/components/LaunchWeek/hooks/use-conf-data'
@@ -105,7 +105,7 @@ export default function TicketHome({ users, meetups }: Props) {
openGraph={{
title: TITLE,
description: DESCRIPTION,
- url: SITE_URL,
+ url: LW_URL,
images: [
{
url: OG_IMAGE,
diff --git a/apps/www/pages/launch-week/tickets/[username].tsx b/apps/www/pages/launch-week/tickets/[username].tsx
index 5e863b43cae..eebcedc8cef 100644
--- a/apps/www/pages/launch-week/tickets/[username].tsx
+++ b/apps/www/pages/launch-week/tickets/[username].tsx
@@ -6,7 +6,7 @@ import Link from 'next/link'
import Error from 'next/error'
import { createClient, Session } from '@supabase/supabase-js'
import { Button } from 'ui'
-import { SITE_URL, LW_URL } from '~/lib/constants'
+import { LW_URL, SITE_ORIGIN } from '~/lib/constants'
import supabase from '~/lib/supabase'
import { Database } from '~/lib/database.types'
import { AnimatePresence, m, LazyMotion, domAnimation } from 'framer-motion'
@@ -32,7 +32,6 @@ export default function UsernamePage({ user, ogImageUrl }: Props) {
const DISPLAY_NAME = name || username
const TITLE = `${DISPLAY_NAME ? DISPLAY_NAME.split(' ')[0] + '’s' : 'Get your'} Launch Week Ticket`
const DESCRIPTION = `Claim your Supabase Launch Week 13 ticket for a chance to win supa swag.`
- const PAGE_URL = `${LW_URL}/tickets/${username}`
const [session] = useState<Session | null>(null)
const [ticketState, setTicketState] = useState<TicketState>('ticket')
@@ -53,7 +52,7 @@ export default function UsernamePage({ user, ogImageUrl }: Props) {
openGraph={{
title: TITLE,
description: DESCRIPTION,
- url: PAGE_URL,
+ url: `${LW_URL}/tickets/${username}`,
images: [
{
url: ogImageUrl,
@@ -99,7 +98,7 @@ export default function UsernamePage({ user, ogImageUrl }: Props) {
<div>
<Button type="primary" asChild size="small">
<Link
- href={`${SITE_URL}${username ? '?referral=' + username : ''}`}
+ href={`${LW_URL}${username ? '?referral=' + username : ''}`}
className="pointer-events-auto"
>
Claim your ticket
@@ -135,16 +134,9 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
process.env.LIVE_SUPABASE_COM_SERVICE_ROLE_KEY!
)
- const SITE_URL = process.env.VERCEL_URL
- ? `https://${process.env.VERCEL_URL}`
- : 'http://localhost:3000'
-
// fetch the normal ticket
// stores the og images in supabase storage
- fetch(
- // @ts-ignore
- `${SITE_URL}/api-v2/ticket-og?username=${encodeURIComponent(username ?? '')}`
- )
+ fetch(`${SITE_ORIGIN}/api-v2/ticket-og?username=${encodeURIComponent(username ?? '')}`)
// fetch a specific user
if (username) {
@@ -161,11 +153,13 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
// fetch the platinum ticket
// stores the og images in supabase storage
if (user?.secret) {
- fetch(`${SITE_URL}/api-v2/ticket-og?username=${encodeURIComponent(username ?? '')}&secret=true`)
+ fetch(
+ `${SITE_ORIGIN}/api-v2/ticket-og?username=${encodeURIComponent(username ?? '')}&secret=true`
+ )
} else if (user?.platinum) {
// fetch /api-v2/ticket-og
fetch(
- `${SITE_URL}/api-v2/ticket-og?username=${encodeURIComponent(username ?? '')}&platinum=true`
+ `${SITE_ORIGIN}/api-v2/ticket-og?username=${encodeURIComponent(username ?? '')}&platinum=true`
)
}
diff --git a/apps/www/pages/launch-week/x/index.tsx b/apps/www/pages/launch-week/x/index.tsx
index b7c95a7d14b..38d5fc507ca 100644
--- a/apps/www/pages/launch-week/x/index.tsx
+++ b/apps/www/pages/launch-week/x/index.tsx
@@ -4,7 +4,7 @@ import { GetServerSideProps } from 'next'
import { useRouter } from 'next/router'
import { NextSeo } from 'next-seo'
import { Session } from '@supabase/supabase-js'
-import { SITE_ORIGIN, SITE_URL } from '~/lib/constants'
+import { LW_URL, SITE_ORIGIN } from '~/lib/constants'
import supabase from '~/lib/supabaseMisc'
import FaviconImports from '~/components/LaunchWeek/X/FaviconImports'
@@ -91,7 +91,7 @@ export default function LaunchWeekIndex({ meetups }: Props) {
openGraph={{
title: TITLE,
description: DESCRIPTION,
- url: SITE_URL,
+ url: LW_URL,
images: [
{
url: OG_IMAGE,
diff --git a/packages/ui/src/layout/banners/data/constants.ts b/packages/ui/src/layout/banners/data/constants.ts
deleted file mode 100644
index 35fd0da945e..00000000000
--- a/packages/ui/src/layout/banners/data/constants.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export const LW_SITE_URL =
- process.env.NEXT_PUBLIC_VERCEL_ENV === 'production'
- ? 'https://supabase.com/ga-week'
- : process.env.NEXT_PUBLIC_VERCEL_URL
- ? `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/ga-week`
- : 'http://localhost:3000/ga-week'
-
-export const LW8_END_DATE = '2023-08-11T23:59:59.999-07:00'
diff --git a/turbo.json b/turbo.json
index c477be7eec8..10f2da53316 100644
--- a/turbo.json
+++ b/turbo.json
@@ -8,22 +8,51 @@
},
"design-system#build": {
"dependsOn": ["^build"],
- "env": ["NEXT_PUBLIC_*"],
+ "env": [
+ "NEXT_PUBLIC_BASE_PATH",
+ "NEXT_PUBLIC_APP_URL",
+ // These envs are used in the packages
+ "NEXT_PUBLIC_STORAGE_KEY",
+ "NEXT_PUBLIC_AUTH_DEBUG_KEY",
+ "NEXT_PUBLIC_AUTH_PERSISTED_KEY",
+ "NEXT_PUBLIC_AUTH_NAVIGATOR_LOCK_KEY",
+ "NEXT_PUBLIC_AUTH_DETECT_SESSION_IN_URL",
+ "NEXT_PUBLIC_GOTRUE_URL",
+ "NEXT_PUBLIC_SUPABASE_ANON_KEY"
+ ],
"outputs": [".next/**", "!.next/cache/**", ".contentlayer/**"]
},
"docs#build": {
"dependsOn": ["^build"],
"env": [
"ANALYZE",
+ "NEXT_PUBLIC_SUPABASE_URL",
+ "NEXT_PUBLIC_SUPABASE_ANON_KEY",
+ "NEXT_PUBLIC_MISC_URL",
+ "NEXT_PUBLIC_MISC_ANON_KEY",
+ "NODE_ENV",
+ "NEXT_PUBLIC_API_URL",
+ "NEXT_PUBLIC_BASE_PATH",
+ "NEXT_PUBLIC_SITE_URL",
+ "NEXT_PUBLIC_DEV_AUTH_PAGE",
+ "NEXT_PUBLIC_IS_PLATFORM",
+ "NEXT_PUBLIC_VERCEL_ENV",
+ // These envs are used in the packages
+ "NEXT_PUBLIC_STORAGE_KEY",
+ "NEXT_PUBLIC_AUTH_DEBUG_KEY",
+ "NEXT_PUBLIC_AUTH_PERSISTED_KEY",
+ "NEXT_PUBLIC_AUTH_NAVIGATOR_LOCK_KEY",
+ "NEXT_PUBLIC_AUTH_DETECT_SESSION_IN_URL",
+ "NEXT_PUBLIC_GOTRUE_URL",
+ "NEXT_PUBLIC_SUPABASE_ANON_KEY",
+ // These envs are technically passthrough env vars because they're only used on the server side of Nextjs
"DOCS_GITHUB_APP_ID",
"DOCS_GITHUB_APP_INSTALLATION_ID",
"DOCS_GITHUB_APP_PRIVATE_KEY",
"DOCS_REVALIDATION_KEYS",
"DOCS_REVALIDATION_OVERRIDE_KEYS",
- "NEXT_PUBLIC_*",
- "NODE_ENV",
- "OPENAI_API_KEY",
- "SUPABASE_SECRET_KEY"
+ "SUPABASE_SECRET_KEY",
+ "OPENAI_API_KEY"
],
"inputs": ["$TURBO_DEFAULT$", "../../examples"],
"outputs": [".next/**", "!.next/cache/**"]
@@ -32,47 +61,86 @@
"dependsOn": ["^build"],
"env": [
"ANALYZE",
- "AUTH_JWT_SECRET",
- "DEFAULT_ORGANIZATION_NAME",
- "DEFAULT_PROJECT_NAME",
- "DOCS_GITHUB_APP_ID",
- "DOCS_GITHUB_APP_INSTALLATION_ID",
- "DOCS_GITHUB_APP_PRIVATE_KEY",
- "LOGFLARE_API_KEY",
- "LOGFLARE_URL",
- "NEXT_PUBLIC_*",
- "OPENAI_API_KEY",
+ "NEXT_PUBLIC_SUPPORT_API_URL",
+ "NEXT_PUBLIC_BASE_PATH",
+ "NEXT_PUBLIC_STRIPE_PUBLIC_KEY",
+ "NEXT_PUBLIC_SUPPORT_ANON_KEY",
+ "NEXT_PUBLIC_ENVIRONMENT",
+ "NEXT_PUBLIC_IS_PLATFORM",
+ "NEXT_PUBLIC_SITE_URL",
+ "NEXT_PUBLIC_API_URL",
+ "NEXT_PUBLIC_CONFIGCAT_SDK_KEY",
+ "NEXT_PUBLIC_HCAPTCHA_SITE_KEY",
+ "NEXT_PUBLIC_SUPABASE_URL",
+ "NEXT_PUBLIC_SUPABASE_ANON_KEY",
+ "NEXT_PUBLIC_NODE_ENV",
+ "NEXT_PUBLIC_GOTRUE_URL",
+ "NEXT_PUBLIC_VERCEL_BRANCH_URL",
+ "SUPABASE_URL",
+ // These envs are used in the packages
+ "NEXT_PUBLIC_STORAGE_KEY",
+ "NEXT_PUBLIC_AUTH_DEBUG_KEY",
+ "NEXT_PUBLIC_AUTH_PERSISTED_KEY",
+ "NEXT_PUBLIC_AUTH_NAVIGATOR_LOCK_KEY",
+ "NEXT_PUBLIC_AUTH_DETECT_SESSION_IN_URL",
+ "NEXT_PUBLIC_VERCEL_ENV",
+ // These envs are technically passthrough env vars because they're only used on the server side of Nextjs
"PLATFORM_PG_META_URL",
- "READ_ONLY_API_KEY",
- "READ_ONLY_URL",
"STUDIO_PG_META_URL",
+ "READ_ONLY_URL",
+ "READ_ONLY_API_KEY",
+ "SUPABASE_SERVICE_KEY",
"SUPABASE_ANON_KEY",
"SUPABASE_PUBLIC_URL",
- "SUPABASE_SERVICE_KEY",
- "SUPABASE_URL",
- "VERCEL_GIT_COMMIT_SHA",
- "VERCEL_ENV",
- "VERCEL_URL"
+ "DEFAULT_PROJECT_NAME",
+ "DEFAULT_ORGANIZATION_NAME",
+ "OPENAI_API_KEY",
+ "AUTH_JWT_SECRET",
+ "LOGFLARE_URL",
+ "LOGFLARE_API_KEY",
+ "SENTRY_ORG",
+ "SENTRY_PROJECT",
+ "SENTRY_AUTH_TOKEN"
],
- "passThroughEnv": ["SENTRY_ORG", "SENTRY_PROJECT", "SENTRY_AUTH_TOKEN"],
"outputs": [".next/**", "!.next/cache/**"]
},
"www#build": {
"dependsOn": ["^build"],
"env": [
"ANALYZE",
- "GITHUB_CHANGELOG_APP_*",
- "MISC_USE_SERVICE_ROLE_KEY",
- "NEXT_PUBLIC_*",
+ "NEXT_PUBLIC_MISC_USE_URL",
+ "NEXT_PUBLIC_MISC_USE_ANON_KEY",
+ "NEXT_PUBLIC_STUDIO_URL",
+ "NEXT_PUBLIC_DOCS_URL",
+ "NEXT_PUBLIC_REFERENCE_DOCS_URL",
+ "NEXT_PUBLIC_SUPABASE_URL",
+ "NEXT_PUBLIC_SUPABASE_ANON_KEY",
+ "NEXT_PUBLIC_VERCEL_ENV",
+ "NEXT_PUBLIC_VERCEL_BRANCH_URL",
+ "NEXT_PUBLIC_API_URL",
"NODE_ENV",
- "OPENAI_API_KEY",
- "npm_lifecycle_event",
+ // These envs are used in the packages
+ "NEXT_PUBLIC_STORAGE_KEY",
+ "NEXT_PUBLIC_AUTH_DEBUG_KEY",
+ "NEXT_PUBLIC_AUTH_PERSISTED_KEY",
+ "NEXT_PUBLIC_AUTH_NAVIGATOR_LOCK_KEY",
+ "NEXT_PUBLIC_IS_PLATFORM",
+ "NEXT_PUBLIC_AUTH_DETECT_SESSION_IN_URL",
+ "NEXT_PUBLIC_GOTRUE_URL",
+ "NEXT_PUBLIC_BASE_PATH",
+ // These envs are technically passthrough env vars because they're only used on the server side of Nextjs
"LIVE_SUPABASE_COM_SERVICE_ROLE_KEY",
- "VERCEL_URL",
+ "GITHUB_CHANGELOG_APP_ID",
+ "GITHUB_CHANGELOG_APP_INSTALLATION_ID",
+ "GITHUB_CHANGELOG_APP_REST_KEY",
+ "GITHUB_CHANGELOG_APP_PRIVATE_KEY",
+ "NEXT_PUBLIC_EMAIL_ABUSE_URL",
+ "EMAIL_ABUSE_SERVICE_KEY",
"HUBSPOT_PORTAL_ID",
"HUBSPOT_ENTERPRISE_FORM_GUID",
+ "OPENAI_API_KEY",
"EMAIL_REPORT_SLACK_WEBHOOK",
- "EMAIL_ABUSE_SERVICE_KEY"
+ "npm_lifecycle_event"
],
"outputs": [".next/**", "!.next/cache/**", ".contentlayer/**"]
},
@@ -91,7 +159,7 @@
},
"typecheck": {
"dependsOn": ["^typecheck"],
- "outputs": ["**/node_modules/.cache/tsbuildinfo.json"]
+ "outputs": []
}
}
}