@microsoft/teamsfx-core 1.4.0 → 1.4.1-alpha.313131ea.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 (284) hide show
  1. package/build/common/constants.d.ts +1 -0
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +1 -0
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/local/localEnvProvider.d.ts +4 -8
  6. package/build/common/local/localEnvProvider.d.ts.map +1 -1
  7. package/build/common/local/localEnvProvider.js +21 -33
  8. package/build/common/local/localEnvProvider.js.map +1 -1
  9. package/build/common/local/localSettingsHelper.d.ts.map +1 -1
  10. package/build/common/local/localSettingsHelper.js +12 -21
  11. package/build/common/local/localSettingsHelper.js.map +1 -1
  12. package/build/common/projectSettingsValidator.d.ts.map +1 -1
  13. package/build/common/projectSettingsValidator.js +1 -0
  14. package/build/common/projectSettingsValidator.js.map +1 -1
  15. package/build/common/template-utils/templates.d.ts +1 -0
  16. package/build/common/template-utils/templates.d.ts.map +1 -1
  17. package/build/common/template-utils/templates.js +5 -1
  18. package/build/common/template-utils/templates.js.map +1 -1
  19. package/build/common/templates-config.json +2 -2
  20. package/build/common/tools.d.ts.map +1 -1
  21. package/build/common/tools.js +2 -18
  22. package/build/common/tools.js.map +1 -1
  23. package/build/core/SolutionPluginContainer.js +1 -1
  24. package/build/core/SolutionPluginContainer.js.map +1 -1
  25. package/build/core/collaborator.d.ts +10 -0
  26. package/build/core/collaborator.d.ts.map +1 -0
  27. package/build/core/collaborator.js +381 -0
  28. package/build/core/collaborator.js.map +1 -0
  29. package/build/core/environment.d.ts.map +1 -1
  30. package/build/core/environment.js +7 -2
  31. package/build/core/environment.js.map +1 -1
  32. package/build/core/index.d.ts +10 -4
  33. package/build/core/index.d.ts.map +1 -1
  34. package/build/core/index.js +138 -52
  35. package/build/core/index.js.map +1 -1
  36. package/build/core/middleware/envInfoLoaderV3.js +1 -0
  37. package/build/core/middleware/envInfoLoaderV3.js.map +1 -1
  38. package/build/core/middleware/questionModel.d.ts.map +1 -1
  39. package/build/core/middleware/questionModel.js +49 -35
  40. package/build/core/middleware/questionModel.js.map +1 -1
  41. package/build/core/middleware/solutionLoaderV3.d.ts +1 -1
  42. package/build/core/middleware/solutionLoaderV3.d.ts.map +1 -1
  43. package/build/core/middleware/solutionLoaderV3.js +1 -8
  44. package/build/core/middleware/solutionLoaderV3.js.map +1 -1
  45. package/build/plugins/resource/aad/aadAppClient.d.ts +4 -4
  46. package/build/plugins/resource/aad/aadAppClient.d.ts.map +1 -1
  47. package/build/plugins/resource/aad/aadAppClient.js +3 -3
  48. package/build/plugins/resource/aad/aadAppClient.js.map +1 -1
  49. package/build/plugins/resource/aad/index.d.ts.map +1 -1
  50. package/build/plugins/resource/aad/index.js +0 -3
  51. package/build/plugins/resource/aad/index.js.map +1 -1
  52. package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
  53. package/build/plugins/resource/aad/plugin.js +13 -8
  54. package/build/plugins/resource/aad/plugin.js.map +1 -1
  55. package/build/plugins/resource/aad/v2/index.d.ts +3 -2
  56. package/build/plugins/resource/aad/v2/index.d.ts.map +1 -1
  57. package/build/plugins/resource/aad/v2/index.js +4 -4
  58. package/build/plugins/resource/aad/v2/index.js.map +1 -1
  59. package/build/plugins/resource/aad/v3/index.d.ts +7 -1
  60. package/build/plugins/resource/aad/v3/index.d.ts.map +1 -1
  61. package/build/plugins/resource/aad/v3/index.js +150 -48
  62. package/build/plugins/resource/aad/v3/index.js.map +1 -1
  63. package/build/plugins/resource/apim/config.js +2 -1
  64. package/build/plugins/resource/apim/config.js.map +1 -1
  65. package/build/plugins/resource/apim/v3/index.d.ts +4 -4
  66. package/build/plugins/resource/apim/v3/index.d.ts.map +1 -1
  67. package/build/plugins/resource/apim/v3/index.js +51 -37
  68. package/build/plugins/resource/apim/v3/index.js.map +1 -1
  69. package/build/plugins/resource/appstudio/errors.d.ts +8 -16
  70. package/build/plugins/resource/appstudio/errors.d.ts.map +1 -1
  71. package/build/plugins/resource/appstudio/errors.js +8 -16
  72. package/build/plugins/resource/appstudio/errors.js.map +1 -1
  73. package/build/plugins/resource/appstudio/index.d.ts +0 -4
  74. package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
  75. package/build/plugins/resource/appstudio/index.js +0 -21
  76. package/build/plugins/resource/appstudio/index.js.map +1 -1
  77. package/build/plugins/resource/appstudio/manifestTemplate.d.ts +3 -1
  78. package/build/plugins/resource/appstudio/manifestTemplate.d.ts.map +1 -1
  79. package/build/plugins/resource/appstudio/manifestTemplate.js +111 -1
  80. package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
  81. package/build/plugins/resource/appstudio/plugin.d.ts +2 -13
  82. package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
  83. package/build/plugins/resource/appstudio/plugin.js +31 -117
  84. package/build/plugins/resource/appstudio/plugin.js.map +1 -1
  85. package/build/plugins/resource/appstudio/utils/telemetry.d.ts +0 -1
  86. package/build/plugins/resource/appstudio/utils/telemetry.d.ts.map +1 -1
  87. package/build/plugins/resource/appstudio/utils/telemetry.js +0 -1
  88. package/build/plugins/resource/appstudio/utils/telemetry.js.map +1 -1
  89. package/build/plugins/resource/appstudio/v2/index.d.ts +2 -2
  90. package/build/plugins/resource/appstudio/v2/index.d.ts.map +1 -1
  91. package/build/plugins/resource/appstudio/v2/index.js +2 -2
  92. package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
  93. package/build/plugins/resource/appstudio/v3/index.d.ts +22 -2
  94. package/build/plugins/resource/appstudio/v3/index.d.ts.map +1 -1
  95. package/build/plugins/resource/appstudio/v3/index.js +105 -0
  96. package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
  97. package/build/plugins/resource/bot/configs/deployConfig.js.map +1 -1
  98. package/build/plugins/resource/bot/index.d.ts +1 -1
  99. package/build/plugins/resource/bot/index.d.ts.map +1 -1
  100. package/build/plugins/resource/bot/index.js +5 -9
  101. package/build/plugins/resource/bot/index.js.map +1 -1
  102. package/build/plugins/resource/bot/progressBars.d.ts +2 -2
  103. package/build/plugins/resource/bot/progressBars.d.ts.map +1 -1
  104. package/build/plugins/resource/bot/progressBars.js +4 -3
  105. package/build/plugins/resource/bot/progressBars.js.map +1 -1
  106. package/build/plugins/resource/bot/v3/error.d.ts +15 -0
  107. package/build/plugins/resource/bot/v3/error.d.ts.map +1 -0
  108. package/build/plugins/resource/bot/v3/error.js +46 -0
  109. package/build/plugins/resource/bot/v3/error.js.map +1 -0
  110. package/build/plugins/resource/bot/v3/index.d.ts +20 -0
  111. package/build/plugins/resource/bot/v3/index.d.ts.map +1 -0
  112. package/build/plugins/resource/bot/v3/index.js +384 -0
  113. package/build/plugins/resource/bot/v3/index.js.map +1 -0
  114. package/build/plugins/resource/frontend/index.d.ts +1 -3
  115. package/build/plugins/resource/frontend/index.d.ts.map +1 -1
  116. package/build/plugins/resource/frontend/index.js +3 -11
  117. package/build/plugins/resource/frontend/index.js.map +1 -1
  118. package/build/plugins/resource/frontend/interface.d.ts +1 -2
  119. package/build/plugins/resource/frontend/interface.d.ts.map +1 -1
  120. package/build/plugins/resource/frontend/plugin.d.ts +1 -2
  121. package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
  122. package/build/plugins/resource/frontend/plugin.js +9 -25
  123. package/build/plugins/resource/frontend/plugin.js.map +1 -1
  124. package/build/plugins/resource/frontend/resources/errors.d.ts +0 -7
  125. package/build/plugins/resource/frontend/resources/errors.d.ts.map +1 -1
  126. package/build/plugins/resource/frontend/resources/errors.js +1 -14
  127. package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
  128. package/build/plugins/resource/frontend/resources/messages.d.ts +0 -2
  129. package/build/plugins/resource/frontend/resources/messages.d.ts.map +1 -1
  130. package/build/plugins/resource/frontend/resources/messages.js +0 -2
  131. package/build/plugins/resource/frontend/resources/messages.js.map +1 -1
  132. package/build/plugins/resource/frontend/resources/steps.d.ts +0 -1
  133. package/build/plugins/resource/frontend/resources/steps.d.ts.map +1 -1
  134. package/build/plugins/resource/frontend/resources/steps.js +1 -7
  135. package/build/plugins/resource/frontend/resources/steps.js.map +1 -1
  136. package/build/plugins/resource/frontend/v2/index.d.ts +2 -2
  137. package/build/plugins/resource/frontend/v2/index.d.ts.map +1 -1
  138. package/build/plugins/resource/frontend/v2/index.js +2 -2
  139. package/build/plugins/resource/frontend/v2/index.js.map +1 -1
  140. package/build/plugins/resource/frontend/v3/index.d.ts +4 -4
  141. package/build/plugins/resource/frontend/v3/index.d.ts.map +1 -1
  142. package/build/plugins/resource/frontend/v3/index.js +2 -3
  143. package/build/plugins/resource/frontend/v3/index.js.map +1 -1
  144. package/build/plugins/resource/function/v3/index.d.ts +5 -5
  145. package/build/plugins/resource/function/v3/index.d.ts.map +1 -1
  146. package/build/plugins/resource/function/v3/index.js +5 -7
  147. package/build/plugins/resource/function/v3/index.js.map +1 -1
  148. package/build/plugins/resource/identity/index.d.ts.map +1 -1
  149. package/build/plugins/resource/identity/index.js +0 -3
  150. package/build/plugins/resource/identity/index.js.map +1 -1
  151. package/build/plugins/resource/identity/v3/index.d.ts +2 -2
  152. package/build/plugins/resource/identity/v3/index.d.ts.map +1 -1
  153. package/build/plugins/resource/identity/v3/index.js +1 -2
  154. package/build/plugins/resource/identity/v3/index.js.map +1 -1
  155. package/build/plugins/resource/keyvault/v3/index.d.ts +2 -2
  156. package/build/plugins/resource/keyvault/v3/index.d.ts.map +1 -1
  157. package/build/plugins/resource/keyvault/v3/index.js +1 -2
  158. package/build/plugins/resource/keyvault/v3/index.js.map +1 -1
  159. package/build/plugins/resource/localdebug/constants.d.ts +0 -4
  160. package/build/plugins/resource/localdebug/constants.d.ts.map +1 -1
  161. package/build/plugins/resource/localdebug/constants.js +1 -5
  162. package/build/plugins/resource/localdebug/constants.js.map +1 -1
  163. package/build/plugins/resource/localdebug/localEnv.d.ts +2 -2
  164. package/build/plugins/resource/localdebug/localEnv.d.ts.map +1 -1
  165. package/build/plugins/resource/localdebug/localEnv.js +4 -6
  166. package/build/plugins/resource/localdebug/localEnv.js.map +1 -1
  167. package/build/plugins/resource/localdebug/projectSettingLoader.d.ts +0 -1
  168. package/build/plugins/resource/localdebug/projectSettingLoader.d.ts.map +1 -1
  169. package/build/plugins/resource/localdebug/projectSettingLoader.js +0 -1
  170. package/build/plugins/resource/localdebug/projectSettingLoader.js.map +1 -1
  171. package/build/plugins/resource/spfx/index.d.ts +1 -5
  172. package/build/plugins/resource/spfx/index.d.ts.map +1 -1
  173. package/build/plugins/resource/spfx/index.js +6 -10
  174. package/build/plugins/resource/spfx/index.js.map +1 -1
  175. package/build/plugins/resource/spfx/plugin.js +6 -6
  176. package/build/plugins/resource/spfx/plugin.js.map +1 -1
  177. package/build/plugins/resource/spfx/utils/constants.d.ts +9 -0
  178. package/build/plugins/resource/spfx/utils/constants.d.ts.map +1 -1
  179. package/build/plugins/resource/spfx/utils/constants.js +11 -1
  180. package/build/plugins/resource/spfx/utils/constants.js.map +1 -1
  181. package/build/plugins/resource/spfx/utils/progress-helper.d.ts +3 -3
  182. package/build/plugins/resource/spfx/utils/progress-helper.d.ts.map +1 -1
  183. package/build/plugins/resource/spfx/utils/progress-helper.js +8 -8
  184. package/build/plugins/resource/spfx/utils/progress-helper.js.map +1 -1
  185. package/build/plugins/resource/spfx/utils/questions.d.ts +10 -0
  186. package/build/plugins/resource/spfx/utils/questions.d.ts.map +1 -0
  187. package/build/plugins/resource/spfx/utils/questions.js +39 -0
  188. package/build/plugins/resource/spfx/utils/questions.js.map +1 -0
  189. package/build/plugins/resource/spfx/v3/error.d.ts +5 -0
  190. package/build/plugins/resource/spfx/v3/error.d.ts.map +1 -0
  191. package/build/plugins/resource/spfx/v3/error.js +20 -0
  192. package/build/plugins/resource/spfx/v3/error.js.map +1 -0
  193. package/build/plugins/resource/spfx/v3/index.d.ts +13 -0
  194. package/build/plugins/resource/spfx/v3/index.d.ts.map +1 -0
  195. package/build/plugins/resource/spfx/v3/index.js +123 -0
  196. package/build/plugins/resource/spfx/v3/index.js.map +1 -0
  197. package/build/plugins/resource/spfx/v3/plugin.d.ts +11 -0
  198. package/build/plugins/resource/spfx/v3/plugin.d.ts.map +1 -0
  199. package/build/plugins/resource/spfx/v3/plugin.js +290 -0
  200. package/build/plugins/resource/spfx/v3/plugin.js.map +1 -0
  201. package/build/plugins/resource/sql/v3/index.d.ts +6 -3
  202. package/build/plugins/resource/sql/v3/index.d.ts.map +1 -1
  203. package/build/plugins/resource/sql/v3/index.js +67 -6
  204. package/build/plugins/resource/sql/v3/index.js.map +1 -1
  205. package/build/plugins/resource/utils4v2.d.ts +3 -2
  206. package/build/plugins/resource/utils4v2.d.ts.map +1 -1
  207. package/build/plugins/resource/utils4v2.js +24 -7
  208. package/build/plugins/resource/utils4v2.js.map +1 -1
  209. package/build/plugins/solution/fx-solution/arm.d.ts +2 -2
  210. package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
  211. package/build/plugins/solution/fx-solution/arm.js +51 -51
  212. package/build/plugins/solution/fx-solution/arm.js.map +1 -1
  213. package/build/plugins/solution/fx-solution/debug/error.d.ts +0 -1
  214. package/build/plugins/solution/fx-solution/debug/error.d.ts.map +1 -1
  215. package/build/plugins/solution/fx-solution/debug/error.js +1 -5
  216. package/build/plugins/solution/fx-solution/debug/error.js.map +1 -1
  217. package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts +3 -0
  218. package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -1
  219. package/build/plugins/solution/fx-solution/debug/provisionLocal.js +216 -27
  220. package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -1
  221. package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts +1 -2
  222. package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts.map +1 -1
  223. package/build/plugins/solution/fx-solution/debug/scaffolding.js +10 -15
  224. package/build/plugins/solution/fx-solution/debug/scaffolding.js.map +1 -1
  225. package/build/plugins/solution/fx-solution/debug/util/launch.d.ts +1 -1
  226. package/build/plugins/solution/fx-solution/debug/util/launch.d.ts.map +1 -1
  227. package/build/plugins/solution/fx-solution/debug/util/launch.js +109 -290
  228. package/build/plugins/solution/fx-solution/debug/util/launch.js.map +1 -1
  229. package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts.map +1 -1
  230. package/build/plugins/solution/fx-solution/debug/util/launchNext.js +102 -236
  231. package/build/plugins/solution/fx-solution/debug/util/launchNext.js.map +1 -1
  232. package/build/plugins/solution/fx-solution/debug/util/tasks.d.ts +1 -1
  233. package/build/plugins/solution/fx-solution/debug/util/tasks.d.ts.map +1 -1
  234. package/build/plugins/solution/fx-solution/debug/util/tasks.js +12 -18
  235. package/build/plugins/solution/fx-solution/debug/util/tasks.js.map +1 -1
  236. package/build/plugins/solution/fx-solution/debug/util/tasksNext.d.ts.map +1 -1
  237. package/build/plugins/solution/fx-solution/debug/util/tasksNext.js +5 -5
  238. package/build/plugins/solution/fx-solution/debug/util/tasksNext.js.map +1 -1
  239. package/build/plugins/solution/fx-solution/solution.d.ts.map +1 -1
  240. package/build/plugins/solution/fx-solution/solution.js +0 -5
  241. package/build/plugins/solution/fx-solution/solution.js.map +1 -1
  242. package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts +2 -0
  243. package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +1 -1
  244. package/build/plugins/solution/fx-solution/v2/provisionLocal.js +52 -11
  245. package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
  246. package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +1 -1
  247. package/build/plugins/solution/fx-solution/v2/scaffolding.js +4 -1
  248. package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +1 -1
  249. package/build/plugins/solution/fx-solution/v3/addFeature.d.ts +4 -3
  250. package/build/plugins/solution/fx-solution/v3/addFeature.d.ts.map +1 -1
  251. package/build/plugins/solution/fx-solution/v3/addFeature.js +28 -26
  252. package/build/plugins/solution/fx-solution/v3/addFeature.js.map +1 -1
  253. package/build/plugins/solution/fx-solution/v3/deploy.d.ts.map +1 -1
  254. package/build/plugins/solution/fx-solution/v3/deploy.js +21 -11
  255. package/build/plugins/solution/fx-solution/v3/deploy.js.map +1 -1
  256. package/build/plugins/solution/fx-solution/v3/provision.d.ts.map +1 -1
  257. package/build/plugins/solution/fx-solution/v3/provision.js +10 -3
  258. package/build/plugins/solution/fx-solution/v3/provision.js.map +1 -1
  259. package/build/plugins/solution/fx-solution/v3/userTask.d.ts.map +1 -1
  260. package/build/plugins/solution/fx-solution/v3/userTask.js +52 -56
  261. package/build/plugins/solution/fx-solution/v3/userTask.js.map +1 -1
  262. package/build/plugins/solution/spfx-solution/addFeature.d.ts.map +1 -1
  263. package/build/plugins/solution/spfx-solution/addFeature.js +0 -8
  264. package/build/plugins/solution/spfx-solution/addFeature.js.map +1 -1
  265. package/build/plugins/solution/utils/questions.d.ts +3 -3
  266. package/build/plugins/solution/utils/questions.d.ts.map +1 -1
  267. package/build/plugins/solution/utils/questions.js +6 -6
  268. package/build/plugins/solution/utils/questions.js.map +1 -1
  269. package/package.json +4 -3
  270. package/resource/strings.json +1 -0
  271. package/templates/plugins/resource/bot/bot-msgext.js.default.zip +0 -0
  272. package/templates/plugins/resource/bot/bot-msgext.ts.default.zip +0 -0
  273. package/templates/plugins/resource/bot/bot.js.default.zip +0 -0
  274. package/templates/plugins/resource/bot/bot.ts.default.zip +0 -0
  275. package/templates/plugins/resource/bot/msgext.js.default.zip +0 -0
  276. package/templates/plugins/resource/bot/msgext.ts.default.zip +0 -0
  277. package/templates/plugins/resource/frontend/tab.js.default.zip +0 -0
  278. package/templates/plugins/resource/frontend/tab.ts.default.zip +0 -0
  279. package/templates/plugins/resource/function/function-base.js.default.zip +0 -0
  280. package/templates/plugins/resource/function/function-base.ts.default.zip +0 -0
  281. package/templates/plugins/resource/function/function-triggers.js.HTTPTrigger.zip +0 -0
  282. package/templates/plugins/resource/function/function-triggers.ts.HTTPTrigger.zip +0 -0
  283. package/templates/plugins/resource/storage/bicep/azureStorageProvision.bicep +0 -25
  284. package/templates/plugins/resource/storage/bicep/provision.template.bicep +0 -15
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.addCapabilities = exports.capabilityExceedLimit = exports.saveManifest = exports.loadManifest = exports.init = exports.getManifestTemplatePath = void 0;
5
+ exports.deleteCapability = exports.updateCapability = exports.addCapabilities = exports.capabilityExceedLimit = exports.saveManifest = exports.loadManifest = exports.init = exports.getManifestTemplatePath = void 0;
6
6
  const tslib_1 = require("tslib");
