transform-next.ts — ui Source File
Architecture documentation for transform-next.ts, a typescript file in the ui codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6f4c4350_c0ee_0942_79c2_4f6ec807db84["transform-next.ts"] e69863ed_3e2f_ef94_648a_ef0155c386ef["transformers"] 6f4c4350_c0ee_0942_79c2_4f6ec807db84 --> e69863ed_3e2f_ef94_648a_ef0155c386ef style 6f4c4350_c0ee_0942_79c2_4f6ec807db84 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { Transformer } from "@/src/utils/transformers"
export const transformNext: Transformer = async ({ sourceFile }) => {
// export function middleware.
sourceFile.getFunctions().forEach((func) => {
if (func.getName() === "middleware") {
func.rename("proxy")
}
})
// export const middleware.
sourceFile.getVariableDeclarations().forEach((variable) => {
if (variable.getName() === "middleware") {
variable.rename("proxy")
}
})
// export { handler as middleware }.
sourceFile.getExportDeclarations().forEach((exportDecl) => {
const namedExports = exportDecl.getNamedExports()
namedExports.forEach((namedExport) => {
if (namedExport.getName() === "middleware") {
namedExport.setName("proxy")
}
const aliasNode = namedExport.getAliasNode()
if (aliasNode?.getText() === "middleware") {
namedExport.setAlias("proxy")
}
})
})
return sourceFile
}
Domain
Subdomains
Functions
Dependencies
- transformers
Source
Frequently Asked Questions
What does transform-next.ts do?
transform-next.ts is a source file in the ui codebase, written in typescript. It belongs to the FrameworkTooling domain, TemplateSync subdomain.
What functions are defined in transform-next.ts?
transform-next.ts defines 1 function(s): transformNext.
What does transform-next.ts depend on?
transform-next.ts imports 1 module(s): transformers.
Where is transform-next.ts in the architecture?
transform-next.ts is located at packages/shadcn/src/utils/transformers/transform-next.ts (domain: FrameworkTooling, subdomain: TemplateSync, directory: packages/shadcn/src/utils/transformers).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free