$63 GRAYBYTE WORDPRESS FILE MANAGER $93

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

/usr/lib/node_modules/npm/lib/install/action/

HOME
Current File : /usr/lib/node_modules/npm/lib/install/action//refresh-package-json.js
'use strict'

const Bluebird = require('bluebird')

const checkPlatform = Bluebird.promisify(require('npm-install-checks').checkPlatform)
const getRequested = require('../get-requested.js')
const npm = require('../../npm.js')
const path = require('path')
const readJson = Bluebird.promisify(require('read-package-json'))
const updatePackageJson = Bluebird.promisify(require('../update-package-json'))

module.exports = function (staging, pkg, log) {
  log.silly('refresh-package-json', pkg.realpath)

  return readJson(path.join(pkg.path, 'package.json'), false).then((metadata) => {
    Object.keys(pkg.package).forEach(function (key) {
      if (key !== 'version' && key !== 'dependencies' && !isEmpty(pkg.package[key])) {
        metadata[key] = pkg.package[key]
      }
    })
    if (metadata._resolved == null && pkg.fakeChild) {
      metadata._resolved = pkg.fakeChild.resolved
    }
    // These two sneak in and it's awful
    delete metadata.readme
    delete metadata.readmeFilename

    pkg.package = metadata
    pkg.fakeChild = false
  }).catch(() => 'ignore').then(() => {
    return checkPlatform(pkg.package, npm.config.get('force'))
  }).then(() => {
    const requested = pkg.package._requested || getRequested(pkg)
    if (requested.type !== 'directory') {
      return updatePackageJson(pkg, pkg.path)
    }
  })
}

function isEmpty (value) {
  if (value == null) return true
  if (Array.isArray(value)) return !value.length
  if (typeof value === 'object') return !Object.keys(value).length
  return false
}

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
build.js
0.402 KB
10 Mar 2021 9.36 PM
root / root
0644
extract-worker.js
0.462 KB
10 Mar 2021 9.36 PM
root / root
0644
extract.js
3.87 KB
10 Mar 2021 9.36 PM
root / root
0644
fetch.js
0.512 KB
10 Mar 2021 9.36 PM
root / root
0644
finalize.js
3.814 KB
10 Mar 2021 9.36 PM
root / root
0644
global-install.js
0.641 KB
10 Mar 2021 9.36 PM
root / root
0644
global-link.js
0.282 KB
10 Mar 2021 9.36 PM
root / root
0644
install.js
0.26 KB
10 Mar 2021 9.36 PM
root / root
0644
move.js
3.094 KB
10 Mar 2021 9.36 PM
root / root
0644
postinstall.js
0.268 KB
10 Mar 2021 9.36 PM
root / root
0644
preinstall.js
0.266 KB
10 Mar 2021 9.36 PM
root / root
0644
prepare.js
1.03 KB
10 Mar 2021 9.36 PM
root / root
0644
refresh-package-json.js
1.495 KB
10 Mar 2021 9.36 PM
root / root
0644
remove.js
2.592 KB
10 Mar 2021 9.36 PM
root / root
0644
unbuild.js
0.644 KB
10 Mar 2021 9.36 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF