function getEvent(file) {
  return new Promise((resolve, reject) => {
    let input;
    if (file === '-') {
      console.log(`Reading event data from stdin, which can be ended with Enter then Ctrl+D
(you can also pass it from file with -e)`);
      input = process.stdin;
    } else {
      input = fs.createReadStream(file, {
        encoding: 'utf-8'
      });
    }
    const rl = readline.createInterface({
      input,
      output: process.stdout
    });
    let event = '';
    rl.on('line', (line) => {
      event += line;
    });
    rl.on('close', () => {
      resolve(event);
    });
    rl.on('SIGINT', function () {
      // Keep the behavior consistent with system.
      reject(new Error('^C'));
    });
  });
}
Get event content from a file. It reads event from stdin if the file is "-".

@param file the file from which to read the event content, or "-" to read from stdin.
@returns {Promise<String>}