From 05005d153db3ebb81ef183ca181b1658a1cb1598 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Sat, 25 May 2019 18:31:19 +0000 Subject: [PATCH 1/8] chore(release): 1.3.1 [skip ci] ## [1.3.1](https://github.com/pragmatismo-io/BotServer/compare/1.3.0...1.3.1) (2019-05-25) ### Bug Fixes * **core.gbapp:** Azure deployment. ([f1b8eb2](https://github.com/pragmatismo-io/BotServer/commit/f1b8eb2)) * **core.gbapp:** Azure deployment. ([49e1743](https://github.com/pragmatismo-io/BotServer/commit/49e1743)) * **core.gbapp:** Azure Deployment. ([f8fab38](https://github.com/pragmatismo-io/BotServer/commit/f8fab38)) * **core.gbapp:** ESNext in tsconfig.json to match MSFT. ([01b8dd5](https://github.com/pragmatismo-io/BotServer/commit/01b8dd5)) * **core.gbapp:** Fixing loading of instances. ([bc9c588](https://github.com/pragmatismo-io/BotServer/commit/bc9c588)) * **core.gbapp:** Investigating BASIC broken. ([f0ec25e](https://github.com/pragmatismo-io/BotServer/commit/f0ec25e)) * **core.gbapp:** package.json artifacts sync. ([01d34a6](https://github.com/pragmatismo-io/BotServer/commit/01d34a6)) * **core.gbapp:** Publishing in Azure. ([4d6779e](https://github.com/pragmatismo-io/BotServer/commit/4d6779e)) * **core.gbapp:** Removing POC code. ([56f46f4](https://github.com/pragmatismo-io/BotServer/commit/56f46f4)) * **kb.gbapp:** Typo fix. ([ba26578](https://github.com/pragmatismo-io/BotServer/commit/ba26578)) * **whatsapp.gblib:** Enabling Whatsapp. ([4351b87](https://github.com/pragmatismo-io/BotServer/commit/4351b87)) * **whatsapp.gblib:** Enabling Whatsapp. ([74f5936](https://github.com/pragmatismo-io/BotServer/commit/74f5936)) * **whatsapp.lib:** Enabling Whatsapp. ([85249e5](https://github.com/pragmatismo-io/BotServer/commit/85249e5)) --- CHANGELOG.md | 19 +++++++++++++++++++ package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac7ea92f..a14a2b88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +## [1.3.1](https://github.com/pragmatismo-io/BotServer/compare/1.3.0...1.3.1) (2019-05-25) + + +### Bug Fixes + +* **core.gbapp:** Azure deployment. ([f1b8eb2](https://github.com/pragmatismo-io/BotServer/commit/f1b8eb2)) +* **core.gbapp:** Azure deployment. ([49e1743](https://github.com/pragmatismo-io/BotServer/commit/49e1743)) +* **core.gbapp:** Azure Deployment. ([f8fab38](https://github.com/pragmatismo-io/BotServer/commit/f8fab38)) +* **core.gbapp:** ESNext in tsconfig.json to match MSFT. ([01b8dd5](https://github.com/pragmatismo-io/BotServer/commit/01b8dd5)) +* **core.gbapp:** Fixing loading of instances. ([bc9c588](https://github.com/pragmatismo-io/BotServer/commit/bc9c588)) +* **core.gbapp:** Investigating BASIC broken. ([f0ec25e](https://github.com/pragmatismo-io/BotServer/commit/f0ec25e)) +* **core.gbapp:** package.json artifacts sync. ([01d34a6](https://github.com/pragmatismo-io/BotServer/commit/01d34a6)) +* **core.gbapp:** Publishing in Azure. ([4d6779e](https://github.com/pragmatismo-io/BotServer/commit/4d6779e)) +* **core.gbapp:** Removing POC code. ([56f46f4](https://github.com/pragmatismo-io/BotServer/commit/56f46f4)) +* **kb.gbapp:** Typo fix. ([ba26578](https://github.com/pragmatismo-io/BotServer/commit/ba26578)) +* **whatsapp.gblib:** Enabling Whatsapp. ([4351b87](https://github.com/pragmatismo-io/BotServer/commit/4351b87)) +* **whatsapp.gblib:** Enabling Whatsapp. ([74f5936](https://github.com/pragmatismo-io/BotServer/commit/74f5936)) +* **whatsapp.lib:** Enabling Whatsapp. ([85249e5](https://github.com/pragmatismo-io/BotServer/commit/85249e5)) + # [1.3.0](https://github.com/pragmatismo-io/BotServer/compare/1.2.2...1.3.0) (2019-05-12) diff --git a/package.json b/package.json index 24b2dd19..6441563e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "botserver", - "version": "1.3.0", + "version": "1.3.1", "description": "General Bot Community Edition open-core server.", "main": "./src/app.ts", "bugs": "https://github.com/pragmatismo-io/BotServer/issues", -- 2.39.5 From 488de3895b5604fb93e35d2c7ccdd87811907904 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Sun, 26 May 2019 23:41:29 +0000 Subject: [PATCH 2/8] chore(release): 1.3.2 [skip ci] ## [1.3.2](https://github.com/pragmatismo-io/BotServer/compare/1.3.1...1.3.2) (2019-05-26) ### Bug Fixes * **core.gbapp:** Self-replication on Azure. ([2ccae38](https://github.com/pragmatismo-io/BotServer/commit/2ccae38)) * **core.gbapp:** Self-replication on Azure. ([4b7d29d](https://github.com/pragmatismo-io/BotServer/commit/4b7d29d)) --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a14a2b88..1e7d6fb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.3.2](https://github.com/pragmatismo-io/BotServer/compare/1.3.1...1.3.2) (2019-05-26) + + +### Bug Fixes + +* **core.gbapp:** Self-replication on Azure. ([2ccae38](https://github.com/pragmatismo-io/BotServer/commit/2ccae38)) +* **core.gbapp:** Self-replication on Azure. ([4b7d29d](https://github.com/pragmatismo-io/BotServer/commit/4b7d29d)) + ## [1.3.1](https://github.com/pragmatismo-io/BotServer/compare/1.3.0...1.3.1) (2019-05-25) diff --git a/package.json b/package.json index 6441563e..8a5fd116 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "botserver", - "version": "1.3.1", + "version": "1.3.2", "description": "General Bot Community Edition open-core server.", "main": "./src/app.ts", "bugs": "https://github.com/pragmatismo-io/BotServer/issues", -- 2.39.5 From e283a6d003148bb41826ca8ad09702fd66bb6bb6 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 27 May 2019 11:55:26 +0000 Subject: [PATCH 3/8] chore(release): 1.3.3 [skip ci] ## [1.3.3](https://github.com/pragmatismo-io/BotServer/compare/1.3.2...1.3.3) (2019-05-27) ### Bug Fixes * **core.gbapp:** Self-replication on Azure ([bf602c6](https://github.com/pragmatismo-io/BotServer/commit/bf602c6)) * **core.gbapp:** Self-replication on Azure ([3cca504](https://github.com/pragmatismo-io/BotServer/commit/3cca504)) * **core.gbapp:** Self-replication on Azure ([05edafd](https://github.com/pragmatismo-io/BotServer/commit/05edafd)) --- CHANGELOG.md | 9 +++++++++ package.json | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e7d6fb2..ad5d9150 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [1.3.3](https://github.com/pragmatismo-io/BotServer/compare/1.3.2...1.3.3) (2019-05-27) + + +### Bug Fixes + +* **core.gbapp:** Self-replication on Azure ([bf602c6](https://github.com/pragmatismo-io/BotServer/commit/bf602c6)) +* **core.gbapp:** Self-replication on Azure ([3cca504](https://github.com/pragmatismo-io/BotServer/commit/3cca504)) +* **core.gbapp:** Self-replication on Azure ([05edafd](https://github.com/pragmatismo-io/BotServer/commit/05edafd)) + ## [1.3.2](https://github.com/pragmatismo-io/BotServer/compare/1.3.1...1.3.2) (2019-05-26) diff --git a/package.json b/package.json index ce53f299..9ae831a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "botserver", - "version": "1.3.2", + "version": "1.3.3", "description": "General Bot Community Edition open-core server.", "main": "./boot.js", "bugs": "https://github.com/pragmatismo-io/BotServer/issues", @@ -245,4 +245,4 @@ "post-merge": [] } } -} \ No newline at end of file +} -- 2.39.5 From 557bf400c9f3bd25267aa2fb5415fbffc5310648 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 27 May 2019 12:22:43 +0000 Subject: [PATCH 4/8] chore(release): 1.3.4 [skip ci] ## [1.3.4](https://github.com/pragmatismo-io/BotServer/compare/1.3.3...1.3.4) (2019-05-27) ### Bug Fixes * **core.gbapp:** Self-replication on Azure ([e82a813](https://github.com/pragmatismo-io/BotServer/commit/e82a813)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad5d9150..d2719a0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.3.4](https://github.com/pragmatismo-io/BotServer/compare/1.3.3...1.3.4) (2019-05-27) + + +### Bug Fixes + +* **core.gbapp:** Self-replication on Azure ([e82a813](https://github.com/pragmatismo-io/BotServer/commit/e82a813)) + ## [1.3.3](https://github.com/pragmatismo-io/BotServer/compare/1.3.2...1.3.3) (2019-05-27) diff --git a/package.json b/package.json index 9ae831a3..9eddc286 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "botserver", - "version": "1.3.3", + "version": "1.3.4", "description": "General Bot Community Edition open-core server.", "main": "./boot.js", "bugs": "https://github.com/pragmatismo-io/BotServer/issues", -- 2.39.5 From 7e8640fb6397bac16cbbbf748a681cb954ef25f7 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 27 May 2019 12:58:01 +0000 Subject: [PATCH 5/8] chore(release): 1.3.5 [skip ci] ## [1.3.5](https://github.com/pragmatismo-io/BotServer/compare/1.3.4...1.3.5) (2019-05-27) ### Bug Fixes * **core.gbapp:** Self-replication on Azure ([f64cc4c](https://github.com/pragmatismo-io/BotServer/commit/f64cc4c)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2719a0f..95e61ce7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.3.5](https://github.com/pragmatismo-io/BotServer/compare/1.3.4...1.3.5) (2019-05-27) + + +### Bug Fixes + +* **core.gbapp:** Self-replication on Azure ([f64cc4c](https://github.com/pragmatismo-io/BotServer/commit/f64cc4c)) + ## [1.3.4](https://github.com/pragmatismo-io/BotServer/compare/1.3.3...1.3.4) (2019-05-27) diff --git a/package.json b/package.json index 9eddc286..0551a11d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "botserver", - "version": "1.3.4", + "version": "1.3.5", "description": "General Bot Community Edition open-core server.", "main": "./boot.js", "bugs": "https://github.com/pragmatismo-io/BotServer/issues", -- 2.39.5 From 86b45332c220dbb81bc6b4e7050227b58739d1e6 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 27 May 2019 17:10:50 +0000 Subject: [PATCH 6/8] chore(release): 1.3.6 [skip ci] ## [1.3.6](https://github.com/pragmatismo-io/BotServer/compare/1.3.5...1.3.6) (2019-05-27) ### Bug Fixes * **core.gbapp:** Self-replication on Azure ([5f0fb3b](https://github.com/pragmatismo-io/BotServer/commit/5f0fb3b)) * **core.gbapp:** Self-replication on Azure ([2509157](https://github.com/pragmatismo-io/BotServer/commit/2509157)) * **core.gbapp:** Self-replication on Azure ([8850370](https://github.com/pragmatismo-io/BotServer/commit/8850370)) --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95e61ce7..24470631 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [1.3.6](https://github.com/pragmatismo-io/BotServer/compare/1.3.5...1.3.6) (2019-05-27) + + +### Bug Fixes + +* **core.gbapp:** Self-replication on Azure ([5f0fb3b](https://github.com/pragmatismo-io/BotServer/commit/5f0fb3b)) +* **core.gbapp:** Self-replication on Azure ([2509157](https://github.com/pragmatismo-io/BotServer/commit/2509157)) +* **core.gbapp:** Self-replication on Azure ([8850370](https://github.com/pragmatismo-io/BotServer/commit/8850370)) + ## [1.3.5](https://github.com/pragmatismo-io/BotServer/compare/1.3.4...1.3.5) (2019-05-27) diff --git a/package.json b/package.json index d5d477f3..4fa94b62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "botserver", - "version": "1.3.5", + "version": "1.3.6", "description": "General Bot Community Edition open-core server.", "main": "./boot.js", "bugs": "https://github.com/pragmatismo-io/BotServer/issues", -- 2.39.5 From 6eafcb142c7aee4216a28f4cf93963a46667f82a Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Wed, 5 Jun 2019 22:10:54 +0000 Subject: [PATCH 7/8] chore(release): 1.3.7 [skip ci] ## [1.3.7](https://github.com/pragmatismo-io/BotServer/compare/1.3.6...1.3.7) (2019-06-05) ### Bug Fixes * **core.gbapp:** Self-replication on Azure ([f29c8c2](https://github.com/pragmatismo-io/BotServer/commit/f29c8c2)) * **core.gbapp:** Self-replication on Azure ([4d484d0](https://github.com/pragmatismo-io/BotServer/commit/4d484d0)) --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24470631..88f6393b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.3.7](https://github.com/pragmatismo-io/BotServer/compare/1.3.6...1.3.7) (2019-06-05) + + +### Bug Fixes + +* **core.gbapp:** Self-replication on Azure ([f29c8c2](https://github.com/pragmatismo-io/BotServer/commit/f29c8c2)) +* **core.gbapp:** Self-replication on Azure ([4d484d0](https://github.com/pragmatismo-io/BotServer/commit/4d484d0)) + ## [1.3.6](https://github.com/pragmatismo-io/BotServer/compare/1.3.5...1.3.6) (2019-05-27) diff --git a/package.json b/package.json index f92f375e..a30a66fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "botserver", - "version": "1.3.6", + "version": "1.3.7", "description": "General Bot Community Edition open-core server.", "main": "./boot.js", "bugs": "https://github.com/pragmatismo-io/BotServer/issues", -- 2.39.5 From d61d2f86e869d3ce42bb7392f5b5ed9fb0134d36 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Mon, 17 Jun 2019 15:22:13 -0300 Subject: [PATCH 8/8] fix(core.gbapp): ms-rest-azure updated due to https://github.com/Azure/ms-rest-js/issues/347. --- gbot.cmd | 2 +- package-lock.json | 78 +++++++++++++++---- package.json | 2 +- .../services/AzureDeployerService.ts | 6 +- .../services/WhatsappDirectLine.ts | 20 +++-- 5 files changed, 81 insertions(+), 27 deletions(-) diff --git a/gbot.cmd b/gbot.cmd index 4e2690a4..2acfb338 100644 --- a/gbot.cmd +++ b/gbot.cmd @@ -12,4 +12,4 @@ ECHO Compiling... CALL tsc :ALLSET -node app.js +node boot.js diff --git a/package-lock.json b/package-lock.json index 8d78ccc1..6b82d3cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,16 +36,60 @@ } }, "@azure/ms-rest-js": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-1.2.6.tgz", - "integrity": "sha512-8cmDpxsQjVdveJwYKtNnkJorxEORLYJu9UHaUvLZA6yHExzDeISHAcSVWE0J05+VkJtqheVHF17M+2ro18Cdnw==", + "version": "1.8.13", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-1.8.13.tgz", + "integrity": "sha512-jAa6Y2XrvwbEqkaEXDHK+ReNo0WnCPS+LgQ1dRAJUUNxK4CghF5u+SXsVtPENritilVE7FVteqsLOtlhTk+haA==", "requires": { - "axios": "^0.18.0", + "@types/tunnel": "0.0.0", + "axios": "^0.19.0", "form-data": "^2.3.2", "tough-cookie": "^2.4.3", "tslib": "^1.9.2", + "tunnel": "0.0.6", "uuid": "^3.2.1", "xml2js": "^0.4.19" + }, + "dependencies": { + "axios": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz", + "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==", + "requires": { + "follow-redirects": "1.5.10", + "is-buffer": "^2.0.2" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + } + }, + "is-buffer": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", + "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + } } }, "@babel/code-frame": { @@ -2995,6 +3039,19 @@ "rsa-pem-from-mod-exp": "^0.8.4" }, "dependencies": { + "@azure/ms-rest-js": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-1.2.6.tgz", + "integrity": "sha512-8cmDpxsQjVdveJwYKtNnkJorxEORLYJu9UHaUvLZA6yHExzDeISHAcSVWE0J05+VkJtqheVHF17M+2ro18Cdnw==", + "requires": { + "axios": "^0.18.0", + "form-data": "^2.3.2", + "tough-cookie": "^2.4.3", + "tslib": "^1.9.2", + "uuid": "^3.2.1", + "xml2js": "^0.4.19" + } + }, "@types/node": { "version": "10.14.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.7.tgz", @@ -9266,19 +9323,6 @@ } } }, - "ms-rest-js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ms-rest-js/-/ms-rest-js-1.0.1.tgz", - "integrity": "sha512-o2Gms3XE4sCKm0FZLJicq0aa2ybYyV8pwUHKHJG1QExkk/csM7PLuHiaPAj6Xn3kzqzAx4cAYtyEp4P1T3ujyA==", - "requires": { - "axios": "^0.18.0", - "form-data": "^2.3.2", - "tough-cookie": "^2.4.3", - "tslib": "^1.9.2", - "uuid": "^3.2.1", - "xml2js": "^0.4.19" - } - }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", diff --git a/package.json b/package.json index dfa7f170..da8fc217 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "mocha-typescript": "1.1.17", "ms": "2.1.1", "ms-rest-azure": "2.6.0", - "ms-rest-js": "1.0.1", + "@azure/ms-rest-js": "1.8.13", "nexmo": "2.4.1", "ngrok": "3.1.1", "npm": "6.9.0", diff --git a/packages/azuredeployer.gbapp/services/AzureDeployerService.ts b/packages/azuredeployer.gbapp/services/AzureDeployerService.ts index 1d600cbc..685cc2fe 100644 --- a/packages/azuredeployer.gbapp/services/AzureDeployerService.ts +++ b/packages/azuredeployer.gbapp/services/AzureDeployerService.ts @@ -36,15 +36,15 @@ 'use strict'; +import { HttpHeaders, HttpMethods, ServiceClient, WebResource } from '@azure/ms-rest-js'; import { CognitiveServicesManagementClient } from 'azure-arm-cognitiveservices'; import { ResourceManagementClient, SubscriptionClient } from 'azure-arm-resource'; import { SearchManagementClient } from 'azure-arm-search'; import { SqlManagementClient } from 'azure-arm-sql'; import { WebSiteManagementClient } from 'azure-arm-website'; //tslint:disable-next-line:no-submodule-imports -import { AppServicePlan, Site, SiteConfigResource, SiteSourceControl, SiteLogsConfig } from 'azure-arm-website/lib/models'; +import { AppServicePlan, Site, SiteConfigResource, SiteLogsConfig, SiteSourceControl } from 'azure-arm-website/lib/models'; import { GBLog, IGBInstallationDeployer, IGBInstance } from 'botlib'; -import { HttpHeaders, HttpMethods, ServiceClient, WebResource } from 'ms-rest-js'; import { GBAdminService } from '../../../packages/admin.gbapp/services/GBAdminService'; import { GBCorePackage } from '../../../packages/core.gbapp'; import { GBConfigService } from '../../../packages/core.gbapp/services/GBConfigService'; @@ -719,7 +719,7 @@ export class AzureDeployerService implements IGBInstallationDeployer { serverFarmId: serverFarmId, siteConfig: { appSettings: [ - { name: 'WEBSITES_CONTAINER_START_TIME_LIMIT', value: WebSiteResponseTimeout }, + { name: 'WEBSITES_CONTAINER_START_TIME_LIMIT', value: `${WebSiteResponseTimeout}` }, { name: 'WEBSITE_NODE_DEFAULT_VERSION', value: GBAdminService.getNodeVersion() }, { name: 'ADDITIONAL_DEPLOY_PATH', value: `` }, { name: 'ADMIN_PASS', value: `${instance.adminPass}` }, diff --git a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts index fee48f3b..442bebf4 100644 --- a/packages/whatsapp.gblib/services/WhatsappDirectLine.ts +++ b/packages/whatsapp.gblib/services/WhatsappDirectLine.ts @@ -17,7 +17,6 @@ export class WhatsappDirectLine extends GBService { public whatsappServiceKey: string; public whatsappServiceNumber: string; public whatsappServiceUrl: string; - public whatsappServiceWebhookUrl: string; public botId: string; public watermark: string; @@ -28,8 +27,7 @@ export class WhatsappDirectLine extends GBService { directLineSecret, whatsappServiceKey, whatsappServiceNumber, - whatsappServiceUrl, - whatsappServiceWebhookUrl + whatsappServiceUrl ) { super(); @@ -37,8 +35,7 @@ export class WhatsappDirectLine extends GBService { this.whatsappServiceKey = whatsappServiceKey; this.whatsappServiceNumber = whatsappServiceNumber; this.whatsappServiceUrl = whatsappServiceUrl; - this.whatsappServiceWebhookUrl = whatsappServiceWebhookUrl; - var fs = require('fs') + const fs = require('fs'); this.directLineClient = new Swagger({ @@ -94,7 +91,10 @@ export class WhatsappDirectLine extends GBService { client.Conversations.Conversations_StartConversation() .then(response => { return response.obj.conversationId; + }).catch(err => { + GBLog.error(`Error calling Conversations_StartConversation on Whatsapp channel ${err}`); }) + .then(generatedConversationId => { this.conversationIds[from] = generatedConversationId; this.inputMessage(client, generatedConversationId, text, from, fromName); @@ -108,7 +108,10 @@ export class WhatsappDirectLine extends GBService { this.inputMessage(client, conversationId, text, from, fromName); } res.end(); + }).catch(err => { + GBLog.error(`Error initializing DirectLine for Whatsapp channel ${err}`); }); + } public inputMessage(client, conversationId, text, from, fromName) { @@ -143,9 +146,16 @@ export class WhatsappDirectLine extends GBService { return response.obj.activities; }) + .catch(err => { + GBLog.error(`Error calling Conversations_GetActivities on Whatsapp channel ${err}`); + }) .then(activities => { this.printMessages(activities, conversationId, from, fromName); + }) + .catch(err => { + GBLog.error(`Error calling printMessages on Whatsapp channel ${err}`); }); + }, this.pollInterval); } -- 2.39.5