MCPcopy Create free account
hub / github.com/apache/camel-website / fetch

Method fetch

github-release-binary.js:82–98  ·  view source on GitHub ↗
(locator, opts)

Source from the content-addressed store, hash-verified

80 }
81
82 async fetch(locator, opts) {
83 const expectedChecksum = opts.checksums.get(locator.locatorHash) || null;
84
85 const [packageFs, releaseFs, checksum] = await opts.cache.fetchPackageFromCache(locator, expectedChecksum, {
86 onHit: () => opts.report.reportCacheHit(locator),
87 onMiss: () => opts.report.reportCacheMiss(locator, `${structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from the remote server`),
88 loader: () => this.fetchFromNetwork(locator, opts),
89 skipIntegrityCheck: opts.skipIntegrityCheck,
90 });
91
92 return {
93 packageFs,
94 releaseFs,
95 prefixPath: structUtils.getIdentVendorPath(locator),
96 checksum,
97 };
98 }
99
100 async fetchFromNetwork(locator, opts) {
101 // 1980-01-01, like Fedora

Callers

nothing calls this directly

Calls 1

fetchFromNetworkMethod · 0.95

Tested by

no test coverage detected