MCPcopy Index your code
hub / github.com/nodejs/node / verify

Method verify

deps/npm/lib/commands/cache.js:186–206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184 }
185
186 async verify () {
187 // this is a derived value
188 const cachePath = this.npm.flatOptions.cache
189 const prefix = cachePath.indexOf(process.env.HOME) === 0
190 ? `~${cachePath.slice(process.env.HOME.length)}`
191 : cachePath
192 const stats = await cacache.verify(cachePath)
193 output.standard(`Cache verified and compressed (${prefix})`)
194 output.standard(`Content verified: ${stats.verifiedContent} (${stats.keptSize} bytes)`)
195 if (stats.badContentCount) {
196 output.standard(`Corrupted content removed: ${stats.badContentCount}`)
197 }
198 if (stats.reclaimedCount) {
199 output.standard(`Content garbage-collected: ${stats.reclaimedCount} (${stats.reclaimedSize} bytes)`)
200 }
201 if (stats.missingContent) {
202 output.standard(`Missing content: ${stats.missingContent}`)
203 }
204 output.standard(`Index entries: ${stats.totalEntries}`)
205 output.standard(`Finished in ${stats.runTime.total / 1000}s`)
206 }
207
208 // npm cache ls [<spec> ...]
209 async ls (specs) {

Callers 15

execMethod · 0.95
measureSyncFunction · 0.45
oneFunction · 0.45
measureAsyncParallelFunction · 0.45
mainFunction · 0.45
measureSerialFunction · 0.45
measureParallelFunction · 0.45
oldVerifyFunction · 0.45
testVerifyFunction · 0.45
testSignFunction · 0.45

Calls 2

sliceMethod · 0.65
indexOfMethod · 0.45

Tested by 2

testFunction · 0.36
testFunction · 0.36