From 13628ab934a5c766da87b8828ddaf0af268648c6 Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Wed, 10 May 2017 14:49:06 -0300 Subject: [PATCH 01/49] [node-ReceiveAttachment] Update to BotBuilder v3.8.0 --- Node/core-ReceiveAttachment/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-ReceiveAttachment/package.json b/Node/core-ReceiveAttachment/package.json index 616e592b50..c80e691408 100644 --- a/Node/core-ReceiveAttachment/package.json +++ b/Node/core-ReceiveAttachment/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "request": "^2.79.0", "request-promise": "^4.1.1", "restify": "^4.3.0", From b8641a59fab9cb1a998fa6feb3b1d26851ae4cf1 Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Wed, 10 May 2017 14:54:28 -0300 Subject: [PATCH 02/49] [node-CarouselCards] Update to BotBuilder v3.8.0 --- Node/cards-CarouselCards/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/cards-CarouselCards/package.json b/Node/cards-CarouselCards/package.json index 71513964c8..64b4b444c8 100644 --- a/Node/cards-CarouselCards/package.json +++ b/Node/cards-CarouselCards/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } From 30771547c34a0dbbf4aa92765bc273a3ee1b01ba Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Wed, 10 May 2017 15:22:28 -0300 Subject: [PATCH 03/49] [node-MiddlewareLogging] Update to BotBuilder v3.8.0 --- Node/capability-middlewareLogging/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/capability-middlewareLogging/package.json b/Node/capability-middlewareLogging/package.json index b02826fde2..bc35ef4594 100644 --- a/Node/capability-middlewareLogging/package.json +++ b/Node/capability-middlewareLogging/package.json @@ -9,7 +9,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "restify": "^4.3.0" } } From a334009faacf6ba091cfd3155e185f0b6210b205 Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Wed, 10 May 2017 15:33:13 -0300 Subject: [PATCH 04/49] [Node-SimpleTaskAutomation] Update to BotBuilder v3.8.0 --- Node/capability-SimpleTaskAutomation/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/capability-SimpleTaskAutomation/package.json b/Node/capability-SimpleTaskAutomation/package.json index e8df0dd880..a40b042d35 100644 --- a/Node/capability-SimpleTaskAutomation/package.json +++ b/Node/capability-SimpleTaskAutomation/package.json @@ -9,7 +9,7 @@ "author": "", "license": "ISC", "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "restify": "^4.3.0", "uuid": "^3.0.1" }, From df158bc30e52f1fbc06477e62bac348f9841a5f0 Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Wed, 10 May 2017 15:56:06 -0300 Subject: [PATCH 05/49] [node-State] Update to BotBuilder v3.8.0 --- Node/core-State/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-State/package.json b/Node/core-State/package.json index f85133f23b..c48f654e7f 100644 --- a/Node/core-State/package.json +++ b/Node/core-State/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } From e4e07c130527c4378ce579591e96c6c2f76a0601 Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Wed, 10 May 2017 16:04:33 -0300 Subject: [PATCH 06/49] [node-BasicMultiDialog] Update to BotBuilder v3.8.0 --- Node/core-basicMultiDialog/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-basicMultiDialog/package.json b/Node/core-basicMultiDialog/package.json index 4c5fdb488d..7bb312314d 100644 --- a/Node/core-basicMultiDialog/package.json +++ b/Node/core-basicMultiDialog/package.json @@ -1,7 +1,7 @@ { "name": "core-basicMultiDialog", "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "dotenv": "^2.0.0", "restify": "^4.3.0" }, From d8104d2e6ff04893bc7dbd75c888825720cf4c0e Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Wed, 10 May 2017 16:56:45 -0300 Subject: [PATCH 07/49] [node-MultiDialogs] Update to BotBuilder v3.8.0 --- Node/core-MultiDialogs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-MultiDialogs/package.json b/Node/core-MultiDialogs/package.json index b555a4a1d1..be87581ba1 100644 --- a/Node/core-MultiDialogs/package.json +++ b/Node/core-MultiDialogs/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } From d7cfe17ad5f96b1b5511bd5c2859e5d495448309 Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Wed, 10 May 2017 17:36:02 -0300 Subject: [PATCH 08/49] [node-CreateNewConversation] Update to BotBuilder v3.8.0 --- Node/core-CreateNewConversation/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-CreateNewConversation/package.json b/Node/core-CreateNewConversation/package.json index 35bd8a6e81..67dc7da320 100644 --- a/Node/core-CreateNewConversation/package.json +++ b/Node/core-CreateNewConversation/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } From 9e1d2c951eedae28ce495058e4088b6134d85b55 Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Wed, 10 May 2017 18:08:48 -0300 Subject: [PATCH 09/49] [node-ProactiveMessages] Update to BotBuilder v3.8.0 --- Node/core-proactiveMessages/simpleSendMessage/package.json | 2 +- Node/core-proactiveMessages/startNewDialog/package.json | 2 +- .../startNewDialogWithPrompt/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Node/core-proactiveMessages/simpleSendMessage/package.json b/Node/core-proactiveMessages/simpleSendMessage/package.json index 61773db177..78a49e3151 100644 --- a/Node/core-proactiveMessages/simpleSendMessage/package.json +++ b/Node/core-proactiveMessages/simpleSendMessage/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/MicrosoftDX/botFramework-proactiveMessages#readme", "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "restify": "^4.3.0" } } diff --git a/Node/core-proactiveMessages/startNewDialog/package.json b/Node/core-proactiveMessages/startNewDialog/package.json index 3f822c3008..4472e0da3e 100644 --- a/Node/core-proactiveMessages/startNewDialog/package.json +++ b/Node/core-proactiveMessages/startNewDialog/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/MicrosoftDX/botFramework-proactiveMessages#readme", "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "restify": "^4.3.0" } } diff --git a/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json b/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json index 3f822c3008..4472e0da3e 100644 --- a/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json +++ b/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/MicrosoftDX/botFramework-proactiveMessages#readme", "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.0", "restify": "^4.3.0" } } From a086be940e4cc7fb97a0d7891e9e84c9d928aba2 Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Wed, 10 May 2017 18:13:02 -0300 Subject: [PATCH 10/49] [node-ProgressDialog] Update to BotBuilder v3.8.0 --- Node/core-ProgressDIalog/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-ProgressDIalog/package.json b/Node/core-ProgressDIalog/package.json index 55a95a9ff5..dbfe08856c 100644 --- a/Node/core-ProgressDIalog/package.json +++ b/Node/core-ProgressDIalog/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.0-beta2", + "botbuilder": "^3.8.0", "restify": "^4.3.0" } } From 3542b7225993ac8e938d23fcc71d60514b5fa693 Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Thu, 11 May 2017 17:04:49 -0300 Subject: [PATCH 11/49] Update to BotBuilder v3.8.1 [node-MiddlewareLogging] [node-SimpleTaskAutomation] [node-CarouselCards] [node-BasicMultiDialog] [node-CreateNewConversation] [node-MultiDialogs] [node-ProactiveMessage] [node-ProgressDialog] [node-ReceiveAttachment] [node-State] --- Node/capability-SimpleTaskAutomation/package.json | 2 +- Node/capability-middlewareLogging/package.json | 2 +- Node/cards-CarouselCards/package.json | 2 +- Node/core-CreateNewConversation/package.json | 2 +- Node/core-MultiDialogs/package.json | 2 +- Node/core-ProgressDIalog/package.json | 2 +- Node/core-ReceiveAttachment/package.json | 2 +- Node/core-State/package.json | 2 +- Node/core-basicMultiDialog/package.json | 2 +- Node/core-proactiveMessages/simpleSendMessage/package.json | 2 +- Node/core-proactiveMessages/startNewDialog/package.json | 2 +- .../startNewDialogWithPrompt/package.json | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Node/capability-SimpleTaskAutomation/package.json b/Node/capability-SimpleTaskAutomation/package.json index a40b042d35..32335920c9 100644 --- a/Node/capability-SimpleTaskAutomation/package.json +++ b/Node/capability-SimpleTaskAutomation/package.json @@ -9,7 +9,7 @@ "author": "", "license": "ISC", "dependencies": { - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0", "uuid": "^3.0.1" }, diff --git a/Node/capability-middlewareLogging/package.json b/Node/capability-middlewareLogging/package.json index bc35ef4594..2f21cb951e 100644 --- a/Node/capability-middlewareLogging/package.json +++ b/Node/capability-middlewareLogging/package.json @@ -9,7 +9,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0" } } diff --git a/Node/cards-CarouselCards/package.json b/Node/cards-CarouselCards/package.json index 64b4b444c8..94544b000a 100644 --- a/Node/cards-CarouselCards/package.json +++ b/Node/cards-CarouselCards/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } diff --git a/Node/core-CreateNewConversation/package.json b/Node/core-CreateNewConversation/package.json index 67dc7da320..5cc3fa17d9 100644 --- a/Node/core-CreateNewConversation/package.json +++ b/Node/core-CreateNewConversation/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } diff --git a/Node/core-MultiDialogs/package.json b/Node/core-MultiDialogs/package.json index be87581ba1..1c47e36c8c 100644 --- a/Node/core-MultiDialogs/package.json +++ b/Node/core-MultiDialogs/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } diff --git a/Node/core-ProgressDIalog/package.json b/Node/core-ProgressDIalog/package.json index dbfe08856c..deccced9a4 100644 --- a/Node/core-ProgressDIalog/package.json +++ b/Node/core-ProgressDIalog/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0" } } diff --git a/Node/core-ReceiveAttachment/package.json b/Node/core-ReceiveAttachment/package.json index c80e691408..b921d8ce4b 100644 --- a/Node/core-ReceiveAttachment/package.json +++ b/Node/core-ReceiveAttachment/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "request": "^2.79.0", "request-promise": "^4.1.1", "restify": "^4.3.0", diff --git a/Node/core-State/package.json b/Node/core-State/package.json index c48f654e7f..76befc1ceb 100644 --- a/Node/core-State/package.json +++ b/Node/core-State/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } diff --git a/Node/core-basicMultiDialog/package.json b/Node/core-basicMultiDialog/package.json index 7bb312314d..c036e8d799 100644 --- a/Node/core-basicMultiDialog/package.json +++ b/Node/core-basicMultiDialog/package.json @@ -1,7 +1,7 @@ { "name": "core-basicMultiDialog", "dependencies": { - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "dotenv": "^2.0.0", "restify": "^4.3.0" }, diff --git a/Node/core-proactiveMessages/simpleSendMessage/package.json b/Node/core-proactiveMessages/simpleSendMessage/package.json index 78a49e3151..4bcfba555d 100644 --- a/Node/core-proactiveMessages/simpleSendMessage/package.json +++ b/Node/core-proactiveMessages/simpleSendMessage/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/MicrosoftDX/botFramework-proactiveMessages#readme", "dependencies": { - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0" } } diff --git a/Node/core-proactiveMessages/startNewDialog/package.json b/Node/core-proactiveMessages/startNewDialog/package.json index 4472e0da3e..fa42a811aa 100644 --- a/Node/core-proactiveMessages/startNewDialog/package.json +++ b/Node/core-proactiveMessages/startNewDialog/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/MicrosoftDX/botFramework-proactiveMessages#readme", "dependencies": { - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0" } } diff --git a/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json b/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json index 4472e0da3e..fa42a811aa 100644 --- a/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json +++ b/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/MicrosoftDX/botFramework-proactiveMessages#readme", "dependencies": { - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0" } } From 48364920387c036a2f355ebc9abc8d87793de08a Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Thu, 11 May 2017 17:05:41 -0300 Subject: [PATCH 12/49] [node-RichCards] Update to BotBuilder v3.8.1 --- Node/cards-RichCards/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/cards-RichCards/package.json b/Node/cards-RichCards/package.json index 881b2575c1..5b1f45f846 100644 --- a/Node/cards-RichCards/package.json +++ b/Node/cards-RichCards/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } From 766aa59ca369e4e2978bbe94b5692ca3296ee372 Mon Sep 17 00:00:00 2001 From: Enzo Cano Date: Thu, 11 May 2017 17:06:37 -0300 Subject: [PATCH 13/49] [node-SendAttatchment] Update to BotBuilder v3.8.1 --- Node/core-SendAttachment/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-SendAttachment/package.json b/Node/core-SendAttachment/package.json index 4cb718a1dd..856e4818cd 100644 --- a/Node/core-SendAttachment/package.json +++ b/Node/core-SendAttachment/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", "restify": "^4.3.0", "swagger-client": "^2.1.32", "dotenv-extended": "^1.0.4" From 295f4b9103b52b3bb16b2bea7fa2dd5122ed28e9 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 10:29:46 -0300 Subject: [PATCH 14/49] Formatting --- .../node_custom_channel.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Node/blog-customChannelData/node_custom_channel.js b/Node/blog-customChannelData/node_custom_channel.js index 68def93ff1..a54e28d786 100644 --- a/Node/blog-customChannelData/node_custom_channel.js +++ b/Node/blog-customChannelData/node_custom_channel.js @@ -10,8 +10,8 @@ const MSFT_APP_PW = process.env.MSFT_APP_PW; //create an express server var app = express(); -app.listen( process.env.PORT || 3000, function(){ - console.log("Express app listening on port: " + process.env.PORT || 3000); +app.listen(process.env.PORT || 3000, function () { + console.log("Express app listening on port: " + process.env.PORT || 3000); }); //create a chat connector for the bot @@ -27,28 +27,28 @@ var bot = new botbuilder.UniversalBot(connector); app.post("/messages/receive", connector.listen()); //root dialog -bot.dialog("/", function(session){ +bot.dialog("/", function (session) { console.log("-------------------------------------------------"); console.log("Bot Received Message at '/' dialogue endpoint: "); //detect Facebook Messenger message here - if(session.message.address.channelId == "facebook"){ + if (session.message.address.channelId == "facebook") { session.send("Facebook message recognized!"); - session.beginDialog("/send_share_button"); + session.beginDialog("/send_share_button"); } else session.send("Channel other than Facebook recognized."); }); //where we create a facebook share button using sourceEvent -bot.dialog("/send_share_button", function(session){ +bot.dialog("/send_share_button", function (session) { //construct a new message with the current session context var msg = new botbuilder.Message(session).sourceEvent({ //specify the channel facebook: { - //format according to channel's requirements - //(in our case, the above JSON required by Facebook) - attachment: { + //format according to channel's requirements + //(in our case, the above JSON required by Facebook) + attachment: { type: "template", payload: { template_type: "generic", From f5949dab83ab186c751cd5938c44fc4c5d18758f Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 11:03:13 -0300 Subject: [PATCH 15/49] Update to BotBuilder v3.8.1 --- Node/blog-customChannelData/.env | 3 +++ Node/blog-customChannelData/node_custom_channel.js | 3 +++ Node/blog-customChannelData/package.json | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 Node/blog-customChannelData/.env diff --git a/Node/blog-customChannelData/.env b/Node/blog-customChannelData/.env new file mode 100644 index 0000000000..b0e3340b17 --- /dev/null +++ b/Node/blog-customChannelData/.env @@ -0,0 +1,3 @@ +# Bot Framework Variables +MSFT_APP_ID= +MSFT_APP_PW= diff --git a/Node/blog-customChannelData/node_custom_channel.js b/Node/blog-customChannelData/node_custom_channel.js index a54e28d786..04a24c5328 100644 --- a/Node/blog-customChannelData/node_custom_channel.js +++ b/Node/blog-customChannelData/node_custom_channel.js @@ -1,3 +1,6 @@ +//load environment variables from the .env file +require('dotenv-extended').load(); + //loading modules var express = require("express"); var restify = require("restify"); diff --git a/Node/blog-customChannelData/package.json b/Node/blog-customChannelData/package.json index c9516e5d29..cbdca2d9e6 100644 --- a/Node/blog-customChannelData/package.json +++ b/Node/blog-customChannelData/package.json @@ -4,7 +4,8 @@ "description": "Microsoft Bot Framework bot written in NodeJS to test issues.", "main": "node_bot.js", "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", + "dotenv-extended": "^2.0.0", "express": "^4.14.1", "request-promise": "^4.1.1", "restify": "^4.3.0" From 99b840876596bf9999e50ed7caafb29a207ee113 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 11:18:18 -0300 Subject: [PATCH 16/49] Update to BotBuilder v3.8.1 --- Node/blog-LUISActionBinding/core/package.json | 2 +- Node/blog-LUISActionBinding/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Node/blog-LUISActionBinding/core/package.json b/Node/blog-LUISActionBinding/core/package.json index c5b80bdfe4..e1e60bb3eb 100644 --- a/Node/blog-LUISActionBinding/core/package.json +++ b/Node/blog-LUISActionBinding/core/package.json @@ -21,7 +21,7 @@ }, "dependencies": { "bluebird": "^3.5.0", - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", "lodash": "^4.17.4", "schema-inspector": "^1.6.8" } diff --git a/Node/blog-LUISActionBinding/samples/package.json b/Node/blog-LUISActionBinding/samples/package.json index 130a4dd061..05ece45385 100644 --- a/Node/blog-LUISActionBinding/samples/package.json +++ b/Node/blog-LUISActionBinding/samples/package.json @@ -5,7 +5,7 @@ "author": "Microsoft Corp.", "license": "MIT", "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", "dotenv-extended": "^1.0.4", "jsonpath": "^0.2.10", "lodash": "^4.17.4", From aaf804c07d75a0767980864e1de0c56932b98e48 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 11:30:16 -0300 Subject: [PATCH 17/49] Update to BotBuilder v3.8.1 --- Node/core-AppInsights/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-AppInsights/package.json b/Node/core-AppInsights/package.json index 98bf43672a..d5f676628e 100644 --- a/Node/core-AppInsights/package.json +++ b/Node/core-AppInsights/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "applicationinsights": "^0.17.2", - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", "dotenv-extended": "^1.0.4", "restify": "^4.3.0" } From feaf300e54c607b7083dad96d7edebdb4455b40d Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 11:31:17 -0300 Subject: [PATCH 18/49] Package name fix --- Node/core-basicMultiDialog/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-basicMultiDialog/package.json b/Node/core-basicMultiDialog/package.json index c036e8d799..05bf152eca 100644 --- a/Node/core-basicMultiDialog/package.json +++ b/Node/core-basicMultiDialog/package.json @@ -1,5 +1,5 @@ { - "name": "core-basicMultiDialog", + "name": "botbuilder-sample-basicmultidialog", "dependencies": { "botbuilder": "^3.8.1", "dotenv": "^2.0.0", From 886418d25e37027032908c7c67582801d0b1bbcd Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 11:46:45 -0300 Subject: [PATCH 19/49] Update to BotBuilder v3.8.1 --- Node/core-ChannelData/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-ChannelData/package.json b/Node/core-ChannelData/package.json index fde6a338ce..5bde687ffa 100644 --- a/Node/core-ChannelData/package.json +++ b/Node/core-ChannelData/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", "dotenv-extended": "^1.0.4", "restify": "^4.3.0" } From eac60698cc70a29ba661c1f6b08708316ff47c63 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 12:08:52 -0300 Subject: [PATCH 20/49] Update to BotBuilder v3.8.1 --- Node/core-CustomState/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-CustomState/package.json b/Node/core-CustomState/package.json index 51d7a47a39..16f94777ee 100644 --- a/Node/core-CustomState/package.json +++ b/Node/core-CustomState/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", "botbuilder-azure": "^3.0.2", "dotenv-extended": "^1.0.4", "restify": "^4.3.0" From 53b4b0905a156e72ee1a1ea434cfb06b5773d095 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 12:13:18 -0300 Subject: [PATCH 21/49] Update to BotBuilder v3.8.1 --- Node/core-DirectLine/DirectLineBot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-DirectLine/DirectLineBot/package.json b/Node/core-DirectLine/DirectLineBot/package.json index 1bc6c97ee7..2f347bda44 100644 --- a/Node/core-DirectLine/DirectLineBot/package.json +++ b/Node/core-DirectLine/DirectLineBot/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", "dotenv-extended": "^1.0.4", "restify": "^4.3.0" } From f290948839a7b8d230602095b935d13da49a938e Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 13:30:50 -0300 Subject: [PATCH 22/49] Links updated --- Node/core-DirectLine/README.md | 6 +++--- Node/core-DirectLineWebSockets/README.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Node/core-DirectLine/README.md b/Node/core-DirectLine/README.md index 269c4bbf1a..b4d9dcfb09 100644 --- a/Node/core-DirectLine/README.md +++ b/Node/core-DirectLine/README.md @@ -12,7 +12,7 @@ A sample bot and a custom client communicating to each other using the Direct Li The minimum prerequisites to run this sample are: * Latest Node.js with NPM. Download it from [here](https://nodejs.org/en/download/). * The Bot Framework Emulator. To install the Bot Framework Emulator, download it from [here](https://emulator.botframework.com/). Please refer to [this documentation article](https://github.com/microsoft/botframework-emulator/wiki/Getting-Started) to know more about the Bot Framework Emulator. -* Register your bot with the Microsoft Bot Framework. Please refer to [this](https://docs.botframework.com/en-us/csharp/builder/sdkreference/gettingstarted.html#registering) for the instructions. Once you complete the registration, update your bot configuration with the registered config values (See [Debugging locally using ngrok](https://docs.botframework.com/en-us/node/builder/guides/core-concepts/#debugging-locally-using-ngrok) or [Deploying to Azure](https://docs.botframework.com/en-us/node/builder/guides/deploying-to-azure/#navtitle])) +* Register your bot with the Microsoft Bot Framework. Please refer to [this](https://docs.botframework.com/en-us/csharp/builder/sdkreference/gettingstarted.html#registering) for the instructions. Once you complete the registration, update your bot configuration with the registered config values (See [Debugging locally using ngrok](https://docs.microsoft.com/en-us/bot-framework/debug-bots-emulator) or [Deploying to Azure](https://docs.botframework.com/en-us/node/builder/guides/deploying-to-azure/#navtitle)) * **[Recommended]** Visual Studio Code for IntelliSense and debugging, download it from [here](https://code.visualstudio.com/) for free. #### Direct Line API @@ -23,7 +23,7 @@ Refer to [this](https://docs.botframework.com/en-us/csharp/builder/sdkreference/ ![Configure Direct Line](images/outcome-configure.png) #### Publish -Also, in order to be able to run and test this sample you must [publish your bot, for example to Azure](https://docs.botframework.com/en-us/node/builder/guides/deploying-to-azure/). Alternatively, you can [Debug locally using ngrok](https://docs.botframework.com/en-us/node/builder/guides/core-concepts/#debugging-locally-using-ngrok). +Also, in order to be able to run and test this sample you must [publish your bot, for example to Azure](https://docs.botframework.com/en-us/node/builder/guides/deploying-to-azure/). Alternatively, you can [Debug locally using ngrok](https://docs.microsoft.com/en-us/bot-framework/debug-bots-emulator). Remember to update the environment variables with the `MICROSOFT_APP_ID` and `MICROSOFT_APP_PASSWORD` on the [.env](./DirectLineBot/.env) file. ### Code Highlights @@ -156,4 +156,4 @@ To get more information about how to get started in Bot Builder for Node and Dir * [Direct Line Swagger file - v3.0](https://docs.botframework.com/en-us/restapi/directline3/swagger.json) * [Swagger-JS](https://github.com/swagger-api/swagger-js) * [Adding Attachments to a Message](https://docs.botframework.com/en-us/core-concepts/attachments) -* [Debugging locally using ngrok](https://docs.botframework.com/en-us/node/builder/guides/core-concepts/#debugging-locally-using-ngrok) +* [Debugging locally using ngrok](https://docs.microsoft.com/en-us/bot-framework/debug-bots-emulator) diff --git a/Node/core-DirectLineWebSockets/README.md b/Node/core-DirectLineWebSockets/README.md index 21927cbc84..9a150dedf4 100644 --- a/Node/core-DirectLineWebSockets/README.md +++ b/Node/core-DirectLineWebSockets/README.md @@ -16,7 +16,7 @@ A sample bot and a custom client communicating to each other using the Direct Li The minimum prerequisites to run this sample are: * Latest Node.js with NPM. Download it from [here](https://nodejs.org/en/download/). * The Bot Framework Emulator. To install the Bot Framework Emulator, download it from [here](https://emulator.botframework.com/). Please refer to [this documentation article](https://github.com/microsoft/botframework-emulator/wiki/Getting-Started) to know more about the Bot Framework Emulator. -* Register your bot with the Microsoft Bot Framework. Please refer to [this](https://docs.botframework.com/en-us/csharp/builder/sdkreference/gettingstarted.html#registering) for the instructions. Once you complete the registration, update your bot configuration with the registered config values (See [Debugging locally using ngrok](https://docs.botframework.com/en-us/node/builder/guides/core-concepts/#debugging-locally-using-ngrok) or [Deploying to Azure](https://docs.botframework.com/en-us/node/builder/guides/deploying-to-azure/#navtitle])) +* Register your bot with the Microsoft Bot Framework. Please refer to [this](https://docs.botframework.com/en-us/csharp/builder/sdkreference/gettingstarted.html#registering) for the instructions. Once you complete the registration, update your bot configuration with the registered config values (See [Debugging locally using ngrok](https://docs.microsoft.com/en-us/bot-framework/debug-bots-emulator) or [Deploying to Azure](https://docs.botframework.com/en-us/node/builder/guides/deploying-to-azure/#navtitle)) * **[Recommended]** Visual Studio Code for IntelliSense and debugging, download it from [here](https://code.visualstudio.com/) for free. #### Direct Line API @@ -27,7 +27,7 @@ Refer to [this](https://docs.botframework.com/en-us/csharp/builder/sdkreference/ ![Configure Direct Line](images/outcome-configure.png) #### Publish -Also, in order to be able to run and test this sample you must [publish your bot, for example to Azure](https://docs.botframework.com/en-us/node/builder/guides/deploying-to-azure/). Alternatively, you can [Debug locally using ngrok](https://docs.botframework.com/en-us/node/builder/guides/core-concepts/#debugging-locally-using-ngrok). +Also, in order to be able to run and test this sample you must [publish your bot, for example to Azure](https://docs.botframework.com/en-us/node/builder/guides/deploying-to-azure/). Alternatively, you can [Debug locally using ngrok](https://docs.microsoft.com/en-us/bot-framework/debug-bots-emulator). Remember to update the environment variables with the `MICROSOFT_APP_ID` and `MICROSOFT_APP_PASSWORD` on the [.env](DirectLineBot/.env) file. ### Code Highlights @@ -196,4 +196,4 @@ To get more information about how to get started in Bot Builder for Node and Dir * [Direct Line Swagger file - v3.0](https://docs.botframework.com/en-us/restapi/directline3/swagger.json) * [Swagger-JS](https://github.com/swagger-api/swagger-js) * [Adding Attachments to a Message](https://docs.botframework.com/en-us/core-concepts/attachments) -* [Debugging locally using ngrok](https://docs.botframework.com/en-us/node/builder/guides/core-concepts/#debugging-locally-using-ngrok) +* [Debugging locally using ngrok](https://docs.microsoft.com/en-us/bot-framework/debug-bots-emulator) From 348c766cb31b39c242bcbacaf4fcc9164fafee52 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 13:31:03 -0300 Subject: [PATCH 23/49] Update to BotBuilder v3.8.1 --- Node/core-DirectLineWebSockets/DirectLineBot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/core-DirectLineWebSockets/DirectLineBot/package.json b/Node/core-DirectLineWebSockets/DirectLineBot/package.json index 1bc6c97ee7..2f347bda44 100644 --- a/Node/core-DirectLineWebSockets/DirectLineBot/package.json +++ b/Node/core-DirectLineWebSockets/DirectLineBot/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", "dotenv-extended": "^1.0.4", "restify": "^4.3.0" } From d41fdd40dba0ae1a85d1f511c95caa14a4adf5cb Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 14:15:00 -0300 Subject: [PATCH 24/49] Update to BotBuilder v3.8.1 --- .../DirectLineClient/app.js | 18 ++++++----- Node/core-DirectLineWebSockets/README.md | 30 +++++++++++-------- Node/intelligence-ImageCaption/package.json | 2 +- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/Node/core-DirectLineWebSockets/DirectLineClient/app.js b/Node/core-DirectLineWebSockets/DirectLineClient/app.js index 1abc524524..9cfc136023 100644 --- a/Node/core-DirectLineWebSockets/DirectLineClient/app.js +++ b/Node/core-DirectLineWebSockets/DirectLineClient/app.js @@ -30,19 +30,23 @@ var directLineClient = rp(directLineSpecUrl) }) .then(function (client) { // Obtain a token using the Direct Line secret - // First, add the Direct Line Secret to the client's auth header - client.clientAuthorizations.add('AuthorizationBotConnector', new Swagger.ApiKeyAuthorization('Authorization', 'Bearer ' + directLineSecret, 'header')); - - // Second, request a token for a new conversation - return client.Tokens.Tokens_GenerateTokenForNewConversation().then(function (response) { + return rp({ + url: 'https://directline.botframework.com/v3/directline/tokens/generate', + method: 'POST', + headers: { + 'Authorization': 'Bearer ' + directLineSecret + }, + json: true + }).then(function (response) { // Then, replace the client's auth secret with the new token - var token = response.obj.token; + var token = response.token; client.clientAuthorizations.add('AuthorizationBotConnector', new Swagger.ApiKeyAuthorization('Authorization', 'Bearer ' + token, 'header')); - return client; + return client; }); }) .catch(function (err) { console.error('Error initializing DirectLine client', err); + throw err; }); // Once the client is ready, create a new conversation diff --git a/Node/core-DirectLineWebSockets/README.md b/Node/core-DirectLineWebSockets/README.md index 9a150dedf4..c168535e20 100644 --- a/Node/core-DirectLineWebSockets/README.md +++ b/Node/core-DirectLineWebSockets/README.md @@ -34,7 +34,7 @@ Remember to update the environment variables with the `MICROSOFT_APP_ID` and `MI The Direct Line API is a simple REST API for connecting directly to a single bot. This API is intended for developers writing their own client applications, web chat controls, or mobile apps that will talk to their bot. In this sample, we are using the [Direct Line Swagger file](https://docs.botframework.com/en-us/restapi/directline3/swagger.json) and [Swagger JS](https://github.com/swagger-api/swagger-js) to create a client for Node that will simplify access to the underlying REST API. Check out the client's [app.js](DirectLineClient/app.js#L22-L46) to see the client setup & initialization. -You'll see that we are using the Direct Line secret to [obtain a token](DirectLineClient/app.js#L32-L42). This step is optional, but prevents clients from accessing conversations they aren't participating in. +You'll see that we are using the Direct Line secret to [obtain a token](DirectLineClient/app.js#L32-L45). This step is optional, but prevents clients from accessing conversations they aren't participating in. After the token is obtained, the client's auth secret is replaced with this new token. ````JavaScript @@ -49,24 +49,28 @@ var directLineClient = rp(directLineSpecUrl) }) .then(function (client) { // Obtain a token using the Direct Line secret - // First, add the Direct Line Secret to the client's auth header - client.clientAuthorizations.add('AuthorizationBotConnector', new Swagger.ApiKeyAuthorization('Authorization', 'Bearer ' + directLineSecret, 'header')); - - // Second, request a token for a new conversation - return client.Tokens.Tokens_GenerateTokenForNewConversation().then(function (response) { + return rp({ + url: 'https://directline.botframework.com/v3/directline/tokens/generate', + method: 'POST', + headers: { + 'Authorization': 'Bearer ' + directLineSecret + }, + json: true + }).then(function (response) { // Then, replace the client's auth secret with the new token - var token = response.obj.token; + var token = response.token; client.clientAuthorizations.add('AuthorizationBotConnector', new Swagger.ApiKeyAuthorization('Authorization', 'Bearer ' + token, 'header')); - return client; + return client; }); }) .catch(function (err) { console.error('Error initializing DirectLine client', err); + throw err; }); ```` Each conversation on the Direct Line channel must be explicitly started using the `client.Conversations.Conversations_StartConversation()` function. -Check out the client's following [function call](DirectLineClient/app.js#L49-L65) which creates a new conversation. +Check out the client's following [function call](DirectLineClient/app.js#L53-L69) which creates a new conversation. ````JavaScript directLineClient.then(function (client) { @@ -112,11 +116,11 @@ client.Conversations.Conversations_PostActivity( Messages from the Bot are being received using the WebSocket protocol (actually WSS). For this, after the conversation was created a `streamUrl` is also returned and it will be the target for the WebSocket connection. -Check out the client's [startReceivingWebSocketClient](DirectLineClient/app.js#L100-L128) and [startReceivingW3CWebSocketClient](DirectLineClient/app.js#L130-L155) functions which create WebSocket clients hitting the `streamUrl` value returned when the conversation was created (one or other will be called dependening on the `w3c` optional flag when running the console app). Messages are then filtered from anyone but our own client using the [`printMessages`](DirectLineClient/app.js#L160-L175 ) function. +Check out the client's [startReceivingWebSocketClient](DirectLineClient/app.js#L104-L133) and [startReceivingW3CWebSocketClient](DirectLineClient/app.js#L135-L161) functions which create WebSocket clients hitting the `streamUrl` value returned when the conversation was created (one or other will be called dependening on the `w3c` optional flag when running the console app). Messages are then filtered from anyone but our own client using the [`printMessages`](DirectLineClient/app.js#L164-L179) function. Each of these functions showcase the two ways you can connect to the `streamUrl` using WebSockets (first one using a custom Node.js implementation, while the second one uses W3C one). If you look closely they are very similar and within the `on message` event handler the bot's response is being parsed to JSON in order to print it. -For `startReceivingWebSocketClient` we have the following [handler](DirectLineClient/app.js#L117-L125): +For `startReceivingWebSocketClient` we have the following [handler](DirectLineClient/app.js#L121-L129): ````JavaScript connection.on('message', function (message) { @@ -129,7 +133,7 @@ connection.on('message', function (message) { }); ```` -And for `startReceivingW3CWebSocketClient` we have the following [handler](DirectLineClient/app.js#L148-L156): +And for `startReceivingW3CWebSocketClient` we have the following [handler](DirectLineClient/app.js#L152-L160): ````JavaScript ws.onmessage = function (e) { @@ -146,7 +150,7 @@ ws.onmessage = function (e) { Direct Line v3.0 (unlike version 1.1) has supports for Attachments (see [Adding Attachments to a Message](https://docs.botframework.com/en-us/core-concepts/attachments) for more information about attachments). -Check out the [`printMessage`](DirectLineClient/app.js#L177-L196) function to see how the Attachments are retrieved and rendered appropriately based on their type. +Check out the [`printMessage`](DirectLineClient/app.js#L181-L200) function to see how the Attachments are retrieved and rendered appropriately based on their type. ````JavaScript function printMessage(activity) { diff --git a/Node/intelligence-ImageCaption/package.json b/Node/intelligence-ImageCaption/package.json index daf2bf0229..b2ebca4819 100644 --- a/Node/intelligence-ImageCaption/package.json +++ b/Node/intelligence-ImageCaption/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", "dotenv-extended": "^1.0.4", "needle": "^1.4.3", "request": "^2.79.0", From b2f04e1541c6c99a3149f194c88120e59f2b01fe Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 14:20:58 -0300 Subject: [PATCH 25/49] Update to BotBuilder v3.8.1 --- Node/core-GetConversationMembers/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Node/core-GetConversationMembers/package.json b/Node/core-GetConversationMembers/package.json index 6bfe17c8a8..9fec140405 100644 --- a/Node/core-GetConversationMembers/package.json +++ b/Node/core-GetConversationMembers/package.json @@ -22,9 +22,9 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.1", + "dotenv-extended": "^1.0.4", "restify": "^4.3.0", - "swagger-client": "^2.1.26", - "dotenv-extended": "^1.0.4" + "swagger-client": "^2.1.26" } } From 1c2dd6bfa1a356c4b4d0b962ff85e365a1fad74c Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 18:13:05 -0300 Subject: [PATCH 26/49] Cleanup --- .../simpleSendMessage/.jshintrc | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 Node/core-proactiveMessages/simpleSendMessage/.jshintrc diff --git a/Node/core-proactiveMessages/simpleSendMessage/.jshintrc b/Node/core-proactiveMessages/simpleSendMessage/.jshintrc deleted file mode 100644 index ebe59fd733..0000000000 --- a/Node/core-proactiveMessages/simpleSendMessage/.jshintrc +++ /dev/null @@ -1,41 +0,0 @@ -{ - "globals": { - "jasmine": false, - "spyOn": false, - "it": false, - "console": false, - "describe": false, - "expect": false, - "beforeEach": false, - "waits": false, - "waitsFor": false, - "runs": false - }, - - "node" : true, - "esversion" : 6, - "browser" : true, - - "boss" : false, - "curly": false, - "debug": false, - "devel": false, - "eqeqeq": true, - "evil": true, - "forin": false, - "immed": true, - "laxbreak": false, - "newcap": true, - "noarg": true, - "noempty": false, - "nonew": false, - "nomen": false, - "onevar": true, - "plusplus": false, - "regexp": false, - "undef": true, - "sub": true, - "strict": false, - "white": true, - "unused": true -} From a28238833fb6a4ff9f31ced8bcacbe21336b854e Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 18:31:22 -0300 Subject: [PATCH 27/49] Minor fix --- Node/core-ProgressDIalog/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Node/core-ProgressDIalog/app.js b/Node/core-ProgressDIalog/app.js index e186baaff4..0a3761c47c 100644 --- a/Node/core-ProgressDIalog/app.js +++ b/Node/core-ProgressDIalog/app.js @@ -67,6 +67,8 @@ function progress(session, options, asyncFn) { } bot.dialog('progressDialog', function (session, args) { + if(!args) return; + var asyncFn = args.asyncFn; var options = args.options; From 33b5c15b76ae51ea85b82c69393573c0f97acfa7 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Mon, 15 May 2017 19:34:42 -0300 Subject: [PATCH 28/49] Update to Node active TLS --- Node/cards-CarouselCards/azuredeploy.json | 2 +- Node/cards-RichCards/azuredeploy.json | 2 +- Node/core-AppInsights/azuredeploy.json | 2 +- Node/core-ChannelData/azuredeploy.json | 2 +- Node/core-CreateNewConversation/azuredeploy.json | 2 +- Node/core-CustomState/azuredeploy.json | 2 +- Node/core-DirectLine/azuredeploy.json | 2 +- Node/core-DirectLineWebSockets/azuredeploy.json | 2 +- Node/core-GetConversationMembers/azuredeploy.json | 2 +- Node/core-MultiDialogs/azuredeploy.json | 2 +- Node/core-ProgressDIalog/azuredeploy.json | 2 +- Node/core-ReceiveAttachment/azuredeploy.json | 2 +- Node/core-SendAttachment/azuredeploy.json | 2 +- Node/core-State/azuredeploy.json | 2 +- Node/demo-ContosoFlowers/azuredeploy.json | 2 +- Node/demo-RollerSkill/azuredeploy.json | 2 +- Node/demo-Search/azuredeploy.json | 2 +- Node/intelligence-ImageCaption/azuredeploy.json | 2 +- Node/intelligence-LUIS/azuredeploy.json | 2 +- Node/intelligence-SimilarProducts/azuredeploy.json | 2 +- Node/intelligence-SpeechToText/azuredeploy.json | 2 +- Node/intelligence-Zummer/azuredeploy.json | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Node/cards-CarouselCards/azuredeploy.json b/Node/cards-CarouselCards/azuredeploy.json index fe0be5d2f2..301c3f7fd4 100644 --- a/Node/cards-CarouselCards/azuredeploy.json +++ b/Node/cards-CarouselCards/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/cards-RichCards/azuredeploy.json b/Node/cards-RichCards/azuredeploy.json index 2882230487..bb702ef996 100644 --- a/Node/cards-RichCards/azuredeploy.json +++ b/Node/cards-RichCards/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-AppInsights/azuredeploy.json b/Node/core-AppInsights/azuredeploy.json index 8ab18665d1..f88f34f16e 100644 --- a/Node/core-AppInsights/azuredeploy.json +++ b/Node/core-AppInsights/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-ChannelData/azuredeploy.json b/Node/core-ChannelData/azuredeploy.json index 1937022ebc..ad9bcd2cb5 100644 --- a/Node/core-ChannelData/azuredeploy.json +++ b/Node/core-ChannelData/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-CreateNewConversation/azuredeploy.json b/Node/core-CreateNewConversation/azuredeploy.json index d869d7f0df..58e6bd605a 100644 --- a/Node/core-CreateNewConversation/azuredeploy.json +++ b/Node/core-CreateNewConversation/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-CustomState/azuredeploy.json b/Node/core-CustomState/azuredeploy.json index 5ccf876bfd..bc9a30d7b8 100644 --- a/Node/core-CustomState/azuredeploy.json +++ b/Node/core-CustomState/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-DirectLine/azuredeploy.json b/Node/core-DirectLine/azuredeploy.json index fb548fa42a..9ddb893a0a 100644 --- a/Node/core-DirectLine/azuredeploy.json +++ b/Node/core-DirectLine/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-DirectLineWebSockets/azuredeploy.json b/Node/core-DirectLineWebSockets/azuredeploy.json index 7f5121cb4e..76d14189c3 100644 --- a/Node/core-DirectLineWebSockets/azuredeploy.json +++ b/Node/core-DirectLineWebSockets/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-GetConversationMembers/azuredeploy.json b/Node/core-GetConversationMembers/azuredeploy.json index 01d7bf5f36..36a1e1f963 100644 --- a/Node/core-GetConversationMembers/azuredeploy.json +++ b/Node/core-GetConversationMembers/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-MultiDialogs/azuredeploy.json b/Node/core-MultiDialogs/azuredeploy.json index 6accc54de7..f69a1e502b 100644 --- a/Node/core-MultiDialogs/azuredeploy.json +++ b/Node/core-MultiDialogs/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-ProgressDIalog/azuredeploy.json b/Node/core-ProgressDIalog/azuredeploy.json index 3bae64eac2..8617447fb6 100644 --- a/Node/core-ProgressDIalog/azuredeploy.json +++ b/Node/core-ProgressDIalog/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-ReceiveAttachment/azuredeploy.json b/Node/core-ReceiveAttachment/azuredeploy.json index ea7ae87e2e..073d6cbb9d 100644 --- a/Node/core-ReceiveAttachment/azuredeploy.json +++ b/Node/core-ReceiveAttachment/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-SendAttachment/azuredeploy.json b/Node/core-SendAttachment/azuredeploy.json index 2c4e4259cd..bfcd5a3ae7 100644 --- a/Node/core-SendAttachment/azuredeploy.json +++ b/Node/core-SendAttachment/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/core-State/azuredeploy.json b/Node/core-State/azuredeploy.json index 4af0e96409..188ebd0089 100644 --- a/Node/core-State/azuredeploy.json +++ b/Node/core-State/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/demo-ContosoFlowers/azuredeploy.json b/Node/demo-ContosoFlowers/azuredeploy.json index fe63b85fd7..a652ef180c 100644 --- a/Node/demo-ContosoFlowers/azuredeploy.json +++ b/Node/demo-ContosoFlowers/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/demo-RollerSkill/azuredeploy.json b/Node/demo-RollerSkill/azuredeploy.json index 044b78421d..23d9992473 100644 --- a/Node/demo-RollerSkill/azuredeploy.json +++ b/Node/demo-RollerSkill/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/demo-Search/azuredeploy.json b/Node/demo-Search/azuredeploy.json index 51f688cb5c..cce841cf3d 100644 --- a/Node/demo-Search/azuredeploy.json +++ b/Node/demo-Search/azuredeploy.json @@ -50,7 +50,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/intelligence-ImageCaption/azuredeploy.json b/Node/intelligence-ImageCaption/azuredeploy.json index 2c6446573a..435eaeae03 100644 --- a/Node/intelligence-ImageCaption/azuredeploy.json +++ b/Node/intelligence-ImageCaption/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MicrosoftAppId": { "type": "string" diff --git a/Node/intelligence-LUIS/azuredeploy.json b/Node/intelligence-LUIS/azuredeploy.json index 570db581d9..80e8f45e23 100644 --- a/Node/intelligence-LUIS/azuredeploy.json +++ b/Node/intelligence-LUIS/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MICROSOFT_APP_ID": { "type": "string" diff --git a/Node/intelligence-SimilarProducts/azuredeploy.json b/Node/intelligence-SimilarProducts/azuredeploy.json index a8590ba72d..77d9886be4 100644 --- a/Node/intelligence-SimilarProducts/azuredeploy.json +++ b/Node/intelligence-SimilarProducts/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MicrosoftAppId": { "type": "string" diff --git a/Node/intelligence-SpeechToText/azuredeploy.json b/Node/intelligence-SpeechToText/azuredeploy.json index ff64987a55..f5ea46de50 100644 --- a/Node/intelligence-SpeechToText/azuredeploy.json +++ b/Node/intelligence-SpeechToText/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MicrosoftAppId": { "type": "string" diff --git a/Node/intelligence-Zummer/azuredeploy.json b/Node/intelligence-Zummer/azuredeploy.json index 5ccb073797..edffa0317f 100644 --- a/Node/intelligence-Zummer/azuredeploy.json +++ b/Node/intelligence-Zummer/azuredeploy.json @@ -43,7 +43,7 @@ }, "WEBSITE_NODE_DEFAULT_VERSION": { "type": "string", - "defaultValue": "5.9.1" + "defaultValue": "6.9.5" }, "MicrosoftAppId": { "type": "string" From fca941a2f122191df06f45087cd1ede4324e5795 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 12:48:42 -0300 Subject: [PATCH 29/49] Port and Endpoint updates --- Node/blog-customChannelData/node_custom_channel.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Node/blog-customChannelData/node_custom_channel.js b/Node/blog-customChannelData/node_custom_channel.js index 04a24c5328..9202aa6911 100644 --- a/Node/blog-customChannelData/node_custom_channel.js +++ b/Node/blog-customChannelData/node_custom_channel.js @@ -13,8 +13,9 @@ const MSFT_APP_PW = process.env.MSFT_APP_PW; //create an express server var app = express(); -app.listen(process.env.PORT || 3000, function () { - console.log("Express app listening on port: " + process.env.PORT || 3000); +var port = process.env.PORT || 3978; +app.listen(port, function () { + console.log("Express app listening on port: " + port); }); //create a chat connector for the bot @@ -27,7 +28,7 @@ var connector = new botbuilder.ChatConnector({ var bot = new botbuilder.UniversalBot(connector); //hook up bot endpoint -app.post("/messages/receive", connector.listen()); +app.post("/api/messages", connector.listen()); //root dialog bot.dialog("/", function (session) { From 88a567998cb504ba1ac7f194b34f8cb4b3f185d6 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 12:48:59 -0300 Subject: [PATCH 30/49] Update to BotBuilder v3.8.2 --- Node/blog-LUISActionBinding/core/package.json | 2 +- Node/blog-LUISActionBinding/samples/package.json | 2 +- Node/blog-customChannelData/package.json | 2 +- Node/capability-SimpleTaskAutomation/package.json | 2 +- Node/capability-middlewareLogging/package.json | 2 +- Node/cards-CarouselCards/package.json | 2 +- Node/cards-RichCards/package.json | 2 +- Node/core-AppInsights/package.json | 2 +- Node/core-ChannelData/package.json | 2 +- Node/core-CreateNewConversation/package.json | 2 +- Node/core-CustomState/package.json | 2 +- Node/core-DirectLine/DirectLineBot/package.json | 2 +- Node/core-DirectLineWebSockets/DirectLineBot/package.json | 2 +- Node/core-GetConversationMembers/package.json | 2 +- Node/core-MultiDialogs/package.json | 2 +- Node/core-ProgressDIalog/package.json | 2 +- Node/core-ReceiveAttachment/package.json | 2 +- Node/core-SendAttachment/package.json | 2 +- Node/core-State/package.json | 2 +- Node/core-basicMultiDialog/package.json | 2 +- Node/core-proactiveMessages/simpleSendMessage/package.json | 2 +- Node/core-proactiveMessages/startNewDialog/package.json | 2 +- .../startNewDialogWithPrompt/package.json | 2 +- Node/intelligence-ImageCaption/package.json | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Node/blog-LUISActionBinding/core/package.json b/Node/blog-LUISActionBinding/core/package.json index e1e60bb3eb..5056312a2f 100644 --- a/Node/blog-LUISActionBinding/core/package.json +++ b/Node/blog-LUISActionBinding/core/package.json @@ -21,7 +21,7 @@ }, "dependencies": { "bluebird": "^3.5.0", - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "lodash": "^4.17.4", "schema-inspector": "^1.6.8" } diff --git a/Node/blog-LUISActionBinding/samples/package.json b/Node/blog-LUISActionBinding/samples/package.json index 05ece45385..865dc30e15 100644 --- a/Node/blog-LUISActionBinding/samples/package.json +++ b/Node/blog-LUISActionBinding/samples/package.json @@ -5,7 +5,7 @@ "author": "Microsoft Corp.", "license": "MIT", "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "jsonpath": "^0.2.10", "lodash": "^4.17.4", diff --git a/Node/blog-customChannelData/package.json b/Node/blog-customChannelData/package.json index cbdca2d9e6..5c98e0d2b5 100644 --- a/Node/blog-customChannelData/package.json +++ b/Node/blog-customChannelData/package.json @@ -4,7 +4,7 @@ "description": "Microsoft Bot Framework bot written in NodeJS to test issues.", "main": "node_bot.js", "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "dotenv-extended": "^2.0.0", "express": "^4.14.1", "request-promise": "^4.1.1", diff --git a/Node/capability-SimpleTaskAutomation/package.json b/Node/capability-SimpleTaskAutomation/package.json index 32335920c9..4a652873c6 100644 --- a/Node/capability-SimpleTaskAutomation/package.json +++ b/Node/capability-SimpleTaskAutomation/package.json @@ -9,7 +9,7 @@ "author": "", "license": "ISC", "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0", "uuid": "^3.0.1" }, diff --git a/Node/capability-middlewareLogging/package.json b/Node/capability-middlewareLogging/package.json index 2f21cb951e..d827d91e3e 100644 --- a/Node/capability-middlewareLogging/package.json +++ b/Node/capability-middlewareLogging/package.json @@ -9,7 +9,7 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0" } } diff --git a/Node/cards-CarouselCards/package.json b/Node/cards-CarouselCards/package.json index 94544b000a..3b49ceb662 100644 --- a/Node/cards-CarouselCards/package.json +++ b/Node/cards-CarouselCards/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } diff --git a/Node/cards-RichCards/package.json b/Node/cards-RichCards/package.json index 5b1f45f846..a4ca22462a 100644 --- a/Node/cards-RichCards/package.json +++ b/Node/cards-RichCards/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } diff --git a/Node/core-AppInsights/package.json b/Node/core-AppInsights/package.json index d5f676628e..fb61c6be12 100644 --- a/Node/core-AppInsights/package.json +++ b/Node/core-AppInsights/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "applicationinsights": "^0.17.2", - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "restify": "^4.3.0" } diff --git a/Node/core-ChannelData/package.json b/Node/core-ChannelData/package.json index 5bde687ffa..ebce01a18d 100644 --- a/Node/core-ChannelData/package.json +++ b/Node/core-ChannelData/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "restify": "^4.3.0" } diff --git a/Node/core-CreateNewConversation/package.json b/Node/core-CreateNewConversation/package.json index 5cc3fa17d9..ddc214db4c 100644 --- a/Node/core-CreateNewConversation/package.json +++ b/Node/core-CreateNewConversation/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } diff --git a/Node/core-CustomState/package.json b/Node/core-CustomState/package.json index 16f94777ee..ba8ed7d584 100644 --- a/Node/core-CustomState/package.json +++ b/Node/core-CustomState/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "botbuilder-azure": "^3.0.2", "dotenv-extended": "^1.0.4", "restify": "^4.3.0" diff --git a/Node/core-DirectLine/DirectLineBot/package.json b/Node/core-DirectLine/DirectLineBot/package.json index 2f347bda44..2b215e5d6a 100644 --- a/Node/core-DirectLine/DirectLineBot/package.json +++ b/Node/core-DirectLine/DirectLineBot/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "restify": "^4.3.0" } diff --git a/Node/core-DirectLineWebSockets/DirectLineBot/package.json b/Node/core-DirectLineWebSockets/DirectLineBot/package.json index 2f347bda44..2b215e5d6a 100644 --- a/Node/core-DirectLineWebSockets/DirectLineBot/package.json +++ b/Node/core-DirectLineWebSockets/DirectLineBot/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "restify": "^4.3.0" } diff --git a/Node/core-GetConversationMembers/package.json b/Node/core-GetConversationMembers/package.json index 9fec140405..8437cfa220 100644 --- a/Node/core-GetConversationMembers/package.json +++ b/Node/core-GetConversationMembers/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "restify": "^4.3.0", "swagger-client": "^2.1.26" diff --git a/Node/core-MultiDialogs/package.json b/Node/core-MultiDialogs/package.json index 1c47e36c8c..28aaa7c4e8 100644 --- a/Node/core-MultiDialogs/package.json +++ b/Node/core-MultiDialogs/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } diff --git a/Node/core-ProgressDIalog/package.json b/Node/core-ProgressDIalog/package.json index deccced9a4..93347912f9 100644 --- a/Node/core-ProgressDIalog/package.json +++ b/Node/core-ProgressDIalog/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0" } } diff --git a/Node/core-ReceiveAttachment/package.json b/Node/core-ReceiveAttachment/package.json index b921d8ce4b..869fa5d65a 100644 --- a/Node/core-ReceiveAttachment/package.json +++ b/Node/core-ReceiveAttachment/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "request": "^2.79.0", "request-promise": "^4.1.1", "restify": "^4.3.0", diff --git a/Node/core-SendAttachment/package.json b/Node/core-SendAttachment/package.json index 856e4818cd..d661083966 100644 --- a/Node/core-SendAttachment/package.json +++ b/Node/core-SendAttachment/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0", "swagger-client": "^2.1.32", "dotenv-extended": "^1.0.4" diff --git a/Node/core-State/package.json b/Node/core-State/package.json index 76befc1ceb..bccae1d96e 100644 --- a/Node/core-State/package.json +++ b/Node/core-State/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0", "dotenv-extended": "^1.0.4" } diff --git a/Node/core-basicMultiDialog/package.json b/Node/core-basicMultiDialog/package.json index 05bf152eca..1a78b8e451 100644 --- a/Node/core-basicMultiDialog/package.json +++ b/Node/core-basicMultiDialog/package.json @@ -1,7 +1,7 @@ { "name": "botbuilder-sample-basicmultidialog", "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "dotenv": "^2.0.0", "restify": "^4.3.0" }, diff --git a/Node/core-proactiveMessages/simpleSendMessage/package.json b/Node/core-proactiveMessages/simpleSendMessage/package.json index 4bcfba555d..656385ed80 100644 --- a/Node/core-proactiveMessages/simpleSendMessage/package.json +++ b/Node/core-proactiveMessages/simpleSendMessage/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/MicrosoftDX/botFramework-proactiveMessages#readme", "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0" } } diff --git a/Node/core-proactiveMessages/startNewDialog/package.json b/Node/core-proactiveMessages/startNewDialog/package.json index fa42a811aa..c6cf41fe13 100644 --- a/Node/core-proactiveMessages/startNewDialog/package.json +++ b/Node/core-proactiveMessages/startNewDialog/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/MicrosoftDX/botFramework-proactiveMessages#readme", "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0" } } diff --git a/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json b/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json index fa42a811aa..c6cf41fe13 100644 --- a/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json +++ b/Node/core-proactiveMessages/startNewDialogWithPrompt/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/MicrosoftDX/botFramework-proactiveMessages#readme", "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "restify": "^4.3.0" } } diff --git a/Node/intelligence-ImageCaption/package.json b/Node/intelligence-ImageCaption/package.json index b2ebca4819..5ea77f68de 100644 --- a/Node/intelligence-ImageCaption/package.json +++ b/Node/intelligence-ImageCaption/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.1", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "needle": "^1.4.3", "request": "^2.79.0", From a93be427fd3a093ed938788ac60be6c49025f02d Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 14:34:24 -0300 Subject: [PATCH 31/49] Fix Lint issues --- Node/demo-RollerSkill/app.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Node/demo-RollerSkill/app.js b/Node/demo-RollerSkill/app.js index 919b2cf943..ac50cc910a 100644 --- a/Node/demo-RollerSkill/app.js +++ b/Node/demo-RollerSkill/app.js @@ -71,7 +71,7 @@ bot.dialog('CreateGameDialog', [ { value: '8', action: { title: '8 Sides' }, synonyms: 'eight|8 sided|8 sides' }, { value: '10', action: { title: '10 Sides' }, synonyms: 'ten|10 sided|10 sides' }, { value: '12', action: { title: '12 Sides' }, synonyms: 'twelve|12 sided|12 sides' }, - { value: '20', action: { title: '20 Sides' }, synonyms: 'twenty|20 sided|20 sides' }, + { value: '20', action: { title: '20 Sides' }, synonyms: 'twenty|20 sided|20 sides' } ]; builder.Prompts.choice(session, 'choose_sides', choices, { speak: speak(session, 'choose_sides_ssml') @@ -171,9 +171,9 @@ bot.dialog('PlayGameDialog', function (session, args) { var min = game.count; var max = game.count * game.sides; var score = total/max; - if (score == 1.0) { + if (score === 1.0) { reaction = 'best'; - } else if (score == 0) { + } else if (score === 0) { reaction = 'worst'; } else if (score <= 0.3) { reaction = 'bad'; @@ -182,7 +182,7 @@ bot.dialog('PlayGameDialog', function (session, args) { } // Check for special craps rolls - if (game.type == 'craps') { + if (game.type === 'craps') { switch (total) { case 2: case 3: @@ -203,7 +203,7 @@ bot.dialog('PlayGameDialog', function (session, args) { // Build up spoken response var spoken = ''; - if (game.turn == 0) { + if (game.turn === 0) { spoken += session.gettext('start_' + game.type + '_game_ssml') + ' '; } spoken += session.gettext(reaction + '_roll_reaction_ssml'); @@ -241,7 +241,7 @@ bot.customAction({ // to make sure we end that task. session.clearDialogStack().beginDialog('PlayGameDialog', { game: { type: 'craps', sides: 6, count: 2, turn: 0 } - }) + }); } }); From e88c00f67489b2e6ef38ebf3c91fd9e26b9b35c7 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 14:34:54 -0300 Subject: [PATCH 32/49] Load .env with MS AppId/Password --- Node/demo-RollerSkill/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Node/demo-RollerSkill/app.js b/Node/demo-RollerSkill/app.js index ac50cc910a..809c4fa8e1 100644 --- a/Node/demo-RollerSkill/app.js +++ b/Node/demo-RollerSkill/app.js @@ -2,6 +2,7 @@ Roller is a dice rolling skill that's been optimized for speech. -----------------------------------------------------------------------------*/ +require('dotenv-extended').load(); var restify = require('restify'); var builder = require('botbuilder'); var ssml = require('./ssml'); From 97061fa68288c7897ab135109ae5d08e98bed201 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 14:35:10 -0300 Subject: [PATCH 33/49] Update to BotBuilder v3.8.2 --- Node/demo-RollerSkill/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Node/demo-RollerSkill/package.json b/Node/demo-RollerSkill/package.json index ce12e68725..fcc9f21269 100644 --- a/Node/demo-RollerSkill/package.json +++ b/Node/demo-RollerSkill/package.json @@ -21,7 +21,8 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.8.0-beta2", + "botbuilder": "^3.8.2", + "dotenv-extended": "^2.0.0", "restify": "^4.3.0" } } From 4898a91865a0c59250a81122ac71cefbc47bad30 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 14:42:22 -0300 Subject: [PATCH 34/49] Update to BotBuilder v3.8.2 --- Node/demo-Search/SearchDialogLibrary/package.json | 2 +- Node/demo-Search/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Node/demo-Search/SearchDialogLibrary/package.json b/Node/demo-Search/SearchDialogLibrary/package.json index dca8e1feca..ea7cd29c7f 100644 --- a/Node/demo-Search/SearchDialogLibrary/package.json +++ b/Node/demo-Search/SearchDialogLibrary/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.5.1", + "botbuilder": "^3.8.2", "lodash": "^4.17.4" } } diff --git a/Node/demo-Search/package.json b/Node/demo-Search/package.json index a293aae0f3..9bf5c66eb9 100644 --- a/Node/demo-Search/package.json +++ b/Node/demo-Search/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "lodash": "^4.17.4", "lorem-ipsum": "^1.0.3", From f1fe63e463eda2920842bd1f27246eb4aafee8e1 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 14:59:04 -0300 Subject: [PATCH 35/49] Update to caption-service endpoint --- Node/intelligence-ImageCaption/caption-service.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Node/intelligence-ImageCaption/caption-service.js b/Node/intelligence-ImageCaption/caption-service.js index 19c046e42e..1af1fe137e 100644 --- a/Node/intelligence-ImageCaption/caption-service.js +++ b/Node/intelligence-ImageCaption/caption-service.js @@ -5,7 +5,7 @@ var request = require('request').defaults({ encoding: null }); -var VISION_URL = 'https://api.projectoxford.ai/vision/v1.0/analyze/?visualFeatures=Description&form=BCSIMG&subscription-key=' + process.env.MICROSOFT_VISION_API_KEY; +var VISION_URL = 'https://westus.api.cognitive.microsoft.com/vision/v1.0/analyze?visualFeatures=Description'; /** * Gets the caption of the image from an image stream @@ -18,17 +18,19 @@ exports.getCaptionFromStream = function (stream) { var requestData = { url: VISION_URL, encoding: 'binary', - headers: { 'content-type': 'application/octet-stream' } + json: true, + headers: { + 'Ocp-Apim-Subscription-Key': process.env.MICROSOFT_VISION_API_KEY, + 'content-type': 'application/octet-stream' + } }; stream.pipe(request.post(requestData, function (error, response, body) { if (error) { reject(error); - } - else if (response.statusCode !== 200) { + } else if (response.statusCode !== 200) { reject(body); - } - else { + } else { resolve(extractCaption(JSON.parse(body))); } })); From 7fe00f3d86d1149e54f03e13e65f151d5c7e2a5a Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 14:59:12 -0300 Subject: [PATCH 36/49] Display caption-service errors --- Node/intelligence-ImageCaption/app.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Node/intelligence-ImageCaption/app.js b/Node/intelligence-ImageCaption/app.js index 9e08940fab..105dca24af 100644 --- a/Node/intelligence-ImageCaption/app.js +++ b/Node/intelligence-ImageCaption/app.js @@ -131,6 +131,11 @@ function handleSuccessResponse(session, caption) { } function handleErrorResponse(session, error) { - session.send('Oops! Something went wrong. Try again later.'); + var clientErrorMessage = 'Oops! Something went wrong. Try again later.'; + if (error.message && error.message.indexOf('Access denied') > -1) { + clientErrorMessage += "\n" + error.message; + } + console.error(error); + session.send(clientErrorMessage); } \ No newline at end of file From 32481859d04fda1e320c476a450906dad436d7a0 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 15:18:45 -0300 Subject: [PATCH 37/49] Update to BotBuilder v3.8.2 --- Node/intelligence-LUIS/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/intelligence-LUIS/package.json b/Node/intelligence-LUIS/package.json index 65bd0db91e..3f5c59ba87 100644 --- a/Node/intelligence-LUIS/package.json +++ b/Node/intelligence-LUIS/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "bluebird": "^3.4.7", - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "request": "^2.79.0", "restify": "^4.3.0" From 4d97676ef3831fcc9321575093b654e9da1c9518 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 16:11:26 -0300 Subject: [PATCH 38/49] Update to BotBuilder v3.8.2 --- Node/intelligence-SimilarProducts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/intelligence-SimilarProducts/package.json b/Node/intelligence-SimilarProducts/package.json index 849153d5a2..4d2f152d16 100644 --- a/Node/intelligence-SimilarProducts/package.json +++ b/Node/intelligence-SimilarProducts/package.json @@ -8,7 +8,7 @@ "author": "Microsoft Corp.", "license": "MIT", "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "request": "^2.79.0", "restify": "^4.3.0", From d34d480afce76fb7912be829c6e65b6fd40ec764 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 16:33:55 -0300 Subject: [PATCH 39/49] Update to BotBuilder v3.8.2 --- Node/intelligence-SpeechToText/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/intelligence-SpeechToText/package.json b/Node/intelligence-SpeechToText/package.json index db3177f84d..ce1520f520 100644 --- a/Node/intelligence-SpeechToText/package.json +++ b/Node/intelligence-SpeechToText/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/Microsoft/BotBuilder-Samples.git" }, "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "needle": "^1.4.3", "node-uuid": "^1.4.7", From 9855b57aeb2df627459e0a3f37f5878afcfd225a Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 16:47:40 -0300 Subject: [PATCH 40/49] Update to BotBuilder v3.8.2 --- Node/intelligence-Zummer/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/intelligence-Zummer/package.json b/Node/intelligence-Zummer/package.json index f37bc3e8d6..4310bfd67d 100644 --- a/Node/intelligence-Zummer/package.json +++ b/Node/intelligence-Zummer/package.json @@ -7,7 +7,7 @@ }, "author": "mmoussa", "dependencies": { - "botbuilder": "^3.5.3", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "memory-cache": "^0.1.6", "restify": "^4.3.0", From ae8794537040f03fc7e0aa0cbcba0c11839535b7 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 16:53:58 -0300 Subject: [PATCH 41/49] Update to BotBuilder v3.8.2 --- Node/sample-knowledgeBot/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/sample-knowledgeBot/package.json b/Node/sample-knowledgeBot/package.json index fd2fa9c9e7..aa7826d5fc 100644 --- a/Node/sample-knowledgeBot/package.json +++ b/Node/sample-knowledgeBot/package.json @@ -9,7 +9,7 @@ "author": "", "license": "ISC", "dependencies": { - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.2", "request": "^2.78.0", "restify": "^4.2.0" } From 594727c252b0b56bd01416c389b67d9477221c6f Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 17:25:51 -0300 Subject: [PATCH 42/49] Cleanup --- Node/demo-ContosoFlowers/data/orders.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/demo-ContosoFlowers/data/orders.json b/Node/demo-ContosoFlowers/data/orders.json index 2b113c77aa..0637a088a0 100644 --- a/Node/demo-ContosoFlowers/data/orders.json +++ b/Node/demo-ContosoFlowers/data/orders.json @@ -1 +1 @@ -[{"selection":{"name":"Bouquet 7™","imageUrl":"https://placeholdit.imgix.net/~text?txtsize=48&txt=Bouquet%207&w=640&h=330","price":90.99},"delivery":{"date":"2017-02-25T00:25:58.683Z","address":"3 de Febrero 2274, Buenos Aires, Argentina"},"details":{"recipient":{"firstName":"Romina","lastName":"Roux","phoneNumber":"111 222 3334"},"note":"TE AMO!","sender":{"email":"sixdemons@gmail.com","phoneNumber":"222 333 4445"}},"billingAddress":"3 de Febrero 2274, Buenos Aires City, Buenos Aires Autonomous City, 1428, Argentina","id":"e81ef3f0-fa27-11e6-b3a7-cb0d0ff30fae","payed":true,"paymentDetails":{"creditcardNumber":"1111 111","creditcardHolder":"asdasd"}}] \ No newline at end of file +[] \ No newline at end of file From 8a6e8aac1ed3e79be373a08f11783396900dd508 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 17:48:10 -0300 Subject: [PATCH 43/49] Replace DialogAction.validatedPrompt with Custom Prompts --- .../bot/dialogs/details.js | 12 ++--- Node/demo-ContosoFlowers/bot/validators.js | 48 +++++++++++++------ 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/Node/demo-ContosoFlowers/bot/dialogs/details.js b/Node/demo-ContosoFlowers/bot/dialogs/details.js index 4c4ecf47cd..56782b0c89 100644 --- a/Node/demo-ContosoFlowers/bot/dialogs/details.js +++ b/Node/demo-ContosoFlowers/bot/dialogs/details.js @@ -16,16 +16,14 @@ lib.dialog('/', [ session.dialogData.recipientLastName = args.response; session.beginDialog('validators:phonenumber', { prompt: session.gettext('ask_recipient_phone_number'), - retryPrompt: session.gettext('invalid_phone_number'), - maxRetries: Number.MAX_VALUE + retryPrompt: session.gettext('invalid_phone_number') }); }, function (session, args) { session.dialogData.recipientPhoneNumber = args.response; session.beginDialog('validators:notes', { prompt: session.gettext('ask_note'), - retryPrompt: session.gettext('invalid_note'), - maxRetries: Number.MAX_VALUE + retryPrompt: session.gettext('invalid_note') }); }, function (session, args) { @@ -84,8 +82,7 @@ lib.dialog('sender', [ } session.beginDialog('validators:email', { prompt: session.gettext('ask_email'), - retryPrompt: session.gettext('invalid_email'), - maxRetries: Number.MAX_VALUE + retryPrompt: session.gettext('invalid_email') }); }, function (session, args, next) { @@ -95,8 +92,7 @@ lib.dialog('sender', [ session.dialogData.email = args.response; session.beginDialog('validators:phonenumber', { prompt: session.gettext('ask_phone_number'), - retryPrompt: session.gettext('invalid_phone_number'), - maxRetries: Number.MAX_VALUE + retryPrompt: session.gettext('invalid_phone_number') }); }, function (session, args, next) { diff --git a/Node/demo-ContosoFlowers/bot/validators.js b/Node/demo-ContosoFlowers/bot/validators.js index 8e620eab79..795327b3f1 100644 --- a/Node/demo-ContosoFlowers/bot/validators.js +++ b/Node/demo-ContosoFlowers/bot/validators.js @@ -5,20 +5,40 @@ var EmailRegex = new RegExp(/[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/ var lib = new builder.Library('validators'); -lib.dialog('notes', - builder.DialogAction.validatedPrompt(builder.PromptType.text, function (response) { - return response && response.length <= 200; - })); - -lib.dialog('phonenumber', - builder.DialogAction.validatedPrompt(builder.PromptType.text, function (response) { - return PhoneRegex.test(response); - })); - -lib.dialog('email', - builder.DialogAction.validatedPrompt(builder.PromptType.text, function (response) { - return EmailRegex.test(response); - })); +lib.dialog('notes', basicPrompterWithExpression(function (input) { + return input && input.length <= 200; +})); + +lib.dialog('phonenumber', basicPrompterWithRegex(PhoneRegex)); + +lib.dialog('email', basicPrompterWithRegex(EmailRegex)); + +function basicPrompterWithRegex(regex) { + return new builder.IntentDialog() + .onBegin(function (session, args) { + session.dialogData.retryPrompt = args.retryPrompt; + session.send(args.prompt); + }).matches(regex, function (session) { + session.endDialogWithResult({ response: session.message.text }); + }).onDefault(function (session) { + session.send(session.dialogData.retryPrompt); + }); +} + +function basicPrompterWithExpression(expression) { + return new builder.IntentDialog() + .onBegin(function (session, args) { + session.dialogData.retryPrompt = args.retryPrompt; + session.send(args.prompt); + }).onDefault(function (session) { + var input = session.message.text; + if (expression(input)) { + session.endDialogWithResult({ response: input }); + } else { + session.send(session.dialogData.retryPrompt); + } + }); +} // Export createLibrary() function module.exports.createLibrary = function () { From 94f89577c01068f0d7b94c5b365fbecdca8b7d45 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 17:48:26 -0300 Subject: [PATCH 44/49] Update to BotBuilder v3.8.2 --- Node/demo-ContosoFlowers/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/demo-ContosoFlowers/package.json b/Node/demo-ContosoFlowers/package.json index e7c690fb8e..221ae15b83 100644 --- a/Node/demo-ContosoFlowers/package.json +++ b/Node/demo-ContosoFlowers/package.json @@ -23,7 +23,7 @@ "dependencies": { "bluebird": "^3.4.7", "body-parser": "^1.15.2", - "botbuilder": "^3.7.0", + "botbuilder": "^3.8.2", "botbuilder-location": "^1.1.0", "dotenv-extended": "^1.0.4", "express": "^4.14.0", From 197a91fa67a284b1e042980f5ee4b95e08d5b59f Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 17:59:24 -0300 Subject: [PATCH 45/49] Update README to latest changes --- Node/demo-ContosoFlowers/README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Node/demo-ContosoFlowers/README.md b/Node/demo-ContosoFlowers/README.md index 959b7ec5b1..0d9d29774e 100644 --- a/Node/demo-ContosoFlowers/README.md +++ b/Node/demo-ContosoFlowers/README.md @@ -139,9 +139,15 @@ var EmailRegex = new RegExp(/[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/ var lib = new builder.Library('validators'); lib.dialog('email', - builder.DialogAction.validatedPrompt(builder.PromptType.text, function (response) { - return EmailRegex.test(response); - })); + new builder.IntentDialog() + .onBegin(function (session, args) { + session.dialogData.retryPrompt = args.retryPrompt; + session.send(args.prompt); + }).matches(EmailRegex, function (session) { + session.endDialogWithResult({ response: session.message.text }); + }).onDefault(function (session) { + session.send(session.dialogData.retryPrompt); + })); // Export createLibrary() function module.exports.createLibrary = function () { From 0880e06ab29e1fa87bd134738c5cd6893d5c46b8 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 21:05:45 -0300 Subject: [PATCH 46/49] Update to BotBuilder v3.8.2 --- Node/sample-payments/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/sample-payments/package.json b/Node/sample-payments/package.json index 67994d6923..a01d322236 100644 --- a/Node/sample-payments/package.json +++ b/Node/sample-payments/package.json @@ -23,7 +23,7 @@ "dependencies": { "base64url": "^2.0.0", "bluebird": "^3.5.0", - "botbuilder": "^3.8.0", + "botbuilder": "^3.8.2", "dotenv-extended": "^1.0.4", "lodash": "^4.17.4", "restify": "^4.3.0", From 39d186248c044da7fff39ebe2c6fe7a26dc53194 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 21:10:11 -0300 Subject: [PATCH 47/49] Remove LUIS ModelURL from azuredeploy.json --- Node/intelligence-LUIS/azuredeploy.json | 1 - 1 file changed, 1 deletion(-) diff --git a/Node/intelligence-LUIS/azuredeploy.json b/Node/intelligence-LUIS/azuredeploy.json index 80e8f45e23..ae456e768d 100644 --- a/Node/intelligence-LUIS/azuredeploy.json +++ b/Node/intelligence-LUIS/azuredeploy.json @@ -53,7 +53,6 @@ }, "LUIS_MODEL_URL": { "type": "string", - "defaultValue": "https://api.projectoxford.ai/luis/v1/application?id=162bf6ee-379b-4ce4-a519-5f5af90086b5&subscription-key=11be6373fca44ded80fbe2afa8597c18" }, "BING_SPELL_CHECK_API_KEY": { "type": "string", From 70db8f64be8e39f26a10c4ebada35d36a9a47b05 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Tue, 16 May 2017 21:16:42 -0300 Subject: [PATCH 48/49] Update to Computer Vision API Documentation link --- Node/intelligence-ImageCaption/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Node/intelligence-ImageCaption/README.md b/Node/intelligence-ImageCaption/README.md index 9f1a821217..cf98f07893 100644 --- a/Node/intelligence-ImageCaption/README.md +++ b/Node/intelligence-ImageCaption/README.md @@ -19,7 +19,7 @@ The minimum prerequisites to run this sample are: ### Code Highlights -Microsoft Computer Vision API provides a number of methods that allows you to analyze an image. Check out [Computer Vision API - v1.0](https://dev.projectoxford.ai/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fa) for a complete reference of the methods available. In this sample we are using the 'analyze' endpoint with the 'visualFeatures' parameter set to 'Description' `https://api.projectoxford.ai/vision/v1.0/analyze/?visualFeatures=Description` +Microsoft Computer Vision API provides a number of methods that allows you to analyze an image. Check out [Computer Vision API - v1.0](https://westus.dev.cognitive.microsoft.com/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fa) for a complete reference of the methods available. In this sample we are using the 'analyze' endpoint with the 'visualFeatures' parameter set to 'Description' `https://westus.api.cognitive.microsoft.com/vision/v1.0/analyze?visualFeatures=Description` The main components are: From bb42f6b83bbd7c82f3c8f6336c04525f322f05d3 Mon Sep 17 00:00:00 2001 From: Pablo Costantini Date: Fri, 9 Jun 2017 11:50:21 -0300 Subject: [PATCH 49/49] Update to BotBuilder v3.8.4 --- Node/core-globalMessageHandlers/package.json | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Node/core-globalMessageHandlers/package.json b/Node/core-globalMessageHandlers/package.json index 4c5fdb488d..e3dfff0555 100644 --- a/Node/core-globalMessageHandlers/package.json +++ b/Node/core-globalMessageHandlers/package.json @@ -1,12 +1,12 @@ { - "name": "core-basicMultiDialog", - "dependencies": { - "botbuilder": "^3.7.0", - "dotenv": "^2.0.0", - "restify": "^4.3.0" - }, - "devDependencies": { - "@types/node": "^6.0.52", - "@types/restify": "^2.0.35" - } -} \ No newline at end of file + "name": "core-basicmultidialog", + "dependencies": { + "botbuilder": "^3.8.4", + "dotenv": "^2.0.0", + "restify": "^4.3.0" + }, + "devDependencies": { + "@types/node": "^6.0.52", + "@types/restify": "^2.0.35" + } +}