chore(core.gbapp): Some useful refactoring
This commit is contained in:
commit
566899d369
7 changed files with 871 additions and 438 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
## [1.7.6](https://github.com/pragmatismo-io/BotServer/compare/1.7.5...1.7.6) (2019-10-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **core.gbapp:** fix of sts token generation ([d6aa65d](https://github.com/pragmatismo-io/BotServer/commit/d6aa65d))
|
||||||
|
|
||||||
## [1.7.5](https://github.com/pragmatismo-io/BotServer/compare/1.7.4...1.7.5) (2019-10-18)
|
## [1.7.5](https://github.com/pragmatismo-io/BotServer/compare/1.7.4...1.7.5) (2019-10-18)
|
||||||
|
|
||||||
|
|
||||||
|
|
1277
package-lock.json
generated
1277
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "botserver",
|
"name": "botserver",
|
||||||
"version": "1.7.5",
|
"version": "1.7.6",
|
||||||
"description": "General Bot Community Edition open-core server.",
|
"description": "General Bot Community Edition open-core server.",
|
||||||
"main": "./boot.js",
|
"main": "./boot.js",
|
||||||
"bugs": "https://github.com/pragmatismo-io/BotServer/issues",
|
"bugs": "https://github.com/pragmatismo-io/BotServer/issues",
|
||||||
|
|
|
@ -406,16 +406,17 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
|
|
||||||
instance.textAnalyticsEndpoint = textAnalytics.endpoint.replace(`/text/analytics/v2.0`, '');
|
instance.textAnalyticsEndpoint = textAnalytics.endpoint.replace(`/text/analytics/v2.0`, '');
|
||||||
instance.textAnalyticsKey = keys.key1;
|
instance.textAnalyticsKey = keys.key1;
|
||||||
|
if (false) {
|
||||||
|
|
||||||
GBLog.info(`Deploying NLP...`);
|
GBLog.info(`Deploying NLP...`);
|
||||||
const nlp = await this.createNLP(name, `${name}-nlp`, instance.cloudLocation);
|
const nlp = await this.createNLP(name, `${name}-nlp`, instance.cloudLocation);
|
||||||
keys = await this.cognitiveClient.accounts.listKeys(name, nlp.name);
|
keys = await this.cognitiveClient.accounts.listKeys(name, nlp.name);
|
||||||
const nlpAppId = await this.createNLPService(name, name, instance.cloudLocation, culture, instance.nlpAuthoringKey);
|
const nlpAppId = await this.createNLPService(name, name, instance.cloudLocation, culture, instance.nlpAuthoringKey);
|
||||||
|
|
||||||
instance.nlpEndpoint = nlp.endpoint; // TODO: Add this final URL /apps/a149dae1-5134-4624-96b5-885e9e674c9e
|
|
||||||
instance.nlpKey = keys.key1;
|
|
||||||
instance.nlpAppId = nlpAppId;
|
|
||||||
|
|
||||||
|
instance.nlpEndpoint = nlp.endpoint; // TODO: Add this final URL /apps/a149dae1-5134-4624-96b5-885e9e674c9e
|
||||||
|
instance.nlpKey = keys.key1;
|
||||||
|
instance.nlpAppId = nlpAppId;
|
||||||
|
}
|
||||||
GBLog.info(`Deploying Bot...`);
|
GBLog.info(`Deploying Bot...`);
|
||||||
instance.botEndpoint = this.defaultEndPoint;
|
instance.botEndpoint = this.defaultEndPoint;
|
||||||
|
|
||||||
|
|
|
@ -373,7 +373,7 @@ export class GBDeployer {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public runOnce() {
|
public setupDefaultGBUI() {
|
||||||
const root = 'packages/default.gbui';
|
const root = 'packages/default.gbui';
|
||||||
const npm = urlJoin(process.env.PWD, 'node_modules', '.bin', 'npm');
|
const npm = urlJoin(process.env.PWD, 'node_modules', '.bin', 'npm');
|
||||||
if (!Fs.existsSync(`${root}/build`)) {
|
if (!Fs.existsSync(`${root}/build`)) {
|
||||||
|
|
|
@ -348,7 +348,7 @@ export class GBMinService {
|
||||||
private async getSTSToken(instance: any) {
|
private async getSTSToken(instance: any) {
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
url: 'https://westus.api.cognitive.microsoft.com/sts/v1.0/issueToken',
|
url: instance.speechEndpoint,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Ocp-Apim-Subscription-Key': instance.speechKey
|
'Ocp-Apim-Subscription-Key': instance.speechKey
|
||||||
|
|
|
@ -176,7 +176,7 @@ export class GBServer {
|
||||||
|
|
||||||
// Deployment of local applications for the first time.
|
// Deployment of local applications for the first time.
|
||||||
|
|
||||||
deployer.runOnce();
|
deployer.setupDefaultGBUI();
|
||||||
|
|
||||||
GBLog.info(`The Bot Server is in RUNNING mode...`);
|
GBLog.info(`The Bot Server is in RUNNING mode...`);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue