$96 GRAYBYTE WORDPRESS FILE MANAGER $63

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/alt-nodejs16/root/usr/lib/node_modules/npm/lib/utils/completion/

HOME
Current File : /opt/alt/alt-nodejs16/root/usr/lib/node_modules/npm/lib/utils/completion//installed-deep.js
const { resolve } = require('path')
const Arborist = require('@npmcli/arborist')
const localeCompare = require('@isaacs/string-locale-compare')('en')

const installedDeep = async (npm) => {
  const {
    depth,
    global,
    prefix,
    workspacesEnabled,
  } = npm.flatOptions

  const getValues = (tree) =>
    [...tree.inventory.values()]
      .filter(i => i.location !== '' && !i.isRoot)
      .map(i => {
        return i
      })
      .filter(i => (i.depth - 1) <= depth)
      .sort((a, b) => (a.depth - b.depth) || localeCompare(a.name, b.name))

  const res = new Set()
  const gArb = new Arborist({
    global: true,
    path: resolve(npm.globalDir, '..'),
    workspacesEnabled,
  })
  const gTree = await gArb.loadActual({ global: true })

  for (const node of getValues(gTree)) {
    res.add(global ? node.name : [node.name, '-g'])
  }

  if (!global) {
    const arb = new Arborist({ global: false, path: prefix, workspacesEnabled })
    const tree = await arb.loadActual()
    for (const node of getValues(tree)) {
      res.add(node.name)
    }
  }

  return [...res]
}

module.exports = installedDeep


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
19 Mar 2026 8.38 AM
root / root
0755
installed-deep.js
1.096 KB
9 Mar 2026 6.51 AM
root / root
0644
installed-shallow.js
0.53 KB
9 Mar 2026 6.51 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF