(locator, opts)
| 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 |
nothing calls this directly
no test coverage detected