Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(function (): void {
const projectPath = process.cwd();
const appTarget: ApplicationProps.Target = yargs.argv['app-target'];
const manager = new ApplicationPackageManager({ projectPath, appTarget });
const target = manager.pck.target;
yargs
.command({
command: 'start',
describe: 'start the ' + manager.pck.target + ' backend',
handler: async () => {
try {
await manager.start(commandArgs('start'));
} catch (err) {
console.error(err);
process.exit(1);
}
}
})
.command({
handler: () => {
const { modules } = yargs.array('modules').argv;
try {
rebuild(target, modules);
} catch (err) {
console.error(err);
process.exit(1);
}
}
};
createPackageManager(): ApplicationPackageManager {
return new ApplicationPackageManager(Object.assign({
log: this.logger.info.bind(this.logger),
error: this.logger.error.bind(this.logger),
registry: this.registry
}, this.options));
}