mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
feat(studio-local): functions management api - function details (#42322)
Functions page on self-hosted differs from Platform Adds the possibility to see function details page in Self-Host version. ## Summary by CodeRabbit * **New Features** * Edge function detail lookup added for self‑hosted deployments (new retrieval endpoint & store method). * Consistent navigation to function pages from the functions list. * **Improvements** * UI tabs, download, and test controls adapt to deployment type. * Region, JWT verification, local development, and delete controls shown only on the platform. * Edit/save/delete controls enable/disable correctly based on deployment and permissions. * Function details load reliably across deployments.
This commit is contained in:
1 parent
d1c6cbacbd
commit
8c3655cd71
7 files changed
+303
-220
No files matched your search
@@ -18,6 +18,17 @@ export class FileSystemFunctionsArtifactStore {
|
||||
|
||||
return functionsArtifacts.filter((f) => f !== undefined)
|
||||
}
|
||||
|
||||
async getFunctionBySlug(slug: string): Promise<FunctionArtifact | undefined> {
|
||||
const dirEntries = await readdir(this.folderPath, { withFileTypes: true })
|
||||
|
||||
const functionFolder = dirEntries.find(
|
||||
(dir) => dir.isDirectory() && dir.name !== 'main' && dir.name === slug
|
||||
)
|
||||
if (!functionFolder) return
|
||||
|
||||
return parseFolderToFunctionArtifact(functionFolder)
|
||||
}
|
||||
}
|
||||
|
||||
async function parseFolderToFunctionArtifact(
|
||||
|
||||
Reference in new issue
Block a user