interface RegistryContext { headers: Record> } const context: RegistryContext = { headers: {}, } export function setRegistryHeaders( headers: Record>, ) { context.headers = { ...context.headers, ...headers } } export function getRegistryHeadersFromContext( url: string, ): Record { return context.headers[url] || {} } export function clearRegistryContext() { context.headers = {} }