MCPcopy Create free account
hub / github.com/TanStack/cli / absolutizeUrl

Function absolutizeUrl

packages/create/src/registry.ts:48–54  ·  view source on GitHub ↗
(originalUrl: string, relativeUrl: string)

Source from the content-addressed store, hash-verified

46export type Registry = z.infer<typeof registrySchema>
47
48function absolutizeUrl(originalUrl: string, relativeUrl: string) {
49 if (relativeUrl.startsWith('http') || relativeUrl.startsWith('https')) {
50 return relativeUrl
51 }
52 const baseUrl = originalUrl.replace(/registry.json$/, '')
53 return `${baseUrl}${relativeUrl.replace(/^\.\//, '')}`
54}
55
56export async function getRawRegistry(
57 registryUrl?: string,

Callers 1

getRawRegistryFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected