@microsoft/teamsfx-core 1.7.0 → 1.7.1-alpha.42a29d71b.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 (448) hide show
  1. package/build/common/constants.d.ts +3 -1
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +3 -1
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/featureFlags.d.ts +8 -0
  6. package/build/common/featureFlags.d.ts.map +1 -0
  7. package/build/common/featureFlags.js +43 -0
  8. package/build/common/featureFlags.js.map +1 -0
  9. package/build/common/index.d.ts +4 -3
  10. package/build/common/index.d.ts.map +1 -1
  11. package/build/common/index.js +4 -3
  12. package/build/common/index.js.map +1 -1
  13. package/build/common/local/localEnvManager.d.ts +1 -1
  14. package/build/common/local/localEnvManager.d.ts.map +1 -1
  15. package/build/common/local/localEnvManager.js +1 -1
  16. package/build/common/local/localEnvManager.js.map +1 -1
  17. package/build/common/local/localStateHelper.d.ts.map +1 -1
  18. package/build/common/local/localStateHelper.js +12 -0
  19. package/build/common/local/localStateHelper.js.map +1 -1
  20. package/build/common/local/portChecker.d.ts.map +1 -1
  21. package/build/common/local/portChecker.js +6 -1
  22. package/build/common/local/portChecker.js.map +1 -1
  23. package/build/common/projectSettingsHelper.d.ts +1 -1
  24. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  25. package/build/common/projectSettingsHelper.js +6 -4
  26. package/build/common/projectSettingsHelper.js.map +1 -1
  27. package/build/common/samples-config.json +29 -15
  28. package/build/common/samples.d.ts +1 -1
  29. package/build/common/samples.d.ts.map +1 -1
  30. package/build/common/samples.js +3 -2
  31. package/build/common/samples.js.map +1 -1
  32. package/build/common/telemetry.d.ts +9 -0
  33. package/build/common/telemetry.d.ts.map +1 -1
  34. package/build/common/telemetry.js +9 -0
  35. package/build/common/telemetry.js.map +1 -1
  36. package/build/common/templates-config.json +2 -2
  37. package/build/common/tools.d.ts +3 -3
  38. package/build/common/tools.d.ts.map +1 -1
  39. package/build/common/tools.js +28 -28
  40. package/build/common/tools.js.map +1 -1
  41. package/build/core/FxCore.d.ts +3 -2
  42. package/build/core/FxCore.d.ts.map +1 -1
  43. package/build/core/FxCore.js +76 -19
  44. package/build/core/FxCore.js.map +1 -1
  45. package/build/core/environment.d.ts +1 -1
  46. package/build/core/environment.d.ts.map +1 -1
  47. package/build/core/environment.js +6 -1
  48. package/build/core/environment.js.map +1 -1
  49. package/build/core/error.d.ts +1 -0
  50. package/build/core/error.d.ts.map +1 -1
  51. package/build/core/error.js +5 -1
  52. package/build/core/error.js.map +1 -1
  53. package/build/core/globalVars.d.ts +0 -5
  54. package/build/core/globalVars.d.ts.map +1 -1
  55. package/build/core/globalVars.js +1 -9
  56. package/build/core/globalVars.js.map +1 -1
  57. package/build/core/middleware/aadManifestMigration.d.ts +3 -0
  58. package/build/core/middleware/aadManifestMigration.d.ts.map +1 -0
  59. package/build/core/middleware/aadManifestMigration.js +240 -0
  60. package/build/core/middleware/aadManifestMigration.js.map +1 -0
  61. package/build/core/middleware/consolidateLocalRemote.d.ts +2 -0
  62. package/build/core/middleware/consolidateLocalRemote.d.ts.map +1 -1
  63. package/build/core/middleware/consolidateLocalRemote.js +100 -55
  64. package/build/core/middleware/consolidateLocalRemote.js.map +1 -1
  65. package/build/core/middleware/errorHandler.d.ts.map +1 -1
  66. package/build/core/middleware/errorHandler.js +15 -3
  67. package/build/core/middleware/errorHandler.js.map +1 -1
  68. package/build/core/middleware/questionModel.d.ts.map +1 -1
  69. package/build/core/middleware/questionModel.js +11 -55
  70. package/build/core/middleware/questionModel.js.map +1 -1
  71. package/build/core/question.d.ts +2 -8
  72. package/build/core/question.d.ts.map +1 -1
  73. package/build/core/question.js +68 -52
  74. package/build/core/question.js.map +1 -1
  75. package/build/core/telemetry.d.ts +23 -0
  76. package/build/core/telemetry.d.ts.map +1 -0
  77. package/build/core/telemetry.js +46 -0
  78. package/build/core/telemetry.js.map +1 -0
  79. package/build/plugins/resource/aad/constants.d.ts +5 -0
  80. package/build/plugins/resource/aad/constants.d.ts.map +1 -1
  81. package/build/plugins/resource/aad/constants.js +5 -0
  82. package/build/plugins/resource/aad/constants.js.map +1 -1
  83. package/build/plugins/resource/aad/errors.d.ts +2 -0
  84. package/build/plugins/resource/aad/errors.d.ts.map +1 -1
  85. package/build/plugins/resource/aad/errors.js +15 -1
  86. package/build/plugins/resource/aad/errors.js.map +1 -1
  87. package/build/plugins/resource/aad/index.d.ts +2 -1
  88. package/build/plugins/resource/aad/index.d.ts.map +1 -1
  89. package/build/plugins/resource/aad/index.js +23 -0
  90. package/build/plugins/resource/aad/index.js.map +1 -1
  91. package/build/plugins/resource/aad/plugin.d.ts +3 -0
  92. package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
  93. package/build/plugins/resource/aad/plugin.js +109 -19
  94. package/build/plugins/resource/aad/plugin.js.map +1 -1
  95. package/build/plugins/resource/aad/utils/configs.d.ts +2 -1
  96. package/build/plugins/resource/aad/utils/configs.d.ts.map +1 -1
  97. package/build/plugins/resource/aad/utils/configs.js +20 -3
  98. package/build/plugins/resource/aad/utils/configs.js.map +1 -1
  99. package/build/plugins/resource/aad/v2/index.d.ts +2 -1
  100. package/build/plugins/resource/aad/v2/index.d.ts.map +1 -1
  101. package/build/plugins/resource/aad/v2/index.js +3 -0
  102. package/build/plugins/resource/aad/v2/index.js.map +1 -1
  103. package/build/plugins/resource/apiconnector/checker.d.ts +7 -0
  104. package/build/plugins/resource/apiconnector/checker.d.ts.map +1 -0
  105. package/build/plugins/resource/apiconnector/checker.js +73 -0
  106. package/build/plugins/resource/apiconnector/checker.js.map +1 -0
  107. package/build/plugins/resource/apiconnector/config.d.ts +23 -0
  108. package/build/plugins/resource/apiconnector/config.d.ts.map +1 -0
  109. package/build/plugins/resource/apiconnector/config.js +5 -0
  110. package/build/plugins/resource/apiconnector/config.js.map +1 -0
  111. package/build/plugins/resource/apiconnector/constants.d.ts +25 -1
  112. package/build/plugins/resource/apiconnector/constants.d.ts.map +1 -1
  113. package/build/plugins/resource/apiconnector/constants.js +33 -7
  114. package/build/plugins/resource/apiconnector/constants.js.map +1 -1
  115. package/build/plugins/resource/apiconnector/depsHandler.d.ts +13 -0
  116. package/build/plugins/resource/apiconnector/depsHandler.d.ts.map +1 -0
  117. package/build/plugins/resource/apiconnector/depsHandler.js +93 -0
  118. package/build/plugins/resource/apiconnector/depsHandler.js.map +1 -0
  119. package/build/plugins/resource/apiconnector/envHandler.d.ts +6 -4
  120. package/build/plugins/resource/apiconnector/envHandler.d.ts.map +1 -1
  121. package/build/plugins/resource/apiconnector/envHandler.js +57 -26
  122. package/build/plugins/resource/apiconnector/envHandler.js.map +1 -1
  123. package/build/plugins/resource/apiconnector/errors.d.ts +30 -8
  124. package/build/plugins/resource/apiconnector/errors.d.ts.map +1 -1
  125. package/build/plugins/resource/apiconnector/errors.js +35 -9
  126. package/build/plugins/resource/apiconnector/errors.js.map +1 -1
  127. package/build/plugins/resource/apiconnector/index.d.ts.map +1 -1
  128. package/build/plugins/resource/apiconnector/index.js +1 -8
  129. package/build/plugins/resource/apiconnector/index.js.map +1 -1
  130. package/build/plugins/resource/apiconnector/plugin.d.ts +16 -2
  131. package/build/plugins/resource/apiconnector/plugin.d.ts.map +1 -1
  132. package/build/plugins/resource/apiconnector/plugin.js +259 -37
  133. package/build/plugins/resource/apiconnector/plugin.js.map +1 -1
  134. package/build/plugins/resource/apiconnector/questions.d.ts +26 -4
  135. package/build/plugins/resource/apiconnector/questions.d.ts.map +1 -1
  136. package/build/plugins/resource/apiconnector/questions.js +103 -26
  137. package/build/plugins/resource/apiconnector/questions.js.map +1 -1
  138. package/build/plugins/resource/apiconnector/result.d.ts +16 -3
  139. package/build/plugins/resource/apiconnector/result.d.ts.map +1 -1
  140. package/build/plugins/resource/apiconnector/result.js +24 -5
  141. package/build/plugins/resource/apiconnector/result.js.map +1 -1
  142. package/build/plugins/resource/apiconnector/sampleHandler.d.ts +3 -3
  143. package/build/plugins/resource/apiconnector/sampleHandler.d.ts.map +1 -1
  144. package/build/plugins/resource/apiconnector/sampleHandler.js +14 -4
  145. package/build/plugins/resource/apiconnector/sampleHandler.js.map +1 -1
  146. package/build/plugins/resource/apiconnector/telemetry.d.ts +41 -0
  147. package/build/plugins/resource/apiconnector/telemetry.d.ts.map +1 -0
  148. package/build/plugins/resource/apiconnector/telemetry.js +69 -0
  149. package/build/plugins/resource/apiconnector/telemetry.js.map +1 -0
  150. package/build/plugins/resource/apiconnector/utils.d.ts +14 -20
  151. package/build/plugins/resource/apiconnector/utils.d.ts.map +1 -1
  152. package/build/plugins/resource/apiconnector/utils.js +63 -16
  153. package/build/plugins/resource/apiconnector/utils.js.map +1 -1
  154. package/build/plugins/resource/appstudio/appStudio.d.ts.map +1 -1
  155. package/build/plugins/resource/appstudio/appStudio.js +6 -5
  156. package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
  157. package/build/plugins/resource/appstudio/constants.d.ts +2 -0
  158. package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
  159. package/build/plugins/resource/appstudio/constants.js +24 -1
  160. package/build/plugins/resource/appstudio/constants.js.map +1 -1
  161. package/build/plugins/resource/appstudio/index.d.ts +1 -0
  162. package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
  163. package/build/plugins/resource/appstudio/index.js +56 -11
  164. package/build/plugins/resource/appstudio/index.js.map +1 -1
  165. package/build/plugins/resource/appstudio/manifestTemplate.d.ts +2 -2
  166. package/build/plugins/resource/appstudio/manifestTemplate.d.ts.map +1 -1
  167. package/build/plugins/resource/appstudio/manifestTemplate.js +27 -5
  168. package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
  169. package/build/plugins/resource/appstudio/plugin.d.ts +1 -0
  170. package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
  171. package/build/plugins/resource/appstudio/plugin.js +6 -1
  172. package/build/plugins/resource/appstudio/plugin.js.map +1 -1
  173. package/build/plugins/resource/appstudio/utils/telemetry.d.ts +1 -0
  174. package/build/plugins/resource/appstudio/utils/telemetry.d.ts.map +1 -1
  175. package/build/plugins/resource/appstudio/utils/telemetry.js +1 -0
  176. package/build/plugins/resource/appstudio/utils/telemetry.js.map +1 -1
  177. package/build/plugins/resource/appstudio/v2/index.d.ts +2 -0
  178. package/build/plugins/resource/appstudio/v2/index.d.ts.map +1 -1
  179. package/build/plugins/resource/appstudio/v2/index.js +5 -0
  180. package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
  181. package/build/plugins/resource/appstudio/v3/index.js +1 -1
  182. package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
  183. package/build/plugins/resource/appstudio/v3/plugin.d.ts.map +1 -1
  184. package/build/plugins/resource/appstudio/v3/plugin.js +5 -0
  185. package/build/plugins/resource/appstudio/v3/plugin.js.map +1 -1
  186. package/build/plugins/resource/bot/azureOps.d.ts +3 -2
  187. package/build/plugins/resource/bot/azureOps.d.ts.map +1 -1
  188. package/build/plugins/resource/bot/azureOps.js +29 -30
  189. package/build/plugins/resource/bot/azureOps.js.map +1 -1
  190. package/build/plugins/resource/bot/clientFactory.d.ts +0 -5
  191. package/build/plugins/resource/bot/clientFactory.d.ts.map +1 -1
  192. package/build/plugins/resource/bot/clientFactory.js +1 -29
  193. package/build/plugins/resource/bot/clientFactory.js.map +1 -1
  194. package/build/plugins/resource/bot/configs/teamsBotConfig.d.ts +1 -0
  195. package/build/plugins/resource/bot/configs/teamsBotConfig.d.ts.map +1 -1
  196. package/build/plugins/resource/bot/configs/teamsBotConfig.js +15 -13
  197. package/build/plugins/resource/bot/configs/teamsBotConfig.js.map +1 -1
  198. package/build/plugins/resource/bot/constants.d.ts +8 -9
  199. package/build/plugins/resource/bot/constants.d.ts.map +1 -1
  200. package/build/plugins/resource/bot/constants.js +9 -9
  201. package/build/plugins/resource/bot/constants.js.map +1 -1
  202. package/build/plugins/resource/bot/errors.d.ts +6 -18
  203. package/build/plugins/resource/bot/errors.d.ts.map +1 -1
  204. package/build/plugins/resource/bot/errors.js +16 -39
  205. package/build/plugins/resource/bot/errors.js.map +1 -1
  206. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.d.ts +1 -1
  207. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.d.ts.map +1 -1
  208. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js +10 -4
  209. package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js.map +1 -1
  210. package/build/plugins/resource/bot/functionsHostedBot/plugin.d.ts.map +1 -1
  211. package/build/plugins/resource/bot/functionsHostedBot/plugin.js +4 -7
  212. package/build/plugins/resource/bot/functionsHostedBot/plugin.js.map +1 -1
  213. package/build/plugins/resource/bot/index.d.ts.map +1 -1
  214. package/build/plugins/resource/bot/index.js +4 -2
  215. package/build/plugins/resource/bot/index.js.map +1 -1
  216. package/build/plugins/resource/bot/languageStrategy.d.ts.map +1 -1
  217. package/build/plugins/resource/bot/languageStrategy.js +3 -1
  218. package/build/plugins/resource/bot/languageStrategy.js.map +1 -1
  219. package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
  220. package/build/plugins/resource/bot/plugin.js +8 -3
  221. package/build/plugins/resource/bot/plugin.js.map +1 -1
  222. package/build/plugins/resource/bot/question.d.ts +5 -3
  223. package/build/plugins/resource/bot/question.d.ts.map +1 -1
  224. package/build/plugins/resource/bot/question.js +20 -2
  225. package/build/plugins/resource/bot/question.js.map +1 -1
  226. package/build/plugins/resource/bot/resources/messages.d.ts +2 -0
  227. package/build/plugins/resource/bot/resources/messages.d.ts.map +1 -1
  228. package/build/plugins/resource/bot/resources/messages.js +8 -0
  229. package/build/plugins/resource/bot/resources/messages.js.map +1 -1
  230. package/build/plugins/resource/bot/utils/common.d.ts +1 -0
  231. package/build/plugins/resource/bot/utils/common.d.ts.map +1 -1
  232. package/build/plugins/resource/bot/utils/common.js +5 -1
  233. package/build/plugins/resource/bot/utils/common.js.map +1 -1
  234. package/build/plugins/resource/bot/utils/zipDeploy.js +1 -1
  235. package/build/plugins/resource/bot/utils/zipDeploy.js.map +1 -1
  236. package/build/plugins/resource/bot/v3/index.d.ts.map +1 -1
  237. package/build/plugins/resource/bot/v3/index.js +2 -1
  238. package/build/plugins/resource/bot/v3/index.js.map +1 -1
  239. package/build/plugins/resource/frontend/constants.d.ts +4 -0
  240. package/build/plugins/resource/frontend/constants.d.ts.map +1 -1
  241. package/build/plugins/resource/frontend/constants.js +6 -2
  242. package/build/plugins/resource/frontend/constants.js.map +1 -1
  243. package/build/plugins/resource/frontend/dotnet/plugin.js +1 -1
  244. package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
  245. package/build/plugins/resource/frontend/env.js +2 -2
  246. package/build/plugins/resource/frontend/env.js.map +1 -1
  247. package/build/plugins/resource/frontend/ops/deploy.d.ts +3 -5
  248. package/build/plugins/resource/frontend/ops/deploy.d.ts.map +1 -1
  249. package/build/plugins/resource/frontend/ops/deploy.js +41 -7
  250. package/build/plugins/resource/frontend/ops/deploy.js.map +1 -1
  251. package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
  252. package/build/plugins/resource/frontend/plugin.js +5 -6
  253. package/build/plugins/resource/frontend/plugin.js.map +1 -1
  254. package/build/plugins/resource/frontend/resources/errors.d.ts +1 -1
  255. package/build/plugins/resource/frontend/resources/errors.d.ts.map +1 -1
  256. package/build/plugins/resource/frontend/resources/errors.js +4 -4
  257. package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
  258. package/build/plugins/resource/frontend/resources/templateInfo.js +1 -1
  259. package/build/plugins/resource/frontend/resources/templateInfo.js.map +1 -1
  260. package/build/plugins/resource/frontend/utils/progress-helper.d.ts +2 -2
  261. package/build/plugins/resource/frontend/utils/progress-helper.d.ts.map +1 -1
  262. package/build/plugins/resource/frontend/utils/progress-helper.js +4 -4
  263. package/build/plugins/resource/frontend/utils/progress-helper.js.map +1 -1
  264. package/build/plugins/resource/frontend/v3/index.d.ts.map +1 -1
  265. package/build/plugins/resource/frontend/v3/index.js +10 -13
  266. package/build/plugins/resource/frontend/v3/index.js.map +1 -1
  267. package/build/plugins/resource/spfx/depsChecker/yoChecker.d.ts.map +1 -1
  268. package/build/plugins/resource/spfx/depsChecker/yoChecker.js +6 -0
  269. package/build/plugins/resource/spfx/depsChecker/yoChecker.js.map +1 -1
  270. package/build/plugins/resource/spfx/index.d.ts.map +1 -1
  271. package/build/plugins/resource/spfx/index.js +0 -5
  272. package/build/plugins/resource/spfx/index.js.map +1 -1
  273. package/build/plugins/resource/spfx/plugin.d.ts.map +1 -1
  274. package/build/plugins/resource/spfx/plugin.js +59 -133
  275. package/build/plugins/resource/spfx/plugin.js.map +1 -1
  276. package/build/plugins/resource/spfx/utils/questions.d.ts.map +1 -1
  277. package/build/plugins/resource/spfx/utils/questions.js +5 -11
  278. package/build/plugins/resource/spfx/utils/questions.js.map +1 -1
  279. package/build/plugins/resource/sql/constants.d.ts +2 -4
  280. package/build/plugins/resource/sql/constants.d.ts.map +1 -1
  281. package/build/plugins/resource/sql/constants.js +2 -4
  282. package/build/plugins/resource/sql/constants.js.map +1 -1
  283. package/build/plugins/resource/sql/errors.d.ts.map +1 -1
  284. package/build/plugins/resource/sql/errors.js +29 -29
  285. package/build/plugins/resource/sql/errors.js.map +1 -1
  286. package/build/plugins/resource/sql/index.d.ts.map +1 -1
  287. package/build/plugins/resource/sql/index.js +1 -1
  288. package/build/plugins/resource/sql/index.js.map +1 -1
  289. package/build/plugins/resource/sql/plugin.d.ts.map +1 -1
  290. package/build/plugins/resource/sql/plugin.js +24 -11
  291. package/build/plugins/resource/sql/plugin.js.map +1 -1
  292. package/build/plugins/resource/sql/sqlClient.d.ts.map +1 -1
  293. package/build/plugins/resource/sql/sqlClient.js +7 -10
  294. package/build/plugins/resource/sql/sqlClient.js.map +1 -1
  295. package/build/plugins/resource/sql/utils/dialogUtils.d.ts +0 -1
  296. package/build/plugins/resource/sql/utils/dialogUtils.d.ts.map +1 -1
  297. package/build/plugins/resource/sql/utils/dialogUtils.js +0 -1
  298. package/build/plugins/resource/sql/utils/dialogUtils.js.map +1 -1
  299. package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
  300. package/build/plugins/solution/fx-solution/arm.js +15 -9
  301. package/build/plugins/solution/fx-solution/arm.js.map +1 -1
  302. package/build/plugins/solution/fx-solution/commonQuestions.js +1 -1
  303. package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
  304. package/build/plugins/solution/fx-solution/constants.d.ts +19 -2
  305. package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
  306. package/build/plugins/solution/fx-solution/constants.js +22 -1
  307. package/build/plugins/solution/fx-solution/constants.js.map +1 -1
  308. package/build/plugins/solution/fx-solution/debug/util/launch.d.ts.map +1 -1
  309. package/build/plugins/solution/fx-solution/debug/util/launch.js +1 -46
  310. package/build/plugins/solution/fx-solution/debug/util/launch.js.map +1 -1
  311. package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts.map +1 -1
  312. package/build/plugins/solution/fx-solution/debug/util/launchNext.js +0 -26
  313. package/build/plugins/solution/fx-solution/debug/util/launchNext.js.map +1 -1
  314. package/build/plugins/solution/fx-solution/debug/util/tasksNext.js +1 -1
  315. package/build/plugins/solution/fx-solution/debug/util/tasksNext.js.map +1 -1
  316. package/build/plugins/solution/fx-solution/index.d.ts +1 -0
  317. package/build/plugins/solution/fx-solution/index.d.ts.map +1 -1
  318. package/build/plugins/solution/fx-solution/index.js +1 -0
  319. package/build/plugins/solution/fx-solution/index.js.map +1 -1
  320. package/build/plugins/solution/fx-solution/question.d.ts +8 -3
  321. package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
  322. package/build/plugins/solution/fx-solution/question.js +70 -29
  323. package/build/plugins/solution/fx-solution/question.js.map +1 -1
  324. package/build/plugins/solution/fx-solution/v2/deploy.d.ts.map +1 -1
  325. package/build/plugins/solution/fx-solution/v2/deploy.js +31 -8
  326. package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
  327. package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts +2 -1
  328. package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
  329. package/build/plugins/solution/fx-solution/v2/executeUserTask.js +160 -95
  330. package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
  331. package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
  332. package/build/plugins/solution/fx-solution/v2/getQuestions.js +123 -65
  333. package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
  334. package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
  335. package/build/plugins/solution/fx-solution/v2/provision.js +22 -9
  336. package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
  337. package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
  338. package/build/plugins/solution/fx-solution/v2/utils.js +9 -1
  339. package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
  340. package/build/plugins/solution/fx-solution/v3/provision.d.ts +1 -0
  341. package/build/plugins/solution/fx-solution/v3/provision.d.ts.map +1 -1
  342. package/build/plugins/solution/fx-solution/v3/provision.js +18 -1
  343. package/build/plugins/solution/fx-solution/v3/provision.js.map +1 -1
  344. package/package.json +5 -4
  345. package/resource/aad-manifest-change-logs.md +27 -0
  346. package/resource/package.nls.json +150 -72
  347. package/resource/unify-config-change-logs.md +26 -0
  348. package/templates/core/README.md +46 -0
  349. package/templates/fallback/blazor-base.csharp.default.zip +0 -0
  350. package/templates/fallback/bot.csharp.default.zip +0 -0
  351. package/templates/fallback/bot.js.command-and-response.zip +0 -0
  352. package/templates/fallback/bot.js.default.zip +0 -0
  353. package/templates/fallback/bot.js.m365.zip +0 -0
  354. package/templates/fallback/bot.js.notification-function-base.zip +0 -0
  355. package/templates/fallback/bot.js.notification-restify.zip +0 -0
  356. package/templates/fallback/bot.js.notification-trigger-http.zip +0 -0
  357. package/templates/fallback/bot.js.notification-trigger-timer.zip +0 -0
  358. package/templates/fallback/bot.ts.command-and-response.zip +0 -0
  359. package/templates/fallback/bot.ts.default.zip +0 -0
  360. package/templates/fallback/bot.ts.m365.zip +0 -0
  361. package/templates/fallback/bot.ts.notification-function-base.zip +0 -0
  362. package/templates/fallback/bot.ts.notification-restify.zip +0 -0
  363. package/templates/fallback/bot.ts.notification-trigger-http.zip +0 -0
  364. package/templates/fallback/bot.ts.notification-trigger-timer.zip +0 -0
  365. package/templates/fallback/bot.ts.notification.zip +0 -0
  366. package/templates/fallback/function-base.js.default.zip +0 -0
  367. package/templates/fallback/function-base.ts.default.zip +0 -0
  368. package/templates/fallback/function-triggers.js.HTTPTrigger.zip +0 -0
  369. package/templates/fallback/function-triggers.ts.HTTPTrigger.zip +0 -0
  370. package/templates/fallback/tab.csharp.default.zip +0 -0
  371. package/templates/fallback/tab.js.default.zip +0 -0
  372. package/templates/fallback/tab.js.m365.zip +0 -0
  373. package/templates/fallback/tab.js.non-sso.zip +0 -0
  374. package/templates/fallback/tab.ts.default.zip +0 -0
  375. package/templates/fallback/tab.ts.m365.zip +0 -0
  376. package/templates/fallback/tab.ts.non-sso.zip +0 -0
  377. package/templates/plugins/resource/aad/auth/bot/README.md +17 -0
  378. package/templates/plugins/resource/aad/auth/bot/js/public/auth-end.html +65 -0
  379. package/templates/plugins/resource/aad/auth/bot/js/public/auth-start.html +177 -0
  380. package/templates/plugins/resource/aad/auth/bot/js/sso/showUserInfo.js +23 -0
  381. package/templates/plugins/resource/aad/auth/bot/js/sso/ssoDialog.js +176 -0
  382. package/templates/plugins/resource/aad/auth/bot/js/sso/teamsSsoBot.js +57 -0
  383. package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +65 -0
  384. package/templates/plugins/resource/aad/auth/bot/ts/public/auth-start.html +177 -0
  385. package/templates/plugins/resource/aad/auth/bot/ts/sso/showUserInfo.ts +24 -0
  386. package/templates/plugins/resource/aad/auth/bot/ts/sso/ssoDialog.ts +182 -0
  387. package/templates/plugins/resource/aad/auth/bot/ts/sso/teamsSsoBot.ts +69 -0
  388. package/templates/plugins/resource/aad/auth/tab/README.md +15 -0
  389. package/templates/plugins/resource/aad/auth/tab/js/public/auth-end.html +58 -0
  390. package/templates/plugins/resource/aad/auth/tab/js/public/auth-start.html +57 -0
  391. package/templates/plugins/resource/aad/auth/tab/js/sso/GetUserProfile.jsx +34 -0
  392. package/templates/plugins/resource/aad/auth/tab/ts/public/auth-end.html +58 -0
  393. package/templates/plugins/resource/aad/auth/tab/ts/public/auth-start.html +57 -0
  394. package/templates/plugins/resource/aad/auth/tab/ts/sso/GetUserProfile.tsx +34 -0
  395. package/templates/plugins/resource/aad/manifest/aad.template.json +1 -14
  396. package/templates/plugins/resource/apiconnector/package.json +5 -0
  397. package/templates/plugins/resource/apiconnector/sample/footerComment.template +20 -0
  398. package/templates/plugins/resource/apiconnector/sample/headerComment.template +28 -0
  399. package/templates/plugins/resource/apiconnector/sample/js/aad.template +26 -0
  400. package/templates/plugins/resource/apiconnector/sample/js/apikey.template +19 -0
  401. package/templates/plugins/resource/apiconnector/sample/js/basic.template +14 -0
  402. package/templates/plugins/resource/apiconnector/sample/js/cert.template +15 -0
  403. package/templates/plugins/resource/apiconnector/sample/js/custom.template +39 -0
  404. package/templates/plugins/resource/apiconnector/sample/ts/aad.template +31 -0
  405. package/templates/plugins/resource/apiconnector/sample/ts/apikey.template +16 -0
  406. package/templates/plugins/resource/apiconnector/sample/ts/basic.template +14 -0
  407. package/templates/plugins/resource/apiconnector/sample/ts/cert.template +17 -0
  408. package/templates/plugins/resource/apiconnector/sample/ts/custom.template +42 -0
  409. package/templates/plugins/resource/bot/bicep/botProvision.template.bicep +9 -0
  410. package/templates/plugins/resource/bot/bicep/funcHostedBotProvision.template.bicep +2 -0
  411. package/templates/plugins/resource/function/bicep/functionProvision.template.bicep +2 -0
  412. package/templates/plugins/resource/simpleauth/bicep/simpleAuthProvision.template.bicep +4 -0
  413. package/templates/plugins/resource/spfx/solution/README.md +3 -3
  414. package/templates/plugins/resource/webapp/bicep/webappProvision.template.bicep +2 -0
  415. package/templates/plugins/solution/v1/README.md +1 -1
  416. package/templates/core/README-auto-generated.md +0 -31
  417. package/templates/fallback/bot-msgext.csharp.default.zip +0 -0
  418. package/templates/fallback/bot-msgext.js.default.zip +0 -0
  419. package/templates/fallback/bot-msgext.ts.default.zip +0 -0
  420. package/templates/fallback/msgext.js.default.zip +0 -0
  421. package/templates/fallback/msgext.ts.default.zip +0 -0
  422. package/templates/plugins/resource/apiconnector/sample/js/api-connector.template +0 -30
  423. package/templates/plugins/resource/apiconnector/sample/ts/api-connector.template +0 -30
  424. package/templates/plugins/resource/spfx/solution/_gitignore +0 -33
  425. package/templates/plugins/resource/spfx/solution/config/config.json +0 -19
  426. package/templates/plugins/resource/spfx/solution/config/copy-assets.json +0 -4
  427. package/templates/plugins/resource/spfx/solution/config/deploy-azure-storage.json +0 -7
  428. package/templates/plugins/resource/spfx/solution/config/package-solution.json +0 -21
  429. package/templates/plugins/resource/spfx/solution/config/serve.json +0 -10
  430. package/templates/plugins/resource/spfx/solution/config/write-manifests.json +0 -4
  431. package/templates/plugins/resource/spfx/solution/gulpfile.js +0 -16
  432. package/templates/plugins/resource/spfx/solution/manifest.json +0 -62
  433. package/templates/plugins/resource/spfx/solution/src/index.ts +0 -1
  434. package/templates/plugins/resource/spfx/solution/tsconfig.json +0 -35
  435. package/templates/plugins/resource/spfx/solution/tslint.json +0 -30
  436. package/templates/plugins/resource/spfx/webpart/base/images/color.png +0 -0
  437. package/templates/plugins/resource/spfx/webpart/base/images/outline.png +0 -0
  438. package/templates/plugins/resource/spfx/webpart/base/loc/en-us.js +0 -7
  439. package/templates/plugins/resource/spfx/webpart/base/loc/mystrings.d.ts +0 -10
  440. package/templates/plugins/resource/spfx/webpart/base/{componentClassName}.manifest.json +0 -27
  441. package/templates/plugins/resource/spfx/webpart/none/package.json +0 -28
  442. package/templates/plugins/resource/spfx/webpart/none/{componentClassName}.module.scss +0 -74
  443. package/templates/plugins/resource/spfx/webpart/none/{componentClassName}.ts +0 -61
  444. package/templates/plugins/resource/spfx/webpart/react/components/I{componentName}Props.ts +0 -3
  445. package/templates/plugins/resource/spfx/webpart/react/components/{componentName}.module.scss +0 -74
  446. package/templates/plugins/resource/spfx/webpart/react/components/{componentName}.tsx +0 -25
  447. package/templates/plugins/resource/spfx/webpart/react/package.json +0 -33
  448. package/templates/plugins/resource/spfx/webpart/react/{componentClassName}.ts +0 -60
