@microsoft/teamsfx-core 1.7.0 → 1.7.1-alpha.266fa3b9f.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 (322) hide show
  1. package/build/common/constants.d.ts +2 -1
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +2 -1
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/featureFlags.d.ts +3 -0
  6. package/build/common/featureFlags.d.ts.map +1 -0
  7. package/build/common/featureFlags.js +24 -0
  8. package/build/common/featureFlags.js.map +1 -0
  9. package/build/common/local/localEnvManager.d.ts +1 -1
  10. package/build/common/local/localEnvManager.d.ts.map +1 -1
  11. package/build/common/local/localEnvManager.js +1 -1
  12. package/build/common/local/localEnvManager.js.map +1 -1
  13. package/build/common/projectSettingsHelper.d.ts +1 -1
  14. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  15. package/build/common/projectSettingsHelper.js +6 -4
  16. package/build/common/projectSettingsHelper.js.map +1 -1
  17. package/build/common/samples-config.json +29 -15
  18. package/build/common/samples.d.ts +1 -1
  19. package/build/common/samples.d.ts.map +1 -1
  20. package/build/common/samples.js +3 -2
  21. package/build/common/samples.js.map +1 -1
  22. package/build/common/telemetry.d.ts +9 -0
  23. package/build/common/telemetry.d.ts.map +1 -1
  24. package/build/common/telemetry.js +9 -0
  25. package/build/common/telemetry.js.map +1 -1
  26. package/build/common/templates-config.json +2 -2
  27. package/build/common/tools.d.ts +4 -3
  28. package/build/common/tools.d.ts.map +1 -1
  29. package/build/common/tools.js +31 -28
  30. package/build/common/tools.js.map +1 -1
  31. package/build/core/FxCore.d.ts +3 -2
  32. package/build/core/FxCore.d.ts.map +1 -1
  33. package/build/core/FxCore.js +69 -13
  34. package/build/core/FxCore.js.map +1 -1
  35. package/build/core/environment.d.ts +1 -1
  36. package/build/core/environment.d.ts.map +1 -1
  37. package/build/core/environment.js +6 -1
  38. package/build/core/environment.js.map +1 -1
  39. package/build/core/error.d.ts +1 -0
  40. package/build/core/error.d.ts.map +1 -1
  41. package/build/core/error.js +5 -1
  42. package/build/core/error.js.map +1 -1
  43. package/build/core/middleware/aadManifestMigration.d.ts +3 -0
  44. package/build/core/middleware/aadManifestMigration.d.ts.map +1 -0
  45. package/build/core/middleware/aadManifestMigration.js +207 -0
  46. package/build/core/middleware/aadManifestMigration.js.map +1 -0
  47. package/build/core/middleware/consolidateLocalRemote.d.ts +2 -0
  48. package/build/core/middleware/consolidateLocalRemote.d.ts.map +1 -1
  49. package/build/core/middleware/consolidateLocalRemote.js +80 -51
  50. package/build/core/middleware/consolidateLocalRemote.js.map +1 -1
  51. package/build/core/middleware/questionModel.d.ts.map +1 -1
  52. package/build/core/middleware/questionModel.js +11 -55
  53. package/build/core/middleware/questionModel.js.map +1 -1
  54. package/build/core/question.d.ts +2 -8
  55. package/build/core/question.d.ts.map +1 -1
  56. package/build/core/question.js +68 -52
  57. package/build/core/question.js.map +1 -1
  58. package/build/core/telemetry.d.ts +23 -0
  59. package/build/core/telemetry.d.ts.map +1 -0
  60. package/build/core/telemetry.js +46 -0
  61. package/build/core/telemetry.js.map +1 -0
  62. package/build/plugins/resource/aad/constants.d.ts +3 -0
  63. package/build/plugins/resource/aad/constants.d.ts.map +1 -1
  64. package/build/plugins/resource/aad/constants.js +3 -0
  65. package/build/plugins/resource/aad/constants.js.map +1 -1
  66. package/build/plugins/resource/aad/errors.d.ts +2 -0
  67. package/build/plugins/resource/aad/errors.d.ts.map +1 -1
  68. package/build/plugins/resource/aad/errors.js +15 -1
  69. package/build/plugins/resource/aad/errors.js.map +1 -1
  70. package/build/plugins/resource/aad/index.d.ts.map +1 -1
  71. package/build/plugins/resource/aad/index.js +4 -0
  72. package/build/plugins/resource/aad/index.js.map +1 -1
  73. package/build/plugins/resource/aad/plugin.d.ts +3 -0
  74. package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
  75. package/build/plugins/resource/aad/plugin.js +105 -19
  76. package/build/plugins/resource/aad/plugin.js.map +1 -1
  77. package/build/plugins/resource/aad/utils/configs.d.ts +2 -1
  78. package/build/plugins/resource/aad/utils/configs.d.ts.map +1 -1
  79. package/build/plugins/resource/aad/utils/configs.js +18 -3
  80. package/build/plugins/resource/aad/utils/configs.js.map +1 -1
  81. package/build/plugins/resource/apiconnector/checker.d.ts +6 -0
  82. package/build/plugins/resource/apiconnector/checker.d.ts.map +1 -0
  83. package/build/plugins/resource/apiconnector/checker.js +54 -0
  84. package/build/plugins/resource/apiconnector/checker.js.map +1 -0
  85. package/build/plugins/resource/apiconnector/config.d.ts +23 -0
  86. package/build/plugins/resource/apiconnector/config.d.ts.map +1 -0
  87. package/build/plugins/resource/apiconnector/config.js +5 -0
  88. package/build/plugins/resource/apiconnector/config.js.map +1 -0
  89. package/build/plugins/resource/apiconnector/constants.d.ts +24 -0
  90. package/build/plugins/resource/apiconnector/constants.d.ts.map +1 -1
  91. package/build/plugins/resource/apiconnector/constants.js +33 -7
  92. package/build/plugins/resource/apiconnector/constants.js.map +1 -1
  93. package/build/plugins/resource/apiconnector/depsHandler.d.ts +12 -0
  94. package/build/plugins/resource/apiconnector/depsHandler.d.ts.map +1 -0
  95. package/build/plugins/resource/apiconnector/depsHandler.js +66 -0
  96. package/build/plugins/resource/apiconnector/depsHandler.js.map +1 -0
  97. package/build/plugins/resource/apiconnector/envHandler.d.ts +3 -2
  98. package/build/plugins/resource/apiconnector/envHandler.d.ts.map +1 -1
  99. package/build/plugins/resource/apiconnector/envHandler.js +35 -25
  100. package/build/plugins/resource/apiconnector/envHandler.js.map +1 -1
  101. package/build/plugins/resource/apiconnector/errors.d.ts +13 -1
  102. package/build/plugins/resource/apiconnector/errors.d.ts.map +1 -1
  103. package/build/plugins/resource/apiconnector/errors.js +19 -7
  104. package/build/plugins/resource/apiconnector/errors.js.map +1 -1
  105. package/build/plugins/resource/apiconnector/index.d.ts.map +1 -1
  106. package/build/plugins/resource/apiconnector/index.js +1 -8
  107. package/build/plugins/resource/apiconnector/index.js.map +1 -1
  108. package/build/plugins/resource/apiconnector/plugin.d.ts +12 -2
  109. package/build/plugins/resource/apiconnector/plugin.d.ts.map +1 -1
  110. package/build/plugins/resource/apiconnector/plugin.js +240 -31
  111. package/build/plugins/resource/apiconnector/plugin.js.map +1 -1
  112. package/build/plugins/resource/apiconnector/questions.d.ts +26 -3
  113. package/build/plugins/resource/apiconnector/questions.d.ts.map +1 -1
  114. package/build/plugins/resource/apiconnector/questions.js +100 -22
  115. package/build/plugins/resource/apiconnector/questions.js.map +1 -1
  116. package/build/plugins/resource/apiconnector/result.d.ts +2 -1
  117. package/build/plugins/resource/apiconnector/result.d.ts.map +1 -1
  118. package/build/plugins/resource/apiconnector/result.js.map +1 -1
  119. package/build/plugins/resource/apiconnector/sampleHandler.d.ts +1 -1
  120. package/build/plugins/resource/apiconnector/sampleHandler.d.ts.map +1 -1
  121. package/build/plugins/resource/apiconnector/sampleHandler.js +7 -3
  122. package/build/plugins/resource/apiconnector/sampleHandler.js.map +1 -1
  123. package/build/plugins/resource/apiconnector/utils.d.ts +18 -20
  124. package/build/plugins/resource/apiconnector/utils.d.ts.map +1 -1
  125. package/build/plugins/resource/apiconnector/utils.js +89 -16
  126. package/build/plugins/resource/apiconnector/utils.js.map +1 -1
  127. package/build/plugins/resource/appstudio/appStudio.d.ts.map +1 -1
  128. package/build/plugins/resource/appstudio/appStudio.js +6 -5
  129. package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
  130. package/build/plugins/resource/appstudio/constants.d.ts +1 -0
  131. package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
  132. package/build/plugins/resource/appstudio/constants.js +23 -1
  133. package/build/plugins/resource/appstudio/constants.js.map +1 -1
  134. package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
  135. package/build/plugins/resource/appstudio/index.js +17 -10
  136. package/build/plugins/resource/appstudio/index.js.map +1 -1
  137. package/build/plugins/resource/appstudio/manifestTemplate.d.ts +2 -2
  138. package/build/plugins/resource/appstudio/manifestTemplate.d.ts.map +1 -1
  139. package/build/plugins/resource/appstudio/manifestTemplate.js +27 -5
  140. package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
  141. package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
  142. package/build/plugins/resource/appstudio/plugin.js +3 -1
  143. package/build/plugins/resource/appstudio/plugin.js.map +1 -1
  144. package/build/plugins/resource/appstudio/v3/index.js +1 -1
  145. package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
  146. package/build/plugins/resource/appstudio/v3/plugin.d.ts.map +1 -1
  147. package/build/plugins/resource/appstudio/v3/plugin.js +5 -0
  148. package/build/plugins/resource/appstudio/v3/plugin.js.map +1 -1
  149. package/build/plugins/resource/bot/azureOps.d.ts +0 -1
  150. package/build/plugins/resource/bot/azureOps.d.ts.map +1 -1
  151. package/build/plugins/resource/bot/azureOps.js +0 -28
  152. package/build/plugins/resource/bot/azureOps.js.map +1 -1
  153. package/build/plugins/resource/bot/clientFactory.d.ts +0 -5
  154. package/build/plugins/resource/bot/clientFactory.d.ts.map +1 -1
  155. package/build/plugins/resource/bot/clientFactory.js +1 -29
  156. package/build/plugins/resource/bot/clientFactory.js.map +1 -1
  157. package/build/plugins/resource/bot/configs/teamsBotConfig.d.ts +1 -0
  158. package/build/plugins/resource/bot/configs/teamsBotConfig.d.ts.map +1 -1
  159. package/build/plugins/resource/bot/configs/teamsBotConfig.js +15 -13
  160. package/build/plugins/resource/bot/configs/teamsBotConfig.js.map +1 -1
  161. package/build/plugins/resource/bot/constants.d.ts +2 -9
  162. package/build/plugins/resource/bot/constants.d.ts.map +1 -1
  163. package/build/plugins/resource/bot/constants.js +1 -8
  164. package/build/plugins/resource/bot/constants.js.map +1 -1
  165. package/build/plugins/resource/bot/errors.d.ts +0 -18
  166. package/build/plugins/resource/bot/errors.d.ts.map +1 -1
  167. package/build/plugins/resource/bot/errors.js +1 -38
  168. package/build/plugins/resource/bot/errors.js.map +1 -1
  169. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.d.ts +1 -1
  170. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.d.ts.map +1 -1
  171. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js +10 -4
  172. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js.map +1 -1
  173. package/build/plugins/resource/bot/functionsHostedBot/plugin.d.ts.map +1 -1
  174. package/build/plugins/resource/bot/functionsHostedBot/plugin.js +2 -6
  175. package/build/plugins/resource/bot/functionsHostedBot/plugin.js.map +1 -1
  176. package/build/plugins/resource/bot/languageStrategy.d.ts.map +1 -1
  177. package/build/plugins/resource/bot/languageStrategy.js +3 -1
  178. package/build/plugins/resource/bot/languageStrategy.js.map +1 -1
  179. package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
  180. package/build/plugins/resource/bot/plugin.js +4 -1
  181. package/build/plugins/resource/bot/plugin.js.map +1 -1
  182. package/build/plugins/resource/bot/question.d.ts +1 -0
  183. package/build/plugins/resource/bot/question.d.ts.map +1 -1
  184. package/build/plugins/resource/bot/question.js +2 -0
  185. package/build/plugins/resource/bot/question.js.map +1 -1
  186. package/build/plugins/resource/frontend/constants.d.ts +4 -0
  187. package/build/plugins/resource/frontend/constants.d.ts.map +1 -1
  188. package/build/plugins/resource/frontend/constants.js +6 -2
  189. package/build/plugins/resource/frontend/constants.js.map +1 -1
  190. package/build/plugins/resource/frontend/dotnet/plugin.js +1 -1
  191. package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
  192. package/build/plugins/resource/frontend/env.js +2 -2
  193. package/build/plugins/resource/frontend/env.js.map +1 -1
  194. package/build/plugins/resource/frontend/ops/deploy.d.ts +3 -5
  195. package/build/plugins/resource/frontend/ops/deploy.d.ts.map +1 -1
  196. package/build/plugins/resource/frontend/ops/deploy.js +41 -7
  197. package/build/plugins/resource/frontend/ops/deploy.js.map +1 -1
  198. package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
  199. package/build/plugins/resource/frontend/plugin.js +5 -6
  200. package/build/plugins/resource/frontend/plugin.js.map +1 -1
  201. package/build/plugins/resource/frontend/resources/errors.d.ts +1 -1
  202. package/build/plugins/resource/frontend/resources/errors.d.ts.map +1 -1
  203. package/build/plugins/resource/frontend/resources/errors.js +4 -4
  204. package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
  205. package/build/plugins/resource/frontend/resources/templateInfo.js +1 -1
  206. package/build/plugins/resource/frontend/resources/templateInfo.js.map +1 -1
  207. package/build/plugins/resource/frontend/utils/progress-helper.d.ts +2 -2
  208. package/build/plugins/resource/frontend/utils/progress-helper.d.ts.map +1 -1
  209. package/build/plugins/resource/frontend/utils/progress-helper.js +4 -4
  210. package/build/plugins/resource/frontend/utils/progress-helper.js.map +1 -1
  211. package/build/plugins/resource/frontend/v3/index.d.ts.map +1 -1
  212. package/build/plugins/resource/frontend/v3/index.js +10 -13
  213. package/build/plugins/resource/frontend/v3/index.js.map +1 -1
  214. package/build/plugins/resource/sql/errors.d.ts.map +1 -1
  215. package/build/plugins/resource/sql/errors.js +29 -29
  216. package/build/plugins/resource/sql/errors.js.map +1 -1
  217. package/build/plugins/resource/sql/sqlClient.d.ts.map +1 -1
  218. package/build/plugins/resource/sql/sqlClient.js +2 -8
  219. package/build/plugins/resource/sql/sqlClient.js.map +1 -1
  220. package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
  221. package/build/plugins/solution/fx-solution/arm.js +15 -9
  222. package/build/plugins/solution/fx-solution/arm.js.map +1 -1
  223. package/build/plugins/solution/fx-solution/constants.d.ts +17 -2
  224. package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
  225. package/build/plugins/solution/fx-solution/constants.js +20 -1
  226. package/build/plugins/solution/fx-solution/constants.js.map +1 -1
  227. package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts.map +1 -1
  228. package/build/plugins/solution/fx-solution/debug/util/launchNext.js +0 -26
  229. package/build/plugins/solution/fx-solution/debug/util/launchNext.js.map +1 -1
  230. package/build/plugins/solution/fx-solution/question.d.ts +5 -3
  231. package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
  232. package/build/plugins/solution/fx-solution/question.js +62 -34
  233. package/build/plugins/solution/fx-solution/question.js.map +1 -1
  234. package/build/plugins/solution/fx-solution/v2/deploy.d.ts.map +1 -1
  235. package/build/plugins/solution/fx-solution/v2/deploy.js +14 -5
  236. package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
  237. package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts +2 -1
  238. package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
  239. package/build/plugins/solution/fx-solution/v2/executeUserTask.js +146 -95
  240. package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
  241. package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
  242. package/build/plugins/solution/fx-solution/v2/getQuestions.js +85 -57
  243. package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
  244. package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
  245. package/build/plugins/solution/fx-solution/v2/provision.js +21 -8
  246. package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
  247. package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
  248. package/build/plugins/solution/fx-solution/v2/utils.js +9 -1
  249. package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
  250. package/package.json +5 -4
  251. package/resource/package.nls.json +133 -64
  252. package/resource/unify-config-change-logs.md +19 -0
  253. package/templates/core/README.md +46 -0
  254. package/templates/fallback/blazor-base.csharp.default.zip +0 -0
  255. package/templates/fallback/bot.csharp.default.zip +0 -0
  256. package/templates/fallback/bot.js.command-and-response.zip +0 -0
  257. package/templates/fallback/bot.js.default.zip +0 -0
  258. package/templates/fallback/{bot-msgext.js.default.zip → bot.js.m365.zip} +0 -0
  259. package/templates/fallback/bot.js.notification-function-base.zip +0 -0
  260. package/templates/fallback/bot.js.notification-restify.zip +0 -0
  261. package/templates/fallback/bot.js.notification-trigger-http.zip +0 -0
  262. package/templates/fallback/bot.js.notification-trigger-timer.zip +0 -0
  263. package/templates/fallback/bot.ts.command-and-response.zip +0 -0
  264. package/templates/fallback/bot.ts.default.zip +0 -0
  265. package/templates/fallback/{bot-msgext.ts.default.zip → bot.ts.m365.zip} +0 -0
  266. package/templates/fallback/bot.ts.notification-function-base.zip +0 -0
  267. package/templates/fallback/bot.ts.notification-restify.zip +0 -0
  268. package/templates/fallback/bot.ts.notification-trigger-http.zip +0 -0
  269. package/templates/fallback/bot.ts.notification-trigger-timer.zip +0 -0
  270. package/templates/fallback/bot.ts.notification.zip +0 -0
  271. package/templates/fallback/function-base.js.default.zip +0 -0
  272. package/templates/fallback/function-base.ts.default.zip +0 -0
  273. package/templates/fallback/function-triggers.js.HTTPTrigger.zip +0 -0
  274. package/templates/fallback/function-triggers.ts.HTTPTrigger.zip +0 -0
  275. package/templates/fallback/tab.csharp.default.zip +0 -0
  276. package/templates/fallback/tab.js.default.zip +0 -0
  277. package/templates/fallback/tab.js.m365.zip +0 -0
  278. package/templates/fallback/tab.js.non-sso.zip +0 -0
  279. package/templates/fallback/tab.ts.default.zip +0 -0
  280. package/templates/fallback/tab.ts.m365.zip +0 -0
  281. package/templates/fallback/tab.ts.non-sso.zip +0 -0
  282. package/templates/plugins/resource/aad/auth/bot/README.md +63 -0
  283. package/templates/plugins/resource/aad/auth/bot/js/public/auth-end.html +65 -0
  284. package/templates/plugins/resource/aad/auth/bot/js/public/auth-start.html +177 -0
  285. package/templates/plugins/resource/aad/auth/bot/js/sso/showUserInfo.js +19 -0
  286. package/templates/plugins/resource/aad/auth/bot/js/sso/ssoDialog.js +173 -0
  287. package/templates/plugins/resource/aad/auth/bot/js/sso/teamsSsoBot.js +55 -0
  288. package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +65 -0
  289. package/templates/plugins/resource/aad/auth/bot/ts/public/auth-start.html +177 -0
  290. package/templates/plugins/resource/aad/auth/bot/ts/sso/showUserInfo.ts +24 -0
  291. package/templates/plugins/resource/aad/auth/bot/ts/sso/ssoDialog.ts +182 -0
  292. package/templates/plugins/resource/aad/auth/bot/ts/sso/teamsSsoBot.ts +69 -0
  293. package/templates/plugins/resource/aad/auth/tab/README.md +49 -0
  294. package/templates/plugins/resource/aad/auth/tab/js/public/auth-end.html +58 -0
  295. package/templates/plugins/resource/aad/auth/tab/js/public/auth-start.html +57 -0
  296. package/templates/plugins/resource/aad/auth/tab/js/sso/GetUserProfile.jsx +34 -0
  297. package/templates/plugins/resource/aad/auth/tab/ts/public/auth-end.html +58 -0
  298. package/templates/plugins/resource/aad/auth/tab/ts/public/auth-start.html +57 -0
  299. package/templates/plugins/resource/aad/auth/tab/ts/sso/GetUserProfile.tsx +34 -0
  300. package/templates/plugins/resource/aad/manifest/aad.template.json +1 -14
  301. package/templates/plugins/resource/apiconnector/package.json +6 -0
  302. package/templates/plugins/resource/apiconnector/sample/{ts/api-connector.template → comment.template} +13 -14
  303. package/templates/plugins/resource/apiconnector/sample/js/aad.template +26 -0
  304. package/templates/plugins/resource/apiconnector/sample/js/apiKey.template +19 -0
  305. package/templates/plugins/resource/apiconnector/sample/js/basic.template +14 -0
  306. package/templates/plugins/resource/apiconnector/sample/js/cert.template +15 -0
  307. package/templates/plugins/resource/apiconnector/sample/js/custom.template +39 -0
  308. package/templates/plugins/resource/apiconnector/sample/ts/aad.template +31 -0
  309. package/templates/plugins/resource/apiconnector/sample/ts/apiKey.template +16 -0
  310. package/templates/plugins/resource/apiconnector/sample/ts/basic.template +14 -0
  311. package/templates/plugins/resource/apiconnector/sample/ts/cert.template +17 -0
  312. package/templates/plugins/resource/apiconnector/sample/ts/custom.template +42 -0
  313. package/templates/plugins/resource/bot/bicep/botProvision.template.bicep +9 -0
  314. package/templates/plugins/resource/bot/bicep/funcHostedBotProvision.template.bicep +2 -0
  315. package/templates/plugins/resource/function/bicep/functionProvision.template.bicep +2 -0
  316. package/templates/plugins/resource/simpleauth/bicep/simpleAuthProvision.template.bicep +4 -0
  317. package/templates/plugins/resource/webapp/bicep/webappProvision.template.bicep +2 -0
  318. package/templates/core/README-auto-generated.md +0 -31
  319. package/templates/fallback/bot-msgext.csharp.default.zip +0 -0
  320. package/templates/fallback/msgext.js.default.zip +0 -0
  321. package/templates/fallback/msgext.ts.default.zip +0 -0
  322. package/templates/plugins/resource/apiconnector/sample/js/api-connector.template +0 -30
