packages/LUIS/bin/help.js
async function getHelpContents(args, output) {
    if ('!' in args) {
        return getAllCommands(process.stdout);
    }

    if (args._.length == 0) {
        return getGeneralHelpContents(output);
    }
    else if (args._.length == 1) {
        return getVerbHelp(args._[0], output);
    } else if (args._.length >= 2) {
        const operation = getOperation(args._[0], args._[1]);
        if (operation) {
            output.write(`${operation.description}\n\n`);
            output.write(`Usage:\n${chalk.cyan.bold(operation.command)}\n\n`);
            return getHelpContentsForOperation(operation, output);
        } else {
            return getVerbHelp(args._[0], output);
        }
    }

    return getGeneralHelpContents(output);
}
async function getHelpContents(args, output) {
    if ('!' in args) {
        return getAllCommands(process.stdout);
    }

    if (args._.length == 0) {
        return getGeneralHelpContents(output);
    }
    else if (args._.length == 1) {
        return getVerbHelp(args._[0], output);
    } else if (args._.length >= 2) {
        const operation = getOperation(args._[0], args._[1]);
        if (operation) {
            output.write(`${operation.description}\n\n`);
            output.write(`Usage:\n${chalk.cyan.bold(operation.command)}\n\n`);
            return getHelpContentsForOperation(operation, output);
        } else {
            return getVerbHelp(args._[0], output);
        }
    }

    return getGeneralHelpContents(output);
}
async function getHelpContents ( args , output ) { if ( '!' in args ) { return getAllCommands ( process . stdout ) ; } if ( args . _ . length == 0 ) { return getGeneralHelpContents ( output ) ; } else if ( args . _ . length == 1 ) { return getVerbHelp ( args . _ [ 0 ] , output ) ; } else if ( args . _ . length >= 2 ) { const operation = getOperation ( args . _ [ 0 ] , args . _ [ 1 ] ) ; if ( operation ) { output . write ( ` ${ operation . description } \n \n ` ) ; output . write ( ` \n ${ chalk . cyan . bold ( operation . command ) } \n \n ` ) ; return getHelpContentsForOperation ( operation , output ) ; } else { return getVerbHelp ( args . _ [ 0 ] , output ) ; } } return getGeneralHelpContents ( output ) ; }
Retrieves help content vie the luis.json from
the arguments input by the user.

@param args The arguments input by the user
@returns {Promise<*>}1]
Retrieves help content vie the luis . json from the arguments input by the user .