@microsoft/teamsfx-core 1.2.0 → 1.2.2-alpha.eb4575da.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 (520) hide show
  1. package/build/common/armInterface.d.ts +0 -20
  2. package/build/common/armInterface.d.ts.map +1 -1
  3. package/build/common/deps-checker/depsChecker.d.ts +1 -0
  4. package/build/common/deps-checker/depsChecker.d.ts.map +1 -1
  5. package/build/common/deps-checker/depsChecker.js.map +1 -1
  6. package/build/common/deps-checker/depsManager.d.ts +2 -1
  7. package/build/common/deps-checker/depsManager.d.ts.map +1 -1
  8. package/build/common/deps-checker/depsManager.js +12 -7
  9. package/build/common/deps-checker/depsManager.js.map +1 -1
  10. package/build/common/deps-checker/index.d.ts +1 -0
  11. package/build/common/deps-checker/index.d.ts.map +1 -1
  12. package/build/common/deps-checker/index.js +1 -0
  13. package/build/common/deps-checker/index.js.map +1 -1
  14. package/build/common/deps-checker/internal/dotnetChecker.d.ts.map +1 -1
  15. package/build/common/deps-checker/internal/dotnetChecker.js +2 -1
  16. package/build/common/deps-checker/internal/dotnetChecker.js.map +1 -1
  17. package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
  18. package/build/common/deps-checker/internal/funcToolChecker.js +2 -1
  19. package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
  20. package/build/common/deps-checker/internal/ngrokChecker.d.ts +1 -1
  21. package/build/common/deps-checker/internal/ngrokChecker.d.ts.map +1 -1
  22. package/build/common/deps-checker/internal/ngrokChecker.js +2 -4
  23. package/build/common/deps-checker/internal/ngrokChecker.js.map +1 -1
  24. package/build/common/deps-checker/internal/nodeChecker.d.ts +1 -0
  25. package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
  26. package/build/common/deps-checker/internal/nodeChecker.js +9 -1
  27. package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
  28. package/build/common/deps-checker/util/extensionInstaller.d.ts +3 -0
  29. package/build/common/deps-checker/util/extensionInstaller.d.ts.map +1 -0
  30. package/build/common/deps-checker/util/extensionInstaller.js +47 -0
  31. package/build/common/deps-checker/util/extensionInstaller.js.map +1 -0
  32. package/build/common/deps-checker/util/index.d.ts +5 -0
  33. package/build/common/deps-checker/util/index.d.ts.map +1 -0
  34. package/build/common/deps-checker/util/index.js +10 -0
  35. package/build/common/deps-checker/util/index.js.map +1 -0
  36. package/build/common/index.d.ts +1 -3
  37. package/build/common/index.d.ts.map +1 -1
  38. package/build/common/index.js +1 -3
  39. package/build/common/index.js.map +1 -1
  40. package/build/common/local/constants.d.ts +5 -0
  41. package/build/common/local/constants.d.ts.map +1 -1
  42. package/build/common/local/constants.js +7 -1
  43. package/build/common/local/constants.js.map +1 -1
  44. package/build/common/local/index.d.ts +5 -0
  45. package/build/common/local/index.d.ts.map +1 -0
  46. package/build/common/local/index.js +10 -0
  47. package/build/common/local/index.js.map +1 -0
  48. package/build/{plugins/solution/fx-solution/debug/util/certificate.d.ts → common/local/localCertificateManager.d.ts} +4 -6
  49. package/build/common/local/localCertificateManager.d.ts.map +1 -0
  50. package/build/{plugins/solution/fx-solution/debug/util/certificate.js → common/local/localCertificateManager.js} +37 -47
  51. package/build/common/local/localCertificateManager.js.map +1 -0
  52. package/build/common/local/localEnvManager.d.ts +6 -2
  53. package/build/common/local/localEnvManager.d.ts.map +1 -1
  54. package/build/common/local/localEnvManager.js +41 -1
  55. package/build/common/local/localEnvManager.js.map +1 -1
  56. package/build/{plugins/solution/fx-solution/debug/util → common/local}/process.d.ts +0 -0
  57. package/build/common/local/process.d.ts.map +1 -0
  58. package/build/{plugins/solution/fx-solution/debug/util → common/local}/process.js +0 -0
  59. package/build/common/local/process.js.map +1 -0
  60. package/build/common/local/projectSettingsHelper.d.ts +5 -5
  61. package/build/common/local/projectSettingsHelper.d.ts.map +1 -1
  62. package/build/common/local/projectSettingsHelper.js +28 -21
  63. package/build/common/local/projectSettingsHelper.js.map +1 -1
  64. package/build/common/local/taskDefinition.d.ts +1 -1
  65. package/build/common/local/taskDefinition.d.ts.map +1 -1
  66. package/build/common/local/taskDefinition.js +6 -4
  67. package/build/common/local/taskDefinition.js.map +1 -1
  68. package/build/common/localSettingsConstants.d.ts +1 -0
  69. package/build/common/localSettingsConstants.d.ts.map +1 -1
  70. package/build/common/localSettingsConstants.js +1 -0
  71. package/build/common/localSettingsConstants.js.map +1 -1
  72. package/build/common/localSettingsProvider.d.ts.map +1 -1
  73. package/build/common/localSettingsProvider.js +1 -0
  74. package/build/common/localSettingsProvider.js.map +1 -1
  75. package/build/common/permissionInterface.d.ts +1 -0
  76. package/build/common/permissionInterface.d.ts.map +1 -1
  77. package/build/common/permissionInterface.js +1 -0
  78. package/build/common/permissionInterface.js.map +1 -1
  79. package/build/common/telemetry.d.ts +7 -2
  80. package/build/common/telemetry.d.ts.map +1 -1
  81. package/build/common/telemetry.js +10 -4
  82. package/build/common/telemetry.js.map +1 -1
  83. package/build/common/{templates.d.ts → template-utils/templates.d.ts} +0 -0
  84. package/build/common/template-utils/templates.d.ts.map +1 -0
  85. package/build/common/{templates.js → template-utils/templates.js} +1 -1
  86. package/build/common/template-utils/templates.js.map +1 -0
  87. package/build/common/{templatesActions.d.ts → template-utils/templatesActions.d.ts} +0 -0
  88. package/build/common/template-utils/templatesActions.d.ts.map +1 -0
  89. package/build/common/{templatesActions.js → template-utils/templatesActions.js} +3 -3
  90. package/build/common/template-utils/templatesActions.js.map +1 -0
  91. package/build/common/{templatesUtils.d.ts → template-utils/templatesUtils.d.ts} +0 -0
  92. package/build/common/template-utils/templatesUtils.d.ts.map +1 -0
  93. package/build/common/{templatesUtils.js → template-utils/templatesUtils.js} +1 -1
  94. package/build/common/template-utils/templatesUtils.js.map +1 -0
  95. package/build/common/tools.d.ts +1 -4
  96. package/build/common/tools.d.ts.map +1 -1
  97. package/build/common/tools.js +41 -12
  98. package/build/common/tools.js.map +1 -1
  99. package/build/core/index.d.ts +2 -2
  100. package/build/core/index.d.ts.map +1 -1
  101. package/build/core/index.js +14 -6
  102. package/build/core/index.js.map +1 -1
  103. package/build/core/middleware/index.d.ts +0 -1
  104. package/build/core/middleware/index.d.ts.map +1 -1
  105. package/build/core/middleware/index.js +0 -1
  106. package/build/core/middleware/index.js.map +1 -1
  107. package/build/core/middleware/projectMigrator.d.ts.map +1 -1
  108. package/build/core/middleware/projectMigrator.js +0 -9
  109. package/build/core/middleware/projectMigrator.js.map +1 -1
  110. package/build/core/permissionRequest.js +2 -2
  111. package/build/core/permissionRequest.js.map +1 -1
  112. package/build/core/question.d.ts.map +1 -1
  113. package/build/core/question.js +7 -4
  114. package/build/core/question.js.map +1 -1
  115. package/build/plugins/resource/aad/aadAppClient.d.ts +2 -2
  116. package/build/plugins/resource/aad/aadAppClient.d.ts.map +1 -1
  117. package/build/plugins/resource/aad/aadAppClient.js +3 -4
  118. package/build/plugins/resource/aad/aadAppClient.js.map +1 -1
  119. package/build/plugins/resource/aad/errors.d.ts.map +1 -1
  120. package/build/plugins/resource/aad/errors.js +1 -2
  121. package/build/plugins/resource/aad/errors.js.map +1 -1
  122. package/build/plugins/resource/aad/interfaces/IAADDefinition.d.ts +4 -0
  123. package/build/plugins/resource/aad/interfaces/IAADDefinition.d.ts.map +1 -1
  124. package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
  125. package/build/plugins/resource/aad/plugin.js +33 -46
  126. package/build/plugins/resource/aad/plugin.js.map +1 -1
  127. package/build/plugins/resource/aad/utils/common.d.ts +2 -0
  128. package/build/plugins/resource/aad/utils/common.d.ts.map +1 -1
  129. package/build/plugins/resource/aad/utils/common.js +14 -14
  130. package/build/plugins/resource/aad/utils/common.js.map +1 -1
  131. package/build/plugins/resource/aad/utils/configs.d.ts +1 -0
  132. package/build/plugins/resource/aad/utils/configs.d.ts.map +1 -1
  133. package/build/plugins/resource/aad/utils/configs.js +20 -38
  134. package/build/plugins/resource/aad/utils/configs.js.map +1 -1
  135. package/build/plugins/resource/apim/error.d.ts.map +1 -1
  136. package/build/plugins/resource/apim/error.js +1 -4
  137. package/build/plugins/resource/apim/error.js.map +1 -1
  138. package/build/plugins/resource/apim/managers/apimManager.d.ts.map +1 -1
  139. package/build/plugins/resource/apim/managers/apimManager.js +21 -58
  140. package/build/plugins/resource/apim/managers/apimManager.js.map +1 -1
  141. package/build/plugins/resource/apim/managers/questionManager.d.ts.map +1 -1
  142. package/build/plugins/resource/apim/managers/questionManager.js +0 -7
  143. package/build/plugins/resource/apim/managers/questionManager.js.map +1 -1
  144. package/build/plugins/resource/apim/questions/vscodeQuestion.d.ts.map +1 -1
  145. package/build/plugins/resource/apim/questions/vscodeQuestion.js +6 -13
  146. package/build/plugins/resource/apim/questions/vscodeQuestion.js.map +1 -1
  147. package/build/plugins/resource/appstudio/constants.d.ts +3 -2
  148. package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
  149. package/build/plugins/resource/appstudio/constants.js +12 -11
  150. package/build/plugins/resource/appstudio/constants.js.map +1 -1
  151. package/build/plugins/resource/appstudio/index.d.ts +2 -36
  152. package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
  153. package/build/plugins/resource/appstudio/index.js +1 -31
  154. package/build/plugins/resource/appstudio/index.js.map +1 -1
  155. package/build/plugins/resource/appstudio/manifestTemplate.d.ts +1 -1
  156. package/build/plugins/resource/appstudio/manifestTemplate.d.ts.map +1 -1
  157. package/build/plugins/resource/appstudio/manifestTemplate.js +16 -8
  158. package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
  159. package/build/plugins/resource/appstudio/plugin.d.ts +1 -0
  160. package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
  161. package/build/plugins/resource/appstudio/plugin.js +14 -1
  162. package/build/plugins/resource/appstudio/plugin.js.map +1 -1
  163. package/build/plugins/resource/appstudio/v3/index.d.ts +1 -3
  164. package/build/plugins/resource/appstudio/v3/index.d.ts.map +1 -1
  165. package/build/plugins/resource/appstudio/v3/index.js +28 -16
  166. package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
  167. package/build/plugins/resource/bot/configs/provisionConfig.d.ts.map +1 -1
  168. package/build/plugins/resource/bot/configs/provisionConfig.js +0 -10
  169. package/build/plugins/resource/bot/configs/provisionConfig.js.map +1 -1
  170. package/build/plugins/resource/bot/languageStrategy.d.ts +1 -1
  171. package/build/plugins/resource/bot/languageStrategy.d.ts.map +1 -1
  172. package/build/plugins/resource/bot/languageStrategy.js +1 -1
  173. package/build/plugins/resource/bot/languageStrategy.js.map +1 -1
  174. package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
  175. package/build/plugins/resource/bot/plugin.js +14 -131
  176. package/build/plugins/resource/bot/plugin.js.map +1 -1
  177. package/build/plugins/resource/frontend/configs.d.ts +1 -1
  178. package/build/plugins/resource/frontend/configs.d.ts.map +1 -1
  179. package/build/plugins/resource/frontend/configs.js +3 -9
  180. package/build/plugins/resource/frontend/configs.js.map +1 -1
  181. package/build/plugins/resource/frontend/constants.d.ts +2 -8
  182. package/build/plugins/resource/frontend/constants.d.ts.map +1 -1
  183. package/build/plugins/resource/frontend/constants.js +3 -11
  184. package/build/plugins/resource/frontend/constants.js.map +1 -1
  185. package/build/plugins/resource/frontend/dotnet/constants.d.ts +52 -0
  186. package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -0
  187. package/build/plugins/resource/frontend/dotnet/constants.js +69 -0
  188. package/build/plugins/resource/frontend/dotnet/constants.js.map +1 -0
  189. package/build/plugins/resource/frontend/{blazor → dotnet}/enum.d.ts +1 -1
  190. package/build/plugins/resource/frontend/{blazor → dotnet}/enum.d.ts.map +1 -1
  191. package/build/plugins/resource/frontend/dotnet/enum.js +39 -0
  192. package/build/plugins/resource/frontend/{blazor → dotnet}/enum.js.map +1 -1
  193. package/build/plugins/resource/frontend/{blazor → dotnet}/error-factory.d.ts +0 -0
  194. package/build/plugins/resource/frontend/{blazor → dotnet}/error-factory.d.ts.map +1 -1
  195. package/build/plugins/resource/frontend/{blazor → dotnet}/error-factory.js +3 -3
  196. package/build/plugins/resource/frontend/{blazor → dotnet}/error-factory.js.map +1 -1
  197. package/build/plugins/resource/frontend/{blazor → dotnet}/ops/deploy.d.ts +0 -0
  198. package/build/plugins/resource/frontend/{blazor → dotnet}/ops/deploy.d.ts.map +1 -1
  199. package/build/plugins/resource/frontend/{blazor → dotnet}/ops/deploy.js +3 -3
  200. package/build/plugins/resource/frontend/{blazor → dotnet}/ops/deploy.js.map +1 -1
  201. package/build/plugins/resource/frontend/dotnet/plugin.d.ts +34 -0
  202. package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -0
  203. package/build/plugins/resource/frontend/dotnet/plugin.js +126 -0
  204. package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -0
  205. package/build/plugins/resource/frontend/dotnet/resources/errors.d.ts +35 -0
  206. package/build/plugins/resource/frontend/dotnet/resources/errors.d.ts.map +1 -0
  207. package/build/plugins/resource/frontend/{blazor → dotnet}/resources/errors.js +10 -22
  208. package/build/plugins/resource/frontend/dotnet/resources/errors.js.map +1 -0
  209. package/build/plugins/resource/frontend/{blazor → dotnet}/resources/messages.d.ts +0 -4
  210. package/build/plugins/resource/frontend/dotnet/resources/messages.d.ts.map +1 -0
  211. package/build/plugins/resource/frontend/{blazor → dotnet}/resources/messages.js +0 -4
  212. package/build/plugins/resource/frontend/dotnet/resources/messages.js.map +1 -0
  213. package/build/plugins/resource/frontend/dotnet/utils/azure-client.d.ts +6 -0
  214. package/build/plugins/resource/frontend/dotnet/utils/azure-client.d.ts.map +1 -0
  215. package/build/plugins/resource/frontend/dotnet/utils/azure-client.js +11 -0
  216. package/build/plugins/resource/frontend/dotnet/utils/azure-client.js.map +1 -0
  217. package/build/plugins/resource/frontend/index.d.ts +6 -3
  218. package/build/plugins/resource/frontend/index.d.ts.map +1 -1
  219. package/build/plugins/resource/frontend/index.js +27 -45
  220. package/build/plugins/resource/frontend/index.js.map +1 -1
  221. package/build/plugins/resource/frontend/interface.d.ts +13 -0
  222. package/build/plugins/resource/frontend/interface.d.ts.map +1 -0
  223. package/build/plugins/resource/frontend/interface.js +3 -0
  224. package/build/plugins/resource/frontend/interface.js.map +1 -0
  225. package/build/plugins/resource/frontend/ops/deploy.d.ts +3 -0
  226. package/build/plugins/resource/frontend/ops/deploy.d.ts.map +1 -1
  227. package/build/plugins/resource/frontend/ops/deploy.js +43 -0
  228. package/build/plugins/resource/frontend/ops/deploy.js.map +1 -1
  229. package/build/plugins/resource/frontend/ops/scaffold.d.ts.map +1 -1
  230. package/build/plugins/resource/frontend/ops/scaffold.js +1 -1
  231. package/build/plugins/resource/frontend/ops/scaffold.js.map +1 -1
  232. package/build/plugins/resource/frontend/plugin.d.ts +3 -3
  233. package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
  234. package/build/plugins/resource/frontend/plugin.js +13 -44
  235. package/build/plugins/resource/frontend/plugin.js.map +1 -1
  236. package/build/plugins/resource/frontend/resources/errors.d.ts +23 -20
  237. package/build/plugins/resource/frontend/resources/errors.d.ts.map +1 -1
  238. package/build/plugins/resource/frontend/resources/errors.js +31 -67
  239. package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
  240. package/build/plugins/resource/frontend/resources/templateInfo.js +1 -1
  241. package/build/plugins/resource/frontend/resources/templateInfo.js.map +1 -1
  242. package/build/plugins/resource/frontend/utils/logger.d.ts +3 -1
  243. package/build/plugins/resource/frontend/utils/logger.d.ts.map +1 -1
  244. package/build/plugins/resource/frontend/utils/logger.js +9 -6
  245. package/build/plugins/resource/frontend/utils/logger.js.map +1 -1
  246. package/build/plugins/resource/frontend/utils/progress-helper.d.ts +0 -8
  247. package/build/plugins/resource/frontend/utils/progress-helper.d.ts.map +1 -1
  248. package/build/plugins/resource/frontend/utils/progress-helper.js +1 -19
  249. package/build/plugins/resource/frontend/utils/progress-helper.js.map +1 -1
  250. package/build/plugins/resource/frontend/v2/index.d.ts +1 -0
  251. package/build/plugins/resource/frontend/v2/index.d.ts.map +1 -1
  252. package/build/plugins/resource/frontend/v2/index.js +3 -0
  253. package/build/plugins/resource/frontend/v2/index.js.map +1 -1
  254. package/build/plugins/resource/frontend/v3/AzureStoragePlugin.d.ts +15 -0
  255. package/build/plugins/resource/frontend/v3/AzureStoragePlugin.d.ts.map +1 -0
  256. package/build/plugins/resource/frontend/v3/AzureStoragePlugin.js +149 -0
  257. package/build/plugins/resource/frontend/v3/AzureStoragePlugin.js.map +1 -0
  258. package/build/plugins/resource/frontend/v3/ReactTabScaffoldPlugin.d.ts +8 -0
  259. package/build/plugins/resource/frontend/v3/ReactTabScaffoldPlugin.d.ts.map +1 -0
  260. package/build/plugins/resource/frontend/v3/ReactTabScaffoldPlugin.js +95 -0
  261. package/build/plugins/resource/frontend/v3/ReactTabScaffoldPlugin.js.map +1 -0
  262. package/build/plugins/resource/frontend/v3/error.d.ts +23 -0
  263. package/build/plugins/resource/frontend/v3/error.d.ts.map +1 -0
  264. package/build/plugins/resource/frontend/v3/error.js +66 -0
  265. package/build/plugins/resource/frontend/v3/error.js.map +1 -0
  266. package/build/plugins/resource/frontend/v3/index.d.ts +3 -0
  267. package/build/plugins/resource/frontend/v3/index.d.ts.map +1 -0
  268. package/build/plugins/resource/frontend/v3/index.js +7 -0
  269. package/build/plugins/resource/frontend/v3/index.js.map +1 -0
  270. package/build/plugins/resource/function/index.d.ts +1 -1
  271. package/build/plugins/resource/function/index.d.ts.map +1 -1
  272. package/build/plugins/resource/function/index.js +8 -21
  273. package/build/plugins/resource/function/index.js.map +1 -1
  274. package/build/plugins/resource/function/ops/deploy.d.ts.map +1 -1
  275. package/build/plugins/resource/function/ops/deploy.js +8 -9
  276. package/build/plugins/resource/function/ops/deploy.js.map +1 -1
  277. package/build/plugins/resource/function/ops/scaffold.js +1 -1
  278. package/build/plugins/resource/function/ops/scaffold.js.map +1 -1
  279. package/build/plugins/resource/function/plugin.d.ts.map +1 -1
  280. package/build/plugins/resource/function/plugin.js +33 -134
  281. package/build/plugins/resource/function/plugin.js.map +1 -1
  282. package/build/plugins/resource/function/resources/message.d.ts +0 -1
  283. package/build/plugins/resource/function/resources/message.d.ts.map +1 -1
  284. package/build/plugins/resource/function/resources/message.js +0 -1
  285. package/build/plugins/resource/function/resources/message.js.map +1 -1
  286. package/build/plugins/resource/function/utils/depsChecker/funcHelper.d.ts +11 -0
  287. package/build/plugins/resource/function/utils/depsChecker/funcHelper.d.ts.map +1 -0
  288. package/build/plugins/resource/function/utils/depsChecker/funcHelper.js +48 -0
  289. package/build/plugins/resource/function/utils/depsChecker/funcHelper.js.map +1 -0
  290. package/build/plugins/resource/function/utils/depsChecker/funcPluginLogger.d.ts +6 -4
  291. package/build/plugins/resource/function/utils/depsChecker/funcPluginLogger.d.ts.map +1 -1
  292. package/build/plugins/resource/function/utils/depsChecker/funcPluginLogger.js +15 -8
  293. package/build/plugins/resource/function/utils/depsChecker/funcPluginLogger.js.map +1 -1
  294. package/build/plugins/resource/function/utils/depsChecker/funcPluginTelemetry.d.ts +4 -3
  295. package/build/plugins/resource/function/utils/depsChecker/funcPluginTelemetry.d.ts.map +1 -1
  296. package/build/plugins/resource/function/utils/depsChecker/funcPluginTelemetry.js +5 -4
  297. package/build/plugins/resource/function/utils/depsChecker/funcPluginTelemetry.js.map +1 -1
  298. package/build/plugins/resource/function/utils/telemetry-helper.d.ts +1 -1
  299. package/build/plugins/resource/function/utils/telemetry-helper.d.ts.map +1 -1
  300. package/build/plugins/resource/identity/index.d.ts +0 -1
  301. package/build/plugins/resource/identity/index.d.ts.map +1 -1
  302. package/build/plugins/resource/identity/index.js +2 -20
  303. package/build/plugins/resource/identity/index.js.map +1 -1
  304. package/build/plugins/resource/simpleauth/index.d.ts.map +1 -1
  305. package/build/plugins/resource/simpleauth/index.js +1 -6
  306. package/build/plugins/resource/simpleauth/index.js.map +1 -1
  307. package/build/plugins/resource/simpleauth/plugin.d.ts.map +1 -1
  308. package/build/plugins/resource/simpleauth/plugin.js +0 -3
  309. package/build/plugins/resource/simpleauth/plugin.js.map +1 -1
  310. package/build/plugins/resource/spfx/plugin.d.ts.map +1 -1
  311. package/build/plugins/resource/spfx/plugin.js +14 -9
  312. package/build/plugins/resource/spfx/plugin.js.map +1 -1
  313. package/build/plugins/resource/spfx/utils/constants.d.ts +5 -4
  314. package/build/plugins/resource/spfx/utils/constants.d.ts.map +1 -1
  315. package/build/plugins/resource/spfx/utils/constants.js +5 -4
  316. package/build/plugins/resource/spfx/utils/constants.js.map +1 -1
  317. package/build/plugins/resource/spfx/utils/progress-helper.d.ts.map +1 -1
  318. package/build/plugins/resource/spfx/utils/progress-helper.js +1 -1
  319. package/build/plugins/resource/spfx/utils/progress-helper.js.map +1 -1
  320. package/build/plugins/resource/sql/index.d.ts.map +1 -1
  321. package/build/plugins/resource/sql/index.js +1 -9
  322. package/build/plugins/resource/sql/index.js.map +1 -1
  323. package/build/plugins/resource/sql/plugin.d.ts.map +1 -1
  324. package/build/plugins/resource/sql/plugin.js +26 -58
  325. package/build/plugins/resource/sql/plugin.js.map +1 -1
  326. package/build/plugins/resource/utils4v2.d.ts +1 -1
  327. package/build/plugins/resource/utils4v2.d.ts.map +1 -1
  328. package/build/plugins/resource/utils4v2.js +3 -3
  329. package/build/plugins/resource/utils4v2.js.map +1 -1
  330. package/build/plugins/solution/fx-solution/arm.d.ts +9 -2
  331. package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
  332. package/build/plugins/solution/fx-solution/arm.js +45 -11
  333. package/build/plugins/solution/fx-solution/arm.js.map +1 -1
  334. package/build/plugins/solution/fx-solution/commonQuestions.d.ts +4 -3
  335. package/build/plugins/solution/fx-solution/commonQuestions.d.ts.map +1 -1
  336. package/build/plugins/solution/fx-solution/commonQuestions.js +11 -10
  337. package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
  338. package/build/plugins/solution/fx-solution/constants.d.ts +1 -0
  339. package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
  340. package/build/plugins/solution/fx-solution/constants.js +1 -0
  341. package/build/plugins/solution/fx-solution/constants.js.map +1 -1
  342. package/build/plugins/solution/fx-solution/debug/constants.d.ts +0 -5
  343. package/build/plugins/solution/fx-solution/debug/constants.d.ts.map +1 -1
  344. package/build/plugins/solution/fx-solution/debug/constants.js +1 -7
  345. package/build/plugins/solution/fx-solution/debug/constants.js.map +1 -1
  346. package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -1
  347. package/build/plugins/solution/fx-solution/debug/provisionLocal.js +2 -2
  348. package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -1
  349. package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts +2 -2
  350. package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts.map +1 -1
  351. package/build/plugins/solution/fx-solution/debug/scaffolding.js +5 -3
  352. package/build/plugins/solution/fx-solution/debug/scaffolding.js.map +1 -1
  353. package/build/plugins/solution/fx-solution/question.d.ts +2 -2
  354. package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
  355. package/build/plugins/solution/fx-solution/question.js +32 -22
  356. package/build/plugins/solution/fx-solution/question.js.map +1 -1
  357. package/build/plugins/solution/fx-solution/solution.d.ts.map +1 -1
  358. package/build/plugins/solution/fx-solution/solution.js +15 -15
  359. package/build/plugins/solution/fx-solution/solution.js.map +1 -1
  360. package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.d.ts +31 -0
  361. package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.d.ts.map +1 -0
  362. package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.js +222 -0
  363. package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.js.map +1 -0
  364. package/build/plugins/solution/fx-solution/v2/adaptor.js +1 -1
  365. package/build/plugins/solution/fx-solution/v2/adaptor.js.map +1 -1
  366. package/build/plugins/solution/fx-solution/v2/createEnv.d.ts.map +1 -1
  367. package/build/plugins/solution/fx-solution/v2/createEnv.js +1 -3
  368. package/build/plugins/solution/fx-solution/v2/createEnv.js.map +1 -1
  369. package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts +2 -2
  370. package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
  371. package/build/plugins/solution/fx-solution/v2/executeUserTask.js +196 -122
  372. package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
  373. package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.d.ts +2 -2
  374. package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.d.ts.map +1 -1
  375. package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js +9 -14
  376. package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js.map +1 -1
  377. package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
  378. package/build/plugins/solution/fx-solution/v2/getQuestions.js +81 -96
  379. package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
  380. package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
  381. package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
  382. package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +1 -1
  383. package/build/plugins/solution/fx-solution/v2/scaffolding.js +6 -0
  384. package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +1 -1
  385. package/build/plugins/solution/fx-solution/v2/utils.js +1 -1
  386. package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
  387. package/build/plugins/solution/fx-solution/v3/addModule.d.ts +2 -4
  388. package/build/plugins/solution/fx-solution/v3/addModule.d.ts.map +1 -1
  389. package/build/plugins/solution/fx-solution/v3/addModule.js +29 -6
  390. package/build/plugins/solution/fx-solution/v3/addModule.js.map +1 -1
  391. package/build/plugins/solution/fx-solution/v3/addResource.d.ts +6 -14
  392. package/build/plugins/solution/fx-solution/v3/addResource.d.ts.map +1 -1
  393. package/build/plugins/solution/fx-solution/v3/addResource.js +23 -51
  394. package/build/plugins/solution/fx-solution/v3/addResource.js.map +1 -1
  395. package/build/plugins/solution/fx-solution/v3/constants.d.ts +2 -0
  396. package/build/plugins/solution/fx-solution/v3/constants.d.ts.map +1 -1
  397. package/build/plugins/solution/fx-solution/v3/constants.js +2 -0
  398. package/build/plugins/solution/fx-solution/v3/constants.js.map +1 -1
  399. package/build/plugins/solution/fx-solution/v3/deploy.d.ts +1 -3
  400. package/build/plugins/solution/fx-solution/v3/deploy.d.ts.map +1 -1
  401. package/build/plugins/solution/fx-solution/v3/deploy.js.map +1 -1
  402. package/build/plugins/solution/fx-solution/v3/init.d.ts.map +1 -1
  403. package/build/plugins/solution/fx-solution/v3/init.js +9 -0
  404. package/build/plugins/solution/fx-solution/v3/init.js.map +1 -1
  405. package/build/plugins/solution/fx-solution/v3/provision.d.ts +8 -1
  406. package/build/plugins/solution/fx-solution/v3/provision.d.ts.map +1 -1
  407. package/build/plugins/solution/fx-solution/v3/provision.js +219 -16
  408. package/build/plugins/solution/fx-solution/v3/provision.js.map +1 -1
  409. package/build/plugins/solution/fx-solution/v3/provisionLocal.d.ts.map +1 -1
  410. package/build/plugins/solution/fx-solution/v3/provisionLocal.js +96 -1
  411. package/build/plugins/solution/fx-solution/v3/provisionLocal.js.map +1 -1
  412. package/build/plugins/solution/fx-solution/v3/scaffold.d.ts +8 -13
  413. package/build/plugins/solution/fx-solution/v3/scaffold.d.ts.map +1 -1
  414. package/build/plugins/solution/fx-solution/v3/scaffold.js +30 -52
  415. package/build/plugins/solution/fx-solution/v3/scaffold.js.map +1 -1
  416. package/build/plugins/solution/spfx-solution/addModule.d.ts +2 -4
  417. package/build/plugins/solution/spfx-solution/addModule.d.ts.map +1 -1
  418. package/build/plugins/solution/spfx-solution/addModule.js +1 -1
  419. package/build/plugins/solution/spfx-solution/addModule.js.map +1 -1
  420. package/build/plugins/solution/spfx-solution/scaffold.d.ts +2 -10
  421. package/build/plugins/solution/spfx-solution/scaffold.d.ts.map +1 -1
  422. package/build/plugins/solution/spfx-solution/scaffold.js +3 -39
  423. package/build/plugins/solution/spfx-solution/scaffold.js.map +1 -1
  424. package/build/plugins/solution/spfx-solution/solution.d.ts +12 -17
  425. package/build/plugins/solution/spfx-solution/solution.d.ts.map +1 -1
  426. package/build/plugins/solution/spfx-solution/solution.js +7 -7
  427. package/build/plugins/solution/spfx-solution/solution.js.map +1 -1
  428. package/package.json +6 -7
  429. package/resource/strings.json +17 -7
  430. package/templates/plugins/resource/apim/bicep/apimConfiguration.bicep +1 -0
  431. package/templates/plugins/resource/apim/bicep/apimProvision.bicep +7 -5
  432. package/templates/plugins/resource/apim/bicep/config.template.bicep +1 -0
  433. package/templates/plugins/resource/bot/bicep/botConfiguration.template.bicep +12 -12
  434. package/templates/plugins/resource/bot/bicep/botProvision.template.bicep +15 -11
  435. package/templates/plugins/resource/bot/bicep/config.template.bicep +2 -0
  436. package/templates/plugins/resource/frontend/bicep/frontendHostingProvision.bicep +4 -2
  437. package/templates/plugins/resource/frontend/bicep/provision.template.bicep +1 -0
  438. package/templates/plugins/resource/function/bicep/config.template.bicep +2 -0
  439. package/templates/plugins/resource/function/bicep/functionConfiguration.template.bicep +15 -15
  440. package/templates/plugins/resource/function/bicep/functionProvision.template.bicep +17 -14
  441. package/templates/plugins/resource/identity/bicep/identityProvision.template.bicep +2 -1
  442. package/templates/plugins/resource/keyvault/bicep/keyVaultProvision.template.bicep +9 -7
  443. package/templates/plugins/resource/simpleauth/bicep/config.template.bicep +2 -0
  444. package/templates/plugins/resource/simpleauth/bicep/simpleAuthConfiguration.template.bicep +7 -7
  445. package/templates/plugins/resource/simpleauth/bicep/simpleAuthProvision.template.bicep +9 -6
  446. package/templates/plugins/resource/sql/bicep/sqlProvision.template.bicep +8 -5
  447. package/templates/plugins/resource/webapp/bicep/config.template.bicep +10 -0
  448. package/templates/plugins/resource/webapp/bicep/provision.template.bicep +16 -0
  449. package/templates/plugins/resource/webapp/bicep/webappConfiguration.template.bicep +74 -0
  450. package/templates/plugins/resource/webapp/bicep/webappProvision.template.bicep +48 -0
  451. package/build/common/templates.d.ts.map +0 -1
  452. package/build/common/templates.js.map +0 -1
  453. package/build/common/templatesActions.d.ts.map +0 -1
  454. package/build/common/templatesActions.js.map +0 -1
  455. package/build/common/templatesUtils.d.ts.map +0 -1
  456. package/build/common/templatesUtils.js.map +0 -1
  457. package/build/core/middleware/projectUpgrader.d.ts +0 -6
  458. package/build/core/middleware/projectUpgrader.d.ts.map +0 -1
  459. package/build/core/middleware/projectUpgrader.js +0 -224
  460. package/build/core/middleware/projectUpgrader.js.map +0 -1
  461. package/build/plugins/resource/frontend/blazor/constants.d.ts +0 -75
  462. package/build/plugins/resource/frontend/blazor/constants.d.ts.map +0 -1
  463. package/build/plugins/resource/frontend/blazor/constants.js +0 -98
  464. package/build/plugins/resource/frontend/blazor/constants.js.map +0 -1
  465. package/build/plugins/resource/frontend/blazor/enum.js +0 -39
  466. package/build/plugins/resource/frontend/blazor/ops/provision.d.ts +0 -8
  467. package/build/plugins/resource/frontend/blazor/ops/provision.d.ts.map +0 -1
  468. package/build/plugins/resource/frontend/blazor/ops/provision.js +0 -42
  469. package/build/plugins/resource/frontend/blazor/ops/provision.js.map +0 -1
  470. package/build/plugins/resource/frontend/blazor/plugin.d.ts +0 -35
  471. package/build/plugins/resource/frontend/blazor/plugin.d.ts.map +0 -1
  472. package/build/plugins/resource/frontend/blazor/plugin.js +0 -190
  473. package/build/plugins/resource/frontend/blazor/plugin.js.map +0 -1
  474. package/build/plugins/resource/frontend/blazor/resources/errors.d.ts +0 -41
  475. package/build/plugins/resource/frontend/blazor/resources/errors.d.ts.map +0 -1
  476. package/build/plugins/resource/frontend/blazor/resources/errors.js.map +0 -1
  477. package/build/plugins/resource/frontend/blazor/resources/messages.d.ts.map +0 -1
  478. package/build/plugins/resource/frontend/blazor/resources/messages.js.map +0 -1
  479. package/build/plugins/resource/frontend/blazor/utils/azure-client.d.ts +0 -21
  480. package/build/plugins/resource/frontend/blazor/utils/azure-client.d.ts.map +0 -1
  481. package/build/plugins/resource/frontend/blazor/utils/azure-client.js +0 -47
  482. package/build/plugins/resource/frontend/blazor/utils/azure-client.js.map +0 -1
  483. package/build/plugins/resource/frontend/utils/azure-client.d.ts +0 -12
  484. package/build/plugins/resource/frontend/utils/azure-client.d.ts.map +0 -1
  485. package/build/plugins/resource/frontend/utils/azure-client.js +0 -29
  486. package/build/plugins/resource/frontend/utils/azure-client.js.map +0 -1
  487. package/build/plugins/resource/function/utils/depsChecker/backendExtensionsInstall.d.ts +0 -9
  488. package/build/plugins/resource/function/utils/depsChecker/backendExtensionsInstall.d.ts.map +0 -1
  489. package/build/plugins/resource/function/utils/depsChecker/backendExtensionsInstall.js +0 -55
  490. package/build/plugins/resource/function/utils/depsChecker/backendExtensionsInstall.js.map +0 -1
  491. package/build/plugins/resource/function/utils/depsChecker/checker.d.ts +0 -54
  492. package/build/plugins/resource/function/utils/depsChecker/checker.d.ts.map +0 -1
  493. package/build/plugins/resource/function/utils/depsChecker/checker.js +0 -104
  494. package/build/plugins/resource/function/utils/depsChecker/checker.js.map +0 -1
  495. package/build/plugins/resource/function/utils/depsChecker/common.d.ts +0 -84
  496. package/build/plugins/resource/function/utils/depsChecker/common.d.ts.map +0 -1
  497. package/build/plugins/resource/function/utils/depsChecker/common.js +0 -136
  498. package/build/plugins/resource/function/utils/depsChecker/common.js.map +0 -1
  499. package/build/plugins/resource/function/utils/depsChecker/cpUtils.d.ts +0 -22
  500. package/build/plugins/resource/function/utils/depsChecker/cpUtils.d.ts.map +0 -1
  501. package/build/plugins/resource/function/utils/depsChecker/cpUtils.js +0 -105
  502. package/build/plugins/resource/function/utils/depsChecker/cpUtils.js.map +0 -1
  503. package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.d.ts +0 -53
  504. package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.d.ts.map +0 -1
  505. package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.js +0 -387
  506. package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.js.map +0 -1
  507. package/build/plugins/resource/function/utils/depsChecker/errors.d.ts +0 -14
  508. package/build/plugins/resource/function/utils/depsChecker/errors.d.ts.map +0 -1
  509. package/build/plugins/resource/function/utils/depsChecker/errors.js +0 -41
  510. package/build/plugins/resource/function/utils/depsChecker/errors.js.map +0 -1
  511. package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.d.ts +0 -26
  512. package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.d.ts.map +0 -1
  513. package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.js +0 -111
  514. package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.js.map +0 -1
  515. package/build/plugins/solution/fx-solution/debug/util/certificate.d.ts.map +0 -1
  516. package/build/plugins/solution/fx-solution/debug/util/certificate.js.map +0 -1
  517. package/build/plugins/solution/fx-solution/debug/util/process.d.ts.map +0 -1
  518. package/build/plugins/solution/fx-solution/debug/util/process.js.map +0 -1
  519. package/resource/plugins/resource/function/dotnet-install.ps1 +0 -1095
  520. package/resource/plugins/resource/function/dotnet-install.sh +0 -1222