@@ -0,0 +1,58 @@
1
+ <!--This file is added by us when enable SSO. Developers can use it directly, or reference this sample to create their own auth end page.-->
2
+
3
+
4
+ <!--This file is used during the Teams authentication flow to assist with retrieval of the access token.-->
5
+ <!--If you're not familiar with this, do not alter or remove this file from your project.-->
6
+ <html>
7
+ <head>
8
+ <title>Login End Page</title>
9
+ <meta charset="utf-8" />
10
+ </head>
11
+
12
+ <body>
13
+ <script
14
+ src="https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js"
15
+ integrity="sha384-mhp2E+BLMiZLe7rDIzj19WjgXJeI32NkPvrvvZBrMi5IvWup/1NUfS5xuYN5S3VT"
16
+ crossorigin="anonymous"
17
+ ></script>
18
+ <script
19
+ type="text/javascript"
20
+ src="https://alcdn.msauth.net/browser/2.21.0/js/msal-browser.min.js"
21
+ integrity="sha384-s/NxjjAgw1QgpDhOlVjTceLl4axrp5nqpUbCPOEQy1PqbFit9On6uw2XmEF1eq0s"
22
+ crossorigin="anonymous">
23
+ </script>
24
+ <script type="text/javascript">
25
+ var currentURL = new URL(window.location);
26
+ var clientId = currentURL.searchParams.get("clientId");
27
+
28
+ microsoftTeams.initialize();
29
+ microsoftTeams.getContext(async function (context) {
30
+ const msalConfig = {
31
+ auth: {
32
+ clientId: clientId,
33
+ authority: `https://login.microsoftonline.com/${context.tid}`,
34
+ navigateToLoginRequestUrl: false
35
+ },
36
+ cache: {
37
+ cacheLocation: "sessionStorage",
38
+ },
39
+ }
40
+
41
+ const msalInstance = new window.msal.PublicClientApplication(msalConfig);
42
+ msalInstance.handleRedirectPromise()
43
+ .then((tokenResponse) => {
44
+ if (tokenResponse !== null) {
45
+ microsoftTeams.authentication.notifySuccess(JSON.stringify({
46
+ sessionStorage: sessionStorage
47
+ }));
48
+ } else {
49
+ microsoftTeams.authentication.notifyFailure("Get empty response.");
50
+ }
51
+ })
52
+ .catch((error) => {
53
+ microsoftTeams.authentication.notifyFailure(error);
54
+ });
55
+ })
56
+ </script>
57
+ </body>
58
+ </html>
@@ -0,0 +1,57 @@
1
+ <!--This file is added by us when enable SSO. Developers can use it directly, or reference this sample to create their own auth end page.-->
2
+
3
+
4
+ <!--This file is used during the Teams authentication flow to assist with retrieval of the access token.-->
5
+ <!--If you're not familiar with this, do not alter or remove this file from your project.-->
6
+ <html>
7
+ <head>
8
+ <title>Login Start Page</title>
9
+ <meta charset="utf-8" />
10
+ </head>
11
+
12
+ <body>
13
+ <script
14
+ src="https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js"
15
+ integrity="sha384-mhp2E+BLMiZLe7rDIzj19WjgXJeI32NkPvrvvZBrMi5IvWup/1NUfS5xuYN5S3VT"
16
+ crossorigin="anonymous"
17
+ ></script>
18
+ <script
19
+ type="text/javascript"
20
+ src="https://alcdn.msauth.net/browser/2.21.0/js/msal-browser.min.js"
21
+ integrity="sha384-s/NxjjAgw1QgpDhOlVjTceLl4axrp5nqpUbCPOEQy1PqbFit9On6uw2XmEF1eq0s"
22
+ crossorigin="anonymous">
23
+ </script>
24
+ <script type="text/javascript">
25
+ microsoftTeams.initialize();
26
+
27
+ // Get the tab context, and use the information to navigate to Azure AD login page
28
+ microsoftTeams.getContext(async function (context) {
29
+ // Generate random state string and store it, so we can verify it in the callback
30
+ var currentURL = new URL(window.location);
31
+ var clientId = currentURL.searchParams.get("clientId");
32
+ var scope = currentURL.searchParams.get("scope");
33
+ var loginHint = currentURL.searchParams.get("loginHint");
34
+
35
+ const msalConfig = {
36
+ auth: {
37
+ clientId: clientId,
38
+ authority: `https://login.microsoftonline.com/${context.tid}`,
39
+ navigateToLoginRequestUrl: false
40
+ },
41
+ cache: {
42
+ cacheLocation: "sessionStorage",
43
+ },
44
+ }
45
+
46
+ const msalInstance = new msal.PublicClientApplication(msalConfig);
47
+ const scopesArray = scope.split(" ");
48
+ const scopesRequest = {
49
+ scopes: scopesArray,
50
+ redirectUri: window.location.origin + `/auth-end.html?clientId=${clientId}`,
51
+ loginHint: loginHint
52
+ };
53
+ await msalInstance.loginRedirect(scopesRequest);
54
+ });
55
+ </script>
56
+ </body>
57
+ </html>
@@ -0,0 +1,34 @@
1
+ import { Button } from "@fluentui/react-northstar";
2
+ import { useGraph, useTeamsFx } from "@microsoft/teamsfx-react";
3
+
4
+ export function GetUserProfile() {
5
+ const { teamsfx } = useTeamsFx();
6
+ const { loading, error, data, reload } = useGraph(
7
+ async (graph, teamsfx, scope) => {
8
+ // Call graph api directly to get user profile information
9
+ const profile = await graph.api("/me").get();
10
+
11
+ let photoUrl = "";
12
+ try {
13
+ const photo = await graph.api("/me/photo/$value").get();
14
+ photoUrl = URL.createObjectURL(photo);
15
+ } catch {
16
+ // Could not fetch photo from user's profile, return empty string as placeholder.
17
+ }
18
+ return { profile, photoUrl };
19
+ },
20
+ { scope: ["User.Read"], teamsfx: teamsfx }
21
+ );
22
+
23
+ return (
24
+ <div>
25
+ <h2>GetUserProfile</h2>
26
+ <p>Click below to authorize button to grant permission to using Microsoft Graph.</p>
27
+ <Button primary content="Authorize" disabled={loading} onClick={reload} />
28
+ {!loading && error && (
29
+ <div className="error">Failed to read your profile. Please try again later.</div>
30
+ )}
31
+ {!loading && data && <div>Hello {data.profile.displayName}</div>}
32
+ </div>
33
+ );
34
+ }
@@ -92,18 +92,5 @@
92
92
  "identifierUris": [
93
93
  "{{state.fx-resource-aad-app-for-teams.applicationIdUris}}"
94
94
  ],
95
- "replyUrlsWithType": [
96
- {
97
- "url": "{{state.fx-resource-frontend-hosting.endpoint}}/auth-end.html",
98
- "type": "Web"
99
- },
100
- {
101
- "url": "{{state.fx-resource-frontend-hosting.endpoint}}/auth-end.html?clientId={{state.fx-resource-aad-app-for-teams.clientId}}",
102
- "type": "Spa"
103
- },
104
- {
105
- "url": "{{state.fx-resource-frontend-hosting.endpoint}}/blank-auth-end.html",
106
- "type": "Spa"
107
- }
108
- ]
95
+ "replyUrlsWithType": []
109
96
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": {
3
+ "@microsoft/teamsfx": "0.6.3-alpha.266fa3b9f.0",
4
+ "@microsoft/teams-js": "^1.9.0"
5
+ }
6
+ }
@@ -1,14 +1,3 @@
1
- import { TeamsFx, createApiClient, BasicAuthProvider } from "@microsoft/teamsfx";
2
-
3
- // Loads current app's configuration
4
- const teamsFx = new TeamsFx();
5
- // Initializes a new axios instance to call {{config.APIName}} API
6
- const authProvider = new BasicAuthProvider(
7
- teamsFx.getConfig("API_{{capitalName}}_USERNAME"),
8
- teamsFx.getConfig("API_{{capitalName}}_PASSWORD")
9
- );
10
- const {{config.APIName}}Client = createApiClient(teamsFx.getConfig("API_{{capitalName}}_ENDPOINT"), authProvider);
11
- export { {{config.APIName}}Client };
12
1
 
