const codegenCLI=require("./codegen-cli"),argv=require("yargs").usage("Usage: $0 -s [wavemaker project path] -t [target location] [-c] [-g]").options({deploy_url:{alias:"d",type:"string"},generate_page:{type:"string"},source:{alias:"s",describe:"source project web-app path",type:"string"},target:{alias:"t",describe:"target directory",type:"string"},codegenPath:{describe:"Codegen installation path",type:"string"},pwa:{describe:"Toggle pwa capability",type:"boolean",default:!1},spa:{describe:"Toggle single page application behaviour",type:"boolean",default:!1}}).demandOption(["source","target"],"please provide source project and target directory paths").help().argv,init=async()=>{argv.generate_page&&await codegenCLI.generatePage(argv.source,argv.target,argv.generate_page,argv.codegenPath,argv.csp),argv.generate_page||await codegenCLI.generateCodegenAngularApp(argv.source,argv.target,argv.deploy_url,argv.pwa,argv.codegenPath,argv.csp,argv.spa)};init();