This commit is contained in:
2025-08-18 23:06:34 +08:00
parent 0bc04fb659
commit ed18af0cad
1926 changed files with 275098 additions and 0 deletions

18
package/node_modules/bin-links/lib/check-bins.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
const checkBin = require('./check-bin.js')
const normalize = require('npm-normalize-package-bin')
const checkBins = async ({ pkg, path, top, global, force }) => {
// always ok to clobber when forced
// always ok to clobber local bins, or when forced
if (force || !global || !top) {
return
}
pkg = normalize(pkg)
if (!pkg.bin) {
return
}
await Promise.all(Object.keys(pkg.bin)
.map(bin => checkBin({ bin, path, top, global, force })))
}
module.exports = checkBins