context.ts — ui Source File
Architecture documentation for context.ts, a typescript file in the ui codebase. 0 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 9c06945e_ff8c_6208_b456_06ff9c3a854a["context.ts"] 9a2ee0f9_d989_1165_589f_f10c64d3de86["resolver.test.ts"] 9a2ee0f9_d989_1165_589f_f10c64d3de86 --> 9c06945e_ff8c_6208_b456_06ff9c3a854a style 9c06945e_ff8c_6208_b456_06ff9c3a854a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
interface RegistryContext {
headers: Record<string, Record<string, string>>
}
let context: RegistryContext = {
headers: {},
}
export function setRegistryHeaders(
headers: Record<string, Record<string, string>>
) {
// Merge new headers with existing ones to preserve headers for nested dependencies
context.headers = { ...context.headers, ...headers }
}
export function getRegistryHeadersFromContext(
url: string
): Record<string, string> {
return context.headers[url] || {}
}
export function clearRegistryContext() {
context.headers = {}
}
Domain
Subdomains
Types
Imported By
Source
Frequently Asked Questions
What does context.ts do?
context.ts is a source file in the ui codebase, written in typescript. It belongs to the FrameworkTooling domain, SchemaValidation subdomain.
What functions are defined in context.ts?
context.ts defines 3 function(s): clearRegistryContext, getRegistryHeadersFromContext, setRegistryHeaders.
What files import context.ts?
context.ts is imported by 1 file(s): resolver.test.ts.
Where is context.ts in the architecture?
context.ts is located at packages/shadcn/src/registry/context.ts (domain: FrameworkTooling, subdomain: SchemaValidation, directory: packages/shadcn/src/registry).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free