Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions samples/bot-configuration-app-auth/nodejs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# TeamsFx files
env/.env.*.user
env/.env.local
.localConfigs
appManifest/build
.localConfigs.playground
.notification.localstore.json
.notification.playgroundstore.json
appPackage/build

# dependencies
node_modules/
Expand All @@ -11,3 +12,6 @@ node_modules/
.env
.deployment
.DS_Store

# Dev tool directories
/devTools/
2 changes: 2 additions & 0 deletions samples/bot-configuration-app-auth/nodejs/.localConfigs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CLIENT_ID=
CLIENT_SECRET=
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"TeamsDevApp.ms-teams-vscode-extension"
]
}
57 changes: 47 additions & 10 deletions samples/bot-configuration-app-auth/nodejs/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "remote",
"group": "3-remote",
"order": 1
},
"internalConsoleOptions": "neverOpen"
Expand All @@ -18,7 +18,7 @@
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "remote",
"group": "3-remote",
"order": 2
},
"internalConsoleOptions": "neverOpen"
Expand All @@ -35,7 +35,8 @@
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
"internalConsoleOptions": "neverOpen",
"perScriptSourcemaps": "yes"
},
{
"name": "Launch App (Chrome)",
Expand All @@ -49,7 +50,8 @@
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
"internalConsoleOptions": "neverOpen",
"perScriptSourcemaps": "yes"
},
{
"name": "Attach to Local Service",
Expand All @@ -62,34 +64,69 @@
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Launch Remote (Desktop)",
"type": "node",
"request": "launch",
"preLaunchTask": "Start App in Desktop Client (Remote)",
"presentation": {
"group": "3-remote",
"order": 3
},
"internalConsoleOptions": "neverOpen",
}
],
"compounds": [
{
"name": "Debug (Edge)",
"name": "Debug in Teams (Edge)",
"configurations": [
"Launch App (Edge)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"preLaunchTask": "Start App Locally",
"presentation": {
"group": "all",
"group": "2-local",
"order": 1
},
"stopAll": true
},
{
"name": "Debug (Chrome)",
"name": "Debug in Teams (Chrome)",
"configurations": [
"Launch App (Chrome)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"preLaunchTask": "Start App Locally",
"presentation": {
"group": "all",
"group": "2-local",
"order": 2
},
"stopAll": true
},
{
"name": "Debug in Teams (Desktop)",
"configurations": [
"Attach to Local Service"
],
"preLaunchTask": "Start App in Desktop Client",
"presentation": {
"group": "2-local",
"order": 3
},
"stopAll": true
},
{
"name": "Debug in Microsoft 365 Agents Playground",
"configurations": [
"Attach to Local Service"
],
"preLaunchTask": "Start App in Microsoft 365 Agents Playground",
"presentation": {
"group": "1-local",
"order": 1
},
"stopAll": true
}
]
}
216 changes: 213 additions & 3 deletions samples/bot-configuration-app-auth/nodejs/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,189 @@
"version": "2.0.0",
"tasks": [
{
"label": "Start Teams App Locally",
"label": "Start Agent (Sandbox)",
"dependsOn": [
"Validate prerequisites (Sandbox)",
"Start local tunnel (Sandbox)",
"Provision (Sandbox)",
"Deploy (Sandbox)",
"Start application",
"Sideload App to channel"
],
"dependsOrder": "sequence"
},
{
// Check all required prerequisites.
// See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args.
"label": "Validate prerequisites (Sandbox)",
"type": "teamsfx",
"command": "debug-check-prerequisites",
"args": {
"prerequisites": [
"portOccupancy",
"sandbox",
"nodejs"
],
"portOccupancy": [
3978,
9239
]
}
},
{
// Start the local tunnel service to forward public URL to local port and inspect traffic.
// See https://aka.ms/teamsfx-tasks/local-tunnel for the detailed args definitions.
"label": "Start local tunnel (Sandbox)",
"type": "teamsfx",
"command": "debug-start-local-tunnel",
"args": {
"type": "dev-tunnel",
"ports": [
{
"portNumber": 3978,
"protocol": "http",
"access": "public",
"writeToEnvironmentFile": {
"endpoint": "BOT_ENDPOINT",
"domain": "BOT_DOMAIN"
}
}
],
"env": "sandbox"
},
"isBackground": true,
"problemMatcher": "$teamsfx-local-tunnel-watch"
},
{
// Create the debug resources.
// See https://aka.ms/teamsfx-tasks/provision to know the details and how to customize the args.
"label": "Provision (Sandbox)",
"type": "teamsfx",
"command": "provision",
"args": {
"env": "sandbox"
}
},
{
// Build the project.
// See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args.
"label": "Deploy (Sandbox)",
"type": "teamsfx",
"command": "deploy",
"args": {
"env": "sandbox"
}
},
{
"label": "Sideload App to channel",
"type": "teamsfx",
"command": "install-app",
"args": {
"env": "sandbox",
"appPackagePath": "${workspaceFolder}/appPackage/build/appPackage.sandbox.zip"
}
},
{
"label": "Start App in Microsoft 365 Agents Playground",
"dependsOn": [
"Validate prerequisites (Microsoft 365 Agents Playground)",
"Deploy (Microsoft 365 Agents Playground)",
"Start application (Microsoft 365 Agents Playground)",
"Start Microsoft 365 Agents Playground",
],
"dependsOrder": "sequence"
},
{
// Check all required prerequisites.
// See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args.
"label": "Validate prerequisites (Microsoft 365 Agents Playground)",
"type": "teamsfx",
"command": "debug-check-prerequisites",
"args": {
"prerequisites": [
"nodejs", // Validate if Node.js is installed.
"portOccupancy" // Validate available ports to ensure those debug ones are not occupied.
],
"portOccupancy": [
3978, // app service port
9239, // app inspector port for Node.js debugger
56150, // Microsoft 365 Agents Playground port
]
}
},
{
// Build project.
// See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args.
"label": "Deploy (Microsoft 365 Agents Playground)",
"type": "teamsfx",
"command": "deploy",
"args": {
"env": "playground",
}
},
{
"label": "Start application (Microsoft 365 Agents Playground)",
"type": "shell",
"command": "npm run dev:teamsfx:testtool",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}",
},
"problemMatcher": {
"pattern": [
{
"regexp": "^.*$",
"file": 0,
"location": 1,
"message": 2
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "[nodemon] starting",
"endsPattern": "app listening to|Bot/ME service listening at|[nodemon] app crashed"
}
}
},
{
"label": "Start Microsoft 365 Agents Playground",
"type": "shell",
"command": "npm run dev:teamsfx:launch-testtool",
"isBackground": true,
"options": {
"env": {
"PATH": "${workspaceFolder}/devTools/teamsapptester/node_modules/.bin:${env:PATH}"
}
},
"windows": {
"options": {
"env": {
"PATH": "${workspaceFolder}/devTools/teamsapptester/node_modules/.bin;${env:PATH}"
}
}
},
"problemMatcher": {
"pattern": [
{
"regexp": "^.*$",
"file": 0,
"location": 1,
"message": 2
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".*",
"endsPattern": "Listening on"
}
},
"presentation": {
"panel": "dedicated",
"reveal": "silent"
}
},
{
"label": "Start App Locally",
"dependsOn": [
"Validate prerequisites",
"Start local tunnel",
Expand All @@ -24,7 +206,7 @@
"args": {
"prerequisites": [
"nodejs", // Validate if Node.js is installed.
"m365Account", // Sign-in prompt for Microsoft 365 account, then validate if the account enables the uploading permission.
"m365Account", // Sign-in prompt for Microsoft 365 account, then validate if the account enables the sideloading permission.
"portOccupancy" // Validate available ports to ensure those debug ones are not occupied.
],
"portOccupancy": [
Expand Down Expand Up @@ -97,9 +279,37 @@
"background": {
"activeOnStart": true,
"beginsPattern": "[nodemon] starting",
"endsPattern": "Server listening on http://localhost:"
"endsPattern": "app listening to|Bot/ME service listening at|[nodemon] app crashed"
}
}
},
{
"label": "Start App in Desktop Client",
"dependsOn": [
"Validate prerequisites",
"Start local tunnel",
"Provision",
"Deploy",
"Start application",
"Start desktop client"
],
"dependsOrder": "sequence"
},
{
"label": "Start desktop client",
"type": "teamsfx",
"command": "launch-desktop-client",
"args": {
"url": "teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true"
}
},
{
"label": "Start App in Desktop Client (Remote)",
"type": "teamsfx",
"command": "launch-desktop-client",
"args": {
"url": "teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true"
}
}
]
}
Loading