const shell = require("shelljs");
const { paths } = require("../../lib/node");
const pino = require("pino")({ prettyPrint: { forceColor: true } });
const yargs = require("yargs");

const coverage = function({ nameSpaceId }) {
  const argv = yargs.options({
    w: { alias: "watch", type: "boolean" },
    r: { alias: "reporter", type: "string", default: "html" }
  }).argv;
  const endOfOptions = argv._.join(" ");

  let reportDir = paths.project(`coverage/${nameSpaceId}`);

  shell.rm("-rf", reportDir);

  let command = `npx nyc report`;
  command += ` --reporter ${argv.reporter}`;
  command += ` --report-dir ${reportDir}`;
  command += ` --temp-dir ${paths.tmp(`.nyc_output_${nameSpaceId}`)}`;
  command += ` ${endOfOptions}`;

  pino.info(command);
  shell.exec(command);
};

module.exports = coverage;

@@ -690,24 +690,126 @@
 aceId%7D%60)%7D%60;%0A
+  %5B%22ts%22, %22tsx%22, %22js%22, %22jsx%22%5D.forEach(%0A    extension =%3E (command += %60 --extension .$%7Bextension%7D%60)%0A  );%0A
   command +=

Fix nyc coverage, add file extensions