import colors from 'colors' import { currentVersion } from './Version/currentVersion' export const HelpLog = (): any => { const tableSpace = '--------|-----------|-----------------------------------------------------------------------|-------------------' const tableTopBottom = '----------------------------------------------------------------------------------------------------------------' const tableHelpersSpace = '------------|-----------|-----------------------------------------------------------------|---------------------' const tableHelpersTopBottom = '----------------------------------------------------------------------------------------------------------------' console.info(`${colors.grey.underline(' HELP MENU ')} ${colors.grey.bold(`wappi ::: version - ${currentVersion()}`)} ${colors.grey.bold.underline('How to use:')} ${colors.grey('wappi [command]')} ${colors.grey('- or -')} ${colors.grey('npx wappi [command]')} ${colors.grey.bold.underline('Commands')} ${colors.grey(tableTopBottom)} ${colors.grey('Command | Shorthand | Short Description | Example')} ${colors.grey(tableSpace)} ${colors.grey('build | b | Creates the build for running locally | wappi b')} ${colors.grey(tableSpace)} ${colors.grey('create | c | Creates a new functional endpoint | wappi c')} ${colors.grey(tableSpace)} ${colors.grey('delete | d | Deletes a current functional endpoint version and namespace | wappi d')} ${colors.grey(tableSpace)} ${colors.grey('envfile | e | Create .env file based off the .env.example, using set env vars | wappi e')} ${colors.grey(tableSpace)} ${colors.grey('help | h | Show this help menu | wappi h')} ${colors.grey(tableSpace)} ${colors.grey('init | i | Initializes WAPPI (required for all the other commands to work) | wappi i')} ${colors.grey(tableSpace)} ${colors.grey('lint | l | Runs eslint over code. Based off the .eslintrc.json | wappi l')} ${colors.grey(tableSpace)} ${colors.grey('run | r | Run wappi locally. Runs on the port set in config (wappi.json) | wappi r')} ${colors.grey(tableSpace)} ${colors.grey('test | t | Test all your code, using Jest | wappi t')} ${colors.grey(tableSpace)} ${colors.grey('update | u | update all your node modules, to be using the latest versions | wappi u')} ${colors.grey(tableSpace)} ${colors.grey('watch | w | Watches the API folder for changes, works with `wappi run` | wappi w')} ${colors.grey(tableTopBottom)} ${colors.grey.bold.underline('Helpers Flags')} ${colors.grey(tableHelpersTopBottom)} ${colors.grey('Command | Shorthand | Short Description | Example')} ${colors.grey(tableHelpersSpace)} ${colors.grey('ciPipeline | N/A | A Flag to show that it is running in a CI Pipeline | wappi l ciPipeline')} ${colors.grey(tableHelpersTopBottom)} `) }