@microsoft/teamsfx-core 2.0.0-alpha.2a6e2f57a.0 → 2.0.0-alpha.34e31d6eb.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/deps-checker/constant/helpLink.d.ts +6 -6
- package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -1
- package/build/common/deps-checker/constant/helpLink.js +14 -8
- package/build/common/deps-checker/constant/helpLink.js.map +1 -1
- package/build/common/deps-checker/constant/message.d.ts +4 -2
- package/build/common/deps-checker/constant/message.d.ts.map +1 -1
- package/build/common/deps-checker/constant/message.js +11 -5
- package/build/common/deps-checker/constant/message.js.map +1 -1
- package/build/common/deps-checker/constant/telemetry.d.ts +12 -1
- package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -1
- package/build/common/deps-checker/constant/telemetry.js +11 -0
- package/build/common/deps-checker/constant/telemetry.js.map +1 -1
- package/build/common/deps-checker/depsChecker.d.ts +3 -0
- package/build/common/deps-checker/depsChecker.d.ts.map +1 -1
- package/build/common/deps-checker/depsChecker.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts +3 -4
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js +108 -64
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.d.ts +3 -3
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/common/deps-checker/util/fileHelper.js +1 -1
- package/build/common/deps-checker/util/fileHelper.js.map +1 -1
- package/build/common/versionMetadata.d.ts +1 -0
- package/build/common/versionMetadata.d.ts.map +1 -1
- package/build/common/versionMetadata.js +1 -0
- package/build/common/versionMetadata.js.map +1 -1
- package/build/component/configManager/diagnostic.d.ts +9 -0
- package/build/component/configManager/diagnostic.d.ts.map +1 -0
- package/build/component/configManager/diagnostic.js +47 -0
- package/build/component/configManager/diagnostic.js.map +1 -0
- package/build/component/configManager/parser.d.ts.map +1 -1
- package/build/component/configManager/parser.js +10 -4
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/constants.d.ts +4 -0
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +49 -26
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts +2 -2
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +50 -61
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts +4 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +5 -5
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
- package/build/component/driver/arm/deployImpl.js +4 -1
- package/build/component/driver/arm/deployImpl.js.map +1 -1
- package/build/component/driver/arm/validator.d.ts.map +1 -1
- package/build/component/driver/arm/validator.js +0 -15
- package/build/component/driver/arm/validator.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +3 -3
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
- package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
- package/build/component/driver/devTool/installDriver.js +18 -7
- package/build/component/driver/devTool/installDriver.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/ValidateManifestArgs.d.ts +5 -0
- package/build/component/driver/teamsApp/interfaces/ValidateManifestArgs.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +29 -9
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/feature/apiconnector/errors.d.ts +0 -4
- package/build/component/feature/apiconnector/errors.d.ts.map +1 -1
- package/build/component/feature/apiconnector/errors.js +12 -16
- package/build/component/feature/apiconnector/errors.js.map +1 -1
- package/build/component/feature/bot/bot.js +8 -8
- package/build/component/feature/bot/bot.js.map +1 -1
- package/build/component/feature/bot/question.d.ts +6 -6
- package/build/component/feature/bot/question.d.ts.map +1 -1
- package/build/component/feature/bot/question.js +69 -38
- package/build/component/feature/bot/question.js.map +1 -1
- package/build/component/generator/generator.d.ts +1 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +2 -2
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/officeAddin/question.d.ts.map +1 -1
- package/build/component/generator/officeAddin/question.js +3 -3
- package/build/component/generator/officeAddin/question.js.map +1 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.d.ts +1 -0
- package/build/component/resource/appManifest/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.js +4 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.js.map +1 -1
- package/build/component/resource/appManifest/utils/utils.d.ts.map +1 -1
- package/build/component/resource/appManifest/utils/utils.js +5 -1
- package/build/component/resource/appManifest/utils/utils.js.map +1 -1
- package/build/component/resource/azureSql/errors.js +28 -28
- package/build/component/resource/azureSql/errors.js.map +1 -1
- package/build/component/resource/azureStorage/configs.d.ts +1 -1
- package/build/component/utils/depsChecker/bicepChecker.d.ts.map +1 -1
- package/build/component/utils/depsChecker/bicepChecker.js +4 -7
- package/build/component/utils/depsChecker/bicepChecker.js.map +1 -1
- package/build/core/FxCoreImplementV3.d.ts +1 -0
- package/build/core/FxCoreImplementV3.d.ts.map +1 -1
- package/build/core/FxCoreImplementV3.js +20 -7
- package/build/core/FxCoreImplementV3.js.map +1 -1
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +2 -13
- package/build/core/environment.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +36 -24
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +100 -17
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/core/middleware/utils/MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/MigrationUtils.js +1 -0
- package/build/core/middleware/utils/MigrationUtils.js.map +1 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +3 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.d.ts +1 -0
- package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +37 -1
- package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
- package/build/core/middleware/utils/migrationContext.d.ts +1 -0
- package/build/core/middleware/utils/migrationContext.d.ts.map +1 -1
- package/build/core/middleware/utils/migrationContext.js +1 -0
- package/build/core/middleware/utils/migrationContext.js.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts +8 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.js +28 -3
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/core/question.d.ts +7 -1
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +178 -88
- package/build/core/question.js.map +1 -1
- package/build/error/arm.d.ts +6 -0
- package/build/error/arm.d.ts.map +1 -1
- package/build/error/arm.js +17 -1
- package/build/error/arm.js.map +1 -1
- package/build/error/common.d.ts +3 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +14 -1
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.d.ts +1 -1
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +5 -5
- package/build/error/deploy.js.map +1 -1
- package/build/error/upgrade.d.ts +5 -0
- package/build/error/upgrade.d.ts.map +1 -0
- package/build/error/upgrade.js +16 -0
- package/build/error/upgrade.js.map +1 -0
- package/package.json +11 -7
- package/resource/package.nls.json +52 -59
- package/templates/core/v3Migration/csharp.app.local.yml +3 -2
- package/templates/core/v3Migration/csharp.app.yml +16 -7
- package/templates/core/v3Migration/js.ts.app.local.yml +23 -12
- package/templates/core/v3Migration/js.ts.app.yml +30 -14
- package/templates/core/v3Migration/spfx.app.yml +1 -1
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/plugins/resource/aad/auth/V3/Bot/SSO/SsoOperations.cs +23 -8
- package/templates/plugins/resource/aad/auth/V3/Tab/GetUserProfile.razor +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# yaml-language-server: $schema=https://
|
|
1
|
+
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
|
|
2
2
|
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
|
|
3
3
|
# Visit https://aka.ms/teamsfx-actions for details on actions
|
|
4
4
|
version: 1.0.0
|
|
@@ -75,30 +75,39 @@ deploy:
|
|
|
75
75
|
{{#if activePlugins.fx-resource-bot}}
|
|
76
76
|
{{#if isFunctionBot}}
|
|
77
77
|
# Deploy your application to Azure Functions using the zip deploy feature.
|
|
78
|
-
# For additional details,
|
|
78
|
+
# For additional details, see at https://aka.ms/zip-deploy-to-azure-functions
|
|
79
79
|
- uses: azureFunctions/zipDeploy
|
|
80
80
|
with:
|
|
81
81
|
# deploy base folder
|
|
82
82
|
artifactFolder: bin/Release/net6.0/win-x86/publish
|
|
83
|
-
# The resource id of the cloud resource to be deployed to.
|
|
83
|
+
# The resource id of the cloud resource to be deployed to.
|
|
84
|
+
# This key will be generated by arm/deploy action automatically.
|
|
85
|
+
# You can replace it with your existing Azure Resource id
|
|
86
|
+
# or add it to your environment variable file.
|
|
84
87
|
resourceId: $\{{ {{~placeholderMappings.[state.fx-resource-bot.functionAppResourceId]~}} }}
|
|
85
88
|
{{else}}
|
|
86
89
|
# Deploy your application to Azure App Service using the zip deploy feature.
|
|
87
|
-
# For additional details,
|
|
90
|
+
# For additional details, refer to https://aka.ms/zip-deploy-to-app-services.
|
|
88
91
|
- uses: azureAppService/zipDeploy
|
|
89
92
|
with:
|
|
90
93
|
# deploy base folder
|
|
91
94
|
artifactFolder: bin/Release/net6.0/win-x86/publish
|
|
92
|
-
# The resource id of the cloud resource to be deployed to.
|
|
95
|
+
# The resource id of the cloud resource to be deployed to.
|
|
96
|
+
# This key will be generated by arm/deploy action automatically.
|
|
97
|
+
# You can replace it with your existing Azure Resource id
|
|
98
|
+
# or add it to your environment variable file.
|
|
93
99
|
resourceId: $\{{ {{~placeholderMappings.[state.fx-resource-bot.resourceId]~}} }}
|
|
94
100
|
{{/if}}
|
|
95
101
|
{{else if activePlugins.fx-resource-frontend-hosting}}
|
|
96
102
|
# Deploy your application to Azure App Service using the zip deploy feature.
|
|
97
|
-
# For additional details,
|
|
103
|
+
# For additional details, refer to https://aka.ms/zip-deploy-to-app-services.
|
|
98
104
|
- uses: azureAppService/zipDeploy
|
|
99
105
|
with:
|
|
100
106
|
# deploy base folder
|
|
101
107
|
artifactFolder: bin/Release/net6.0/win-x86/publish
|
|
102
|
-
# The resource id of the cloud resource to be deployed to.
|
|
108
|
+
# The resource id of the cloud resource to be deployed to.
|
|
109
|
+
# This key will be generated by arm/deploy action automatically.
|
|
110
|
+
# You can replace it with your existing Azure Resource id
|
|
111
|
+
# or add it to your environment variable file.
|
|
103
112
|
resourceId: $\{{ {{~placeholderMappings.[state.fx-resource-frontend-hosting.resourceId]~}} }}
|
|
104
113
|
{{/if}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# yaml-language-server: $schema=https://
|
|
1
|
+
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
|
|
2
2
|
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
|
|
3
3
|
# Visit https://aka.ms/teamsfx-actions for details on actions
|
|
4
4
|
version: 1.0.0
|
|
@@ -39,7 +39,8 @@ provision:
|
|
|
39
39
|
botId: BOT_ID
|
|
40
40
|
botPassword: SECRET_BOT_PASSWORD
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
# Create or update the bot registration on dev.botframework.com
|
|
43
|
+
- uses: botFramework/create
|
|
43
44
|
with:
|
|
44
45
|
botId: $\{{BOT_ID}}
|
|
45
46
|
name: $\{{CONFIG__MANIFEST__APPNAME__SHORT}}-bot
|
|
@@ -150,7 +151,8 @@ deploy:
|
|
|
150
151
|
|
|
151
152
|
{{/dotnetCommand}}
|
|
152
153
|
{{#tab}}
|
|
153
|
-
|
|
154
|
+
# Generate runtime environment variables
|
|
155
|
+
- uses: file/createOrUpdateEnvironmentFile
|
|
154
156
|
with:
|
|
155
157
|
target: ./tabs/.env.teamsfx.local
|
|
156
158
|
envs:
|
|
@@ -162,7 +164,8 @@ deploy:
|
|
|
162
164
|
|
|
163
165
|
{{/tab}}
|
|
164
166
|
{{#if bot}}
|
|
165
|
-
|
|
167
|
+
# Generate runtime environment variables
|
|
168
|
+
- uses: file/createOrUpdateEnvironmentFile
|
|
166
169
|
with:
|
|
167
170
|
target: ./bot/.env.teamsfx.local
|
|
168
171
|
envs:
|
|
@@ -171,7 +174,8 @@ deploy:
|
|
|
171
174
|
|
|
172
175
|
{{/if}}
|
|
173
176
|
{{#ssoTab}}
|
|
174
|
-
|
|
177
|
+
# Generate runtime environment variables
|
|
178
|
+
- uses: file/createOrUpdateEnvironmentFile
|
|
175
179
|
with:
|
|
176
180
|
target: ./tabs/.env.teamsfx.local
|
|
177
181
|
envs:
|
|
@@ -184,7 +188,8 @@ deploy:
|
|
|
184
188
|
|
|
185
189
|
{{/ssoTab}}
|
|
186
190
|
{{#if ssoBot}}
|
|
187
|
-
|
|
191
|
+
# Generate runtime environment variables
|
|
192
|
+
- uses: file/createOrUpdateEnvironmentFile
|
|
188
193
|
with:
|
|
189
194
|
target: ./bot/.env.teamsfx.local
|
|
190
195
|
envs:
|
|
@@ -204,7 +209,8 @@ deploy:
|
|
|
204
209
|
|
|
205
210
|
{{/if}}
|
|
206
211
|
{{#if ssoFunction}}
|
|
207
|
-
|
|
212
|
+
# Generate runtime environment variables
|
|
213
|
+
- uses: file/createOrUpdateEnvironmentFile
|
|
208
214
|
with:
|
|
209
215
|
target: ./api/.env.teamsfx.local
|
|
210
216
|
envs:
|
|
@@ -216,7 +222,8 @@ deploy:
|
|
|
216
222
|
|
|
217
223
|
{{/if}}
|
|
218
224
|
{{#npmCommands}}
|
|
219
|
-
|
|
225
|
+
# Run npm command
|
|
226
|
+
- uses: cli/runNpmCommand
|
|
220
227
|
with:
|
|
221
228
|
args: {{args}}
|
|
222
229
|
{{#if workingDirectory}}
|
|
@@ -225,7 +232,8 @@ deploy:
|
|
|
225
232
|
|
|
226
233
|
{{/npmCommands}}
|
|
227
234
|
{{#frontendStart}}
|
|
228
|
-
|
|
235
|
+
# Generate runtime environment variables
|
|
236
|
+
- uses: file/createOrUpdateEnvironmentFile
|
|
229
237
|
with:
|
|
230
238
|
target: ./tabs/.localConfigs
|
|
231
239
|
envs:
|
|
@@ -246,7 +254,8 @@ deploy:
|
|
|
246
254
|
|
|
247
255
|
{{/frontendStart}}
|
|
248
256
|
{{#authStart}}
|
|
249
|
-
|
|
257
|
+
# Generate runtime appsettings to JSON file
|
|
258
|
+
- uses: file/createOrUpdateJsonFile
|
|
250
259
|
with:
|
|
251
260
|
target: {{appsettingsPath}}
|
|
252
261
|
appsettings:
|
|
@@ -261,7 +270,8 @@ deploy:
|
|
|
261
270
|
|
|
262
271
|
{{/authStart}}
|
|
263
272
|
{{#botStart}}
|
|
264
|
-
|
|
273
|
+
# Generate runtime environment variables
|
|
274
|
+
- uses: file/createOrUpdateEnvironmentFile
|
|
265
275
|
with:
|
|
266
276
|
target: ./bot/.localConfigs
|
|
267
277
|
envs:
|
|
@@ -285,7 +295,8 @@ deploy:
|
|
|
285
295
|
|
|
286
296
|
{{/botStart}}
|
|
287
297
|
{{#if backendStart}}
|
|
288
|
-
|
|
298
|
+
# Generate runtime environment variables
|
|
299
|
+
- uses: file/createOrUpdateEnvironmentFile
|
|
289
300
|
with:
|
|
290
301
|
target: ./api/.localConfigs
|
|
291
302
|
envs:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# yaml-language-server: $schema=https://
|
|
1
|
+
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
|
|
2
2
|
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
|
|
3
3
|
# Visit https://aka.ms/teamsfx-actions for details on actions
|
|
4
4
|
version: 1.0.0
|
|
@@ -89,12 +89,14 @@ provision:
|
|
|
89
89
|
# Triggered when 'teamsfx deploy' is executed
|
|
90
90
|
deploy:
|
|
91
91
|
{{#if activePlugins.fx-resource-frontend-hosting}}
|
|
92
|
-
|
|
92
|
+
# Run npm command
|
|
93
|
+
- uses: cli/runNpmCommand
|
|
93
94
|
name: install tab dependencies
|
|
94
95
|
with:
|
|
95
96
|
workingDirectory: tabs
|
|
96
97
|
args: install
|
|
97
|
-
|
|
98
|
+
# Run npm command
|
|
99
|
+
- uses: cli/runNpmCommand
|
|
98
100
|
name: build tab app
|
|
99
101
|
{{#if activePlugins.fx-resource-aad-app-for-teams}}
|
|
100
102
|
env:
|
|
@@ -114,7 +116,10 @@ deploy:
|
|
|
114
116
|
workingDirectory: tabs
|
|
115
117
|
# Deploy base folder. This folder includes manifest files for AAD app and Teams app that should be ignored using the ignoreFile.
|
|
116
118
|
artifactFolder: build
|
|
117
|
-
# The resource id of the cloud resource to be deployed to.
|
|
119
|
+
# The resource id of the cloud resource to be deployed to.
|
|
120
|
+
# This key will be generated by arm/deploy action automatically.
|
|
121
|
+
# You can replace it with your existing Azure Resource id
|
|
122
|
+
# or add it to your environment variable file.
|
|
118
123
|
resourceId: $\{{ {{~placeholderMappings.[state.fx-resource-frontend-hosting.storageResourceId]~}} }}
|
|
119
124
|
{{/if}}
|
|
120
125
|
{{#if activePlugins.fx-resource-bot}}
|
|
@@ -132,37 +137,45 @@ deploy:
|
|
|
132
137
|
args: run build --if-present
|
|
133
138
|
{{/if}}
|
|
134
139
|
# Deploy your application to Azure Functions using the zip deploy feature.
|
|
135
|
-
# For additional details,
|
|
140
|
+
# For additional details, see at https://aka.ms/zip-deploy-to-azure-functions
|
|
136
141
|
- uses: azureFunctions/zipDeploy
|
|
137
142
|
with:
|
|
138
143
|
workingDirectory: bot
|
|
139
144
|
# Deploy base folder
|
|
140
145
|
artifactFolder: .
|
|
141
|
-
#
|
|
146
|
+
# Ignore file location, leave blank will ignore nothing
|
|
142
147
|
ignoreFile: .funcignore
|
|
143
|
-
# The resource id of the cloud resource to be deployed to.
|
|
148
|
+
# The resource id of the cloud resource to be deployed to.
|
|
149
|
+
# This key will be generated by arm/deploy action automatically.
|
|
150
|
+
# You can replace it with your existing Azure Resource id
|
|
151
|
+
# or add it to your environment variable file.
|
|
144
152
|
resourceId: $\{{ {{~botResourceId~}} }}
|
|
145
153
|
{{else}}
|
|
146
|
-
|
|
154
|
+
# Run npm command
|
|
155
|
+
- uses: cli/runNpmCommand
|
|
147
156
|
name: install bot dependencies
|
|
148
157
|
with:
|
|
149
158
|
workingDirectory: bot
|
|
150
159
|
args: install
|
|
151
160
|
{{#if isTypescript}}
|
|
152
|
-
|
|
161
|
+
# Run npm command
|
|
162
|
+
- uses: cli/runNpmCommand
|
|
153
163
|
name: build bot app
|
|
154
164
|
with:
|
|
155
165
|
workingDirectory: bot
|
|
156
166
|
args: run build --if-present
|
|
157
167
|
{{/if}}
|
|
158
168
|
# Deploy your application to Azure App Service using the zip deploy feature.
|
|
159
|
-
# For additional details,
|
|
169
|
+
# For additional details, refer to https://aka.ms/zip-deploy-to-app-services.
|
|
160
170
|
- uses: azureAppService/zipDeploy
|
|
161
171
|
with:
|
|
162
172
|
workingDirectory: bot
|
|
163
173
|
# Deploy base folder.
|
|
164
174
|
artifactFolder: .
|
|
165
|
-
# The resource id of the cloud resource to be deployed to.
|
|
175
|
+
# The resource id of the cloud resource to be deployed to.
|
|
176
|
+
# This key will be generated by arm/deploy action automatically.
|
|
177
|
+
# You can replace it with your existing Azure Resource id
|
|
178
|
+
# or add it to your environment variable file.
|
|
166
179
|
resourceId: $\{{ {{~botResourceId~}} }}
|
|
167
180
|
{{/if}}
|
|
168
181
|
{{/if}}
|
|
@@ -193,15 +206,18 @@ deploy:
|
|
|
193
206
|
args: run build --if-present
|
|
194
207
|
{{/if}}
|
|
195
208
|
# Deploy your application to Azure Functions using the zip deploy feature.
|
|
196
|
-
# For additional details,
|
|
209
|
+
# For additional details, see at https://aka.ms/zip-deploy-to-azure-functions
|
|
197
210
|
- uses: azureFunctions/zipDeploy
|
|
198
211
|
with:
|
|
199
212
|
workingDirectory: api
|
|
200
213
|
# Deploy base folder
|
|
201
214
|
artifactFolder: .
|
|
202
|
-
#
|
|
215
|
+
# Ignore file location, leave blank will ignore nothing
|
|
203
216
|
ignoreFile: .funcignore
|
|
204
|
-
# The resource id of the cloud resource to be deployed to.
|
|
217
|
+
# The resource id of the cloud resource to be deployed to.
|
|
218
|
+
# This key will be generated by arm/deploy action automatically.
|
|
219
|
+
# You can replace it with your existing Azure Resource id
|
|
220
|
+
# or add it to your environment variable file.
|
|
205
221
|
resourceId: $\{{ {{~placeholderMappings.[state.fx-resource-function.functionAppResourceId]~}} }}
|
|
206
222
|
{{/if}}
|
|
207
223
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# yaml-language-server: $schema=https://
|
|
1
|
+
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/1.0.0/yaml.schema.json
|
|
2
2
|
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
|
|
3
3
|
# Visit https://aka.ms/teamsfx-actions for details on actions
|
|
4
4
|
version: 1.0.0
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,22 +1,37 @@
|
|
|
1
1
|
using Microsoft.Bot.Builder;
|
|
2
2
|
using Microsoft.Graph;
|
|
3
|
+
using Microsoft.Kiota.Abstractions.Authentication;
|
|
3
4
|
using Microsoft.TeamsFx.Configuration;
|
|
4
5
|
|
|
5
6
|
namespace {{YOUR_NAMESPACE}}.SSO;
|
|
6
7
|
|
|
8
|
+
public class TokenProvider : IAccessTokenProvider
|
|
9
|
+
{
|
|
10
|
+
private string token { get; set; }
|
|
11
|
+
|
|
12
|
+
public TokenProvider(String token)
|
|
13
|
+
{
|
|
14
|
+
this.token = token;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public Task<string> GetAuthorizationTokenAsync(Uri uri, Dictionary<string, object> additionalAuthenticationContext = default,
|
|
18
|
+
CancellationToken cancellationToken = default)
|
|
19
|
+
{
|
|
20
|
+
// get the token and return it
|
|
21
|
+
return Task.FromResult(this.token);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public AllowedHostsValidator AllowedHostsValidator { get; }
|
|
25
|
+
}
|
|
26
|
+
|
|
7
27
|
public static class SsoOperations
|
|
8
28
|
{
|
|
9
29
|
public static async Task ShowUserInfo(ITurnContext stepContext, string token, BotAuthenticationOptions botAuthOptions)
|
|
10
30
|
{
|
|
11
31
|
await stepContext.SendActivityAsync("Retrieving user information from Microsoft Graph ...");
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token);
|
|
16
|
-
return Task.CompletedTask;
|
|
17
|
-
});
|
|
18
|
-
var graphClient = new GraphServiceClient(authProvider);
|
|
19
|
-
var profile = await graphClient.Me.Request().GetAsync();
|
|
32
|
+
var tokenCredential = new BaseBearerTokenAuthenticationProvider(new TokenProvider(token));
|
|
33
|
+
var graphClient = new GraphServiceClient(tokenCredential);
|
|
34
|
+
var profile = await graphClient.Me.GetAsync();
|
|
20
35
|
await stepContext.SendActivityAsync($"You're logged in as {profile.DisplayName}");
|
|
21
36
|
}
|
|
22
37
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@using System.IO
|
|
2
2
|
@using Azure.Core
|
|
3
3
|
@using Microsoft.Graph
|
|
4
|
+
@using Microsoft.Graph.Models
|
|
4
5
|
@inject TeamsFx teamsfx
|
|
5
6
|
@inject TeamsUserCredential teamsUserCredential
|
|
6
7
|
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
IsLoading = true;
|
|
46
47
|
var graph = GetGraphServiceClient();
|
|
47
48
|
|
|
48
|
-
Profile = await graph.Me.
|
|
49
|
+
Profile = await graph.Me.GetAsync();
|
|
49
50
|
|
|
50
51
|
IsLoading = false;
|
|
51
52
|
ErrorMessage = string.Empty;
|