Skip to content

Commit

Permalink
Teamsfx toolkit migration nodejs samples (#963)
Browse files Browse the repository at this point in the history
* Teamsfx toolkit migration nodejs samples

* Added toolkit-icon manin readme

* Updating readme
  • Loading branch information
Harikrishnan-MSFT authored Sep 25, 2023
1 parent 66b7e7b commit b46bba3
Show file tree
Hide file tree
Showing 17 changed files with 26,275 additions and 2,804 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ The [Teams Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDev
|9|Graph Pinned Message | This is a sample application which demonstrates how to pin messages in chat using Graph api. | [View][graph-pinned-message#cs]|[View][graph-pinned-message#js] ![toolkit-icon](assets/toolkit-icon.png) |
|10|Graph Bulk Meetings | This is an sample application which shows how to create Teams meetings in bulk using Graph api. | [View][graph-bulk-meetings#cs]|[View][graph-bulk-meetings#js]|
|11|Graph Meeting Notification | This is a sample application which demonstrates the use of online meeting subscription and sends you the notifications in chat using bot. | [View][graph-meeting-notification#cs]|[View][graph-meeting-notification#js] ![toolkit-icon](assets/toolkit-icon.png)|
|12|Change Notifications Team/Channel | This sample application which demonstrates use of Team/Channel subscription that will post notifications when user create/edit/delete team/channel using Graph api. | [View][change-notifications-team/channel#cs]|[View][change-notifications-team/channel#js]|


|12|Change Notifications Team/Channel | This sample application which demonstrates use of Team/Channel subscription that will post notifications when user create/edit/delete team/channel using Graph api. | [View][change-notifications-team/channel#cs]|[View][change-notifications-team/channel#js] ![toolkit-icon](assets/toolkit-icon.png)|

## [Calls and online meetings bots](https://docs.microsoft.com/microsoftteams/platform/bots/calls-and-meetings/calls-meetings-bots-overview)

Expand Down
2 changes: 1 addition & 1 deletion samples/graph-change-notification-team-channel/nodejs/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MicrosoftAppId = "<<MicrosoftAppId>>"
MicrosoftAppPassword = "<<MicrosoftAppPassword>>"
MicrosoftAppTenantId = "<<MicrosoftAppTenantId>>"
AllowedHosts = "*"
notificationUrl= "<<ngrok>>/api/notifications"
notificationUrl= ""
BaseUrl= "<<BaseUrl>>"
Base64EncodedCertificate= "<<Base64EncodedCertificate>>"
EncryptionCertificateId= "meeting-notification"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.zip

# Runtime data
pids
Expand Down Expand Up @@ -62,9 +63,6 @@ dist/
manifest/
build/

# VS Code config files
.vs/**

#############

# TeamsFx files
Expand All @@ -83,4 +81,4 @@ node_modules/
.DS_Store

# build
lib/
lib/
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"TeamsDevApp.ms-teams-vscode-extension"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Frontend in Teams (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Frontend in Teams (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Frontend in Outlook (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Frontend in Outlook (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Frontend in the Microsoft 365 app (Edge)",
"type": "msedge",
"request": "launch",
"url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Frontend in the Microsoft 365 app (Chrome)",
"type": "chrome",
"request": "launch",
"url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}",
"cascadeTerminateToConfigurations": [
"Attach to Local Service"
],
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
},
{
"name": "Attach to Local Service",
"type": "node",
"request": "attach",
"port": 9239,
"restart": true,
"presentation": {
"group": "all",
"hidden": true
},
"internalConsoleOptions": "neverOpen"
}
],
"compounds": [
{
"name": "Debug in Teams (Edge)",
"configurations": [
"Attach to Frontend in Teams (Edge)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 1: Teams",
"order": 1
},
"stopAll": true
},
{
"name": "Debug in Teams (Chrome)",
"configurations": [
"Attach to Frontend in Teams (Chrome)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 1: Teams",
"order": 2
},
"stopAll": true
},
{
"name": "Debug in Outlook (Edge)",
"configurations": [
"Attach to Frontend in Outlook (Edge)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 2: Outlook",
"order": 1
},
"stopAll": true
},
{
"name": "Debug in Outlook (Chrome)",
"configurations": [
"Attach to Frontend in Outlook (Chrome)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 2: Outlook",
"order": 2
},
"stopAll": true
},
{
"name": "Debug in the Microsoft 365 app (Edge)",
"configurations": [
"Attach to Frontend in the Microsoft 365 app (Edge)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 3: the Microsoft 365 app",
"order": 1
},
"stopAll": true
},
{
"name": "Debug in the Microsoft 365 app (Chrome)",
"configurations": [
"Attach to Frontend in the Microsoft 365 app (Chrome)",
"Attach to Local Service"
],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "group 3: the Microsoft 365 app",
"order": 2
},
"stopAll": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"debug.onTaskErrors": "abort",
"json.schemas": [
{
"fileMatch": [
"/aad.*.json"
],
"schema": {}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
// This file is automatically generated by Teams Toolkit.
// The teamsfx tasks defined in this file require Teams Toolkit version >= 5.0.0.
// See https://aka.ms/teamsfx-tasks for details on how to customize each task.
{
"version": "2.0.0",
"tasks": [
{
"label": "Start Teams App Locally",
"dependsOn": [
"Validate prerequisites",
"Start local tunnel",
"Provision",
"Deploy",
"Start application"
],
"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",
"type": "teamsfx",
"command": "debug-check-prerequisites",
"args": {
"prerequisites": [
"nodejs", // Validate if Node.js is installed.
"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": [
3978, // tab service port
3000 // backend service port
]
}
},
{
// 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",
"type": "teamsfx",
"command": "debug-start-local-tunnel",
"args": {
"type": "dev-tunnel",
"ports": [
{
"portNumber": 3978,
"protocol": "https",
"access": "public",
"writeToEnvironmentFile": {
"endpoint": "TAB_ENDPOINT", // output tunnel endpoint as TAB_ENDPOINT
"domain": "TAB_DOMAIN" // output tunnel domain as TAB_DOMAIN
}
}
],
"env": "local"
},
"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",
"type": "teamsfx",
"command": "provision",
"args": {
"env": "local"
}
},
{
// Build project.
// See https://aka.ms/teamsfx-tasks/deploy to know the details and how to customize the args.
"label": "Deploy",
"type": "teamsfx",
"command": "deploy",
"args": {
"env": "local"
}
},
{
"label": "Start application",
"dependsOn": [
"Start frontend",
"Start backend"
]
},
{
"label": "Start frontend",
"type": "shell",
"command": "npm run dev:teamsfx",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}/client"
},
"problemMatcher": {
"pattern": {
"regexp": "^.*$",
"file": 0,
"location": 1,
"message": 2
},
"background": {
"activeOnStart": true,
"beginsPattern": ".*",
"endsPattern": "Compiled successfully!"
}
}
},
{
"label": "Start backend",
"type": "shell",
"command": "npm run dev:teamsfx",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": {
"pattern": {
"regexp": "^.*$",
"file": 0,
"location": 1,
"message": 2
},
"background": {
"activeOnStart": true,
"beginsPattern": "[nodemon] starting",
"endsPattern": "app listening on port 3000!"
}
}
}
]
}
Loading

0 comments on commit b46bba3

Please sign in to comment.