MCPcopy
hub / github.com/entropic-dev/entropic / fetchPackageVersion

Function fetchPackageVersion

cli/lib/fetch-package-version.js:16–29  ·  view source on GitHub ↗
(
  { registry, cache },
  name,
  version,
  integrity
)

Source from the content-addressed store, hash-verified

14
15// This used to be a different endpoint.
16async function fetchPackageVersion(
17 { registry, cache },
18 name,
19 version,
20 integrity
21) {
22 const data = await fetchObject(
23 { registry, cache },
24 integrity,
25 'please load it'
26 );
27
28 return JSON.parse(String(data.data));
29}

Callers 2

visitPackageFunction · 0.85
buildFromMetaFunction · 0.85

Calls 1

fetchObjectFunction · 0.85

Tested by

no test coverage detected