✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.224
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/alt-nodejs18/root/usr/lib/node_modules/npm/node_modules.bundled/libnpmaccess/lib//index.js
'use strict'

const npa = require('npm-package-arg')
const npmFetch = require('npm-registry-fetch')

const npar = (spec) => {
  spec = npa(spec)
  if (!spec.registry) {
    throw new Error('must use package name only')
  }
  return spec
}

const parseTeam = (scopeTeam) => {
  let slice = 0
  if (scopeTeam.startsWith('@')) {
    slice = 1
  }
  const [scope, team] = scopeTeam.slice(slice).split(':').map(encodeURIComponent)
  return { scope, team }
}

const getPackages = async (scopeTeam, opts) => {
  const { scope, team } = parseTeam(scopeTeam)

  let uri
  if (team) {
    uri = `/-/team/${scope}/${team}/package`
  } else {
    uri = `/-/org/${scope}/package`
  }
  try {
    return await npmFetch.json(uri, opts)
  } catch (err) {
    if (err.code === 'E404') {
      uri = `/-/user/${scope}/package`
      return npmFetch.json(uri, opts)
    }
    throw err
  }
}

const getCollaborators = async (pkg, opts) => {
  const spec = npar(pkg)
  const uri = `/-/package/${spec.escapedName}/collaborators`
  return npmFetch.json(uri, opts)
}

const getVisibility = async (pkg, opts) => {
  const spec = npar(pkg)
  const uri = `/-/package/${spec.escapedName}/visibility`
  return npmFetch.json(uri, opts)
}

const setAccess = async (pkg, access, opts) => {
  const spec = npar(pkg)
  const uri = `/-/package/${spec.escapedName}/access`
  await npmFetch(uri, {
    ...opts,
    method: 'POST',
    body: { access },
    spec,
    ignoreBody: true,
  })
  return true
}

const setMfa = async (pkg, level, opts) => {
  const spec = npar(pkg)
  const body = {}
  switch (level) {
    case 'none':
      body.publish_requires_tfa = false
      break
    case 'publish':
      // tfa is required, automation tokens can not override tfa
      body.publish_requires_tfa = true
      body.automation_token_overrides_tfa = false
      break
    case 'automation':
      // tfa is required, automation tokens can override tfa
      body.publish_requires_tfa = true
      body.automation_token_overrides_tfa = true
      break
    default:
      throw new Error(`Invalid mfa setting ${level}`)
  }
  const uri = `/-/package/${spec.escapedName}/access`
  await npmFetch(uri, {
    ...opts,
    method: 'POST',
    body,
    spec,
    ignoreBody: true,
  })
  return true
}

const setPermissions = async (scopeTeam, pkg, permissions, opts) => {
  const spec = npar(pkg)
  const { scope, team } = parseTeam(scopeTeam)
  if (!scope || !team) {
    throw new Error('team must be in format `scope:team`')
  }
  const uri = `/-/team/${scope}/${team}/package`
  await npmFetch(uri, {
    ...opts,
    method: 'PUT',
    body: { package: spec.name, permissions },
    scope,
    spec,
    ignoreBody: true,
  })
  return true
}

const removePermissions = async (scopeTeam, pkg, opts) => {
  const spec = npar(pkg)
  const { scope, team } = parseTeam(scopeTeam)
  const uri = `/-/team/${scope}/${team}/package`
  await npmFetch(uri, {
    ...opts,
    method: 'DELETE',
    body: { package: spec.name },
    scope,
    spec,
    ignoreBody: true,
  })
  return true
}

module.exports = {
  getCollaborators,
  getPackages,
  getVisibility,
  removePermissions,
  setAccess,
  setMfa,
  setPermissions,
}


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
1 Jan 1970 12.00 AM
root / root
0
index.js
3.109 KB
9 Mar 2026 9.08 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF