MCPcopy Create free account
hub / github.com/decaporg/decap-cms / fetchPublishedManifest

Function fetchPublishedManifest

scripts/verify-published-packages.mjs:147–152  ·  view source on GitHub ↗
(registry, name, version)

Source from the content-addressed store, hash-verified

145}
146
147async function fetchPublishedManifest(registry, name, version) {
148 // Scoped names must have their separator encoded to address a single version,
149 // e.g. `@scope/pkg` -> `@scope%2fpkg`. replaceAll, not replace: escaping only
150 // the first occurrence is the js/incomplete-sanitization pattern.
151 return fetchJson(`${registry}/${name.replaceAll('/', '%2f')}/${version}`, `${name}@${version}`);
152}
153
154async function fetchJson(url, label) {
155 for (let attempt = 1; attempt <= FETCH_ATTEMPTS; attempt++) {

Callers 1

checkPackageFunction · 0.85

Calls 1

fetchJsonFunction · 0.70

Tested by

no test coverage detected