@microsoft/teamsfx-core 1.1.2 → 1.1.3-alpha.b985a359.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 (595) hide show
  1. package/build/common/armInterface.d.ts +1 -1
  2. package/build/common/armInterface.d.ts.map +1 -1
  3. package/build/common/constants.d.ts +3 -2
  4. package/build/common/constants.d.ts.map +1 -1
  5. package/build/common/constants.js +3 -2
  6. package/build/common/constants.js.map +1 -1
  7. package/build/common/deps-checker/checkerFactory.d.ts +8 -0
  8. package/build/common/deps-checker/checkerFactory.d.ts.map +1 -0
  9. package/build/common/deps-checker/checkerFactory.js +32 -0
  10. package/build/common/deps-checker/checkerFactory.js.map +1 -0
  11. package/build/common/deps-checker/constant/helpLink.d.ts +11 -0
  12. package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -0
  13. package/build/common/deps-checker/constant/helpLink.js +16 -0
  14. package/build/common/deps-checker/constant/helpLink.js.map +1 -0
  15. package/build/common/deps-checker/constant/message.d.ts +29 -0
  16. package/build/common/deps-checker/constant/message.d.ts.map +1 -0
  17. package/build/common/deps-checker/constant/message.js +57 -0
  18. package/build/common/deps-checker/constant/message.js.map +1 -0
  19. package/build/common/deps-checker/constant/telemetry.d.ts +41 -0
  20. package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -0
  21. package/build/common/deps-checker/constant/telemetry.js +49 -0
  22. package/build/common/deps-checker/constant/telemetry.js.map +1 -0
  23. package/build/common/deps-checker/depsChecker.d.ts +24 -0
  24. package/build/common/deps-checker/depsChecker.d.ts.map +1 -0
  25. package/build/common/deps-checker/depsChecker.js +13 -0
  26. package/build/common/deps-checker/depsChecker.js.map +1 -0
  27. package/build/common/deps-checker/depsError.d.ts +17 -0
  28. package/build/common/deps-checker/depsError.d.ts.map +1 -0
  29. package/build/common/deps-checker/depsError.js +42 -0
  30. package/build/common/deps-checker/depsError.js.map +1 -0
  31. package/build/common/deps-checker/depsLogger.d.ts +11 -0
  32. package/build/common/deps-checker/depsLogger.d.ts.map +1 -0
  33. package/build/common/deps-checker/depsLogger.js +5 -0
  34. package/build/common/deps-checker/depsLogger.js.map +1 -0
  35. package/build/common/deps-checker/depsManager.d.ts +35 -0
  36. package/build/common/deps-checker/depsManager.d.ts.map +1 -0
  37. package/build/common/deps-checker/depsManager.js +82 -0
  38. package/build/common/deps-checker/depsManager.js.map +1 -0
  39. package/build/common/deps-checker/depsTelemetry.d.ts +10 -0
  40. package/build/common/deps-checker/depsTelemetry.d.ts.map +1 -0
  41. package/build/common/deps-checker/depsTelemetry.js +5 -0
  42. package/build/common/deps-checker/depsTelemetry.js.map +1 -0
  43. package/build/common/deps-checker/internal/dotnetChecker.d.ts +50 -0
  44. package/build/common/deps-checker/internal/dotnetChecker.d.ts.map +1 -0
  45. package/build/common/deps-checker/internal/dotnetChecker.js +406 -0
  46. package/build/common/deps-checker/internal/dotnetChecker.js.map +1 -0
  47. package/build/common/deps-checker/internal/funcToolChecker.d.ts +40 -0
  48. package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -0
  49. package/build/common/deps-checker/internal/funcToolChecker.js +279 -0
  50. package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -0
  51. package/build/common/deps-checker/internal/ngrokChecker.d.ts +28 -0
  52. package/build/common/deps-checker/internal/ngrokChecker.d.ts.map +1 -0
  53. package/build/common/deps-checker/internal/ngrokChecker.js +183 -0
  54. package/build/common/deps-checker/internal/ngrokChecker.js.map +1 -0
  55. package/build/common/deps-checker/internal/nodeChecker.d.ts +40 -0
  56. package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -0
  57. package/build/common/deps-checker/internal/nodeChecker.js +144 -0
  58. package/build/common/deps-checker/internal/nodeChecker.js.map +1 -0
  59. package/build/common/deps-checker/util/cpUtils.d.ts +24 -0
  60. package/build/common/deps-checker/util/cpUtils.d.ts.map +1 -0
  61. package/build/common/deps-checker/util/cpUtils.js +99 -0
  62. package/build/common/deps-checker/util/cpUtils.js.map +1 -0
  63. package/build/common/deps-checker/util/progressIndicator.d.ts +3 -0
  64. package/build/common/deps-checker/util/progressIndicator.d.ts.map +1 -0
  65. package/build/common/deps-checker/util/progressIndicator.js +18 -0
  66. package/build/common/deps-checker/util/progressIndicator.js.map +1 -0
  67. package/build/common/deps-checker/util/system.d.ts +5 -0
  68. package/build/common/deps-checker/util/system.d.ts.map +1 -0
  69. package/build/common/deps-checker/util/system.js +24 -0
  70. package/build/common/deps-checker/util/system.js.map +1 -0
  71. package/build/common/index.d.ts +1 -0
  72. package/build/common/index.d.ts.map +1 -1
  73. package/build/common/index.js +1 -0
  74. package/build/common/index.js.map +1 -1
  75. package/build/common/local/constants.d.ts +109 -0
  76. package/build/common/local/constants.d.ts.map +1 -0
  77. package/build/common/local/constants.js +115 -0
  78. package/build/common/local/constants.js.map +1 -0
  79. package/build/common/local/localEnvManager.d.ts +19 -0
  80. package/build/common/local/localEnvManager.d.ts.map +1 -0
  81. package/build/common/local/localEnvManager.js +85 -0
  82. package/build/common/local/localEnvManager.js.map +1 -0
  83. package/build/{plugins/resource/localdebug/localEnvMulti.d.ts → common/local/localEnvProvider.d.ts} +5 -4
  84. package/build/common/local/localEnvProvider.d.ts.map +1 -0
  85. package/build/{plugins/resource/localdebug/localEnvMulti.js → common/local/localEnvProvider.js} +19 -15
  86. package/build/common/local/localEnvProvider.js.map +1 -0
  87. package/build/common/local/localSettingsHelper.d.ts +3 -0
  88. package/build/common/local/localSettingsHelper.d.ts.map +1 -0
  89. package/build/common/local/localSettingsHelper.js +129 -0
  90. package/build/common/local/localSettingsHelper.js.map +1 -0
  91. package/build/common/local/npmLogHelper.d.ts +11 -0
  92. package/build/common/local/npmLogHelper.d.ts.map +1 -0
  93. package/build/common/local/npmLogHelper.js +82 -0
  94. package/build/common/local/npmLogHelper.js.map +1 -0
  95. package/build/common/local/packageJsonHelper.d.ts +4 -0
  96. package/build/common/local/packageJsonHelper.d.ts.map +1 -0
  97. package/build/common/local/packageJsonHelper.js +36 -0
  98. package/build/common/local/packageJsonHelper.js.map +1 -0
  99. package/build/common/local/portChecker.d.ts +3 -0
  100. package/build/common/local/portChecker.d.ts.map +1 -0
  101. package/build/common/local/portChecker.js +100 -0
  102. package/build/common/local/portChecker.js.map +1 -0
  103. package/build/common/local/projectSettingsHelper.d.ts +10 -0
  104. package/build/common/local/projectSettingsHelper.d.ts.map +1 -0
  105. package/build/common/local/projectSettingsHelper.js +34 -0
  106. package/build/common/local/projectSettingsHelper.js.map +1 -0
  107. package/build/common/localSettingsProvider.d.ts +3 -3
  108. package/build/common/localSettingsProvider.d.ts.map +1 -1
  109. package/build/common/localSettingsProvider.js +12 -10
  110. package/build/common/localSettingsProvider.js.map +1 -1
  111. package/build/common/samples-config.json +14 -0
  112. package/build/common/templatesActions.d.ts +2 -0
  113. package/build/common/templatesActions.d.ts.map +1 -1
  114. package/build/common/templatesActions.js +33 -1
  115. package/build/common/templatesActions.js.map +1 -1
  116. package/build/common/tools.d.ts +9 -4
  117. package/build/common/tools.d.ts.map +1 -1
  118. package/build/common/tools.js +21 -77
  119. package/build/common/tools.js.map +1 -1
  120. package/build/core/SolutionPluginContainer.d.ts +2 -1
  121. package/build/core/SolutionPluginContainer.d.ts.map +1 -1
  122. package/build/core/SolutionPluginContainer.js +9 -1
  123. package/build/core/SolutionPluginContainer.js.map +1 -1
  124. package/build/core/dependencyChecker.d.ts +1 -0
  125. package/build/core/dependencyChecker.d.ts.map +1 -0
  126. package/build/core/dependencyChecker.js +2 -0
  127. package/build/core/dependencyChecker.js.map +1 -0
  128. package/build/core/downloadSample.d.ts +9 -0
  129. package/build/core/downloadSample.d.ts.map +1 -0
  130. package/build/core/downloadSample.js +150 -0
  131. package/build/core/downloadSample.js.map +1 -0
  132. package/build/core/environment.d.ts +5 -5
  133. package/build/core/environment.d.ts.map +1 -1
  134. package/build/core/environment.js +40 -25
  135. package/build/core/environment.js.map +1 -1
  136. package/build/core/error.d.ts +2 -1
  137. package/build/core/error.d.ts.map +1 -1
  138. package/build/core/error.js +7 -3
  139. package/build/core/error.js.map +1 -1
  140. package/build/core/index.d.ts +53 -15
  141. package/build/core/index.d.ts.map +1 -1
  142. package/build/core/index.js +689 -575
  143. package/build/core/index.js.map +1 -1
  144. package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
  145. package/build/core/middleware/concurrentLocker.js +23 -12
  146. package/build/core/middleware/concurrentLocker.js.map +1 -1
  147. package/build/core/middleware/envInfoLoader.d.ts +5 -1
  148. package/build/core/middleware/envInfoLoader.d.ts.map +1 -1
  149. package/build/core/middleware/envInfoLoader.js +52 -46
  150. package/build/core/middleware/envInfoLoader.js.map +1 -1
  151. package/build/core/middleware/envInfoLoaderV3.d.ts +3 -0
  152. package/build/core/middleware/envInfoLoaderV3.d.ts.map +1 -0
  153. package/build/core/middleware/envInfoLoaderV3.js +64 -0
  154. package/build/core/middleware/envInfoLoaderV3.js.map +1 -0
  155. package/build/core/middleware/envInfoWriter.js +14 -31
  156. package/build/core/middleware/envInfoWriter.js.map +1 -1
  157. package/build/core/middleware/envInfoWriterV3.d.ts +6 -0
  158. package/build/core/middleware/envInfoWriterV3.d.ts.map +1 -0
  159. package/build/core/middleware/envInfoWriterV3.js +63 -0
  160. package/build/core/middleware/envInfoWriterV3.js.map +1 -0
  161. package/build/core/middleware/errorHandler.d.ts.map +1 -1
  162. package/build/core/middleware/errorHandler.js +3 -5
  163. package/build/core/middleware/errorHandler.js.map +1 -1
  164. package/build/core/middleware/localSettingsLoader.d.ts.map +1 -1
  165. package/build/core/middleware/localSettingsLoader.js +1 -2
  166. package/build/core/middleware/localSettingsLoader.js.map +1 -1
  167. package/build/core/middleware/localSettingsWriter.d.ts.map +1 -1
  168. package/build/core/middleware/localSettingsWriter.js +7 -18
  169. package/build/core/middleware/localSettingsWriter.js.map +1 -1
  170. package/build/core/middleware/projectMigrator.d.ts.map +1 -1
  171. package/build/core/middleware/projectMigrator.js +25 -57
  172. package/build/core/middleware/projectMigrator.js.map +1 -1
  173. package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
  174. package/build/core/middleware/projectSettingsLoader.js +3 -6
  175. package/build/core/middleware/projectSettingsLoader.js.map +1 -1
  176. package/build/core/middleware/projectSettingsLoaderV3.d.ts +4 -0
  177. package/build/core/middleware/projectSettingsLoaderV3.d.ts.map +1 -0
  178. package/build/core/middleware/projectSettingsLoaderV3.js +49 -0
  179. package/build/core/middleware/projectSettingsLoaderV3.js.map +1 -0
  180. package/build/core/middleware/projectSettingsWriter.d.ts.map +1 -1
  181. package/build/core/middleware/projectSettingsWriter.js +5 -12
  182. package/build/core/middleware/projectSettingsWriter.js.map +1 -1
  183. package/build/core/middleware/projectUpgrader.d.ts.map +1 -1
  184. package/build/core/middleware/projectUpgrader.js +7 -15
  185. package/build/core/middleware/projectUpgrader.js.map +1 -1
  186. package/build/core/middleware/questionModel.d.ts +14 -1
  187. package/build/core/middleware/questionModel.d.ts.map +1 -1
  188. package/build/core/middleware/questionModel.js +319 -23
  189. package/build/core/middleware/questionModel.js.map +1 -1
  190. package/build/core/middleware/solutionLoader.d.ts +3 -2
  191. package/build/core/middleware/solutionLoader.d.ts.map +1 -1
  192. package/build/core/middleware/solutionLoader.js +21 -23
  193. package/build/core/middleware/solutionLoader.js.map +1 -1
  194. package/build/core/middleware/solutionLoaderV3.d.ts +4 -0
  195. package/build/core/middleware/solutionLoaderV3.d.ts.map +1 -0
  196. package/build/core/middleware/solutionLoaderV3.js +19 -0
  197. package/build/core/middleware/solutionLoaderV3.js.map +1 -0
  198. package/build/core/question.d.ts +9 -1
  199. package/build/core/question.d.ts.map +1 -1
  200. package/build/core/question.js +113 -3
  201. package/build/core/question.js.map +1 -1
  202. package/build/core/tools.d.ts +2 -1
  203. package/build/core/tools.d.ts.map +1 -1
  204. package/build/core/tools.js +19 -10
  205. package/build/core/tools.js.map +1 -1
  206. package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
  207. package/build/plugins/resource/aad/plugin.js +3 -12
  208. package/build/plugins/resource/aad/plugin.js.map +1 -1
  209. package/build/plugins/resource/apim/managers/apimManager.d.ts.map +1 -1
  210. package/build/plugins/resource/apim/managers/apimManager.js +5 -7
  211. package/build/plugins/resource/apim/managers/apimManager.js.map +1 -1
  212. package/build/plugins/resource/appstudio/appStudio.d.ts +1 -1
  213. package/build/plugins/resource/appstudio/appStudio.d.ts.map +1 -1
  214. package/build/plugins/resource/appstudio/appStudio.js +106 -85
  215. package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
  216. package/build/plugins/resource/appstudio/constants.d.ts +6 -1
  217. package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
  218. package/build/plugins/resource/appstudio/constants.js +6 -1
  219. package/build/plugins/resource/appstudio/constants.js.map +1 -1
  220. package/build/plugins/resource/appstudio/errors.d.ts +1 -1
  221. package/build/plugins/resource/appstudio/errors.d.ts.map +1 -1
  222. package/build/plugins/resource/appstudio/errors.js +2 -1
  223. package/build/plugins/resource/appstudio/errors.js.map +1 -1
  224. package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
  225. package/build/plugins/resource/appstudio/index.js +15 -12
  226. package/build/plugins/resource/appstudio/index.js.map +1 -1
  227. package/build/plugins/resource/appstudio/plugin.d.ts +2 -3
  228. package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
  229. package/build/plugins/resource/appstudio/plugin.js +233 -443
  230. package/build/plugins/resource/appstudio/plugin.js.map +1 -1
  231. package/build/plugins/resource/appstudio/utils/telemetry.d.ts.map +1 -1
  232. package/build/plugins/resource/appstudio/utils/telemetry.js +12 -16
  233. package/build/plugins/resource/appstudio/utils/telemetry.js.map +1 -1
  234. package/build/plugins/resource/appstudio/v3/index.d.ts +49 -0
  235. package/build/plugins/resource/appstudio/v3/index.d.ts.map +1 -0
  236. package/build/plugins/resource/appstudio/v3/index.js +51 -0
  237. package/build/plugins/resource/appstudio/v3/index.js.map +1 -0
  238. package/build/plugins/resource/bot/index.d.ts.map +1 -1
  239. package/build/plugins/resource/bot/index.js +5 -1
  240. package/build/plugins/resource/bot/index.js.map +1 -1
  241. package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
  242. package/build/plugins/resource/bot/plugin.js +9 -11
  243. package/build/plugins/resource/bot/plugin.js.map +1 -1
  244. package/build/plugins/resource/frontend/constants.d.ts +1 -7
  245. package/build/plugins/resource/frontend/constants.d.ts.map +1 -1
  246. package/build/plugins/resource/frontend/constants.js +2 -9
  247. package/build/plugins/resource/frontend/constants.js.map +1 -1
  248. package/build/plugins/resource/frontend/env.d.ts +21 -0
  249. package/build/plugins/resource/frontend/env.d.ts.map +1 -0
  250. package/build/plugins/resource/frontend/env.js +82 -0
  251. package/build/plugins/resource/frontend/env.js.map +1 -0
  252. package/build/plugins/resource/frontend/ops/deploy.d.ts +2 -1
  253. package/build/plugins/resource/frontend/ops/deploy.d.ts.map +1 -1
  254. package/build/plugins/resource/frontend/ops/deploy.js +2 -2
  255. package/build/plugins/resource/frontend/ops/deploy.js.map +1 -1
  256. package/build/plugins/resource/frontend/plugin.d.ts +2 -0
  257. package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
  258. package/build/plugins/resource/frontend/plugin.js +28 -16
  259. package/build/plugins/resource/frontend/plugin.js.map +1 -1
  260. package/build/plugins/resource/frontend/utils/environment-utils.d.ts.map +1 -1
  261. package/build/plugins/resource/frontend/utils/environment-utils.js +4 -2
  262. package/build/plugins/resource/frontend/utils/environment-utils.js.map +1 -1
  263. package/build/plugins/resource/frontend/utils.d.ts +6 -1
  264. package/build/plugins/resource/frontend/utils.d.ts.map +1 -1
  265. package/build/plugins/resource/frontend/utils.js +17 -6
  266. package/build/plugins/resource/frontend/utils.js.map +1 -1
  267. package/build/plugins/resource/function/plugin.d.ts.map +1 -1
  268. package/build/plugins/resource/function/plugin.js +7 -9
  269. package/build/plugins/resource/function/plugin.js.map +1 -1
  270. package/build/plugins/resource/function/utils/depsChecker/checker.d.ts +0 -1
  271. package/build/plugins/resource/function/utils/depsChecker/checker.d.ts.map +1 -1
  272. package/build/plugins/resource/function/utils/depsChecker/checker.js +2 -2
  273. package/build/plugins/resource/function/utils/depsChecker/checker.js.map +1 -1
  274. package/build/plugins/resource/function/utils/depsChecker/common.d.ts +2 -2
  275. package/build/plugins/resource/function/utils/depsChecker/common.d.ts.map +1 -1
  276. package/build/plugins/resource/function/utils/depsChecker/common.js +6 -6
  277. package/build/plugins/resource/function/utils/depsChecker/common.js.map +1 -1
  278. package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.d.ts +3 -2
  279. package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.d.ts.map +1 -1
  280. package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.js +3 -2
  281. package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.js.map +1 -1
  282. package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.d.ts +0 -1
  283. package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.d.ts.map +1 -1
  284. package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.js +1 -23
  285. package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.js.map +1 -1
  286. package/build/plugins/resource/identity/index.d.ts.map +1 -1
  287. package/build/plugins/resource/identity/index.js +11 -13
  288. package/build/plugins/resource/identity/index.js.map +1 -1
  289. package/build/plugins/resource/keyvault/plugin.d.ts.map +1 -1
  290. package/build/plugins/resource/keyvault/plugin.js +7 -9
  291. package/build/plugins/resource/keyvault/plugin.js.map +1 -1
  292. package/build/plugins/resource/localdebug/index.d.ts +0 -7
  293. package/build/plugins/resource/localdebug/index.d.ts.map +1 -1
  294. package/build/plugins/resource/localdebug/index.js +3 -501
  295. package/build/plugins/resource/localdebug/index.js.map +1 -1
  296. package/build/plugins/resource/localdebug/util/error.d.ts.map +1 -1
  297. package/build/plugins/resource/localdebug/util/error.js +1 -1
  298. package/build/plugins/resource/localdebug/util/error.js.map +1 -1
  299. package/build/plugins/resource/localdebug/util/localService.d.ts +0 -1
  300. package/build/plugins/resource/localdebug/util/localService.d.ts.map +1 -1
  301. package/build/plugins/resource/localdebug/util/localService.js +1 -40
  302. package/build/plugins/resource/localdebug/util/localService.js.map +1 -1
  303. package/build/plugins/resource/localdebug/v2/index.d.ts.map +1 -1
  304. package/build/plugins/resource/localdebug/v2/index.js +39 -1
  305. package/build/plugins/resource/localdebug/v2/index.js.map +1 -1
  306. package/build/plugins/resource/simpleauth/plugin.d.ts.map +1 -1
  307. package/build/plugins/resource/simpleauth/plugin.js +7 -9
  308. package/build/plugins/resource/simpleauth/plugin.js.map +1 -1
  309. package/build/plugins/resource/simpleauth/utils/common.d.ts.map +1 -1
  310. package/build/plugins/resource/simpleauth/utils/common.js +3 -1
  311. package/build/plugins/resource/simpleauth/utils/common.js.map +1 -1
  312. package/build/plugins/resource/sql/config.d.ts +0 -1
  313. package/build/plugins/resource/sql/config.d.ts.map +1 -1
  314. package/build/plugins/resource/sql/config.js +0 -1
  315. package/build/plugins/resource/sql/config.js.map +1 -1
  316. package/build/plugins/resource/sql/constants.d.ts +1 -0
  317. package/build/plugins/resource/sql/constants.d.ts.map +1 -1
  318. package/build/plugins/resource/sql/constants.js +1 -0
  319. package/build/plugins/resource/sql/constants.js.map +1 -1
  320. package/build/plugins/resource/sql/errors.d.ts +3 -1
  321. package/build/plugins/resource/sql/errors.d.ts.map +1 -1
  322. package/build/plugins/resource/sql/errors.js +3 -1
  323. package/build/plugins/resource/sql/errors.js.map +1 -1
  324. package/build/plugins/resource/sql/managementClient.d.ts +3 -1
  325. package/build/plugins/resource/sql/managementClient.d.ts.map +1 -1
  326. package/build/plugins/resource/sql/managementClient.js +11 -20
  327. package/build/plugins/resource/sql/managementClient.js.map +1 -1
  328. package/build/plugins/resource/sql/plugin.d.ts +3 -0
  329. package/build/plugins/resource/sql/plugin.d.ts.map +1 -1
  330. package/build/plugins/resource/sql/plugin.js +41 -36
  331. package/build/plugins/resource/sql/plugin.js.map +1 -1
  332. package/build/plugins/resource/sql/results.d.ts +2 -2
  333. package/build/plugins/resource/sql/results.d.ts.map +1 -1
  334. package/build/plugins/resource/sql/results.js +4 -4
  335. package/build/plugins/resource/sql/results.js.map +1 -1
  336. package/build/plugins/resource/sql/sqlClient.d.ts +1 -1
  337. package/build/plugins/resource/sql/sqlClient.d.ts.map +1 -1
  338. package/build/plugins/resource/sql/sqlClient.js +33 -46
  339. package/build/plugins/resource/sql/sqlClient.js.map +1 -1
  340. package/build/plugins/resource/sql/utils/checkInput.js +2 -2
  341. package/build/plugins/resource/sql/utils/checkInput.js.map +1 -1
  342. package/build/plugins/resource/sql/utils/message.d.ts +0 -1
  343. package/build/plugins/resource/sql/utils/message.d.ts.map +1 -1
  344. package/build/plugins/resource/sql/utils/message.js +0 -1
  345. package/build/plugins/resource/sql/utils/message.js.map +1 -1
  346. package/build/plugins/resource/utils4v2.d.ts.map +1 -1
  347. package/build/plugins/resource/utils4v2.js +0 -4
  348. package/build/plugins/resource/utils4v2.js.map +1 -1
  349. package/build/plugins/solution/fx-solution/arm.d.ts +18 -11
  350. package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
  351. package/build/plugins/solution/fx-solution/arm.js +390 -131
  352. package/build/plugins/solution/fx-solution/arm.js.map +1 -1
  353. package/build/plugins/solution/fx-solution/commonQuestions.d.ts +13 -2
  354. package/build/plugins/solution/fx-solution/commonQuestions.d.ts.map +1 -1
  355. package/build/plugins/solution/fx-solution/commonQuestions.js +24 -26
  356. package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
  357. package/build/plugins/solution/fx-solution/debug/constants.d.ts +14 -0
  358. package/build/plugins/solution/fx-solution/debug/constants.d.ts.map +1 -0
  359. package/build/plugins/solution/fx-solution/debug/constants.js +22 -0
  360. package/build/plugins/solution/fx-solution/debug/constants.js.map +1 -0
  361. package/build/plugins/solution/fx-solution/debug/error.d.ts +9 -0
  362. package/build/plugins/solution/fx-solution/debug/error.d.ts.map +1 -0
  363. package/build/plugins/solution/fx-solution/debug/error.js +36 -0
  364. package/build/plugins/solution/fx-solution/debug/error.js.map +1 -0
  365. package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts +4 -0
  366. package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -0
  367. package/build/plugins/solution/fx-solution/debug/provisionLocal.js +233 -0
  368. package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -0
  369. package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts +5 -0
  370. package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts.map +1 -0
  371. package/build/plugins/solution/fx-solution/debug/scaffolding.js +164 -0
  372. package/build/plugins/solution/fx-solution/debug/scaffolding.js.map +1 -0
  373. package/build/plugins/{resource/localdebug → solution/fx-solution/debug/util}/certificate.d.ts +2 -2
  374. package/build/plugins/solution/fx-solution/debug/util/certificate.d.ts.map +1 -0
  375. package/build/plugins/{resource/localdebug → solution/fx-solution/debug/util}/certificate.js +8 -9
  376. package/build/plugins/solution/fx-solution/debug/util/certificate.js.map +1 -0
  377. package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/codespace.d.ts +0 -0
  378. package/build/plugins/solution/fx-solution/debug/util/codespace.d.ts.map +1 -0
  379. package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/codespace.js +0 -0
  380. package/build/plugins/solution/fx-solution/debug/util/codespace.js.map +1 -0
  381. package/build/plugins/{resource/localdebug → solution/fx-solution/debug/util}/launch.d.ts +0 -0
  382. package/build/plugins/solution/fx-solution/debug/util/launch.d.ts.map +1 -0
  383. package/build/plugins/{resource/localdebug → solution/fx-solution/debug/util}/launch.js +1 -1
  384. package/build/plugins/solution/fx-solution/debug/util/launch.js.map +1 -0
  385. package/build/plugins/solution/fx-solution/debug/util/localService.d.ts +3 -0
  386. package/build/plugins/solution/fx-solution/debug/util/localService.d.ts.map +1 -0
  387. package/build/plugins/solution/fx-solution/debug/util/localService.js +52 -0
  388. package/build/plugins/solution/fx-solution/debug/util/localService.js.map +1 -0
  389. package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/ngrok.d.ts +0 -0
  390. package/build/plugins/solution/fx-solution/debug/util/ngrok.d.ts.map +1 -0
  391. package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/ngrok.js +2 -2
  392. package/build/plugins/solution/fx-solution/debug/util/ngrok.js.map +1 -0
  393. package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/process.d.ts +0 -0
  394. package/build/plugins/solution/fx-solution/debug/util/process.d.ts.map +1 -0
  395. package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/process.js +0 -0
  396. package/build/plugins/solution/fx-solution/debug/util/process.js.map +1 -0
  397. package/build/plugins/solution/fx-solution/debug/util/settings.d.ts +2 -0
  398. package/build/plugins/solution/fx-solution/debug/util/settings.d.ts.map +1 -0
  399. package/build/plugins/solution/fx-solution/debug/util/settings.js +22 -0
  400. package/build/plugins/solution/fx-solution/debug/util/settings.js.map +1 -0
  401. package/build/plugins/{resource/localdebug → solution/fx-solution/debug/util}/tasks.d.ts +0 -0
  402. package/build/plugins/solution/fx-solution/debug/util/tasks.d.ts.map +1 -0
  403. package/build/plugins/{resource/localdebug → solution/fx-solution/debug/util}/tasks.js +11 -11
  404. package/build/plugins/solution/fx-solution/debug/util/tasks.js.map +1 -0
  405. package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/telemetry.d.ts +7 -6
  406. package/build/plugins/solution/fx-solution/debug/util/telemetry.d.ts.map +1 -0
  407. package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/telemetry.js +16 -19
  408. package/build/plugins/solution/fx-solution/debug/util/telemetry.js.map +1 -0
  409. package/build/plugins/solution/fx-solution/index.d.ts +1 -0
  410. package/build/plugins/solution/fx-solution/index.d.ts.map +1 -1
  411. package/build/plugins/solution/fx-solution/index.js +1 -0
  412. package/build/plugins/solution/fx-solution/index.js.map +1 -1
  413. package/build/plugins/solution/fx-solution/question.d.ts +2 -2
  414. package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
  415. package/build/plugins/solution/fx-solution/question.js +2 -32
  416. package/build/plugins/solution/fx-solution/question.js.map +1 -1
  417. package/build/plugins/solution/fx-solution/solution.d.ts.map +1 -1
  418. package/build/plugins/solution/fx-solution/solution.js +14 -5
  419. package/build/plugins/solution/fx-solution/solution.js.map +1 -1
  420. package/build/plugins/solution/fx-solution/utils/depsChecker/bicepChecker.d.ts +2 -2
  421. package/build/plugins/solution/fx-solution/utils/depsChecker/bicepChecker.d.ts.map +1 -1
  422. package/build/plugins/solution/fx-solution/utils/depsChecker/bicepChecker.js +13 -14
  423. package/build/plugins/solution/fx-solution/utils/depsChecker/bicepChecker.js.map +1 -1
  424. package/build/plugins/solution/fx-solution/utils/progressHelper.d.ts +2 -2
  425. package/build/plugins/solution/fx-solution/utils/progressHelper.d.ts.map +1 -1
  426. package/build/plugins/solution/fx-solution/utils/progressHelper.js +4 -4
  427. package/build/plugins/solution/fx-solution/utils/progressHelper.js.map +1 -1
  428. package/build/plugins/solution/fx-solution/v2/constants.d.ts +2 -0
  429. package/build/plugins/solution/fx-solution/v2/constants.d.ts.map +1 -0
  430. package/build/plugins/solution/fx-solution/v2/constants.js +7 -0
  431. package/build/plugins/solution/fx-solution/v2/constants.js.map +1 -0
  432. package/build/plugins/solution/fx-solution/v2/createEnv.d.ts.map +1 -1
  433. package/build/plugins/solution/fx-solution/v2/createEnv.js +1 -1
  434. package/build/plugins/solution/fx-solution/v2/createEnv.js.map +1 -1
  435. package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
  436. package/build/plugins/solution/fx-solution/v2/executeUserTask.js +7 -4
  437. package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
  438. package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
  439. package/build/plugins/solution/fx-solution/v2/getQuestions.js +67 -25
  440. package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
  441. package/build/plugins/solution/fx-solution/v2/listAllCollaborators.js.map +1 -1
  442. package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
  443. package/build/plugins/solution/fx-solution/v2/provision.js +9 -1
  444. package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
  445. package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +1 -1
  446. package/build/plugins/solution/fx-solution/v2/provisionLocal.js +12 -1
  447. package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
  448. package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +1 -1
  449. package/build/plugins/solution/fx-solution/v2/scaffolding.js +5 -0
  450. package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +1 -1
  451. package/build/plugins/solution/fx-solution/v2/solution.d.ts.map +1 -1
  452. package/build/plugins/solution/fx-solution/v2/solution.js +2 -1
  453. package/build/plugins/solution/fx-solution/v2/solution.js.map +1 -1
  454. package/build/plugins/solution/fx-solution/v3/addModule.d.ts +6 -0
  455. package/build/plugins/solution/fx-solution/v3/addModule.d.ts.map +1 -0
  456. package/build/plugins/solution/fx-solution/v3/addModule.js +35 -0
  457. package/build/plugins/solution/fx-solution/v3/addModule.js.map +1 -0
  458. package/build/plugins/solution/fx-solution/v3/addResource.d.ts +37 -0
  459. package/build/plugins/solution/fx-solution/v3/addResource.d.ts.map +1 -0
  460. package/build/plugins/solution/fx-solution/v3/addResource.js +260 -0
  461. package/build/plugins/solution/fx-solution/v3/addResource.js.map +1 -0
  462. package/build/plugins/solution/fx-solution/v3/constants.d.ts +20 -0
  463. package/build/plugins/solution/fx-solution/v3/constants.d.ts.map +1 -0
  464. package/build/plugins/solution/fx-solution/v3/constants.js +25 -0
  465. package/build/plugins/solution/fx-solution/v3/constants.js.map +1 -0
  466. package/build/plugins/solution/fx-solution/v3/deploy.d.ts +6 -0
  467. package/build/plugins/solution/fx-solution/v3/deploy.d.ts.map +1 -0
  468. package/build/plugins/solution/fx-solution/v3/deploy.js +78 -0
  469. package/build/plugins/solution/fx-solution/v3/deploy.js.map +1 -0
  470. package/build/plugins/solution/fx-solution/v3/error.d.ts +11 -0
  471. package/build/plugins/solution/fx-solution/v3/error.d.ts.map +1 -0
  472. package/build/plugins/solution/fx-solution/v3/error.js +23 -0
  473. package/build/plugins/solution/fx-solution/v3/error.js.map +1 -0
  474. package/build/plugins/solution/fx-solution/v3/init.d.ts +4 -0
  475. package/build/plugins/solution/fx-solution/v3/init.d.ts.map +1 -0
  476. package/build/plugins/solution/fx-solution/v3/init.js +35 -0
  477. package/build/plugins/solution/fx-solution/v3/init.js.map +1 -0
  478. package/build/plugins/solution/fx-solution/v3/provision.d.ts +4 -0
  479. package/build/plugins/solution/fx-solution/v3/provision.d.ts.map +1 -0
  480. package/build/plugins/solution/fx-solution/v3/provision.js +124 -0
  481. package/build/plugins/solution/fx-solution/v3/provision.js.map +1 -0
  482. package/build/plugins/solution/fx-solution/v3/provisionLocal.d.ts +4 -0
  483. package/build/plugins/solution/fx-solution/v3/provisionLocal.d.ts.map +1 -0
  484. package/build/plugins/solution/fx-solution/v3/provisionLocal.js +13 -0
  485. package/build/plugins/solution/fx-solution/v3/provisionLocal.js.map +1 -0
  486. package/build/plugins/solution/fx-solution/v3/publish.d.ts +4 -0
  487. package/build/plugins/solution/fx-solution/v3/publish.d.ts.map +1 -0
  488. package/build/plugins/solution/fx-solution/v3/publish.js +15 -0
  489. package/build/plugins/solution/fx-solution/v3/publish.js.map +1 -0
  490. package/build/plugins/solution/fx-solution/v3/questions.d.ts +16 -0
  491. package/build/plugins/solution/fx-solution/v3/questions.d.ts.map +1 -0
  492. package/build/plugins/solution/fx-solution/v3/questions.js +86 -0
  493. package/build/plugins/solution/fx-solution/v3/questions.js.map +1 -0
  494. package/build/plugins/solution/fx-solution/v3/scaffold.d.ts +27 -0
  495. package/build/plugins/solution/fx-solution/v3/scaffold.d.ts.map +1 -0
  496. package/build/plugins/solution/fx-solution/v3/scaffold.js +241 -0
  497. package/build/plugins/solution/fx-solution/v3/scaffold.js.map +1 -0
  498. package/build/plugins/solution/fx-solution/v3/solution.d.ts +32 -0
  499. package/build/plugins/solution/fx-solution/v3/solution.d.ts.map +1 -0
  500. package/build/plugins/solution/fx-solution/v3/solution.js +45 -0
  501. package/build/plugins/solution/fx-solution/v3/solution.js.map +1 -0
  502. package/build/plugins/solution/fx-solution/v3/userTask.d.ts +4 -0
  503. package/build/plugins/solution/fx-solution/v3/userTask.d.ts.map +1 -0
  504. package/build/plugins/solution/fx-solution/v3/userTask.js +15 -0
  505. package/build/plugins/solution/fx-solution/v3/userTask.js.map +1 -0
  506. package/build/plugins/solution/fx-solution/v3/utils.d.ts +3 -0
  507. package/build/plugins/solution/fx-solution/v3/utils.d.ts.map +1 -0
  508. package/build/plugins/solution/fx-solution/v3/utils.js +16 -0
  509. package/build/plugins/solution/fx-solution/v3/utils.js.map +1 -0
  510. package/build/plugins/solution/index.d.ts +1 -0
  511. package/build/plugins/solution/index.d.ts.map +1 -1
  512. package/build/plugins/solution/index.js +1 -0
  513. package/build/plugins/solution/index.js.map +1 -1
  514. package/build/plugins/solution/spfx-solution/constants.d.ts +2 -0
  515. package/build/plugins/solution/spfx-solution/constants.d.ts.map +1 -0
  516. package/build/plugins/solution/spfx-solution/constants.js +7 -0
  517. package/build/plugins/solution/spfx-solution/constants.js.map +1 -0
  518. package/build/plugins/solution/spfx-solution/index.d.ts +2 -0
  519. package/build/plugins/solution/spfx-solution/index.d.ts.map +1 -0
  520. package/build/plugins/solution/spfx-solution/index.js +5 -0
  521. package/build/plugins/solution/spfx-solution/index.js.map +1 -0
  522. package/build/plugins/solution/spfx-solution/init.d.ts +3 -0
  523. package/build/plugins/solution/spfx-solution/init.d.ts.map +1 -0
  524. package/build/plugins/solution/spfx-solution/init.js +20 -0
  525. package/build/plugins/solution/spfx-solution/init.js.map +1 -0
  526. package/build/plugins/solution/spfx-solution/questions.d.ts +6 -0
  527. package/build/plugins/solution/spfx-solution/questions.d.ts.map +1 -0
  528. package/build/plugins/solution/spfx-solution/questions.js +36 -0
  529. package/build/plugins/solution/spfx-solution/questions.js.map +1 -0
  530. package/build/plugins/solution/spfx-solution/scaffolding.d.ts +17 -0
  531. package/build/plugins/solution/spfx-solution/scaffolding.d.ts.map +1 -0
  532. package/build/plugins/solution/spfx-solution/scaffolding.js +29 -0
  533. package/build/plugins/solution/spfx-solution/scaffolding.js.map +1 -0
  534. package/build/plugins/solution/spfx-solution/solution.d.ts +23 -0
  535. package/build/plugins/solution/spfx-solution/solution.d.ts.map +1 -0
  536. package/build/plugins/solution/spfx-solution/solution.js +29 -0
  537. package/build/plugins/solution/spfx-solution/solution.js.map +1 -0
  538. package/package.json +20 -5
  539. package/resource/deps-checker/dotnet-install.ps1 +1095 -0
  540. package/resource/deps-checker/dotnet-install.sh +1222 -0
  541. package/resource/strings.json +0 -1
  542. package/templates/plugins/resource/apim/bicep/apimConfiguration.bicep +16 -16
  543. package/templates/plugins/resource/apim/bicep/config.template.bicep +1 -1
  544. package/templates/plugins/resource/apim/bicep/provision.template.bicep +1 -1
  545. package/templates/plugins/resource/bot/bicep/botConfiguration.template.bicep +28 -29
  546. package/templates/plugins/resource/bot/bicep/config.template.bicep +1 -1
  547. package/templates/plugins/resource/bot/bicep/provision.template.bicep +2 -2
  548. package/templates/plugins/resource/frontend/bicep/provision.template.bicep +1 -1
  549. package/templates/plugins/resource/function/bicep/config.template.bicep +1 -1
  550. package/templates/plugins/resource/function/bicep/functionConfiguration.template.bicep +33 -31
  551. package/templates/plugins/resource/function/bicep/provision.template.bicep +2 -2
  552. package/templates/plugins/resource/identity/bicep/provision.template.bicep +1 -1
  553. package/templates/plugins/resource/keyvault/bicep/keyVaultProvision.template.bicep +1 -0
  554. package/templates/plugins/resource/keyvault/bicep/provision.template.bicep +4 -2
  555. package/templates/plugins/resource/simpleauth/bicep/config.template.bicep +1 -1
  556. package/templates/plugins/resource/simpleauth/bicep/provision.template.bicep +2 -2
  557. package/templates/plugins/resource/simpleauth/bicep/simpleAuthConfiguration.template.bicep +20 -24
  558. package/templates/plugins/resource/simpleauth/version.txt +2 -1
  559. package/templates/plugins/resource/sql/bicep/provision.template.bicep +1 -1
  560. package/build/plugins/resource/localdebug/certificate.d.ts.map +0 -1
  561. package/build/plugins/resource/localdebug/certificate.js.map +0 -1
  562. package/build/plugins/resource/localdebug/launch.d.ts.map +0 -1
  563. package/build/plugins/resource/localdebug/launch.js.map +0 -1
  564. package/build/plugins/resource/localdebug/legacyPlugin.d.ts +0 -6
  565. package/build/plugins/resource/localdebug/legacyPlugin.d.ts.map +0 -1
  566. package/build/plugins/resource/localdebug/legacyPlugin.js +0 -208
  567. package/build/plugins/resource/localdebug/legacyPlugin.js.map +0 -1
  568. package/build/plugins/resource/localdebug/localEnvMulti.d.ts.map +0 -1
  569. package/build/plugins/resource/localdebug/localEnvMulti.js.map +0 -1
  570. package/build/plugins/resource/localdebug/settings.d.ts +0 -2
  571. package/build/plugins/resource/localdebug/settings.d.ts.map +0 -1
  572. package/build/plugins/resource/localdebug/settings.js +0 -18
  573. package/build/plugins/resource/localdebug/settings.js.map +0 -1
  574. package/build/plugins/resource/localdebug/tasks.d.ts.map +0 -1
  575. package/build/plugins/resource/localdebug/tasks.js.map +0 -1
  576. package/build/plugins/resource/localdebug/util/codespace.d.ts.map +0 -1
  577. package/build/plugins/resource/localdebug/util/codespace.js.map +0 -1
  578. package/build/plugins/resource/localdebug/util/ngrok.d.ts.map +0 -1
  579. package/build/plugins/resource/localdebug/util/ngrok.js.map +0 -1
  580. package/build/plugins/resource/localdebug/util/process.d.ts.map +0 -1
  581. package/build/plugins/resource/localdebug/util/process.js.map +0 -1
  582. package/build/plugins/resource/localdebug/util/telemetry.d.ts.map +0 -1
  583. package/build/plugins/resource/localdebug/util/telemetry.js.map +0 -1
  584. package/templates/azure/config.bicep +0 -25
  585. package/templates/azure/main.bicep +0 -20
  586. package/templates/azure/provision/azureSql.bicep +0 -39
  587. package/templates/azure/provision/frontendHosting.bicep +0 -23
  588. package/templates/azure/provision/function.bicep +0 -79
  589. package/templates/azure/provision/simpleAuth.bicep +0 -44
  590. package/templates/azure/provision.bicep +0 -58
  591. package/templates/azure/teamsFx/bot.bicep +0 -34
  592. package/templates/azure/teamsFx/function.bicep +0 -71
  593. package/templates/azure/teamsFx/simpleAuth.bicep +0 -40
  594. package/templates/plugins/resource/aad/bicep/param.template.bicep +0 -6
  595. package/templates/plugins/resource/aad/bicep/variables.template.bicep +0 -13