7
7
  const fs = tslib_1.__importStar(require("fs-extra"));
8
8
  const teamsfx_api_1 = require("@microsoft/teamsfx-api");
@@ -98,6 +98,8 @@ async function capabilityExceedLimit(projectRoot, capability) {
98
98
  remoteManifest.value.composeExtensions !== undefined &&
99
99
  remoteManifest.value.composeExtensions.length >= 1;
100
100
  return teamsfx_api_1.ok(localExceed || remoteExceed);
101
+ case "WebApplicationInfo":
102
+ return teamsfx_api_1.ok(false);
101
103
  default:
102
104
  return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.InvalidCapabilityError.name, errors_1.AppStudioError.InvalidCapabilityError.message(capability)));
103
105
  }
@@ -223,4 +225,112 @@ async function addCapabilities(projectRoot, capabilities) {
223
225
  return teamsfx_api_1.ok(undefined);
224
226
  }
225
227
  exports.addCapabilities = addCapabilities;
228
+ async function updateCapability(projectRoot, capability) {
229
+ var _a;
230
+ const manifestRes = await loadManifest(projectRoot, false);
231
+ if (manifestRes.isErr()) {
232
+ return teamsfx_api_1.err(manifestRes.error);
233
+ }
234
+ const manifest = manifestRes.value;
235
+ switch (capability.name) {
236
+ case "staticTab":
237
+ // find the corresponding static Tab with entity id
238
+ const entityId = capability.snippet.remote.entityId;
239
+ const index = (_a = manifest.staticTabs) === null || _a === void 0 ? void 0 : _a.map((x) => x.entityId).indexOf(entityId);
240
+ if (index !== undefined && index !== -1) {
241
+ manifest.staticTabs[index] = capability.snippet.remote;
242
+ }
243
+ else {
244
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.StaticTabNotExistError.name, errors_1.AppStudioError.StaticTabNotExistError.message(entityId)));
245
+ }
246
+ break;
247
+ case "configurableTab":
248
+ if (manifest.configurableTabs && manifest.configurableTabs.length) {
249
+ manifest.configurableTabs[0] = capability.snippet.remote;
250
+ }
251
+ else {
252
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.CapabilityNotExistError.name, errors_1.AppStudioError.CapabilityNotExistError.message(capability.name)));
253
+ }
254
+ break;
255
+ case "Bot":
256
+ if (manifest.bots && manifest.bots.length > 0) {
257
+ manifest.bots[0] = capability.snippet.remote;
258
+ }
259
+ else {
260
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.CapabilityNotExistError.name, errors_1.AppStudioError.CapabilityNotExistError.message(capability.name)));
261
+ }
262
+ break;
263
+ case "MessageExtension":
264
+ if (manifest.composeExtensions && manifest.composeExtensions.length > 0) {
265
+ manifest.composeExtensions[0] = capability.snippet.remote;
266
+ }
267
+ else {
268
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.CapabilityNotExistError.name, errors_1.AppStudioError.CapabilityNotExistError.message(capability.name)));
269
+ }
270
+ break;
271
+ case "WebApplicationInfo":
272
+ manifest.webApplicationInfo = capability.snippet;
273
+ break;
274
+ }
275
+ const res = await saveManifest(projectRoot, manifest, false);
276
+ if (res.isErr()) {
277
+ return teamsfx_api_1.err(res.error);
278
+ }
279
+ return teamsfx_api_1.ok(undefined);
280
+ }
281
+ exports.updateCapability = updateCapability;
282
+ async function deleteCapability(projectRoot, capability) {
283
+ var _a;
284
+ const manifestRes = await loadManifest(projectRoot, false);
285
+ if (manifestRes.isErr()) {
286
+ return teamsfx_api_1.err(manifestRes.error);
287
+ }
288
+ const manifest = manifestRes.value;
289
+ switch (capability.name) {
290
+ case "staticTab":
291
+ // find the corresponding static Tab with entity id
292
+ const entityId = capability.snippet.remote.entityId;
293
+ const index = (_a = manifest.staticTabs) === null || _a === void 0 ? void 0 : _a.map((x) => x.entityId).indexOf(entityId);
294
+ if (index !== undefined && index !== -1) {
295
+ manifest.staticTabs.slice(index, 1);
296
+ }
297
+ else {
298
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.StaticTabNotExistError.name, errors_1.AppStudioError.StaticTabNotExistError.message(entityId)));
299
+ }
300
+ break;
301
+ case "configurableTab":
302
+ if (manifest.configurableTabs && manifest.configurableTabs.length > 0) {
303
+ manifest.configurableTabs = [];
304
+ }
305
+ else {
306
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.CapabilityNotExistError.name, errors_1.AppStudioError.CapabilityNotExistError.message(capability.name)));
307
+ }
308
+ break;
309
+ case "Bot":
310
+ if (manifest.bots && manifest.bots.length > 0) {
311
+ manifest.bots = [];
312
+ }
313
+ else {
314
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.CapabilityNotExistError.name, errors_1.AppStudioError.CapabilityNotExistError.message(capability.name)));
315
+ }
316
+ break;
317
+ case "MessageExtension":
318
+ if (manifest.composeExtensions && manifest.composeExtensions.length > 0) {
319
+ manifest.composeExtensions = [];
320
+ }
321
+ else {
322
+ return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.CapabilityNotExistError.name, errors_1.AppStudioError.CapabilityNotExistError.message(capability.name)));
323
+ }
324
+ break;
325
+ case "WebApplicationInfo":
326
+ manifest.webApplicationInfo = undefined;
327
+ break;
328
+ }
329
+ const res = await saveManifest(projectRoot, manifest, false);
330
+ if (res.isErr()) {
331
+ return teamsfx_api_1.err(res.error);
332
+ }
333
+ return teamsfx_api_1.ok(undefined);
334
+ }
335
+ exports.deleteCapability = deleteCapability;
226
336
  //# sourceMappingURL=manifestTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifestTemplate.js","sourceRoot":"","sources":["../../../../src/plugins/resource/appstudio/manifestTemplate.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,qDAA+B;AAC/B,wDAQgC;AAChC,4CAAkD;AAClD,qCAA0C;AAC1C,uCAAmD;AACnD,2CAmBqB;AACrB,yCAAmD;AAE5C,KAAK,UAAU,uBAAuB,CAC3C,WAAmB,EACnB,YAAqB;IAErB,MAAM,MAAM,GAAG,MAAM,wBAAe,CAAC,WAAW,CAAC,CAAC;IAClD,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,0BAAc,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,6BAAiB,EAAE,CAAC;AACzF,CAAC;AAND,0DAMC;AAEM,KAAK,UAAU,IAAI,CAAC,WAAmB,EAAE,OAAe;IAC7D,MAAM,mBAAmB,GAAG,GAAG,WAAW,cAAc,kCAAoB,EAAE,CAAC;IAC/E,MAAM,EAAE,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAExC,IAAI,mBAAmB,GAAG,sDAA0C,CAAC;IACrE,MAAM,MAAM,GAAG,cAAc,CAAC;IAC9B,IAAI,YAAY,GAAG,OAAO,CAAC;IAC3B,IAAI,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,2CAA+B,EAAE;QACrE,YAAY,GAAG,YAAY,GAAG,MAAM,CAAC;KACtC;IACD,mBAAmB,GAAG,0BAAkB,CAAC,mBAAmB,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;IACvF,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACtD,MAAM,YAAY,CAAC,WAAW,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;IAErD,IAAI,oBAAoB,GAAG,0CAA8B,CAAC;IAC1D,oBAAoB,GAAG,0B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,iBAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACvB;IACD,GAAG,GAAG,MAAM,YAAY,CAAC,WAAW,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;IAC7D,IAAI,GAAG,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,iBAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACvB;IACD,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;AACvB,CAAC;AA3ID,0CA2IC"}
