getFileContent() — ui Function Reference
Architecture documentation for the getFileContent() function in registry.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD c743b8aa_a35c_4c96_c711_c91af6b33fba["getFileContent()"] a2cd9f1d_8dbe_d488_4209_1dbd8f522cc1["registry.ts"] c743b8aa_a35c_4c96_c711_c91af6b33fba -->|defined in| a2cd9f1d_8dbe_d488_4209_1dbd8f522cc1 e7d34ace_4c02_90be_4798_c4bf467583f2["getRegistryItem()"] e7d34ace_4c02_90be_4798_c4bf467583f2 -->|calls| c743b8aa_a35c_4c96_c711_c91af6b33fba 0fa50f6a_094e_5135_c598_8c14721a1d3f["fixImport()"] c743b8aa_a35c_4c96_c711_c91af6b33fba -->|calls| 0fa50f6a_094e_5135_c598_8c14721a1d3f style c743b8aa_a35c_4c96_c711_c91af6b33fba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/lib/registry.ts lines 171–184
async function getFileContent(file: z.infer<typeof registryItemFileSchema>) {
let code = await fs.readFile(file.path, "utf-8")
// Some registry items uses default export.
// We want to use named export instead.
if (file.type !== "registry:page") {
code = code.replaceAll("export default", "export")
}
// Fix imports.
code = fixImport(code)
return code
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does getFileContent() do?
getFileContent() is a function in the ui codebase, defined in apps/v4/lib/registry.ts.
Where is getFileContent() defined?
getFileContent() is defined in apps/v4/lib/registry.ts at line 171.
What does getFileContent() call?
getFileContent() calls 1 function(s): fixImport.
What calls getFileContent()?
getFileContent() is called by 1 function(s): getRegistryItem.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free