⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
invoice
/
node_modules
/
install-peers
/
View File Name :
install-yarn.js
// do it inline in sync way // to make it work in non-npm environment var yarnBin , executioner , path = require('path') , node = process.argv[0] ; if (process.env['npm_execpath'] && process.env['npm_execpath'].match(/[\/\\]yarn(-v\d+\.\d+\.\d+)?[\/\\]bin[\/\\]yarn\.js$/)) { var execPath = process.env['npm_execpath']; var expectedPath = path.join('bin', 'yarn.js'); if (execPath.slice(-1 * expectedPath.length) === expectedPath) { yarnBin = path.resolve(execPath, '..', '..', 'lib', 'cli'); } } // if no yarn module found, don't expose any function // to allow upstream modules find alternatives module.exports = null; if (yarnBin) { executioner = require('executioner'); module.exports = function(packages, extra, done) { var options = { node : node, yarn : yarnBin, // escape package names@versions packages: packages.map((pkg) => '"' + pkg + '"').join(' ') }; executioner('"${node}" "${yarn}" add --peer --no-lockfile ${packages}', options, function(error, result) { if (error) { console.error('Unable to install peerDependencies', error); process.exit(1); return; } done(result); }); // Looks like yarn shows last line from the output of sub-scripts console.log('Installing peerDependencies as devDependencies...'); }; }