transformFileContent() — ui Function Reference
Architecture documentation for the transformFileContent() function in route.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 3027f0e2_62a8_b39f_5810_4976d61dd799["transformFileContent()"] 2306a3f2_6413_2045_0888_633ffb84f9ee["route.ts"] 3027f0e2_62a8_b39f_5810_4976d61dd799 -->|defined in| 2306a3f2_6413_2045_0888_633ffb84f9ee 883da9d7_d65a_9fb0_bb2c_8fa923c8fb02["getRegistryItemFile()"] 883da9d7_d65a_9fb0_bb2c_8fa923c8fb02 -->|calls| 3027f0e2_62a8_b39f_5810_4976d61dd799 style 3027f0e2_62a8_b39f_5810_4976d61dd799 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/app/(create)/create/v0/route.ts lines 352–374
async function transformFileContent(
content: string,
config: z.infer<typeof configSchema>
) {
const project = new Project({
compilerOptions: {},
})
const sourceFile = project.createSourceFile("component.tsx", content, {
scriptKind: ScriptKind.TSX,
})
for (const transformer of transformers) {
await transformer({
filename: "component.tsx",
raw: content,
sourceFile,
config,
})
}
return sourceFile.getText()
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does transformFileContent() do?
transformFileContent() is a function in the ui codebase, defined in apps/v4/app/(create)/create/v0/route.ts.
Where is transformFileContent() defined?
transformFileContent() is defined in apps/v4/app/(create)/create/v0/route.ts at line 352.
What calls transformFileContent()?
transformFileContent() is called by 1 function(s): getRegistryItemFile.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free