@@ -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
+ }
@@ -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,5 @@
1
+ {
2
+ "dependencies": {
3
+ "@microsoft/teamsfx": "0.6.3-alpha.42a29d71b.0"
4
+ }
5
+ }
@@ -0,0 +1,20 @@
1
+ /*
2
+ Setting API configuration for cloud environment:
3
+ We have already set the configuration to .env.teamsfx.local based on your answers.
4
+ 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:
5
+ TEAMSFX_API_{{capitalName}}_ENDPOINT
6
+ {{#if (equals config.AuthConfig.AuthType "basic")}}
7
+ TEAMSFX_API_{{capitalName}}_USERNAME
8
+ TEAMSFX_API_{{capitalName}}_PASSWORD
9
+ {{else if (equals config.AuthConfig.AuthType "aad")}}
10
+ {{#if (equals config.AuthConfig.ReuseTeamsApp false)}}
11
+ TEAMSFX_API_{{capitalName}}_TENANT_ID
12
+ TEAMSFX_API_{{capitalName}}_CLIENT_ID
13
+ TEAMSFX_API_{{capitalName}}_CLIENT_SECRET
14
+ {{/if}}
15
+ {{else if (equals config.AuthConfig.AuthType "apikey")}}
16
+ TEAMSFX_API_{{capitalName}}_API_KEY
17
+ {{/if}}
18
+
19
+ You can refer https://aka.ms/teamsfx-connect-api to learn more.
20
+ */
@@ -0,0 +1,28 @@
1
+ /*
2
+ Your next steps:
3
+ 1. Run npm install. If your project did not install @microsoft/teamsfx package before, we have added it to package.json for you.
4
+ You need to run the command under "{{component}}" folder instead of project's root folder.
5
+ {{#if (equals config.AuthConfig.AuthType "basic")}}
6
+ 2. Add your user password to TEAMSFX_API_{{capitalName}}_PASSWORD in "{{component}}/.env.teamsfx.local".
7
+ {{else if (equals config.AuthConfig.AuthType "aad")}}
8
+ {{#if (equals config.AuthConfig.ReuseTeamsApp false)}}
9
+ 2. Replace "<your-api-scope>" in this file with actual scope required by the API.
10
+ 3. Add your client secret to TEAMSFX_API_{{capitalName}}_CLIENT_SECRET in "{{component}}/.env.teamsfx.local".
11
+ {{else}}
12
+ 2. Replace "<your-api-scope>" in this file with actual scope required by the API.
13
+ 3. Refer https://aka.ms/teamsfx-connect-api-with-aad for configuring AAD app and consent scopes.
14
+ {{/if}}
15
+ {{else if (equals config.AuthConfig.AuthType "apikey")}}
16
+ 2. Add your API Key to TEAMSFX_API_{{capitalName}}_API_KEY in "{{component}}/.env.teamsfx.local".
17
+ {{else if (equals config.AuthConfig.AuthType "cert")}}
18
+ 2. Add code to read your cert content and replace "<your-cert>" and "<your-private-key>" with actual value.
19
+ {{else if (equals config.AuthConfig.AuthType "custom")}}
20
+ 2. Refer sample code and comments in this file to implement your auth provider.
21
+ {{/if}}
22
+
23
+ You can now import the API client (an Axios instance) in another file and call {{config.APIName}} APIs without worrying about authentication.
24
+ Here is an example for a GET request to "relative_path_of_target_api":
25
+ const result = await {{config.APIName}}Client.get("relative_path_of_target_api");
26
+
27
+ You can refer https://aka.ms/teamsfx-connect-api to learn more.
28
+ */
@@ -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
+ module.exports.{{config.APIName}}Client = {{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_{{capitalName}}_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
+ module.exports.{{config.APIName}}Client = {{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
+ module.exports.{{config.APIName}}Client = {{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
+ module.exports.{{config.APIName}}Client = {{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
+ module.exports.{{config.APIName}}Client = {{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, 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_{{capitalName}}_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'
@@ -1,4 +1,4 @@
1
- # SPFx(SharePoint Framework) APP
1
+ # SPFx (SharePoint Framework) App
2
2
 
3
3
  ## Summary
4
4
 
@@ -39,7 +39,7 @@ Version|Date|Comments
39
39
 
40
40
  ## Minimal Path to Awesome
41
41
 
42
- 1. <b>Install the latest version of [Node.js LTS 14.x]</b>(https://nodejs.org/en/download/releases/)(Note: SPFx v1.12.1 support Node.js v10/12/14)
42
+ 1. Install the latest version of [Node.js LTS 14.x](https://nodejs.org/en/download/releases/) (Note: SPFx v1.14.0 support Node.js v12/14).
43
43
  2. You can either download [Visual Studio Code](https://code.visualstudio.com) and install [Teams Toolkit Visual Studio Code Extension](https://aka.ms/teams-toolkit) or download TeamsFx CLI.
44
44
  3. Open the project with VSCode, click `Provision in the cloud` in DEPLOYMENT panel of Teams Toolkit extension.
45
45
 
@@ -49,7 +49,7 @@ Version|Date|Comments
49
49
  It will provision an app in Teams App Studio. You may need to login with your M365 tenant admin account.
50
50
 
51
51
  4. Build and Deploy your SharePoint Package.
52
- - Click `Deploy to the cloud` in DEPLOYMENT panel of Teams Toolkit extension, or run `Teams: Deploy to the cloud` from command palette. This will generate a SharePoint package(*.sppkg) under sharepoint/solution folder.
52
+ - Click `Deploy to the cloud` in DEPLOYMENT panel of Teams Toolkit extension, or run `Teams: Deploy to the cloud` from command palette. This will generate a SharePoint package (*.sppkg) under sharepoint/solution folder.
53
53
 
54
54
  Or you can use TeamsFx CLI with running this cmd under your project path:
55
55
  `teamsfx deploy`
@@ -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: {
@@ -16,7 +16,7 @@ There are some configuration changed in your project to make it compatible with
16
16
 
17
17
  ## Edit the manifest
18
18
 
19
- You can find the Teams app manifest template in `./templates/appPackage/manifest.local.template.json`. It contains template arguments with `{...}` statements which will be replaced at build time. You may add any extra properties or permissions you require to this file. See the [schema reference](https://docs.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema) for more.
19
+ You can find the Teams app manifest template in `./templates/appPackage/manifest.template.json`. It contains template arguments with `{...}` statements which will be replaced at build time. You may add any extra properties or permissions you require to this file. See the [schema reference](https://docs.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema) for more.
20
20
 
21
21
  ## Learn more
22
22