@microsoft/teamsfx-core 1.9.0 → 1.9.1-alpha.300caa689.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.
Files changed (370) hide show
  1. package/build/common/azure-hosting/azureAppServiceHosting.d.ts +16 -0
  2. package/build/common/azure-hosting/azureAppServiceHosting.d.ts.map +1 -0
  3. package/build/common/azure-hosting/azureAppServiceHosting.js +33 -0
  4. package/build/common/azure-hosting/azureAppServiceHosting.js.map +1 -0
  5. package/build/common/azure-hosting/azureFunctionHosting.d.ts +17 -0
  6. package/build/common/azure-hosting/azureFunctionHosting.d.ts.map +1 -0
  7. package/build/common/azure-hosting/azureFunctionHosting.js +36 -0
  8. package/build/common/azure-hosting/azureFunctionHosting.js.map +1 -0
  9. package/build/common/azure-hosting/azureHosting.d.ts +22 -0
  10. package/build/common/azure-hosting/azureHosting.d.ts.map +1 -0
  11. package/build/common/azure-hosting/azureHosting.js +91 -0
  12. package/build/common/azure-hosting/azureHosting.js.map +1 -0
  13. package/build/common/azure-hosting/azureOps.d.ts +16 -0
  14. package/build/common/azure-hosting/azureOps.d.ts.map +1 -0
  15. package/build/common/azure-hosting/azureOps.js +87 -0
  16. package/build/common/azure-hosting/azureOps.js.map +1 -0
  17. package/build/common/azure-hosting/botServiceHosting.d.ts +7 -0
  18. package/build/common/azure-hosting/botServiceHosting.d.ts.map +1 -0
  19. package/build/common/azure-hosting/botServiceHosting.js +16 -0
  20. package/build/common/azure-hosting/botServiceHosting.js.map +1 -0
  21. package/build/common/azure-hosting/hostingConstant.d.ts +45 -0
  22. package/build/common/azure-hosting/hostingConstant.d.ts.map +1 -0
  23. package/build/common/azure-hosting/hostingConstant.js +85 -0
  24. package/build/common/azure-hosting/hostingConstant.js.map +1 -0
  25. package/build/common/azure-hosting/hostingError.d.ts +47 -0
  26. package/build/common/azure-hosting/hostingError.d.ts.map +1 -0
  27. package/build/common/azure-hosting/hostingError.js +83 -0
  28. package/build/common/azure-hosting/hostingError.js.map +1 -0
  29. package/build/common/azure-hosting/hostingFactory.d.ts +6 -0
  30. package/build/common/azure-hosting/hostingFactory.d.ts.map +1 -0
  31. package/build/common/azure-hosting/hostingFactory.js +24 -0
  32. package/build/common/azure-hosting/hostingFactory.js.map +1 -0
  33. package/build/common/azure-hosting/interfaces.d.ts +39 -0
  34. package/build/common/azure-hosting/interfaces.d.ts.map +1 -0
  35. package/build/common/azure-hosting/interfaces.js +12 -0
  36. package/build/common/azure-hosting/interfaces.js.map +1 -0
  37. package/build/common/azure-hosting/utils.d.ts +7 -0
  38. package/build/common/azure-hosting/utils.d.ts.map +1 -0
  39. package/build/common/azure-hosting/utils.js +86 -0
  40. package/build/common/azure-hosting/utils.js.map +1 -0
  41. package/build/common/constants.d.ts +6 -0
  42. package/build/common/constants.d.ts.map +1 -1
  43. package/build/common/constants.js +8 -1
  44. package/build/common/constants.js.map +1 -1
  45. package/build/common/featureFlags.d.ts +1 -0
  46. package/build/common/featureFlags.d.ts.map +1 -1
  47. package/build/common/featureFlags.js +5 -1
  48. package/build/common/featureFlags.js.map +1 -1
  49. package/build/common/projectSettingsHelper.d.ts +2 -1
  50. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  51. package/build/common/projectSettingsHelper.js +19 -2
  52. package/build/common/projectSettingsHelper.js.map +1 -1
  53. package/build/common/template-utils/templatesUtils.d.ts +1 -1
  54. package/build/common/template-utils/templatesUtils.d.ts.map +1 -1
  55. package/build/common/template-utils/templatesUtils.js +9 -2
  56. package/build/common/template-utils/templatesUtils.js.map +1 -1
  57. package/build/common/templates-config.json +2 -2
  58. package/build/common/tools.d.ts +5 -0
  59. package/build/common/tools.d.ts.map +1 -1
  60. package/build/common/tools.js +17 -1
  61. package/build/common/tools.js.map +1 -1
  62. package/build/component/bicep.d.ts +8 -0
  63. package/build/component/bicep.d.ts.map +1 -0
  64. package/build/component/bicep.js +107 -0
  65. package/build/component/bicep.js.map +1 -0
  66. package/build/component/botCode.d.ts +13 -0
  67. package/build/component/botCode.d.ts.map +1 -0
  68. package/build/component/botCode.js +138 -0
  69. package/build/component/botCode.js.map +1 -0
  70. package/build/component/connection.d.ts +8 -0
  71. package/build/component/connection.d.ts.map +1 -0
  72. package/build/component/connection.js +84 -0
  73. package/build/component/connection.js.map +1 -0
  74. package/build/component/core.d.ts +43 -0
  75. package/build/component/core.d.ts.map +1 -0
  76. package/build/component/core.js +714 -0
  77. package/build/component/core.js.map +1 -0
  78. package/build/component/debugManager.d.ts +8 -0
  79. package/build/component/debugManager.d.ts.map +1 -0
  80. package/build/component/debugManager.js +57 -0
  81. package/build/component/debugManager.js.map +1 -0
  82. package/build/component/envManager.d.ts +7 -0
  83. package/build/component/envManager.d.ts.map +1 -0
  84. package/build/component/envManager.js +140 -0
  85. package/build/component/envManager.js.map +1 -0
  86. package/build/component/projectSettingsManager.d.ts +10 -0
  87. package/build/component/projectSettingsManager.d.ts.map +1 -0
  88. package/build/component/projectSettingsManager.js +72 -0
  89. package/build/component/projectSettingsManager.js.map +1 -0
  90. package/build/component/resource/aad.d.ts +11 -0
  91. package/build/component/resource/aad.d.ts.map +1 -0
  92. package/build/component/resource/aad.js +82 -0
  93. package/build/component/resource/aad.js.map +1 -0
  94. package/build/component/resource/azureFunction.d.ts +19 -0
  95. package/build/component/resource/azureFunction.d.ts.map +1 -0
  96. package/build/component/resource/azureFunction.js +81 -0
  97. package/build/component/resource/azureFunction.js.map +1 -0
  98. package/build/component/resource/azureSql.d.ts +24 -0
  99. package/build/component/resource/azureSql.d.ts.map +1 -0
  100. package/build/component/resource/azureSql.js +101 -0
  101. package/build/component/resource/azureSql.js.map +1 -0
  102. package/build/component/resource/azureStorage.d.ts +16 -0
  103. package/build/component/resource/azureStorage.d.ts.map +1 -0
  104. package/build/component/resource/azureStorage.js +102 -0
  105. package/build/component/resource/azureStorage.js.map +1 -0
  106. package/build/component/resource/azureWebApp.d.ts +23 -0
  107. package/build/component/resource/azureWebApp.d.ts.map +1 -0
  108. package/build/component/resource/azureWebApp.js +95 -0
  109. package/build/component/resource/azureWebApp.js.map +1 -0
  110. package/build/component/resource/botService.d.ts +22 -0
  111. package/build/component/resource/botService.d.ts.map +1 -0
  112. package/build/component/resource/botService.js +208 -0
  113. package/build/component/resource/botService.js.map +1 -0
  114. package/build/component/resource/index.d.ts +17 -0
  115. package/build/component/resource/index.d.ts.map +1 -0
  116. package/build/component/resource/index.js +25 -0
  117. package/build/component/resource/index.js.map +1 -0
  118. package/build/component/resource/spfx.d.ts +9 -0
  119. package/build/component/resource/spfx.d.ts.map +1 -0
  120. package/build/component/resource/spfx.js +46 -0
  121. package/build/component/resource/spfx.js.map +1 -0
  122. package/build/component/resource/teamsManifest.d.ts +19 -0
  123. package/build/component/resource/teamsManifest.d.ts.map +1 -0
  124. package/build/component/resource/teamsManifest.js +135 -0
  125. package/build/component/resource/teamsManifest.js.map +1 -0
  126. package/build/component/utils.d.ts +18 -0
  127. package/build/component/utils.d.ts.map +1 -0
  128. package/build/component/utils.js +354 -0
  129. package/build/component/utils.js.map +1 -0
  130. package/build/component/workflow.d.ts +21 -0
  131. package/build/component/workflow.d.ts.map +1 -0
  132. package/build/component/workflow.js +440 -0
  133. package/build/component/workflow.js.map +1 -0
  134. package/build/core/FxCore.d.ts +2 -2
  135. package/build/core/FxCore.d.ts.map +1 -1
  136. package/build/core/FxCore.js +36 -91
  137. package/build/core/FxCore.js.map +1 -1
  138. package/build/core/collaborator.d.ts.map +1 -1
  139. package/build/core/collaborator.js +2 -1
  140. package/build/core/collaborator.js.map +1 -1
  141. package/build/core/middleware/questionModel.d.ts.map +1 -1
  142. package/build/core/middleware/questionModel.js +65 -20
  143. package/build/core/middleware/questionModel.js.map +1 -1
  144. package/build/core/middleware/questionModelV3.d.ts +6 -0
  145. package/build/core/middleware/questionModelV3.d.ts.map +1 -0
  146. package/build/core/middleware/questionModelV3.js +83 -0
  147. package/build/core/middleware/questionModelV3.js.map +1 -0
  148. package/build/core/question.d.ts +6 -0
  149. package/build/core/question.d.ts.map +1 -1
  150. package/build/core/question.js +42 -1
  151. package/build/core/question.js.map +1 -1
  152. package/build/plugins/resource/apiconnector/index.d.ts.map +1 -1
  153. package/build/plugins/resource/apiconnector/index.js +3 -1
  154. package/build/plugins/resource/apiconnector/index.js.map +1 -1
  155. package/build/plugins/resource/appstudio/constants.d.ts +0 -2
  156. package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
  157. package/build/plugins/resource/appstudio/constants.js +0 -2
  158. package/build/plugins/resource/appstudio/constants.js.map +1 -1
  159. package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
  160. package/build/plugins/resource/appstudio/index.js +27 -18
  161. package/build/plugins/resource/appstudio/index.js.map +1 -1
  162. package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
  163. package/build/plugins/resource/appstudio/plugin.js +2 -2
  164. package/build/plugins/resource/appstudio/plugin.js.map +1 -1
  165. package/build/plugins/resource/bot/appStudio/appStudio.d.ts +4 -0
  166. package/build/plugins/resource/bot/appStudio/appStudio.d.ts.map +1 -1
  167. package/build/plugins/resource/bot/appStudio/appStudio.js +14 -3
  168. package/build/plugins/resource/bot/appStudio/appStudio.js.map +1 -1
  169. package/build/plugins/resource/bot/constants.d.ts +2 -70
  170. package/build/plugins/resource/bot/constants.d.ts.map +1 -1
  171. package/build/plugins/resource/bot/constants.js +9 -85
  172. package/build/plugins/resource/bot/constants.js.map +1 -1
  173. package/build/plugins/resource/bot/dotnet/constants.d.ts +5 -0
  174. package/build/plugins/resource/bot/dotnet/constants.d.ts.map +1 -1
  175. package/build/plugins/resource/bot/dotnet/constants.js +7 -1
  176. package/build/plugins/resource/bot/dotnet/constants.js.map +1 -1
  177. package/build/plugins/resource/bot/dotnet/errors.d.ts +5 -0
  178. package/build/plugins/resource/bot/dotnet/errors.d.ts.map +1 -0
  179. package/build/plugins/resource/bot/dotnet/errors.js +21 -0
  180. package/build/plugins/resource/bot/dotnet/errors.js.map +1 -0
  181. package/build/plugins/resource/bot/dotnet/plugin.d.ts +1 -0
  182. package/build/plugins/resource/bot/dotnet/plugin.d.ts.map +1 -1
  183. package/build/plugins/resource/bot/dotnet/plugin.js +28 -0
  184. package/build/plugins/resource/bot/dotnet/plugin.js.map +1 -1
  185. package/build/plugins/resource/bot/errors.d.ts +1 -16
  186. package/build/plugins/resource/bot/errors.d.ts.map +1 -1
  187. package/build/plugins/resource/bot/errors.js +8 -38
  188. package/build/plugins/resource/bot/errors.js.map +1 -1
  189. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.d.ts.map +1 -1
  190. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js +7 -7
  191. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js.map +1 -1
  192. package/build/plugins/resource/bot/functionsHostedBot/plugin.d.ts.map +1 -1
  193. package/build/plugins/resource/bot/functionsHostedBot/plugin.js +16 -16
  194. package/build/plugins/resource/bot/functionsHostedBot/plugin.js.map +1 -1
  195. package/build/plugins/resource/bot/index.d.ts +1 -0
  196. package/build/plugins/resource/bot/index.d.ts.map +1 -1
  197. package/build/plugins/resource/bot/index.js +19 -12
  198. package/build/plugins/resource/bot/index.js.map +1 -1
  199. package/build/plugins/resource/bot/languageStrategy.d.ts.map +1 -1
  200. package/build/plugins/resource/bot/languageStrategy.js.map +1 -1
  201. package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
  202. package/build/plugins/resource/bot/plugin.js +19 -24
  203. package/build/plugins/resource/bot/plugin.js.map +1 -1
  204. package/build/plugins/resource/bot/progressBars.d.ts +1 -1
  205. package/build/plugins/resource/bot/progressBars.d.ts.map +1 -1
  206. package/build/plugins/resource/bot/progressBars.js +6 -6
  207. package/build/plugins/resource/bot/progressBars.js.map +1 -1
  208. package/build/plugins/resource/bot/question.d.ts +5 -3
  209. package/build/plugins/resource/bot/question.d.ts.map +1 -1
  210. package/build/plugins/resource/bot/question.js +33 -1
  211. package/build/plugins/resource/bot/question.js.map +1 -1
  212. package/build/plugins/resource/bot/resources/messages.d.ts +0 -14
  213. package/build/plugins/resource/bot/resources/messages.d.ts.map +1 -1
  214. package/build/plugins/resource/bot/resources/messages.js +0 -41
  215. package/build/plugins/resource/bot/resources/messages.js.map +1 -1
  216. package/build/plugins/resource/bot/resources/strings.d.ts +2 -11
  217. package/build/plugins/resource/bot/resources/strings.d.ts.map +1 -1
  218. package/build/plugins/resource/bot/resources/strings.js +2 -15
  219. package/build/plugins/resource/bot/resources/strings.js.map +1 -1
  220. package/build/plugins/resource/bot/utils/common.d.ts +10 -0
  221. package/build/plugins/resource/bot/utils/common.d.ts.map +1 -1
  222. package/build/plugins/resource/bot/utils/common.js +92 -3
  223. package/build/plugins/resource/bot/utils/common.js.map +1 -1
  224. package/build/plugins/resource/bot/v2/common.d.ts +10 -0
  225. package/build/plugins/resource/bot/v2/common.d.ts.map +1 -0
  226. package/build/plugins/resource/bot/v2/common.js +73 -0
  227. package/build/plugins/resource/bot/v2/common.js.map +1 -0
  228. package/build/plugins/resource/bot/v2/enum.d.ts +6 -0
  229. package/build/plugins/resource/bot/v2/enum.d.ts.map +1 -0
  230. package/build/plugins/resource/bot/v2/enum.js +12 -0
  231. package/build/plugins/resource/bot/v2/enum.js.map +1 -0
  232. package/build/plugins/resource/bot/v2/index.d.ts +2 -0
  233. package/build/plugins/resource/bot/v2/index.d.ts.map +1 -1
  234. package/build/plugins/resource/bot/v2/index.js +19 -5
  235. package/build/plugins/resource/bot/v2/index.js.map +1 -1
  236. package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.d.ts +10 -0
  237. package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.d.ts.map +1 -0
  238. package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.js +5 -0
  239. package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.js.map +1 -0
  240. package/build/plugins/resource/bot/v2/mapping.d.ts +7 -0
  241. package/build/plugins/resource/bot/v2/mapping.d.ts.map +1 -0
  242. package/build/plugins/resource/bot/v2/mapping.js +79 -0
  243. package/build/plugins/resource/bot/v2/mapping.js.map +1 -0
  244. package/build/plugins/resource/bot/v2/plugin.d.ts +47 -0
  245. package/build/plugins/resource/bot/v2/plugin.d.ts.map +1 -0
  246. package/build/plugins/resource/bot/v2/plugin.js +308 -0
  247. package/build/plugins/resource/bot/v2/plugin.js.map +1 -0
  248. package/build/plugins/resource/bot/v2/scaffold.d.ts +5 -0
  249. package/build/plugins/resource/bot/v2/scaffold.d.ts.map +1 -0
  250. package/build/plugins/resource/bot/v2/scaffold.js +48 -0
  251. package/build/plugins/resource/bot/v2/scaffold.js.map +1 -0
  252. package/build/plugins/resource/bot/v3/index.d.ts.map +1 -1
  253. package/build/plugins/resource/bot/v3/index.js +7 -11
  254. package/build/plugins/resource/bot/v3/index.js.map +1 -1
  255. package/build/plugins/resource/cicd/plugin.d.ts.map +1 -1
  256. package/build/plugins/resource/cicd/plugin.js +7 -1
  257. package/build/plugins/resource/cicd/plugin.js.map +1 -1
  258. package/build/plugins/resource/frontend/dotnet/constants.d.ts +1 -13
  259. package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -1
  260. package/build/plugins/resource/frontend/dotnet/constants.js +4 -16
  261. package/build/plugins/resource/frontend/dotnet/constants.js.map +1 -1
  262. package/build/plugins/resource/frontend/dotnet/enum.d.ts +0 -10
  263. package/build/plugins/resource/frontend/dotnet/enum.d.ts.map +1 -1
  264. package/build/plugins/resource/frontend/dotnet/enum.js +1 -12
  265. package/build/plugins/resource/frontend/dotnet/enum.js.map +1 -1
  266. package/build/plugins/resource/frontend/dotnet/ops/scaffold.js +2 -2
  267. package/build/plugins/resource/frontend/dotnet/ops/scaffold.js.map +1 -1
  268. package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -1
  269. package/build/plugins/resource/frontend/dotnet/plugin.js +12 -48
  270. package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
  271. package/build/plugins/resource/frontend/dotnet/resources/templateInfo.d.ts +2 -7
  272. package/build/plugins/resource/frontend/dotnet/resources/templateInfo.d.ts.map +1 -1
  273. package/build/plugins/resource/frontend/dotnet/resources/templateInfo.js +5 -31
  274. package/build/plugins/resource/frontend/dotnet/resources/templateInfo.js.map +1 -1
  275. package/build/plugins/resource/frontend/v2/index.d.ts.map +1 -1
  276. package/build/plugins/resource/frontend/v2/index.js +1 -3
  277. package/build/plugins/resource/frontend/v2/index.js.map +1 -1
  278. package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
  279. package/build/plugins/solution/fx-solution/arm.js +5 -7
  280. package/build/plugins/solution/fx-solution/arm.js.map +1 -1
  281. package/build/plugins/solution/fx-solution/constants.d.ts +5 -2
  282. package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
  283. package/build/plugins/solution/fx-solution/constants.js +3 -0
  284. package/build/plugins/solution/fx-solution/constants.js.map +1 -1
  285. package/build/plugins/solution/fx-solution/debug/provisionLocal.js +2 -2
  286. package/build/plugins/solution/fx-solution/question.d.ts +1 -0
  287. package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
  288. package/build/plugins/solution/fx-solution/question.js +7 -1
  289. package/build/plugins/solution/fx-solution/question.js.map +1 -1
  290. package/build/plugins/solution/fx-solution/v2/listCollaborator.d.ts.map +1 -1
  291. package/build/plugins/solution/fx-solution/v2/listCollaborator.js +2 -1
  292. package/build/plugins/solution/fx-solution/v2/listCollaborator.js.map +1 -1
  293. package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
  294. package/build/plugins/solution/fx-solution/v2/provision.js +29 -1
  295. package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
  296. package/build/plugins/solution/fx-solution/v3/constants.d.ts +0 -1
  297. package/build/plugins/solution/fx-solution/v3/constants.d.ts.map +1 -1
  298. package/build/plugins/solution/fx-solution/v3/constants.js +0 -1
  299. package/build/plugins/solution/fx-solution/v3/constants.js.map +1 -1
  300. package/build/plugins/solution/fx-solution/v3/userTask.d.ts.map +1 -1
  301. package/build/plugins/solution/fx-solution/v3/userTask.js +5 -12
  302. package/build/plugins/solution/fx-solution/v3/userTask.js.map +1 -1
  303. package/package.json +8 -3
  304. package/resource/package.nls.json +27 -18
  305. package/templates/bicep/azureSql.parameters.json +4 -0
  306. package/templates/bicep/azureSql.provisionDatabase.module.bicep +15 -0
  307. package/templates/bicep/azureSql.provisionDatabase.orchestration.bicep +5 -0
  308. package/templates/bicep/azureSql.provisionServer.module.bicep +44 -0
  309. package/templates/bicep/azureSql.provisionServer.orchestration.bicep +14 -0
  310. package/templates/bicep/azureWebApp.config.module.bicep +63 -0
  311. package/templates/bicep/azureWebApp.config.orchestration.bicep +12 -0
  312. package/templates/bicep/azureWebApp.parameters.json +4 -0
  313. package/templates/bicep/azureWebApp.provision.module.bicep +50 -0
  314. package/templates/bicep/azureWebApp.provision.orchestration.bicep +18 -0
  315. package/templates/bicep/botService.config.module.bicep +33 -0
  316. package/templates/bicep/botService.config.orchestration.bicep +8 -0
  317. package/templates/bicep/config.bicep +3 -0
  318. package/templates/bicep/main.bicep +18 -0
  319. package/templates/bicep/provision.bicep +2 -0
  320. package/templates/fallback/blazor-base.csharp.default.zip +0 -0
  321. package/templates/fallback/bot.csharp.command-and-response.zip +0 -0
  322. package/templates/fallback/bot.csharp.default.zip +0 -0
  323. package/templates/fallback/bot.csharp.notification-webapi.zip +0 -0
  324. package/templates/fallback/bot.js.command-and-response.zip +0 -0
  325. package/templates/fallback/bot.js.default.zip +0 -0
  326. package/templates/fallback/bot.js.m365.zip +0 -0
  327. package/templates/fallback/bot.js.notification-function-base.zip +0 -0
  328. package/templates/fallback/bot.js.notification-restify.zip +0 -0
  329. package/templates/fallback/bot.js.notification-trigger-http.zip +0 -0
  330. package/templates/fallback/bot.js.notification-trigger-timer.zip +0 -0
  331. package/templates/fallback/bot.ts.command-and-response.zip +0 -0
  332. package/templates/fallback/bot.ts.default.zip +0 -0
  333. package/templates/fallback/bot.ts.m365.zip +0 -0
  334. package/templates/fallback/bot.ts.notification-function-base.zip +0 -0
  335. package/templates/fallback/bot.ts.notification-restify.zip +0 -0
  336. package/templates/fallback/bot.ts.notification-trigger-http.zip +0 -0
  337. package/templates/fallback/bot.ts.notification-trigger-timer.zip +0 -0
  338. package/templates/fallback/bot.ts.notification.zip +0 -0
  339. package/templates/fallback/function-base.js.default.zip +0 -0
  340. package/templates/fallback/function-base.ts.default.zip +0 -0
  341. package/templates/fallback/function-triggers.js.HTTPTrigger.zip +0 -0
  342. package/templates/fallback/function-triggers.ts.HTTPTrigger.zip +0 -0
  343. package/templates/fallback/tab.csharp.default.zip +0 -0
  344. package/templates/fallback/tab.js.default.zip +0 -0
  345. package/templates/fallback/tab.js.m365.zip +0 -0
  346. package/templates/fallback/tab.js.non-sso.zip +0 -0
  347. package/templates/fallback/tab.ts.default.zip +0 -0
  348. package/templates/fallback/tab.ts.m365.zip +0 -0
  349. package/templates/fallback/tab.ts.non-sso.zip +0 -0
  350. package/templates/plugins/resource/aad/auth/bot/js/public/auth-end.html +8 -8
  351. package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +8 -8
  352. package/templates/plugins/resource/hosting/bicep/botFunction/botFunctionConfiguration.template.bicep +71 -0
  353. package/templates/plugins/resource/hosting/bicep/botFunction/botFunctionProvision.template.bicep +99 -0
  354. package/templates/plugins/resource/hosting/bicep/botFunction/config.template.bicep +12 -0
  355. package/templates/plugins/resource/hosting/bicep/botFunction/provision.template.bicep +20 -0
  356. package/templates/plugins/resource/hosting/bicep/botservice/botserviceProvision.template.bicep +34 -0
  357. package/templates/plugins/resource/hosting/bicep/botservice/parameters.json +4 -0
  358. package/templates/plugins/resource/hosting/bicep/botservice/provision.template.bicep +8 -0
  359. package/templates/plugins/resource/hosting/bicep/webapp/config.template.bicep +12 -0
  360. package/templates/plugins/resource/hosting/bicep/webapp/provision.template.bicep +20 -0
  361. package/templates/plugins/resource/hosting/bicep/webapp/webappConfiguration.template.bicep +66 -0
  362. package/templates/plugins/resource/hosting/bicep/webapp/webappProvision.template.bicep +63 -0
  363. package/build/plugins/resource/bot/azureOps.d.ts +0 -14
  364. package/build/plugins/resource/bot/azureOps.d.ts.map +0 -1
  365. package/build/plugins/resource/bot/azureOps.js +0 -140
  366. package/build/plugins/resource/bot/azureOps.js.map +0 -1
  367. package/build/plugins/resource/bot/functionsHostedBot/constants.d.ts +0 -13
  368. package/build/plugins/resource/bot/functionsHostedBot/constants.d.ts.map +0 -1
  369. package/build/plugins/resource/bot/functionsHostedBot/constants.js +0 -20
  370. package/build/plugins/resource/bot/functionsHostedBot/constants.js.map +0 -1
Binary file
Binary file
Binary file
@@ -18,13 +18,13 @@
18
18
  microsoftTeams.initialize();
19
19
  let hashParams = getHashParameters();
20
20
 
21
- if (hashParams["error"]) {
21
+ if (hashParams.get("error")) {
22
22
  // Authentication failed
23
- handleAuthError(hashParams["error"], hashParams);
24
- } else if (hashParams["code"]) {
23
+ handleAuthError(hashParams.get("error"), hashParams);
24
+ } else if (hashParams.get("code")) {
25
25
  // Get the stored state parameter and compare with incoming state
26
26
  let expectedState = localStorage.getItem("state");
27
- if (expectedState !== hashParams["state"]) {
27
+ if (expectedState !== hashParams.get("state")) {
28
28
  // State does not match, report error
29
29
  handleAuthError("StateDoesNotMatch", hashParams);
30
30
  } else {
@@ -37,7 +37,7 @@
37
37
 
38
38
  // Parse hash parameters into key-value pairs
39
39
  function getHashParameters() {
40
- let hashParams = {};
40
+ let hashParams = new Map();
41
41
  location.hash
42
42
  .substr(1)
43
43
  .split("&")
@@ -45,7 +45,7 @@
45
45
  let s = item.split("="),
46
46
  k = s[0],
47
47
  v = s[1] && decodeURIComponent(s[1]);
48
- hashParams[k] = v;
48
+ hashParams.set(k, v);
49
49
  });
50
50
  return hashParams;
51
51
  }
@@ -53,8 +53,8 @@
53
53
  // Show error information
54
54
  function handleAuthError(errorType, errorMessage) {
55
55
  const err = JSON.stringify({
56
- error: errorType,
57
- message: JSON.stringify(errorMessage),
56
+ error: encodeURIComponent(errorType),
57
+ message: encodeURIComponent(JSON.stringify(errorMessage)),
58
58
  });
59
59
  let para = document.createElement("p");
60
60
  let node = document.createTextNode(err);
@@ -18,13 +18,13 @@
18
18
  microsoftTeams.initialize();
19
19
  let hashParams = getHashParameters();
20
20
 
21
- if (hashParams["error"]) {
21
+ if (hashParams.get("error")) {
22
22
  // Authentication failed
23
- handleAuthError(hashParams["error"], hashParams);
24
- } else if (hashParams["code"]) {
23
+ handleAuthError(hashParams.get("error"), hashParams);
24
+ } else if (hashParams.get("code")) {
25
25
  // Get the stored state parameter and compare with incoming state
26
26
  let expectedState = localStorage.getItem("state");
27
- if (expectedState !== hashParams["state"]) {
27
+ if (expectedState !== hashParams.get("state")) {
28
28
  // State does not match, report error
29
29
  handleAuthError("StateDoesNotMatch", hashParams);
30
30
  } else {
@@ -37,7 +37,7 @@
37
37
 
38
38
  // Parse hash parameters into key-value pairs
39
39
  function getHashParameters() {
40
- let hashParams = {};
40
+ let hashParams = new Map();
41
41
  location.hash
42
42
  .substr(1)
43
43
  .split("&")
@@ -45,7 +45,7 @@
45
45
  let s = item.split("="),
46
46
  k = s[0],
47
47
  v = s[1] && decodeURIComponent(s[1]);
48
- hashParams[k] = v;
48
+ hashParams.set(k, v);
49
49
  });
50
50
  return hashParams;
51
51
  }
@@ -53,8 +53,8 @@
53
53
  // Show error information
54
54
  function handleAuthError(errorType, errorMessage) {
55
55
  const err = JSON.stringify({
56
- error: errorType,
57
- message: JSON.stringify(errorMessage),
56
+ error: encodeURIComponent(errorType),
57
+ message: encodeURIComponent(JSON.stringify(errorMessage)),
58
58
  });
59
59
  let para = document.createElement("p");
60
60
  let node = document.createTextNode(err);
@@ -0,0 +1,71 @@
1
+ // Auto generated content, please customize files under provision folder
2
+
3
+ @secure()
4
+ param provisionParameters object
5
+ param provisionOutputs object
6
+ @secure()
7
+ param currentAppSettings object
8
+
9
+ var functionName = split(provisionOutputs.botFunctionOutput.value.botWebAppResourceId, '/')[8]
10
+
11
+ {{#if (contains "fx-resource-aad-app-for-teams" plugins)}}
12
+ var m365ClientId = provisionParameters['m365ClientId']
13
+ {{#if (contains "fx-resource-key-vault" plugins) }}
14
+ var m365ClientSecret = \{{fx-resource-key-vault.References.m365ClientSecretReference}}
15
+ {{else}}
16
+ var m365ClientSecret = provisionParameters['m365ClientSecret']
17
+ {{/if}}
18
+ var m365TenantId = provisionParameters['m365TenantId']
19
+ var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
20
+ {{#if (contains "fx-resource-frontend-hosting" plugins)}}
21
+ {{#if (contains "fx-resource-bot" plugins) }}
22
+ var m365ApplicationIdUri = 'api://${ \{{fx-resource-frontend-hosting.References.domain}} }/botid-${botAadAppClientId}'
23
+ {{/if}}
24
+ {{else}}
25
+ var m365ApplicationIdUri = 'api://botid-${botAadAppClientId}'
26
+ {{/if}}
27
+ {{/if}}
28
+
29
+ {{#if (contains "fx-resource-bot" plugins) }}
30
+ var botAadAppClientId = provisionParameters['botAadAppClientId']
31
+ {{#if (contains "fx-resource-key-vault" plugins) }}
32
+ var botAadAppClientSecret = \{{fx-resource-key-vault.References.botClientSecretReference}}
33
+ {{else}}
34
+ var botAadAppClientSecret = provisionParameters['botAadAppClientSecret']
35
+ {{/if}}
36
+ {{/if}}
37
+
38
+ resource botFunctionSettings 'Microsoft.Web/sites/config@2021-02-01' = {
39
+ name: '${functionName}/appsettings'
40
+ properties: union({
41
+ {{#if (contains "fx-resource-aad-app-for-teams" plugins)}}
42
+ {{#if (contains "dotnet" configs)}}
43
+ TeamsFx__Authentication__ClientId: m365ClientId
44
+ TeamsFx__Authentication__ClientSecret: m365ClientSecret
45
+ TeamsFx__Authentication__OAuthAuthority: m365OauthAuthorityHost
46
+ {{/if}}
47
+ {{#if (contains "node" configs)}}
48
+ INITIATE_LOGIN_ENDPOINT: uri(provisionOutputs.botFunctionOutput.value.siteEndpoint, 'auth-start.html') // The page is used to let users consent required OAuth permissions during bot SSO process
49
+ M365_AUTHORITY_HOST: m365OauthAuthorityHost // AAD authority host
50
+ M365_CLIENT_ID: m365ClientId // Client id of AAD application
51
+ M365_CLIENT_SECRET: m365ClientSecret // Client secret of AAD application
52
+ M365_TENANT_ID: m365TenantId // Tenant id of AAD application
53
+ M365_APPLICATION_ID_URI: m365ApplicationIdUri // Application ID URI of AAD application
54
+ {{/if}}
55
+ {{/if}}
56
+ {{#if (contains "fx-resource-bot" plugins) }}
57
+ BOT_ID: botAadAppClientId // ID of your bot
58
+ BOT_PASSWORD: botAadAppClientSecret // Secret of your bot
59
+ {{/if}}
60
+ {{#if (contains "fx-resource-function" plugins) }}
61
+ API_ENDPOINT: provisionOutputs.functionOutput.value.functionEndpoint // Azure Function endpoint
62
+ {{/if}}
63
+ {{#if (contains "fx-resource-azure-sql" plugins)}}
64
+ SQL_DATABASE_NAME: \{{fx-resource-azure-sql.References.databaseName}} // SQL database name
65
+ SQL_ENDPOINT: \{{fx-resource-azure-sql.References.sqlEndpoint}} // SQL server endpoint
66
+ {{/if}}
67
+ {{#if (contains "fx-resource-identity" plugins)}}
68
+ IDENTITY_ID: \{{fx-resource-identity.References.identityClientId}} // User assigned identity id, the identity is used to access other Azure resources
69
+ {{/if}}
70
+ }, currentAppSettings)
71
+ }
@@ -0,0 +1,99 @@
1
+ @secure()
2
+ param provisionParameters object
3
+ param userAssignedIdentityId string
4
+
5
+ var resourceBaseName = provisionParameters.resourceBaseName
6
+ var serverfarmsName = contains(provisionParameters, 'botServerfarmsName') ? provisionParameters['botServerfarmsName'] : '${resourceBaseName}bot' // Try to read name for App Service Plan from parameters
7
+ var functionSKU = contains(provisionParameters, 'botFunctionAppSKU') ? provisionParameters['botFunctionAppSKU'] : 'B1' // Try to read SKU for Azure Web App from parameters
8
+ var functionAppName = contains(provisionParameters, 'botSitesName') ? provisionParameters['botSitesName'] : '${resourceBaseName}bot' // Try to read name for Azure Web App from parameters
9
+ var storageName = contains(provisionParameters, 'botStorageName') ? provisionParameters['botStorageName'] : '${resourceBaseName}bot' // Try to read name for Azure Storage from parameters
10
+ var storageSku = contains(provisionParameters, 'botStorageSku') ? provisionParameters['botStorageSku'] : 'Standard_LRS' // Try to read SKU for Azure Storage from parameters
11
+
12
+ // Compute resources for your Function App
13
+ resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = {
14
+ kind: 'functionapp'
15
+ location: resourceGroup().location
16
+ name: serverfarmsName
17
+ sku: {
18
+ name: functionSKU
19
+ }
20
+ }
21
+
22
+ // Azure Storage is required when creating Azure Functions instance
23
+ resource storage 'Microsoft.Storage/storageAccounts@2021-06-01' = {
24
+ name: storageName
25
+ kind: 'StorageV2'
26
+ location: resourceGroup().location
27
+ sku: {
28
+ name: storageSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add functionStorageSku property to provisionParameters to override the default value "Standard_LRS".
29
+ }
30
+ }
31
+
32
+ // Function App that hosts your bot
33
+ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
34
+ kind: 'functionapp'
35
+ location: resourceGroup().location
36
+ name: functionAppName
37
+ properties: {
38
+ serverFarmId: serverfarm.id
39
+ keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
40
+ httpsOnly: true
41
+ siteConfig: {
42
+ alwaysOn: true
43
+ appSettings: [
44
+ {
45
+ name: 'AzureWebJobsDashboard'
46
+ value: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${listKeys(storage.id, storage.apiVersion).keys[0].value};EndpointSuffix=${environment().suffixes.storage}' // Azure Functions internal setting
47
+ }
48
+ {
49
+ name: 'AzureWebJobsStorage'
50
+ value: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${listKeys(storage.id, storage.apiVersion).keys[0].value};EndpointSuffix=${environment().suffixes.storage}' // Azure Functions internal setting
51
+ }
52
+ {
53
+ name: 'FUNCTIONS_EXTENSION_VERSION'
54
+ value: '~4' // Use Azure Functions runtime v4
55
+ }
56
+ {
57
+ name: 'FUNCTIONS_WORKER_RUNTIME'
58
+ value: 'node' // Set runtime to NodeJS
59
+ }
60
+ {
61
+ name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'
62
+ value: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${listKeys(storage.id, storage.apiVersion).keys[0].value};EndpointSuffix=${environment().suffixes.storage}' // Azure Functions internal setting
63
+ }
64
+ {
65
+ name: 'WEBSITE_RUN_FROM_PACKAGE'
66
+ value: '1' // Run Azure Functions from a package file
67
+ }
68
+ {
69
+ name: 'WEBSITE_NODE_DEFAULT_VERSION'
70
+ value: '~16' // Set NodeJS version to 16.x
71
+ }
72
+ {{#if (contains "running-on-azure" configs)}}
73
+ {
74
+ name: 'RUNNING_ON_AZURE'
75
+ value: '1'
76
+ }
77
+ {
78
+ name: 'SCM_ZIPDEPLOY_DONOT_PRESERVE_FILETIME'
79
+ value: '1' // Zipdeploy files will always be updated. Detail: https://aka.ms/teamsfx-zipdeploy-donot-preserve-filetime
80
+ }
81
+ {{/if}}
82
+ ]
83
+ ftpsState: 'FtpsOnly'
84
+ }
85
+ }
86
+ identity: {
87
+ type: 'UserAssigned'
88
+ userAssignedIdentities: {
89
+ '${userAssignedIdentityId}': {} // The identity is used to access other Azure resources
90
+ }
91
+ }
92
+ }
93
+
94
+ output functionSKU string = functionSKU
95
+ output functionName string = functionAppName
96
+ output domain string = functionApp.properties.defaultHostName
97
+ output appServicePlanName string = serverfarmsName
98
+ output functionResourceId string = functionApp.id
99
+ output functionEndpoint string = 'https://${functionApp.properties.defaultHostName}'
@@ -0,0 +1,12 @@
1
+ // Get existing app settings for merge
2
+ var botFunctionCurrentAppSettings = list('${provisionOutputs.botFunctionOutput.value.botWebAppResourceId}/config/appsettings', '2021-02-01').properties
3
+
4
+ // Merge TeamsFx configurations to Function resources
5
+ module teamsFxBotFunctionConfig '\{{PluginIdPlaceholder.Configuration.botFunction.path}}' = {
6
+ name: 'addTeamsFxBotFunctionConfiguration'
7
+ params: {
8
+ provisionParameters: provisionParameters
9
+ provisionOutputs: provisionOutputs
10
+ currentAppSettings: botFunctionCurrentAppSettings
11
+ }
12
+ }
@@ -0,0 +1,20 @@
1
+ // Resources for bot
2
+ module botFunctionProvision '\{{PluginIdPlaceholder.Provision.botFunction.path}}' = {
3
+ name: 'botFunctionProvision'
4
+ params: {
5
+ provisionParameters: provisionParameters
6
+ {{#if (contains "fx-resource-identity" plugins)}}
7
+ userAssignedIdentityId: \{{fx-resource-identity.References.identityResourceId}}
8
+ {{/if}}
9
+ }
10
+ }
11
+
12
+ output botFunctionOutput object = {
13
+ teamsFxPluginId: 'PluginIdPlaceholder'
14
+ skuName: botFunctionProvision.outputs.functionSKU
15
+ siteName: botFunctionProvision.outputs.functionName
16
+ validDomain: botFunctionProvision.outputs.domain
17
+ appServicePlanName: botFunctionProvision.outputs.appServicePlanName
18
+ botWebAppResourceId: botFunctionProvision.outputs.functionResourceId
19
+ siteEndpoint: botFunctionProvision.outputs.functionEndpoint
20
+ }
@@ -0,0 +1,34 @@
1
+ @secure()
2
+ param provisionParameters object
3
+ param botEndpoint string
4
+
5
+ var resourceBaseName = provisionParameters.resourceBaseName
6
+ var botAadAppClientId = provisionParameters['botAadAppClientId'] // Read AAD app client id for Azure Bot Service from parameters
7
+ var botServiceName = contains(provisionParameters, 'botServiceName') ? provisionParameters['botServiceName'] : '${resourceBaseName}' // Try to read name for Azure Bot Service from parameters
8
+ var botServiceSku = contains(provisionParameters, 'botServiceSku') ? provisionParameters['botServiceSku'] : 'F0' // Try to read SKU for Azure Bot Service from parameters
9
+ var botDisplayName = contains(provisionParameters, 'botDisplayName') ? provisionParameters['botDisplayName'] : '${resourceBaseName}' // Try to read display name for Azure Bot Service from parameters
10
+
11
+ // Register your web service as a bot with the Bot Framework
12
+ resource botService 'Microsoft.BotService/botServices@2021-03-01' = {
13
+ kind: 'azurebot'
14
+ location: 'global'
15
+ name: botServiceName
16
+ properties: {
17
+ displayName: botDisplayName
18
+ endpoint: uri(botEndpoint, '/api/messages')
19
+ msaAppId: botAadAppClientId
20
+ }
21
+ sku: {
22
+ name: botServiceSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add botServiceSku property to provisionParameters to override the default value "F0".
23
+ }
24
+ }
25
+
26
+ // Connect the bot service to Microsoft Teams
27
+ resource botServiceMsTeamsChannel 'Microsoft.BotService/botServices/channels@2021-03-01' = {
28
+ parent: botService
29
+ location: 'global'
30
+ name: 'MsTeamsChannel'
31
+ properties: {
32
+ channelName: 'MsTeamsChannel'
33
+ }
34
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "botAadAppClientId": "{{state.fx-resource-bot.botId}}",
3
+ "botAadAppClientSecret": "{{state.fx-resource-bot.botPassword}}"
4
+ }
@@ -0,0 +1,8 @@
1
+ // Resources for bot
2
+ module botProvision '\{{fx-resource-bot.Provision.botservice.path}}' = {
3
+ name: 'botProvision'
4
+ params: {
5
+ provisionParameters: provisionParameters
6
+ botEndpoint: \{{fx-resource-bot.References.endpointAsParam}}
7
+ }
8
+ }
@@ -0,0 +1,12 @@
1
+ // Get existing app settings for merge
2
+ var botCurrentAppSettings = list('${provisionOutputs.webAppOutput.value.botWebAppResourceId}/config/appsettings', '2021-02-01').properties
3
+
4
+ // Merge TeamsFx configurations to Bot resources
5
+ module teamsFxBotConfig '\{{PluginIdPlaceholder.Configuration.webapp.path}}' = {
6
+ name: 'addTeamsFxBotConfiguration'
7
+ params: {
8
+ provisionParameters: provisionParameters
9
+ provisionOutputs: provisionOutputs
10
+ currentAppSettings: botCurrentAppSettings
11
+ }
12
+ }
@@ -0,0 +1,20 @@
1
+ // Resources for bot
2
+ module webAppProvision '\{{PluginIdPlaceholder.Provision.webapp.path}}' = {
3
+ name: 'webAppProvision'
4
+ params: {
5
+ provisionParameters: provisionParameters
6
+ {{#if (contains "fx-resource-identity" plugins)}}
7
+ userAssignedIdentityId: \{{fx-resource-identity.References.identityResourceId}}
8
+ {{/if}}
9
+ }
10
+ }
11
+
12
+ output webAppOutput object = {
13
+ teamsFxPluginId: 'PluginIdPlaceholder'
14
+ skuName: webAppProvision.outputs.webAppSKU
15
+ siteName: webAppProvision.outputs.webAppName
16
+ validDomain: webAppProvision.outputs.webAppDomain
17
+ appServicePlanName: webAppProvision.outputs.appServicePlanName
18
+ botWebAppResourceId: webAppProvision.outputs.webAppResourceId
19
+ siteEndpoint: webAppProvision.outputs.webAppEndpoint
20
+ }
@@ -0,0 +1,66 @@
1
+ // Auto generated content, please customize files under provision folder
2
+
3
+ @secure()
4
+ param provisionParameters object
5
+ param provisionOutputs object
6
+ @secure()
7
+ param currentAppSettings object
8
+
9
+ var botWebAppName = split(provisionOutputs.webAppOutput.value.botWebAppResourceId, '/')[8]
10
+
11
+ {{#if (contains "fx-resource-aad-app-for-teams" plugins)}}
12
+ var m365ClientId = provisionParameters['m365ClientId']
13
+
14
+ {{#if (contains "fx-resource-key-vault" plugins) }}
15
+ var m365ClientSecret = \{{fx-resource-key-vault.References.m365ClientSecretReference}}
16
+ {{else}}
17
+ var m365ClientSecret = provisionParameters['m365ClientSecret']
18
+ {{/if}}
19
+
20
+ var m365TenantId = provisionParameters['m365TenantId']
21
+ var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
22
+
23
+ {{#if (contains "fx-resource-frontend-hosting" plugins)}}
24
+ {{#if (contains "fx-resource-bot" plugins) }}
25
+ var m365ApplicationIdUri = 'api://${ \{{fx-resource-frontend-hosting.References.domain}} }/botid-${botId}'
26
+ {{/if}}
27
+ {{else}}
28
+ var m365ApplicationIdUri = 'api://botid-${botId}'
29
+ {{/if}}
30
+ {{/if}}
31
+
32
+ var botAadAppClientId = provisionParameters['botAadAppClientId']
33
+
34
+ {{#if (contains "fx-resource-key-vault" plugins) }}
35
+ var botAadAppClientSecret = \{{fx-resource-key-vault.References.botClientSecretReference}}
36
+ {{else}}
37
+ var botAadAppClientSecret = provisionParameters['botAadAppClientSecret']
38
+ {{/if}}
39
+
40
+ var botId = provisionParameters['botAadAppClientId']
41
+
42
+ resource botWebAppSettings 'Microsoft.Web/sites/config@2021-02-01' = {
43
+ name: '${botWebAppName}/appsettings'
44
+ properties: union({
45
+ {{#if (contains "fx-resource-aad-app-for-teams" plugins)}}
46
+ INITIATE_LOGIN_ENDPOINT: uri(provisionOutputs.webAppOutput.value.siteEndpoint, 'auth-start.html') // The page is used to let users consent required OAuth permissions during bot SSO process
47
+ M365_AUTHORITY_HOST: m365OauthAuthorityHost // AAD authority host
48
+ M365_CLIENT_ID: m365ClientId // Client id of AAD application
49
+ M365_CLIENT_SECRET: m365ClientSecret // Client secret of AAD application
50
+ M365_TENANT_ID: m365TenantId // Tenant id of AAD application
51
+ M365_APPLICATION_ID_URI: m365ApplicationIdUri // Application ID URI of AAD application
52
+ {{/if}}
53
+ BOT_ID: botAadAppClientId // ID of your bot
54
+ BOT_PASSWORD: botAadAppClientSecret // Secret of your bot
55
+ {{#if (contains "fx-resource-function" plugins) }}
56
+ API_ENDPOINT: provisionOutputs.functionOutput.value.functionEndpoint // Azure Function endpoint
57
+ {{/if}}
58
+ {{#if (contains "fx-resource-azure-sql" plugins)}}
59
+ SQL_DATABASE_NAME: \{{fx-resource-azure-sql.References.databaseName}} // SQL database name
60
+ SQL_ENDPOINT: \{{fx-resource-azure-sql.References.sqlEndpoint}} // SQL server endpoint
61
+ {{/if}}
62
+ {{#if (contains "fx-resource-identity" plugins)}}
63
+ IDENTITY_ID: \{{fx-resource-identity.References.identityClientId}} // User assigned identity id, the identity is used to access other Azure resources
64
+ {{/if}}
65
+ }, currentAppSettings)
66
+ }
@@ -0,0 +1,63 @@
1
+ @secure()
2
+ param provisionParameters object
3
+ param userAssignedIdentityId string
4
+
5
+ var resourceBaseName = provisionParameters.resourceBaseName
6
+ var serverfarmsName = contains(provisionParameters, 'botServerfarmsName') ? provisionParameters['botServerfarmsName'] : '${resourceBaseName}bot' // Try to read name for App Service Plan from parameters
7
+ var webAppSKU = contains(provisionParameters, 'botWebAppSKU') ? provisionParameters['botWebAppSKU'] : 'B1' // Try to read SKU for Azure Web App from parameters
8
+ var webAppName = contains(provisionParameters, 'botSitesName') ? provisionParameters['botSitesName'] : '${resourceBaseName}bot' // Try to read name for Azure Web App from parameters
9
+
10
+ // Compute resources for your Web App
11
+ resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = {
12
+ kind: 'app'
13
+ location: resourceGroup().location
14
+ name: serverfarmsName
15
+ sku: {
16
+ name: webAppSKU
17
+ }
18
+ }
19
+
20
+ // Web App that hosts your bot
21
+ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
22
+ kind: 'app'
23
+ location: resourceGroup().location
24
+ name: webAppName
25
+ properties: {
26
+ serverFarmId: serverfarm.id
27
+ keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
28
+ httpsOnly: true
29
+ siteConfig: {
30
+ alwaysOn: true
31
+ appSettings: [
32
+ {
33
+ name: 'SCM_DO_BUILD_DURING_DEPLOYMENT'
34
+ value: 'true' // Execute build steps on your site during deployment
35
+ }
36
+ {{#if (contains "node" configs)}}
37
+ {
38
+ name: 'WEBSITE_NODE_DEFAULT_VERSION'
39
+ value: '~14' // Set NodeJS version to 14.x for your site
40
+ }
41
+ {{/if}}
42
+ {
43
+ name: 'RUNNING_ON_AZURE'
44
+ value: '1'
45
+ }
46
+ ]
47
+ ftpsState: 'FtpsOnly'
48
+ }
49
+ }
50
+ identity: {
51
+ type: 'UserAssigned'
52
+ userAssignedIdentities: {
53
+ '${userAssignedIdentityId}': {} // The identity is used to access other Azure resources
54
+ }
55
+ }
56
+ }
57
+
58
+ output webAppSKU string = webAppSKU
59
+ output webAppName string = webAppName
60
+ output webAppDomain string = webApp.properties.defaultHostName
61
+ output appServicePlanName string = serverfarmsName
62
+ output webAppResourceId string = webApp.id
63
+ output webAppEndpoint string = 'https://${webApp.properties.defaultHostName}'
@@ -1,14 +0,0 @@
1
- /// <reference types="node" />
2
- import { AzureBotService } from "@azure/arm-botservice";
3
- import * as appService from "@azure/arm-appservice";
4
- export declare class AzureOperations {
5
- private static readonly axiosInstance;
6
- static UpdateBotChannelRegistration(botClient: AzureBotService, resourceGroup: string, botChannelRegistrationName: string, msaAppId: string, endpoint: string, displayName?: string): Promise<void>;
7
- static LinkTeamsChannel(botClient: AzureBotService, resourceGroup: string, botChannelRegistrationName: string): Promise<void>;
8
- static CreateOrUpdateAzureWebApp(webSiteMgmtClient: appService.WebSiteManagementClient, resourceGroup: string, siteName: string, siteEnvelope: appService.WebSiteManagementModels.Site, update?: boolean): Promise<any>;
9
- static ListPublishingCredentials(webSiteMgmtClient: appService.WebSiteManagementClient, resourceGroup: string, siteName: string): Promise<any>;
10
- static ZipDeployPackage(zipDeployEndpoint: string, zipBuffer: Buffer, config: any): Promise<string>;
11
- static CheckDeployStatus(location: string, config: any): Promise<void>;
12
- static RestartWebApp(webSiteMgmtClient: appService.WebSiteManagementClient, resourceGroup: string, siteName: string): Promise<void>;
13
- }
14
- //# sourceMappingURL=azureOps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureOps.d.ts","sourceRoot":"","sources":["../../../../src/plugins/resource/bot/azureOps.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AAiBpD,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAkB;WAEnC,4BAA4B,CAC9C,SAAS,EAAE,eAAe,EAC1B,aAAa,EAAE,MAAM,EACrB,0BAA0B,EAAE,MAAM,EAClC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC;WAmBI,gBAAgB,CAClC,SAAS,EAAE,eAAe,EAC1B,aAAa,EAAE,MAAM,EACrB,0BAA0B,EAAE,MAAM,GACjC,OAAO,CAAC,IAAI,CAAC;WA2BI,yBAAyB,CAC3C,iBAAiB,EAAE,UAAU,CAAC,uBAAuB,EACrD,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,UAAU,CAAC,uBAAuB,CAAC,IAAI,EACrD,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,GAAG,CAAC;WA2BK,yBAAyB,CAC3C,iBAAiB,EAAE,UAAU,CAAC,uBAAuB,EACrD,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,GAAG,CAAC;WAkBK,gBAAgB,CAClC,iBAAiB,EAAE,MAAM,EACzB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,GAAG,GACV,OAAO,CAAC,MAAM,CAAC;WAeE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;WAuB/D,aAAa,CAC/B,iBAAiB,EAAE,UAAU,CAAC,uBAAuB,EACrD,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;CAYjB"}