13
2
  /*
14
3
  You can now call {{config.APIName}} APIs without worrying about authentication.
@@ -22,9 +11,19 @@ You can refer https://aka.ms/teamsfx-connect-api to learn more.
22
11
  Setting API configuration for cloud environment:
23
12
  We have already set the configuration to .env.teamsfx.local based on your answers.
24
13
  Before you deploy your code to cloud using TeamsFx, please follow https://aka.ms/teamsfx-add-appsettings to add following app settings with appropriate value to your Azure environment:
25
- API_{{capitalName}}_ENDPOINT
26
- API_{{capitalName}}_USERNAME
27
- API_{{capitalName}}_PASSWORD
14
+ TEAMSFX_API_{{capitalName}}_ENDPOINT
15
+ {{#if (equals config.AuthConfig.AuthType "basic")}}
16
+ TEAMSFX_API_{{capitalName}}_USERNAME
17
+ TEAMSFX_API_{{capitalName}}_PASSWORD
18
+ {{else if (equals config.AuthConfig.AuthType "aad")}}
19
+ {{#if (equals config.AuthConfig.ReuseTeamsApp false)}}
20
+ TEAMSFX_API_{{capitalName}}_TENANT_ID
21
+ TEAMSFX_API_{{capitalName}}_CLIENT_ID
22
+ TEAMSFX_API_{{capitalName}}_CLIENT_SECRET
23
+ {{/if}}
24
+ {{else if (equals config.AuthConfig.AuthType "apiKey")}}
25
+ TEAMSFX_API_{{capitalName}}_API_KEY
26
+ {{/if}}
28
27
 
29
28
  You can refer https://aka.ms/teamsfx-connet-api to learn more.
30
29
  */
