bin/coveralls.js
async function main() {
  // Initialize the application.
  process.title = 'Coveralls.js';

  // Parse the command line arguments.
  program.name('coveralls')
    .description('Send a coverage report to the Coveralls service.')
    .version(packageVersion, '-v, --version')
    .arguments('<file>').action(file => program.file = file)
    .parse(process.argv);

  if (!program.file) {
    program.outputHelp();
    process.exitCode = 64;
    return null;
  }

  // Run the program.
  const client = new Client('COVERALLS_ENDPOINT' in process.env ? new URL(process.env.COVERALLS_ENDPOINT) : Client.defaultEndPoint);
  const coverage = await promises.readFile(program.file, 'utf8');
  console.log(`[Coveralls] Submitting to ${client.endPoint}`);
  return client.upload(coverage);
}
async function main() {
  // Initialize the application.
  process.title = 'Coveralls.js';

  // Parse the command line arguments.
  program.name('coveralls')
    .description('Send a coverage report to the Coveralls service.')
    .version(packageVersion, '-v, --version')
    .arguments('<file>').action(file => program.file = file)
    .parse(process.argv);

  if (!program.file) {
    program.outputHelp();
    process.exitCode = 64;
    return null;
  }

  // Run the program.
  const client = new Client('COVERALLS_ENDPOINT' in process.env ? new URL(process.env.COVERALLS_ENDPOINT) : Client.defaultEndPoint);
  const coverage = await promises.readFile(program.file, 'utf8');
  console.log(`[Coveralls] Submitting to ${client.endPoint}`);
  return client.upload(coverage);
}
async function main ( ) { // Initialize the application. process . title = 'Coveralls.js' ; // Parse the command line arguments. program . name ( 'coveralls' ) . description ( 'Send a coverage report to the Coveralls service.' ) . version ( packageVersion , '-v, --version' ) . arguments ( '<file>' ) . action ( file => program . file = file ) . parse ( process . argv ) ; if ( ! program . file ) { program . outputHelp ( ) ; process . exitCode = 64 ; return null ; } // Run the program. const client = new Client ( 'COVERALLS_ENDPOINT' in process . env ? new URL ( process . env . COVERALLS_ENDPOINT ) : Client . defaultEndPoint ) ; const coverage = await promises . readFile ( program . file , 'utf8' ) ; console . log ( ` ${ client . endPoint } ` ) ; return client . upload ( coverage ) ; }
Application entry point.
@return {Promise<void>} Completes when the program is terminated.
Application entry point .