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
2 changes: 1 addition & 1 deletion Composer/packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"scripts": {
"start": "node scripts/start.js",
"build": "node --max-old-space-size=8192 scripts/build.js",
"build": "node --max-old-space-size=2048 scripts/build.js",
Copy link
Contributor Author

@boydc2014 boydc2014 Oct 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason changing this to 2048 is its the default memory size of docker compose builder container. This may not be a long term solution, but it's good for now

"test": "jest",
"lint": "eslint --quiet --ext .js,.jsx,.ts,.tsx ./src",
"lint:fix": "yarn lint --fix"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ import { DialogSetting } from '../bot/interface';
import { BotConfig, BotEnvironments, BotStatus, IBotConnector, IPublishHistory } from './interface';

export class CSharpBotConnector implements IBotConnector {
private adminEndpoint: string;
private endpoint: string;
constructor(endpoint: string) {
constructor(adminEndpoint: string, endpoint: string) {
this.adminEndpoint = adminEndpoint;
this.endpoint = endpoint;
}

Expand All @@ -21,7 +23,7 @@ export class CSharpBotConnector implements IBotConnector {
connect = async (_: BotEnvironments, __: string) => {
// confirm bot runtime is listening here
try {
await axios.get(this.endpoint + '/api/admin');
await axios.get(this.adminEndpoint + '/api/admin');
} catch (err) {
throw new Error(err);
}
Expand Down Expand Up @@ -65,7 +67,7 @@ export class CSharpBotConnector implements IBotConnector {
form.append('microsoftAppPassword', config.MicrosoftAppPassword);
}
try {
await axios.post(this.endpoint + '/api/admin', form, { headers: form.getHeaders() });
await axios.post(this.adminEndpoint + '/api/admin', form, { headers: form.getHeaders() });
} catch (err) {
throw new Error('Unable to sync content to bot runtime');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class DefaultEnvironment implements IEnvironment {
public constructor(config: IEnvironmentConfig) {
this.config = config;
this.settingManager = new DefaultSettingManager(this.config.basePath);
this.botConnector = new CSharpBotConnector(this.config.endpoint);
this.botConnector = new CSharpBotConnector(this.config.adminEndpoint, this.config.endpoint);
}

public getEnvironmentName(_: string): string | undefined {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import settings from '../../settings/settings';
export interface IEnvironmentConfig {
name: string;
basePath: string;
adminEndpoint: string;
endpoint: string;
}

Expand All @@ -20,19 +21,22 @@ export interface IEnvironment {
export const absHostedConfig: IEnvironmentConfig = {
name: 'absh',
basePath: '',
adminEndpoint: '',
endpoint: '',
};

export const mockHostedConfig: IEnvironmentConfig = {
name: 'mockhosted',
basePath: '',
adminEndpoint: '',
endpoint: '',
};

export const defaultConfig: IEnvironmentConfig = {
name: 'default',
basePath: '',
endpoint: settings.botRuntime,
adminEndpoint: settings.botAdminEndpoint,
endpoint: settings.botEndpoint,
};

export const currentConfig: IEnvironmentConfig = absHosted
Expand Down
7 changes: 4 additions & 3 deletions Composer/packages/server/src/settings/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"development": {
"botRuntime": "http://localhost:3979",
"botAdminEndpoint": "http://localhost:3979",
"botEndpoint": "http://localhost:3979",
"assetsLibray": "./assets",
"runtimeFolder": "../../../BotProject/Templates",
"defaultFolder": "../../../SampleBots"
},
"container": {
"botRuntime": "http://botruntime:80"
"botAdminEndpoint": "http://botruntime:80"
}
}
}
10 changes: 1 addition & 9 deletions Composer/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2418,22 +2418,14 @@
dependencies:
"@types/react" "*"

"@types/react@*", "@types/[email protected]":
"@types/react@*", "@types/[email protected]", "@types/react@^16.9.2":
version "16.9.0"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.0.tgz#27434f16d889a335eb4626d1f1e67eda54039e5b"
integrity sha512-eOct1hyZI9YZf/eqNlYu7jxA9qyTw1EGXruAJhHhBDBpc00W0C1vwlnh+hkOf7UFZkNK+UxnFBpwAZe3d7XJhQ==
dependencies:
"@types/prop-types" "*"
csstype "^2.2.0"

"@types/react@^16.9.2":
version "16.9.9"
resolved "https://botbuilder.myget.org/F/botbuilder-declarative/npm/@types/react/-/@types/react-16.9.9.tgz#a62c6f40f04bc7681be5e20975503a64fe783c3a"
integrity sha1-pixvQPBLx2gb5eIJdVA6ZP54PDo=
dependencies:
"@types/prop-types" "*"
csstype "^2.2.0"

"@types/rimraf@^2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-2.0.2.tgz#7f0fc3cf0ff0ad2a99bb723ae1764f30acaf8b6e"
Expand Down