#!/usr/bin/env node import program from "commander"; import { Commands } from "./commands"; const pkg = require("../package.json"); program.version(pkg.version); program.command("tsdb ") .description("Generate ORM Database Script.") .option("--mariadb", "Script mariadb database.") .option("--mssql", "Script mssql database.") .option("--mysql", "Script mysql database.") .option("--postgres", "Script postgres database.") .option("--oracleservicename", "Script oracle database.") .option("--oraclesid", "Script oracle database.") .option("--sqlite", "Script sqlite database.") .option("--main", "Defines whether the connection will be main.") .action(Commands.tsDb); program.command("tsmodel ") .description("Generate ORM Model.") .option("--stringid", "Use the nextid string type to generate primary keys.") .option("--uuid", "Use the nextid uuid type when generating primary keys.") .option("--codeid", "Use the nextid code type to generate primary keys.") .option("--autogenerate", "Use the auto-increment nextid type when generating primary keys.") .option("--controlfields", "Use control fields.") .option("--empty", "Empty class.") .option("--inherited", "Inherited primary key.") .action(Commands.tsModel); program.command("tsview ") .description("Generate ORM View Model.") .action(Commands.tsView); program.command("tscontroller ") .description("Generate ORM controller.") .option("--crud", "Generate crud controller.") .option("--cron", "Generate cron controller.") .option("--custom", "Generate custom controller.") .option("--stringid", "Generate nextID String.") .option("--uuid", "Generate nextID uuid.") .option("--autogenerate", "generate nextID Auto.") .option("--codeid", "Generate nextID code.") .option("--controlfields", "Use control fields.") .action(Commands.tsController); program.command("tsjob ") .description("Generate ORM Job.") .action(Commands.tsJob); program.command("ngservice ") .description("Generate angular ORM service.") .option("--crud", "Generate crud service.") .action(Commands.ngService); program.command("ngcomponent ") .description("Generate angular ORM component.") .action(Commands.ngComponent); program.command("ngpage ") .description("Generate angular ORM component.") .option("--crud", "Generate crud service.") .action(Commands.ngPage); program.command("ngwebsocket") .description("Generate angular Service Websocket.") .action(Commands.ngWebSocket); program.command("tssn") .description("Generate all snippets.") .action(Commands.createTsSnippets); program.command("tsinit") .description("Generate start project.") .action(Commands.tsInit); program.command("tsapp") .description("Generate file config.") .option("--env, --environment ") .action(Commands.tsApp); program.command("tsbuild") .description("Build project api") .option("--env, --environment ") .option("--install", "Install all packages.") .action(Commands.tsBuild); program.command("tspm2") .description("Generate pm2 config.") .action(Commands.tsPm2); program.command("tsreport") .description("Generate template custom report") .option("--boletobancario ", "Generate report type .") .action(Commands.tsReport); program.command("ftcomponent ") .description("Create component in project flutter/dart") .option("--stless") .option("--stfull") .option("--sidemenu") .action(Commands.ftCreateComponent); program.command("ftmodel ") .description("Create Model in project flutter/dart") .option("--withjsonannotation") .action(Commands.ftCreateModel); program.command("ftrepository ") .description("Create Repository in project flutter/dart") .action(Commands.ftCreateRepository); program.command("ftpage ") .description("Create page/module/store in project flutter/dart") .action(Commands.ftCreatePage); program.command("ftinit") .description("Init project flutter/dart") .option("--withjsonannotation") .action(Commands.ftInit); program.command("ftproject ") .description("Create project flutter/dart") .option("--org, --org ") .action(Commands.ftCreateProject); program.command("ftversion") .description("Homologated version of flutter") .action(Commands.ftHomologateVersion); program.command("ftbuildrunner") .description("Run build runner on flutter project") .action(Commands.ftBuildRunner); program.command("pyinit ") .description("Init new project python") .action(Commands.pyInit); program.parse(process.argv); if (!process.argv.slice(2).length) { program.outputHelp(); }