@@ -65,7 +65,7 @@ class AppStudioPluginImpl {
65
65
  }
66
66
  }
67
67
  async getSPFxLocalDebugAppDefinitionAndUpdate(ctx, manifest) {
68
- var _a, _b, _c;
68
+ var _a;
69
69
  const appDirectory = await common_1.getAppDirectory(ctx.root);
70
70
  const appStudioToken = await ((_a = ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
71
71
  const localTeamsAppID = await this.getTeamsAppId(ctx, true);
@@ -78,42 +78,15 @@ class AppStudioPluginImpl {
78
78
  create = true;
79
79
  }
80
80
  }
81
- if (common_1.isMultiEnvEnabled()) {
82
- const view = {
83
- localSettings: {
84
- teamsApp: {
85
- teamsAppId: localTeamsAppID,
86
- },
81
+ const view = {
82
+ localSettings: {
83
+ teamsApp: {
84
+ teamsAppId: localTeamsAppID,
87
85
  },
88
- };
89
- const manifestString = mustache_1.default.render(JSON.stringify(manifest), view);
90
- manifest = JSON.parse(manifestString);
91
- }
92
- else {
93
- manifest.name.short = utils_1.getLocalAppName(ctx.projectSettings.appName);
94
- manifest.id = localTeamsAppID !== null && localTeamsAppID !== void 0 ? localTeamsAppID : "";
95
- if (manifest.configurableTabs) {
96
- for (const tab of manifest.configurableTabs) {
97
- const reg = /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/;
98
- const result = tab.configurationUrl.match(reg);
99
- if (result && result.length > 0) {
100
- const componentID = result[0];
101
- tab.configurationUrl = `https://{teamSiteDomain}{teamSitePath}/_layouts/15/TeamsLogon.aspx?SPFX=true&dest={teamSitePath}/_layouts/15/TeamsWorkBench.aspx%3FcomponentId=${componentID}%26openPropertyPane=true%26teams%26forceLocale={locale}%26loadSPFX%3Dtrue%26debugManifestsFile%3Dhttps%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fmanifests.js`;
102
- }
103
- else {
104
- const message = "Cannot find componentID in configurableTabs[0].configrationUrl, local debug may fail.";
105
- (_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.error(message);
106
- (_c = ctx.ui) === null || _c === void 0 ? void 0 : _c.showMessage("warn", message, false);
107
- }
108
- }
109
- }
110
- if (manifest.staticTabs) {
111
- for (const tab of manifest.staticTabs) {
112
- const componentID = tab.entityId;
113
- tab.contentUrl = `https://{teamSiteDomain}/_layouts/15/TeamsLogon.aspx?SPFX=true&dest={teamSitePath}/_layouts/15/TeamsWorkBench.aspx%3FcomponentId=${componentID}%26teams%26personal%26forceLocale={locale}%26loadSPFX%3Dtrue%26debugManifestsFile%3Dhttps%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fmanifests.js`;
114
- }
115
- }
116
- }
86
+ },
87
+ };
88
+ const manifestString = mustache_1.default.render(JSON.stringify(manifest), view);
89
+ manifest = JSON.parse(manifestString);
117
90
  const appDefinition = await this.convertToAppDefinition(ctx, manifest, false);
118
91
  if (appDefinition.isErr()) {
119
92
  return teamsfx_api_1.err(appDefinition.error);
@@ -129,46 +102,31 @@ class AppStudioPluginImpl {
129
102
  async createV1Manifest(ctx) {
130
103
  var _a, _b;
131
104
  const archiveManifestPath = path_1.default.join(ctx.root, teamsfx_api_1.ArchiveFolderName, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.V1ManifestFileName);
132
- const manifestSourceRes = await this.reloadManifestAndCheckRequiredFields(archiveManifestPath);
105
+ const manifestSourceRes = await this.reloadManifest(archiveManifestPath);
133
106
  if (manifestSourceRes.isErr()) {
134
107
  throw manifestSourceRes.error;
135
108
  }
136
109
  const manifestSource = manifestSourceRes.value;
137
110
  let manifestString = (await fs.readFile(archiveManifestPath)).toString();
138
- manifestString = this.replaceExistingValueToPlaceholder(manifestString, manifestSource.developer.websiteUrl, common_1.isMultiEnvEnabled() ? "{{{localSettings.frontend.tabEndpoint}}}" : "{baseUrl}");
111
+ manifestString = this.replaceExistingValueToPlaceholder(manifestString, manifestSource.developer.websiteUrl, "{{{localSettings.frontend.tabEndpoint}}}");
139
112
  const manifest = JSON.parse(manifestString);
140
- manifest.id = common_1.isMultiEnvEnabled() ? "{{localSettings.teamsApp.teamsAppId}}" : "{appid}";
113
+ manifest.id = "{{localSettings.teamsApp.teamsAppId}}";
141
114
  manifest.validDomains = [];
142
115
  const includeBot = (_b = ((_a = ctx.projectSettings) === null || _a === void 0 ? void 0 : _a.solutionSettings).activeResourcePlugins) === null || _b === void 0 ? void 0 : _b.includes(constants_1.PluginNames.BOT);
143
116
  if (includeBot) {
144
117
  if (manifest.bots !== undefined && manifest.bots.length > 0) {
145
118
  for (let index = 0; index < manifest.bots.length; ++index) {
146
- manifest.bots[index].botId = common_1.isMultiEnvEnabled()
147
- ? "{{localSettings.bot.botId}}"
148
- : `{${constants_2.BOT_ID}}`;
119
+ manifest.bots[index].botId = "{{localSettings.bot.botId}}";
149
120
  }
150
121
  }
151
122
  if (manifest.composeExtensions !== undefined && manifest.composeExtensions.length > 0) {
152
123
  for (let index = 0; index < manifest.composeExtensions.length; ++index) {
153
- manifest.composeExtensions[index].botId = common_1.isMultiEnvEnabled()
154
- ? "{{localSettings.bot.botId}}"
155
- : `{${constants_2.BOT_ID}}`;
124
+ manifest.composeExtensions[index].botId = "{{localSettings.bot.botId}}";
156
125
  }
157
126
  }
158
127
  }
159
128
  return manifest;
160
129
  }
161
- async reloadManifestAndCheckRequiredFields(manifestPath) {
162
- const result = await this.reloadManifest(manifestPath);
163
- return result.andThen((manifest) => {
164
- if (manifest === undefined ||
165
- manifest.name.short === undefined ||
166
- manifest.name.short.length === 0) {
167
- return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.ManifestLoadFailedError.name, errors_1.AppStudioError.ManifestLoadFailedError.message("Name is missing")));
168
- }
169
- return teamsfx_api_1.ok(manifest);
170
- });
171
- }
172
130
  async provision(ctx) {
173
131
  var _a, _b, _c;
174
132
  let remoteTeamsAppId = await this.getTeamsAppId(ctx, false);
@@ -193,9 +151,7 @@ class AppStudioPluginImpl {
193
151
  remoteTeamsAppId = result.value.teamsAppId;
194
152
  (_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.info(`Teams app created ${remoteTeamsAppId}`);
195
153
  }
196
- if (common_1.isMultiEnvEnabled() || __1.isV2()) {
197
- (_c = ctx.envInfo.state.get(constants_1.PluginNames.APPST)) === null || _c === void 0 ? void 0 : _c.set(constants_2.Constants.TEAMS_APP_ID, remoteTeamsAppId);
198
- }
154
+ (_c = ctx.envInfo.state.get(constants_1.PluginNames.APPST)) === null || _c === void 0 ? void 0 : _c.set(constants_2.Constants.TEAMS_APP_ID, remoteTeamsAppId);
199
155
  return teamsfx_api_1.ok(remoteTeamsAppId);
200
156
  }
201
157
  async postProvision(ctx) {
@@ -204,7 +160,7 @@ class AppStudioPluginImpl {
204
160
  let manifestString;
205
161
  const appDirectory = await common_1.getAppDirectory(ctx.root);
206
162
  const manifestPath = await this.getManifestTemplatePath(ctx.root);
207
- const manifestResult = await this.reloadManifestAndCheckRequiredFields(manifestPath);
163
+ const manifestResult = await this.reloadManifest(manifestPath);
208
164
  if (manifestResult.isErr()) {
209
165
  return teamsfx_api_1.err(manifestResult.error);
210
166
  }
@@ -213,17 +169,7 @@ class AppStudioPluginImpl {
213
169
  }
214
170
  let appDefinition;
215
171
  if (common_1.isSPFxProject(ctx.projectSettings)) {
216
- if (common_1.isMultiEnvEnabled()) {
217
- const view = {
218
- config: ctx.envInfo.config,
219
- state: {
220
- "fx-resource-appstudio": {
221
- teamsAppId: remoteTeamsAppId,
222
- },
223
- },
224
- };
225
- manifestString = mustache_1.default.render(manifestString, view);
226
- }
172
+ manifestString = await this.getSPFxManifest(ctx, false);
227
173
  const appDefinitionRes = await this.convertToAppDefinition(ctx, JSON.parse(manifestString), false);
228
174
  if (appDefinitionRes.isErr()) {
229
175
  return teamsfx_api_1.err(appDefinitionRes.error);
@@ -245,42 +191,23 @@ class AppStudioPluginImpl {
245
191
  (_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.info(`Teams app updated: ${result.value}`);
246
192
  return teamsfx_api_1.ok(remoteTeamsAppId);
247
193
  }
248
- async validateManifest(ctx) {
249
- var _a, _b, _c;
194
+ async validateManifest(ctx, isLocalDebug) {
195
+ var _a, _b;
250
196
  const appStudioToken = await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
251
197
  let manifestString = undefined;
252
198
  if (common_1.isSPFxProject(ctx.projectSettings)) {
253
- manifestString = (await fs.readFile(await this.getManifestTemplatePath(ctx.root))).toString();
254
- if (common_1.isMultiEnvEnabled()) {
255
- const view = {
256
- config: ctx.envInfo.config,
257
- state: {
258
- "fx-resource-appstudio": {
259
- teamsAppId: this.getTeamsAppId(ctx, false),
260
- },
261
- },
262
- };
263
- manifestString = mustache_1.default.render(manifestString, view);
264
- const manifest = JSON.parse(manifestString);
265
- if (!isUUID_1.default(manifest.id)) {
266
- manifest.id = uuid_1.v4();
267
- }
268
- manifestString = JSON.stringify(manifest, null, 4);
199
+ manifestString = await this.getSPFxManifest(ctx, isLocalDebug);
200
+ const manifest = JSON.parse(manifestString);
201
+ if (!isUUID_1.default(manifest.id)) {
202
+ manifest.id = uuid_1.v4();
269
203
  }
204
+ manifestString = JSON.stringify(manifest, null, 4);
270
205
  }
271
206
  else {
272
- const appDefinitionAndManifest = await this.getAppDefinitionAndManifest(ctx, false);
207
+ const appDefinitionAndManifest = await this.getAppDefinitionAndManifest(ctx, isLocalDebug);
273
208
  if (appDefinitionAndManifest.isErr()) {
274
209
  (_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.error("[Teams Toolkit] Manifest Validation failed!");
275
- const isProvisionSucceeded = !!((_c = ctx.envInfo.state
276
- .get("solution")) === null || _c === void 0 ? void 0 : _c.get(constants_1.SOLUTION_PROVISION_SUCCEEDED));
277
- if (appDefinitionAndManifest.error.name === errors_1.AppStudioError.GetRemoteConfigError.name &&
278
- !isProvisionSucceeded) {
279
- return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigError.name, errors_1.AppStudioError.GetRemoteConfigError.message("Manifest validation failed"), constants_3.HelpLinks.WhyNeedProvision));
280
- }
281
- else {
282
- return teamsfx_api_1.err(appDefinitionAndManifest.error);
283
- }
210
+ return teamsfx_api_1.err(appDefinitionAndManifest.error);
284
211
  }
285
212
  else {
286
213
  manifestString = JSON.stringify(appDefinitionAndManifest.value[1]);
@@ -316,13 +243,13 @@ class AppStudioPluginImpl {
316
243
  return teamsfx_api_1.ok(errors);
317
244
  }
318
245
  async updateManifest(ctx, isLocalDebug) {
319
- var _a, _b, _c, _d, _e, _f;
246
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
320
247
  const teamsAppId = await this.getTeamsAppId(ctx, isLocalDebug);
321
248
  let manifest;
322
249
  let manifestString;
323
250
  const appDirectory = await common_1.getAppDirectory(ctx.root);
324
251
  const manifestPath = await this.getManifestTemplatePath(ctx.root, isLocalDebug);
325
- const manifestResult = await this.reloadManifestAndCheckRequiredFields(manifestPath);
252
+ const manifestResult = await this.reloadManifest(manifestPath);
326
253
  if (manifestResult.isErr()) {
327
254
  throw manifestResult;
328
255
  }
@@ -331,27 +258,7 @@ class AppStudioPluginImpl {
331
258
  }
332
259
  let appDefinition;
333
260
  if (common_1.isSPFxProject(ctx.projectSettings)) {
334
- let view;
335
- if (isLocalDebug) {
336
- view = {
337
- localSettings: {
338
- teamsApp: {
339
- teamsAppId: teamsAppId,
340
- },
341
- },
342
- };
343
- }
344
- else {
345
- view = {
346
- config: ctx.envInfo.config,
347
- state: {
348
- "fx-resource-appstudio": {
349
- teamsAppId: teamsAppId,
350
- },
351
- },
352
- };
353
- }
354
- manifestString = mustache_1.default.render(manifestString, view);
261
+ manifestString = await this.getSPFxManifest(ctx, isLocalDebug);
355
262
  manifest = JSON.parse(manifestString);
356
263
  const appDefinitionRes = await this.convertToAppDefinition(ctx, manifest, false);
357
264
  if (appDefinitionRes.isErr()) {
@@ -398,12 +305,26 @@ class AppStudioPluginImpl {
398
305
  }
399
306
  const appStudioToken = await ((_d = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _d === void 0 ? void 0 : _d.getAccessToken());
400
307
  try {
308
+ const localUpdateTime = isLocalDebug
309
+ ? undefined
310
+ : (_e = ctx.envInfo.state.get(constants_1.PluginNames.APPST)) === null || _e === void 0 ? void 0 : _e.get(constants_2.Constants.TEAMS_APP_UPDATED_AT);
311
+ if (localUpdateTime) {
312
+ const app = await appStudio_1.AppStudioClient.getApp(teamsAppId, appStudioToken, ctx.logProvider);
313
+ const devPortalUpdateTime = (_g = (_f = new Date(app.updatedAt)) === null || _f === void 0 ? void 0 : _f.getTime()) !== null && _g !== void 0 ? _g : -1;
314
+ if (localUpdateTime < devPortalUpdateTime) {
315
+ const res = await ((_h = ctx.ui) === null || _h === void 0 ? void 0 : _h.showMessage("warn", "The manifest file on Teams platform has been changed since your last update. Do you want to continue to update and overwrite the manifest file on Teams platform?", true, "Overwrite and update"));
316
+ if (!((res === null || res === void 0 ? void 0 : res.isOk()) && res.value === "Overwrite and update")) {
317
+ const error = results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.UpdateManifestCancelError.name, errors_1.AppStudioError.UpdateManifestCancelError.message(manifest.name.short));
318
+ return teamsfx_api_1.err(error);
319
+ }
320
+ }
321
+ }
401
322
  const result = await this.updateApp(ctx, appDefinition, appStudioToken, isLocalDebug, false, appDirectory, teamsAppId, ctx.logProvider);
402
323
  if (result.isErr()) {
403
324
  throw result.error;
404
325
  }
405
- (_e = ctx.logProvider) === null || _e === void 0 ? void 0 : _e.info(`Teams app updated: ${result.value}`);
406
- (_f = ctx.ui) === null || _f === void 0 ? void 0 : _f.showMessage("info", `Successfully updated manifest for [${manifest.name.short}]`, false);
326
+ (_j = ctx.logProvider) === null || _j === void 0 ? void 0 : _j.info(`Teams app updated: ${result.value}`);
327
+ (_k = ctx.ui) === null || _k === void 0 ? void 0 : _k.showMessage("info", `Successfully updated manifest for [${manifest.name.short}]`, false);
407
328
  return teamsfx_api_1.ok(teamsAppId);
408
329
  }
409
330
  catch (error) {
@@ -421,39 +342,31 @@ class AppStudioPluginImpl {
421
342
  const archiveAppPackageFolder = path_1.default.join(ctx.root, teamsfx_api_1.ArchiveFolderName, teamsfx_api_1.AppPackageFolderName);
422
343
  const archiveManifestPath = path_1.default.join(archiveAppPackageFolder, teamsfx_api_1.V1ManifestFileName);
423
344
  // cannot use getAppDirectory before creating the manifest file
424
- const newAppPackageFolder = common_1.isMultiEnvEnabled()
425
- ? `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}`
426
- : `${ctx.root}/${teamsfx_api_1.AppPackageFolderName}`;
345
+ const newAppPackageFolder = `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}`;
427
346
  await fs.ensureDir(newAppPackageFolder);
428
- if (await this.checkFileExist(archiveManifestPath)) {
347
+ if (await fs.pathExists(archiveManifestPath)) {
429
348
  manifest = await this.createV1Manifest(ctx);
430
- const resourcesDir = common_1.isMultiEnvEnabled()
431
- ? path_1.default.join(newAppPackageFolder, constants_2.MANIFEST_RESOURCES)
432
- : newAppPackageFolder;
349
+ const resourcesDir = path_1.default.join(newAppPackageFolder, constants_2.MANIFEST_RESOURCES);
433
350
  await fs.ensureDir(resourcesDir);
434
351
  if (((_a = manifest === null || manifest === void 0 ? void 0 : manifest.icons) === null || _a === void 0 ? void 0 : _a.color) && !manifest.icons.color.startsWith("https://")) {
435
352
  const archiveColorFile = path_1.default.join(archiveAppPackageFolder, manifest.icons.color);
436
- const existColorFile = await this.checkFileExist(archiveColorFile);
353
+ const existColorFile = await fs.pathExists(archiveColorFile);
437
354
  const newColorFileName = existColorFile
438
355
  ? path_1.default.basename(manifest.icons.color)
439
356
  : constants_2.DEFAULT_COLOR_PNG_FILENAME;
440
357
  await fs.copyFile(existColorFile ? archiveColorFile : path_1.default.join(__1.getTemplatesFolder(), constants_2.COLOR_TEMPLATE), path_1.default.join(resourcesDir, newColorFileName));
441
- manifest.icons.color = common_1.isMultiEnvEnabled()
442
- ? `${constants_2.MANIFEST_RESOURCES}/${newColorFileName}`
443
- : newColorFileName;
358
+ manifest.icons.color = `${constants_2.MANIFEST_RESOURCES}/${newColorFileName}`;
444
359
  }
445
360
  if (((_b = manifest === null || manifest === void 0 ? void 0 : manifest.icons) === null || _b === void 0 ? void 0 : _b.outline) && !manifest.icons.outline.startsWith("https://")) {
446
361
  const archiveOutlineFile = path_1.default.join(archiveAppPackageFolder, manifest.icons.outline);
447
- const existOutlineFile = await this.checkFileExist(archiveOutlineFile);
362
+ const existOutlineFile = await fs.pathExists(archiveOutlineFile);
448
363
  const newOutlineFileName = existOutlineFile
449
364
  ? path_1.default.basename(manifest.icons.outline)
450
365
  : constants_2.DEFAULT_OUTLINE_PNG_FILENAME;
451
366
  await fs.copyFile(existOutlineFile ? archiveOutlineFile : path_1.default.join(__1.getTemplatesFolder(), constants_2.OUTLINE_TEMPLATE), path_1.default.join(resourcesDir, newOutlineFileName));
452
- manifest.icons.outline = common_1.isMultiEnvEnabled()
453
- ? `${constants_2.MANIFEST_RESOURCES}/${newOutlineFileName}`
454
- : newOutlineFileName;
367
+ manifest.icons.outline = `${constants_2.MANIFEST_RESOURCES}/${newOutlineFileName}`;
455
368
  }
456
- await fs.writeFile(path_1.default.join(newAppPackageFolder, common_1.isMultiEnvEnabled() ? constants_2.MANIFEST_LOCAL : constants_2.REMOTE_MANIFEST), JSON.stringify(manifest, null, 4));
369
+ await fs.writeFile(path_1.default.join(newAppPackageFolder, constants_2.MANIFEST_LOCAL), JSON.stringify(manifest, null, 4));
457
370
  return { enableAuth: !!((_c = manifest === null || manifest === void 0 ? void 0 : manifest.webApplicationInfo) === null || _c === void 0 ? void 0 : _c.id) };
458
371
  }
459
372
  else {
@@ -466,20 +379,14 @@ class AppStudioPluginImpl {
466
379
  let manifest;
467
380
  const templatesFolder = __1.getTemplatesFolder();
468
381
  // cannot use getAppDirectory before creating the manifest file
469
- const appDir = common_1.isMultiEnvEnabled()
470
- ? `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}`
471
- : `${ctx.root}/${teamsfx_api_1.AppPackageFolderName}`;
382
+ const appDir = `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}`;
472
383
  if (common_1.isSPFxProject(ctx.projectSettings)) {
473
384
  const templateManifestFolder = path_1.default.join(templatesFolder, "plugins", "resource", "spfx");
474
- const manifestFile = common_1.isMultiEnvEnabled()
475
- ? path_1.default.resolve(templateManifestFolder, "./solution/manifest_multi_env.json")
476
- : path_1.default.resolve(templateManifestFolder, "./solution/manifest.json");
385
+ const manifestFile = path_1.default.resolve(templateManifestFolder, "./solution/manifest_multi_env.json");
477
386
  const manifestString = (await fs.readFile(manifestFile)).toString();
478
387
  manifest = JSON.parse(manifestString);
479
- if (common_1.isMultiEnvEnabled()) {
480
- const localManifest = await createLocalManifest(ctx.projectSettings.appName, false, false, false, true, false);
481
- await fs.writeFile(`${appDir}/${constants_2.MANIFEST_LOCAL}`, JSON.stringify(localManifest, null, 4));
482
- }
388
+ const localManifest = await createLocalManifest(ctx.projectSettings.appName, false, false, false, true, false);
389
+ await fs.writeFile(`${appDir}/${constants_2.MANIFEST_LOCAL}`, JSON.stringify(localManifest, null, 4));
483
390
  }
484
391
  else {
485
392
  const solutionSettings = (_a = ctx.projectSettings) === null || _a === void 0 ? void 0 : _a.solutionSettings;
@@ -487,19 +394,15 @@ class AppStudioPluginImpl {
487
394
  const hasBot = solutionSettings.capabilities.includes(question_1.BotOptionItem.id);
488
395
  const hasMessageExtension = solutionSettings.capabilities.includes(question_1.MessageExtensionItem.id);
489
396
  manifest = await createManifest(ctx.projectSettings.appName, hasFrontend, hasBot, hasMessageExtension, false, !!(solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.migrateFromV1));
490
- if (common_1.isMultiEnvEnabled()) {
491
- const localDebugManifest = await createLocalManifest(ctx.projectSettings.appName, hasFrontend, hasBot, hasMessageExtension, false, !!(solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.migrateFromV1));
492
- await fs.writeFile(`${appDir}/${constants_2.MANIFEST_LOCAL}`, JSON.stringify(localDebugManifest, null, 4));
493
- }
397
+ const localDebugManifest = await createLocalManifest(ctx.projectSettings.appName, hasFrontend, hasBot, hasMessageExtension, false, !!(solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.migrateFromV1));
398
+ await fs.writeFile(`${appDir}/${constants_2.MANIFEST_LOCAL}`, JSON.stringify(localDebugManifest, null, 4));
494
399
  }
495
400
  await fs.ensureDir(appDir);
496
- const manifestTemplatePath = common_1.isMultiEnvEnabled()
497
- ? `${appDir}/${constants_2.MANIFEST_TEMPLATE}`
498
- : `${appDir}/${constants_2.REMOTE_MANIFEST}`;
401
+ const manifestTemplatePath = `${appDir}/${constants_2.MANIFEST_TEMPLATE}`;
499
402
  await fs.writeFile(manifestTemplatePath, JSON.stringify(manifest, null, 4));
500
403
  const defaultColorPath = path_1.default.join(templatesFolder, constants_2.COLOR_TEMPLATE);
501
404
  const defaultOutlinePath = path_1.default.join(templatesFolder, constants_2.OUTLINE_TEMPLATE);
502
- const resourcesDir = common_1.isMultiEnvEnabled() ? path_1.default.join(appDir, constants_2.MANIFEST_RESOURCES) : appDir;
405
+ const resourcesDir = path_1.default.join(appDir, constants_2.MANIFEST_RESOURCES);
503
406
  await fs.ensureDir(resourcesDir);
504
407
  await fs.copy(defaultColorPath, `${resourcesDir}/${constants_2.DEFAULT_COLOR_PNG_FILENAME}`);
505
408
  await fs.copy(defaultOutlinePath, `${resourcesDir}/${constants_2.DEFAULT_OUTLINE_PNG_FILENAME}`);
@@ -507,41 +410,32 @@ class AppStudioPluginImpl {
507
410
  }
508
411
  async buildTeamsAppPackage(ctx, isLocalDebug) {
509
412
  var _a, _b, _c;
413
+ // Validate manifest
414
+ const validationResult = await this.validateManifest(ctx, isLocalDebug);
415
+ if (validationResult.isOk() && validationResult.value.length > 0) {
416
+ const errMessage = errors_1.AppStudioError.ValidationFailedError.message(validationResult.value);
417
+ const validationFailed = results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.ValidationFailedError.name, errMessage);
418
+ throw validationFailed;
419
+ }
510
420
  let manifestString = undefined;
511
421
  if (!((_a = ctx.envInfo) === null || _a === void 0 ? void 0 : _a.envName)) {
512
422
  throw new Error("Failed to get target environment name from plugin context.");
513
423
  }
514
424
  const appDirectory = await common_1.getAppDirectory(ctx.root);
515
425
  let zipFileName;
516
- if (common_1.isMultiEnvEnabled()) {
517
- if (isLocalDebug) {
518
- zipFileName = `${ctx.root}/${teamsfx_api_1.BuildFolderName}/${teamsfx_api_1.AppPackageFolderName}/appPackage.local.zip`;
519
- }
520
- else {
521
- zipFileName = `${ctx.root}/${teamsfx_api_1.BuildFolderName}/${teamsfx_api_1.AppPackageFolderName}/appPackage.${ctx.envInfo.envName}.zip`;
522
- }
426
+ if (isLocalDebug) {
427
+ zipFileName = `${ctx.root}/${teamsfx_api_1.BuildFolderName}/${teamsfx_api_1.AppPackageFolderName}/appPackage.local.zip`;
523
428
  }
524
429
  else {
525
- zipFileName = `${ctx.root}/${teamsfx_api_1.AppPackageFolderName}/appPackage.zip`;
430
+ zipFileName = `${ctx.root}/${teamsfx_api_1.BuildFolderName}/${teamsfx_api_1.AppPackageFolderName}/appPackage.${ctx.envInfo.envName}.zip`;
526
431
  }
527
432
  if (common_1.isSPFxProject(ctx.projectSettings)) {
528
- manifestString = (await fs.readFile(await this.getManifestTemplatePath(ctx.root, isLocalDebug))).toString();
529
- if (common_1.isMultiEnvEnabled()) {
530
- const view = {
531
- config: ctx.envInfo.config,
532
- state: {
533
- "fx-resource-appstudio": {
534
- teamsAppId: await this.getTeamsAppId(ctx, isLocalDebug),
535
- },
536
- },
537
- };
538
- manifestString = mustache_1.default.render(manifestString, view);
539
- const manifest = JSON.parse(manifestString);
540
- if (!isUUID_1.default(manifest.id)) {
541
- manifest.id = uuid_1.v4();
542
- }
543
- manifestString = JSON.stringify(manifest, null, 4);
433
+ manifestString = await this.getSPFxManifest(ctx, isLocalDebug);
434
+ const manifest = JSON.parse(manifestString);
435
+ if (!isUUID_1.default(manifest.id)) {
436
+ manifest.id = uuid_1.v4();
544
437
  }
438
+ manifestString = JSON.stringify(manifest, null, 4);
545
439
  }
546
440
  else {
547
441
  const manifest = await this.getAppDefinitionAndManifest(ctx, isLocalDebug);
@@ -571,7 +465,7 @@ class AppStudioPluginImpl {
571
465
  // color icon
572
466
  if (manifest.icons.color && !manifest.icons.color.startsWith("https://")) {
573
467
  const colorFile = `${appDirectory}/${manifest.icons.color}`;
574
- const fileExists = await this.checkFileExist(colorFile);
468
+ const fileExists = await fs.pathExists(colorFile);
575
469
  if (!fileExists) {
576
470
  throw results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.FileNotFoundError.name, errors_1.AppStudioError.FileNotFoundError.message(colorFile));
577
471
  }
@@ -581,20 +475,22 @@ class AppStudioPluginImpl {
581
475
  // outline icon
582
476
  if (manifest.icons.outline && !manifest.icons.outline.startsWith("https://")) {
583
477
  const outlineFile = `${appDirectory}/${manifest.icons.outline}`;
584
- const fileExists = await this.checkFileExist(outlineFile);
478
+ const fileExists = await fs.pathExists(outlineFile);
585
479
  if (!fileExists) {
586
480
  throw results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.FileNotFoundError.name, errors_1.AppStudioError.FileNotFoundError.message(outlineFile));
587
481
  }
588
482
  const dir = path_1.default.dirname(manifest.icons.outline);
589
483
  zip.addLocalFile(outlineFile, dir === "." ? "" : dir);
590
484
  }
591
- if (common_1.isMultiEnvEnabled()) {
592
- await fs.ensureDir(path_1.default.dirname(zipFileName));
593
- const manifestFileName = `${ctx.root}/${teamsfx_api_1.BuildFolderName}/${teamsfx_api_1.AppPackageFolderName}/manifest.` +
594
- (isLocalDebug ? "local" : ctx.envInfo.envName) +
595
- `.json`;
596
- await fs.writeFile(manifestFileName, manifestString);
485
+ await fs.ensureDir(path_1.default.dirname(zipFileName));
486
+ const manifestFileName = `${ctx.root}/${teamsfx_api_1.BuildFolderName}/${teamsfx_api_1.AppPackageFolderName}/manifest.` +
487
+ (isLocalDebug ? "local" : ctx.envInfo.envName) +
488
+ `.json`;
489
+ if (await fs.pathExists(manifestFileName)) {
490
+ await fs.chmod(manifestFileName, 0o777);
597
491
  }
492
+ await fs.writeFile(manifestFileName, manifestString);
493
+ await fs.chmod(manifestFileName, 0o444);
598
494
  // localization file
599
495
  if (manifest.localizationInfo &&
600
496
  manifest.localizationInfo.additionalLanguages &&
@@ -616,18 +512,12 @@ class AppStudioPluginImpl {
616
512
  if (appDirectory === `${ctx.root}/.${teamsfx_api_1.ConfigFolderName}`) {
617
513
  await fs.ensureDir(path_1.default.join(ctx.root, `${teamsfx_api_1.AppPackageFolderName}`));
618
514
  const formerZipFileName = `${appDirectory}/appPackage.zip`;
619
- if (await this.checkFileExist(formerZipFileName)) {
515
+ if (await fs.pathExists(formerZipFileName)) {
620
516
  await fs.remove(formerZipFileName);
621
517
  }
622
- await fs.move(`${appDirectory}/${manifest.icons.color}`, common_1.isMultiEnvEnabled()
623
- ? `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}/${constants_2.MANIFEST_RESOURCES}/${manifest.icons.color}`
624
- : `${ctx.root}/${teamsfx_api_1.AppPackageFolderName}/${manifest.icons.color}`);
625
- await fs.move(`${appDirectory}/${manifest.icons.outline}`, common_1.isMultiEnvEnabled()
626
- ? `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}/${constants_2.MANIFEST_RESOURCES}/${manifest.icons.outline}`
627
- : `${ctx.root}/${teamsfx_api_1.AppPackageFolderName}/${manifest.icons.outline}`);
628
- await fs.move(`${appDirectory}/${constants_2.REMOTE_MANIFEST}`, common_1.isMultiEnvEnabled()
629
- ? `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}/${constants_2.MANIFEST_TEMPLATE}`
630
- : `${ctx.root}/${teamsfx_api_1.AppPackageFolderName}/${constants_2.REMOTE_MANIFEST}`);
518
+ await fs.move(`${appDirectory}/${manifest.icons.color}`, `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}/${constants_2.MANIFEST_RESOURCES}/${manifest.icons.color}`);
519
+ await fs.move(`${appDirectory}/${manifest.icons.outline}`, `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}/${constants_2.MANIFEST_RESOURCES}/${manifest.icons.outline}`);
520
+ await fs.move(`${appDirectory}/${constants_2.REMOTE_MANIFEST}`, `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}/${constants_2.MANIFEST_TEMPLATE}`);
631
521
  }
632
522
  return zipFileName;
633
523
  }
@@ -637,17 +527,7 @@ class AppStudioPluginImpl {
637
527
  const appDirectory = await common_1.getAppDirectory(ctx.root);
638
528
  let manifestString = JSON.stringify(await fs.readJSON(await this.getManifestTemplatePath(ctx.root)));
639
529
  if (common_1.isSPFxProject(ctx.projectSettings)) {
640
- if (common_1.isMultiEnvEnabled()) {
641
- const view = {
642
- config: ctx.envInfo.config,
643
- state: {
644
- "fx-resource-appstudio": {
645
- teamsAppId: await this.getTeamsAppId(ctx, false),
646
- },
647
- },
648
- };
649
- manifestString = mustache_1.default.render(manifestString, view);
650
- }
530
+ manifestString = await this.getSPFxManifest(ctx, false);
651
531
  manifest = JSON.parse(manifestString);
652
532
  }
653
533
  else {
@@ -690,10 +570,10 @@ class AppStudioPluginImpl {
690
570
  }
691
571
  }
692
572
  async postLocalDebug(ctx) {
693
- var _a, _b, _c, _d;
573
+ var _a, _b;
694
574
  let teamsAppId;
695
575
  const manifestPath = await this.getManifestTemplatePath(ctx.root, true);
696
- const manifest = await this.reloadManifestAndCheckRequiredFields(manifestPath);
576
+ const manifest = await this.reloadManifest(manifestPath);
697
577
  if (manifest.isErr()) {
698
578
  return teamsfx_api_1.err(manifest.error);
699
579
  }
@@ -706,12 +586,7 @@ class AppStudioPluginImpl {
706
586
  if (teamsAppId.isErr()) {
707
587
  return teamsAppId;
708
588
  }
709
- if (common_1.isMultiEnvEnabled()) {
710
- (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.teamsApp) === null || _b === void 0 ? void 0 : _b.set(constants_2.Constants.TEAMS_APP_ID, teamsAppId.value);
711
- }
712
- else {
713
- (_d = (_c = ctx.envInfo) === null || _c === void 0 ? void 0 : _c.state.get("solution")) === null || _d === void 0 ? void 0 : _d.set(constants_1.LOCAL_DEBUG_TEAMS_APP_ID, teamsAppId.value);
714
- }
589
+ (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.teamsApp) === null || _b === void 0 ? void 0 : _b.set(constants_2.Constants.TEAMS_APP_ID, teamsAppId.value);
715
590
  return teamsfx_api_1.ok(teamsAppId.value);
716
591
  }
717
592
  async checkPermission(ctx, userInfo) {
@@ -719,12 +594,7 @@ class AppStudioPluginImpl {
719
594
  const appStudioToken = await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
720
595
  const teamsAppId = await this.getTeamsAppId(ctx, false);
721
596
  if (!teamsAppId) {
722
- if (common_1.isMultiEnvEnabled()) {
723
- throw new Error(constants_2.ErrorMessages.GetConfigError(constants_2.Constants.TEAMS_APP_ID, constants_1.PluginNames.APPST));
724
- }
725
- else {
726
- throw new Error(constants_2.ErrorMessages.GetConfigError(constants_1.REMOTE_TEAMS_APP_ID, constants_2.SOLUTION));
727
- }
597
+ throw new Error(constants_2.ErrorMessages.GetConfigError(constants_2.Constants.TEAMS_APP_ID, constants_1.PluginNames.APPST));
728
598
  }
729
599
  const teamsAppRoles = await appStudio_1.AppStudioClient.checkPermission(teamsAppId, appStudioToken, userInfo.aadId);
730
600
  const result = [
@@ -742,12 +612,7 @@ class AppStudioPluginImpl {
742
612
  const appStudioToken = await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
743
613
  const teamsAppId = await this.getTeamsAppId(ctx, false);
744
614
  if (!teamsAppId) {
745
- if (common_1.isMultiEnvEnabled()) {
746
- throw new Error(constants_2.ErrorMessages.GetConfigError(constants_2.Constants.TEAMS_APP_ID, constants_1.PluginNames.APPST));
747
- }
748
- else {
749
- throw new Error(constants_2.ErrorMessages.GetConfigError(constants_1.REMOTE_TEAMS_APP_ID, constants_2.SOLUTION));
750
- }
615
+ throw new Error(constants_2.ErrorMessages.GetConfigError(constants_2.Constants.TEAMS_APP_ID, constants_1.PluginNames.APPST));
751
616
  }
752
617
  let userLists;
753
618
  try {
@@ -781,12 +646,7 @@ class AppStudioPluginImpl {
781
646
  const appStudioToken = await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
782
647
  const teamsAppId = await this.getTeamsAppId(ctx, false);
783
648
  if (!teamsAppId) {
784
- if (common_1.isMultiEnvEnabled()) {
785
- throw new Error(errors_1.AppStudioError.GrantPermissionFailedError.message(constants_2.ErrorMessages.GetConfigError(constants_2.Constants.TEAMS_APP_ID, constants_1.PluginNames.APPST)));
786
- }
787
- else {
788
- throw new Error(errors_1.AppStudioError.GrantPermissionFailedError.message(constants_2.ErrorMessages.GetConfigError(constants_1.REMOTE_TEAMS_APP_ID, constants_2.SOLUTION)));
789
- }
649
+ throw new Error(errors_1.AppStudioError.GrantPermissionFailedError.message(constants_2.ErrorMessages.GetConfigError(constants_2.Constants.TEAMS_APP_ID, constants_1.PluginNames.APPST)));
790
650
  }
791
651
  try {
792
652
  await appStudio_1.AppStudioClient.grantPermission(teamsAppId, appStudioToken, userInfo);
@@ -805,7 +665,7 @@ class AppStudioPluginImpl {
805
665
  return result;
806
666
  }
807
667
  async beforePublish(ctx, appDirectory, manifestString, update) {
808
- var _a, _b, _c, _d;
668
+ var _a, _b, _c, _d, _e;
809
669
  const manifest = JSON.parse(manifestString);
810
670
  const publishProgress = (_a = ctx.ui) === null || _a === void 0 ? void 0 : _a.createProgressBar(`Publishing ${manifest.name.short}`, 3);
811
671
  try {
@@ -830,7 +690,11 @@ class AppStudioPluginImpl {
830
690
  ? (await fs.readFile(`${appDirectory}/${manifest.icons.outline}`)).toString("base64")
831
691
  : undefined;
832
692
  try {
833
- await appStudio_1.AppStudioClient.updateApp(remoteTeamsAppId, appDefinitionRes.value, appStudioToken, undefined, colorIconContent, outlineIconContent);
693
+ const app = await appStudio_1.AppStudioClient.updateApp(remoteTeamsAppId, appDefinitionRes.value, appStudioToken, undefined, colorIconContent, outlineIconContent);
694
+ if (app.updatedAt) {
695
+ (_d = ctx.envInfo.state
696
+ .get(constants_1.PluginNames.APPST)) === null || _d === void 0 ? void 0 : _d.set(constants_2.Constants.TEAMS_APP_UPDATED_AT, new Date(app.updatedAt).getTime());
697
+ }
834
698
  }
835
699
  catch (e) {
836
700
  if (e.name === 404) {
@@ -842,7 +706,7 @@ class AppStudioPluginImpl {
842
706
  await (publishProgress === null || publishProgress === void 0 ? void 0 : publishProgress.next(`Building Teams app package in ${appDirectory}.`));
843
707
  const appPackage = await this.buildTeamsAppPackage(ctx, false);
844
708
  const appContent = await fs.readFile(appPackage);
845
- appStudioToken = await ((_d = ctx.appStudioToken) === null || _d === void 0 ? void 0 : _d.getAccessToken());
709
+ appStudioToken = await ((_e = ctx.appStudioToken) === null || _e === void 0 ? void 0 : _e.getAccessToken());
846
710
  await (publishProgress === null || publishProgress === void 0 ? void 0 : publishProgress.next(`Publishing ${manifest.name.short}`));
847
711
  if (update) {
848
712
  // Update existing app in App Catalog
@@ -857,15 +721,6 @@ class AppStudioPluginImpl {
857
721
  await (publishProgress === null || publishProgress === void 0 ? void 0 : publishProgress.end(true));
858
722
  }
859
723
  }
860
- async checkFileExist(filePath) {
861
- try {
862
- await fs.stat(filePath);
863
- return true;
864
- }
865
- catch (error) {
866
- return false;
867
- }
868
- }
869
724
  replaceExistingValueToPlaceholder(config, value, placeholderName) {
870
725
  if (config && value && placeholderName) {
871
726
  config = config.split(value).join(placeholderName);
@@ -962,113 +817,61 @@ class AppStudioPluginImpl {
962
817
  };
963
818
  }
964
819
  getTabEndpoint(ctx, isLocalDebug) {
965
- var _a, _b, _c, _d, _e;
966
- let tabEndpoint;
967
- if (common_1.isMultiEnvEnabled()) {
968
- tabEndpoint = isLocalDebug
969
- ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.frontend) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsFrontendKeys.TabEndpoint)
970
- : (_c = ctx.envInfo.state.get(constants_1.PluginNames.FE)) === null || _c === void 0 ? void 0 : _c.get(constants_2.FRONTEND_ENDPOINT);
971
- }
972
- else {
973
- tabEndpoint = isLocalDebug
974
- ? (_d = ctx.envInfo.state.get(constants_1.PluginNames.LDEBUG)) === null || _d === void 0 ? void 0 : _d.get(constants_1.LOCAL_DEBUG_TAB_ENDPOINT)
975
- : (_e = ctx.envInfo.state.get(constants_1.PluginNames.FE)) === null || _e === void 0 ? void 0 : _e.get(constants_2.FRONTEND_ENDPOINT);
976
- }
820
+ var _a, _b, _c;
821
+ const tabEndpoint = isLocalDebug
822
+ ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.frontend) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsFrontendKeys.TabEndpoint)
823
+ : (_c = ctx.envInfo.state.get(constants_1.PluginNames.FE)) === null || _c === void 0 ? void 0 : _c.get(constants_2.FRONTEND_ENDPOINT);
977
824
  return tabEndpoint;
978
825
  }
979
826
  getTabDomain(ctx, isLocalDebug) {
980
- var _a, _b, _c, _d, _e;
981
- let tabDomain;
982
- if (common_1.isMultiEnvEnabled()) {
983
- tabDomain = isLocalDebug
984
- ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.frontend) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsFrontendKeys.TabDomain)
985
- : (_c = ctx.envInfo.state.get(constants_1.PluginNames.FE)) === null || _c === void 0 ? void 0 : _c.get(constants_2.FRONTEND_DOMAIN);
986
- }
987
- else {
988
- tabDomain = isLocalDebug
989
- ? (_d = ctx.envInfo.state.get(constants_1.PluginNames.LDEBUG)) === null || _d === void 0 ? void 0 : _d.get(constants_1.LOCAL_DEBUG_TAB_DOMAIN)
990
- : (_e = ctx.envInfo.state.get(constants_1.PluginNames.FE)) === null || _e === void 0 ? void 0 : _e.get(constants_2.FRONTEND_DOMAIN);
991
- }
827
+ var _a, _b, _c;
828
+ const tabDomain = isLocalDebug
829
+ ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.frontend) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsFrontendKeys.TabDomain)
830
+ : (_c = ctx.envInfo.state.get(constants_1.PluginNames.FE)) === null || _c === void 0 ? void 0 : _c.get(constants_2.FRONTEND_DOMAIN);
992
831
  return tabDomain;
993
832
  }
994
833
  getAadClientId(ctx, isLocalDebug) {
995
- var _a, _b, _c, _d;
996
- let clientId;
997
- if (common_1.isMultiEnvEnabled()) {
998
- clientId = isLocalDebug
999
- ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.auth) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsAuthKeys.ClientId)
1000
- : (_c = ctx.envInfo.state.get(constants_1.PluginNames.AAD)) === null || _c === void 0 ? void 0 : _c.get(constants_1.REMOTE_AAD_ID);
1001
- }
1002
- else {
1003
- clientId = (_d = ctx.envInfo.state
1004
- .get(constants_1.PluginNames.AAD)) === null || _d === void 0 ? void 0 : _d.get(isLocalDebug ? constants_1.LOCAL_DEBUG_AAD_ID : constants_1.REMOTE_AAD_ID);
1005
- }
834
+ var _a, _b, _c;
835
+ const clientId = isLocalDebug
836
+ ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.auth) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsAuthKeys.ClientId)
837
+ : (_c = ctx.envInfo.state.get(constants_1.PluginNames.AAD)) === null || _c === void 0 ? void 0 : _c.get(constants_1.REMOTE_AAD_ID);
1006
838
  return clientId;
1007
839
  }
1008
840
  getBotId(ctx, isLocalDebug) {
1009
- var _a, _b, _c, _d;
1010
- let botId;
1011
- if (common_1.isMultiEnvEnabled()) {
1012
- botId = isLocalDebug
1013
- ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.bot) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsBotKeys.BotId)
1014
- : (_c = ctx.envInfo.state.get(constants_1.PluginNames.BOT)) === null || _c === void 0 ? void 0 : _c.get(constants_2.BOT_ID);
1015
- }
1016
- else {
1017
- botId = (_d = ctx.envInfo.state
1018
- .get(constants_1.PluginNames.BOT)) === null || _d === void 0 ? void 0 : _d.get(isLocalDebug ? constants_2.LOCAL_BOT_ID : constants_2.BOT_ID);
1019
- }
841
+ var _a, _b, _c;
842
+ const botId = isLocalDebug
843
+ ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.bot) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsBotKeys.BotId)
844
+ : (_c = ctx.envInfo.state.get(constants_1.PluginNames.BOT)) === null || _c === void 0 ? void 0 : _c.get(constants_2.BOT_ID);
1020
845
  return botId;
1021
846
  }
1022
847
  getBotDomain(ctx, isLocalDebug) {
1023
- var _a, _b, _c, _d, _e;
1024
- let botDomain;
1025
- if (common_1.isMultiEnvEnabled()) {
1026
- botDomain = isLocalDebug
1027
- ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.bot) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsBotKeys.BotDomain)
1028
- : (_c = ctx.envInfo.state.get(constants_1.PluginNames.BOT)) === null || _c === void 0 ? void 0 : _c.get(constants_1.BOT_DOMAIN);
1029
- }
1030
- else {
1031
- botDomain = isLocalDebug
1032
- ? (_d = ctx.envInfo.state.get(constants_1.PluginNames.LDEBUG)) === null || _d === void 0 ? void 0 : _d.get(constants_1.LOCAL_DEBUG_BOT_DOMAIN)
1033
- : (_e = ctx.envInfo.state.get(constants_1.PluginNames.BOT)) === null || _e === void 0 ? void 0 : _e.get(constants_1.BOT_DOMAIN);
1034
- }
848
+ var _a, _b, _c;
849
+ const botDomain = isLocalDebug
850
+ ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.bot) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsBotKeys.BotDomain)
851
+ : (_c = ctx.envInfo.state.get(constants_1.PluginNames.BOT)) === null || _c === void 0 ? void 0 : _c.get(constants_1.BOT_DOMAIN);
1035
852
  return botDomain;
1036
853
  }
1037
854
  getApplicationIdUris(ctx, isLocalDebug) {
1038
- var _a, _b, _c, _d;
1039
- let applicationIdUris;
1040
- if (common_1.isMultiEnvEnabled()) {
1041
- applicationIdUris = isLocalDebug
1042
- ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.auth) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsAuthKeys.ApplicationIdUris)
1043
- : (_c = ctx.envInfo.state.get(constants_1.PluginNames.AAD)) === null || _c === void 0 ? void 0 : _c.get(constants_1.WEB_APPLICATION_INFO_SOURCE);
1044
- }
1045
- else {
1046
- applicationIdUris = (_d = ctx.envInfo.state
1047
- .get(constants_1.PluginNames.AAD)) === null || _d === void 0 ? void 0 : _d.get(isLocalDebug ? constants_1.LOCAL_WEB_APPLICATION_INFO_SOURCE : constants_1.WEB_APPLICATION_INFO_SOURCE);
1048
- }
855
+ var _a, _b, _c;
856
+ const applicationIdUris = isLocalDebug
857
+ ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.auth) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsAuthKeys.ApplicationIdUris)
858
+ : (_c = ctx.envInfo.state.get(constants_1.PluginNames.AAD)) === null || _c === void 0 ? void 0 : _c.get(constants_1.WEB_APPLICATION_INFO_SOURCE);
1049
859
  return applicationIdUris;
1050
860
  }
1051
861
  async getTeamsAppId(ctx, isLocalDebug) {
1052
- var _a, _b, _c, _d, _e;
1053
- let teamsAppId;
1054
- if (common_1.isMultiEnvEnabled() || !isLocalDebug) {
1055
- // User may manually update id in manifest template file, rather than configuration file
1056
- // The id in manifest template file should override configurations
1057
- const manifest = await fs.readJSON(await this.getManifestTemplatePath(ctx.root, isLocalDebug));
862
+ var _a, _b, _c;
863
+ let teamsAppId = "";
864
+ // User may manually update id in manifest template file, rather than configuration file
865
+ // The id in manifest template file should override configurations
866
+ const manifestFile = await this.getManifestTemplatePath(ctx.root, isLocalDebug);
867
+ if (await fs.pathExists(manifestFile)) {
868
+ const manifest = await fs.readJSON(manifestFile);
1058
869
  teamsAppId = manifest.id;
1059
- if (!isUUID_1.default(teamsAppId)) {
1060
- if (common_1.isMultiEnvEnabled()) {
1061
- teamsAppId = isLocalDebug
1062
- ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.teamsApp) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId)
1063
- : (_c = ctx.envInfo.state.get(constants_1.PluginNames.APPST)) === null || _c === void 0 ? void 0 : _c.get(constants_2.Constants.TEAMS_APP_ID);
1064
- }
1065
- else {
1066
- teamsAppId = (_d = ctx.envInfo.state.get("solution")) === null || _d === void 0 ? void 0 : _d.get(constants_1.REMOTE_TEAMS_APP_ID);
1067
- }
1068
- }
1069
870
  }
1070
- else {
1071
- teamsAppId = (_e = ctx.envInfo.state.get("solution")) === null || _e === void 0 ? void 0 : _e.get(constants_1.LOCAL_DEBUG_TEAMS_APP_ID);
871
+ if (!isUUID_1.default(teamsAppId)) {
872
+ teamsAppId = isLocalDebug
873
+ ? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.teamsApp) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId)
874
+ : (_c = ctx.envInfo.state.get(constants_1.PluginNames.APPST)) === null || _c === void 0 ? void 0 : _c.get(constants_2.Constants.TEAMS_APP_ID);
1072
875
  }
1073
876
  return teamsAppId;
1074
877
  }
@@ -1181,6 +984,7 @@ class AppStudioPluginImpl {
1181
984
  }
1182
985
  }
1183
986
  async updateApp(ctx, appDefinition, appStudioToken, isLocalDebug, createIfNotExist, appDirectory, teamsAppId, logProvider) {
987
+ var _a;
1184
988
  if (appStudioToken === undefined || appStudioToken.length === 0) {
1185
989
  return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.AppStudioTokenGetFailedError.name, errors_1.AppStudioError.AppStudioTokenGetFailedError.message));
1186
990
  }
@@ -1206,7 +1010,11 @@ class AppStudioPluginImpl {
1206
1010
  : undefined;
1207
1011
  appDefinition.appId = teamsAppId;
1208
1012
  try {
1209
- await appStudio_1.AppStudioClient.updateApp(teamsAppId, appDefinition, appStudioToken, logProvider, colorIconContent, outlineIconContent);
1013
+ const app = await appStudio_1.AppStudioClient.updateApp(teamsAppId, appDefinition, appStudioToken, logProvider, colorIconContent, outlineIconContent);
1014
+ if (app.updatedAt && !isLocalDebug) {
1015
+ const time = new Date(app.updatedAt).getTime();
1016
+ (_a = ctx.envInfo.state.get(constants_1.PluginNames.APPST)) === null || _a === void 0 ? void 0 : _a.set(constants_2.Constants.TEAMS_APP_UPDATED_AT, time);
1017
+ }
1210
1018
  return teamsfx_api_1.ok(teamsAppId);
1211
1019
  }
1212
1020
  catch (e) {
@@ -1219,7 +1027,7 @@ class AppStudioPluginImpl {
1219
1027
  }
1220
1028
  }
1221
1029
  async getAppDefinitionAndManifest(ctx, isLocalDebug) {
1222
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
1030
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
1223
1031
  const { tabEndpoint, tabDomain, aadId, botDomain, botId, webApplicationInfoResource, teamsAppId, } = await this.getConfigForCreatingManifest(ctx, isLocalDebug);
1224
1032
  const isProvisionSucceeded = !!((_a = ctx.envInfo.state
1225
1033
  .get("solution")) === null || _a === void 0 ? void 0 : _a.get(constants_1.SOLUTION_PROVISION_SUCCEEDED));
@@ -1240,7 +1048,11 @@ class AppStudioPluginImpl {
1240
1048
  validDomains.push(botDomain);
1241
1049
  }
1242
1050
  }
1243
- let manifest = (await fs.readFile(await this.getManifestTemplatePath(ctx.root, isLocalDebug))).toString();
1051
+ const manifestFile = await this.getManifestTemplatePath(ctx.root, isLocalDebug);
1052
+ if (!(await fs.pathExists(manifestFile))) {
1053
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.FileNotFoundError.name, errors_1.AppStudioError.FileNotFoundError.message(manifestFile)));
1054
+ }
1055
+ let manifest = (await fs.readFile(manifestFile)).toString();
1244
1056
  // Bot only project, without frontend hosting
1245
1057
  let endpoint = tabEndpoint;
1246
1058
  const solutionSettings = (_b = ctx.projectSettings) === null || _b === void 0 ? void 0 : _b.solutionSettings;
@@ -1248,90 +1060,65 @@ class AppStudioPluginImpl {
1248
1060
  if (!endpoint && !hasFrontend) {
1249
1061
  endpoint = constants_2.DEFAULT_DEVELOPER_WEBSITE_URL;
1250
1062
  }
1251
- if (common_1.isMultiEnvEnabled()) {
1252
- const customizedKeys = utils_1.getCustomizedKeys("", JSON.parse(manifest));
1253
- this.commonProperties = {
1254
- [telemetry_1.TelemetryPropertyKey.customizedKeys]: JSON.stringify(customizedKeys),
1255
- };
1256
- const view = {
1257
- config: ctx.envInfo.config,
1258
- state: {
1259
- "fx-resource-frontend-hosting": {
1260
- endpoint: endpoint !== null && endpoint !== void 0 ? endpoint : "{{{state.fx-resource-frontend-hosting.endpoint}}}",
1261
- },
1262
- "fx-resource-aad-app-for-teams": {
1263
- clientId: aadId !== null && aadId !== void 0 ? aadId : "{{state.fx-resource-aad-app-for-teams.clientId}}",
1264
- applicationIdUris: webApplicationInfoResource !== null && webApplicationInfoResource !== void 0 ? webApplicationInfoResource : "{{{state.fx-resource-aad-app-for-teams.applicationIdUris}}}",
1265
- },
1266
- "fx-resource-appstudio": {
1267
- teamsAppId: teamsAppId !== null && teamsAppId !== void 0 ? teamsAppId : "{{state.fx-resource-appstudio.teamsAppId}}",
1268
- },
1269
- "fx-resource-bot": {
1270
- botId: botId !== null && botId !== void 0 ? botId : "{{state.fx-resource-bot.botId}}",
1271
- },
1063
+ const customizedKeys = utils_1.getCustomizedKeys("", JSON.parse(manifest));
1064
+ this.commonProperties = {
1065
+ [telemetry_1.TelemetryPropertyKey.customizedKeys]: JSON.stringify(customizedKeys),
1066
+ };
1067
+ const view = {
1068
+ config: ctx.envInfo.config,
1069
+ state: {
1070
+ "fx-resource-frontend-hosting": {
1071
+ endpoint: endpoint !== null && endpoint !== void 0 ? endpoint : "{{{state.fx-resource-frontend-hosting.endpoint}}}",
1272
1072
  },
1273
- localSettings: {
1274
- frontend: {
1275
- tabEndpoint: endpoint ? endpoint : "{{{localSettings.frontend.tabEndpoint}}}",
1276
- },
1277
- auth: {
1278
- clientId: ((_d = (_c = ctx.localSettings) === null || _c === void 0 ? void 0 : _c.auth) === null || _d === void 0 ? void 0 : _d.get(localSettingsConstants_1.LocalSettingsAuthKeys.ClientId))
1279
- ? (_f = (_e = ctx.localSettings) === null || _e === void 0 ? void 0 : _e.auth) === null || _f === void 0 ? void 0 : _f.get(localSettingsConstants_1.LocalSettingsAuthKeys.ClientId)
1280
- : "{{localSettings.auth.clientId}}",
1281
- applicationIdUris: ((_h = (_g = ctx.localSettings) === null || _g === void 0 ? void 0 : _g.auth) === null || _h === void 0 ? void 0 : _h.get(localSettingsConstants_1.LocalSettingsAuthKeys.ApplicationIdUris))
1282
- ? (_k = (_j = ctx.localSettings) === null || _j === void 0 ? void 0 : _j.auth) === null || _k === void 0 ? void 0 : _k.get(localSettingsConstants_1.LocalSettingsAuthKeys.ApplicationIdUris)
1283
- : "{{{localSettings.auth.applicationIdUris}}}",
1284
- },
1285
- teamsApp: {
1286
- teamsAppId: ((_m = (_l = ctx.localSettings) === null || _l === void 0 ? void 0 : _l.teamsApp) === null || _m === void 0 ? void 0 : _m.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId))
1287
- ? (_p = (_o = ctx.localSettings) === null || _o === void 0 ? void 0 : _o.teamsApp) === null || _p === void 0 ? void 0 : _p.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId)
1288
- : "{{localSettings.teamsApp.teamsAppId}}",
1289
- },
1290
- bot: {
1291
- botId: ((_r = (_q = ctx.localSettings) === null || _q === void 0 ? void 0 : _q.bot) === null || _r === void 0 ? void 0 : _r.get(localSettingsConstants_1.LocalSettingsBotKeys.BotId))
1292
- ? (_t = (_s = ctx.localSettings) === null || _s === void 0 ? void 0 : _s.bot) === null || _t === void 0 ? void 0 : _t.get(localSettingsConstants_1.LocalSettingsBotKeys.BotId)
1293
- : "{{localSettings.bot.botId}}",
1294
- },
1073
+ "fx-resource-aad-app-for-teams": {
1074
+ clientId: aadId !== null && aadId !== void 0 ? aadId : "{{state.fx-resource-aad-app-for-teams.clientId}}",
1075
+ applicationIdUris: webApplicationInfoResource !== null && webApplicationInfoResource !== void 0 ? webApplicationInfoResource : "{{{state.fx-resource-aad-app-for-teams.applicationIdUris}}}",
1295
1076
  },
1296
- };
1297
- manifest = mustache_1.default.render(manifest, view);
1298
- const tokens = [
1299
- ...new Set(mustache_1.default.parse(manifest)
1300
- .filter((x) => {
1301
- return x[0] != "text" && x[1] != "localSettings.teamsApp.teamsAppId";
1302
- })
1303
- .map((x) => x[1])),
1304
- ];
1305
- if (tokens.length > 0) {
1306
- if (isLocalDebug) {
1307
- return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetLocalDebugConfigFailedError.name, errors_1.AppStudioError.GetLocalDebugConfigFailedError.message(new Error(`Data required: ${tokens.join(",")}`))));
1308
- }
1309
- else {
1310
- return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigFailedError.name, errors_1.AppStudioError.GetRemoteConfigFailedError.message(new Error(`Data required: ${tokens.join(",")}`), isProvisionSucceeded), constants_3.HelpLinks.WhyNeedProvision));
1311
- }
1312
- }
1313
- }
1314
- else {
1315
- const appName = (_u = ctx.projectSettings) === null || _u === void 0 ? void 0 : _u.appName;
1316
- if (appName) {
1317
- manifest = utils_1.replaceConfigValue(manifest, "appName", appName);
1318
- }
1319
- if (teamsAppId) {
1320
- manifest = utils_1.replaceConfigValue(manifest, "appid", teamsAppId);
1321
- }
1322
- try {
1323
- manifest = utils_1.checkAndConfig(manifest, "webApplicationInfoResource", webApplicationInfoResource);
1324
- manifest = utils_1.checkAndConfig(manifest, "appClientId", aadId);
1325
- manifest = utils_1.checkAndConfig(manifest, "baseUrl", endpoint);
1326
- manifest = utils_1.checkAndConfig(manifest, "botId", botId);
1077
+ "fx-resource-appstudio": {
1078
+ teamsAppId: teamsAppId !== null && teamsAppId !== void 0 ? teamsAppId : "{{state.fx-resource-appstudio.teamsAppId}}",
1079
+ },
1080
+ "fx-resource-bot": {
1081
+ botId: botId !== null && botId !== void 0 ? botId : "{{state.fx-resource-bot.botId}}",
1082
+ },
1083
+ },
1084
+ localSettings: {
1085
+ frontend: {
1086
+ tabEndpoint: endpoint ? endpoint : "{{{localSettings.frontend.tabEndpoint}}}",
1087
+ },
1088
+ auth: {
1089
+ clientId: ((_d = (_c = ctx.localSettings) === null || _c === void 0 ? void 0 : _c.auth) === null || _d === void 0 ? void 0 : _d.get(localSettingsConstants_1.LocalSettingsAuthKeys.ClientId))
1090
+ ? (_f = (_e = ctx.localSettings) === null || _e === void 0 ? void 0 : _e.auth) === null || _f === void 0 ? void 0 : _f.get(localSettingsConstants_1.LocalSettingsAuthKeys.ClientId)
1091
+ : "{{localSettings.auth.clientId}}",
1092
+ applicationIdUris: ((_h = (_g = ctx.localSettings) === null || _g === void 0 ? void 0 : _g.auth) === null || _h === void 0 ? void 0 : _h.get(localSettingsConstants_1.LocalSettingsAuthKeys.ApplicationIdUris))
1093
+ ? (_k = (_j = ctx.localSettings) === null || _j === void 0 ? void 0 : _j.auth) === null || _k === void 0 ? void 0 : _k.get(localSettingsConstants_1.LocalSettingsAuthKeys.ApplicationIdUris)
1094
+ : "{{{localSettings.auth.applicationIdUris}}}",
1095
+ },
1096
+ teamsApp: {
1097
+ teamsAppId: ((_m = (_l = ctx.localSettings) === null || _l === void 0 ? void 0 : _l.teamsApp) === null || _m === void 0 ? void 0 : _m.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId))
1098
+ ? (_p = (_o = ctx.localSettings) === null || _o === void 0 ? void 0 : _o.teamsApp) === null || _p === void 0 ? void 0 : _p.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId)
1099
+ : "{{localSettings.teamsApp.teamsAppId}}",
1100
+ },
1101
+ bot: {
1102
+ botId: ((_r = (_q = ctx.localSettings) === null || _q === void 0 ? void 0 : _q.bot) === null || _r === void 0 ? void 0 : _r.get(localSettingsConstants_1.LocalSettingsBotKeys.BotId))
1103
+ ? (_t = (_s = ctx.localSettings) === null || _s === void 0 ? void 0 : _s.bot) === null || _t === void 0 ? void 0 : _t.get(localSettingsConstants_1.LocalSettingsBotKeys.BotId)
1104
+ : "{{localSettings.bot.botId}}",
1105
+ },
1106
+ },
1107
+ };
1108
+ manifest = mustache_1.default.render(manifest, view);
1109
+ const tokens = [
1110
+ ...new Set(mustache_1.default.parse(manifest)
1111
+ .filter((x) => {
1112
+ return x[0] != "text" && x[1] != "localSettings.teamsApp.teamsAppId";
1113
+ })
1114
+ .map((x) => x[1])),
1115
+ ];
1116
+ if (tokens.length > 0) {
1117
+ if (isLocalDebug) {
1118
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetLocalDebugConfigFailedError.name, errors_1.AppStudioError.GetLocalDebugConfigFailedError.message(new Error(`Data required: ${tokens.join(",")}`))));
1327
1119
  }
1328
- catch (e) {
1329
- if (isLocalDebug) {
1330
- return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.GetLocalDebugConfigFailedError.name, errors_1.AppStudioError.GetLocalDebugConfigFailedError.message(e)));
1331
- }
1332
- else {
1333
- return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigFailedError.name, errors_1.AppStudioError.GetRemoteConfigFailedError.message(e, isProvisionSucceeded), constants_3.HelpLinks.WhyNeedProvision));
1334
- }
1120
+ else {
1121
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigFailedError.name, errors_1.AppStudioError.GetRemoteConfigFailedError.message(new Error(`Data required: ${tokens.join(",")}`), isProvisionSucceeded), constants_3.HelpLinks.WhyNeedProvision));
1335
1122
  }
1336
1123
  }
1337
1124
  let updatedManifest;
@@ -1353,28 +1140,37 @@ class AppStudioPluginImpl {
1353
1140
  }
1354
1141
  }
1355
1142
  for (const domain of validDomains) {
1356
- (_v = updatedManifest.validDomains) === null || _v === void 0 ? void 0 : _v.push(domain);
1143
+ (_u = updatedManifest.validDomains) === null || _u === void 0 ? void 0 : _u.push(domain);
1357
1144
  }
1358
1145
  const appDefinitionRes = await this.convertToAppDefinition(ctx, updatedManifest, false);
1359
1146
  if (appDefinitionRes.isErr()) {
1360
1147
  return teamsfx_api_1.err(appDefinitionRes.error);
1361
1148
  }
1362
1149
  const appDefinition = appDefinitionRes.value;
1363
- if (isLocalDebug && !common_1.isMultiEnvEnabled()) {
1364
- const appName = utils_1.getLocalAppName((_w = appDefinition.shortName) !== null && _w !== void 0 ? _w : "");
1365
- appDefinition.shortName = appName;
1366
- appDefinition.appName = appName;
1367
- }
1368
1150
  return teamsfx_api_1.ok([appDefinition, updatedManifest]);
1369
1151
  }
1152
+ async getSPFxManifest(ctx, isLocalDebug) {
1153
+ var _a, _b;
1154
+ let manifestString = JSON.stringify(await fs.readJSON(await this.getManifestTemplatePath(ctx.root, isLocalDebug)));
1155
+ const view = {
1156
+ config: ctx.envInfo.config,
1157
+ state: {
1158
+ "fx-resource-appstudio": {
1159
+ teamsAppId: await this.getTeamsAppId(ctx, isLocalDebug),
1160
+ },
1161
+ },
1162
+ localSettings: {
1163
+ teamsApp: {
1164
+ teamsAppId: (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.teamsApp) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId),
1165
+ },
1166
+ },
1167
+ };
1168
+ manifestString = mustache_1.default.render(manifestString, view);
1169
+ return manifestString;
1170
+ }
1370
1171
  async getManifestTemplatePath(projectRoot, isLocalDebug = false) {
1371
1172
  const appDir = await common_1.getAppDirectory(projectRoot);
1372
- if (common_1.isMultiEnvEnabled()) {
1373
- return isLocalDebug ? `${appDir}/${constants_2.MANIFEST_LOCAL}` : `${appDir}/${constants_2.MANIFEST_TEMPLATE}`;
1374
- }
1375
- else {
1376
- return `${appDir}/${constants_2.REMOTE_MANIFEST}`;
1377
- }
1173
+ return isLocalDebug ? `${appDir}/${constants_2.MANIFEST_LOCAL}` : `${appDir}/${constants_2.MANIFEST_TEMPLATE}`;
1378
1174
  }
1379
1175
  }
1380
1176
  exports.AppStudioPluginImpl = AppStudioPluginImpl;
@@ -1419,25 +1215,19 @@ async function createManifest(appName, hasFrontend, hasBot, hasMessageExtension,
1419
1215
  throw new Error(`Invalid capability`);
1420
1216
  }
1421
1217
  if (!isSPFx || hasBot || hasMessageExtension) {
1422
- let manifestString = common_1.isMultiEnvEnabled()
1423
- ? constants_2.TEAMS_APP_MANIFEST_TEMPLATE_FOR_MULTI_ENV
1424
- : constants_2.TEAMS_APP_MANIFEST_TEMPLATE;
1218
+ let manifestString = constants_2.TEAMS_APP_MANIFEST_TEMPLATE_FOR_MULTI_ENV;
1425
1219
  manifestString = utils_1.replaceConfigValue(manifestString, "appName", appName);
1426
1220
  manifestString = utils_1.replaceConfigValue(manifestString, "version", "1.0.0");
1427
1221
  const manifest = JSON.parse(manifestString);
1428
1222
  if (hasFrontend) {
1429
- manifest.staticTabs = common_1.isMultiEnvEnabled() ? constants_2.STATIC_TABS_TPL_FOR_MULTI_ENV : constants_2.STATIC_TABS_TPL;
1430
- manifest.configurableTabs = common_1.isMultiEnvEnabled()
1431
- ? constants_2.CONFIGURABLE_TABS_TPL_FOR_MULTI_ENV
1432
- : constants_2.CONFIGURABLE_TABS_TPL;
1223
+ manifest.staticTabs = constants_2.STATIC_TABS_TPL_FOR_MULTI_ENV;
1224
+ manifest.configurableTabs = constants_2.CONFIGURABLE_TABS_TPL_FOR_MULTI_ENV;
1433
1225
  }
1434
1226
  if (hasBot) {
1435
- manifest.bots = common_1.isMultiEnvEnabled() ? constants_2.BOTS_TPL_FOR_MULTI_ENV : constants_2.BOTS_TPL;
1227
+ manifest.bots = constants_2.BOTS_TPL_FOR_MULTI_ENV;
1436
1228
  }
1437
1229
  if (hasMessageExtension) {
1438
- manifest.composeExtensions = common_1.isMultiEnvEnabled()
1439
- ? constants_2.COMPOSE_EXTENSIONS_TPL_FOR_MULTI_ENV
1440
- : constants_2.COMPOSE_EXTENSIONS_TPL;
1230
+ manifest.composeExtensions = constants_2.COMPOSE_EXTENSIONS_TPL_FOR_MULTI_ENV;
1441
1231
  }
1442
1232
  if (migrateFromV1) {
1443
1233
  manifest.webApplicationInfo = undefined;