Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions Composer/packages/client/config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ const dotenvFiles = [
// since normally you expect tests to produce the same
// results for everyone
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
paths.dotenv,
paths.dotenv
].filter(Boolean);

// Load environment variables from .env* files. Suppress warnings using silent
// if this file is missing. dotenv will never modify any environment variables
// that have already been set. Variable expansion is supported in .env files.
// https://github.com/motdotla/dotenv
// https://github.com/motdotla/dotenv-expand
dotenvFiles.forEach((dotenvFile) => {
dotenvFiles.forEach(dotenvFile => {
if (fs.existsSync(dotenvFile)) {
require('dotenv-expand')(
require('dotenv').config({
path: dotenvFile,
path: dotenvFile
})
);
}
Expand All @@ -61,8 +61,8 @@ function getGitSha() {
const appDirectory = fs.realpathSync(process.cwd());
process.env.NODE_PATH = (process.env.NODE_PATH || '')
.split(path.delimiter)
.filter((folder) => folder && !path.isAbsolute(folder))
.map((folder) => path.resolve(appDirectory, folder))
.filter(folder => folder && !path.isAbsolute(folder))
.map(folder => path.resolve(appDirectory, folder))
.join(path.delimiter);

// Grab NODE_ENV and COMPOSER_* environment variables and prepare them to be
Expand All @@ -71,7 +71,7 @@ const COMPOSER = /^COMPOSER_/i;

function getClientEnvironment(publicUrl) {
const raw = Object.keys(process.env)
.filter((key) => COMPOSER.test(key))
.filter(key => COMPOSER.test(key))
.reduce(
(env, key) => {
env[key] = process.env[key];
Expand All @@ -86,22 +86,24 @@ function getClientEnvironment(publicUrl) {
// This should only be used as an escape hatch. Normally you would put
// images into the `src` and `import` them in code to get their paths.
PUBLIC_URL: publicUrl,
GIT_SHA: getGitSha().toString().replace('\n', ''),
GIT_SHA: getGitSha()
.toString()
.replace('\n', ''),
SDK_PACKAGE_VERSION: '4.11.0', // TODO: change this when Composer supports custom schema/custom runtime
COMPOSER_VERSION: '1.3.0',
COMPOSER_VERSION: '1.3.1',
LOCAL_PUBLISH_PATH:
process.env.LOCAL_PUBLISH_PATH || path.resolve(process.cwd(), '../../../extensions/localPublish/hostedBots'),
WEBLOGIN_CLIENTID: process.env.WEBLOGIN_CLIENTID,
WEBLOGIN_TENANTID: process.env.WEBLOGIN_TENANTID,
WEBLOGIN_REDIRECTURL: process.env.WEBLOGIN_REDIRECTURL,
WEBLOGIN_REDIRECTURL: process.env.WEBLOGIN_REDIRECTURL
}
);
// Stringify all values so we can feed into Webpack DefinePlugin
const stringified = {
'process.env': Object.keys(raw).reduce((env, key) => {
env[key] = JSON.stringify(raw[key]);
return env;
}, {}),
}, {})
};

return { raw, stringified };
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/electron-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@bfc/electron-server",
"license": "MIT",
"author": "Microsoft Corporation",
"version": "1.3.0",
"version": "1.3.1",
"description": "Electron wrapper around Composer that launches Composer as a desktop application.",
"main": "./build/main.js",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/server/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ export const APPINSIGHTS_INSTRUMENTATIONKEY = process.env.APPINSIGHTS_INSTRUMENT

export const piiProperties = ['projectId', 'rootProjectId'];

export const COMPOSER_VERSION = '1.3.0';
export const COMPOSER_VERSION = '1.3.1';