@microsoft/teamsfx-core 1.4.0 → 1.4.1-alpha.0535e2d27.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 (431) hide show
  1. package/build/common/constants.d.ts +1 -0
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +1 -0
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/local/constants.d.ts +0 -4
  6. package/build/common/local/constants.d.ts.map +1 -1
  7. package/build/common/local/constants.js +1 -5
  8. package/build/common/local/constants.js.map +1 -1
  9. package/build/common/local/localEnvProvider.d.ts +4 -8
  10. package/build/common/local/localEnvProvider.d.ts.map +1 -1
  11. package/build/common/local/localEnvProvider.js +21 -33
  12. package/build/common/local/localEnvProvider.js.map +1 -1
  13. package/build/common/local/localSettingsHelper.d.ts.map +1 -1
  14. package/build/common/local/localSettingsHelper.js +12 -21
  15. package/build/common/local/localSettingsHelper.js.map +1 -1
  16. package/build/common/local/portChecker.d.ts.map +1 -1
  17. package/build/common/local/portChecker.js +1 -8
  18. package/build/common/local/portChecker.js.map +1 -1
  19. package/build/common/local/projectSettingsHelper.d.ts +0 -1
  20. package/build/common/local/projectSettingsHelper.d.ts.map +1 -1
  21. package/build/common/local/projectSettingsHelper.js +2 -5
  22. package/build/common/local/projectSettingsHelper.js.map +1 -1
  23. package/build/common/localSettingsProvider.d.ts +2 -2
  24. package/build/common/localSettingsProvider.d.ts.map +1 -1
  25. package/build/common/localSettingsProvider.js +4 -4
  26. package/build/common/localSettingsProvider.js.map +1 -1
  27. package/build/common/projectSettingsValidator.d.ts.map +1 -1
  28. package/build/common/projectSettingsValidator.js +5 -0
  29. package/build/common/projectSettingsValidator.js.map +1 -1
  30. package/build/common/samples-config.json +12 -2
  31. package/build/common/template-utils/templates.d.ts +1 -0
  32. package/build/common/template-utils/templates.d.ts.map +1 -1
  33. package/build/common/template-utils/templates.js +5 -1
  34. package/build/common/template-utils/templates.js.map +1 -1
  35. package/build/common/templates-config.json +2 -2
  36. package/build/common/tools.d.ts +0 -4
  37. package/build/common/tools.d.ts.map +1 -1
  38. package/build/common/tools.js +1 -20
  39. package/build/common/tools.js.map +1 -1
  40. package/build/core/SolutionPluginContainer.js +1 -1
  41. package/build/core/SolutionPluginContainer.js.map +1 -1
  42. package/build/core/collaborator.d.ts +10 -0
  43. package/build/core/collaborator.d.ts.map +1 -0
  44. package/build/core/collaborator.js +381 -0
  45. package/build/core/collaborator.js.map +1 -0
  46. package/build/core/environment.d.ts.map +1 -1
  47. package/build/core/environment.js +7 -2
  48. package/build/core/environment.js.map +1 -1
  49. package/build/core/error.d.ts +0 -6
  50. package/build/core/error.d.ts.map +1 -1
  51. package/build/core/error.js +1 -25
  52. package/build/core/error.js.map +1 -1
  53. package/build/core/index.d.ts +11 -9
  54. package/build/core/index.d.ts.map +1 -1
  55. package/build/core/index.js +232 -233
  56. package/build/core/index.js.map +1 -1
  57. package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
  58. package/build/core/middleware/concurrentLocker.js +1 -2
  59. package/build/core/middleware/concurrentLocker.js.map +1 -1
  60. package/build/core/middleware/envInfoLoaderV3.d.ts.map +1 -1
  61. package/build/core/middleware/envInfoLoaderV3.js +3 -0
  62. package/build/core/middleware/envInfoLoaderV3.js.map +1 -1
  63. package/build/core/middleware/index.d.ts +0 -2
  64. package/build/core/middleware/index.d.ts.map +1 -1
  65. package/build/core/middleware/index.js +0 -2
  66. package/build/core/middleware/index.js.map +1 -1
  67. package/build/core/middleware/localSettingsLoader.d.ts.map +1 -1
  68. package/build/core/middleware/localSettingsLoader.js +2 -2
  69. package/build/core/middleware/localSettingsLoader.js.map +1 -1
  70. package/build/core/middleware/projectMigrator.d.ts.map +1 -1
  71. package/build/core/middleware/projectMigrator.js +28 -35
  72. package/build/core/middleware/projectMigrator.js.map +1 -1
  73. package/build/core/middleware/questionModel.d.ts +0 -1
  74. package/build/core/middleware/questionModel.d.ts.map +1 -1
  75. package/build/core/middleware/questionModel.js +48 -71
  76. package/build/core/middleware/questionModel.js.map +1 -1
  77. package/build/core/middleware/solutionLoaderV3.d.ts +1 -1
  78. package/build/core/middleware/solutionLoaderV3.d.ts.map +1 -1
  79. package/build/core/middleware/solutionLoaderV3.js +1 -8
  80. package/build/core/middleware/solutionLoaderV3.js.map +1 -1
  81. package/build/core/question.d.ts +0 -1
  82. package/build/core/question.d.ts.map +1 -1
  83. package/build/core/question.js +1 -26
  84. package/build/core/question.js.map +1 -1
  85. package/build/core/tools.d.ts +0 -2
  86. package/build/core/tools.d.ts.map +1 -1
  87. package/build/core/tools.js +3 -63
  88. package/build/core/tools.js.map +1 -1
  89. package/build/core/utils.d.ts +1 -2
  90. package/build/core/utils.d.ts.map +1 -1
  91. package/build/core/utils.js +1 -5
  92. package/build/core/utils.js.map +1 -1
  93. package/build/plugins/resource/aad/aadAppClient.d.ts +4 -4
  94. package/build/plugins/resource/aad/aadAppClient.d.ts.map +1 -1
  95. package/build/plugins/resource/aad/aadAppClient.js +3 -3
  96. package/build/plugins/resource/aad/aadAppClient.js.map +1 -1
  97. package/build/plugins/resource/aad/index.d.ts.map +1 -1
  98. package/build/plugins/resource/aad/index.js +0 -3
  99. package/build/plugins/resource/aad/index.js.map +1 -1
  100. package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
  101. package/build/plugins/resource/aad/plugin.js +13 -8
  102. package/build/plugins/resource/aad/plugin.js.map +1 -1
  103. package/build/plugins/resource/aad/v2/index.d.ts +3 -2
  104. package/build/plugins/resource/aad/v2/index.d.ts.map +1 -1
  105. package/build/plugins/resource/aad/v2/index.js +4 -4
  106. package/build/plugins/resource/aad/v2/index.js.map +1 -1
  107. package/build/plugins/resource/aad/v3/index.d.ts +8 -2
  108. package/build/plugins/resource/aad/v3/index.d.ts.map +1 -1
  109. package/build/plugins/resource/aad/v3/index.js +148 -49
  110. package/build/plugins/resource/aad/v3/index.js.map +1 -1
  111. package/build/plugins/resource/apim/config.js +2 -1
  112. package/build/plugins/resource/apim/config.js.map +1 -1
  113. package/build/plugins/resource/apim/managers/questionManager.d.ts.map +1 -1
  114. package/build/plugins/resource/apim/managers/questionManager.js +8 -4
  115. package/build/plugins/resource/apim/managers/questionManager.js.map +1 -1
  116. package/build/plugins/resource/apim/v3/index.d.ts +7 -7
  117. package/build/plugins/resource/apim/v3/index.d.ts.map +1 -1
  118. package/build/plugins/resource/apim/v3/index.js +63 -55
  119. package/build/plugins/resource/apim/v3/index.js.map +1 -1
  120. package/build/plugins/resource/appstudio/appStudio.js +1 -1
  121. package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
  122. package/build/plugins/resource/appstudio/errors.d.ts +8 -16
  123. package/build/plugins/resource/appstudio/errors.d.ts.map +1 -1
  124. package/build/plugins/resource/appstudio/errors.js +8 -16
  125. package/build/plugins/resource/appstudio/errors.js.map +1 -1
  126. package/build/plugins/resource/appstudio/index.d.ts +0 -4
  127. package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
  128. package/build/plugins/resource/appstudio/index.js +0 -21
  129. package/build/plugins/resource/appstudio/index.js.map +1 -1
  130. package/build/plugins/resource/appstudio/manifestTemplate.d.ts +3 -1
  131. package/build/plugins/resource/appstudio/manifestTemplate.d.ts.map +1 -1
  132. package/build/plugins/resource/appstudio/manifestTemplate.js +111 -1
  133. package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
  134. package/build/plugins/resource/appstudio/plugin.d.ts +2 -13
  135. package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
  136. package/build/plugins/resource/appstudio/plugin.js +46 -127
  137. package/build/plugins/resource/appstudio/plugin.js.map +1 -1
  138. package/build/plugins/resource/appstudio/utils/telemetry.d.ts +1 -1
  139. package/build/plugins/resource/appstudio/utils/telemetry.d.ts.map +1 -1
  140. package/build/plugins/resource/appstudio/utils/telemetry.js +22 -10
  141. package/build/plugins/resource/appstudio/utils/telemetry.js.map +1 -1
  142. package/build/plugins/resource/appstudio/v2/index.d.ts +2 -2
  143. package/build/plugins/resource/appstudio/v2/index.d.ts.map +1 -1
  144. package/build/plugins/resource/appstudio/v2/index.js +2 -2
  145. package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
  146. package/build/plugins/resource/appstudio/v3/index.d.ts +24 -4
  147. package/build/plugins/resource/appstudio/v3/index.d.ts.map +1 -1
  148. package/build/plugins/resource/appstudio/v3/index.js +133 -5
  149. package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
  150. package/build/plugins/resource/appstudio/v3/plugin.d.ts +17 -4
  151. package/build/plugins/resource/appstudio/v3/plugin.d.ts.map +1 -1
  152. package/build/plugins/resource/appstudio/v3/plugin.js +117 -25
  153. package/build/plugins/resource/appstudio/v3/plugin.js.map +1 -1
  154. package/build/plugins/resource/bot/configs/deployConfig.js.map +1 -1
  155. package/build/plugins/resource/bot/constants.d.ts +0 -4
  156. package/build/plugins/resource/bot/constants.d.ts.map +1 -1
  157. package/build/plugins/resource/bot/constants.js +0 -6
  158. package/build/plugins/resource/bot/constants.js.map +1 -1
  159. package/build/plugins/resource/bot/dotnet/plugin.d.ts +0 -3
  160. package/build/plugins/resource/bot/dotnet/plugin.d.ts.map +1 -1
  161. package/build/plugins/resource/bot/dotnet/plugin.js +0 -9
  162. package/build/plugins/resource/bot/dotnet/plugin.js.map +1 -1
  163. package/build/plugins/resource/bot/errors.d.ts +0 -3
  164. package/build/plugins/resource/bot/errors.d.ts.map +1 -1
  165. package/build/plugins/resource/bot/errors.js +1 -9
  166. package/build/plugins/resource/bot/errors.js.map +1 -1
  167. package/build/plugins/resource/bot/index.d.ts +2 -3
  168. package/build/plugins/resource/bot/index.d.ts.map +1 -1
  169. package/build/plugins/resource/bot/index.js +5 -16
  170. package/build/plugins/resource/bot/index.js.map +1 -1
  171. package/build/plugins/resource/bot/interface.d.ts +0 -1
  172. package/build/plugins/resource/bot/interface.d.ts.map +1 -1
  173. package/build/plugins/resource/bot/plugin.d.ts +0 -1
  174. package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
  175. package/build/plugins/resource/bot/plugin.js +0 -26
  176. package/build/plugins/resource/bot/plugin.js.map +1 -1
  177. package/build/plugins/resource/bot/progressBars.d.ts +2 -2
  178. package/build/plugins/resource/bot/progressBars.d.ts.map +1 -1
  179. package/build/plugins/resource/bot/progressBars.js +4 -3
  180. package/build/plugins/resource/bot/progressBars.js.map +1 -1
  181. package/build/plugins/resource/bot/resources/messages.d.ts +0 -3
  182. package/build/plugins/resource/bot/resources/messages.d.ts.map +1 -1
  183. package/build/plugins/resource/bot/resources/messages.js +0 -5
  184. package/build/plugins/resource/bot/resources/messages.js.map +1 -1
  185. package/build/plugins/resource/bot/resources/strings.d.ts +0 -1
  186. package/build/plugins/resource/bot/resources/strings.d.ts.map +1 -1
  187. package/build/plugins/resource/bot/resources/strings.js +0 -2
  188. package/build/plugins/resource/bot/resources/strings.js.map +1 -1
  189. package/build/plugins/resource/bot/v3/error.d.ts +15 -0
  190. package/build/plugins/resource/bot/v3/error.d.ts.map +1 -0
  191. package/build/plugins/resource/bot/v3/error.js +46 -0
  192. package/build/plugins/resource/bot/v3/error.js.map +1 -0
  193. package/build/plugins/resource/bot/v3/index.d.ts +19 -0
  194. package/build/plugins/resource/bot/v3/index.d.ts.map +1 -0
  195. package/build/plugins/resource/bot/v3/index.js +376 -0
  196. package/build/plugins/resource/bot/v3/index.js.map +1 -0
  197. package/build/plugins/resource/frontend/constants.d.ts +1 -0
  198. package/build/plugins/resource/frontend/constants.d.ts.map +1 -1
  199. package/build/plugins/resource/frontend/constants.js +1 -0
  200. package/build/plugins/resource/frontend/constants.js.map +1 -1
  201. package/build/plugins/resource/frontend/dotnet/constants.d.ts +21 -0
  202. package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -1
  203. package/build/plugins/resource/frontend/dotnet/constants.js +23 -1
  204. package/build/plugins/resource/frontend/dotnet/constants.js.map +1 -1
  205. package/build/plugins/resource/frontend/dotnet/plugin.d.ts +1 -0
  206. package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -1
  207. package/build/plugins/resource/frontend/dotnet/plugin.js +59 -0
  208. package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
  209. package/build/plugins/resource/frontend/dotnet/resources/errors.d.ts +3 -0
  210. package/build/plugins/resource/frontend/dotnet/resources/errors.d.ts.map +1 -1
  211. package/build/plugins/resource/frontend/dotnet/resources/errors.js +10 -1
  212. package/build/plugins/resource/frontend/dotnet/resources/errors.js.map +1 -1
  213. package/build/plugins/resource/frontend/index.d.ts +2 -3
  214. package/build/plugins/resource/frontend/index.d.ts.map +1 -1
  215. package/build/plugins/resource/frontend/index.js +5 -9
  216. package/build/plugins/resource/frontend/index.js.map +1 -1
  217. package/build/plugins/resource/frontend/interface.d.ts +2 -2
  218. package/build/plugins/resource/frontend/interface.d.ts.map +1 -1
  219. package/build/plugins/resource/frontend/plugin.d.ts +2 -2
  220. package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
  221. package/build/plugins/resource/frontend/plugin.js +12 -25
  222. package/build/plugins/resource/frontend/plugin.js.map +1 -1
  223. package/build/plugins/resource/frontend/resources/errors.d.ts +0 -7
  224. package/build/plugins/resource/frontend/resources/errors.d.ts.map +1 -1
  225. package/build/plugins/resource/frontend/resources/errors.js +1 -14
  226. package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
  227. package/build/plugins/resource/frontend/resources/messages.d.ts +0 -2
  228. package/build/plugins/resource/frontend/resources/messages.d.ts.map +1 -1
  229. package/build/plugins/resource/frontend/resources/messages.js +0 -2
  230. package/build/plugins/resource/frontend/resources/messages.js.map +1 -1
  231. package/build/plugins/resource/frontend/resources/steps.d.ts +0 -1
  232. package/build/plugins/resource/frontend/resources/steps.d.ts.map +1 -1
  233. package/build/plugins/resource/frontend/resources/steps.js +1 -7
  234. package/build/plugins/resource/frontend/resources/steps.js.map +1 -1
  235. package/build/plugins/resource/frontend/v2/index.d.ts +3 -2
  236. package/build/plugins/resource/frontend/v2/index.d.ts.map +1 -1
  237. package/build/plugins/resource/frontend/v2/index.js +5 -2
  238. package/build/plugins/resource/frontend/v2/index.js.map +1 -1
  239. package/build/plugins/resource/frontend/v3/index.d.ts +7 -7
  240. package/build/plugins/resource/frontend/v3/index.d.ts.map +1 -1
  241. package/build/plugins/resource/frontend/v3/index.js +21 -28
  242. package/build/plugins/resource/frontend/v3/index.js.map +1 -1
  243. package/build/plugins/resource/function/v3/index.d.ts +8 -9
  244. package/build/plugins/resource/function/v3/index.d.ts.map +1 -1
  245. package/build/plugins/resource/function/v3/index.js +20 -26
  246. package/build/plugins/resource/function/v3/index.js.map +1 -1
  247. package/build/plugins/resource/identity/index.d.ts.map +1 -1
  248. package/build/plugins/resource/identity/index.js +0 -3
  249. package/build/plugins/resource/identity/index.js.map +1 -1
  250. package/build/plugins/resource/identity/v3/index.d.ts +4 -4
  251. package/build/plugins/resource/identity/v3/index.d.ts.map +1 -1
  252. package/build/plugins/resource/identity/v3/index.js +10 -14
  253. package/build/plugins/resource/identity/v3/index.js.map +1 -1
  254. package/build/plugins/resource/keyvault/v3/index.d.ts +5 -6
  255. package/build/plugins/resource/keyvault/v3/index.d.ts.map +1 -1
  256. package/build/plugins/resource/keyvault/v3/index.js +10 -17
  257. package/build/plugins/resource/keyvault/v3/index.js.map +1 -1
  258. package/build/plugins/resource/localdebug/constants.d.ts +0 -4
  259. package/build/plugins/resource/localdebug/constants.d.ts.map +1 -1
  260. package/build/plugins/resource/localdebug/constants.js +1 -5
  261. package/build/plugins/resource/localdebug/constants.js.map +1 -1
  262. package/build/plugins/resource/localdebug/localEnv.d.ts +2 -2
  263. package/build/plugins/resource/localdebug/localEnv.d.ts.map +1 -1
  264. package/build/plugins/resource/localdebug/localEnv.js +4 -6
  265. package/build/plugins/resource/localdebug/localEnv.js.map +1 -1
  266. package/build/plugins/resource/localdebug/projectSettingLoader.d.ts +0 -1
  267. package/build/plugins/resource/localdebug/projectSettingLoader.d.ts.map +1 -1
  268. package/build/plugins/resource/localdebug/projectSettingLoader.js +0 -1
  269. package/build/plugins/resource/localdebug/projectSettingLoader.js.map +1 -1
  270. package/build/plugins/resource/spfx/index.d.ts +1 -5
  271. package/build/plugins/resource/spfx/index.d.ts.map +1 -1
  272. package/build/plugins/resource/spfx/index.js +6 -10
  273. package/build/plugins/resource/spfx/index.js.map +1 -1
  274. package/build/plugins/resource/spfx/plugin.js +6 -6
  275. package/build/plugins/resource/spfx/plugin.js.map +1 -1
  276. package/build/plugins/resource/spfx/utils/constants.d.ts +9 -0
  277. package/build/plugins/resource/spfx/utils/constants.d.ts.map +1 -1
  278. package/build/plugins/resource/spfx/utils/constants.js +11 -1
  279. package/build/plugins/resource/spfx/utils/constants.js.map +1 -1
  280. package/build/plugins/resource/spfx/utils/progress-helper.d.ts +3 -3
  281. package/build/plugins/resource/spfx/utils/progress-helper.d.ts.map +1 -1
  282. package/build/plugins/resource/spfx/utils/progress-helper.js +8 -8
  283. package/build/plugins/resource/spfx/utils/progress-helper.js.map +1 -1
  284. package/build/plugins/resource/spfx/utils/questions.d.ts +10 -0
  285. package/build/plugins/resource/spfx/utils/questions.d.ts.map +1 -0
  286. package/build/plugins/resource/spfx/utils/questions.js +39 -0
  287. package/build/plugins/resource/spfx/utils/questions.js.map +1 -0
  288. package/build/plugins/resource/spfx/v3/error.d.ts +5 -0
  289. package/build/plugins/resource/spfx/v3/error.d.ts.map +1 -0
  290. package/build/plugins/resource/spfx/v3/error.js +20 -0
  291. package/build/plugins/resource/spfx/v3/error.js.map +1 -0
  292. package/build/plugins/resource/spfx/v3/index.d.ts +13 -0
  293. package/build/plugins/resource/spfx/v3/index.d.ts.map +1 -0
  294. package/build/plugins/resource/spfx/v3/index.js +122 -0
  295. package/build/plugins/resource/spfx/v3/index.js.map +1 -0
  296. package/build/plugins/resource/spfx/v3/plugin.d.ts +11 -0
  297. package/build/plugins/resource/spfx/v3/plugin.d.ts.map +1 -0
  298. package/build/plugins/resource/spfx/v3/plugin.js +290 -0
  299. package/build/plugins/resource/spfx/v3/plugin.js.map +1 -0
  300. package/build/plugins/resource/sql/v3/index.d.ts +9 -6
  301. package/build/plugins/resource/sql/v3/index.d.ts.map +1 -1
  302. package/build/plugins/resource/sql/v3/index.js +82 -20
  303. package/build/plugins/resource/sql/v3/index.js.map +1 -1
  304. package/build/plugins/resource/utils4v2.d.ts +3 -2
  305. package/build/plugins/resource/utils4v2.d.ts.map +1 -1
  306. package/build/plugins/resource/utils4v2.js +24 -7
  307. package/build/plugins/resource/utils4v2.js.map +1 -1
  308. package/build/plugins/solution/fx-solution/arm.d.ts +2 -2
  309. package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
  310. package/build/plugins/solution/fx-solution/arm.js +52 -59
  311. package/build/plugins/solution/fx-solution/arm.js.map +1 -1
  312. package/build/plugins/solution/fx-solution/commonQuestions.d.ts +15 -3
  313. package/build/plugins/solution/fx-solution/commonQuestions.d.ts.map +1 -1
  314. package/build/plugins/solution/fx-solution/commonQuestions.js +14 -8
  315. package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
  316. package/build/plugins/solution/fx-solution/constants.d.ts +0 -2
  317. package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
  318. package/build/plugins/solution/fx-solution/constants.js +0 -2
  319. package/build/plugins/solution/fx-solution/constants.js.map +1 -1
  320. package/build/plugins/solution/fx-solution/debug/error.d.ts +0 -1
  321. package/build/plugins/solution/fx-solution/debug/error.d.ts.map +1 -1
  322. package/build/plugins/solution/fx-solution/debug/error.js +1 -5
  323. package/build/plugins/solution/fx-solution/debug/error.js.map +1 -1
  324. package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts +3 -0
  325. package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -1
  326. package/build/plugins/solution/fx-solution/debug/provisionLocal.js +254 -28
  327. package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -1
  328. package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts +3 -4
  329. package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts.map +1 -1
  330. package/build/plugins/solution/fx-solution/debug/scaffolding.js +18 -19
  331. package/build/plugins/solution/fx-solution/debug/scaffolding.js.map +1 -1
  332. package/build/plugins/solution/fx-solution/debug/util/launch.d.ts +1 -1
  333. package/build/plugins/solution/fx-solution/debug/util/launch.d.ts.map +1 -1
  334. package/build/plugins/solution/fx-solution/debug/util/launch.js +109 -290
  335. package/build/plugins/solution/fx-solution/debug/util/launch.js.map +1 -1
  336. package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts.map +1 -1
  337. package/build/plugins/solution/fx-solution/debug/util/launchNext.js +102 -236
  338. package/build/plugins/solution/fx-solution/debug/util/launchNext.js.map +1 -1
  339. package/build/plugins/solution/fx-solution/debug/util/tasks.d.ts +1 -1
  340. package/build/plugins/solution/fx-solution/debug/util/tasks.d.ts.map +1 -1
  341. package/build/plugins/solution/fx-solution/debug/util/tasks.js +12 -18
  342. package/build/plugins/solution/fx-solution/debug/util/tasks.js.map +1 -1
  343. package/build/plugins/solution/fx-solution/debug/util/tasksNext.d.ts.map +1 -1
  344. package/build/plugins/solution/fx-solution/debug/util/tasksNext.js +5 -5
  345. package/build/plugins/solution/fx-solution/debug/util/tasksNext.js.map +1 -1
  346. package/build/plugins/solution/fx-solution/question.d.ts +0 -2
  347. package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
  348. package/build/plugins/solution/fx-solution/question.js +1 -14
  349. package/build/plugins/solution/fx-solution/question.js.map +1 -1
  350. package/build/plugins/solution/fx-solution/solution.d.ts +0 -2
  351. package/build/plugins/solution/fx-solution/solution.d.ts.map +1 -1
  352. package/build/plugins/solution/fx-solution/solution.js +4 -84
  353. package/build/plugins/solution/fx-solution/solution.js.map +1 -1
  354. package/build/plugins/solution/fx-solution/v2/deploy.d.ts.map +1 -1
  355. package/build/plugins/solution/fx-solution/v2/deploy.js +17 -0
  356. package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
  357. package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
  358. package/build/plugins/solution/fx-solution/v2/getQuestions.js +1 -6
  359. package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
  360. package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
  361. package/build/plugins/solution/fx-solution/v2/provision.js +4 -0
  362. package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
  363. package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts +2 -0
  364. package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +1 -1
  365. package/build/plugins/solution/fx-solution/v2/provisionLocal.js +52 -11
  366. package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
  367. package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts +1 -1
  368. package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +1 -1
  369. package/build/plugins/solution/fx-solution/v2/scaffolding.js +5 -8
  370. package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +1 -1
  371. package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
  372. package/build/plugins/solution/fx-solution/v2/utils.js +0 -3
  373. package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
  374. package/build/plugins/solution/fx-solution/v3/addFeature.d.ts +4 -3
  375. package/build/plugins/solution/fx-solution/v3/addFeature.d.ts.map +1 -1
  376. package/build/plugins/solution/fx-solution/v3/addFeature.js +124 -45
  377. package/build/plugins/solution/fx-solution/v3/addFeature.js.map +1 -1
  378. package/build/plugins/solution/fx-solution/v3/constants.d.ts +0 -1
  379. package/build/plugins/solution/fx-solution/v3/constants.d.ts.map +1 -1
  380. package/build/plugins/solution/fx-solution/v3/constants.js +2 -3
  381. package/build/plugins/solution/fx-solution/v3/constants.js.map +1 -1
  382. package/build/plugins/solution/fx-solution/v3/deploy.d.ts.map +1 -1
  383. package/build/plugins/solution/fx-solution/v3/deploy.js +21 -11
  384. package/build/plugins/solution/fx-solution/v3/deploy.js.map +1 -1
  385. package/build/plugins/solution/fx-solution/v3/provision.d.ts.map +1 -1
  386. package/build/plugins/solution/fx-solution/v3/provision.js +37 -24
  387. package/build/plugins/solution/fx-solution/v3/provision.js.map +1 -1
  388. package/build/plugins/solution/fx-solution/v3/solution.js +2 -2
  389. package/build/plugins/solution/fx-solution/v3/solution.js.map +1 -1
  390. package/build/plugins/solution/fx-solution/v3/userTask.d.ts.map +1 -1
  391. package/build/plugins/solution/fx-solution/v3/userTask.js +58 -58
  392. package/build/plugins/solution/fx-solution/v3/userTask.js.map +1 -1
  393. package/build/plugins/solution/spfx-solution/addFeature.d.ts.map +1 -1
  394. package/build/plugins/solution/spfx-solution/addFeature.js +0 -8
  395. package/build/plugins/solution/spfx-solution/addFeature.js.map +1 -1
  396. package/build/plugins/solution/utils/questions.d.ts +3 -3
  397. package/build/plugins/solution/utils/questions.d.ts.map +1 -1
  398. package/build/plugins/solution/utils/questions.js +6 -6
  399. package/build/plugins/solution/utils/questions.js.map +1 -1
  400. package/package.json +4 -3
  401. package/resource/strings.json +1 -0
  402. package/templates/plugins/resource/bot/bot-msgext.csharp.default.zip +0 -0
  403. package/templates/plugins/resource/bot/bot-msgext.js.default.zip +0 -0
  404. package/templates/plugins/resource/bot/bot-msgext.ts.default.zip +0 -0
  405. package/templates/plugins/resource/bot/bot.csharp.default.zip +0 -0
  406. package/templates/plugins/resource/bot/bot.js.default.zip +0 -0
  407. package/templates/plugins/resource/bot/bot.ts.default.zip +0 -0
  408. package/templates/plugins/resource/bot/msgext.js.default.zip +0 -0
  409. package/templates/plugins/resource/bot/msgext.ts.default.zip +0 -0
  410. package/templates/plugins/resource/dotnet/blazor-base.csharp.default.zip +0 -0
  411. package/templates/plugins/resource/frontend/tab.csharp.default.zip +0 -0
  412. package/templates/plugins/resource/frontend/tab.js.default.zip +0 -0
  413. package/templates/plugins/resource/frontend/tab.ts.default.zip +0 -0
  414. package/templates/plugins/resource/function/function-base.js.default.zip +0 -0
  415. package/templates/plugins/resource/function/function-base.ts.default.zip +0 -0
  416. package/templates/plugins/resource/function/function-triggers.js.HTTPTrigger.zip +0 -0
  417. package/templates/plugins/resource/function/function-triggers.ts.HTTPTrigger.zip +0 -0
  418. package/build/core/middleware/migrateConditionHandler.d.ts +0 -3
  419. package/build/core/middleware/migrateConditionHandler.d.ts.map +0 -1
  420. package/build/core/middleware/migrateConditionHandler.js +0 -23
  421. package/build/core/middleware/migrateConditionHandler.js.map +0 -1
  422. package/build/core/middleware/supportV1ConditionHandler.d.ts +0 -3
  423. package/build/core/middleware/supportV1ConditionHandler.d.ts.map +0 -1
  424. package/build/core/middleware/supportV1ConditionHandler.js +0 -23
  425. package/build/core/middleware/supportV1ConditionHandler.js.map +0 -1
  426. package/build/core/middleware/telemetrySender.d.ts +0 -6
  427. package/build/core/middleware/telemetrySender.d.ts.map +0 -1
  428. package/build/core/middleware/telemetrySender.js +0 -43
  429. package/build/core/middleware/telemetrySender.js.map +0 -1
  430. package/templates/plugins/resource/storage/bicep/azureStorageProvision.bicep +0 -25
  431. package/templates/plugins/resource/storage/bicep/provision.template.bicep +0 -15
@@ -17,9 +17,11 @@ const globalState_1 = require("../common/globalState");
17
17
  const localSettingsProvider_1 = require("../common/localSettingsProvider");
18
18
  const telemetry_1 = require("../common/telemetry");
19
19
  const tools_1 = require("../common/tools");
20
+ const utils_1 = require("../plugins/resource/appstudio/utils/utils");
20
21
  const question_1 = require("../plugins/solution/fx-solution/question");
21
22
  const constants_2 = require("../plugins/solution/fx-solution/v3/constants");
22
23
  const callback_1 = require("./callback");
24
+ const collaborator_1 = require("./collaborator");
23
25
  const crypto_1 = require("./crypto");
24
26
  const downloadSample_1 = require("./downloadSample");
25
27
  const error_1 = require("./error");
@@ -32,18 +34,16 @@ const envInfoWriterV3_1 = require("./middleware/envInfoWriterV3");
32
34
  const errorHandler_1 = require("./middleware/errorHandler");
33
35
  const localSettingsLoader_1 = require("./middleware/localSettingsLoader");
34
36
  const localSettingsWriter_1 = require("./middleware/localSettingsWriter");
35
- const migrateConditionHandler_1 = require("./middleware/migrateConditionHandler");
36
37
  const projectMigrator_1 = require("./middleware/projectMigrator");
37
38
  const projectSettingsLoader_1 = require("./middleware/projectSettingsLoader");
38
39
  const projectSettingsWriter_1 = require("./middleware/projectSettingsWriter");
39
40
  const questionModel_1 = require("./middleware/questionModel");
40
41
  const solutionLoader_1 = require("./middleware/solutionLoader");
41
42
  const solutionLoaderV3_1 = require("./middleware/solutionLoaderV3");
42
- const supportV1ConditionHandler_1 = require("./middleware/supportV1ConditionHandler");
43
43
  const question_2 = require("./question");
44
44
  const SolutionPluginContainer_1 = require("./SolutionPluginContainer");
45
45
  const tools_2 = require("./tools");
46
- const utils_1 = require("./utils");
46
+ const utils_2 = require("./utils");
47
47
  // TODO: For package.json,
48
48
  // use require instead of import because of core building/packaging method.
49
49
  // Using import will cause the build folder structure to change.
@@ -81,7 +81,6 @@ class FxCore {
81
81
  this._getQuestionsForCreateProjectV3 = questionModel_1.getQuestionsForCreateProjectV3;
82
82
  this._getQuestionsForUserTask = questionModel_1.getQuestionsForUserTaskV2;
83
83
  this._getQuestions = questionModel_1.getQuestionsV2;
84
- this._getQuestionsForMigrateV1Project = questionModel_1.getQuestionsForMigrateV1Project;
85
84
  //v3 questions
86
85
  this._getQuestionsForAddFeature = questionModel_1.getQuestionsForAddFeature;
87
86
  this._getQuestionsForProvision = questionModel_1.getQuestionsForProvision;
@@ -110,6 +109,7 @@ class FxCore {
110
109
  }
111
110
  }
