fix: support nimbus project urls for testing edge functions (#39548)

This commit is contained in:
Alaister Young authored and GitHub committed 2025-10-15 15:12:35 +08:00
1 parent 7ff8724481
commit ec6c90bce2
2 files changed
+10 -1

No files matched your search

+8
View File
@@ -1,4 +1,12 @@
const NIMBUS_PROD_PROJECTS_URL = process.env.NIMBUS_PROD_PROJECTS_URL
export const isValidEdgeFunctionURL = (url: string) => {
if (NIMBUS_PROD_PROJECTS_URL !== undefined) {
const apexDomain = NIMBUS_PROD_PROJECTS_URL.replace('https://*.', '').replace(/\./g, '\\.')
const nimbusRegex = new RegExp('^https://[a-z]*\\.' + apexDomain + '/functions/v[0-9]{1}/.*$')
return nimbusRegex.test(url)
}
const regexValidEdgeFunctionURL = new RegExp(
'^https://[a-z]*.supabase.(red|co)/functions/v[0-9]{1}/.*$'
)
+2 -1
View File
@@ -112,7 +112,8 @@
"VERCEL_URL",
"IS_THROTTLED",
"AI_PRO_MODEL",
"AI_NORMAL_MODEL"
"AI_NORMAL_MODEL",
"NIMBUS_PROD_PROJECTS_URL"
],
"passThroughEnv": ["CURRENT_CLI_VERSION", "VERCEL_GIT_COMMIT_SHA"],
"outputs": [".next/**", "!.next/cache/**"]