@@ -0,0 +1,26 @@
1
+ const teamsfxSdk = require("@microsoft/teamsfx");
2
+
3
+ // Loads current app's configuration, the sample uses client credential flow to acquire token for your API.
4
+ {{#if (equals config.AuthConfig.ReuseTeamsApp true)}}
5
+ const teamsFx = new teamsfxSdk.TeamsFx(teamsfxSdk.IdentityType.App);
6
+ {{else}}
7
+ const teamsFx = new teamsfxSdk.TeamsFx(teamsfxSdk.IdentityType.App, {
8
+ // You can replace the default authorityHost url with actual value per your requirement.
9
+ authorityHost: "https://login.microsoftonline.com",
10
+ tenantId: process.env.TEAMSFX_API_{{capitalName}}_TENANT_ID,
11
+ clientId: process.env.TEAMSFX_API_{{capitalName}}_CLIENT_ID,
12
+ // Please add your client secret to .env.teamsfx.local before local debugging.
13
+ clientSecret: process.env.TEAMSFX_API_{{capitalName}}_CLIENT_SECRET,
14
+ });
15
+ {{/if}}
16
+ // Initializes a new axios instance to call {{config.APIName}} API.
17
+ const appCredential = teamsFx.getCredential();
18
+ const authProvider = new teamsfxSdk.BearerTokenAuthProvider(
19
+ // Please replace '<your-api-scope>' with actual api scope value.
20
+ async () => (await appCredential.getToken("<your-api-scope>"))?.token
21
+ );
22
+ const {{config.APIName}}Client = teamsfxSdk.createApiClient(
23
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
24
+ authProvider
25
+ );
26
+ export { {{config.APIName}}Client };
@@ -0,0 +1,19 @@
1
+ const teamsfxSdk = require("@microsoft/teamsfx");
2
+
3
+ // Loads current app's configuration.
4
+ const teamsFx = new teamsfxSdk.TeamsFx();
5
+ // Initializes a new axios instance to call {{config.APIName}} API.
6
+ const authProvider = new teamsfxSdk.ApiKeyProvider(
7
+ "{{config.AuthConfig.Name}}",
8
+ teamsFx.getConfig("TEAMSFX_API_FAKE_API_KEY"),
9
+ {{#if (equals config.AuthConfig.Location "request header")}}
10
+ teamsfxSdk.ApiKeyLocation.Header
11
+ {{else}}
12
+ teamsfxSdk.ApiKeyLocation.QueryParams
13
+ {{/if}}
14
+ );
15
+ const {{config.APIName}}Client = teamsfxSdk.createApiClient(
16
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
17
+ authProvider
18
+ );
19
+ export { {{config.APIName}}Client };
@@ -0,0 +1,14 @@
1
+ const teamsfxSdk = require("@microsoft/teamsfx");
2
+
3
+ // Loads current app's configuration.
4
+ const teamsFx = new teamsfxSdk.TeamsFx();
5
+ // Initializes a new axios instance to call {{config.APIName}} API.
6
+ const authProvider = new teamsfxSdk.BasicAuthProvider(
7
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_USERNAME"),
8
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_PASSWORD")
9
+ );
10
+ const {{config.APIName}}Client = teamsfxSdk.createApiClient(
11
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
12
+ authProvider
13
+ );
14
+ export { {{config.APIName}}Client };
@@ -0,0 +1,15 @@
1
+ const teamsfxSdk = require("@microsoft/teamsfx");
2
+
3
+ // Loads current app's configuration.
4
+ const teamsFx = new teamsfxSdk.TeamsFx();
5
+ // Initializes a new axios instance to call {{config.APIName}} API.
6
+ const authProvider = new teamsfxSdk.CertificateAuthProvider(
7
+ // Please add code to read your cert and private key, replace '<your-cert>' and '<your-private-key>' with actual value.
8
+ // If you have a .pfx cert, you can use 'createPfxCertOption' function to initialize your cert option.
9
+ teamsfxSdk.createPemCertOption("<your-cert>", "<your-private-key>")
10
+ );
11
+ const {{config.APIName}}Client = teamsfxSdk.createApiClient(
12
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
13
+ authProvider
14
+ );
15
+ export { {{config.APIName}}Client };
@@ -0,0 +1,39 @@
1
+ const teamsfxSdk = require("@microsoft/teamsfx");
2
+
3
+ // The custom authProvider should implement the AuthProvider interface.
4
+ // Here is a sample authProvider class. It will set custom property in the request header
5
+ class CustomAuthProvider {
6
+ customProperty;
7
+ customValue;
8
+
9
+ constructor(customProperty, customValue) {
10
+ this.customProperty = customProperty;
11
+ this.customValue = customValue;
12
+ }
13
+
14
+ // Replace the sample code with your own logic.
15
+ AddAuthenticationInfo = async (config) => {
16
+ if (!config.headers) {
17
+ config.headers = {};
18
+ }
19
+ config.headers[this.customProperty] = this.customValue;
20
+ return config;
21
+ };
22
+ }
23
+
24
+ // Loads current app's configuration.
25
+ const teamsFx = new teamsfxSdk.TeamsFx();
26
+
27
+ const authProvider = new CustomAuthProvider(
28
+ // You can also add customized settings to .env.teamsfx.local and use TeamsFx.getConfig("{setting_name}") to read the settings. For example:
29
+ // teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_CUSTOM_PROPERTY"),
30
+ // teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_CUSTOM_VALUE")
31
+ "customPropery",
32
+ "customValue"
33
+ );
34
+ // Initializes a new axios instance to call {{config.APIName}} API.
35
+ const {{config.APIName}}Client = teamsfxSdk.createApiClient(
36
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
37
+ authProvider
38
+ );
39
+ export { {{config.APIName}}Client };
@@ -0,0 +1,31 @@
1
+ import {
2
+ TeamsFx,
3
+ createApiClient,
4
+ BearerTokenAuthProvider,
5
+ IdentityType,
6
+ } from "@microsoft/teamsfx";
7
+
8
+ // Loads current app's configuration and use app for auth, the sample uses client credential flow to acquire token for your API.
9
+ {{#if (equals config.AuthConfig.ReuseTeamsApp true)}}
10
+ const teamsFx = new TeamsFx(IdentityType.App);
11
+ {{else}}
12
+ const teamsFx = new TeamsFx(IdentityType.App, {
13
+ // You can replace the default authorityHost url with actual value per your requirement.
14
+ authorityHost: "https://login.microsoftonline.com",
15
+ tenantId: process.env.TEAMSFX_API_{{capitalName}}_TENANT_ID,
16
+ clientId: process.env.TEAMSFX_API_{{capitalName}}_CLIENT_ID,
17
+ // Please add your client secret to .env.teamsfx.local before local debugging.
18
+ clientSecret: process.env.TEAMSFX_API_{{capitalName}}_CLIENT_SECRET,
19
+ });
20
+ {{/if}}
21
+ // Initializes a new axios instance to call {{config.APIName}} API.
22
+ const appCredential = teamsFx.getCredential();
23
+ const authProvider = new BearerTokenAuthProvider(
24
+ // Please replace '<your-api-scope>' with actual api scope value.
25
+ async () => (await appCredential.getToken("<your-api-scope>"))?.token
26
+ );
27
+ const {{config.APIName}}Client = createApiClient(
28
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
29
+ authProvider
30
+ );
31
+ export { {{config.APIName}}Client };
@@ -0,0 +1,16 @@
1
+ import { TeamsFx, createApiClient, ApiKeyProvider, ApiKeyLocation } from "@microsoft/teamsfx";
2
+
3
+ // Loads current app's configuration.
4
+ const teamsFx = new TeamsFx();
5
+ // Initializes a new axios instance to call {{config.APIName}} API.
6
+ const authProvider = new ApiKeyProvider(
7
+ "{{config.AuthConfig.Name}}",
8
+ teamsFx.getConfig("TEAMSFX_API_FAKE_API_KEY"),
9
+ {{#if (equals config.AuthConfig.Location "request header")}}
10
+ ApiKeyLocation.Header
11
+ {{else}}
12
+ ApiKeyLocation.QueryParams
13
+ {{/if}}
14
+ );
15
+ const {{config.APIName}}Client = createApiClient(teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"), authProvider);
16
+ export { {{config.APIName}}Client };
@@ -0,0 +1,14 @@
1
+ import { TeamsFx, createApiClient, BasicAuthProvider } from "@microsoft/teamsfx";
2
+
3
+ // Loads current app's configuration.
4
+ const teamsFx = new TeamsFx();
5
+ // Initializes a new axios instance to call {{config.APIName}} API.
6
+ const authProvider = new BasicAuthProvider(
7
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_USERNAME"),
8
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_PASSWORD")
9
+ );
10
+ const {{config.APIName}}Client = createApiClient(
11
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
12
+ authProvider
13
+ );
14
+ export { {{config.APIName}}Client };
@@ -0,0 +1,17 @@
1
+ import {
2
+ TeamsFx,
3
+ createApiClient,
4
+ CertificateAuthProvider,
5
+ createPemCertOption,
6
+ } from "@microsoft/teamsfx";
7
+
8
+ // Loads current app's configuration.
9
+ const teamsFx = new TeamsFx();
10
+ // Initializes a new axios instance to call {{config.APIName}} API.
11
+ const authProvider = new CertificateAuthProvider(
12
+ // Please add code to read your cert and private key, replace '<your-cert>' and '<your-private-key>' with actual value.
13
+ // If you have a .pfx cert, you can use 'createPfxCertOption' function to initialize your cert option.
14
+ createPemCertOption("<your-cert>", "<your-private-key>")
15
+ );
16
+ const {{config.APIName}}Client = createApiClient(teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"), authProvider);
17
+ export { {{config.APIName}}Client };
@@ -0,0 +1,42 @@
1
+ import { TeamsFx, createApiClient, AuthProvider } from "@microsoft/teamsfx";
2
+ import { AxiosRequestConfig } from "axios";
3
+
4
+ // The custom authProvider should implement the AuthProvider interface.
5
+ // Here is a sample authProvider class. It will set custom property in the request header
6
+ class CustomAuthProvider implements AuthProvider {
7
+ customProperty: string;
8
+ customValue: string;
9
+
10
+ constructor(customProperty: string, customValue: string) {
11
+ this.customProperty = customProperty;
12
+ this.customValue = customValue;
13
+ }
14
+
15
+ // Replace the sample code with your own logic.
16
+ AddAuthenticationInfo: (config: AxiosRequestConfig) => Promise<AxiosRequestConfig> = async (
17
+ config
18
+ ) => {
19
+ if (!config.headers) {
20
+ config.headers = {};
21
+ }
22
+ config.headers[this.customProperty] = this.customValue;
23
+ return config;
24
+ };
25
+ }
26
+
27
+ // Loads current app's configuration.
28
+ const teamsFx = new TeamsFx();
29
+
30
+ const authProvider = new CustomAuthProvider(
31
+ // You can also add customized settings to .env.teamsfx.local and use TeamsFx.getConfig("{setting_name}") to read the settings. For example:
32
+ // teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_CUSTOM_PROPERTY"),
33
+ // teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_CUSTOM_VALUE")
34
+ "customPropery",
35
+ "customValue"
36
+ );
37
+ // Initializes a new axios instance to call {{config.APIName}} API.
38
+ const {{config.APIName}}Client = createApiClient(
39
+ teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
40
+ authProvider
41
+ );
42
+ export { {{config.APIName}}Client };
@@ -8,7 +8,11 @@ var botServiceName = contains(provisionParameters, 'botServiceName') ? provision
8
8
  var botServiceSku = contains(provisionParameters, 'botServiceSku') ? provisionParameters['botServiceSku'] : 'F0' // Try to read SKU for Azure Bot Service from parameters
9
9
  var botDisplayName = contains(provisionParameters, 'botDisplayName') ? provisionParameters['botDisplayName'] : '${resourceBaseName}' // Try to read display name for Azure Bot Service from parameters
10
10
  var serverfarmsName = contains(provisionParameters, 'botServerfarmsName') ? provisionParameters['botServerfarmsName'] : '${resourceBaseName}bot' // Try to read name for App Service Plan from parameters
11
+ {{#if enableAlwaysOn}}
12
+ var webAppSKU = contains(provisionParameters, 'botWebAppSKU') ? provisionParameters['botWebAppSKU'] : 'B1' // Try to read SKU for Azure Web App from parameters
13
+ {{else}}
11
14
  var webAppSKU = contains(provisionParameters, 'botWebAppSKU') ? provisionParameters['botWebAppSKU'] : 'F1' // Try to read SKU for Azure Web App from parameters
15
+ {{/if}}
12
16
  var webAppName = contains(provisionParameters, 'botSitesName') ? provisionParameters['botSitesName'] : '${resourceBaseName}bot' // Try to read name for Azure Web App from parameters
13
17
 
14
18
  // Register your web service as a bot with the Bot Framework
@@ -54,7 +58,11 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
54
58
  properties: {
55
59
  serverFarmId: serverfarm.id
56
60
  keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
61
+ httpsOnly: true
57
62
  siteConfig: {
63
+ {{#if enableAlwaysOn}}
64
+ alwaysOn: true
65
+ {{/if}}
58
66
  appSettings: [
59
67
  {
60
68
  name: 'SCM_DO_BUILD_DURING_DEPLOYMENT'
@@ -69,6 +77,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
69
77
  value: '1'
70
78
  }
71
79
  ]
80
+ ftpsState: 'FtpsOnly'
72
81
  }
73
82
  }
74
83
  identity: {
@@ -56,6 +56,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
56
56
  properties: {
57
57
  serverFarmId: serverfarm.id
58
58
  keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
59
+ httpsOnly: true
59
60
  siteConfig: {
60
61
  alwaysOn: true
61
62
  appSettings: [
@@ -96,6 +97,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
96
97
  value: '1' // Zipdeploy files will always be updated. Detail: https://aka.ms/teamsfx-zipdeploy-donot-preserve-filetime
97
98
  }
98
99
  ]
100
+ ftpsState: 'FtpsOnly'
99
101
  }
100
102
  }
101
103
  identity: {
@@ -27,6 +27,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
27
27
  properties: {
28
28
  serverFarmId: serverfarms.id
29
29
  keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
30
+ httpsOnly: true
30
31
  siteConfig: {
31
32
  appSettings: [
32
33
  {
@@ -58,6 +59,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
58
59
  value: '~14' // Set NodeJS version to 14.x
59
60
  }
60
61
  ]
62
+ ftpsState: 'FtpsOnly'
61
63
  }
62
64
  }
63
65
  identity: {
@@ -25,6 +25,10 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
25
25
  properties: {
26
26
  serverFarmId: serverFarms.id
27
27
  keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
28
+ httpsOnly: true
29
+ siteConfig:{
30
+ ftpsState: 'FtpsOnly'
31
+ }
28
32
  }
29
33
  identity: {
30
34
  type: 'UserAssigned'
@@ -23,6 +23,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
23
23
  properties: {
24
24
  serverFarmId: serverFarms.id
25
25
  keyVaultReferenceIdentity: userAssignedIdentityId
26
+ httpsOnly: true
26
27
  siteConfig: {
27
28
  appSettings: [
28
29
  {
@@ -30,6 +31,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
30
31
  value: '1'
31
32
  }
32
33
  ]
34
+ ftpsState: 'FtpsOnly'
33
35
  }
34
36
  }
35
37
  identity: {
@@ -1,31 +0,0 @@
1
- # TeamsFx Project
2
-
3
- ## Take a tour of your app source code
4
-
5
- After initializing the project, you can view the project folders and files in the Explorer area of Visual Studio Code after the Teams Toolkit registers and configures your app. The following table lists all the scaffolded folder and files by Teams Toolkit:
6
-
7
- | File name | Contents |
8
- |- | -|
9
- |`.fx/configs/config.local.json`| Configuration file for local environment |
10
- |`.fx/configs/config.dev.json`| Configuration file for dev environment |
11
- |`.fx/configs/projectSettings.json`| Global project settings, which apply to all environments |
12
- |`templates/appPackage/manifest.template.json`|Teams app manifest template|
13
- |`templates/appPackage/resources`|Teams app's icon referenced by manifest template|
14
-
15
-
16
- ## Add components
17
-
18
- Now you're able to add components with Teams Toolkit to build Teams app for below scenarios.
19
-
20
- ### Scenario 1: Send Notification to Teams
21
-
22
- Sending a message in response to stimulus tasks through conversations. Please refer to [our wiki](https://github.com/OfficeDev/TeamsFx/wiki/Incremental-Build#scenario-1-send-notification-to-teams) for instructions.
23
-
24
- ### Scenario 2: Build Command And Response
25
-
26
- Running simple and repetitive automated tasks through conversations. Please refer to [our wiki](https://github.com/OfficeDev/TeamsFx/wiki/Incremental-Build#scenario-2-build-command-and-response) for instructions.
27
-
28
-
29
- ### Scenario 3: Embed your existing web pages in Teams
30
-
31
- Integrate with your existing web page application to build a Teams app. Please refer to [our wiki](https://github.com/OfficeDev/TeamsFx/wiki/Incremental-Build#scenario-3-embed-your-existing-web-pages-in-teams) for instructions.
@@ -1,30 +0,0 @@
1
- const teamsfxSdk = require("@microsoft/teamsfx");
2
-
3
- // Loads current app's configuration
4
- const teamsFx = new teamsfxSdk.TeamsFx();
5
- // Initializes a new axios instance to call {{config.APIName}} API
6
- const authProvider = new teamsfxSdk.BasicAuthProvider(
7
- teamsFx.getConfig("API_{{capitalName}}_USERNAME"),
8
- teamsFx.getConfig("API_{{capitalName}}_PASSWORD")
9
- );
10
- const {{config.APIName}}Client = teamsfxSdk.createApiClient(teamsFx.getConfig("API_{{capitalName}}_ENDPOINT"), authProvider);
11
- export { {{config.APIName}}Client };
12
-
13
- /*
14
- You can now call {{config.APIName}} APIs without worrying about authentication.
15
- Here is an example for a GET request to "relative_path_of_target_api":
16
- const result = await {{config.APIName}}Client.get("relative_path_of_target_api");
17
-
18
- You can refer https://aka.ms/teamsfx-connect-api to learn more.
19
- */
20
-
21
- /*
22
- Setting API configuration for cloud environment:
23
- We have already set the configuration to .env.teamsfx.local based on your answers.
24
- Before you deploy your code to cloud using TeamsFx, please follow https://aka.ms/teamsfx-add-appsettings to add following app settings with appropriate value to your Azure environment:
25
- API_{{capitalName}}_ENDPOINT
26
- API_{{capitalName}}_USERNAME
27
- API_{{capitalName}}_PASSWORD
28
-
29
- You can refer https://aka.ms/teamsfx-connet-api to learn more.
30
- */