buildUrlFromRegistryConfig() — ui Function Reference
Architecture documentation for the buildUrlFromRegistryConfig() function in builder.ts from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 54b97bda_af9c_6ff3_2991_48d3997a5614["buildUrlFromRegistryConfig()"] 8c5b2947_9033_b37b_2596_f9777d2a7f77["builder.ts"] 54b97bda_af9c_6ff3_2991_48d3997a5614 -->|defined in| 8c5b2947_9033_b37b_2596_f9777d2a7f77 b89897ed_a718_3b68_b54b_4dbc4c63943b["buildUrlAndHeadersForRegistryItem()"] b89897ed_a718_3b68_b54b_4dbc4c63943b -->|calls| 54b97bda_af9c_6ff3_2991_48d3997a5614 2e80b3f1_039f_c362_c430_f5d0822b22ea["appendQueryParams()"] 54b97bda_af9c_6ff3_2991_48d3997a5614 -->|calls| 2e80b3f1_039f_c362_c430_f5d0822b22ea style 54b97bda_af9c_6ff3_2991_48d3997a5614 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shadcn/src/registry/builder.ts lines 52–76
export function buildUrlFromRegistryConfig(
item: string,
registryConfig: z.infer<typeof registryConfigItemSchema>,
config?: Config
) {
if (typeof registryConfig === "string") {
let url = registryConfig.replace(NAME_PLACEHOLDER, item)
if (config?.style && url.includes(STYLE_PLACEHOLDER)) {
url = url.replace(STYLE_PLACEHOLDER, config.style)
}
return expandEnvVars(url)
}
let baseUrl = registryConfig.url.replace(NAME_PLACEHOLDER, item)
if (config?.style && baseUrl.includes(STYLE_PLACEHOLDER)) {
baseUrl = baseUrl.replace(STYLE_PLACEHOLDER, config.style)
}
baseUrl = expandEnvVars(baseUrl)
if (!registryConfig.params) {
return baseUrl
}
return appendQueryParams(baseUrl, registryConfig.params)
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does buildUrlFromRegistryConfig() do?
buildUrlFromRegistryConfig() is a function in the ui codebase, defined in packages/shadcn/src/registry/builder.ts.
Where is buildUrlFromRegistryConfig() defined?
buildUrlFromRegistryConfig() is defined in packages/shadcn/src/registry/builder.ts at line 52.
What does buildUrlFromRegistryConfig() call?
buildUrlFromRegistryConfig() calls 1 function(s): appendQueryParams.
What calls buildUrlFromRegistryConfig()?
buildUrlFromRegistryConfig() is called by 1 function(s): buildUrlAndHeadersForRegistryItem.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free