packages/QnAMaker/lib/help.js
function getAllCommands() {
    let resourceTypes = [];
    let tables = {};
    Object.keys(manifest).forEach(key => {
        const { [key]: category } = manifest;
        Object.keys(category.operations).forEach((operationKey) => {
            let operation = category.operations[operationKey];
            let opCategory = operation.target[0] || operation.methodAlias;
            if (resourceTypes.indexOf(opCategory) < 0) {
                resourceTypes.push(opCategory);
                tables[opCategory] = [];
            }
            tables[opCategory].push([chalk.cyan.bold(operation.command), operation.description]);
        });
    });

    resourceTypes.sort();

    let sections = [];
    for (let resourceType of resourceTypes) {
        tables[resourceType].sort((a, b) => a[0].localeCompare(b[0]));
        sections.push({
            head: chalk.white.bold(resourceType),
            table: tables[resourceType]
        });
    }

    return sections;
}
function getAllCommands() {
    let resourceTypes = [];
    let tables = {};
    Object.keys(manifest).forEach(key => {
        const { [key]: category } = manifest;
        Object.keys(category.operations).forEach((operationKey) => {
            let operation = category.operations[operationKey];
            let opCategory = operation.target[0] || operation.methodAlias;
            if (resourceTypes.indexOf(opCategory) < 0) {
                resourceTypes.push(opCategory);
                tables[opCategory] = [];
            }
            tables[opCategory].push([chalk.cyan.bold(operation.command), operation.description]);
        });
    });

    resourceTypes.sort();

    let sections = [];
    for (let resourceType of resourceTypes) {
        tables[resourceType].sort((a, b) => a[0].localeCompare(b[0]));
        sections.push({
            head: chalk.white.bold(resourceType),
            table: tables[resourceType]
        });
    }

    return sections;
}
function getAllCommands ( ) { let resourceTypes = [ ] ; let tables = { } ; Object . keys ( manifest ) . forEach ( key => { const { [ key ] : category } = manifest ; Object . keys ( category . operations ) . forEach ( ( operationKey ) => { let operation = category . operations [ operationKey ] ; let opCategory = operation . target [ 0 ] || operation . methodAlias ; if ( resourceTypes . indexOf ( opCategory ) < 0 ) { resourceTypes . push ( opCategory ) ; tables [ opCategory ] = [ ] ; } tables [ opCategory ] . push ( [ chalk . cyan . bold ( operation . command ) , operation . description ] ) ; } ) ; } ) ; resourceTypes . sort ( ) ; let sections = [ ] ; for ( let resourceType of resourceTypes ) { tables [ resourceType ] . sort ( ( a , b ) => a [ 0 ] . localeCompare ( b [ 0 ] ) ) ; sections . push ( { head : chalk . white . bold ( resourceType ) , table : tables [ resourceType ] } ) ; } return sections ; }
Walks the qnamaker.json and pulls out all
commands that are supported.

@returns {*[]}
Walks the qnamaker . json and pulls out all commands that are supported .