1
+ {"version":3,"file":"manifestTemplate.js","sourceRoot":"","sources":["../../../../src/plugins/resource/appstudio/manifestTemplate.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,qDAA+B;AAC/B,wDASgC;AAChC,4CAAkD;AAClD,qCAA0C;AAC1C,uCAAmD;AACnD,2CAmBqB;AACrB,yCAAmD;AAE5C,KAAK,UAAU,uBAAuB,CAC3C,WAAmB,EACnB,YAAqB;IAErB,MAAM,MAAM,GAAG,MAAM,wBAAe,CAAC,WAAW,CAAC,CAAC;IAClD,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,0BAAc,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,6BAAiB,EAAE,CAAC;AACzF,CAAC;AAND,0DAMC;AAEM,KAAK,UAAU,IAAI,CAAC,WAAmB,EAAE,OAAe;IAC7D,MAAM,mBAAmB,GAAG,GAAG,WAAW,cAAc,kCAAoB,EAAE,CAAC;IAC/E,MAAM,EAAE,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAExC,IAAI,mBAAmB,GAAG,sDAA0C,CAAC;IACrE,MAAM,MAAM,GAAG,cAAc,CAAC;IAC9B,IAAI,YAAY,GAAG,OAAO,CAAC;IAC3B,IAAI,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,2CAA+B,EAAE;QACrE,YAAY,GAAG,YAAY,GAAG,MAAM,CAAC;KACtC;IACD,mBAAmB,GAAG,0BA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C,uBAAc,CAAC,uBAAuB,CAAC,IAAI,EAC3C,uBAAc,CAAC,uBAAuB,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAChE,CACF,CAAC;aACH;YACD,MAAM;QACR,KAAK,oBAAoB;YACvB,QAAQ,CAAC,kBAAkB,GAAG,SAAS,CAAC;YACxC,MAAM;KACT;IACD,MAAM,GAAG,GAAG,MAAM,YAAY,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC7D,IAAI,GAAG,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,iBAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACvB;IACD,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;AACvB,CAAC;AAtED,4CAsEC"}
@@ -9,19 +9,10 @@ export declare class AppStudioPluginImpl {
9
9
  constructor();
10
10
  getAppDefinitionAndUpdate(ctx: PluginContext, isLocalDebug: boolean, manifest: TeamsAppManifest): Promise<Result<string, FxError>>;
11
11
  private getSPFxLocalDebugAppDefinitionAndUpdate;
12
- /**
13
- * generate app manifest template according to existing manifest
14
- * @param settings
15
- * @returns
16
- */
17
- createV1Manifest(ctx: PluginContext): Promise<TeamsAppManifest>;
18
12
  provision(ctx: PluginContext): Promise<Result<string, FxError>>;
19
13
  postProvision(ctx: PluginContext): Promise<Result<string, FxError>>;
20
14
  validateManifest(ctx: PluginContext, isLocalDebug: boolean): Promise<Result<string[], FxError>>;
21
15
  updateManifest(ctx: PluginContext, isLocalDebug: boolean): Promise<Result<string, FxError>>;
22
- migrateV1Project(ctx: PluginContext): Promise<{
23
- enableAuth: boolean;
24
- }>;
25
16
  scaffold(ctx: PluginContext): Promise<any>;
26
17
  buildTeamsAppPackage(ctx: PluginContext, isLocalDebug: boolean): Promise<string>;
27
18
  publish(ctx: PluginContext): Promise<{
@@ -34,8 +25,6 @@ export declare class AppStudioPluginImpl {
34
25
  listCollaborator(ctx: PluginContext): Promise<TeamsAppAdmin[]>;
35
26
  grantPermission(ctx: PluginContext, userInfo: IUserList): Promise<ResourcePermission[]>;
36
27
  private beforePublish;
37
- private replaceExistingValueToPlaceholder;
38
- private reloadManifest;
39
28
  private getConfigForCreatingManifest;
40
29
  private getTabEndpoint;
41
30
  private getTabDomain;
@@ -56,6 +45,6 @@ export declare class AppStudioPluginImpl {
56
45
  private getAppDefinitionAndManifest;
57
46
  private getSPFxManifest;
58
47
  }
59
- export declare function createLocalManifest(appName: string, hasFrontend: boolean, hasBot: boolean, hasMessageExtension: boolean, isSPFx: boolean, migrateFromV1: boolean): Promise<TeamsAppManifest>;
60
- export declare function createManifest(appName: string, hasFrontend: boolean, hasBot: boolean, hasMessageExtension: boolean, isSPFx: boolean, migrateFromV1: boolean): Promise<TeamsAppManifest | undefined>;
48
+ export declare function createLocalManifest(appName: string, hasFrontend: boolean, hasBot: boolean, hasMessageExtension: boolean, isSPFx: boolean): Promise<TeamsAppManifest>;
49
+ export declare function createManifest(appName: string, hasFrontend: boolean, hasBot: boolean, hasMessageExtension: boolean, isSPFx: boolean): Promise<TeamsAppManifest | undefined>;
61
50
  //# sourceMappingURL=plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/resource/appstudio/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,OAAO,EACP,MAAM,EACN,aAAa,EACb,gBAAgB,EAOjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAkB,SAAS,EAAa,MAAM,6BAA6B,CAAC;AA2DnF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAexF,qBAAa,mBAAmB;IACvB,gBAAgB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IACxD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;;IAMR,yBAAyB,CACpC,GAAG,EAAE,aAAa,EAClB,YAAY,EAAE,OAAO,EACrB,QA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AC,MAAM,EAAE,OAAO,CAAC,CAAC;IAwBpE,eAAe,CAC1B,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,SAAS,GAClB,OAAO,CAAC,kBAAkB,EAAE,CAAC;IA0BnB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAoC9D,eAAe,CAC1B,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,SAAS,GAClB,OAAO,CAAC,kBAAkB,EAAE,CAAC;YAgClB,aAAa;YAqFb,4BAA4B;IAqC1C,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,oBAAoB;YAQd,aAAa;IAiB3B;;;OAGG;YACW,sBAAsB;YAyFtB,SAAS;YAsET,SAAS;YAsFT,6BAA6B;YAsC7B,2BAA2B;YA6M3B,eAAe;CAsB9B;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,OAAO,EACf,mBAAmB,EAAE,OAAO,EAC5B,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,gBAAgB,CAAC,CA8B3B;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,OAAO,EACf,mBAAmB,EAAE,OAAO,EAC5B,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAsBvC"}
@@ -98,39 +98,6 @@ class AppStudioPluginImpl {
98
98
  const teamsAppId = await this.updateApp(ctx, appDefinition.value, appStudioToken, true, create, appDirectory, create ? undefined : localTeamsAppID, ctx.logProvider);
99
99
  return teamsAppId;
100
100
  }
101
- /**
102
- * generate app manifest template according to existing manifest
103
- * @param settings
104
- * @returns
105
- */
106
- async createV1Manifest(ctx) {
107
- var _a, _b;
108
- const archiveManifestPath = path_1.default.join(ctx.root, teamsfx_api_1.ArchiveFolderName, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.V1ManifestFileName);
109
- const manifestSourceRes = await this.reloadManifest(archiveManifestPath);
110
- if (manifestSourceRes.isErr()) {
111
- throw manifestSourceRes.error;
112
- }
113
- const manifestSource = manifestSourceRes.value;
114
- let manifestString = (await fs.readFile(archiveManifestPath)).toString();
115
- manifestString = this.replaceExistingValueToPlaceholder(manifestString, manifestSource.developer.websiteUrl, "{{{localSettings.frontend.tabEndpoint}}}");
116
- const manifest = JSON.parse(manifestString);
117
- manifest.id = "{{localSettings.teamsApp.teamsAppId}}";
118
- manifest.validDomains = [];
119
- 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);
120
- if (includeBot) {
121
- if (manifest.bots !== undefined && manifest.bots.length > 0) {
122
- for (let index = 0; index < manifest.bots.length; ++index) {
123
- manifest.bots[index].botId = "{{localSettings.bot.botId}}";
124
- }
125
- }
126
- if (manifest.composeExtensions !== undefined && manifest.composeExtensions.length > 0) {
127
- for (let index = 0; index < manifest.composeExtensions.length; ++index) {
128
- manifest.composeExtensions[index].botId = "{{localSettings.bot.botId}}";
129
- }
130
- }
131
- }
132
- return manifest;
133
- }
134
101
  async provision(ctx) {
135
102
  var _a, _b, _c;
136
103
  let remoteTeamsAppId = await this.getTeamsAppId(ctx, false);
@@ -348,44 +315,6 @@ class AppStudioPluginImpl {
348
315
  }
349
316
  }
350
317
  }
351
- async migrateV1Project(ctx) {
352
- var _a, _b, _c;
353
- let manifest;
354
- const archiveAppPackageFolder = path_1.default.join(ctx.root, teamsfx_api_1.ArchiveFolderName, teamsfx_api_1.AppPackageFolderName);
355
- const archiveManifestPath = path_1.default.join(archiveAppPackageFolder, teamsfx_api_1.V1ManifestFileName);
356
- // cannot use getAppDirectory before creating the manifest file
357
- const newAppPackageFolder = `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}`;
358
- await fs.ensureDir(newAppPackageFolder);
359
- if (await fs.pathExists(archiveManifestPath)) {
360
- manifest = await this.createV1Manifest(ctx);
361
- const resourcesDir = path_1.default.join(newAppPackageFolder, constants_2.MANIFEST_RESOURCES);
362
- await fs.ensureDir(resourcesDir);
363
- if (((_a = manifest === null || manifest === void 0 ? void 0 : manifest.icons) === null || _a === void 0 ? void 0 : _a.color) && !manifest.icons.color.startsWith("https://")) {
364
- const archiveColorFile = path_1.default.join(archiveAppPackageFolder, manifest.icons.color);
365
- const existColorFile = await fs.pathExists(archiveColorFile);
366
- const newColorFileName = existColorFile
367
- ? path_1.default.basename(manifest.icons.color)
368
- : constants_2.DEFAULT_COLOR_PNG_FILENAME;
369
- await fs.copyFile(existColorFile ? archiveColorFile : path_1.default.join(__1.getTemplatesFolder(), constants_2.COLOR_TEMPLATE), path_1.default.join(resourcesDir, newColorFileName));
370
- manifest.icons.color = `${constants_2.MANIFEST_RESOURCES}/${newColorFileName}`;
371
- }
372
- if (((_b = manifest === null || manifest === void 0 ? void 0 : manifest.icons) === null || _b === void 0 ? void 0 : _b.outline) && !manifest.icons.outline.startsWith("https://")) {
373
- const archiveOutlineFile = path_1.default.join(archiveAppPackageFolder, manifest.icons.outline);
374
- const existOutlineFile = await fs.pathExists(archiveOutlineFile);
375
- const newOutlineFileName = existOutlineFile
376
- ? path_1.default.basename(manifest.icons.outline)
377
- : constants_2.DEFAULT_OUTLINE_PNG_FILENAME;
378
- await fs.copyFile(existOutlineFile ? archiveOutlineFile : path_1.default.join(__1.getTemplatesFolder(), constants_2.OUTLINE_TEMPLATE), path_1.default.join(resourcesDir, newOutlineFileName));
379
- manifest.icons.outline = `${constants_2.MANIFEST_RESOURCES}/${newOutlineFileName}`;
380
- }
381
- await fs.writeFile(path_1.default.join(newAppPackageFolder, constants_2.MANIFEST_LOCAL), JSON.stringify(manifest, null, 4));
382
- return { enableAuth: !!((_c = manifest === null || manifest === void 0 ? void 0 : manifest.webApplicationInfo) === null || _c === void 0 ? void 0 : _c.id) };
383
- }
384
- else {
385
- await this.scaffold(ctx);
386
- return { enableAuth: false };
387
- }
388
- }
389
318
  async scaffold(ctx) {
390
319
  var _a;
391
320
  let manifest;
@@ -397,7 +326,7 @@ class AppStudioPluginImpl {
397
326
  const manifestFile = path_1.default.resolve(templateManifestFolder, "./solution/manifest_multi_env.json");
398
327
  const manifestString = (await fs.readFile(manifestFile)).toString();
399
328
  manifest = JSON.parse(manifestString);
400
- const localManifest = await createLocalManifest(ctx.projectSettings.appName, false, false, false, true, false);
329
+ const localManifest = await createLocalManifest(ctx.projectSettings.appName, false, false, false, true);
401
330
  await fs.writeFile(`${appDir}/${constants_2.MANIFEST_LOCAL}`, JSON.stringify(localManifest, null, 4));
402
331
  }
403
332
  else {
@@ -405,8 +334,8 @@ class AppStudioPluginImpl {
405
334
  const hasFrontend = solutionSettings.capabilities.includes(question_1.TabOptionItem.id);
406
335
  const hasBot = solutionSettings.capabilities.includes(question_1.BotOptionItem.id);
407
336
  const hasMessageExtension = solutionSettings.capabilities.includes(question_1.MessageExtensionItem.id);
408
- manifest = await createManifest(ctx.projectSettings.appName, hasFrontend, hasBot, hasMessageExtension, false, !!(solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.migrateFromV1));
409
- const localDebugManifest = await createLocalManifest(ctx.projectSettings.appName, hasFrontend, hasBot, hasMessageExtension, false, !!(solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.migrateFromV1));
337
+ manifest = await createManifest(ctx.projectSettings.appName, hasFrontend, hasBot, hasMessageExtension, false);
338
+ const localDebugManifest = await createLocalManifest(ctx.projectSettings.appName, hasFrontend, hasBot, hasMessageExtension, false);
410
339
  await fs.writeFile(`${appDir}/${constants_2.MANIFEST_LOCAL}`, JSON.stringify(localDebugManifest, null, 4));
411
340
  }
412
341
  await fs.ensureDir(appDir);
@@ -596,7 +525,14 @@ class AppStudioPluginImpl {
596
525
  if (teamsAppId.isErr()) {
597
526
  return teamsAppId;
598
527
  }
599
- (_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);
528
+ if (common_1.isConfigUnifyEnabled()) {
529
+ ctx.envInfo.state
530
+ .get(constants_3.ResourcePlugins.AppStudio)
531
+ .set(constants_2.Constants.TEAMS_APP_ID, teamsAppId.value);
532
+ }
533
+ else {
534
+ (_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);
535
+ }
600
536
  return teamsfx_api_1.ok(teamsAppId.value);
601
537
  }
602
538
  async checkPermission(ctx, userInfo) {
@@ -734,28 +670,6 @@ class AppStudioPluginImpl {
734
670
  await (publishProgress === null || publishProgress === void 0 ? void 0 : publishProgress.end(true));
735
671
  }
736
672
  }
737
- replaceExistingValueToPlaceholder(config, value, placeholderName) {
738
- if (config && value && placeholderName) {
739
- config = config.split(value).join(placeholderName);
740
- }
741
- return config;
742
- }
743
- async reloadManifest(manifestPath) {
744
- try {
745
- const manifest = await fs.readJson(manifestPath);
746
- if (!manifest) {
747
- return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.ManifestLoadFailedError.name, errors_1.AppStudioError.ManifestLoadFailedError.message(`Failed to load manifest file`)));
748
- }
749
- // Object.assign(ctx.app, manifest);
750
- return teamsfx_api_1.ok(manifest);
751
- }
752
- catch (e) {
753
- if (e.stack && e.stack.startsWith("SyntaxError")) {
754
- return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.ManifestLoadFailedError.name, errors_1.AppStudioError.ManifestLoadFailedError.message(`Failed to load manifest file from ${manifestPath}, due to ${e.message}`)));
755
- }
756
- return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.ManifestLoadFailedError.name, errors_1.AppStudioError.ManifestLoadFailedError.message(`Failed to load manifest file from ${manifestPath}, due to ${e.message}`)));
757
- }
758
- }
759
673
  async getConfigForCreatingManifest(ctx, localDebug) {
760
674
  const tabEndpoint = this.getTabEndpoint(ctx, localDebug);
761
675
  const tabDomain = this.getTabDomain(ctx, localDebug);
@@ -982,7 +896,7 @@ class AppStudioPluginImpl {
982
896
  appDefinition.appId = teamsAppId;
983
897
  try {
984
898
  const app = await appStudio_1.AppStudioClient.updateApp(teamsAppId, appDefinition, appStudioToken, logProvider, colorIconContent, outlineIconContent);
985
- if (app.updatedAt && !isLocalDebug) {
899
+ if (app.updatedAt && (!isLocalDebug || common_1.isConfigUnifyEnabled())) {
986
900
  const time = new Date(app.updatedAt).getTime();
987
901
  (_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);
988
902
  }
@@ -1025,7 +939,7 @@ class AppStudioPluginImpl {
1025
939
  }
1026
940
  async getAppDefinitionAndManifest(ctx, isLocalDebug) {
1027
941
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
1028
- const { tabEndpoint, tabDomain, tabIndexPath, aadId, botDomain, botId, webApplicationInfoResource, teamsAppId, } = await this.getConfigForCreatingManifest(ctx, isLocalDebug);
942
+ const { tabEndpoint, tabDomain, tabIndexPath, aadId, botDomain, botId, webApplicationInfoResource, teamsAppId, } = await this.getConfigForCreatingManifest(ctx, isLocalDebug && !common_1.isConfigUnifyEnabled());
1029
943
  const isProvisionSucceeded = !!((_a = ctx.envInfo.state
1030
944
  .get("solution")) === null || _a === void 0 ? void 0 : _a.get(constants_1.SOLUTION_PROVISION_SUCCEEDED));
1031
945
  const validDomains = [];
@@ -1034,7 +948,7 @@ class AppStudioPluginImpl {
1034
948
  }
1035
949
  if (botId) {
1036
950
  if (!botDomain) {
1037
- if (isLocalDebug) {
951
+ if (isLocalDebug && !common_1.isConfigUnifyEnabled()) {
1038
952
  return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.GetLocalDebugConfigFailedError.name, errors_1.AppStudioError.GetLocalDebugConfigFailedError.message(new Error(`Data required: ${constants_1.LOCAL_DEBUG_BOT_DOMAIN}`))));
1039
953
  }
1040
954
  else {
@@ -1087,17 +1001,23 @@ class AppStudioPluginImpl {
1087
1001
  tabIndexPath: indexPath !== null && indexPath !== void 0 ? indexPath : "{{{localSettings.frontend.tabIndexPath}}}",
1088
1002
  },
1089
1003
  auth: {
1090
- 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))
1091
- ? (_f = (_e = ctx.localSettings) === null || _e === void 0 ? void 0 : _e.auth) === null || _f === void 0 ? void 0 : _f.get(localSettingsConstants_1.LocalSettingsAuthKeys.ClientId)
1092
- : "{{localSettings.auth.clientId}}",
1093
- 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))
1094
- ? (_k = (_j = ctx.localSettings) === null || _j === void 0 ? void 0 : _j.auth) === null || _k === void 0 ? void 0 : _k.get(localSettingsConstants_1.LocalSettingsAuthKeys.ApplicationIdUris)
1095
- : "{{{localSettings.auth.applicationIdUris}}}",
1004
+ clientId: common_1.isConfigUnifyEnabled() && aadId
1005
+ ? aadId
1006
+ : ((_d = (_c = ctx.localSettings) === null || _c === void 0 ? void 0 : _c.auth) === null || _d === void 0 ? void 0 : _d.get(localSettingsConstants_1.LocalSettingsAuthKeys.ClientId))
1007
+ ? (_f = (_e = ctx.localSettings) === null || _e === void 0 ? void 0 : _e.auth) === null || _f === void 0 ? void 0 : _f.get(localSettingsConstants_1.LocalSettingsAuthKeys.ClientId)
1008
+ : "{{localSettings.auth.clientId}}",
1009
+ applicationIdUris: common_1.isConfigUnifyEnabled() && webApplicationInfoResource
1010
+ ? webApplicationInfoResource
1011
+ : ((_h = (_g = ctx.localSettings) === null || _g === void 0 ? void 0 : _g.auth) === null || _h === void 0 ? void 0 : _h.get(localSettingsConstants_1.LocalSettingsAuthKeys.ApplicationIdUris))
1012
+ ? (_k = (_j = ctx.localSettings) === null || _j === void 0 ? void 0 : _j.auth) === null || _k === void 0 ? void 0 : _k.get(localSettingsConstants_1.LocalSettingsAuthKeys.ApplicationIdUris)
1013
+ : "{{{localSettings.auth.applicationIdUris}}}",
1096
1014
  },
1097
1015
  teamsApp: {
1098
- 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))
1099
- ? (_p = (_o = ctx.localSettings) === null || _o === void 0 ? void 0 : _o.teamsApp) === null || _p === void 0 ? void 0 : _p.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId)
1100
- : "{{localSettings.teamsApp.teamsAppId}}",
1016
+ teamsAppId: common_1.isConfigUnifyEnabled() && teamsAppId
1017
+ ? teamsAppId
1018
+ : ((_m = (_l = ctx.localSettings) === null || _l === void 0 ? void 0 : _l.teamsApp) === null || _m === void 0 ? void 0 : _m.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId))
1019
+ ? (_p = (_o = ctx.localSettings) === null || _o === void 0 ? void 0 : _o.teamsApp) === null || _p === void 0 ? void 0 : _p.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId)
1020
+ : "{{localSettings.teamsApp.teamsAppId}}",
1101
1021
  },
