🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-14 16:56:11 | PHP 8.1.34
📂
/ (Root)
/
usr
/
lib
/
node_modules
/
npm
/
node_modules
/
pacote
/
lib
/
util
📍 /usr/lib/node_modules/npm/node_modules/pacote/lib/util
🔄 Refresh
✏️
Editing: add-git-sha.js
Read Only
// add a sha to a git remote url spec const addGitSha = (spec, sha) => { if (spec.hosted) { const h = spec.hosted const opt = { noCommittish: true } const base = h.https && h.auth ? h.https(opt) : h.shortcut(opt) return `${base}#${sha}` } else { // don't use new URL for this, because it doesn't handle scp urls return spec.rawSpec.replace(/#.*$/, '') + `#${sha}` } } module.exports = addGitSha
💾 Save Changes
❌ Cancel