new(all): Custom Domain support per bot.
This commit is contained in:
parent
be40a46013
commit
5a81d15359
5 changed files with 46 additions and 13 deletions
30
package-lock.json
generated
30
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "botserver",
|
||||
"version": "2.0.176",
|
||||
"version": "2.0.178",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -8361,6 +8361,34 @@
|
|||
"restore-cursor": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"cli-progress": {
|
||||
"version": "3.11.2",
|
||||
"resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.11.2.tgz",
|
||||
"integrity": "sha512-lCPoS6ncgX4+rJu5bS3F/iCz17kZ9MPZ6dpuTtI0KXKABkhyXIdYB3Inby1OpaGti3YlI3EeEkM9AuWpelJrVA==",
|
||||
"requires": {
|
||||
"string-width": "^4.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"string-width": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"requires": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.1"
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"requires": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cli-spinner": {
|
||||
"version": "0.2.10",
|
||||
"resolved": "https://registry.npmjs.org/cli-spinner/-/cli-spinner-0.2.10.tgz",
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
"botframework-connector": "4.11.0",
|
||||
"botlib": "1.10.9",
|
||||
"c3-chart-maker": "^0.2.8",
|
||||
"cli-progress": "^3.11.2",
|
||||
"cli-spinner": "0.2.10",
|
||||
"core-js": "3.14.0",
|
||||
"data-forge": "^1.9.5",
|
||||
|
|
|
@ -112,7 +112,7 @@ export class ScheduleServices extends GBService {
|
|||
try {
|
||||
const options = <FindOptions>{ where: { instanceId: min.instance.instanceId } };
|
||||
schedules = await GuaribasSchedule.findAll(options);
|
||||
GBLog.info(`Loading schedules for ${min.instance.botId}...`);
|
||||
GBLog.verbose(`Loading schedules for ${min.instance.botId}...`);
|
||||
await CollectionUtil.asyncForEach(schedules, async item => {
|
||||
this.ScheduleItem(item, min);
|
||||
});
|
||||
|
|
|
@ -647,7 +647,7 @@ export class GBDeployer implements IGBDeployer {
|
|||
|
||||
const packageName = Path.basename(localPath);
|
||||
GBServer.globals.server.use(`/themes/${packageName}`, express.static(localPath));
|
||||
GBLog.info(`Theme (.gbtheme) assets accessible at: /themes/${packageName}.`);
|
||||
GBLog.verbose(`Theme (.gbtheme) assets accessible at: /themes/${packageName}.`);
|
||||
|
||||
break;
|
||||
|
||||
|
@ -848,7 +848,7 @@ export class GBDeployer implements IGBDeployer {
|
|||
|
||||
|
||||
|
||||
GBLog.info(`KB (.gbkb) assets accessible at: /kb/${botId}.gbai/${packageName}.`);
|
||||
GBLog.verbose(`KB (.gbkb) assets accessible at: /kb/${botId}.gbai/${packageName}.`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
*/
|
||||
|
||||
'use strict';
|
||||
const cliProgress = require('cli-progress');
|
||||
const { DialogSet, TextPrompt } = require('botbuilder-dialogs');
|
||||
const express = require('express');
|
||||
const Fs = require('fs');
|
||||
|
@ -169,21 +170,24 @@ export class GBMinService {
|
|||
|
||||
|
||||
// Calls mountBot event to all bots.
|
||||
|
||||
|
||||
const bar1 = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
|
||||
let i = 0;
|
||||
bar1.start(100, i);
|
||||
|
||||
await CollectionUtil.asyncForEach(instances, async instance => {
|
||||
try {
|
||||
bar1.update(i);
|
||||
|
||||
await this.mountBot(instance);
|
||||
GBDeployer.mountGBKBAssets(`${instance.botId}.gbkb`,
|
||||
instance.botId, `${instance.botId}.gbkb`);
|
||||
} catch (error) {
|
||||
GBLog.error(`Error mounting bot ${instance.botId}: ${error.message}\n${error.stack}`);
|
||||
}
|
||||
});
|
||||
bar1.stop();
|
||||
|
||||
// Then all remaining general packages are loaded.
|
||||
|
||||
await CollectionUtil.asyncForEach(instances, async instance => {
|
||||
GBDeployer.mountGBKBAssets(`${instance.botId}.gbkb`,
|
||||
instance.botId, `${instance.botId}.gbkb`);
|
||||
});
|
||||
|
||||
GBLog.info(`Package deployment done.`);
|
||||
}
|
||||
|
@ -310,9 +314,9 @@ export class GBMinService {
|
|||
domain,
|
||||
express.static(urlJoin(GBDeployer.deployFolder, GBMinService.uiPackage, 'build'))
|
||||
);
|
||||
GBLog.info(`Bot UI ${GBMinService.uiPackage} accessible at custom domain: ${domain}.`);
|
||||
GBLog.verbose(`Bot UI ${GBMinService.uiPackage} accessible at custom domain: ${domain}.`);
|
||||
}
|
||||
GBLog.info(`Bot UI ${GBMinService.uiPackage} accessible at: ${uiUrl} and ${uiUrlAlt}.`);
|
||||
GBLog.verbose(`Bot UI ${GBMinService.uiPackage} accessible at: ${uiUrl} and ${uiUrlAlt}.`);
|
||||
}
|
||||
|
||||
// Clients get redirected here in order to create an OAuth authorize url and redirect them to AAD.
|
||||
|
|
Loading…
Add table
Reference in a new issue