summaryrefslogtreecommitdiff
path: root/deps/npm/lib/install/inflate-bundled.js
blob: 569484129065cd245231b33d2fb70a71d504a84f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict'
var validate = require('aproba')
var childPath = require('../utils/child-path.js')
var reset = require('./node.js').reset

module.exports = function inflateBundled (bundler, parent, children) {
  validate('OOA', arguments)
  children.forEach(function (child) {
    reset(child)
    child.fromBundle = bundler
    child.parent = parent
    child.path = childPath(parent.path, child)
    child.realpath = childPath(parent.path, child)
    child.isLink = child.isLink || parent.isLink || parent.target
    inflateBundled(bundler, child, child.children)
  })
}