getBasePath() — supabase Function Reference
Architecture documentation for the getBasePath() function in EdgeFunctions.utils.ts from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD 6d7786a7_ce8f_60c1_ea38_9688d45a0a97["getBasePath()"] c5700ff2_66d2_9ed0_fc8b_024d4cc74563["formatFunctionBodyToFiles()"] c5700ff2_66d2_9ed0_fc8b_024d4cc74563 -->|calls| 6d7786a7_ce8f_60c1_ea38_9688d45a0a97 style 6d7786a7_ce8f_60c1_ea38_9688d45a0a97 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/EdgeFunctions/EdgeFunctions.utils.ts lines 40–57
function getBasePath(entrypoint: string | undefined, fileNames: string[]): string {
if (!entrypoint) {
return '/'
}
let candidate = fileNames.find((name) => entrypoint.endsWith(name))
if (candidate) {
return dirname(candidate)
} else {
try {
return dirname(new URL(entrypoint).pathname)
} catch (e) {
console.error('Failed to parse entrypoint', entrypoint)
return '/'
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does getBasePath() do?
getBasePath() is a function in the supabase codebase.
What calls getBasePath()?
getBasePath() is called by 1 function(s): formatFunctionBodyToFiles.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free