diff --git a/samples/typescript_nodejs/00.empty-bot/README.md b/samples/typescript_nodejs/00.empty-bot/README.md index 1f199876ec..5f2d4c4d03 100644 --- a/samples/typescript_nodejs/00.empty-bot/README.md +++ b/samples/typescript_nodejs/00.empty-bot/README.md @@ -6,7 +6,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i ## Prerequisites -- [Node.js](https://nodejs.org) version 10.14.1 or higher +- [Node.js](https://nodejs.org) version 18 or higher ```bash # determine node version diff --git a/samples/typescript_nodejs/00.empty-bot/deploymentTemplates/DeployUseExistResourceGroup/template-BotApp-with-rg.json b/samples/typescript_nodejs/00.empty-bot/deploymentTemplates/DeployUseExistResourceGroup/template-BotApp-with-rg.json index e14f532660..93441894af 100644 --- a/samples/typescript_nodejs/00.empty-bot/deploymentTemplates/DeployUseExistResourceGroup/template-BotApp-with-rg.json +++ b/samples/typescript_nodejs/00.empty-bot/deploymentTemplates/DeployUseExistResourceGroup/template-BotApp-with-rg.json @@ -158,7 +158,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/00.empty-bot/deploymentTemplates/DeployWithNewResourceGroup/template-BotApp-new-rg.json b/samples/typescript_nodejs/00.empty-bot/deploymentTemplates/DeployWithNewResourceGroup/template-BotApp-new-rg.json index eb6ad68a9f..c10d46b3cf 100644 --- a/samples/typescript_nodejs/00.empty-bot/deploymentTemplates/DeployWithNewResourceGroup/template-BotApp-new-rg.json +++ b/samples/typescript_nodejs/00.empty-bot/deploymentTemplates/DeployWithNewResourceGroup/template-BotApp-new-rg.json @@ -175,7 +175,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/00.empty-bot/package.json b/samples/typescript_nodejs/00.empty-bot/package.json index ff79a284c1..a9c8acfadb 100644 --- a/samples/typescript_nodejs/00.empty-bot/package.json +++ b/samples/typescript_nodejs/00.empty-bot/package.json @@ -18,12 +18,12 @@ "url": "https://github.com" }, "dependencies": { - "botbuilder": "~4.22.1", + "botbuilder": "~4.23.0", "replace": "~1.2.0", - "restify": "~8.6.0" + "restify": "~10.0.0" }, "devDependencies": { - "@types/restify": "8.4.2", + "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", "eslint": "^8.57.0", diff --git a/samples/typescript_nodejs/00.empty-bot/src/index.ts b/samples/typescript_nodejs/00.empty-bot/src/index.ts index 98e7963f19..0c20106304 100644 --- a/samples/typescript_nodejs/00.empty-bot/src/index.ts +++ b/samples/typescript_nodejs/00.empty-bot/src/index.ts @@ -51,7 +51,7 @@ adapter.onTurnError = async (context, error) => { const myBot = new EmptyBot(); // Listen for incoming requests. -server.post('/api/messages', async (req, res) => { +server.post('/api/messages', (req, res, next) => { // Route received a request to adapter for processing - await adapter.process(req, res, (context) => myBot.run(context)); + adapter.process(req, res, async (context) => await myBot.run(context)); }); diff --git a/samples/typescript_nodejs/00.empty-bot/tsconfig.json b/samples/typescript_nodejs/00.empty-bot/tsconfig.json index 556cc10836..a0ed59671a 100644 --- a/samples/typescript_nodejs/00.empty-bot/tsconfig.json +++ b/samples/typescript_nodejs/00.empty-bot/tsconfig.json @@ -7,6 +7,7 @@ "rootDir": "./src", "sourceMap": true, "incremental": true, - "tsBuildInfoFile": "./lib/.tsbuildinfo" + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "esModuleInterop": true } } diff --git a/samples/typescript_nodejs/01.console-echo/README.md b/samples/typescript_nodejs/01.console-echo/README.md index f97345c839..8b8f0d1769 100644 --- a/samples/typescript_nodejs/01.console-echo/README.md +++ b/samples/typescript_nodejs/01.console-echo/README.md @@ -6,7 +6,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i ## Prerequisites -- [Node.js](https://nodejs.org) version 10.14.1 or higher +- [Node.js](https://nodejs.org) version 18 or higher ```bash # determine node version diff --git a/samples/typescript_nodejs/01.console-echo/package.json b/samples/typescript_nodejs/01.console-echo/package.json index 11a857b463..2bd562a376 100644 --- a/samples/typescript_nodejs/01.console-echo/package.json +++ b/samples/typescript_nodejs/01.console-echo/package.json @@ -13,7 +13,7 @@ "watch": "nodemon --watch ./src -e ts --exec \"npm run start\"" }, "dependencies": { - "botbuilder": "~4.22.1", + "botbuilder": "~4.23.0", "readline": "^1.3.0" }, "devDependencies": { diff --git a/samples/typescript_nodejs/01.console-echo/tsconfig.json b/samples/typescript_nodejs/01.console-echo/tsconfig.json index 73fe89d187..693c9d0217 100644 --- a/samples/typescript_nodejs/01.console-echo/tsconfig.json +++ b/samples/typescript_nodejs/01.console-echo/tsconfig.json @@ -9,6 +9,7 @@ "sourceMap": true, "strict": true, "incremental": true, - "tsBuildInfoFile": "./lib/.tsbuildinfo" + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "esModuleInterop": true } } diff --git a/samples/typescript_nodejs/02.echo-bot/README.md b/samples/typescript_nodejs/02.echo-bot/README.md index 2c66128c67..49b34b61a7 100644 --- a/samples/typescript_nodejs/02.echo-bot/README.md +++ b/samples/typescript_nodejs/02.echo-bot/README.md @@ -6,7 +6,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i ## Prerequisites -- [Node.js](https://nodejs.org) version 10.14.1 or higher +- [Node.js](https://nodejs.org) version 18 or higher ```bash # determine node version diff --git a/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json b/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json index e14f532660..93441894af 100644 --- a/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json +++ b/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json @@ -158,7 +158,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json b/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json index eb6ad68a9f..c10d46b3cf 100644 --- a/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json +++ b/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json @@ -175,7 +175,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/linux/deployUseExistResourceGroup/template-BotApp-with-rg.json b/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/linux/deployUseExistResourceGroup/template-BotApp-with-rg.json index 29d28db9b9..db8f219d47 100644 --- a/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/linux/deployUseExistResourceGroup/template-BotApp-with-rg.json +++ b/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/linux/deployUseExistResourceGroup/template-BotApp-with-rg.json @@ -51,7 +51,7 @@ }, "linuxFxVersion": { "type": "string", - "defaultValue": "NODE|16" + "defaultValue": "NODE|20-LTS" }, "appId": { "type": "string", @@ -137,7 +137,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/linux/deployWithNewResourceGroup/template-BotApp-new-rg.json b/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/linux/deployWithNewResourceGroup/template-BotApp-new-rg.json index a8bea6399f..ff144bfd5f 100644 --- a/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/linux/deployWithNewResourceGroup/template-BotApp-new-rg.json +++ b/samples/typescript_nodejs/02.echo-bot/deploymentTemplates/linux/deployWithNewResourceGroup/template-BotApp-new-rg.json @@ -48,7 +48,7 @@ }, "linuxFxVersion": { "type": "string", - "defaultValue": "NODE|16" + "defaultValue": "NODE|20-LTS" }, "appId": { "type": "string", @@ -156,7 +156,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/02.echo-bot/package.json b/samples/typescript_nodejs/02.echo-bot/package.json index 948f253204..782f89e522 100644 --- a/samples/typescript_nodejs/02.echo-bot/package.json +++ b/samples/typescript_nodejs/02.echo-bot/package.json @@ -18,15 +18,15 @@ "url": "https://github.com" }, "dependencies": { - "botbuilder": "~4.22.1", + "botbuilder": "~4.23.0", "dotenv": "^8.2.0", "replace": "^1.2.0", - "restify": "~8.6.0" + "restify": "~10.0.0" }, "devDependencies": { "@types/dotenv": "6.1.1", "@types/node": "^16.11.6", - "@types/restify": "8.4.2", + "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", "eslint": "^8.57.0", diff --git a/samples/typescript_nodejs/02.echo-bot/src/index.ts b/samples/typescript_nodejs/02.echo-bot/src/index.ts index f0527522fb..f1c97fac27 100644 --- a/samples/typescript_nodejs/02.echo-bot/src/index.ts +++ b/samples/typescript_nodejs/02.echo-bot/src/index.ts @@ -64,9 +64,9 @@ adapter.onTurnError = onTurnErrorHandler; const myBot = new EchoBot(); // Listen for incoming requests. -server.post('/api/messages', async (req, res) => { +server.post('/api/messages', (req, res, next) => { // Route received a request to adapter for processing - await adapter.process(req, res, (context) => myBot.run(context)); + adapter.process(req, res, async (context) => await myBot.run(context)); }); // Listen for Upgrade requests for Streaming. diff --git a/samples/typescript_nodejs/02.echo-bot/tsconfig.json b/samples/typescript_nodejs/02.echo-bot/tsconfig.json index 556cc10836..a0ed59671a 100644 --- a/samples/typescript_nodejs/02.echo-bot/tsconfig.json +++ b/samples/typescript_nodejs/02.echo-bot/tsconfig.json @@ -7,6 +7,7 @@ "rootDir": "./src", "sourceMap": true, "incremental": true, - "tsBuildInfoFile": "./lib/.tsbuildinfo" + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "esModuleInterop": true } } diff --git a/samples/typescript_nodejs/03.welcome-users/README.md b/samples/typescript_nodejs/03.welcome-users/README.md index b69fc04ca7..725d9e0017 100644 --- a/samples/typescript_nodejs/03.welcome-users/README.md +++ b/samples/typescript_nodejs/03.welcome-users/README.md @@ -6,7 +6,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i ## Prerequisites -- [Node.js](https://nodejs.org) version 10.14.1 or higher +- [Node.js](https://nodejs.org) version 18 or higher ```bash # determine node version diff --git a/samples/typescript_nodejs/03.welcome-users/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json b/samples/typescript_nodejs/03.welcome-users/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json index e14f532660..93441894af 100644 --- a/samples/typescript_nodejs/03.welcome-users/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json +++ b/samples/typescript_nodejs/03.welcome-users/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json @@ -158,7 +158,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/03.welcome-users/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json b/samples/typescript_nodejs/03.welcome-users/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json index eb6ad68a9f..c10d46b3cf 100644 --- a/samples/typescript_nodejs/03.welcome-users/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json +++ b/samples/typescript_nodejs/03.welcome-users/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json @@ -175,7 +175,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/03.welcome-users/package.json b/samples/typescript_nodejs/03.welcome-users/package.json index 63718dbb58..647d56e96b 100644 --- a/samples/typescript_nodejs/03.welcome-users/package.json +++ b/samples/typescript_nodejs/03.welcome-users/package.json @@ -18,12 +18,12 @@ "url": "https://github.com" }, "dependencies": { - "botbuilder": "~4.22.1", + "botbuilder": "~4.23.0", "replace": "~1.2.0", - "restify": "~8.6.0" + "restify": "~10.0.0" }, "devDependencies": { - "@types/restify": "8.4.2", + "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", "eslint": "^8.57.0", diff --git a/samples/typescript_nodejs/03.welcome-users/src/index.ts b/samples/typescript_nodejs/03.welcome-users/src/index.ts index 61a5397ad3..7ab6307f01 100644 --- a/samples/typescript_nodejs/03.welcome-users/src/index.ts +++ b/samples/typescript_nodejs/03.welcome-users/src/index.ts @@ -63,7 +63,7 @@ const userState = new UserState(memoryStorage); const myBot = new WelcomeBot(userState); // Listen for incoming requests. -server.post('/api/messages', async (req, res) => { +server.post('/api/messages', (req, res, next) => { // Route received a request to adapter for processing - await adapter.process(req, res, (context) => myBot.run(context)); + adapter.process(req, res, async (context) => await myBot.run(context)); }); diff --git a/samples/typescript_nodejs/03.welcome-users/tsconfig.json b/samples/typescript_nodejs/03.welcome-users/tsconfig.json index 556cc10836..a0ed59671a 100644 --- a/samples/typescript_nodejs/03.welcome-users/tsconfig.json +++ b/samples/typescript_nodejs/03.welcome-users/tsconfig.json @@ -7,6 +7,7 @@ "rootDir": "./src", "sourceMap": true, "incremental": true, - "tsBuildInfoFile": "./lib/.tsbuildinfo" + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "esModuleInterop": true } } diff --git a/samples/typescript_nodejs/05.multi-turn-prompt/README.md b/samples/typescript_nodejs/05.multi-turn-prompt/README.md index e75390c012..a16ad431f1 100644 --- a/samples/typescript_nodejs/05.multi-turn-prompt/README.md +++ b/samples/typescript_nodejs/05.multi-turn-prompt/README.md @@ -6,7 +6,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i ## Prerequisites -- [Node.js](https://nodejs.org) version 10.14 or higher +- [Node.js](https://nodejs.org) version 18 or higher ```bash # determine node version diff --git a/samples/typescript_nodejs/05.multi-turn-prompt/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json b/samples/typescript_nodejs/05.multi-turn-prompt/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json index e14f532660..93441894af 100644 --- a/samples/typescript_nodejs/05.multi-turn-prompt/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json +++ b/samples/typescript_nodejs/05.multi-turn-prompt/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json @@ -158,7 +158,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/05.multi-turn-prompt/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json b/samples/typescript_nodejs/05.multi-turn-prompt/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json index eb6ad68a9f..c10d46b3cf 100644 --- a/samples/typescript_nodejs/05.multi-turn-prompt/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json +++ b/samples/typescript_nodejs/05.multi-turn-prompt/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json @@ -175,7 +175,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/05.multi-turn-prompt/package.json b/samples/typescript_nodejs/05.multi-turn-prompt/package.json index 794073ebcb..b6ed4fdc4c 100644 --- a/samples/typescript_nodejs/05.multi-turn-prompt/package.json +++ b/samples/typescript_nodejs/05.multi-turn-prompt/package.json @@ -18,14 +18,14 @@ "url": "https://github.com" }, "dependencies": { - "botbuilder": "~4.22.1", - "botbuilder-dialogs": "~4.22.1", + "botbuilder": "~4.23.0", + "botbuilder-dialogs": "~4.23.0", "dotenv": "^8.2.0", "replace": "~1.2.0", - "restify": "~8.6.0" + "restify": "~10.0.0" }, "devDependencies": { - "@types/restify": "8.4.2", + "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", "eslint": "^8.57.0", diff --git a/samples/typescript_nodejs/05.multi-turn-prompt/src/index.ts b/samples/typescript_nodejs/05.multi-turn-prompt/src/index.ts index 974551074a..40e90d21e5 100644 --- a/samples/typescript_nodejs/05.multi-turn-prompt/src/index.ts +++ b/samples/typescript_nodejs/05.multi-turn-prompt/src/index.ts @@ -76,7 +76,7 @@ server.listen(process.env.port || process.env.PORT || 3978, () => { }); // Listen for incoming requests. -server.post('/api/messages', async (req, res) => { +server.post('/api/messages', (req, res, next) => { // Route received a request to adapter for processing - await adapter.process(req, res, (context) => bot.run(context)); + adapter.process(req, res, async (context) => await bot.run(context)); }); diff --git a/samples/typescript_nodejs/05.multi-turn-prompt/tsconfig.json b/samples/typescript_nodejs/05.multi-turn-prompt/tsconfig.json index 556cc10836..a0ed59671a 100644 --- a/samples/typescript_nodejs/05.multi-turn-prompt/tsconfig.json +++ b/samples/typescript_nodejs/05.multi-turn-prompt/tsconfig.json @@ -7,6 +7,7 @@ "rootDir": "./src", "sourceMap": true, "incremental": true, - "tsBuildInfoFile": "./lib/.tsbuildinfo" + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "esModuleInterop": true } } diff --git a/samples/typescript_nodejs/06.using-cards/README.md b/samples/typescript_nodejs/06.using-cards/README.md index 7d359f939e..5e09aae01a 100644 --- a/samples/typescript_nodejs/06.using-cards/README.md +++ b/samples/typescript_nodejs/06.using-cards/README.md @@ -6,7 +6,7 @@ This bot has been created using [Microsoft Bot Framework][1], it shows how to cr ## Prerequisites -- [Node.js](https://nodejs.org) version 10.14 or higher +- [Node.js](https://nodejs.org) version 18 or higher ```bash # determine node version diff --git a/samples/typescript_nodejs/06.using-cards/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json b/samples/typescript_nodejs/06.using-cards/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json index e14f532660..93441894af 100644 --- a/samples/typescript_nodejs/06.using-cards/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json +++ b/samples/typescript_nodejs/06.using-cards/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json @@ -158,7 +158,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/06.using-cards/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json b/samples/typescript_nodejs/06.using-cards/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json index eb6ad68a9f..c10d46b3cf 100644 --- a/samples/typescript_nodejs/06.using-cards/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json +++ b/samples/typescript_nodejs/06.using-cards/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json @@ -175,7 +175,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/06.using-cards/package.json b/samples/typescript_nodejs/06.using-cards/package.json index 51735447f8..1f5554d8ad 100644 --- a/samples/typescript_nodejs/06.using-cards/package.json +++ b/samples/typescript_nodejs/06.using-cards/package.json @@ -18,14 +18,14 @@ "url": "https://github.com" }, "dependencies": { - "botbuilder": "~4.22.1", - "botbuilder-dialogs": "~4.22.1", + "botbuilder": "~4.23.0", + "botbuilder-dialogs": "~4.23.0", "dotenv": "^8.2.0", "replace": "~1.2.0", - "restify": "~8.6.0" + "restify": "~10.0.0" }, "devDependencies": { - "@types/restify": "8.4.2", + "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", "eslint": "^8.57.0", diff --git a/samples/typescript_nodejs/06.using-cards/src/index.ts b/samples/typescript_nodejs/06.using-cards/src/index.ts index 1653a8dc06..8965030abf 100644 --- a/samples/typescript_nodejs/06.using-cards/src/index.ts +++ b/samples/typescript_nodejs/06.using-cards/src/index.ts @@ -76,7 +76,7 @@ server.listen(process.env.port || process.env.PORT || 3978, () => { }); // Listen for incoming activities and route them to your bot main dialog. -server.post('/api/messages', async (req, res) => { +server.post('/api/messages', (req, res, next) => { // Route received a request to adapter for processing - await adapter.process(req, res, (context) => bot.run(context)); + adapter.process(req, res, async (context) => await bot.run(context)); }); diff --git a/samples/typescript_nodejs/13.core-bot/README.md b/samples/typescript_nodejs/13.core-bot/README.md index 50a6d7316a..5777dc5eaa 100644 --- a/samples/typescript_nodejs/13.core-bot/README.md +++ b/samples/typescript_nodejs/13.core-bot/README.md @@ -16,7 +16,7 @@ This sample **requires** prerequisites in order to run. ### Overview This bot uses [LUIS](https://www.luis.ai), an AI based cognitive service, to implement language understanding. -- [Node.js](https://nodejs.org) version 10.14 or higher +- [Node.js](https://nodejs.org) version 18 or higher ```bash # determine node version diff --git a/samples/typescript_nodejs/13.core-bot/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json b/samples/typescript_nodejs/13.core-bot/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json index e14f532660..93441894af 100644 --- a/samples/typescript_nodejs/13.core-bot/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json +++ b/samples/typescript_nodejs/13.core-bot/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json @@ -158,7 +158,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/13.core-bot/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json b/samples/typescript_nodejs/13.core-bot/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json index eb6ad68a9f..c10d46b3cf 100644 --- a/samples/typescript_nodejs/13.core-bot/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json +++ b/samples/typescript_nodejs/13.core-bot/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json @@ -175,7 +175,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/13.core-bot/deploymentTemplates/linux/deployUseExistResourceGroup/template-BotApp-with-rg.json b/samples/typescript_nodejs/13.core-bot/deploymentTemplates/linux/deployUseExistResourceGroup/template-BotApp-with-rg.json index 29d28db9b9..db8f219d47 100644 --- a/samples/typescript_nodejs/13.core-bot/deploymentTemplates/linux/deployUseExistResourceGroup/template-BotApp-with-rg.json +++ b/samples/typescript_nodejs/13.core-bot/deploymentTemplates/linux/deployUseExistResourceGroup/template-BotApp-with-rg.json @@ -51,7 +51,7 @@ }, "linuxFxVersion": { "type": "string", - "defaultValue": "NODE|16" + "defaultValue": "NODE|20-LTS" }, "appId": { "type": "string", @@ -137,7 +137,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/13.core-bot/deploymentTemplates/linux/deployWithNewResourceGroup/template-BotApp-new-rg.json b/samples/typescript_nodejs/13.core-bot/deploymentTemplates/linux/deployWithNewResourceGroup/template-BotApp-new-rg.json index a8bea6399f..ff144bfd5f 100644 --- a/samples/typescript_nodejs/13.core-bot/deploymentTemplates/linux/deployWithNewResourceGroup/template-BotApp-new-rg.json +++ b/samples/typescript_nodejs/13.core-bot/deploymentTemplates/linux/deployWithNewResourceGroup/template-BotApp-new-rg.json @@ -48,7 +48,7 @@ }, "linuxFxVersion": { "type": "string", - "defaultValue": "NODE|16" + "defaultValue": "NODE|20-LTS" }, "appId": { "type": "string", @@ -156,7 +156,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/13.core-bot/package.json b/samples/typescript_nodejs/13.core-bot/package.json index 7668dce794..6e1f1a45ac 100644 --- a/samples/typescript_nodejs/13.core-bot/package.json +++ b/samples/typescript_nodejs/13.core-bot/package.json @@ -38,19 +38,20 @@ }, "dependencies": { "@microsoft/recognizers-text-data-types-timex-expression": "1.1.4", - "botbuilder": "~4.22.1", - "botbuilder-ai": "~4.22.1", - "botbuilder-dialogs": "~4.22.1", - "botbuilder-testing": "~4.22.1", + "botbuilder": "~4.23.0", + "botbuilder-ai": "~4.23.0", + "botbuilder-dialogs": "~4.23.0", + "botbuilder-testing": "~4.23.0", "dotenv": "^8.2.0", + "moment": "^2.30.1", "replace": "~1.2.0", - "restify": "~8.6.0" + "restify": "~10.0.0" }, "devDependencies": { "@types/dotenv": "6.1.1", "@types/mocha": "^7.0.2", "@types/node": "^16.11.6", - "@types/restify": "8.4.2", + "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", "eslint": "^8.57.0", diff --git a/samples/typescript_nodejs/13.core-bot/src/index.ts b/samples/typescript_nodejs/13.core-bot/src/index.ts index cf66514362..0b54f8ed4f 100644 --- a/samples/typescript_nodejs/13.core-bot/src/index.ts +++ b/samples/typescript_nodejs/13.core-bot/src/index.ts @@ -101,9 +101,9 @@ server.listen(process.env.port || process.env.PORT || 3978, () => { }); // Listen for incoming activities and route them to your bot main dialog. -server.post('/api/messages', async (req, res) => { +server.post('/api/messages', (req, res, next) => { // Route received a request to adapter for processing - await adapter.process(req, res, (context) => bot.run(context)); + adapter.process(req, res, async (context) => await bot.run(context)); }); // Listen for Upgrade requests for Streaming. diff --git a/samples/typescript_nodejs/13.core-bot/tsconfig.json b/samples/typescript_nodejs/13.core-bot/tsconfig.json index 3fa2e8df4a..be05d48acf 100644 --- a/samples/typescript_nodejs/13.core-bot/tsconfig.json +++ b/samples/typescript_nodejs/13.core-bot/tsconfig.json @@ -11,5 +11,6 @@ "sourceMap": true, "incremental": true, "tsBuildInfoFile": "./lib/.tsbuildinfo", + "esModuleInterop": true } } diff --git a/samples/typescript_nodejs/16.proactive-messages/README.md b/samples/typescript_nodejs/16.proactive-messages/README.md index 4782033165..d9d64c734d 100644 --- a/samples/typescript_nodejs/16.proactive-messages/README.md +++ b/samples/typescript_nodejs/16.proactive-messages/README.md @@ -8,7 +8,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i ## Prerequisites -- [Node.js](https://nodejs.org) version 10.14.1 or higher +- [Node.js](https://nodejs.org) version 18 or higher ```bash # determine node version diff --git a/samples/typescript_nodejs/16.proactive-messages/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json b/samples/typescript_nodejs/16.proactive-messages/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json index e14f532660..93441894af 100644 --- a/samples/typescript_nodejs/16.proactive-messages/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json +++ b/samples/typescript_nodejs/16.proactive-messages/deploymentTemplates/deployUseExistResourceGroup/template-BotApp-with-rg.json @@ -158,7 +158,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/16.proactive-messages/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json b/samples/typescript_nodejs/16.proactive-messages/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json index eb6ad68a9f..c10d46b3cf 100644 --- a/samples/typescript_nodejs/16.proactive-messages/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json +++ b/samples/typescript_nodejs/16.proactive-messages/deploymentTemplates/deployWithNewResourceGroup/template-BotApp-new-rg.json @@ -175,7 +175,7 @@ "appSettings": [ { "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "~16" + "value": "~20" }, { "name": "MicrosoftAppType", diff --git a/samples/typescript_nodejs/16.proactive-messages/package.json b/samples/typescript_nodejs/16.proactive-messages/package.json index efe0cf58ca..441557bed4 100644 --- a/samples/typescript_nodejs/16.proactive-messages/package.json +++ b/samples/typescript_nodejs/16.proactive-messages/package.json @@ -18,14 +18,14 @@ "url": "https://github.com" }, "dependencies": { - "botbuilder": "~4.22.1", + "botbuilder": "~4.23.0", "dotenv": "^8.2.0", "replace": "~1.2.0", - "restify": "~8.6.0" + "restify": "~10.0.0" }, "devDependencies": { "@types/dotenv": "6.1.1", - "@types/restify": "8.4.2", + "@types/restify": "8.5.12", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", "eslint": "^8.57.0", diff --git a/samples/typescript_nodejs/16.proactive-messages/src/index.ts b/samples/typescript_nodejs/16.proactive-messages/src/index.ts index 88da1ad642..5f000fef20 100644 --- a/samples/typescript_nodejs/16.proactive-messages/src/index.ts +++ b/samples/typescript_nodejs/16.proactive-messages/src/index.ts @@ -67,9 +67,9 @@ const conversationReferences = {}; const myBot = new EchoBot(conversationReferences); // Listen for incoming requests. -server.post('/api/messages', async (req, res) => { +server.post('/api/messages', (req, res, next) => { // Route received a request to adapter for processing - await adapter.process(req, res, (context) => myBot.run(context)); + adapter.process(req, res, async (context) => await myBot.run(context)); }); // Listen for Upgrade requests for Streaming. @@ -84,9 +84,9 @@ server.on('upgrade', async (req, socket, head) => { }); // Listen for incoming notifications and send proactive messages to users. -server.get('/api/notify', async (req, res) => { +server.get('/api/notify', (req, res, next) => { for (const conversationReference of Object.values(conversationReferences)) { - await adapter.continueConversationAsync(process.env.MicrosoftAppId, conversationReference, async (context) => { + adapter.continueConversationAsync(process.env.MicrosoftAppId, conversationReference, async (context) => { await context.sendActivity('proactive hello'); }); } @@ -97,10 +97,10 @@ server.get('/api/notify', async (req, res) => { }); // Listen for incoming custom notifications and send proactive messages to users. -server.post('/api/notify', async (req, res) => { +server.post('/api/notify', (req, res, next) => { for (const msg of req.body) { for (const conversationReference of Object.values(conversationReferences)) { - await adapter.continueConversationAsync(process.env.MicrosoftAppId, conversationReference, async (turnContext) => { + adapter.continueConversationAsync(process.env.MicrosoftAppId, conversationReference, async (turnContext) => { await turnContext.sendActivity(msg); }); } diff --git a/samples/typescript_nodejs/16.proactive-messages/tsconfig.json b/samples/typescript_nodejs/16.proactive-messages/tsconfig.json index 556cc10836..a0ed59671a 100644 --- a/samples/typescript_nodejs/16.proactive-messages/tsconfig.json +++ b/samples/typescript_nodejs/16.proactive-messages/tsconfig.json @@ -7,6 +7,7 @@ "rootDir": "./src", "sourceMap": true, "incremental": true, - "tsBuildInfoFile": "./lib/.tsbuildinfo" + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "esModuleInterop": true } }