packages/LUIS/bin/luis.js
async function composeConfig() {
    const { LUIS_APP_ID, LUIS_AUTHORING_KEY, LUIS_VERSION_ID, LUIS_REGION } = process.env;

    const {
        appId: args_appId,
        authoringKey: args_authoringKey,
        versionId: args_versionId,
        region: args_region
    } = args;

    let luisrcJson = {};
    let config;
    try {
        await fs.access(path.join(process.cwd(), '.luisrc'), fs.R_OK);
        luisrcJson = JSON.parse(await txtfile.read(path.join(process.cwd(), '.luisrc')));
    } catch (e) {
        // Do nothing
    } finally {
        config = {
            appId: (args_appId || luisrcJson.appId || LUIS_APP_ID),
            authoringKey: (args_authoringKey || luisrcJson.authoringKey || LUIS_AUTHORING_KEY),
            versionId: (args_versionId || luisrcJson.versionId || LUIS_VERSION_ID),
            region: (args_region || luisrcJson.region || LUIS_REGION)
        };
    }
    return config;
}
async function composeConfig() {
    const { LUIS_APP_ID, LUIS_AUTHORING_KEY, LUIS_VERSION_ID, LUIS_REGION } = process.env;

    const {
        appId: args_appId,
        authoringKey: args_authoringKey,
        versionId: args_versionId,
        region: args_region
    } = args;

    let luisrcJson = {};
    let config;
    try {
        await fs.access(path.join(process.cwd(), '.luisrc'), fs.R_OK);
        luisrcJson = JSON.parse(await txtfile.read(path.join(process.cwd(), '.luisrc')));
    } catch (e) {
        // Do nothing
    } finally {
        config = {
            appId: (args_appId || luisrcJson.appId || LUIS_APP_ID),
            authoringKey: (args_authoringKey || luisrcJson.authoringKey || LUIS_AUTHORING_KEY),
            versionId: (args_versionId || luisrcJson.versionId || LUIS_VERSION_ID),
            region: (args_region || luisrcJson.region || LUIS_REGION)
        };
    }
    return config;
}
async function composeConfig ( ) { const { LUIS_APP_ID , LUIS_AUTHORING_KEY , LUIS_VERSION_ID , LUIS_REGION } = process . env ; const { appId : args_appId , authoringKey : args_authoringKey , versionId : args_versionId , region : args_region } = args ; let luisrcJson = { } ; let config ; try { await fs . access ( path . join ( process . cwd ( ) , '.luisrc' ) , fs . R_OK ) ; luisrcJson = JSON . parse ( await txtfile . read ( path . join ( process . cwd ( ) , '.luisrc' ) ) ) ; } catch ( e ) { // Do nothing } finally { config = { appId : ( args_appId || luisrcJson . appId || LUIS_APP_ID ) , authoringKey : ( args_authoringKey || luisrcJson . authoringKey || LUIS_AUTHORING_KEY ) , versionId : ( args_versionId || luisrcJson . versionId || LUIS_VERSION_ID ) , region : ( args_region || luisrcJson . region || LUIS_REGION ) } ; } return config ; }
Composes the config from the 3 sources that it may reside.
Precedence is 1. Arguments, 2. luisrc and 3. env variables

@returns {Promise<*>}
Composes the config from the 3 sources that it may reside . Precedence is 1 . Arguments 2 . luisrc and 3 . env variables