@@ -2,9 +2,10 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.addResource = exports.getQuestionsForAddResource = exports.SPFxResourcePlugin = exports.AzureWebAppPlugin = exports.AzureBotPlugin = exports.AzureStoragePlugin = void 0;
5
+ exports.addResource = exports.getQuestionsForAddResource = exports.SPFxResourcePlugin = exports.AzureWebAppPlugin = exports.AzureBotPlugin = void 0;
6
6
  const tslib_1 = require("tslib");
7
7
  const teamsfx_api_1 = require("@microsoft/teamsfx-api");
8
+ const lodash_1 = require("lodash");
8
9
  const typedi_1 = require("typedi");
9
10
  const arm_1 = tslib_1.__importDefault(require("../arm"));
10
11
  const constants_1 = require("./constants");
@@ -12,51 +13,9 @@ const error_1 = require("./error");
12
13
  const questions_1 = require("../../utils/questions");
13
14
  const utils_1 = require("./utils");
14
15
  const error_2 = require("../../utils/error");
15
- let AzureStoragePlugin = class AzureStoragePlugin {
16
- constructor() {
17
- this.resourceType = "Azure Storage";
18
- this.description = "Azure Storage";
19
- this.name = constants_1.BuiltInResourcePluginNames.storage;
20
- }
21
- async generateResourceTemplate(ctx, inputs) {
22
- return teamsfx_api_1.ok({
23
- kind: "bicep",
24
- template: {
25
- Provision: {
26
- Orchestration: "Orchestration",
27
- Reference: {
28
- endpoint: "provisionOutputs.azureStorageOutput.value.endpoint",
29
- domain: "provisionOutputs.azureStorageOutput.value.domain",
30
- },
31
- Modules: {
32
- azureStorage: "",
33
- },
34
- },
35
- Parameters: {
36
- azureStorageK1: "v1",
37
- },
38
- },
39
- });
40
- }
41
- async provisionResource(ctx, inputs, envInfo, tokenProvider) {
42
- const config = {
43
- domain: "huajie1214dev35e42dtab.z19.web.core.windows.net",
44
- endpoint: "https://huajie1214dev35e42dtab.z19.web.core.windows.net",
45
- storageResourceId: "/subscriptions/63f43cd3-ab63-429d-80ad-950ec8359724/resourceGroups/fullcap-dev-rg/providers/Microsoft.Storage/storageAccounts/huajie1214dev35e42dtab",
46
- };
47
- return teamsfx_api_1.ok(config);
48
- }
49
- async deploy(ctx, inputs, envInfo, tokenProvider) {
50
- ctx.logProvider.info(`fx-resource-azure-storage deploy success!`);
51
- return teamsfx_api_1.ok(teamsfx_api_1.Void);
52
- }
53
- };
54
- AzureStoragePlugin = tslib_1.__decorate([
55
- typedi_1.Service(constants_1.BuiltInResourcePluginNames.storage)
56
- ], AzureStoragePlugin);
57
- exports.AzureStoragePlugin = AzureStoragePlugin;
58
16
  let AzureBotPlugin = class AzureBotPlugin {
59
17
  constructor() {
18
+ this.type = "resource";
60
19
  this.resourceType = "Azure Bot";
61
20
  this.description = "Azure Bot";
62
21
  this.name = constants_1.BuiltInResourcePluginNames.bot;
@@ -107,6 +66,7 @@ AzureBotPlugin = tslib_1.__decorate([
107
66
  exports.AzureBotPlugin = AzureBotPlugin;
108
67
  let AzureWebAppPlugin = class AzureWebAppPlugin {
109
68
  constructor() {
69
+ this.type = "resource";
110
70
  this.resourceType = "Azure Web App";
111
71
  this.description = "Azure Web App";
112
72
  this.name = constants_1.BuiltInResourcePluginNames.webApp;
@@ -149,6 +109,7 @@ AzureWebAppPlugin = tslib_1.__decorate([
149
109
  exports.AzureWebAppPlugin = AzureWebAppPlugin;
150
110
  let SPFxResourcePlugin = class SPFxResourcePlugin {
151
111
  constructor() {
112
+ this.type = "resource";
152
113
  this.resourceType = "SPFx resource";
153
114
  this.description = "SPFx resource";
154
115
  this.name = constants_1.BuiltInResourcePluginNames.spfx;
@@ -163,11 +124,7 @@ SPFxResourcePlugin = tslib_1.__decorate([
163
124
  ], SPFxResourcePlugin);
164
125
  exports.SPFxResourcePlugin = SPFxResourcePlugin;
165
126
  function getAllResourcePlugins() {
166
- return [
167
- typedi_1.Container.get(constants_1.BuiltInResourcePluginNames.webApp),
168
- typedi_1.Container.get(constants_1.BuiltInResourcePluginNames.bot),
169
- typedi_1.Container.get(constants_1.BuiltInResourcePluginNames.webApp),
170
- ];
127
+ return [typedi_1.Container.get(constants_1.BuiltInResourcePluginNames.storage)];
171
128
  }
172
129
  async function getQuestionsForAddResource(ctx, inputs) {
173
130
  const solutionSettings = ctx.projectSetting.solutionSettings;
@@ -194,6 +151,8 @@ async function addResource(ctx, inputs) {
194
151
  return teamsfx_api_1.err(new error_2.InvalidInputError(inputs, "inputs.resource undefined"));
195
152
  }
196
153
  const solutionSettings = ctx.projectSetting.solutionSettings;
154
+ const originalSettings = lodash_1.cloneDeep(solutionSettings);
155
+ const inputsNew = Object.assign(Object.assign({}, inputs), { existingResources: originalSettings.activeResourcePlugins });
197
156
  if (inputs.module !== undefined) {
198
157
  const module = utils_1.getModule(solutionSettings, inputs.module);
199
158
  if (module) {
@@ -215,10 +174,18 @@ async function addResource(ctx, inputs) {
215
174
  addedResourceNames.forEach((s) => allResourceNames.add(s));
216
175
  existingResourceNames.forEach((s) => allResourceNames.add(s));
217
176
  solutionSettings.activeResourcePlugins = Array.from(allResourceNames);
177
+ // read manifest
178
+ const appStudio = typedi_1.Container.get(constants_1.BuiltInResourcePluginNames.appStudio);
179
+ const manifestRes = await appStudio.loadManifest(ctx, inputs);
180
+ if (manifestRes.isErr()) {
181
+ return teamsfx_api_1.err(manifestRes.error);
182
+ }
183
+ const manifest = manifestRes.value;
184
+ const contextWithManifest = Object.assign(Object.assign({}, ctx), { appManifest: manifest });
218
185
  //call arm module to generate arm templates
219
186
  const activatedPlugins = solutionSettings.activeResourcePlugins.map((n) => typedi_1.Container.get(n));
220
187
  const addedPlugins = Array.from(addedResourceNames).map((n) => typedi_1.Container.get(n));
221
- const armRes = await arm_1.default.generateArmTemplate(ctx, inputs, activatedPlugins, addedPlugins);
188
+ const armRes = await arm_1.default.generateArmTemplate(contextWithManifest, inputsNew, activatedPlugins, addedPlugins);
222
189
  if (armRes.isErr()) {
223
190
  return teamsfx_api_1.err(armRes.error);
224
191
  }
@@ -227,13 +194,18 @@ async function addResource(ctx, inputs) {
227
194
  const plugin = typedi_1.Container.get(pluginName);
228
195
  if (addedResourceNames.has(pluginName) && !existingResourceNames.has(pluginName)) {
229
196
  if (plugin.addResource) {
230
- const res = await plugin.addResource(ctx, inputs);
197
+ const res = await plugin.addResource(contextWithManifest, inputsNew);
231
198
  if (res.isErr()) {
232
199
  return teamsfx_api_1.err(res.error);
233
200
  }
234
201
  }
235
202
  }
236
203
  }
204
+ // write manifest
205
+ const writeRes = await appStudio.saveManifest(ctx, inputs, manifest);
206
+ if (writeRes.isErr()) {
207
+ return teamsfx_api_1.err(writeRes.error);
208
+ }
237
209
  return teamsfx_api_1.ok(teamsfx_api_1.Void);
238
210
  }
239
211
  exports.addResource = addResource;
@@ -1 +1 @@
1
- {"version":3,"file":"addResource.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/addResource.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAagC;AAChC,mCAA4C;AAC5C,yDAAyB;AACzB,2CAAyD;AACzD,mCAAoD;AACpD,qDAA+F;AAC/F,mCAAoC;AACpC,6CAAsD;AAEtD,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;IAA/B;QACE,iB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CAAC,CAAC;gBAClD,IAAI,GAAG,CAAC,KAAK,EAAE,EAAE;oBACf,OAAO,iBAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;iBACvB;aACF;SACF;KACF;IACD,OAAO,gBAAE,CAAC,kBAAI,CAAC,CAAC;AAClB,CAAC;AAtDD,kCAsDC;AAED,KAAK,UAAU,2BAA2B,CACxC,GAAe,EACf,MAAyE,EACzE,kBAA+B;IAE/B,OAAO,IAAI,EAAE;QACX,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC;QACtC,KAAK,MAAM,IAAI,IAAI,kBAAkB,EAAE;YACrC,MAAM,MAAM,GAAG,kBAAS,CAAC,GAAG,CAAoB,IAAI,CAAC,CAAC;YACtD,IAAI,MAAM,CAAC,kBAAkB,EAAE;gBAC7B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;gBAC5D,IAAI,MAAM,CAAC,KAAK,EAAE,EAAE;oBAClB,OAAO,iBAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;iBAC1B;gBACD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE;oBAC9B,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;iBAC7B;aACF;SACF;QACD,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC;QACtC,IAAI,KAAK,KAAK,KAAK;YAAE,MAAM;KAC5B;IACD,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"addResource.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/addResource.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAagC;AAChC,mCAAmC;AACnC,mCAA4C;AAC5C,yDAAyB;AACzB,2CAAyD;AACzD,mCAAoD;AACpD,qDAA+F;AAC/F,mCAAoC;AACpC,6CAAsD;AAGtD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AC,IAAI,CAAC;QACtC,KAAK,MAAM,IAAI,IAAI,kBAAkB,EAAE;YACrC,MAAM,MAAM,GAAG,kBAAS,CAAC,GAAG,CAAoB,IAAI,CAAC,CAAC;YACtD,IAAI,MAAM,CAAC,kBAAkB,EAAE;gBAC7B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;gBAC5D,IAAI,MAAM,CAAC,KAAK,EAAE,EAAE;oBAClB,OAAO,iBAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;iBAC1B;gBACD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE;oBAC9B,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;iBAC7B;aACF;SACF;QACD,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC;QACtC,IAAI,KAAK,KAAK,KAAK;YAAE,MAAM;KAC5B;IACD,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;AACvB,CAAC"}
@@ -7,9 +7,11 @@ export declare const BuiltInResourcePluginNames: {
7
7
  appStudio: string;
8
8
  aad: string;
9
9
  bot: string;
10
+ function: string;
10
11
  webApp: string;
11
12
  storage: string;
12
13
  spfx: string;
14
+ simpleAuth: string;
13
15
  };
14
16
  export declare const BuiltInScaffoldPluginNames: {
15
17
  blazor: string;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AACjE,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC;AACF,eAAO,MAAM,0BAA0B;;;;;;;CAOtC,CAAC;AACF,eAAO,MAAM,0BAA0B;;;;;CAKtC,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AACjE,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC;AACF,eAAO,MAAM,0BAA0B;;;;;;;;;CAStC,CAAC;AACF,eAAO,MAAM,0BAA0B;;;;;CAKtC,CAAC"}
@@ -12,9 +12,11 @@ exports.BuiltInResourcePluginNames = {
12
12
  appStudio: "fx-resource-appstudio",
13
13
  aad: "fx-resource-aad",
14
14
  bot: "fx-resource-bot",
15
+ function: "fx-resource-function",
15
16
  webApp: "fx-resource-azure-web-app",
16
17
  storage: "fx-resource-azure-storage",
17
18
  spfx: "fx-resource-spfx",
19
+ simpleAuth: "fx-resource-simple-auth",
18
20
  };
19
21
  exports.BuiltInScaffoldPluginNames = {
20
22
  blazor: "fx-scaffold-blazor",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,0BAA0B,GAAG,sBAAsB,CAAC;AACpD,QAAA,oBAAoB,GAAG;IAClC,KAAK,EAAE,kCAA0B;IACjC,IAAI,EAAE,kBAAkB;CACzB,CAAC;AACW,QAAA,0BAA0B,GAAG;IACxC,SAAS,EAAE,uBAAuB;IAClC,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,iBAAiB;IACtB,MAAM,EAAE,2BAA2B;IACnC,OAAO,EAAE,2BAA2B;IACpC,IAAI,EAAE,kBAAkB;CACzB,CAAC;AACW,QAAA,0BAA0B,GAAG;IACxC,MAAM,EAAE,oBAAoB;IAC5B,GAAG,EAAE,uBAAuB;IAC5B,IAAI,EAAE,kBAAkB;IACxB,GAAG,EAAE,iBAAiB;CACvB,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,0BAA0B,GAAG,sBAAsB,CAAC;AACpD,QAAA,oBAAoB,GAAG;IAClC,KAAK,EAAE,kCAA0B;IACjC,IAAI,EAAE,kBAAkB;CACzB,CAAC;AACW,QAAA,0BAA0B,GAAG;IACxC,SAAS,EAAE,uBAAuB;IAClC,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,iBAAiB;IACtB,QAAQ,EAAE,sBAAsB;IAChC,MAAM,EAAE,2BAA2B;IACnC,OAAO,EAAE,2BAA2B;IACpC,IAAI,EAAE,kBAAkB;IACxB,UAAU,EAAE,yBAAyB;CACtC,CAAC;AACW,QAAA,0BAA0B,GAAG;IACxC,MAAM,EAAE,oBAAoB;IAC5B,GAAG,EAAE,uBAAuB;IAC5B,IAAI,EAAE,kBAAkB;IACxB,GAAG,EAAE,iBAAiB;CACvB,CAAC"}
@@ -1,6 +1,4 @@
1
1
  import { FxError, QTreeNode, Result, TokenProvider, v2, v3, Void } from "@microsoft/teamsfx-api";
2
2
  export declare function getQuestionsForDeploy(ctx: v2.Context, inputs: v2.InputsWithProjectPath, envInfo: v2.DeepReadonly<v3.EnvInfoV3>, tokenProvider: TokenProvider): Promise<Result<QTreeNode | undefined, FxError>>;
3
- export declare function deploy(ctx: v2.Context, inputs: v2.InputsWithProjectPath & {
4
- modules: string[];
5
- }, envInfo: v2.DeepReadonly<v3.EnvInfoV3>, tokenProvider: TokenProvider): Promise<Result<Void, FxError>>;
3
+ export declare function deploy(ctx: v2.Context, inputs: v3.SolutionDeployInputs, envInfo: v2.DeepReadonly<v3.EnvInfoV3>, tokenProvider: TokenProvider): Promise<Result<Void, FxError>>;
6
4
  //# sourceMappingURL=deploy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/deploy.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,OAAO,EAEP,SAAS,EACT,MAAM,EACN,aAAa,EACb,EAAE,EACF,EAAE,EACF,IAAI,EACL,MA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AAE;QAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CACrB,YAAY,kBAAU,EAAE,CAAC,QAAQ,CAAC,mBAAmB,EAAE,EACvD,GAAG,CAAC,cAAc,CAAC,OAAO,CAC3B,CAAC;QACF,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,GAAG,CAAC,eAAe,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QACpD,OAAO,gBAAE,CAAC,kBAAI,CAAC,CAAC;KACjB;SAAM;QACL,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAU,EAAE,CAAC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC5F,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,OAAO,iBAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KAC1B;AACH,CAAC;AAlDD,wBAkDC"}
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/init.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAM,SAAS,EAAE,MAAM,EAAE,EAAE,EAAM,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAS9F,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAUjD;AAED,wBAAsB,IAAI,CACxB,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,EAAE,CAAC,qBAAqB,GAC/B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAYhC"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/init.ts"],"names":[],"mappings":"AAGA,OAAO,EAAO,OAAO,EAAE,MAAM,EAAM,SAAS,EAAE,MAAM,EAAE,EAAE,EAAM,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAWnG,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAUjD;AAED,wBAAsB,IAAI,CACxB,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,EAAE,CAAC,qBAAqB,GAC/B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAmBhC"}
@@ -3,9 +3,11 @@
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.init = exports.getQuestionsForInit = void 0;
6
+ const tslib_1 = require("tslib");
6
7
  const teamsfx_api_1 = require("@microsoft/teamsfx-api");
7
8
  const constants_1 = require("./constants");
8
9
  const question_1 = require("../question");
10
+ const typedi_1 = tslib_1.__importDefault(require("typedi"));
9
11
  async function getQuestionsForInit(ctx, inputs) {
10
12
  const node = new teamsfx_api_1.QTreeNode({
11
13
  name: "set-azure-solution",
@@ -19,6 +21,7 @@ async function getQuestionsForInit(ctx, inputs) {
19
21
  }
20
22
  exports.getQuestionsForInit = getQuestionsForInit;
21
23
  async function init(ctx, inputs) {
24
+ // 1. init solution settings
22
25
  const solutionSettings = {
23
26
  version: "3.0.0",
24
27
  name: ctx.projectSetting.solutionSettings.name,
@@ -29,6 +32,12 @@ async function init(ctx, inputs) {
29
32
  activeResourcePlugins: [],
30
33
  };
31
34
  ctx.projectSetting.solutionSettings = solutionSettings;
35
+ // 2. call appStudio.init() to generate manifest templates
36
+ const appStudio = typedi_1.default.get(constants_1.BuiltInResourcePluginNames.appStudio);
37
+ const initManifestRes = await appStudio.init(ctx, inputs);
38
+ if (initManifestRes.isErr()) {
39
+ return teamsfx_api_1.err(initManifestRes.error);
40
+ }
32
41
  return teamsfx_api_1.ok(teamsfx_api_1.Void);
33
42
  }
34
43
  exports.init = init;
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/init.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,wDAA8F;AAC9F,2CAAmD;AACnD,0CAKqB;AAEd,KAAK,UAAU,mBAAmB,CACvC,GAAe,EACf,MAAc;IAEd,MAAM,IAAI,GAAG,IAAI,uBAAS,CAAC;QACzB,IAAI,EAAE,oBAAoB;QAC1B,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,CAAC,MAAc,EAAE,EAAE;YACvB,MAAM,CAAC,qCAA0B,CAAC,QAAQ,CAAC,GAAG,gCAAoB,CAAC,KAAK,CAAC;QAC3E,CAAC;KACF,CAAC,CAAC;IACH,IAAI,CAAC,SAAS,GAAG,EAAE,WAAW,EAAE,CAAC,wBAAa,CAAC,EAAE,EAAE,wBAAa,CAAC,EAAE,EAAE,+BAAoB,CAAC,EAAE,CAAC,EAAE,CAAC;IAChG,OAAO,gBAAE,CAAC,IAAI,CAAC,CAAC;AAClB,CAAC;AAbD,kDAaC;AAEM,KAAK,UAAU,IAAI,CACxB,GAAe,EACf,MAAgC;IAEhC,MAAM,gBAAgB,GAA+B;QACnD,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC,gBAAgB,CAAC,IAAI;QAC9C,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,OAAO;QACjB,cAAc,EAAE,EAAE;QAClB,OAAO,EAAE,EAAE;QACX,qBAAqB,EAAE,EAAE;KAC1B,CAAC;IACF,GAAG,CAAC,cAAc,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IACvD,OAAO,gBAAE,CAAC,kBAAI,CAAC,CAAC;AAClB,CAAC;AAf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E,MAAM,CAAC,CAAC;IAC1D,IAAI,eAAe,CAAC,KAAK,EAAE,EAAE;QAC3B,OAAO,iBAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KACnC;IACD,OAAO,gBAAE,CAAC,kBAAI,CAAC,CAAC;AAClB,CAAC;AAtBD,oBAsBC"}
@@ -1,4 +1,11 @@
1
- import { FxError, QTreeNode, Result, TokenProvider, v2, v3 } from "@microsoft/teamsfx-api";
1
+ import { AppStudioTokenProvider, AzureAccountProvider, FxError, QTreeNode, Result, TokenProvider, v2, v3, Void } from "@microsoft/teamsfx-api";
2
2
  export declare function getQuestionsForProvision(ctx: v2.Context, inputs: v2.InputsWithProjectPath, tokenProvider: TokenProvider, envInfo?: v2.DeepReadonly<v3.EnvInfoV3>): Promise<Result<QTreeNode | undefined, FxError>>;
3
3
  export declare function provisionResources(ctx: v2.Context, inputs: v2.InputsWithProjectPath, envInfo: v3.EnvInfoV3, tokenProvider: TokenProvider): Promise<Result<v3.EnvInfoV3, FxError>>;
4
+ /**
5
+ * make sure subscription is correct
6
+ *
7
+ */
8
+ export declare function checkAzureSubscription(ctx: v2.Context, envInfo: v3.EnvInfoV3, azureAccountProvider: AzureAccountProvider): Promise<Result<Void, FxError>>;
9
+ export declare function askForProvisionConsent(ctx: v2.Context, azureAccountProvider: AzureAccountProvider, envInfo: v3.EnvInfoV3): Promise<Result<Void, FxError>>;
10
+ export declare function getM365TenantId(appStudioTokenProvider: AppStudioTokenProvider): Promise<Result<string, FxError>>;
4
11
  //# sourceMappingURL=provision.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provision.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/provision.ts"],"names":[],"mappings":"AAGA,OAAO,EAAO,OAAO,EAAM,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAUpG,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,EAAE,CAAC,qBAAqB,EAChC,aAAa,EAAE,aAAa,EAC5B,OAAO,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,GACtC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAmBjD;AACD,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,EAAE,CAAC,qBAAqB,EAChC,OAAO,EAAE,EAAE,CAAC,SAAS,EACrB,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CA2HxC"}
1
+ {"version":3,"file":"provision.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v3/provision.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EAIpB,OAAO,EAEP,SAAS,EACT,MAAM,EAEN,aAAa,EAEb,EAAE,EACF,EAAE,EACF,IAAI,EACL,MAAM,wBAAwB,CAAC;AAmBhC,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,EAAE,CAAC,qBAAqB,EAChC,aAAa,EAAE,aAAa,EAC5B,OAAO,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,GACtC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAmBjD;AACD,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,EAAE,CAAC,qBAAqB,EAChC,OAAO,EAAE,EAAE,CAAC,SAAS,EACrB,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAkKxC;AAED;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,OAAO,EAAE,EAAE,CAAC,SAAS,EACrB,oBAAoB,EAAE,oBAAoB,GACzC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CA4ChC;AA6JD,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,oBAAoB,EAAE,oBAAoB,EAC1C,OAAO,EAAE,EAAE,CAAC,SAAS,GACpB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CA6BhC;AAED,wBAAsB,eAAe,CACnC,sBAAsB,EAAE,sBAAsB,GAC7C,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA0BlC"}
@@ -2,17 +2,22 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.provisionResources = exports.getQuestionsForProvision = void 0;
5
+ exports.getM365TenantId = exports.askForProvisionConsent = exports.checkAzureSubscription = exports.provisionResources = exports.getQuestionsForProvision = void 0;
6
6
  const tslib_1 = require("tslib");
7
+ const arm_resources_1 = require("@azure/arm-resources");
7
8
  const teamsfx_api_1 = require("@microsoft/teamsfx-api");
8
9
  const lodash_1 = require("lodash");
9
10
  const typedi_1 = require("typedi");
10
11
  const util = tslib_1.__importStar(require("util"));
12
+ const uuid_1 = require("uuid");
11
13
  const constants_1 = require("../../../../common/constants");
14
+ const telemetry_1 = require("../../../../common/telemetry");
12
15
  const tools_1 = require("../../../../common/tools");
13
16
  const arm_1 = tslib_1.__importDefault(require("../arm"));
17
+ const constants_2 = require("../constants");
18
+ const ResourceGroupHelper_1 = require("../utils/ResourceGroupHelper");
14
19
  const executor_1 = require("../v2/executor");
15
- const utils_1 = require("../v2/utils");
20
+ const constants_3 = require("./constants");
16
21
  async function getQuestionsForProvision(ctx, inputs, tokenProvider, envInfo) {
17
22
  const solutionSetting = ctx.projectSetting.solutionSettings;
18
23
  const root = new teamsfx_api_1.QTreeNode({ type: "group" });
@@ -35,13 +40,40 @@ async function getQuestionsForProvision(ctx, inputs, tokenProvider, envInfo) {
35
40
  }
36
41
  exports.getQuestionsForProvision = getQuestionsForProvision;
37
42
  async function provisionResources(ctx, inputs, envInfo, tokenProvider) {
38
- // Just to trigger M365 login before the concurrent execution of provision.
39
- // await tokenProvider.appStudioToken.getAccessToken();
40
- // 1. check AAD permission request
41
- // 2. ask common question and fill in solution config
42
- // 3. ask for provision consent
43
- // 4. collect plugins
44
43
  const solutionSetting = ctx.projectSetting.solutionSettings;
44
+ // check M365 tenant match
45
+ const appResource = envInfo.state[constants_3.BuiltInResourcePluginNames.appStudio];
46
+ const tenantIdInConfig = appResource.tenantId;
47
+ const tenantIdInTokenRes = await getM365TenantId(tokenProvider.appStudioToken);
48
+ if (tenantIdInTokenRes.isErr()) {
49
+ return teamsfx_api_1.err(tenantIdInTokenRes.error);
50
+ }
51
+ const tenantIdInToken = tenantIdInTokenRes.value;
52
+ if (tenantIdInConfig && tenantIdInToken && tenantIdInToken !== tenantIdInConfig) {
53
+ return teamsfx_api_1.err(new teamsfx_api_1.UserError(constants_2.SolutionError.TeamsAppTenantIdNotRight, `The signed in M365 account does not match the M365 tenant in config file for '${envInfo.envName}' environment. Please sign out and sign in with the correct M365 account.`, "Solution"));
54
+ }
55
+ if (!tenantIdInConfig) {
56
+ appResource.tenantId = tenantIdInToken;
57
+ }
58
+ // ask common question and fill in solution config
59
+ const solutionConfigRes = await fillInAzureSolutionConfigs(ctx, inputs, envInfo, tokenProvider);
60
+ if (solutionConfigRes.isErr()) {
61
+ return teamsfx_api_1.err(solutionConfigRes.error);
62
+ }
63
+ // ask for provision consent
64
+ const consentResult = await askForProvisionConsent(ctx, tokenProvider.azureAccountProvider, envInfo);
65
+ if (consentResult.isErr()) {
66
+ return teamsfx_api_1.err(consentResult.error);
67
+ }
68
+ // create resource group if needed
69
+ const solutionConfig = envInfo.state.solution;
70
+ if (solutionConfig.needCreateResourceGroup) {
71
+ const createRgRes = await ResourceGroupHelper_1.resourceGroupHelper.createNewResourceGroup(solutionConfig.resourceGroupName, tokenProvider.azureAccountProvider, solutionConfig.subscriptionId, solutionConfig.location);
72
+ if (createRgRes.isErr()) {
73
+ return teamsfx_api_1.err(createRgRes.error);
74
+ }
75
+ }
76
+ // collect plugins and provisionResources
45
77
  const plugins = solutionSetting.activeResourcePlugins.map((p) => typedi_1.Container.get(p));
46
78
  const provisionThunks = plugins
47
79
  .filter((plugin) => !lodash_1.isUndefined(plugin.provisionResource))
@@ -58,26 +90,21 @@ async function provisionResources(ctx, inputs, envInfo, tokenProvider) {
58
90
  },
59
91
  };
60
92
  });
61
- // call provisionResources and collect outputs
62
93
  ctx.logProvider.info(util.format(tools_1.getStrings().solution.ProvisionStartNotice, constants_1.PluginDisplayName.Solution));
63
94
  const provisionResult = await executor_1.executeConcurrently(provisionThunks, ctx.logProvider);
64
95
  if (provisionResult.kind === "failure" || provisionResult.kind === "partialSuccess") {
65
96
  return teamsfx_api_1.err(provisionResult.error);
66
97
  }
67
- else {
68
- const update = utils_1.combineRecords(provisionResult.output);
69
- lodash_1.assign(envInfo.state, update);
70
- }
71
98
  ctx.logProvider.info(util.format(tools_1.getStrings().solution.ProvisionFinishNotice, constants_1.PluginDisplayName.Solution));
72
99
  ctx.logProvider.info(util.format(tools_1.getStrings().solution.DeployArmTemplates.StartNotice, constants_1.PluginDisplayName.Solution));
73
- //uncomment the following lines when resource plugin is ready.
74
100
  const armRes = await arm_1.default.deployArmTemplates(ctx, inputs, envInfo, tokenProvider.azureAccountProvider);
75
101
  if (armRes.isErr()) {
76
102
  return teamsfx_api_1.err(armRes.error);
77
103
  }
78
104
  ctx.logProvider.info(util.format(tools_1.getStrings().solution.DeployArmTemplates.SuccessNotice, constants_1.PluginDisplayName.Solution));
79
- // call aad.setApplicationInContext
105
+ // TODO call aad.setApplicationInContext
80
106
  ctx.logProvider.info(util.format("AAD.setApplicationInContext", constants_1.PluginDisplayName.Solution));
107
+ // collect plugins and call configureResource
81
108
  const configureResourceThunks = plugins
82
109
  .filter((plugin) => !lodash_1.isUndefined(plugin.configureResource))
83
110
  .map((plugin) => {
@@ -92,7 +119,6 @@ async function provisionResources(ctx, inputs, envInfo, tokenProvider) {
92
119
  plugin.configureResource(ctx, inputs, envInfo, tokenProvider),
93
120
  };
94
121
  });
95
- //call configResource
96
122
  const configureResourceResult = await executor_1.executeConcurrently(configureResourceThunks, ctx.logProvider);
97
123
  ctx.logProvider.info(util.format(tools_1.getStrings().solution.ConfigurationFinishNotice, constants_1.PluginDisplayName.Solution));
98
124
  const envStates = envInfo.state;
@@ -121,4 +147,181 @@ async function provisionResources(ctx, inputs, envInfo, tokenProvider) {
121
147
  return teamsfx_api_1.ok(envInfo);
122
148
  }
123
149
  exports.provisionResources = provisionResources;
150
+ /**
151
+ * make sure subscription is correct
152
+ *
153
+ */
154
+ async function checkAzureSubscription(ctx, envInfo, azureAccountProvider) {
155
+ var _a;
156
+ const state = envInfo.state;
157
+ const subscriptionId = ((_a = envInfo.config.azure) === null || _a === void 0 ? void 0 : _a.subscriptionId) || state.solution.subscriptionId;
158
+ if (!subscriptionId) {
159
+ const askSubRes = await azureAccountProvider.getSelectedSubscription(true);
160
+ if (askSubRes)
161
+ return teamsfx_api_1.ok(askSubRes);
162
+ return teamsfx_api_1.err(new teamsfx_api_1.UserError(constants_2.SolutionError.SubscriptionNotFound, "Failed to select subscription", constants_2.SolutionSource));
163
+ }
164
+ let subscriptionName = state.solution.subscriptionName;
165
+ if (subscriptionName.length > 0) {
166
+ subscriptionName = `(${subscriptionName})`;
167
+ }
168
+ // make sure the user is logged in
169
+ await azureAccountProvider.getAccountCredentialAsync(true);
170
+ // verify valid subscription (permission)
171
+ const subscriptions = await azureAccountProvider.listSubscriptions();
172
+ const targetSubInfo = subscriptions.find((item) => item.subscriptionId === subscriptionId);
173
+ if (!targetSubInfo) {
174
+ return teamsfx_api_1.err(new teamsfx_api_1.UserError(constants_2.SolutionError.SubscriptionNotFound, `The subscription '${subscriptionId}'${subscriptionName} for '${envInfo.envName}' environment is not found in the current account, please use the right Azure account or check the '${teamsfx_api_1.EnvConfigFileNameTemplate.replace(teamsfx_api_1.EnvNamePlaceholder, envInfo.envName)}' file.`, constants_2.SolutionSource));
175
+ }
176
+ state.solution.subscriptionId = targetSubInfo.subscriptionId;
177
+ state.solution.subscriptionName = targetSubInfo.subscriptionName;
178
+ state.solution.tenantId = targetSubInfo.tenantId;
179
+ ctx.logProvider.info(`[${constants_1.PluginDisplayName.Solution}] check subscriptionId pass!`);
180
+ return teamsfx_api_1.ok(teamsfx_api_1.Void);
181
+ }
182
+ exports.checkAzureSubscription = checkAzureSubscription;
183
+ /**
184
+ * Asks common questions and puts the answers in the global namespace of SolutionConfig
185
+ *
186
+ */
187
+ async function fillInAzureSolutionConfigs(ctx, inputs, envInfo, tokenProvider) {
188
+ var _a, _b, _c, _d, _e, _f, _g;
189
+ //1. check subscriptionId
190
+ const subscriptionResult = await checkAzureSubscription(ctx, envInfo, tokenProvider.azureAccountProvider);
191
+ if (subscriptionResult.isErr()) {
192
+ return teamsfx_api_1.err(subscriptionResult.error);
193
+ }
194
+ // Note setSubscription here will change the token returned by getAccountCredentialAsync according to the subscription selected.
195
+ // So getting azureToken needs to precede setSubscription.
196
+ const azureToken = await tokenProvider.azureAccountProvider.getAccountCredentialAsync();
197
+ if (azureToken === undefined) {
198
+ return teamsfx_api_1.err(new teamsfx_api_1.UserError(constants_2.SolutionError.NotLoginToAzure, "Login to Azure using the Azure Account extension", constants_2.SolutionSource));
199
+ }
200
+ //2. check resource group
201
+ (_a = ctx.telemetryReporter) === null || _a === void 0 ? void 0 : _a.sendTelemetryEvent(telemetry_1.TelemetryEvent.CheckResourceGroupStart, inputs.env ? { [telemetry_1.TelemetryProperty.Env]: tools_1.getHashedEnv(inputs.env) } : {});
202
+ const rmClient = new arm_resources_1.ResourceManagementClient(azureToken, envInfo.state.solution.subscriptionId);
203
+ // Resource group info precedence are:
204
+ // 1. ctx.answers, for CLI --resource-group argument, only support existing resource group
205
+ // 2. env config (config.{envName}.json), for user customization, only support existing resource group
206
+ // 3. states (state.{envName}.json), for re-provision
207
+ // 4. asking user with a popup
208
+ const resourceGroupNameFromEnvConfig = (_b = envInfo.config.azure) === null || _b === void 0 ? void 0 : _b.resourceGroupName;
209
+ const resourceGroupNameFromState = envInfo.state.solution.resourceGroupName;
210
+ const resourceGroupLocationFromState = envInfo.state.solution.location;
211
+ const appName = ctx.projectSetting.appName;
212
+ const defaultResourceGroupName = `${appName.replace(" ", "_")}${"-" + envInfo.envName}-rg`;
213
+ let resourceGroupInfo;
214
+ const telemetryProperties = {};
215
+ if (inputs.env) {
216
+ telemetryProperties[telemetry_1.TelemetryProperty.Env] = tools_1.getHashedEnv(inputs.env);
217
+ }
218
+ if (inputs.targetResourceGroupName) {
219
+ const getRes = await ResourceGroupHelper_1.resourceGroupHelper.getResourceGroupInfo(inputs.targetResourceGroupName, rmClient);
220
+ if (getRes.isErr())
221
+ return teamsfx_api_1.err(getRes.error);
222
+ if (!getRes.value) {
223
+ // Currently we do not support creating resource group from command line arguments
224
+ return teamsfx_api_1.err(new teamsfx_api_1.UserError(constants_2.SolutionError.ResourceGroupNotFound, `Resource group '${inputs.targetResourceGroupName}' does not exist, please specify an existing resource group.`, constants_2.SolutionSource));
225
+ }
226
+ telemetryProperties[telemetry_1.TelemetryProperty.CustomizeResourceGroupType] =
227
+ telemetry_1.CustomizeResourceGroupType.CommandLine;
228
+ resourceGroupInfo = getRes.value;
229
+ }
230
+ else if (resourceGroupNameFromEnvConfig) {
231
+ const resourceGroupName = resourceGroupNameFromEnvConfig;
232
+ const getRes = await ResourceGroupHelper_1.resourceGroupHelper.getResourceGroupInfo(resourceGroupName, rmClient);
233
+ if (getRes.isErr())
234
+ return teamsfx_api_1.err(getRes.error);
235
+ if (!getRes.value) {
236
+ // Currently we do not support creating resource group by input config, so just throw an error.
237
+ const envFile = teamsfx_api_1.EnvConfigFileNameTemplate.replace(teamsfx_api_1.EnvNamePlaceholder, inputs.envName);
238
+ return teamsfx_api_1.err(new teamsfx_api_1.UserError(constants_2.SolutionError.ResourceGroupNotFound, `Resource group '${resourceGroupName}' does not exist, please check your '${envFile}' file.`, constants_2.SolutionSource));
239
+ }
240
+ telemetryProperties[telemetry_1.TelemetryProperty.CustomizeResourceGroupType] =
241
+ telemetry_1.CustomizeResourceGroupType.EnvConfig;
242
+ resourceGroupInfo = getRes.value;
243
+ }
244
+ else if (resourceGroupNameFromState && resourceGroupLocationFromState) {
245
+ const checkRes = await ResourceGroupHelper_1.resourceGroupHelper.checkResourceGroupExistence(resourceGroupNameFromState, rmClient);
246
+ if (checkRes.isErr()) {
247
+ return teamsfx_api_1.err(checkRes.error);
248
+ }
249
+ const exist = checkRes.value;
250
+ resourceGroupInfo = {
251
+ createNewResourceGroup: !exist,
252
+ name: resourceGroupNameFromState,
253
+ location: resourceGroupLocationFromState,
254
+ };
255
+ telemetryProperties[telemetry_1.TelemetryProperty.CustomizeResourceGroupType] =
256
+ telemetry_1.CustomizeResourceGroupType.EnvState;
257
+ }
258
+ else {
259
+ const resourceGroupInfoResult = await ResourceGroupHelper_1.resourceGroupHelper.askResourceGroupInfo(ctx, inputs, tokenProvider.azureAccountProvider, rmClient, defaultResourceGroupName);
260
+ if (resourceGroupInfoResult.isErr()) {
261
+ return teamsfx_api_1.err(resourceGroupInfoResult.error);
262
+ }
263
+ resourceGroupInfo = resourceGroupInfoResult.value;
264
+ if (resourceGroupInfo.createNewResourceGroup) {
265
+ if (resourceGroupInfo.name === defaultResourceGroupName) {
266
+ telemetryProperties[telemetry_1.TelemetryProperty.CustomizeResourceGroupType] =
267
+ telemetry_1.CustomizeResourceGroupType.InteractiveCreateDefault;
268
+ }
269
+ else {
270
+ telemetryProperties[telemetry_1.TelemetryProperty.CustomizeResourceGroupType] =
271
+ telemetry_1.CustomizeResourceGroupType.InteractiveCreateCustomized;
272
+ }
273
+ }
274
+ else {
275
+ telemetryProperties[telemetry_1.TelemetryProperty.CustomizeResourceGroupType] =
276
+ telemetry_1.CustomizeResourceGroupType.InteractiveUseExisting;
277
+ }
278
+ }
279
+ (_c = ctx.telemetryReporter) === null || _c === void 0 ? void 0 : _c.sendTelemetryEvent(telemetry_1.TelemetryEvent.CheckResourceGroup, telemetryProperties);
280
+ envInfo.state.solution.needCreateResourceGroup = resourceGroupInfo.createNewResourceGroup;
281
+ envInfo.state.solution.resourceGroupName = resourceGroupInfo.name;
282
+ envInfo.state.solution.location = resourceGroupInfo.location;
283
+ (_d = ctx.logProvider) === null || _d === void 0 ? void 0 : _d.info(`[${constants_1.PluginDisplayName.Solution}] check resource group pass!`);
284
+ (_e = ctx.logProvider) === null || _e === void 0 ? void 0 : _e.info(`[${constants_1.PluginDisplayName.Solution}] check teamsAppTenantId pass!`);
285
+ //resourceNameSuffix
286
+ const resourceNameSuffix = ((_f = envInfo.config.azure) === null || _f === void 0 ? void 0 : _f.resourceNameSuffix) ||
287
+ envInfo.state.solution.resourceNameSuffix ||
288
+ uuid_1.v4().substr(0, 6);
289
+ envInfo.state.solution.resourceNameSuffix = resourceNameSuffix;
290
+ (_g = ctx.logProvider) === null || _g === void 0 ? void 0 : _g.info(`[${constants_1.PluginDisplayName.Solution}] check resourceNameSuffix pass!`);
291
+ return teamsfx_api_1.ok(teamsfx_api_1.Void);
292
+ }
293
+ async function askForProvisionConsent(ctx, azureAccountProvider, envInfo) {
294
+ const azureToken = await azureAccountProvider.getAccountCredentialAsync();
295
+ // Only Azure project requires this confirm dialog
296
+ const username = azureToken.username || "";
297
+ const subscriptionId = envInfo.state.solution.subscriptionId;
298
+ const subscriptionName = envInfo.state.solution.subscriptionName;
299
+ const msgNew = util.format(tools_1.getStrings().solution.ProvisionConfirmEnvNotice, envInfo.envName, username, subscriptionName ? subscriptionName : subscriptionId);
300
+ const confirmRes = await ctx.userInteraction.showMessage("warn", msgNew, true, "Provision");
301
+ const confirm = (confirmRes === null || confirmRes === void 0 ? void 0 : confirmRes.isOk()) ? confirmRes.value : undefined;
302
+ if (confirm !== "Provision") {
303
+ if (confirm === "Pricing calculator") {
304
+ ctx.userInteraction.openUrl("https://azure.microsoft.com/en-us/pricing/calculator/");
305
+ }
306
+ return teamsfx_api_1.err(new teamsfx_api_1.UserError(tools_1.getStrings().solution.CancelProvision, tools_1.getStrings().solution.CancelProvision, constants_2.SolutionSource));
307
+ }
308
+ return teamsfx_api_1.ok(teamsfx_api_1.Void);
309
+ }
310
+ exports.askForProvisionConsent = askForProvisionConsent;
311
+ async function getM365TenantId(appStudioTokenProvider) {
312
+ // Just to trigger M365 login before the concurrent execution of localDebug.
313
+ // Because concurrent execution of localDebug may getAccessToken() concurrently, which
314
+ // causes 2 M365 logins before the token caching in common lib takes effect.
315
+ await appStudioTokenProvider.getAccessToken();
316
+ const appstudioTokenJson = await appStudioTokenProvider.getJsonObject();
317
+ if (appstudioTokenJson === undefined) {
318
+ return teamsfx_api_1.err(new teamsfx_api_1.SystemError(constants_2.SolutionError.NoAppStudioToken, "Graph token json is undefined", constants_2.SolutionSource));
319
+ }
320
+ const tenantIdInToken = appstudioTokenJson.tid;
321
+ if (!tenantIdInToken) {
322
+ return teamsfx_api_1.err(new teamsfx_api_1.SystemError(constants_2.SolutionError.NoTeamsAppTenantId, "Cannot find Teams app tenant id", constants_2.SolutionSource));
323
+ }
324
+ return teamsfx_api_1.ok(tenantIdInToken);
325
+ }
326
+ exports.getM365TenantId = getM365TenantId;
124
327
  //# sourceMappingURL=provision.js.map