1102
1022
  bot: {
1103
1023
  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))
@@ -1175,7 +1095,7 @@ class AppStudioPluginImpl {
1175
1095
  }
1176
1096
  }
1177
1097
  exports.AppStudioPluginImpl = AppStudioPluginImpl;
1178
- async function createLocalManifest(appName, hasFrontend, hasBot, hasMessageExtension, isSPFx, migrateFromV1) {
1098
+ async function createLocalManifest(appName, hasFrontend, hasBot, hasMessageExtension, isSPFx) {
1179
1099
  let name = appName;
1180
1100
  const suffix = "-local-debug";
1181
1101
  if (suffix.length + appName.length <= constants_2.TEAMS_APP_SHORT_NAME_MAX_LENGTH) {
@@ -1203,14 +1123,11 @@ async function createLocalManifest(appName, hasFrontend, hasBot, hasMessageExten
1203
1123
  if (hasMessageExtension) {
1204
1124
  manifest.composeExtensions = constants_2.COMPOSE_EXTENSIONS_TPL_LOCAL_DEBUG;
1205
1125
  }
1206
- if (migrateFromV1) {
1207
- manifest.webApplicationInfo = undefined;
1208
- }
1209
1126
  return manifest;
1210
1127
  }
1211
1128
  }
1212
1129
  exports.createLocalManifest = createLocalManifest;
1213
- async function createManifest(appName, hasFrontend, hasBot, hasMessageExtension, isSPFx, migrateFromV1) {
1130
+ async function createManifest(appName, hasFrontend, hasBot, hasMessageExtension, isSPFx) {
1214
1131
  if (!hasBot && !hasMessageExtension && !hasFrontend) {
1215
1132
  throw new Error(`Invalid capability`);
1216
1133
  }
@@ -1227,9 +1144,6 @@ async function createManifest(appName, hasFrontend, hasBot, hasMessageExtension,
1227
1144
  if (hasMessageExtension) {
1228
1145
  manifest.composeExtensions = constants_2.COMPOSE_EXTENSIONS_TPL_FOR_MULTI_ENV;
1229
1146
  }
1230
- if (migrateFromV1) {
1231
- manifest.webApplicationInfo = undefined;
1232
- }
1233
1147
  return manifest;
1234
1148
  }
1235
1149
  return undefined;