112
111
  async createProjectV2(inputs, ctx) {
112
+ var _a;
113
113
  if (!ctx) {
114
114
  return teamsfx_api_1.err(new error_1.ObjectIsUndefinedError("ctx for createProject"));
115
115
  }
@@ -168,11 +168,41 @@ class FxCore {
168
168
  version: getProjectSettingsVersion(),
169
169
  isFromSample: false,
170
170
  };
171
- if (utils_1.isCreatedFromExistingApp(inputs)) {
171
+ if ((_a = inputs.existingAppConfig) === null || _a === void 0 ? void 0 : _a.isCreatedFromExistingApp) {
172
172
  // there is no solution settings if created from existing app
173
- //TODO create from existing Tab or Bot/ME
174
- // 1. call App Studio V3 API to create manifest with placeholder
175
- // 2. create config.local.json to store existing App information
173
+ // create default env
174
+ ctx.projectSettings = projectSettings;
175
+ const newEnvConfig = __1.environmentManager.newEnvConfigData(appName, inputs.existingAppConfig);
176
+ const writeEnvResult = await __1.environmentManager.writeEnvConfig(projectPath, newEnvConfig, __1.environmentManager.getDefaultEnvName());
177
+ if (writeEnvResult.isErr()) {
178
+ return teamsfx_api_1.err(writeEnvResult.error);
179
+ }
180
+ // call App Studio V3 API to create manifest with placeholder
181
+ const appStudio = typedi_1.Container.get(constants_2.BuiltInFeaturePluginNames.appStudio);
182
+ const contextV2 = createV2Context(projectSettings);
183
+ const initRes = await appStudio.init(contextV2, inputs);
184
+ if (initRes.isErr())
185
+ return teamsfx_api_1.err(initRes.error);
186
+ const manifestCaps = [];
187
+ inputs.existingAppConfig.newAppTypes.forEach((t) => {
188
+ if (t === teamsfx_api_1.ExistingTeamsAppType.Bot)
189
+ manifestCaps.push({ name: "Bot", existingApp: true });
190
+ else if (t === teamsfx_api_1.ExistingTeamsAppType.StaticTab)
191
+ manifestCaps.push({ name: "staticTab", existingApp: true });
192
+ else if (t === teamsfx_api_1.ExistingTeamsAppType.ConfigurableTab)
193
+ manifestCaps.push({ name: "configurableTab", existingApp: true });
194
+ else if (t === teamsfx_api_1.ExistingTeamsAppType.MessageExtension)
195
+ manifestCaps.push({ name: "MessageExtension", existingApp: true });
196
+ });
197
+ const addCapabilitiesRes = await appStudio.addCapabilities(contextV2, inputs, manifestCaps);
198
+ if (addCapabilitiesRes.isErr())
199
+ return teamsfx_api_1.err(addCapabilitiesRes.error);
200
+ if (tools_1.isConfigUnifyEnabled()) {
201
+ const createLocalEnvResult = await this.createEnvWithName(__1.environmentManager.getLocalEnvName(), projectSettings, inputs);
202
+ if (createLocalEnvResult.isErr()) {
203
+ return teamsfx_api_1.err(createLocalEnvResult.error);
204
+ }
205
+ }
176
206
  }
177
207
  else {
178
208
  projectSettings.solutionSettings = {
@@ -279,43 +309,37 @@ class FxCore {
279
309
  if (initRes.isErr()) {
280
310
  return teamsfx_api_1.err(initRes.error);
281
311
  }
312
+ // persist projectSettings.json
282
313
  ctx.projectSettings.programmingLanguage = inputs[question_2.CoreQuestionNames.ProgrammingLanguage];
283
- // set solution in context
284
- ctx.solutionV3 = typedi_1.Container.get(constants_2.BuiltInSolutionNames.azure);
285
- // addFeature
286
- if (inputs.platform === teamsfx_api_1.Platform.VS) {
287
- const addFeatureInputs = Object.assign(Object.assign({}, inputs), { projectPath: projectPath, feature: constants_2.BuiltInFeaturePluginNames.dotnet });
288
- const addFeatureRes = await this._addFeature(addFeatureInputs, ctx);
289
- if (addFeatureRes.isErr()) {
290
- return teamsfx_api_1.err(addFeatureRes.error);
314
+ ctx.projectSettings.isFromSample = false;
315
+ const projectSettingsPath = projectSettingsLoader_1.getProjectSettingsPath(projectPath);
316
+ await fs.writeFile(projectSettingsPath, JSON.stringify(ctx.projectSettings, null, 4));
317
+ if (!((_a = inputs.existingAppConfig) === null || _a === void 0 ? void 0 : _a.isCreatedFromExistingApp)) {
318
+ // addFeature
319
+ const features = [];
320
+ if (!capabilities.includes(question_2.TabSPFxItem.id)) {
321
+ features.push(constants_2.BuiltInFeaturePluginNames.aad);
291
322
  }
292
- }
293
- else {
294
- if (capabilities.includes(question_2.TabOptionItem.id)) {
295
- const addFeatureInputs = Object.assign(Object.assign({}, inputs), { projectPath: projectPath, feature: constants_2.BuiltInFeaturePluginNames.frontend });
296
- const addFeatureRes = await this._addFeature(addFeatureInputs, ctx);
297
- if (addFeatureRes.isErr()) {
298
- return teamsfx_api_1.err(addFeatureRes.error);
299
- }
323
+ if (inputs.platform === teamsfx_api_1.Platform.VS) {
324
+ features.push(constants_2.BuiltInFeaturePluginNames.dotnet);
300
325
  }
301
- else if (capabilities.includes(question_2.TabSPFxItem.id)) {
302
- const addFeatureInputs = Object.assign(Object.assign({}, inputs), { projectPath: projectPath, feature: constants_2.BuiltInFeaturePluginNames.spfx });
303
- const addFeatureRes = await this._addFeature(addFeatureInputs, ctx);
304
- if (addFeatureRes.isErr()) {
305
- return teamsfx_api_1.err(addFeatureRes.error);
326
+ else {
327
+ if (capabilities.includes(question_2.TabOptionItem.id)) {
328
+ features.push(constants_2.BuiltInFeaturePluginNames.frontend);
306
329
  }
307
- }
308
- if (capabilities.includes(question_2.BotOptionItem.id) ||
309
- capabilities.includes(question_1.MessageExtensionItem.id)) {
310
- const addFeatureInputs = Object.assign(Object.assign({}, inputs), { projectPath: projectPath, feature: constants_2.BuiltInFeaturePluginNames.bot, capabilities: capabilities });
311
- const addFeatureRes = await this._addFeature(addFeatureInputs, ctx);
312
- if (addFeatureRes.isErr()) {
313
- return teamsfx_api_1.err(addFeatureRes.error);
330
+ else if (capabilities.includes(question_2.TabSPFxItem.id)) {
331
+ features.push(constants_2.BuiltInFeaturePluginNames.spfx);
332
+ }
333
+ if (capabilities.includes(question_2.BotOptionItem.id) ||
334
+ capabilities.includes(question_1.MessageExtensionItem.id)) {
335
+ features.push(constants_2.BuiltInFeaturePluginNames.bot);
314
336
  }
315
337
  }
316
- }
317
- if ((_a = ctx.projectSettings) === null || _a === void 0 ? void 0 : _a.solutionSettings) {
318
- ctx.projectSettings.solutionSettings.hostType = question_1.HostTypeOptionAzure.id;
338
+ const addFeatureInputs = Object.assign(Object.assign({}, inputs), { projectPath: projectPath, features: features });
339
+ const addFeatureRes = await this.addFeature(addFeatureInputs);
340
+ if (addFeatureRes.isErr()) {
341
+ return teamsfx_api_1.err(addFeatureRes.error);
342
+ }
319
343
  }
320
344
  }
321
345
  if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
@@ -324,91 +348,6 @@ class FxCore {
324
348
  }
325
349
  return teamsfx_api_1.ok(projectPath);
326
350
  }
327
- async migrateV1Project(inputs, ctx) {
328
- var _a;
329
- exports.currentStage = teamsfx_api_1.Stage.migrateV1;
330
- inputs.stage = teamsfx_api_1.Stage.migrateV1;
331
- const globalStateDescription = "openReadme";
332
- const appName = ((_a = inputs[question_2.DefaultAppNameFunc.name]) !== null && _a !== void 0 ? _a : inputs[question_2.QuestionV1AppName.name]);
333
- if (undefined === appName)
334
- return teamsfx_api_1.err(error_1.InvalidInputError(`App Name is empty`, inputs));
335
- const validateResult = jsonschema.validate(appName, {
336
- pattern: question_2.ProjectNamePattern,
337
- });
338
- if (validateResult.errors && validateResult.errors.length > 0) {
339
- return teamsfx_api_1.err(error_1.InvalidInputError(`${validateResult.errors[0].message}`, inputs));
340
- }
341
- const projectPath = inputs.projectPath;
342
- if (!projectPath || !(await fs.pathExists(projectPath))) {
343
- return teamsfx_api_1.err(error_1.ProjectFolderNotExistError(projectPath !== null && projectPath !== void 0 ? projectPath : ""));
344
- }
345
- const solution = await SolutionPluginContainer_1.getAllSolutionPlugins()[0];
346
- const projectSettings = {
347
- appName: appName,
348
- projectId: uuid.v4(),
349
- solutionSettings: {
350
- name: solution.name,
351
- version: "1.0.0",
352
- migrateFromV1: true,
353
- },
354
- };
355
- const solutionContext = Object.assign(Object.assign(Object.assign({ projectSettings: projectSettings, envInfo: tools_2.newEnvInfo(), root: projectPath }, this.tools), this.tools.tokenProvider), { answers: inputs, cryptoProvider: new crypto_1.LocalCrypto(projectSettings.projectId) });
356
- const archiveResult = await this.archive(projectPath);
357
- if (archiveResult.isErr()) {
358
- return teamsfx_api_1.err(archiveResult.error);
359
- }
360
- await fs.ensureDir(projectPath);
361
- await fs.ensureDir(path.join(projectPath, `.${teamsfx_api_1.ConfigFolderName}`));
362
- const createResult = await createBasicFolderStructure(inputs);
363
- if (createResult.isErr()) {
364
- return teamsfx_api_1.err(createResult.error);
365
- }
366
- if (!solution.migrate) {
367
- return teamsfx_api_1.err(error_1.MigrateNotImplementError(projectPath));
368
- }
369
- const migrateV1Res = await solution.migrate(solutionContext);
370
- if (migrateV1Res.isErr()) {
371
- return migrateV1Res;
372
- }
373
- ctx.solution = solution;
374
- ctx.solutionContext = solutionContext;
375
- ctx.projectSettings = projectSettings;
376
- if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
377
- await globalState_1.globalStateUpdate(globalStateDescription, true);
378
- }
379
- this._setEnvInfoV2(ctx);
380
- return teamsfx_api_1.ok(projectPath);
381
- }
382
- async archive(projectPath) {
383
- try {
384
- const archiveFolderPath = path.join(projectPath, teamsfx_api_1.ArchiveFolderName);
385
- await fs.ensureDir(archiveFolderPath);
386
- const fileNames = await fs.readdir(projectPath);
387
- const archiveLog = async (projectPath, message) => {
388
- await fs.appendFile(path.join(projectPath, teamsfx_api_1.ArchiveLogFileName), `[${new Date().toISOString()}] ${message}\n`);
389
- };
390
- await archiveLog(projectPath, `Start to move files into '${teamsfx_api_1.ArchiveFolderName}' folder.`);
391
- for (const fileName of fileNames) {
392
- if (fileName === teamsfx_api_1.ArchiveFolderName || fileName === teamsfx_api_1.ArchiveLogFileName) {
393
- continue;
394
- }
395
- try {
396
- await fs.move(path.join(projectPath, fileName), path.join(archiveFolderPath, fileName), {
397
- overwrite: true,
398
- });
399
- }
400
- catch (e) {
401
- await archiveLog(projectPath, `Failed to move '${fileName}'. ${e.message}`);
402
- return teamsfx_api_1.err(error_1.ArchiveUserFileError(fileName, e.message));
403
- }
404
- await archiveLog(projectPath, `'${fileName}' has been moved to '${teamsfx_api_1.ArchiveFolderName}' folder.`);
405
- }
406
- return teamsfx_api_1.ok(teamsfx_api_1.Void);
407
- }
408
- catch (e) {
409
- return teamsfx_api_1.err(error_1.ArchiveProjectError(e.message));
410
- }
411
- }
412
351
  /**
413
352
  * switch to different versions of provisionResources
414
353
  */
@@ -479,7 +418,7 @@ class FxCore {
479
418
  if (!(ctx === null || ctx === void 0 ? void 0 : ctx.projectSettings)) {
480
419
  return teamsfx_api_1.err(new error_1.ObjectIsUndefinedError("deploy input stuff"));
481
420
  }
482
- if (utils_1.isPureExistingApp(ctx.projectSettings)) {
421
+ if (utils_2.isPureExistingApp(ctx.projectSettings)) {
483
422
  // existing app scenario, deploy has no effect
484
423
  return teamsfx_api_1.err(new error_1.OperationNotSupportedForExistingAppError("deploy"));
485
424
  }
@@ -504,7 +443,7 @@ class FxCore {
504
443
  async localDebug(inputs) {
505
444
  inputs.env = __1.environmentManager.getLocalEnvName();
506
445
  if (isV3())
507
- return this.localDebugV3(inputs);
446
+ return this.provisionResourcesV3(inputs);
508
447
  else
509
448
  return this.localDebugV2(inputs);
510
449
  }
@@ -514,7 +453,7 @@ class FxCore {
514
453
  if (!(ctx === null || ctx === void 0 ? void 0 : ctx.projectSettings)) {
515
454
  return teamsfx_api_1.err(new error_1.ObjectIsUndefinedError("local debug input stuff"));
516
455
  }
517
- if (utils_1.isPureExistingApp(ctx.projectSettings)) {
456
+ if (utils_2.isPureExistingApp(ctx.projectSettings)) {
518
457
  // existing app scenario, local debug has no effect
519
458
  return teamsfx_api_1.err(new error_1.OperationNotSupportedForExistingAppError("localDebug"));
520
459
  }
@@ -542,22 +481,6 @@ class FxCore {
542
481
  return teamsfx_api_1.ok(teamsfx_api_1.Void);
543
482
  }
544
483
  }
545
- async localDebugV3(inputs, ctx) {
546
- exports.currentStage = teamsfx_api_1.Stage.debug;
547
- inputs.stage = teamsfx_api_1.Stage.debug;
548
- if (ctx &&
549
- ctx.solutionV3 &&
550
- ctx.contextV2 &&
551
- ctx.envInfoV3 &&
552
- ctx.solutionV3.provisionResources) {
553
- const res = await ctx.solutionV3.provisionResources(ctx.contextV2, inputs, ctx.envInfoV3, exports.TOOLS.tokenProvider);
554
- if (res.isOk()) {
555
- ctx.localSettings = res.value;
556
- }
557
- return res;
558
- }
559
- return teamsfx_api_1.ok(teamsfx_api_1.Void);
560
- }
561
484
  _setEnvInfoV2(ctx) {
562
485
  if (ctx && ctx.solutionContext) {
563
486
  //workaround, compatible to api v2
@@ -597,7 +520,7 @@ class FxCore {
597
520
  }
598
521
  return teamsfx_api_1.ok(teamsfx_api_1.Void);
599
522
  }
600
- async executeUserTask(func, inputs, ctx) {
523
+ async executeUserTask(func, inputs) {
601
524
  if (isV3())
602
525
  return this.executeUserTaskV3(func, inputs);
603
526
  else
@@ -690,7 +613,13 @@ class FxCore {
690
613
  localSettings: (_b = ctx.solutionContext) === null || _b === void 0 ? void 0 : _b.localSettings,
691
614
  });
692
615
  }
693
- async grantPermission(inputs, ctx) {
616
+ async grantPermission(inputs) {
617
+ if (isV3())
618
+ return this.grantPermissionV3(inputs);
619
+ else
620
+ return this.grantPermissionV2(inputs);
621
+ }
622
+ async grantPermissionV2(inputs, ctx) {
694
623
  exports.currentStage = teamsfx_api_1.Stage.grantPermission;
695
624
  inputs.stage = teamsfx_api_1.Stage.grantPermission;
696
625
  const projectPath = inputs.projectPath;
@@ -699,7 +628,26 @@ class FxCore {
699
628
  }
700
629
  return ctx.solutionV2.grantPermission(ctx.contextV2, Object.assign(Object.assign({}, inputs), { projectPath: projectPath }), ctx.envInfoV2, this.tools.tokenProvider);
701
630
  }
702
- async checkPermission(inputs, ctx) {
631
+ async grantPermissionV3(inputs, ctx) {
632
+ exports.currentStage = teamsfx_api_1.Stage.grantPermission;
633
+ inputs.stage = teamsfx_api_1.Stage.grantPermission;
634
+ const projectPath = inputs.projectPath;
635
+ if (!projectPath) {
636
+ return teamsfx_api_1.err(new error_1.ObjectIsUndefinedError("projectPath"));
637
+ }
638
+ if (ctx && ctx.contextV2 && ctx.envInfoV3) {
639
+ const res = await collaborator_1.grantPermission(ctx.contextV2, inputs, ctx.envInfoV3, exports.TOOLS.tokenProvider);
640
+ return res;
641
+ }
642
+ return teamsfx_api_1.err(new error_1.ObjectIsUndefinedError("ctx, contextV2, envInfoV3"));
643
+ }
644
+ async checkPermission(inputs) {
645
+ if (isV3())
646
+ return this.checkPermissionV3(inputs);
647
+ else
648
+ return this.checkPermissionV2(inputs);
649
+ }
650
+ async checkPermissionV2(inputs, ctx) {
703
651
  exports.currentStage = teamsfx_api_1.Stage.checkPermission;
704
652
  inputs.stage = teamsfx_api_1.Stage.checkPermission;
705
653
  const projectPath = inputs.projectPath;
@@ -708,7 +656,26 @@ class FxCore {
708
656
  }
709
657
  return ctx.solutionV2.checkPermission(ctx.contextV2, Object.assign(Object.assign({}, inputs), { projectPath: projectPath }), ctx.envInfoV2, this.tools.tokenProvider);
710
658
  }
711
- async listCollaborator(inputs, ctx) {
659
+ async checkPermissionV3(inputs, ctx) {
660
+ exports.currentStage = teamsfx_api_1.Stage.checkPermission;
661
+ inputs.stage = teamsfx_api_1.Stage.checkPermission;
662
+ const projectPath = inputs.projectPath;
663
+ if (!projectPath) {
664
+ return teamsfx_api_1.err(new error_1.ObjectIsUndefinedError("projectPath"));
665
+ }
666
+ if (ctx && ctx.contextV2 && ctx.envInfoV3) {
667
+ const res = await collaborator_1.checkPermission(ctx.contextV2, inputs, ctx.envInfoV3, exports.TOOLS.tokenProvider);
668
+ return res;
669
+ }
670
+ return teamsfx_api_1.err(new error_1.ObjectIsUndefinedError("ctx, contextV2, envInfoV3"));
671
+ }
672
+ async listCollaborator(inputs) {
673
+ if (isV3())
674
+ return this.listCollaboratorV3(inputs);
675
+ else
676
+ return this.listCollaboratorV2(inputs);
677
+ }
678
+ async listCollaboratorV2(inputs, ctx) {
712
679
  exports.currentStage = teamsfx_api_1.Stage.listCollaborator;
713
680
  inputs.stage = teamsfx_api_1.Stage.listCollaborator;
714
681
  const projectPath = inputs.projectPath;
@@ -717,6 +684,19 @@ class FxCore {
717
684
  }
718
685
  return ctx.solutionV2.listCollaborator(ctx.contextV2, Object.assign(Object.assign({}, inputs), { projectPath: projectPath }), ctx.envInfoV2, this.tools.tokenProvider);
719
686
  }
687
+ async listCollaboratorV3(inputs, ctx) {
688
+ exports.currentStage = teamsfx_api_1.Stage.listCollaborator;
689
+ inputs.stage = teamsfx_api_1.Stage.listCollaborator;
690
+ const projectPath = inputs.projectPath;
691
+ if (!projectPath) {
692
+ return teamsfx_api_1.err(new error_1.ObjectIsUndefinedError("projectPath"));
693
+ }
694
+ if (ctx && ctx.contextV2 && ctx.envInfoV3) {
695
+ const res = await collaborator_1.listCollaborator(ctx.contextV2, inputs, ctx.envInfoV3, exports.TOOLS.tokenProvider);
696
+ return res;
697
+ }
698
+ return teamsfx_api_1.err(new error_1.ObjectIsUndefinedError("ctx, contextV2, envInfoV3"));
699
+ }
720
700
  async getSelectedEnv(inputs, ctx) {
721
701
  var _a;
722
702
  return teamsfx_api_1.ok((_a = ctx === null || ctx === void 0 ? void 0 : ctx.envInfoV2) === null || _a === void 0 ? void 0 : _a.envName);
@@ -769,7 +749,7 @@ class FxCore {
769
749
  async createEnvWithName(targetEnvName, projectSettings, inputs) {
770
750
  let appName = projectSettings.appName;
771
751
  if (targetEnvName === __1.environmentManager.getLocalEnvName()) {
772
- appName = appName + "-local-debug";
752
+ appName = utils_1.getLocalAppName(appName);
773
753
  }
774
754
  const newEnvConfig = __1.environmentManager.newEnvConfigData(appName);
775
755
  const writeEnvResult = await __1.environmentManager.writeEnvConfig(inputs.projectPath, newEnvConfig, targetEnvName);
@@ -819,9 +799,11 @@ class FxCore {
819
799
  return teamsfx_api_1.ok(teamsfx_api_1.Void);
820
800
  }
821
801
  async _init(inputs, ctx) {
802
+ var _a;
822
803
  if (!ctx) {
823
804
  return teamsfx_api_1.err(new error_1.ObjectIsUndefinedError("ctx for createProject"));
824
805
  }
806
+ // validate app name
825
807
  const appName = inputs[question_2.QuestionAppName.name];
826
808
  const validateResult = jsonschema.validate(appName, {
827
809
  pattern: question_2.ProjectNamePattern,
@@ -829,29 +811,62 @@ class FxCore {
829
811
  if (validateResult.errors && validateResult.errors.length > 0) {
830
812
  return teamsfx_api_1.err(error_1.InvalidInputError("invalid app-name", inputs));
831
813
  }
814
+ // create ProjectSettings
832
815
  const projectSettings = newProjectSettings();
833
816
  projectSettings.appName = appName;
834
817
  ctx.projectSettings = projectSettings;
835
- const createEnvResult = await this.createEnvWithName(__1.environmentManager.getDefaultEnvName(), projectSettings, inputs);
836
- if (createEnvResult.isErr()) {
837
- return teamsfx_api_1.err(createEnvResult.error);
838
- }
839
- if (tools_1.isConfigUnifyEnabled()) {
840
- const createLocalEnvResult = await this.createEnvWithName(__1.environmentManager.getLocalEnvName(), projectSettings, inputs);
841
- if (createLocalEnvResult.isErr()) {
842
- return teamsfx_api_1.err(createLocalEnvResult.error);
843
- }
844
- }
818
+ // create folder structure
845
819
  await fs.ensureDir(path.join(inputs.projectPath, `.${teamsfx_api_1.ConfigFolderName}`));
846
820
  await fs.ensureDir(path.join(inputs.projectPath, "templates", `${teamsfx_api_1.AppPackageFolderName}`));
847
821
  const basicFolderRes = await createBasicFolderStructure(inputs);
848
822
  if (basicFolderRes.isErr()) {
849
823
  return teamsfx_api_1.err(basicFolderRes.error);
850
824
  }
825
+ // create contextV2
851
826
  const context = createV2Context(projectSettings);
852
827
  ctx.contextV2 = context;
853
828
  const appStudioV3 = typedi_1.Container.get(constants_2.BuiltInFeaturePluginNames.appStudio);
854
- await appStudioV3.init(context, inputs);
829
+ // init manifest
830
+ const manifestInitRes = await appStudioV3.init(context, inputs);
831
+ if (manifestInitRes.isErr())
832
+ return teamsfx_api_1.err(manifestInitRes.error);
833
+ if ((_a = inputs.existingAppConfig) === null || _a === void 0 ? void 0 : _a.isCreatedFromExistingApp) {
834
+ const newEnvConfig = __1.environmentManager.newEnvConfigData(appName, inputs.existingAppConfig);
835
+ const writeEnvResult = await __1.environmentManager.writeEnvConfig(inputs.projectPath, newEnvConfig, __1.environmentManager.getDefaultEnvName());
836
+ if (writeEnvResult.isErr()) {
837
+ return teamsfx_api_1.err(writeEnvResult.error);
838
+ }
839
+ // call App Studio V3 API to create manifest with placeholder
840
+ const appStudio = typedi_1.Container.get(constants_2.BuiltInFeaturePluginNames.appStudio);
841
+ const contextV2 = createV2Context(projectSettings);
842
+ const initRes = await appStudio.init(contextV2, inputs);
843
+ if (initRes.isErr())
844
+ return teamsfx_api_1.err(initRes.error);
845
+ const manifestCaps = [];
846
+ inputs.existingAppConfig.newAppTypes.forEach((t) => {
847
+ if (t === teamsfx_api_1.ExistingTeamsAppType.Bot)
848
+ manifestCaps.push({ name: "Bot", existingApp: true });
849
+ else if (t === teamsfx_api_1.ExistingTeamsAppType.StaticTab)
850
+ manifestCaps.push({ name: "staticTab", existingApp: true });
851
+ else if (t === teamsfx_api_1.ExistingTeamsAppType.ConfigurableTab)
852
+ manifestCaps.push({ name: "configurableTab", existingApp: true });
853
+ else if (t === teamsfx_api_1.ExistingTeamsAppType.MessageExtension)
854
+ manifestCaps.push({ name: "MessageExtension", existingApp: true });
855
+ });
856
+ const addCapabilitiesRes = await appStudio.addCapabilities(contextV2, inputs, manifestCaps);
857
+ if (addCapabilitiesRes.isErr())
858
+ return teamsfx_api_1.err(addCapabilitiesRes.error);
859
+ }
860
+ else {
861
+ const createEnvResult = await this.createEnvWithName(__1.environmentManager.getDefaultEnvName(), projectSettings, inputs);
862
+ if (createEnvResult.isErr()) {
863
+ return teamsfx_api_1.err(createEnvResult.error);
864
+ }
865
+ }
866
+ const createLocalEnvResult = await this.createEnvWithName(__1.environmentManager.getLocalEnvName(), projectSettings, inputs);
867
+ if (createLocalEnvResult.isErr()) {
868
+ return teamsfx_api_1.err(createLocalEnvResult.error);
869
+ }
855
870
  return teamsfx_api_1.ok(teamsfx_api_1.Void);
856
871
  }
857
872
  async init(inputs, ctx) {
@@ -870,7 +885,6 @@ class FxCore {
870
885
  tslib_1.__decorate([
871
886
  hooks_1.hooks([
872
887
  errorHandler_1.ErrorHandlerMW,
873
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
874
888
  questionModel_1.QuestionModelMW,
875
889
  contextInjector_1.ContextInjectorMW,
876
890
  projectSettingsWriter_1.ProjectSettingsWriterMW,
@@ -881,37 +895,15 @@ tslib_1.__decorate([
881
895
  tslib_1.__metadata("design:returntype", Promise)
882
896
  ], FxCore.prototype, "createProjectV2", null);
883
897
  tslib_1.__decorate([
884
- hooks_1.hooks([
885
- errorHandler_1.ErrorHandlerMW,
886
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
887
- questionModel_1.QuestionModelMW,
888
- contextInjector_1.ContextInjectorMW,
889
- projectSettingsWriter_1.ProjectSettingsWriterMW,
890
- envInfoWriterV3_1.EnvInfoWriterMW_V3(true),
891
- ]),
898
+ hooks_1.hooks([errorHandler_1.ErrorHandlerMW, questionModel_1.QuestionModelMW, contextInjector_1.ContextInjectorMW]),
892
899
  tslib_1.__metadata("design:type", Function),
893
900
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
894
901
  tslib_1.__metadata("design:returntype", Promise)
895
902
  ], FxCore.prototype, "createProjectV3", null);
896
- tslib_1.__decorate([
897
- hooks_1.hooks([
898
- errorHandler_1.ErrorHandlerMW,
899
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
900
- migrateConditionHandler_1.MigrateConditionHandlerMW,
901
- questionModel_1.QuestionModelMW,
902
- contextInjector_1.ContextInjectorMW,
903
- projectSettingsWriter_1.ProjectSettingsWriterMW,
904
- envInfoWriter_1.EnvInfoWriterMW(true),
905
- ]),
906
- tslib_1.__metadata("design:type", Function),
907
- tslib_1.__metadata("design:paramtypes", [Object, Object]),
908
- tslib_1.__metadata("design:returntype", Promise)
909
- ], FxCore.prototype, "migrateV1Project", null);
910
903
  tslib_1.__decorate([
911
904
  hooks_1.hooks([
912
905
  errorHandler_1.ErrorHandlerMW,
913
906
  concurrentLocker_1.ConcurrentLockerMW,
914
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
915
907
  projectMigrator_1.ProjectMigratorMW,
916
908
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
917
909
  envInfoLoader_1.EnvInfoLoaderMW(false),
@@ -929,7 +921,6 @@ tslib_1.__decorate([
929
921
  hooks_1.hooks([
930
922
  errorHandler_1.ErrorHandlerMW,
931
923
  concurrentLocker_1.ConcurrentLockerMW,
932
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
933
924
  projectMigrator_1.ProjectMigratorMW,
934
925
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
935
926
  envInfoLoaderV3_1.EnvInfoLoaderMW_V3(false),
@@ -947,7 +938,6 @@ tslib_1.__decorate([
947
938
  hooks_1.hooks([
948
939
  errorHandler_1.ErrorHandlerMW,
949
940
  concurrentLocker_1.ConcurrentLockerMW,
950
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
951
941
  projectMigrator_1.ProjectMigratorMW,
952
942
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
953
943
  envInfoLoader_1.EnvInfoLoaderMW(false),
@@ -965,7 +955,6 @@ tslib_1.__decorate([
965
955
  hooks_1.hooks([
966
956
  errorHandler_1.ErrorHandlerMW,
967
957
  concurrentLocker_1.ConcurrentLockerMW,
968
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
969
958
  projectMigrator_1.ProjectMigratorMW,
970
959
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
971
960
  envInfoLoaderV3_1.EnvInfoLoaderMW_V3(false),
@@ -983,7 +972,6 @@ tslib_1.__decorate([
983
972
  hooks_1.hooks([
984
973
  errorHandler_1.ErrorHandlerMW,
985
974
  concurrentLocker_1.ConcurrentLockerMW,
986
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
987
975
  projectMigrator_1.ProjectMigratorMW,
988
976
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
989
977
  envInfoLoader_1.EnvInfoLoaderMW(!tools_1.isConfigUnifyEnabled()),
@@ -1003,25 +991,6 @@ tslib_1.__decorate([
1003
991
  hooks_1.hooks([
1004
992
  errorHandler_1.ErrorHandlerMW,
1005
993
  concurrentLocker_1.ConcurrentLockerMW,
1006
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
1007
- projectMigrator_1.ProjectMigratorMW,
1008
- projectSettingsLoader_1.ProjectSettingsLoaderMW,
1009
- localSettingsLoader_1.LocalSettingsLoaderMW,
1010
- solutionLoaderV3_1.SolutionLoaderMW_V3,
1011
- questionModel_1.QuestionModelMW,
1012
- contextInjector_1.ContextInjectorMW,
1013
- projectSettingsWriter_1.ProjectSettingsWriterMW,
1014
- localSettingsWriter_1.LocalSettingsWriterMW,
1015
- ]),
1016
- tslib_1.__metadata("design:type", Function),
1017
- tslib_1.__metadata("design:paramtypes", [Object, Object]),
1018
- tslib_1.__metadata("design:returntype", Promise)
1019
- ], FxCore.prototype, "localDebugV3", null);
1020
- tslib_1.__decorate([
1021
- hooks_1.hooks([
1022
- errorHandler_1.ErrorHandlerMW,
1023
- concurrentLocker_1.ConcurrentLockerMW,
1024
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
1025
994
  projectMigrator_1.ProjectMigratorMW,
1026
995
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1027
996
  envInfoLoader_1.EnvInfoLoaderMW(false),
@@ -1039,7 +1008,6 @@ tslib_1.__decorate([
1039
1008
  hooks_1.hooks([
1040
1009
  errorHandler_1.ErrorHandlerMW,
1041
1010
  concurrentLocker_1.ConcurrentLockerMW,
1042
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
1043
1011
  projectMigrator_1.ProjectMigratorMW,
1044
1012
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1045
1013
  envInfoLoader_1.EnvInfoLoaderMW(false),
@@ -1057,7 +1025,6 @@ tslib_1.__decorate([
1057
1025
  hooks_1.hooks([
1058
1026
  errorHandler_1.ErrorHandlerMW,
1059
1027
  concurrentLocker_1.ConcurrentLockerMW,
1060
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
1061
1028
  projectMigrator_1.ProjectMigratorMW,
1062
1029
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1063
1030
  envInfoLoader_1.EnvInfoLoaderMW(false),
@@ -1076,7 +1043,6 @@ tslib_1.__decorate([
1076
1043
  hooks_1.hooks([
1077
1044
  errorHandler_1.ErrorHandlerMW,
1078
1045
  concurrentLocker_1.ConcurrentLockerMW,
1079
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
1080
1046
  projectMigrator_1.ProjectMigratorMW,
1081
1047
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1082
1048
  envInfoLoaderV3_1.EnvInfoLoaderMW_V3(false),
@@ -1095,7 +1061,6 @@ tslib_1.__decorate([
1095
1061
  hooks_1.hooks([
1096
1062
  errorHandler_1.ErrorHandlerMW,
1097
1063
  concurrentLocker_1.ConcurrentLockerMW,
1098
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
1099
1064
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1100
1065
  envInfoLoader_1.EnvInfoLoaderMW(true),
1101
1066
  solutionLoader_1.SolutionLoaderMW,
@@ -1110,7 +1075,6 @@ tslib_1.__decorate([
1110
1075
  hooks_1.hooks([
1111
1076
  errorHandler_1.ErrorHandlerMW,
1112
1077
  concurrentLocker_1.ConcurrentLockerMW,
1113
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
1114
1078
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1115
1079
  envInfoLoader_1.EnvInfoLoaderMW(true),
1116
1080
  solutionLoader_1.SolutionLoaderMW,
@@ -1125,7 +1089,6 @@ tslib_1.__decorate([
1125
1089
  hooks_1.hooks([
1126
1090
  errorHandler_1.ErrorHandlerMW,
1127
1091
  concurrentLocker_1.ConcurrentLockerMW,
1128
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
1129
1092
  projectMigrator_1.ProjectMigratorMW,
1130
1093
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1131
1094
  envInfoLoader_1.EnvInfoLoaderMW(false),
@@ -1140,7 +1103,6 @@ tslib_1.__decorate([
1140
1103
  hooks_1.hooks([
1141
1104
  errorHandler_1.ErrorHandlerMW,
1142
1105
  concurrentLocker_1.ConcurrentLockerMW,
1143
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
1144
1106
  projectMigrator_1.ProjectMigratorMW,
1145
1107
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1146
1108
  envInfoLoader_1.EnvInfoLoaderMW(false),
@@ -1151,12 +1113,25 @@ tslib_1.__decorate([
1151
1113
  tslib_1.__metadata("design:type", Function),
1152
1114
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
1153
1115
  tslib_1.__metadata("design:returntype", Promise)
1154
- ], FxCore.prototype, "grantPermission", null);
1116
+ ], FxCore.prototype, "grantPermissionV2", null);
1117
+ tslib_1.__decorate([
1118
+ hooks_1.hooks([
1119
+ errorHandler_1.ErrorHandlerMW,
1120
+ concurrentLocker_1.ConcurrentLockerMW,
1121
+ projectMigrator_1.ProjectMigratorMW,
1122
+ projectSettingsLoader_1.ProjectSettingsLoaderMW,
1123
+ envInfoLoaderV3_1.EnvInfoLoaderMW_V3(false),
1124
+ questionModel_1.QuestionModelMW,
1125
+ contextInjector_1.ContextInjectorMW,
1126
+ ]),
1127
+ tslib_1.__metadata("design:type", Function),
1128
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
1129
+ tslib_1.__metadata("design:returntype", Promise)
1130
+ ], FxCore.prototype, "grantPermissionV3", null);
1155
1131
  tslib_1.__decorate([
1156
1132
  hooks_1.hooks([
1157
1133
  errorHandler_1.ErrorHandlerMW,
1158
1134
  concurrentLocker_1.ConcurrentLockerMW,
1159
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
1160
1135
  projectMigrator_1.ProjectMigratorMW,
1161
1136
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1162
1137
  envInfoLoader_1.EnvInfoLoaderMW(false),
@@ -1167,12 +1142,24 @@ tslib_1.__decorate([
1167
1142
  tslib_1.__metadata("design:type", Function),
1168
1143
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
1169
1144
  tslib_1.__metadata("design:returntype", Promise)
1170
- ], FxCore.prototype, "checkPermission", null);
1145
+ ], FxCore.prototype, "checkPermissionV2", null);
1146
+ tslib_1.__decorate([
1147
+ hooks_1.hooks([
1148
+ errorHandler_1.ErrorHandlerMW,
1149
+ concurrentLocker_1.ConcurrentLockerMW,
1150
+ projectMigrator_1.ProjectMigratorMW,
1151
+ projectSettingsLoader_1.ProjectSettingsLoaderMW,
1152
+ envInfoLoaderV3_1.EnvInfoLoaderMW_V3(false),
1153
+ contextInjector_1.ContextInjectorMW,
1154
+ ]),
1155
+ tslib_1.__metadata("design:type", Function),
1156
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
1157
+ tslib_1.__metadata("design:returntype", Promise)
1158
+ ], FxCore.prototype, "checkPermissionV3", null);
1171
1159
  tslib_1.__decorate([
1172
1160
  hooks_1.hooks([
1173
1161
  errorHandler_1.ErrorHandlerMW,
1174
1162
  concurrentLocker_1.ConcurrentLockerMW,
1175
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
1176
1163
  projectMigrator_1.ProjectMigratorMW,
1177
1164
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1178
1165
  envInfoLoader_1.EnvInfoLoaderMW(false),
@@ -1183,7 +1170,20 @@ tslib_1.__decorate([
1183
1170
  tslib_1.__metadata("design:type", Function),
1184
1171
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
1185
1172
  tslib_1.__metadata("design:returntype", Promise)
1186
- ], FxCore.prototype, "listCollaborator", null);
1173
+ ], FxCore.prototype, "listCollaboratorV2", null);
1174
+ tslib_1.__decorate([
1175
+ hooks_1.hooks([
1176
+ errorHandler_1.ErrorHandlerMW,
1177
+ concurrentLocker_1.ConcurrentLockerMW,
1178
+ projectMigrator_1.ProjectMigratorMW,
1179
+ projectSettingsLoader_1.ProjectSettingsLoaderMW,
1180
+ envInfoLoaderV3_1.EnvInfoLoaderMW_V3(false),
1181
+ contextInjector_1.ContextInjectorMW,
1182
+ ]),
1183
+ tslib_1.__metadata("design:type", Function),
1184
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
1185
+ tslib_1.__metadata("design:returntype", Promise)
1186
+ ], FxCore.prototype, "listCollaboratorV3", null);
1187
1187
  tslib_1.__decorate([
1188
1188
  hooks_1.hooks([
1189
1189
  errorHandler_1.ErrorHandlerMW,
@@ -1200,7 +1200,6 @@ tslib_1.__decorate([
1200
1200
  hooks_1.hooks([
1201
1201
  errorHandler_1.ErrorHandlerMW,
1202
1202
  concurrentLocker_1.ConcurrentLockerMW,
1203
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
1204
1203
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1205
1204
  envInfoLoader_1.EnvInfoLoaderMW(true),
1206
1205
  contextInjector_1.ContextInjectorMW,
@@ -1213,7 +1212,6 @@ tslib_1.__decorate([
1213
1212
  hooks_1.hooks([
1214
1213
  errorHandler_1.ErrorHandlerMW,
1215
1214
  concurrentLocker_1.ConcurrentLockerMW,
1216
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
1217
1215
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1218
1216
  envInfoLoader_1.EnvInfoLoaderMW(true),
1219
1217
  contextInjector_1.ContextInjectorMW,
@@ -1226,7 +1224,6 @@ tslib_1.__decorate([
1226
1224
  hooks_1.hooks([
1227
1225
  errorHandler_1.ErrorHandlerMW,
1228
1226
  concurrentLocker_1.ConcurrentLockerMW,
1229
- supportV1ConditionHandler_1.SupportV1ConditionMW(false),
1230
1227
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1231
1228
  solutionLoader_1.SolutionLoaderMW,
1232
1229
  envInfoLoader_1.EnvInfoLoaderMW(true),
@@ -1240,7 +1237,6 @@ tslib_1.__decorate([
1240
1237
  hooks_1.hooks([
1241
1238
  errorHandler_1.ErrorHandlerMW,
1242
1239
  concurrentLocker_1.ConcurrentLockerMW,
1243
- supportV1ConditionHandler_1.SupportV1ConditionMW(true),
1244
1240
  projectMigrator_1.ProjectMigratorMW,
1245
1241
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1246
1242
  solutionLoader_1.SolutionLoaderMW,
@@ -1252,7 +1248,13 @@ tslib_1.__decorate([
1252
1248
  tslib_1.__metadata("design:returntype", Promise)
1253
1249
  ], FxCore.prototype, "activateEnv", null);
1254
1250
  tslib_1.__decorate([
1255
- hooks_1.hooks([errorHandler_1.ErrorHandlerMW, questionModel_1.QuestionModelMW, contextInjector_1.ContextInjectorMW, projectSettingsWriter_1.ProjectSettingsWriterMW]),
1251
+ hooks_1.hooks([
1252
+ errorHandler_1.ErrorHandlerMW,
1253
+ concurrentLocker_1.ConcurrentLockerMW,
1254
+ questionModel_1.QuestionModelMW,
1255
+ contextInjector_1.ContextInjectorMW,
1256
+ projectSettingsWriter_1.ProjectSettingsWriterMW,
1257
+ ]),
1256
1258
  tslib_1.__metadata("design:type", Function),
1257
1259
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
1258
1260
  tslib_1.__metadata("design:returntype", Promise)
@@ -1260,6 +1262,7 @@ tslib_1.__decorate([
1260
1262
  tslib_1.__decorate([
1261
1263
  hooks_1.hooks([
1262
1264
  errorHandler_1.ErrorHandlerMW,
1265
+ concurrentLocker_1.ConcurrentLockerMW,
1263
1266
  projectSettingsLoader_1.ProjectSettingsLoaderMW,
1264
1267
  solutionLoaderV3_1.SolutionLoaderMW_V3,
1265
1268
  envInfoLoaderV3_1.EnvInfoLoaderMW_V3(false),
@@ -1271,12 +1274,6 @@ tslib_1.__decorate([
1271
1274
  tslib_1.__metadata("design:paramtypes", [Object, Object]),
1272
1275
  tslib_1.__metadata("design:returntype", Promise)
1273
1276
  ], FxCore.prototype, "addFeature", null);
1274
- tslib_1.__decorate([
1275
- hooks_1.hooks([questionModel_1.QuestionModelMW]),
1276
- tslib_1.__metadata("design:type", Function),
1277
- tslib_1.__metadata("design:paramtypes", [Object, Object]),
1278
- tslib_1.__metadata("design:returntype", Promise)
1279
- ], FxCore.prototype, "_addFeature", null);
1280
1277
  exports.FxCore = FxCore;
1281
1278
  async function createBasicFolderStructure(inputs) {
1282
1279
  if (!inputs.projectPath) {
@@ -1299,17 +1296,19 @@ async function createBasicFolderStructure(inputs) {
1299
1296
  license: "MIT",
1300
1297
  }, null, 4));
1301
1298
  }
1302
- await fs.writeFile(path.join(inputs.projectPath, `.gitignore`), [
1299
+ const gitIgnoreContent = [
1303
1300
  "node_modules",
1304
1301
  `.${teamsfx_api_1.ConfigFolderName}/${teamsfx_api_1.InputConfigsFolderName}/${localSettingsProvider_1.localSettingsFileName}`,
1305
1302
  `.${teamsfx_api_1.ConfigFolderName}/${teamsfx_api_1.StatesFolderName}/*.userdata`,
1306
1303
  ".DS_Store",
1307
- `${teamsfx_api_1.ArchiveFolderName}`,
1308
- `${teamsfx_api_1.ArchiveLogFileName}`,
1309
1304
  ".env.teamsfx.local",
1310
1305
  "subscriptionInfo.json",
1311
1306
  teamsfx_api_1.BuildFolderName,
1312
- ].join("\n"));
1307
+ ];
1308
+ if (inputs.platform === teamsfx_api_1.Platform.VS) {
1309
+ gitIgnoreContent.push("appsettings.Development.json");
1310
+ }
1311
+ await fs.writeFile(path.join(inputs.projectPath, `.gitignore`), gitIgnoreContent.join("\n"));
1313
1312
  }
1314
1313
  catch (e) {
1315
1314
  return teamsfx_api_1.err(error_1.WriteFileError(e));