new(online.gbui): UI OK.
This commit is contained in:
parent
d694038532
commit
3981777a05
9 changed files with 1972 additions and 5 deletions
|
@ -130,6 +130,7 @@
|
||||||
"cli-progress": "3.12.0",
|
"cli-progress": "3.12.0",
|
||||||
"cli-spinner": "0.2.10",
|
"cli-spinner": "0.2.10",
|
||||||
"core-js": "3.38.1",
|
"core-js": "3.38.1",
|
||||||
|
"cors": "2.8.5",
|
||||||
"csv-database": "0.9.2",
|
"csv-database": "0.9.2",
|
||||||
"data-forge": "1.10.2",
|
"data-forge": "1.10.2",
|
||||||
"date-diff": "1.0.2",
|
"date-diff": "1.0.2",
|
||||||
|
|
|
@ -559,7 +559,7 @@ export class GBDeployer implements IGBDeployer {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (download) {
|
if (download) {
|
||||||
GBLogEx.verbose(min, `Downloading ${itemPath}...`);
|
GBLogEx.info(min, `Downloading: ${itemPath}...`);
|
||||||
const url = item['@microsoft.graph.downloadUrl'];
|
const url = item['@microsoft.graph.downloadUrl'];
|
||||||
|
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|
|
@ -39,6 +39,7 @@ import arrayBufferToBuffer from 'arraybuffer-to-buffer';
|
||||||
import { Semaphore } from 'async-mutex';
|
import { Semaphore } from 'async-mutex';
|
||||||
import { Mutex } from 'async-mutex';
|
import { Mutex } from 'async-mutex';
|
||||||
import chokidar from 'chokidar';
|
import chokidar from 'chokidar';
|
||||||
|
import cors from 'cors';
|
||||||
import {
|
import {
|
||||||
AutoSaveStateMiddleware,
|
AutoSaveStateMiddleware,
|
||||||
BotFrameworkAdapter,
|
BotFrameworkAdapter,
|
||||||
|
@ -158,11 +159,17 @@ export class GBMinService {
|
||||||
public async buildMin(instances: IGBInstance[]): Promise<GBMinInstance[]> {
|
public async buildMin(instances: IGBInstance[]): Promise<GBMinInstance[]> {
|
||||||
// Servers default UI on root address '/' if web enabled.
|
// Servers default UI on root address '/' if web enabled.
|
||||||
|
|
||||||
if (process.env.DISABLE_WEB !== 'true') {
|
if (process.env.DISABLE_WEB !== 'true' || process.env.ENABLE_INSTANCE_ON_URL) {
|
||||||
|
|
||||||
// Servers the bot information object via HTTP so clients can get
|
// Servers the bot information object via HTTP so clients can get
|
||||||
// instance information stored on server.
|
// instance information stored on server.
|
||||||
|
GBServer.globals.server.use(cors({
|
||||||
|
origin: 'http://localhost:8081',
|
||||||
|
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
|
||||||
|
allowedHeaders: ['Content-Type', 'Authorization', 'x-requested-with'
|
||||||
|
, 'x-ms-bot-agent'
|
||||||
|
]
|
||||||
|
}));
|
||||||
GBServer.globals.server.get('/instances/:botId', this.handleGetInstanceForClient.bind(this));
|
GBServer.globals.server.get('/instances/:botId', this.handleGetInstanceForClient.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1961
packages/default.gbui/aggregated_code.md
Normal file
1961
packages/default.gbui/aggregated_code.md
Normal file
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 693 B |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.5 KiB |
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue