!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/space/node_modules/node-addon-api/tools/   drwxr-xr-x
Free 13.24 GB of 57.97 GB (22.84%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     eslint-format.js (2.02 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/env node

const spawn = require('child_process').spawnSync;

const filesToCheck = '*.js';
const FORMAT_START = process.env.FORMAT_START || 'main';
const IS_WIN = process.platform === 'win32';
const ESLINT_PATH = IS_WIN ? 'node_modules\\.bin\\eslint.cmd' : 'node_modules/.bin/eslint';

function main (args) {
  let fix = false;
  while (args.length > 0) {
    switch (args[0]) {
      case '-f':
      case '--fix':
        fix = true;
        break;
      default:
    }
    args.shift();
  }

  // Check js files that change on unstaged file
  const fileUnStaged = spawn(
    'git',
    ['diff', '--name-only', '--diff-filter=d', FORMAT_START, filesToCheck],
    {
      encoding: 'utf-8'
    }
  );

  // Check js files that change on staged file
  const fileStaged = spawn(
    'git',
    ['diff', '--name-only', '--cached', '--diff-filter=d', FORMAT_START, filesToCheck],
    {
      encoding: 'utf-8'
    }
  );

  const options = [
    ...fileStaged.stdout.split('\n').filter((f) => f !== ''),
    ...fileUnStaged.stdout.split('\n').filter((f) => f !== '')
  ];

  if (fix) {
    options.push('--fix');
  }

  const result = spawn(ESLINT_PATH, [...options], {
    encoding: 'utf-8'
  });

  if (result.error && result.error.errno === 'ENOENT') {
    console.error('Eslint not found! Eslint is supposed to be found at ', ESLINT_PATH);
    return 2;
  }

  if (result.status === 1) {
    console.error('Eslint error:', result.stdout);
    const fixCmd = 'npm run lint:fix';
    console.error(`ERROR: please run "${fixCmd}" to format changes in your commit
    Note that when running the command locally, please keep your local
    main branch and working branch up to date with nodejs/node-addon-api
    to exclude un-related complains.
    Or you can run "env FORMAT_START=upstream/main ${fixCmd}".
    Also fix JS files by yourself if necessary.`);
    return 1;
  }

  if (result.stderr) {
    console.error('Error running eslint:', result.stderr);
    return 2;
  }
}

if (require.main === module) {
  process.exitCode = main(process.argv.slice(2));
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0046 ]--