2.2.0 ā€¢ Published 2 years ago

xhelpers-cli v2.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

xhelpers-cli

       _          _                        ____ _     ___ 
 __  _| |__   ___| |_ __   ___ _ __ ___   / ___| |   |_ _|
 \ \/ / '_ \ / _ \ | '_ \ / _ \ '__/ __| | |   | |    | | 
  >  <| | | |  __/ | |_) |  __/ |  \__ \ | |___| |___ | | 
 /_/\_\_| |_|\___|_| .__/ \___|_|  |___/  \____|_____|___|
                   |_|                                    
A CLI tool to create and manage xhelpers projects ;) 

Install

npm

npm i -g xhelpers-cli

local

git clone https://github.com/xhelpers/xhelpers-cli.git
npm i -g ./
Usage: xc [options] [command]

Options:
  --debug                        include debugging information, such as stack dump
  -h, --help                     display help for command
  -V, --version                  output the version number

Commands:
  help [command]                 display help for command
  version|v                      display installed cli version
  clone|c [path] [templateName]  Start a new project by cloning a git repository
  			 path: dir name to be created
  			 templateName: template name[todo-sample, account-sample, mailman-sample]
  			 xcli c demo1 todo-sample  			 
  clonelist|cl                   Display clone templates  
  inspect|i [path]               Inspect path looking for (xhelpers-api) settings
  			 path: xhelpers project path			 
  			 xcli i demo1  			 
  touch|t [path] [context]       Create a new path with set of touched files
  			 path: dir name to be created
  			 context: context name[component, container, service, saga, screen]
  			 xcli t demo1 component  			 
  touchlist|tl                   Display touch templates
  

Clone

  clone|c [path] [templateName]
  			 path: dir name to be created
  			 templateName: template name[todo-sample, account-sample, mailman-sample]
  			 
xc c
xc c demo1 todo-sample
? Inform project path: todo-sample
? Select template to clone: Sample todo api
  Integration using default jwt (JSON Web Token) 
  Integration using jws (JSON Web Signature) 
  Integration using oauth2 
  Integration using oauth + https 
  Integration using soap 
  Template mailman sendgrid 
  Template default account-sql 
āÆ Sample todo api 
  Sample fileupload 
  Sample video streaming api 
  Sample websocket 
  Sample websocket using redis 
  Sample mailman 
  Sample account 
(Move up and down to reveal more choices)
šŸ”ƒ  Copying files... Sample todo api https://github.com/xhelpers/xhelpers-todo-sample.git
šŸ”ƒ  Sample todo api https://github.com/xhelpers/xhelpers-todo-sample.git
āœ…  The files have been copied!
āœ…  Repository cloned todo-sample

Inspect

inspect|i [path]           
  			 path: xhelpers project path			  			 

xc i
xc i demo1
Running 'inspect' on path: 'PlataformaAccount'

āœ…  Current folder has xhelpers-api components

         API - Accounts - version: 1.0.0
šŸŒ²  xhelpers-api: ^2.1.20
šŸŒ²  typescript: ^3.6.2

šŸ”¢  Server xhelpers-api settings
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
ā”‚ (index) ā”‚    name     ā”‚    type    ā”‚ enabled ā”‚
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
ā”‚    0    ā”‚ 'Sequelize' ā”‚ 'Database' ā”‚  true   ā”‚
ā”‚    1    ā”‚ 'Mongoose'  ā”‚ 'Database' ā”‚  false  ā”‚
ā”‚    2    ā”‚    'JWT'    ā”‚   'Auth'   ā”‚  true   ā”‚
ā”‚    3    ā”‚  'APP_KEY'  ā”‚   'Auth'   ā”‚  false  ā”‚
ā”‚    4    ā”‚    'SSO'    ā”‚   'Auth'   ā”‚  true   ā”‚
ā”‚    5    ā”‚  'Sentry'   ā”‚   'Logs'   ā”‚  false  ā”‚
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

šŸ”¢  Components xhelpers-api
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
ā”‚ (index) ā”‚           name            ā”‚    type     ā”‚ count ā”‚
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¼ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
ā”‚    0    ā”‚    'account.route.ts'     ā”‚   'Route'   ā”‚   9   ā”‚
ā”‚    1    ā”‚      'auth.route.ts'      ā”‚   'Route'   ā”‚   2   ā”‚
ā”‚    2    ā”‚   'account.service.ts'    ā”‚  'Service'  ā”‚   0   ā”‚
ā”‚    3    ā”‚     'auth.service.ts'     ā”‚  'Service'  ā”‚   0   ā”‚
ā”‚    4    ā”‚  'fileUpload.service.ts'  ā”‚  'Service'  ā”‚   0   ā”‚
ā”‚    5    ā”‚   'mailman.service.ts'    ā”‚  'Service'  ā”‚   0   ā”‚
ā”‚    6    ā”‚ 'token.issuer.service.ts' ā”‚  'Service'  ā”‚   0   ā”‚
ā”‚    7    ā”‚    'account.model.ts'     ā”‚   'Model'   ā”‚   0   ā”‚
ā”‚    8    ā”‚  'actionToken.model.ts'   ā”‚   'Model'   ā”‚   0   ā”‚
ā”‚    9    ā”‚     'deployment.yaml'     ā”‚ 'Manifest'  ā”‚   0   ā”‚
ā”‚   10    ā”‚     'app_homolog.yml'     ā”‚ 'GitAction' ā”‚   0   ā”‚
ā”‚   11    ā”‚     'app_master.yml'      ā”‚ 'GitAction' ā”‚   0   ā”‚
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
Current folder is already a Git repository!

Touch

  touch|t [path] [context]
  			 path: dir name to be created
  			 context: context name[component, container, service, saga, screen]

xc t
xc t demo2 screen
xc t demo1/cp1 container
xc t demo1/cp1 component
xc t demo1/cp1 saga
xc t demo1/cp1 service
? Inform project path: demo1
? Select xhelpers-front type: (frontTemplate) (Use arrow keys)
āÆ Component 
  Container 
  Service 
  Saga 
  Screen 

šŸ”ƒ  Touching files... Component
āœ…  The files have been copied!
šŸ”ƒ  Template url: https://raw.githubusercontent.com/xhelpers/xhelpers-front-snippets/main/index.ts
šŸ”ƒ  New File: demo1/index.ts
šŸ”ƒ  Template url: https://raw.githubusercontent.com/xhelpers/xhelpers-front-snippets/main/%7Bname%7D.component.tsx
šŸ”ƒ  New File: demo1/demo1.component.tsx