Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { killAllChildProcesses } = require("./utils/electron");
notifyOnUpdatedPackages();
// eslint-disable-next-line no-console
console.log(chalk.yellow(getMessage("Cli_Description_Yellow")));
// eslint-disable-next-line no-console
console.log(getMessage("Cli_Description"));
process.on("exit", () => killAllChildProcesses());
process.on("SIGINT", () => killAllChildProcesses());
process.on("SIGTERM", () => killAllChildProcesses());
const fullCommand = process.argv.slice(2).join(" ");
logger.info(`running [${fullCommand}]`);
logger.addSessionData({
command: process.argv[2],
fullCommand
});
sessionData.on(["msid", "uuid"], (metasiteId, userId) =>
logger.addSessionData({ metasiteId, userId })
);
require("yargs")
.usage("Usage: $0 [options]")
.commandDir("commands")
.help("help")
.strict()
.demandCommand().argv;