Skip to content

Commit 5e493c2

Browse files
teams picker sample
1 parent 060617f commit 5e493c2

File tree

21 files changed

+1253
-24
lines changed

21 files changed

+1253
-24
lines changed

samples/file-picking/teams-picker/.vscode/launch.json

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,25 @@
132132
"hidden": true
133133
},
134134
"internalConsoleOptions": "neverOpen"
135-
}
135+
},
136+
{
137+
"name": "Attach to Frontend (Edge)",
138+
"cascadeTerminateToConfigurations": [
139+
"Attach to Backend"
140+
],
141+
},
142+
{
143+
"name": "Attach to Backend",
144+
"type": "node",
145+
"request": "attach",
146+
"port": 9229,
147+
"restart": true,
148+
"presentation": {
149+
"group": "all",
150+
"hidden": true
151+
},
152+
"internalConsoleOptions": "neverOpen"
153+
}
136154
],
137155
"compounds": [
138156
{
@@ -206,6 +224,14 @@
206224
"order": 2
207225
},
208226
"stopAll": true
209-
}
210-
]
227+
},
228+
{
229+
"name": "Debug (Edge)",
230+
"configurations": [
231+
"Attach to Frontend (Edge)",
232+
"Attach to Backend"
233+
],
234+
},
235+
],
236+
211237
}

samples/file-picking/teams-picker/.vscode/tasks.json

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
{
5555
"label": "Start application",
5656
"dependsOn": [
57-
"Start frontend"
57+
"Start frontend",
58+
"Start backend"
5859
]
5960
},
6061
{
@@ -78,6 +79,48 @@
7879
"endsPattern": "Compiled|Failed|compiled|failed"
7980
}
8081
}
81-
}
82+
},
83+
{
84+
"label": "Start backend",
85+
"type": "shell",
86+
"command": "npm run dev:teamsfx",
87+
"isBackground": true,
88+
"options": {
89+
"cwd": "${workspaceFolder}/api",
90+
"env": {
91+
"PATH": "${workspaceFolder}/devTools/func:${env:PATH}"
92+
}
93+
},
94+
"problemMatcher": {
95+
"pattern": {
96+
"regexp": "^.*$",
97+
"file": 0,
98+
"location": 1,
99+
"message": 2
100+
},
101+
"background": {
102+
"activeOnStart": true,
103+
"beginsPattern": "^.*(Job host stopped|signaling restart).*$",
104+
"endsPattern": "^.*(Worker process started and initialized|Host lock lease acquired by instance ID).*$"
105+
}
106+
},
107+
"presentation": {
108+
"reveal": "silent"
109+
},
110+
"dependsOn": ["Watch backend"]
111+
},
112+
{
113+
"label": "Watch backend",
114+
"type": "shell",
115+
"command": "npm run watch",
116+
"isBackground": true,
117+
"options": {
118+
"cwd": "${workspaceFolder}/api"
119+
},
120+
"problemMatcher": "$tsc-watch",
121+
"presentation": {
122+
"reveal": "silent"
123+
}
124+
}
82125
]
83126
}

samples/file-picking/teams-picker/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ Follow below instructions to get started with this application template for loca
3434
* [Teams Toolkit CLI](https://docs.microsoft.com/microsoftteams/platform/toolkit/teamsfx-cli)
3535
* [TeamsFx SDK](https://docs.microsoft.com/microsoftteams/platform/toolkit/teamsfx-sdk)
3636
* [Teams Toolkit Samples](https://github.com/OfficeDev/TeamsFx-Samples)
37+
* [How to integrate a functions app for SSO](https://github.com/OfficeDev/TeamsFx/wiki/How-to-integrate-Azure-Functions-with-your-Teams-app)
38+
* [Add SSO](https://learn.microsoft.com/en-us/microsoftteams/platform/toolkit/add-single-sign-on)

samples/file-picking/teams-picker/aad.manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
{
2424
"id": "User.Read",
2525
"type": "Scope"
26+
},
27+
{
28+
"id": "Files.Read.All",
29+
"type": "Scope"
2630
}
2731
]
2832
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.js.map
2+
*.ts
3+
.git*
4+
.vscode
5+
local.settings.json
6+
test
7+
getting_started.md
8+
node_modules/@types/
9+
node_modules/azure-functions-core-tools/
10+
node_modules/typescript/
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
bin
2+
obj
3+
csx
4+
.vs
5+
edge
6+
Publish
7+
8+
*.user
9+
*.suo
10+
*.cscfg
11+
*.Cache
12+
project.lock.json
13+
14+
/packages
15+
/TestResults
16+
17+
/tools/NuGet.exe
18+
/App_Data
19+
/secrets
20+
/data
21+
.secrets
22+
appsettings.json
23+
local.settings.json
24+
25+
node_modules
26+
dist
27+
28+
# Local python packages
29+
.python_packages/
30+
31+
# Python Environments
32+
.env
33+
.venv
34+
env/
35+
venv/
36+
ENV/
37+
env.bak/
38+
venv.bak/
39+
40+
# Byte-compiled / optimized / DLL files
41+
__pycache__/
42+
*.py[cod]
43+
*$py.class
44+
45+
# Azurite artifacts
46+
__blobstorage__
47+
__queuestorage__
48+
__azurite_db*__.json
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions"
4+
]
5+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach to Node Functions",
6+
"type": "node",
7+
"request": "attach",
8+
"port": 9229,
9+
"preLaunchTask": "func: host start"
10+
}
11+
]
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"azureFunctions.deploySubpath": ".",
3+
"azureFunctions.postDeployTask": "npm install (functions)",
4+
"azureFunctions.projectLanguage": "TypeScript",
5+
"azureFunctions.projectRuntime": "~4",
6+
"debug.internalConsoleOptions": "neverOpen",
7+
"azureFunctions.preDeployTask": "npm prune (functions)"
8+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "func",
6+
"label": "func: host start",
7+
"command": "host start",
8+
"problemMatcher": "$func-node-watch",
9+
"isBackground": true,
10+
"dependsOn": "npm build (functions)"
11+
},
12+
{
13+
"type": "shell",
14+
"label": "npm build (functions)",
15+
"command": "npm run build",
16+
"dependsOn": "npm install (functions)",
17+
"problemMatcher": "$tsc"
18+
},
19+
{
20+
"type": "shell",
21+
"label": "npm install (functions)",
22+
"command": "npm install"
23+
},
24+
{
25+
"type": "shell",
26+
"label": "npm prune (functions)",
27+
"command": "npm prune --production",
28+
"dependsOn": "npm build (functions)",
29+
"problemMatcher": []
30+
}
31+
]
32+
}

0 commit comments

Comments
 (0)