/
home2
/
dakshskx
/
nodejs
/
lib
/
node_modules
/
npm
/
node_modules
/
@npmcli
/
arborist
/
lib
/
/home2/dakshskx/nodejs/lib/node_modules/npm/node_modules/@npmcli/arborist/lib
mkdir
upload
Name
Size
Mode
Actions
arborist/
-
0755
rm
add-rm-pkg-deps.js
5010
0644
edit
dl
rm
audit-report.js
12282
0644
edit
dl
rm
calc-dep-flags.js
3148
0644
edit
dl
rm
can-place-dep.js
14273
0644
edit
dl
rm
case-insensitive-map.js
1356
0644
edit
dl
rm
consistent-resolve.js
1432
0644
edit
dl
rm
debug.js
1228
0644
edit
dl
rm
deepest-nesting-target.js
691
0644
edit
dl
rm
dep-valid.js
4990
0644
edit
dl
rm
diff.js
9798
0644
edit
dl
rm
edge.js
6983
0644
edit
dl
rm
from-path.js
1069
0644
edit
dl
rm
gather-dep-set.js
1286
0644
edit
dl
rm
get-workspace-nodes.js
863
0644
edit
dl
rm
index.js
353
0644
edit
dl
rm
inventory.js
3272
0644
edit
dl
rm
link.js
3691
0644
edit
dl
rm
node.js
44093
0644
edit
dl
rm
optional-set.js
1353
0644
edit
dl
rm
override-resolves.js
230
0644
edit
dl
rm
override-set.js
2603
0644
edit
dl
rm
peer-entry-sets.js
2632
0644
edit
dl
rm
place-dep.js
20207
0644
edit
dl
rm
printable.js
5217
0644
edit
dl
rm
query-selector-all.js
16827
0644
edit
dl
rm
realpath.js
2737
0644
edit
dl
rm
relpath.js
131
0644
edit
dl
rm
reset-dep-flags.js
638
0644
edit
dl
rm
retire-path.js
491
0644
edit
dl
rm
shrinkwrap.js
37913
0644
edit
dl
rm
signal-handling.js
2245
0644
edit
dl
rm
signals.js
1381
0644
edit
dl
rm
spec-from-lock.js
874
0644
edit
dl
rm
tracker.js
3373
0644
edit
dl
rm
tree-check.js
4121
0644
edit
dl
rm
version-from-tgz.js
1489
0644
edit
dl
rm
vuln.js
5858
0644
edit
dl
rm
yarn-lock.js
10289
0644
edit
dl
rm
Edit:
/home2/dakshskx/nodejs/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/tree-check.js
(4121B)
const debug = require('./debug.js') const checkTree = (tree, checkUnreachable = true) => { const log = [['START TREE CHECK', tree.path]] // this can only happen in tests where we have a "tree" object // that isn't actually a tree. if (!tree.root || !tree.root.inventory) { return tree } const { inventory } = tree.root const seen = new Set() const check = (node, via = tree, viaType = 'self') => { log.push([ 'CHECK', node && node.location, via && via.location, viaType, 'seen=' + seen.has(node), 'promise=' + !!(node && node.then), 'root=' + !!(node && node.isRoot), ]) if (!node || seen.has(node) || node.then) { return } seen.add(node) if (node.isRoot && node !== tree.root) { throw Object.assign(new Error('double root'), { node: node.path, realpath: node.realpath, tree: tree.path, root: tree.root.path, via: via.path, viaType, log, }) } if (node.root !== tree.root) { throw Object.assign(new Error('node from other root in tree'), { node: node.path, realpath: node.realpath, tree: tree.path, root: tree.root.path, via: via.path, viaType, otherRoot: node.root && node.root.path, log, }) } if (!node.isRoot && node.inventory.size !== 0) { throw Object.assign(new Error('non-root has non-zero inventory'), { node: node.path, tree: tree.path, root: tree.root.path, via: via.path, viaType, inventory: [...node.inventory.values()].map(node => [node.path, node.location]), log, }) } if (!node.isRoot && !inventory.has(node) && !node.dummy) { throw Object.assign(new Error('not in inventory'), { node: node.path, tree: tree.path, root: tree.root.path, via: via.path, viaType, log, }) } const devEdges = [...node.edgesOut.values()].filter(e => e.dev) if (!node.isTop && devEdges.length) { throw Object.assign(new Error('dev edges on non-top node'), { node: node.path, tree: tree.path, root: tree.root.path, via: via.path, viaType, devEdges: devEdges.map(e => [e.type, e.name, e.spec, e.error]), log, }) } if (node.path === tree.root.path && node !== tree.root) { throw Object.assign(new Error('node with same path as root'), { node: node.path, tree: tree.path, root: tree.root.path, via: via.path, viaType, log, }) } if (!node.isLink && node.path !== node.realpath) { throw Object.assign(new Error('non-link with mismatched path/realpath'), { node: node.path, tree: tree.path, realpath: node.realpath, root: tree.root.path, via: via.path, viaType, log, }) } const { parent, fsParent, target } = node check(parent, node, 'parent') check(fsParent, node, 'fsParent') check(target, node, 'target') log.push(['CHILDREN', node.location, ...node.children.keys()]) for (const kid of node.children.values()) { check(kid, node, 'children') } for (const kid of node.fsChildren) { check(kid, node, 'fsChildren') } for (const link of node.linksIn) { check(link, node, 'linksIn') } for (const top of node.tops) { check(top, node, 'tops') } log.push(['DONE', node.location]) } check(tree) if (checkUnreachable) { for (const node of inventory.values()) { if (!seen.has(node) && node !== tree.root) { throw Object.assign(new Error('unreachable in inventory'), { node: node.path, realpath: node.realpath, location: node.location, root: tree.root.path, tree: tree.path, log, }) } } } return tree } // should only ever run this check in debug mode module.exports = tree => tree debug(() => module.exports = checkTree)
Save
cmd:
run