MCPcopy Index your code
hub / github.com/npmx-dev/npmx.dev / getRepoMeta

Function getRepoMeta

shared/utils/repository-meta.ts:509–519  ·  view source on GitHub ↗
(
  cachedFetch: CachedFetchFunction,
  ref: RepoRef,
  options: Parameters<typeof $fetch>[1] = {},
)

Source from the content-addressed store, hash-verified

507}
508
509export async function getRepoMeta(
510 cachedFetch: CachedFetchFunction,
511 ref: RepoRef,
512 options: Parameters<typeof $fetch>[1] = {},
513): Promise<RepoMeta | null> {
514 const adapter = getProviderAdapter(ref)
515 if (!adapter) return null
516
517 const links = adapter.links(ref)
518 return await adapter.fetchMeta(cachedFetch, ref, links, options)
519}
520
521export async function getRepositoryStars(
522 cachedFetch: CachedFetchFunction,

Callers 2

useRepoMetaFunction · 0.90
getRepositoryStarsFunction · 0.85

Calls 1

getProviderAdapterFunction · 0.85

Tested by

no test coverage detected