$99 GRAYBYTE WORDPRESS FILE MANAGER $69

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-nodejs9/root/usr/lib/node_modules/npm/lib/install/

HOME
Current File : /opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/lib/install//read-shrinkwrap.js
'use strict'

const BB = require('bluebird')

const fs = require('graceful-fs')
const iferr = require('iferr')
const inflateShrinkwrap = require('./inflate-shrinkwrap.js')
const log = require('npmlog')
const parseJSON = require('../utils/parse-json.js')
const path = require('path')
const PKGLOCK_VERSION = require('../npm.js').lockfileVersion

const readFileAsync = BB.promisify(fs.readFile)

module.exports = readShrinkwrap
function readShrinkwrap (child, next) {
  if (child.package._shrinkwrap) return process.nextTick(next)
  BB.join(
    maybeReadFile('npm-shrinkwrap.json', child),
    // Don't read non-root lockfiles
    child.isTop && maybeReadFile('package-lock.json', child),
    child.isTop && maybeReadFile('package.json', child),
    (shrinkwrap, lockfile, pkgJson) => {
      if (shrinkwrap && lockfile) {
        log.warn('read-shrinkwrap', 'Ignoring package-lock.json because there is already an npm-shrinkwrap.json. Please use only one of the two.')
      }
      const name = shrinkwrap ? 'npm-shrinkwrap.json' : 'package-lock.json'
      let parsed = null
      if (shrinkwrap || lockfile) {
        try {
          parsed = parseJSON(shrinkwrap || lockfile)
        } catch (ex) {
          throw ex
        }
      }
      if (parsed && parsed.lockfileVersion !== PKGLOCK_VERSION) {
        log.warn('read-shrinkwrap', `This version of npm is compatible with lockfileVersion@${PKGLOCK_VERSION}, but ${name} was generated for lockfileVersion@${parsed.lockfileVersion || 0}. I'll try to do my best with it!`)
      }
      child.package._shrinkwrap = parsed
    }
  ).then(() => next(), next)
}

function maybeReadFile (name, child) {
  return readFileAsync(
    path.join(child.path, name)
  ).catch({code: 'ENOENT'}, () => null)
}

module.exports.andInflate = function (child, next) {
  readShrinkwrap(child, iferr(next, function () {
    if (child.package._shrinkwrap) {
      return inflateShrinkwrap(child, child.package._shrinkwrap || {}, next)
    } else {
      return next()
    }
  }))
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 8.02 AM
root / root
0755
action
--
31 Aug 2024 8.02 AM
root / root
0755
access-error.js
0.197 KB
28 Sep 2021 6.28 PM
root / root
0644
actions.js
5.518 KB
28 Sep 2021 6.28 PM
root / root
0644
and-add-parent-to-errors.js
0.316 KB
28 Sep 2021 6.28 PM
root / root
0644
and-finish-tracker.js
0.352 KB
28 Sep 2021 6.28 PM
root / root
0644
and-ignore-errors.js
0.199 KB
28 Sep 2021 6.28 PM
root / root
0644
check-permissions.js
1.853 KB
28 Sep 2021 6.28 PM
root / root
0644
copy-tree.js
0.86 KB
28 Sep 2021 6.28 PM
root / root
0644
decompose-actions.js
1.806 KB
28 Sep 2021 6.28 PM
root / root
0644
deps.js
26.405 KB
28 Sep 2021 6.28 PM
root / root
0644
diff-trees.js
8.521 KB
28 Sep 2021 6.28 PM
root / root
0644
exists.js
0.757 KB
28 Sep 2021 6.28 PM
root / root
0644
flatten-tree.js
0.997 KB
28 Sep 2021 6.28 PM
root / root
0644
get-requested.js
0.417 KB
28 Sep 2021 6.28 PM
root / root
0644
inflate-bundled.js
0.613 KB
28 Sep 2021 6.28 PM
root / root
0644
inflate-shrinkwrap.js
7.243 KB
28 Sep 2021 6.28 PM
root / root
0644
is-dev-dep.js
0.171 KB
28 Sep 2021 6.28 PM
root / root
0644
is-extraneous.js
0.604 KB
28 Sep 2021 6.28 PM
root / root
0644
is-fs-access-available.js
0.745 KB
28 Sep 2021 6.28 PM
root / root
0644
is-only-dev.js
1.188 KB
28 Sep 2021 6.28 PM
root / root
0644
is-only-optional.js
0.451 KB
28 Sep 2021 6.28 PM
root / root
0644
is-opt-dep.js
0.181 KB
28 Sep 2021 6.28 PM
root / root
0644
is-prod-dep.js
0.168 KB
28 Sep 2021 6.28 PM
root / root
0644
module-staging-path.js
0.253 KB
28 Sep 2021 6.28 PM
root / root
0644
mutate-into-logical-tree.js
4.516 KB
28 Sep 2021 6.28 PM
root / root
0644
node.js
1.851 KB
28 Sep 2021 6.28 PM
root / root
0644
read-shrinkwrap.js
1.972 KB
28 Sep 2021 6.28 PM
root / root
0644
realize-shrinkwrap-specifier.js
0.606 KB
28 Sep 2021 6.28 PM
root / root
0644
report-optional-failure.js
1.017 KB
28 Sep 2021 6.28 PM
root / root
0644
save.js
5.601 KB
28 Sep 2021 6.28 PM
root / root
0644
update-package-json.js
1.87 KB
28 Sep 2021 6.28 PM
root / root
0644
validate-args.js
2.452 KB
28 Sep 2021 6.28 PM
root / root
0644
validate-tree.js
3.104 KB
28 Sep 2021 6.28 PM
root / root
0644
writable.js
1.003 KB
28 Sep 2021 6.28 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF