!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)

/usr/local/lib/node_modules/homebridge-camera-ui/node_modules/swagger-jsdoc/bin/   drwxr-xr-x
Free 13.33 GB of 57.97 GB (22.99%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     swagger-jsdoc.js (2 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/env node

const fs = require('fs');
const path = require('path');
const program = require('commander');

const pkg = require('../package.json');
const swaggerJsdoc = require('..');
const { loadDefinition } = require('../src/utils');

program
  .version(pkg.version)
  .usage('[options] <path ...>')
  .option(
    '-d, --definition <swaggerDefinition.js>',
    'Input swagger definition.'
  )
  .option('-o, --output [swaggerSpec.json]', 'Output swagger specification.')
  .parse(process.argv);

if (!process.argv.slice(2).length) {
  program.help();
  process.exit();
}

const { definition } = program;
const output = program.output || 'swagger.json';

if (!definition) {
  console.log('Definition file is required.');
  program.help();
  process.exit();
}

let swaggerDefinition;

try {
  swaggerDefinition = loadDefinition(
    definition,
    fs.readFileSync(definition, 'utf-8')
  );
} catch (error) {
  console.log(
    `Error while loading definition file '${definition}':\n${error.message}`
  );
  process.exit();
}

// Check for info object in the definition.
if (!('info' in swaggerDefinition)) {
  console.log('Definition file should contain an info object!');
  console.log('More at http://swagger.io/specification/#infoObject');
  process.exit();
}

// Check for title and version properties in the info object.
if (
  !('title' in swaggerDefinition.info) ||
  !('version' in swaggerDefinition.info)
) {
  console.log('The title and version properties are required!');
  console.log('More at http://swagger.io/specification/#infoObject');
  process.exit();
}

// Continue only if arguments provided.
if (!program.args.length) {
  console.log('You must provide sources for reading API files.');
  process.exit();
}

const format = path.extname(output);

const result = swaggerJsdoc({
  swaggerDefinition,
  apis: program.args,
  format,
});

if (format === '.json') {
  fs.writeFileSync(output, JSON.stringify(result, null, 2));
} else {
  fs.writeFileSync(output, result);
}

console.log('Swagger specification is ready.');

:: 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.0049 ]--