$46 GRAYBYTE WORDPRESS FILE MANAGER $63

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/alt-nodejs18/root/usr/lib/node_modules/npm/node_modules.bundled/libnpmdiff/lib/

HOME
Current File : /opt/alt/alt-nodejs18/root/usr/lib/node_modules/npm/node_modules.bundled/libnpmdiff/lib//tarball.js
const { relative } = require('node:path')

const Arborist = require('@npmcli/arborist')
const npa = require('npm-package-arg')
const pkgContents = require('@npmcli/installed-package-contents')
const pacote = require('pacote')
const { tarCreateOptions } = pacote.DirFetcher
const tar = require('tar')

// returns a simplified tarball when reading files from node_modules folder,
// thus avoiding running the prepare scripts and the extra logic from packlist
const nodeModulesTarball = (manifest) =>
  pkgContents({ path: manifest._resolved, depth: 1 })
    .then(files =>
      files.map(file => relative(manifest._resolved, file))
    )
    .then(files =>
      tar.c(tarCreateOptions(manifest), files).concat()
    )

const tarball = (manifest, opts) => {
  const resolved = manifest._resolved
  const where = opts.where || process.cwd()

  const fromNodeModules = npa(resolved).type === 'directory'
    && /node_modules[\\/](@[^\\/]+\/)?[^\\/]+[\\/]?$/.test(relative(where, resolved))

  if (fromNodeModules) {
    return nodeModulesTarball(manifest, opts)
  }

  return pacote.tarball(manifest._resolved, {
    ...opts,
    Arborist,
  })
}

module.exports = tarball

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
1 Jan 1970 8.00 AM
root / root
0
format-diff.js
3.231 KB
5 Jun 2025 6.30 PM
root / root
0644
index.js
1.229 KB
5 Jun 2025 6.30 PM
root / root
0644
should-print-patch.js
0.509 KB
5 Jun 2025 6.30 PM
root / root
0644
tarball.js
1.143 KB
5 Jun 2025 6.30 PM
root / root
0644
untar.js
2.334 KB
5 Jun 2025 6.30 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF