@microsoft/teamsfx-core 2.0.4-alpha.0237b70e3.0 → 2.0.4-alpha.06f5ef6da.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 (683) hide show
  1. package/build/common/constants.d.ts +3 -0
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +3 -0
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/deps-checker/checkerFactory.d.ts +1 -2
  6. package/build/common/deps-checker/checkerFactory.d.ts.map +1 -1
  7. package/build/common/deps-checker/checkerFactory.js +2 -2
  8. package/build/common/deps-checker/checkerFactory.js.map +1 -1
  9. package/build/common/deps-checker/constant/message.d.ts +2 -0
  10. package/build/common/deps-checker/constant/message.d.ts.map +1 -1
  11. package/build/common/deps-checker/constant/message.js +2 -0
  12. package/build/common/deps-checker/constant/message.js.map +1 -1
  13. package/build/common/deps-checker/constant/telemetry.d.ts +12 -1
  14. package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -1
  15. package/build/common/deps-checker/constant/telemetry.js +11 -0
  16. package/build/common/deps-checker/constant/telemetry.js.map +1 -1
  17. package/build/common/deps-checker/depsChecker.d.ts +7 -1
  18. package/build/common/deps-checker/depsChecker.d.ts.map +1 -1
  19. package/build/common/deps-checker/depsChecker.js +1 -0
  20. package/build/common/deps-checker/depsChecker.js.map +1 -1
  21. package/build/common/deps-checker/depsLogger.d.ts +14 -14
  22. package/build/common/deps-checker/depsLogger.d.ts.map +1 -1
  23. package/build/common/deps-checker/depsLogger.js +7 -21
  24. package/build/common/deps-checker/depsLogger.js.map +1 -1
  25. package/build/common/deps-checker/internal/dotnetChecker.d.ts.map +1 -1
  26. package/build/common/deps-checker/internal/dotnetChecker.js +42 -37
  27. package/build/common/deps-checker/internal/dotnetChecker.js.map +1 -1
  28. package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
  29. package/build/common/deps-checker/internal/funcToolChecker.js +2 -2
  30. package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
  31. package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
  32. package/build/common/deps-checker/internal/nodeChecker.js +8 -8
  33. package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
  34. package/build/common/deps-checker/internal/testToolChecker.d.ts +45 -0
  35. package/build/common/deps-checker/internal/testToolChecker.d.ts.map +1 -0
  36. package/build/common/deps-checker/internal/testToolChecker.js +359 -0
  37. package/build/common/deps-checker/internal/testToolChecker.js.map +1 -0
  38. package/build/common/deps-checker/internal/vxTestAppChecker.js +1 -1
  39. package/build/common/deps-checker/internal/vxTestAppChecker.js.map +1 -1
  40. package/build/common/deps-checker/util/cpUtils.d.ts +1 -1
  41. package/build/common/deps-checker/util/cpUtils.d.ts.map +1 -1
  42. package/build/common/deps-checker/util/cpUtils.js +4 -4
  43. package/build/common/deps-checker/util/cpUtils.js.map +1 -1
  44. package/build/common/deps-checker/util/fileHelper.d.ts +1 -0
  45. package/build/common/deps-checker/util/fileHelper.d.ts.map +1 -1
  46. package/build/common/deps-checker/util/fileHelper.js +9 -1
  47. package/build/common/deps-checker/util/fileHelper.js.map +1 -1
  48. package/build/common/deps-checker/util/progressIndicator.js +2 -2
  49. package/build/common/deps-checker/util/progressIndicator.js.map +1 -1
  50. package/build/common/featureFlags.d.ts +3 -0
  51. package/build/common/featureFlags.d.ts.map +1 -1
  52. package/build/common/featureFlags.js +14 -1
  53. package/build/common/featureFlags.js.map +1 -1
  54. package/build/common/jsonUtils.d.ts.map +1 -1
  55. package/build/common/jsonUtils.js +1 -5
  56. package/build/common/jsonUtils.js.map +1 -1
  57. package/build/common/local/localCertificateManager.d.ts.map +1 -1
  58. package/build/common/local/localCertificateManager.js +4 -1
  59. package/build/common/local/localCertificateManager.js.map +1 -1
  60. package/build/common/local/packageJsonHelper.d.ts.map +1 -1
  61. package/build/common/local/packageJsonHelper.js +1 -0
  62. package/build/common/local/packageJsonHelper.js.map +1 -1
  63. package/build/common/local/portChecker.js.map +1 -1
  64. package/build/common/m365/launchHelper.d.ts +2 -2
  65. package/build/common/m365/launchHelper.d.ts.map +1 -1
  66. package/build/common/m365/launchHelper.js +24 -6
  67. package/build/common/m365/launchHelper.js.map +1 -1
  68. package/build/common/m365/packageService.d.ts.map +1 -1
  69. package/build/common/m365/packageService.js +66 -19
  70. package/build/common/m365/packageService.js.map +1 -1
  71. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  72. package/build/common/projectSettingsHelper.js +1 -0
  73. package/build/common/projectSettingsHelper.js.map +1 -1
  74. package/build/common/samples.d.ts +17 -5
  75. package/build/common/samples.d.ts.map +1 -1
  76. package/build/common/samples.js +76 -38
  77. package/build/common/samples.js.map +1 -1
  78. package/build/common/spec-parser/adaptiveCardGenerator.d.ts +5 -0
  79. package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +1 -0
  80. package/build/common/spec-parser/adaptiveCardGenerator.js +120 -0
  81. package/build/common/spec-parser/adaptiveCardGenerator.js.map +1 -0
  82. package/build/common/spec-parser/adaptiveCardWrapper.d.ts +3 -0
  83. package/build/common/spec-parser/adaptiveCardWrapper.d.ts.map +1 -0
  84. package/build/common/spec-parser/adaptiveCardWrapper.js +21 -0
  85. package/build/common/spec-parser/adaptiveCardWrapper.js.map +1 -0
  86. package/build/common/spec-parser/constants.d.ts +23 -7
  87. package/build/common/spec-parser/constants.d.ts.map +1 -1
  88. package/build/common/spec-parser/constants.js +45 -7
  89. package/build/common/spec-parser/constants.js.map +1 -1
  90. package/build/common/spec-parser/interfaces.d.ts +77 -13
  91. package/build/common/spec-parser/interfaces.d.ts.map +1 -1
  92. package/build/common/spec-parser/interfaces.js +24 -13
  93. package/build/common/spec-parser/interfaces.js.map +1 -1
  94. package/build/common/spec-parser/manifestUpdater.d.ts +7 -0
  95. package/build/common/spec-parser/manifestUpdater.d.ts.map +1 -0
  96. package/build/common/spec-parser/manifestUpdater.js +155 -0
  97. package/build/common/spec-parser/manifestUpdater.js.map +1 -0
  98. package/build/common/spec-parser/specFilter.d.ts +1 -1
  99. package/build/common/spec-parser/specFilter.d.ts.map +1 -1
  100. package/build/common/spec-parser/specFilter.js +25 -34
  101. package/build/common/spec-parser/specFilter.js.map +1 -1
  102. package/build/common/spec-parser/specParser.d.ts +10 -4
  103. package/build/common/spec-parser/specParser.d.ts.map +1 -1
  104. package/build/common/spec-parser/specParser.js +172 -93
  105. package/build/common/spec-parser/specParser.js.map +1 -1
  106. package/build/common/spec-parser/utils.d.ts +29 -0
  107. package/build/common/spec-parser/utils.d.ts.map +1 -0
  108. package/build/common/spec-parser/utils.js +314 -0
  109. package/build/common/spec-parser/utils.js.map +1 -0
  110. package/build/common/telemetry.d.ts +7 -4
  111. package/build/common/telemetry.d.ts.map +1 -1
  112. package/build/common/telemetry.js +43 -8
  113. package/build/common/telemetry.js.map +1 -1
  114. package/build/common/tools.d.ts.map +1 -1
  115. package/build/common/tools.js +7 -2
  116. package/build/common/tools.js.map +1 -1
  117. package/build/common/versionMetadata.d.ts +1 -0
  118. package/build/common/versionMetadata.d.ts.map +1 -1
  119. package/build/common/versionMetadata.js +1 -0
  120. package/build/common/versionMetadata.js.map +1 -1
  121. package/build/component/configManager/interface.d.ts +5 -3
  122. package/build/component/configManager/interface.d.ts.map +1 -1
  123. package/build/component/configManager/interface.js.map +1 -1
  124. package/build/component/configManager/lifecycle.d.ts +1 -3
  125. package/build/component/configManager/lifecycle.d.ts.map +1 -1
  126. package/build/component/configManager/lifecycle.js +23 -51
  127. package/build/component/configManager/lifecycle.js.map +1 -1
  128. package/build/component/configManager/parser.d.ts.map +1 -1
  129. package/build/component/configManager/parser.js +7 -8
  130. package/build/component/configManager/parser.js.map +1 -1
  131. package/build/component/configManager/validator.d.ts.map +1 -1
  132. package/build/component/configManager/validator.js +6 -6
  133. package/build/component/configManager/validator.js.map +1 -1
  134. package/build/component/constants.d.ts +6 -0
  135. package/build/component/constants.d.ts.map +1 -1
  136. package/build/component/constants.js +7 -1
  137. package/build/component/constants.js.map +1 -1
  138. package/build/component/coordinator/index.d.ts +13 -8
  139. package/build/component/coordinator/index.d.ts.map +1 -1
  140. package/build/component/coordinator/index.js +84 -68
  141. package/build/component/coordinator/index.js.map +1 -1
  142. package/build/component/coordinator/summary.d.ts.map +1 -1
  143. package/build/component/coordinator/summary.js +2 -1
  144. package/build/component/coordinator/summary.js.map +1 -1
  145. package/build/component/developerPortalScaffoldUtils.d.ts +1 -1
  146. package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
  147. package/build/component/developerPortalScaffoldUtils.js +7 -7
  148. package/build/component/developerPortalScaffoldUtils.js.map +1 -1
  149. package/build/component/driver/aad/create.d.ts +1 -2
  150. package/build/component/driver/aad/create.d.ts.map +1 -1
  151. package/build/component/driver/aad/create.js +8 -11
  152. package/build/component/driver/aad/create.js.map +1 -1
  153. package/build/component/driver/aad/error/aadAppNameTooLongError.d.ts +5 -0
  154. package/build/component/driver/aad/error/aadAppNameTooLongError.d.ts.map +1 -0
  155. package/build/component/driver/aad/error/aadAppNameTooLongError.js +21 -0
  156. package/build/component/driver/aad/error/aadAppNameTooLongError.js.map +1 -0
  157. package/build/component/driver/aad/error/aadManifestError.d.ts +3 -0
  158. package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
  159. package/build/component/driver/aad/error/aadManifestError.js +13 -1
  160. package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
  161. package/build/component/driver/aad/update.d.ts +1 -2
  162. package/build/component/driver/aad/update.d.ts.map +1 -1
  163. package/build/component/driver/aad/update.js +4 -11
  164. package/build/component/driver/aad/update.js.map +1 -1
  165. package/build/component/driver/aad/utility/aadAppClient.d.ts +1 -1
  166. package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
  167. package/build/component/driver/aad/utility/aadAppClient.js +58 -13
  168. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  169. package/build/component/driver/aad/utility/constants.d.ts +3 -0
  170. package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
  171. package/build/component/driver/aad/utility/constants.js +4 -1
  172. package/build/component/driver/aad/utility/constants.js.map +1 -1
  173. package/build/component/driver/add/addWebPart.d.ts.map +1 -1
  174. package/build/component/driver/add/addWebPart.js +10 -1
  175. package/build/component/driver/add/addWebPart.js.map +1 -1
  176. package/build/component/driver/arm/deploy.d.ts +1 -3
  177. package/build/component/driver/arm/deploy.d.ts.map +1 -1
  178. package/build/component/driver/arm/deploy.js +1 -14
  179. package/build/component/driver/arm/deploy.js.map +1 -1
  180. package/build/component/driver/arm/deployImpl.d.ts +2 -1
  181. package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
  182. package/build/component/driver/arm/deployImpl.js +19 -0
  183. package/build/component/driver/arm/deployImpl.js.map +1 -1
  184. package/build/component/driver/arm/util/bicepChecker.js +7 -6
  185. package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
  186. package/build/component/driver/arm/util/handleError.js.map +1 -1
  187. package/build/component/driver/botAadApp/create.d.ts +2 -1
  188. package/build/component/driver/botAadApp/create.d.ts.map +1 -1
  189. package/build/component/driver/botAadApp/create.js +11 -10
  190. package/build/component/driver/botAadApp/create.js.map +1 -1
  191. package/build/component/driver/botFramework/createOrUpdateBot.d.ts +1 -0
  192. package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
  193. package/build/component/driver/botFramework/createOrUpdateBot.js +8 -12
  194. package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
  195. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.d.ts +0 -2
  196. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.d.ts.map +1 -1
  197. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js +0 -10
  198. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js.map +1 -1
  199. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.d.ts +0 -2
  200. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.d.ts.map +1 -1
  201. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js +0 -10
  202. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js.map +1 -1
  203. package/build/component/driver/deploy/azure/azureStorageDeployDriver.d.ts +0 -2
  204. package/build/component/driver/deploy/azure/azureStorageDeployDriver.d.ts.map +1 -1
  205. package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +17 -19
  206. package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
  207. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.d.ts.map +1 -1
  208. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js +11 -4
  209. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js.map +1 -1
  210. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
  211. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +29 -16
  212. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
  213. package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
  214. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +27 -16
  215. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
  216. package/build/component/driver/deploy/azure/impl/baseDeployImpl.d.ts.map +1 -1
  217. package/build/component/driver/deploy/azure/impl/baseDeployImpl.js +4 -4
  218. package/build/component/driver/deploy/azure/impl/baseDeployImpl.js.map +1 -1
  219. package/build/component/driver/deploy/spfx/deployDriver.d.ts +1 -0
  220. package/build/component/driver/deploy/spfx/deployDriver.d.ts.map +1 -1
  221. package/build/component/driver/deploy/spfx/deployDriver.js +27 -5
  222. package/build/component/driver/deploy/spfx/deployDriver.js.map +1 -1
  223. package/build/component/driver/devTool/constant.d.ts +2 -0
  224. package/build/component/driver/devTool/constant.d.ts.map +1 -1
  225. package/build/component/driver/devTool/constant.js +4 -0
  226. package/build/component/driver/devTool/constant.js.map +1 -1
  227. package/build/component/driver/devTool/error/testToolInstallationUserError.d.ts +5 -0
  228. package/build/component/driver/devTool/error/testToolInstallationUserError.d.ts.map +1 -0
  229. package/build/component/driver/devTool/error/testToolInstallationUserError.js +24 -0
  230. package/build/component/driver/devTool/error/testToolInstallationUserError.js.map +1 -0
  231. package/build/component/driver/devTool/installDriver.d.ts +2 -0
  232. package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
  233. package/build/component/driver/devTool/installDriver.js +84 -13
  234. package/build/component/driver/devTool/installDriver.js.map +1 -1
  235. package/build/component/driver/devTool/interfaces/InstallToolArgs.d.ts +8 -0
  236. package/build/component/driver/devTool/interfaces/InstallToolArgs.d.ts.map +1 -1
  237. package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts +1 -0
  238. package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts.map +1 -1
  239. package/build/component/driver/file/createOrUpdateEnvironmentFile.js +12 -18
  240. package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
  241. package/build/component/driver/file/createOrUpdateJsonFile.d.ts +1 -0
  242. package/build/component/driver/file/createOrUpdateJsonFile.d.ts.map +1 -1
  243. package/build/component/driver/file/createOrUpdateJsonFile.js +5 -11
  244. package/build/component/driver/file/createOrUpdateJsonFile.js.map +1 -1
  245. package/build/component/driver/interface/stepDriver.d.ts +2 -7
  246. package/build/component/driver/interface/stepDriver.d.ts.map +1 -1
  247. package/build/component/driver/m365/acquire.d.ts +1 -0
  248. package/build/component/driver/m365/acquire.d.ts.map +1 -1
  249. package/build/component/driver/m365/acquire.js +6 -12
  250. package/build/component/driver/m365/acquire.js.map +1 -1
  251. package/build/component/driver/script/baseBuildDriver.d.ts.map +1 -1
  252. package/build/component/driver/script/baseBuildDriver.js +1 -0
  253. package/build/component/driver/script/baseBuildDriver.js.map +1 -1
  254. package/build/component/driver/script/baseBuildStepDriver.d.ts +0 -2
  255. package/build/component/driver/script/baseBuildStepDriver.d.ts.map +1 -1
  256. package/build/component/driver/script/baseBuildStepDriver.js +0 -4
  257. package/build/component/driver/script/baseBuildStepDriver.js.map +1 -1
  258. package/build/component/driver/script/dotnetBuildDriver.d.ts +0 -2
  259. package/build/component/driver/script/dotnetBuildDriver.d.ts.map +1 -1
  260. package/build/component/driver/script/dotnetBuildDriver.js +0 -9
  261. package/build/component/driver/script/dotnetBuildDriver.js.map +1 -1
  262. package/build/component/driver/script/npmBuildDriver.d.ts +0 -2
  263. package/build/component/driver/script/npmBuildDriver.d.ts.map +1 -1
  264. package/build/component/driver/script/npmBuildDriver.js +0 -9
  265. package/build/component/driver/script/npmBuildDriver.js.map +1 -1
  266. package/build/component/driver/script/npxBuildDriver.d.ts +0 -2
  267. package/build/component/driver/script/npxBuildDriver.d.ts.map +1 -1
  268. package/build/component/driver/script/npxBuildDriver.js +0 -9
  269. package/build/component/driver/script/npxBuildDriver.js.map +1 -1
  270. package/build/component/driver/script/scriptDriver.d.ts +10 -1
  271. package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
  272. package/build/component/driver/script/scriptDriver.js +30 -29
  273. package/build/component/driver/script/scriptDriver.js.map +1 -1
  274. package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
  275. package/build/component/driver/teamsApp/appStudio.js +11 -11
  276. package/build/component/driver/teamsApp/appStudio.js.map +1 -1
  277. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +11 -5
  278. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
  279. package/build/component/driver/teamsApp/clients/appStudioClient.js +53 -12
  280. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  281. package/build/component/driver/teamsApp/clients/authSvcClient.d.ts.map +1 -1
  282. package/build/component/driver/teamsApp/clients/authSvcClient.js +2 -0
  283. package/build/component/driver/teamsApp/clients/authSvcClient.js.map +1 -1
  284. package/build/component/driver/teamsApp/configure.d.ts +1 -1
  285. package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
  286. package/build/component/driver/teamsApp/configure.js +5 -23
  287. package/build/component/driver/teamsApp/configure.js.map +1 -1
  288. package/build/component/driver/teamsApp/constants.d.ts +0 -1
  289. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  290. package/build/component/driver/teamsApp/constants.js +1 -2
  291. package/build/component/driver/teamsApp/constants.js.map +1 -1
  292. package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts +1 -2
  293. package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts.map +1 -1
  294. package/build/component/driver/teamsApp/copyAppPackageToSPFx.js +4 -11
  295. package/build/component/driver/teamsApp/copyAppPackageToSPFx.js.map +1 -1
  296. package/build/component/driver/teamsApp/create.d.ts +1 -1
  297. package/build/component/driver/teamsApp/create.d.ts.map +1 -1
  298. package/build/component/driver/teamsApp/create.js +6 -11
  299. package/build/component/driver/teamsApp/create.js.map +1 -1
  300. package/build/component/driver/teamsApp/createAppPackage.d.ts +4 -3
  301. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  302. package/build/component/driver/teamsApp/createAppPackage.js +53 -43
  303. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  304. package/build/component/driver/teamsApp/errors.d.ts +4 -0
  305. package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
  306. package/build/component/driver/teamsApp/errors.js +9 -0
  307. package/build/component/driver/teamsApp/errors.js.map +1 -1
  308. package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtension.d.ts +2 -0
  309. package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtension.d.ts.map +1 -1
  310. package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtensionCommand.d.ts +1 -0
  311. package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtensionCommand.d.ts.map +1 -1
  312. package/build/component/driver/teamsApp/publishAppPackage.d.ts +1 -1
  313. package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
  314. package/build/component/driver/teamsApp/publishAppPackage.js +4 -12
  315. package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
  316. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +3 -2
  317. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
  318. package/build/component/driver/teamsApp/utils/ManifestUtils.js +24 -6
  319. package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
  320. package/build/component/driver/teamsApp/utils/telemetry.d.ts +1 -0
  321. package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
  322. package/build/component/driver/teamsApp/utils/telemetry.js +1 -0
  323. package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
  324. package/build/component/driver/teamsApp/utils/utils.d.ts +2 -2
  325. package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
  326. package/build/component/driver/teamsApp/utils/utils.js +22 -10
  327. package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
  328. package/build/component/driver/teamsApp/validate.d.ts +1 -1
  329. package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
  330. package/build/component/driver/teamsApp/validate.js +17 -12
  331. package/build/component/driver/teamsApp/validate.js.map +1 -1
  332. package/build/component/driver/teamsApp/validateAppPackage.d.ts +1 -1
  333. package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
  334. package/build/component/driver/teamsApp/validateAppPackage.js +6 -11
  335. package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
  336. package/build/component/error/componentError.d.ts +2 -1
  337. package/build/component/error/componentError.d.ts.map +1 -1
  338. package/build/component/error/componentError.js +13 -6
  339. package/build/component/error/componentError.js.map +1 -1
  340. package/build/component/feature/collaboration.d.ts.map +1 -1
  341. package/build/component/feature/collaboration.js +55 -26
  342. package/build/component/feature/collaboration.js.map +1 -1
  343. package/build/component/feature/createAuthFiles.js.map +1 -1
  344. package/build/component/generator/copilotPlugin/generator.d.ts +7 -2
  345. package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
  346. package/build/component/generator/copilotPlugin/generator.js +154 -28
  347. package/build/component/generator/copilotPlugin/generator.js.map +1 -1
  348. package/build/component/generator/copilotPlugin/helper.d.ts +14 -7
  349. package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
  350. package/build/component/generator/copilotPlugin/helper.js +241 -39
  351. package/build/component/generator/copilotPlugin/helper.js.map +1 -1
  352. package/build/component/generator/error.d.ts +7 -1
  353. package/build/component/generator/error.d.ts.map +1 -1
  354. package/build/component/generator/error.js +15 -3
  355. package/build/component/generator/error.js.map +1 -1
  356. package/build/component/generator/generator.d.ts.map +1 -1
  357. package/build/component/generator/generator.js +30 -21
  358. package/build/component/generator/generator.js.map +1 -1
  359. package/build/component/generator/generatorAction.d.ts +2 -1
  360. package/build/component/generator/generatorAction.d.ts.map +1 -1
  361. package/build/component/generator/generatorAction.js +12 -5
  362. package/build/component/generator/generatorAction.js.map +1 -1
  363. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  364. package/build/component/generator/officeAddin/generator.js +9 -1
  365. package/build/component/generator/officeAddin/generator.js.map +1 -1
  366. package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
  367. package/build/component/generator/officeAddin/helperMethods.js +9 -5
  368. package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
  369. package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +1 -1
  370. package/build/component/generator/spfx/depsChecker/generatorChecker.js +10 -8
  371. package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
  372. package/build/component/generator/spfx/depsChecker/yoChecker.d.ts +1 -1
  373. package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +1 -1
  374. package/build/component/generator/spfx/depsChecker/yoChecker.js +10 -10
  375. package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
  376. package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
  377. package/build/component/generator/spfx/spfxGenerator.js +11 -11
  378. package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
  379. package/build/component/generator/spfx/utils/utils.js +3 -3
  380. package/build/component/generator/spfx/utils/utils.js.map +1 -1
  381. package/build/component/generator/utils.d.ts +12 -4
  382. package/build/component/generator/utils.d.ts.map +1 -1
  383. package/build/component/generator/utils.js +17 -16
  384. package/build/component/generator/utils.js.map +1 -1
  385. package/build/component/messages.d.ts +2 -3
  386. package/build/component/messages.d.ts.map +1 -1
  387. package/build/component/messages.js +3 -4
  388. package/build/component/messages.js.map +1 -1
  389. package/build/component/middleware/actionExecutionMW.d.ts +2 -2
  390. package/build/component/middleware/actionExecutionMW.d.ts.map +1 -1
  391. package/build/component/middleware/envMW.js +3 -3
  392. package/build/component/middleware/envMW.js.map +1 -1
  393. package/build/component/middleware/questionMW.d.ts +2 -2
  394. package/build/component/middleware/questionMW.d.ts.map +1 -1
  395. package/build/component/middleware/questionMW.js +7 -11
  396. package/build/component/middleware/questionMW.js.map +1 -1
  397. package/build/component/migrate.js.map +1 -1
  398. package/build/component/provisionUtils.d.ts +3 -3
  399. package/build/component/provisionUtils.d.ts.map +1 -1
  400. package/build/component/provisionUtils.js +3 -3
  401. package/build/component/provisionUtils.js.map +1 -1
  402. package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
  403. package/build/component/resource/botService/appStudio/appStudioClient.js +24 -2
  404. package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
  405. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts +2 -2
  406. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts.map +1 -1
  407. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js +6 -1
  408. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js.map +1 -1
  409. package/build/component/telemetry.js +2 -2
  410. package/build/component/telemetry.js.map +1 -1
  411. package/build/component/utils/ResourceGroupHelper.d.ts +2 -2
  412. package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
  413. package/build/component/utils/ResourceGroupHelper.js +11 -9
  414. package/build/component/utils/ResourceGroupHelper.js.map +1 -1
  415. package/build/component/utils/azureResourceOperation.js +2 -2
  416. package/build/component/utils/azureResourceOperation.js.map +1 -1
  417. package/build/component/utils/charsetUtils.js +3 -3
  418. package/build/component/utils/charsetUtils.js.map +1 -1
  419. package/build/component/utils/common.d.ts +1 -1
  420. package/build/component/utils/common.d.ts.map +1 -1
  421. package/build/component/utils/common.js +4 -5
  422. package/build/component/utils/common.js.map +1 -1
  423. package/build/component/utils/depsChecker/cpUtils.d.ts.map +1 -1
  424. package/build/component/utils/depsChecker/cpUtils.js +8 -4
  425. package/build/component/utils/depsChecker/cpUtils.js.map +1 -1
  426. package/build/component/utils/envUtil.d.ts.map +1 -1
  427. package/build/component/utils/envUtil.js +6 -4
  428. package/build/component/utils/envUtil.js.map +1 -1
  429. package/build/component/utils/metadataUtil.d.ts +3 -0
  430. package/build/component/utils/metadataUtil.d.ts.map +1 -1
  431. package/build/component/utils/metadataUtil.js +16 -3
  432. package/build/component/utils/metadataUtil.js.map +1 -1
  433. package/build/component/utils/pathUtils.d.ts.map +1 -1
  434. package/build/component/utils/pathUtils.js +9 -4
  435. package/build/component/utils/pathUtils.js.map +1 -1
  436. package/build/component/utils/teamsFxTelemetryReporter.js +2 -2
  437. package/build/component/utils/teamsFxTelemetryReporter.js.map +1 -1
  438. package/build/component/utils.js.map +1 -1
  439. package/build/core/FxCore.d.ts +42 -34
  440. package/build/core/FxCore.d.ts.map +1 -1
  441. package/build/core/FxCore.js +831 -68
  442. package/build/core/FxCore.js.map +1 -1
  443. package/build/core/collaborator.d.ts +1 -1
  444. package/build/core/collaborator.d.ts.map +1 -1
  445. package/build/core/collaborator.js +16 -10
  446. package/build/core/collaborator.js.map +1 -1
  447. package/build/core/environment.d.ts +2 -9
  448. package/build/core/environment.d.ts.map +1 -1
  449. package/build/core/environment.js +17 -13
  450. package/build/core/environment.js.map +1 -1
  451. package/build/core/environmentName.d.ts +18 -0
  452. package/build/core/environmentName.d.ts.map +1 -0
  453. package/build/core/environmentName.js +35 -0
  454. package/build/core/environmentName.js.map +1 -0
  455. package/build/core/error.d.ts +6 -0
  456. package/build/core/error.d.ts.map +1 -1
  457. package/build/core/error.js +23 -1
  458. package/build/core/error.js.map +1 -1
  459. package/build/core/globalVars.d.ts +16 -0
  460. package/build/core/globalVars.d.ts.map +1 -1
  461. package/build/core/globalVars.js +34 -1
  462. package/build/core/globalVars.js.map +1 -1
  463. package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
  464. package/build/core/middleware/concurrentLocker.js +7 -3
  465. package/build/core/middleware/concurrentLocker.js.map +1 -1
  466. package/build/core/middleware/projectMigratorV3.d.ts +4 -0
  467. package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
  468. package/build/core/middleware/projectMigratorV3.js +34 -32
  469. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  470. package/build/core/middleware/projectVersionChecker.js +8 -8
  471. package/build/core/middleware/projectVersionChecker.js.map +1 -1
  472. package/build/core/middleware/utils/appYmlGenerator.d.ts.map +1 -1
  473. package/build/core/middleware/utils/appYmlGenerator.js +2 -1
  474. package/build/core/middleware/utils/appYmlGenerator.js.map +1 -1
  475. package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts.map +1 -1
  476. package/build/core/middleware/utils/debug/appLocalYmlGenerator.js +3 -2
  477. package/build/core/middleware/utils/debug/appLocalYmlGenerator.js.map +1 -1
  478. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
  479. package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +1 -1
  480. package/build/core/middleware/utils/debug/taskMigrator.js +33 -15
  481. package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
  482. package/build/core/middleware/utils/migrationContext.d.ts +1 -0
  483. package/build/core/middleware/utils/migrationContext.d.ts.map +1 -1
  484. package/build/core/middleware/utils/migrationContext.js.map +1 -1
  485. package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
  486. package/build/core/middleware/utils/v3MigrationUtils.js +6 -2
  487. package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
  488. package/build/core/telemetry.d.ts +1 -0
  489. package/build/core/telemetry.d.ts.map +1 -1
  490. package/build/core/telemetry.js +3 -3
  491. package/build/core/telemetry.js.map +1 -1
  492. package/build/error/arm.d.ts.map +1 -1
  493. package/build/error/arm.js +10 -0
  494. package/build/error/arm.js.map +1 -1
  495. package/build/error/azure.d.ts +5 -5
  496. package/build/error/azure.d.ts.map +1 -1
  497. package/build/error/azure.js +21 -5
  498. package/build/error/azure.js.map +1 -1
  499. package/build/error/common.d.ts +8 -11
  500. package/build/error/common.d.ts.map +1 -1
  501. package/build/error/common.js +67 -53
  502. package/build/error/common.js.map +1 -1
  503. package/build/error/deploy.d.ts +1 -1
  504. package/build/error/deploy.d.ts.map +1 -1
  505. package/build/error/deploy.js +21 -2
  506. package/build/error/deploy.js.map +1 -1
  507. package/build/error/m365.d.ts.map +1 -1
  508. package/build/error/m365.js +4 -0
  509. package/build/error/m365.js.map +1 -1
  510. package/build/error/script.d.ts +2 -2
  511. package/build/error/script.d.ts.map +1 -1
  512. package/build/error/script.js +7 -2
  513. package/build/error/script.js.map +1 -1
  514. package/build/error/types.d.ts +6 -0
  515. package/build/error/types.d.ts.map +1 -0
  516. package/build/error/types.js +12 -0
  517. package/build/error/types.js.map +1 -0
  518. package/build/error/yml.d.ts.map +1 -1
  519. package/build/error/yml.js +6 -0
  520. package/build/error/yml.js.map +1 -1
  521. package/build/index.d.ts +5 -1
  522. package/build/index.d.ts.map +1 -1
  523. package/build/index.js +6 -1
  524. package/build/index.js.map +1 -1
  525. package/build/question/constants.d.ts +6 -0
  526. package/build/question/constants.d.ts.map +1 -0
  527. package/build/question/constants.js +18 -0
  528. package/build/question/constants.js.map +1 -0
  529. package/build/question/create.d.ts +30 -9
  530. package/build/question/create.d.ts.map +1 -1
  531. package/build/question/create.js +409 -300
  532. package/build/question/create.js.map +1 -1
  533. package/build/question/generator.d.ts +4 -0
  534. package/build/question/generator.d.ts.map +1 -0
  535. package/build/question/generator.js +365 -0
  536. package/build/question/generator.js.map +1 -0
  537. package/build/question/index.d.ts +19 -30
  538. package/build/question/index.d.ts.map +1 -1
  539. package/build/question/index.js +14 -47
  540. package/build/question/index.js.map +1 -1
  541. package/build/question/inputs/CreateEnvInputs.d.ts +14 -0
  542. package/build/question/inputs/CreateEnvInputs.d.ts.map +1 -0
  543. package/build/question/inputs/CreateEnvInputs.js +5 -0
  544. package/build/question/inputs/CreateEnvInputs.js.map +1 -0
  545. package/build/question/inputs/CreateProjectInputs.d.ts +38 -0
  546. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -0
  547. package/build/question/inputs/CreateProjectInputs.js +5 -0
  548. package/build/question/inputs/CreateProjectInputs.js.map +1 -0
  549. package/build/question/inputs/CreateSampleProjectInputs.d.ts +12 -0
  550. package/build/question/inputs/CreateSampleProjectInputs.d.ts.map +1 -0
  551. package/build/question/inputs/CreateSampleProjectInputs.js +5 -0
  552. package/build/question/inputs/CreateSampleProjectInputs.js.map +1 -0
  553. package/build/question/inputs/DeployAadManifestInputs.d.ts +14 -0
  554. package/build/question/inputs/DeployAadManifestInputs.d.ts.map +1 -0
  555. package/build/question/inputs/DeployAadManifestInputs.js +5 -0
  556. package/build/question/inputs/DeployAadManifestInputs.js.map +1 -0
  557. package/build/question/inputs/PermissionGrantInputs.d.ts +18 -0
  558. package/build/question/inputs/PermissionGrantInputs.d.ts.map +1 -0
  559. package/build/question/inputs/PermissionGrantInputs.js +5 -0
  560. package/build/question/inputs/PermissionGrantInputs.js.map +1 -0
  561. package/build/question/inputs/PermissionListInputs.d.ts +16 -0
  562. package/build/question/inputs/PermissionListInputs.d.ts.map +1 -0
  563. package/build/question/inputs/PermissionListInputs.js +5 -0
  564. package/build/question/inputs/PermissionListInputs.js.map +1 -0
  565. package/build/question/inputs/PreviewTeamsAppInputs.d.ts +14 -0
  566. package/build/question/inputs/PreviewTeamsAppInputs.d.ts.map +1 -0
  567. package/build/question/inputs/PreviewTeamsAppInputs.js +5 -0
  568. package/build/question/inputs/PreviewTeamsAppInputs.js.map +1 -0
  569. package/build/question/inputs/SPFxAddWebpartInputs.d.ts +18 -0
  570. package/build/question/inputs/SPFxAddWebpartInputs.d.ts.map +1 -0
  571. package/build/question/inputs/SPFxAddWebpartInputs.js +5 -0
  572. package/build/question/inputs/SPFxAddWebpartInputs.js.map +1 -0
  573. package/build/question/inputs/SelectTeamsManifestInputs.d.ts +12 -0
  574. package/build/question/inputs/SelectTeamsManifestInputs.d.ts.map +1 -0
  575. package/build/question/inputs/SelectTeamsManifestInputs.js +5 -0
  576. package/build/question/inputs/SelectTeamsManifestInputs.js.map +1 -0
  577. package/build/question/inputs/ValidateTeamsAppInputs.d.ts +14 -0
  578. package/build/question/inputs/ValidateTeamsAppInputs.d.ts.map +1 -0
  579. package/build/question/inputs/ValidateTeamsAppInputs.js +5 -0
  580. package/build/question/inputs/ValidateTeamsAppInputs.js.map +1 -0
  581. package/build/question/inputs/index.d.ts +11 -0
  582. package/build/question/inputs/index.d.ts.map +1 -0
  583. package/build/question/inputs/index.js +16 -0
  584. package/build/question/inputs/index.js.map +1 -0
  585. package/build/question/options/CreateEnvOptions.d.ts +10 -0
  586. package/build/question/options/CreateEnvOptions.d.ts.map +1 -0
  587. package/build/question/options/CreateEnvOptions.js +24 -0
  588. package/build/question/options/CreateEnvOptions.js.map +1 -0
  589. package/build/question/options/CreateProjectOptions.d.ts +10 -0
  590. package/build/question/options/CreateProjectOptions.d.ts.map +1 -0
  591. package/build/question/options/CreateProjectOptions.js +134 -0
  592. package/build/question/options/CreateProjectOptions.js.map +1 -0
  593. package/build/question/options/CreateSampleProjectOptions.d.ts +10 -0
  594. package/build/question/options/CreateSampleProjectOptions.d.ts.map +1 -0
  595. package/build/question/options/CreateSampleProjectOptions.js +52 -0
  596. package/build/question/options/CreateSampleProjectOptions.js.map +1 -0
  597. package/build/question/options/DeployAadManifestOptions.d.ts +10 -0
  598. package/build/question/options/DeployAadManifestOptions.d.ts.map +1 -0
  599. package/build/question/options/DeployAadManifestOptions.js +21 -0
  600. package/build/question/options/DeployAadManifestOptions.js.map +1 -0
  601. package/build/question/options/PermissionGrantOptions.d.ts +10 -0
  602. package/build/question/options/PermissionGrantOptions.d.ts.map +1 -0
  603. package/build/question/options/PermissionGrantOptions.js +33 -0
  604. package/build/question/options/PermissionGrantOptions.js.map +1 -0
  605. package/build/question/options/PermissionListOptions.d.ts +10 -0
  606. package/build/question/options/PermissionListOptions.d.ts.map +1 -0
  607. package/build/question/options/PermissionListOptions.js +28 -0
  608. package/build/question/options/PermissionListOptions.js.map +1 -0
  609. package/build/question/options/PreviewTeamsAppOptions.d.ts +10 -0
  610. package/build/question/options/PreviewTeamsAppOptions.d.ts.map +1 -0
  611. package/build/question/options/PreviewTeamsAppOptions.js +26 -0
  612. package/build/question/options/PreviewTeamsAppOptions.js.map +1 -0
  613. package/build/question/options/SPFxAddWebpartOptions.d.ts +10 -0
  614. package/build/question/options/SPFxAddWebpartOptions.d.ts.map +1 -0
  615. package/build/question/options/SPFxAddWebpartOptions.js +39 -0
  616. package/build/question/options/SPFxAddWebpartOptions.js.map +1 -0
  617. package/build/question/options/SelectTeamsManifestOptions.d.ts +10 -0
  618. package/build/question/options/SelectTeamsManifestOptions.d.ts.map +1 -0
  619. package/build/question/options/SelectTeamsManifestOptions.js +17 -0
  620. package/build/question/options/SelectTeamsManifestOptions.js.map +1 -0
  621. package/build/question/options/ValidateTeamsAppOptions.d.ts +10 -0
  622. package/build/question/options/ValidateTeamsAppOptions.d.ts.map +1 -0
  623. package/build/question/options/ValidateTeamsAppOptions.js +23 -0
  624. package/build/question/options/ValidateTeamsAppOptions.js.map +1 -0
  625. package/build/question/options/index.d.ts +11 -0
  626. package/build/question/options/index.d.ts.map +1 -0
  627. package/build/question/options/index.js +16 -0
  628. package/build/question/options/index.js.map +1 -0
  629. package/build/question/other.d.ts +12 -1
  630. package/build/question/other.d.ts.map +1 -1
  631. package/build/question/other.js +133 -35
  632. package/build/question/other.js.map +1 -1
  633. package/build/question/questionNames.d.ts +6 -2
  634. package/build/question/questionNames.d.ts.map +1 -1
  635. package/build/question/questionNames.js +8 -3
  636. package/build/question/questionNames.js.map +1 -1
  637. package/build/ui/validationUtils.d.ts +31 -0
  638. package/build/ui/validationUtils.d.ts.map +1 -0
  639. package/build/ui/validationUtils.js +297 -0
  640. package/build/ui/validationUtils.js.map +1 -0
  641. package/build/ui/visitor.d.ts +13 -1
  642. package/build/ui/visitor.d.ts.map +1 -1
  643. package/build/ui/visitor.js +262 -234
  644. package/build/ui/visitor.js.map +1 -1
  645. package/package.json +19 -12
  646. package/resource/package.nls.cs.json +83 -23
  647. package/resource/package.nls.de.json +81 -21
  648. package/resource/package.nls.es.json +83 -23
  649. package/resource/package.nls.fr.json +82 -22
  650. package/resource/package.nls.it.json +82 -22
  651. package/resource/package.nls.ja.json +83 -23
  652. package/resource/package.nls.json +71 -21
  653. package/resource/package.nls.ko.json +82 -22
  654. package/resource/package.nls.pl.json +83 -23
  655. package/resource/package.nls.pt-BR.json +84 -24
  656. package/resource/package.nls.ru.json +84 -24
  657. package/resource/package.nls.tr.json +82 -22
  658. package/resource/package.nls.zh-Hans.json +82 -22
  659. package/resource/package.nls.zh-Hant.json +82 -22
  660. package/resource/package.nls.zh-cn.json +82 -22
  661. package/resource/package.nls.zh-tw.json +82 -22
  662. package/resource/yaml-schema/{1.1.1 → v1.2}/yaml.schema.json +11 -5
  663. package/resource/yaml-schema/v1.3/yaml.schema.json +1500 -0
  664. package/templates/fallback/common.zip +0 -0
  665. package/templates/fallback/csharp.zip +0 -0
  666. package/templates/fallback/js.zip +0 -0
  667. package/templates/fallback/ts.zip +0 -0
  668. package/templates/plugins/resource/aad/auth/V3/Tab/GetUserProfile.razor +1 -2
  669. package/templates/plugins/resource/aad/auth/bot/README.md +281 -263
  670. package/templates/plugins/resource/aad/auth/bot/js/sso/handleMessageExtensionQueryWithToken.js +13 -3
  671. package/templates/plugins/resource/aad/auth/bot/js/sso/profileSsoCommandHandler.js +14 -5
  672. package/templates/plugins/resource/aad/auth/bot/ts/sso/handleMessageExtensionQueryWithToken.ts +11 -3
  673. package/templates/plugins/resource/aad/auth/bot/ts/sso/profileSsoCommandHandler.ts +12 -3
  674. package/templates/plugins/resource/aad/auth/tab/csharp/GetUserProfile.razor +1 -2
  675. package/build/common/samples-config-v3.json +0 -233
  676. package/build/component/driver/middleware/updateProgress.d.ts +0 -6
  677. package/build/component/driver/middleware/updateProgress.d.ts.map +0 -1
  678. package/build/component/driver/middleware/updateProgress.js +0 -15
  679. package/build/component/driver/middleware/updateProgress.js.map +0 -1
  680. package/build/core/FxCoreImplementV3.d.ts +0 -47
  681. package/build/core/FxCoreImplementV3.d.ts.map +0 -1
  682. package/build/core/FxCoreImplementV3.js +0 -690
  683. package/build/core/FxCoreImplementV3.js.map +0 -1
@@ -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.createProjectCliHelpNode = exports.createProjectQuestionNode = exports.apiOperationQuestion = exports.openAIPluginManifestLocationQuestion = exports.apiSpecLocationQuestion = exports.RuntimeOptions = exports.appNameQuestion = exports.AppNamePattern = exports.programmingLanguageQuestion = exports.ProgrammingLanguage = exports.getLanguageOptions = exports.getTemplate = exports.SPFxImportFolderQuestion = exports.SPFxVersionOptionIds = exports.SPFxWebpartNameQuestion = exports.SPFxPackageSelectQuestion = exports.NotificationTriggerOptions = exports.CapabilityOptions = exports.ProjectTypeOptions = exports.ScratchOptions = void 0;
5
+ exports.createProjectCliHelpNode = exports.createSampleProjectQuestionNode = exports.createProjectQuestionNode = exports.capabilitySubTree = exports.apiOperationQuestion = exports.openAIPluginManifestLocationQuestion = exports.apiSpecLocationQuestion = exports.RuntimeOptions = exports.appNameQuestion = exports.AppNamePattern = exports.folderQuestion = exports.programmingLanguageQuestion = exports.ProgrammingLanguage = exports.getLanguageOptions = exports.officeAddinHostingQuestion = exports.getTemplate = exports.SPFxImportFolderQuestion = exports.SPFxVersionOptionIds = exports.SPFxWebpartNameQuestion = exports.SPFxPackageSelectQuestion = exports.NotificationTriggerOptions = exports.capabilityQuestion = exports.CapabilityOptions = exports.ProjectTypeOptions = exports.ScratchOptions = void 0;
6
6
  const tslib_1 = require("tslib");
7
7
  const teamsfx_api_1 = require("@microsoft/teamsfx-api");
8
8
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
@@ -16,7 +16,6 @@ const localizeUtils_1 = require("../common/localizeUtils");
16
16
  const samples_1 = require("../common/samples");
17
17
  const utils_1 = require("../common/utils");
18
18
  const developerPortalScaffoldUtils_1 = require("../component/developerPortalScaffoldUtils");
19
- const ManifestUtils_1 = require("../component/driver/teamsApp/utils/ManifestUtils");
20
19
  const utils_2 = require("../component/driver/teamsApp/utils/utils");
21
20
  const helper_1 = require("../component/generator/copilotPlugin/helper");
22
21
  const projectsJsonData_1 = tslib_1.__importDefault(require("../component/generator/officeAddin/config/projectsJsonData"));
@@ -28,6 +27,7 @@ const utils_4 = require("../component/utils");
28
27
  const error_2 = require("../error");
29
28
  const questionNames_1 = require("./questionNames");
30
29
  const util_1 = require("./util");
30
+ const constants_3 = require("./constants");
31
31
  class ScratchOptions {
32
32
  static yes() {
33
33
  return {
@@ -49,62 +49,49 @@ class ScratchOptions {
49
49
  }
50
50
  exports.ScratchOptions = ScratchOptions;
51
51
  class ProjectTypeOptions {
52
- static tab() {
52
+ static tab(platform) {
53
53
  return {
54
54
  id: "tab-type",
55
- label: `$(browser) ${localizeUtils_1.getLocalizedString("core.TabOption.label")}`,
55
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(browser) " : ""}${localizeUtils_1.getLocalizedString("core.TabOption.label")}`,
56
56
  detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.tab.detail"),
57
57
  };
58
58
  }
59
- static bot() {
59
+ static bot(platform) {
60
60
  return {
61
61
  id: "bot-type",
62
- label: `$(hubot) ${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.bot.label")}`,
62
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(hubot) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.bot.label")}`,
63
63
  detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.bot.detail"),
64
64
  };
65
65
  }
66
- static me() {
66
+ static me(platform) {
67
67
  return {
68
68
  id: "me-type",
69
- label: `$(symbol-keyword) ${localizeUtils_1.getLocalizedString("core.MessageExtensionOption.label")}`,
69
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(symbol-keyword) " : ""}${localizeUtils_1.getLocalizedString("core.MessageExtensionOption.label")}`,
70
70
  detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.messageExtension.detail"),
71
71
  };
72
72
  }
73
- static outlookAddin() {
73
+ static outlookAddin(platform) {
74
74
  return {
75
75
  id: "outlook-addin-type",
76
- label: `$(mail) ${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.label")}`,
76
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(mail) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.label")}`,
77
77
  detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.detail"),
78
78
  };
79
79
  }
80
- static copilotPlugin() {
80
+ static copilotPlugin(platform) {
81
81
  return {
82
82
  id: "copilot-plugin-type",
83
- label: `$(sparkle) ${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.label")}`,
83
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(sparkle) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.label")}`,
84
84
  detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.detail"),
85
85
  };
86
86
  }
87
87
  }
88
88
  exports.ProjectTypeOptions = ProjectTypeOptions;
89
- function scratchOrSampleQuestion() {
90
- const staticOptions = ScratchOptions.all();
91
- return {
92
- type: "singleSelect",
93
- name: questionNames_1.QuestionNames.Scratch,
94
- title: localizeUtils_1.getLocalizedString("core.getCreateNewOrFromSampleQuestion.title"),
95
- staticOptions,
96
- default: ScratchOptions.yes().id,
97
- placeholder: localizeUtils_1.getLocalizedString("core.getCreateNewOrFromSampleQuestion.placeholder"),
98
- skipSingleOption: true,
99
- forgetLastValue: true,
100
- };
101
- }
102
89
  function projectTypeQuestion() {
103
90
  const staticOptions = [
104
- ProjectTypeOptions.bot(),
105
- ProjectTypeOptions.tab(),
106
- ProjectTypeOptions.me(),
107
- ProjectTypeOptions.outlookAddin(),
91
+ ProjectTypeOptions.bot(teamsfx_api_1.Platform.CLI),
92
+ ProjectTypeOptions.tab(teamsfx_api_1.Platform.CLI),
93
+ ProjectTypeOptions.me(teamsfx_api_1.Platform.CLI),
94
+ ProjectTypeOptions.outlookAddin(teamsfx_api_1.Platform.CLI),
108
95
  ];
109
96
  return {
110
97
  name: questionNames_1.QuestionNames.ProjectType,
@@ -114,29 +101,29 @@ function projectTypeQuestion() {
114
101
  dynamicOptions: (inputs) => {
115
102
  var _a;
116
103
  let staticOptions;
117
- if (featureFlags_1.isCopilotPluginEnabled()) {
104
+ if (featureFlags_1.isApiCopilotPluginEnabled()) {
118
105
  staticOptions = [
119
- ProjectTypeOptions.copilotPlugin(),
120
- ProjectTypeOptions.bot(),
121
- ProjectTypeOptions.tab(),
122
- ProjectTypeOptions.me(),
106
+ ProjectTypeOptions.copilotPlugin(inputs.platform),
107
+ ProjectTypeOptions.bot(inputs.platform),
108
+ ProjectTypeOptions.tab(inputs.platform),
109
+ ProjectTypeOptions.me(inputs.platform),
123
110
  ];
124
111
  }
125
112
  else {
126
113
  staticOptions = [
127
- ProjectTypeOptions.bot(),
128
- ProjectTypeOptions.tab(),
129
- ProjectTypeOptions.me(),
114
+ ProjectTypeOptions.bot(inputs.platform),
115
+ ProjectTypeOptions.tab(inputs.platform),
116
+ ProjectTypeOptions.me(inputs.platform),
130
117
  ];
131
118
  }
132
119
  if (developerPortalScaffoldUtils_1.isFromDevPortal(inputs)) {
133
- const projectType = (_a = developerPortalScaffoldUtils_1.getTemplateId(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.projectType;
120
+ const projectType = (_a = developerPortalScaffoldUtils_1.getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.projectType;
134
121
  if (projectType) {
135
122
  return [projectType];
136
123
  }
137
124
  }
138
125
  else {
139
- staticOptions.push(ProjectTypeOptions.outlookAddin());
126
+ staticOptions.push(ProjectTypeOptions.outlookAddin(inputs.platform));
140
127
  }
141
128
  return staticOptions;
142
129
  },
@@ -149,18 +136,16 @@ class CapabilityOptions {
149
136
  // bot
150
137
  static basicBot() {
151
138
  return {
152
- id: "Bot",
139
+ id: "bot",
153
140
  label: `${localizeUtils_1.getLocalizedString("core.BotNewUIOption.label")}`,
154
- cliName: "bot",
155
141
  detail: localizeUtils_1.getLocalizedString("core.BotNewUIOption.detail"),
156
142
  };
157
143
  }
158
144
  static notificationBot() {
159
145
  return {
160
146
  // For default option, id and cliName must be the same
161
- id: "Notification",
147
+ id: "notification",
162
148
  label: `${localizeUtils_1.getLocalizedString("core.NotificationOption.label")}`,
163
- cliName: "notification",
164
149
  detail: localizeUtils_1.getLocalizedString("core.NotificationOption.detail"),
165
150
  data: "https://aka.ms/teamsfx-send-notification",
166
151
  buttons: [
@@ -177,7 +162,6 @@ class CapabilityOptions {
177
162
  // id must match cli `yargsHelp`
178
163
  id: "command-bot",
179
164
  label: `${localizeUtils_1.getLocalizedString("core.CommandAndResponseOption.label")}`,
180
- cliName: "command-bot",
181
165
  detail: localizeUtils_1.getLocalizedString("core.CommandAndResponseOption.detail"),
182
166
  data: "https://aka.ms/teamsfx-create-command",
183
167
  buttons: [
@@ -194,7 +178,6 @@ class CapabilityOptions {
194
178
  // id must match cli `yargsHelp`
195
179
  id: "workflow-bot",
196
180
  label: `${localizeUtils_1.getLocalizedString("core.WorkflowOption.label")}`,
197
- cliName: "workflow-bot",
198
181
  detail: localizeUtils_1.getLocalizedString("core.WorkflowOption.detail"),
199
182
  data: "https://aka.ms/teamsfx-create-workflow",
200
183
  buttons: [
@@ -220,27 +203,24 @@ class CapabilityOptions {
220
203
  //tab
221
204
  static nonSsoTab() {
222
205
  return {
223
- id: "TabNonSso",
206
+ id: "tab-non-sso",
224
207
  label: `${localizeUtils_1.getLocalizedString("core.TabNonSso.label")}`,
225
- cliName: "tab-non-sso",
226
208
  detail: localizeUtils_1.getLocalizedString("core.TabNonSso.detail"),
227
209
  description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
228
210
  };
229
211
  }
230
212
  static tab() {
231
213
  return {
232
- id: "Tab",
214
+ id: "tab",
233
215
  label: localizeUtils_1.getLocalizedString("core.TabOption.label"),
234
- cliName: "tab",
235
216
  description: localizeUtils_1.getLocalizedString("core.TabOption.description"),
236
217
  detail: localizeUtils_1.getLocalizedString("core.TabOption.detail"),
237
218
  };
238
219
  }
239
220
  static m365SsoLaunchPage() {
240
221
  return {
241
- id: "M365SsoLaunchPage",
222
+ id: "sso-launch-page",
242
223
  label: `${localizeUtils_1.getLocalizedString("core.M365SsoLaunchPageOptionItem.label")}`,
243
- cliName: "sso-launch-page",
244
224
  detail: localizeUtils_1.getLocalizedString("core.M365SsoLaunchPageOptionItem.detail"),
245
225
  description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
246
226
  };
@@ -249,7 +229,6 @@ class CapabilityOptions {
249
229
  return {
250
230
  id: "dashboard-tab",
251
231
  label: `${localizeUtils_1.getLocalizedString("core.DashboardOption.label")}`,
252
- cliName: "dashboard-tab",
253
232
  detail: localizeUtils_1.getLocalizedString("core.DashboardOption.detail"),
254
233
  description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
255
234
  data: "https://aka.ms/teamsfx-dashboard-app",
@@ -264,9 +243,8 @@ class CapabilityOptions {
264
243
  }
265
244
  static SPFxTab() {
266
245
  return {
267
- id: "TabSPFx",
246
+ id: "tab-spfx",
268
247
  label: localizeUtils_1.getLocalizedString("core.TabSPFxOption.labelNew"),
269
- cliName: "tab-spfx",
270
248
  description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
271
249
  detail: localizeUtils_1.getLocalizedString("core.TabSPFxOption.detailNew"),
272
250
  };
@@ -274,46 +252,66 @@ class CapabilityOptions {
274
252
  //message extension
275
253
  static linkUnfurling() {
276
254
  return {
277
- id: "LinkUnfurling",
255
+ id: "link-unfurling",
278
256
  label: `${localizeUtils_1.getLocalizedString("core.LinkUnfurlingOption.label")}`,
279
- cliName: "link-unfurling",
280
257
  detail: localizeUtils_1.getLocalizedString("core.LinkUnfurlingOption.detail"),
281
258
  description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlook"),
282
259
  };
283
260
  }
284
261
  static m365SearchMe() {
285
262
  return {
286
- id: "M365SearchApp",
263
+ id: "search-app",
287
264
  label: `${localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.label")}`,
288
- cliName: "search-app",
289
265
  detail: localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.detail"),
290
266
  description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlook"),
291
267
  };
292
268
  }
269
+ static copilotM365SearchMe() {
270
+ return {
271
+ id: "search-me-copilot",
272
+ label: `${localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.label")}`,
273
+ detail: localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.detail"),
274
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookCopilot"),
275
+ };
276
+ }
277
+ static SearchMe() {
278
+ return {
279
+ id: "search-message-extension",
280
+ label: `${localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.label")}`,
281
+ detail: localizeUtils_1.getLocalizedString("core.SearchAppOptionItem.detail"),
282
+ };
283
+ }
293
284
  static collectFormMe() {
294
285
  return {
295
- id: "MessagingExtension",
286
+ id: "collect-form-message-extension",
296
287
  label: `${localizeUtils_1.getLocalizedString("core.MessageExtensionOption.labelNew")}`,
297
- cliName: "message-extension",
298
288
  detail: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.detail"),
299
289
  };
300
290
  }
301
291
  static me() {
302
292
  return {
303
- id: "MessagingExtension",
293
+ id: "message-extension",
304
294
  label: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.label"),
305
- cliName: "message-extension",
306
295
  description: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.description"),
307
296
  detail: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.detail"),
308
297
  };
309
298
  }
310
299
  static bots(inputs) {
311
- return [
312
- CapabilityOptions.basicBot(),
313
- CapabilityOptions.notificationBot(),
314
- CapabilityOptions.commandBot(),
315
- CapabilityOptions.workflowBot(inputs),
316
- ];
300
+ return inputs !== undefined && getRuntime(inputs) === RuntimeOptions.DotNet().id
301
+ ? // currently no ai bot for dotnet
302
+ [
303
+ CapabilityOptions.basicBot(),
304
+ CapabilityOptions.notificationBot(),
305
+ CapabilityOptions.commandBot(),
306
+ CapabilityOptions.workflowBot(inputs),
307
+ ]
308
+ : [
309
+ CapabilityOptions.basicBot(),
310
+ CapabilityOptions.aiBot(),
311
+ CapabilityOptions.notificationBot(),
312
+ CapabilityOptions.commandBot(),
313
+ CapabilityOptions.workflowBot(inputs),
314
+ ];
317
315
  }
318
316
  static tabs() {
319
317
  return [
@@ -323,21 +321,52 @@ class CapabilityOptions {
323
321
  CapabilityOptions.SPFxTab(),
324
322
  ];
325
323
  }
326
- static dotnetCaps() {
324
+ static dotnetCaps(inputs) {
327
325
  return [
328
- CapabilityOptions.notificationBot(),
329
- CapabilityOptions.commandBot(),
326
+ ...CapabilityOptions.copilotPlugins(),
327
+ ...CapabilityOptions.bots(inputs),
330
328
  CapabilityOptions.nonSsoTab(),
331
329
  CapabilityOptions.tab(),
332
- CapabilityOptions.me(),
330
+ ...CapabilityOptions.mes(inputs),
333
331
  ];
334
332
  }
335
- static mes() {
336
- return [
337
- CapabilityOptions.linkUnfurling(),
338
- CapabilityOptions.m365SearchMe(),
339
- CapabilityOptions.collectFormMe(),
340
- ];
333
+ /**
334
+ * Collect all capabilities for message extension, including dotnet and nodejs.
335
+ * @param filterByFeatureFlag true: filter capabilities by feature flag, false: return all capabilities
336
+ * @returns OptionItem[] capability list
337
+ */
338
+ static collectMECaps(filterByFeatureFlag) {
339
+ return filterByFeatureFlag
340
+ ? [
341
+ CapabilityOptions.linkUnfurling(),
342
+ featureFlags_1.isCopilotPluginEnabled()
343
+ ? CapabilityOptions.copilotM365SearchMe()
344
+ : CapabilityOptions.m365SearchMe(),
345
+ CapabilityOptions.collectFormMe(),
346
+ CapabilityOptions.SearchMe(),
347
+ ]
348
+ : [
349
+ CapabilityOptions.linkUnfurling(),
350
+ CapabilityOptions.m365SearchMe(),
351
+ CapabilityOptions.collectFormMe(),
352
+ CapabilityOptions.copilotM365SearchMe(),
353
+ CapabilityOptions.SearchMe(),
354
+ ];
355
+ }
356
+ static mes(inputs) {
357
+ return inputs !== undefined && getRuntime(inputs) === RuntimeOptions.DotNet().id
358
+ ? [
359
+ CapabilityOptions.linkUnfurling(),
360
+ CapabilityOptions.SearchMe(),
361
+ CapabilityOptions.collectFormMe(),
362
+ ]
363
+ : [
364
+ CapabilityOptions.linkUnfurling(),
365
+ featureFlags_1.isCopilotPluginEnabled()
366
+ ? CapabilityOptions.copilotM365SearchMe()
367
+ : CapabilityOptions.m365SearchMe(),
368
+ CapabilityOptions.collectFormMe(),
369
+ ];
341
370
  }
342
371
  static copilotPlugins() {
343
372
  return [
@@ -346,22 +375,36 @@ class CapabilityOptions {
346
375
  CapabilityOptions.copilotPluginOpenAIPlugin(),
347
376
  ];
348
377
  }
378
+ /**
379
+ * static capability list, which does not depend on any feature flags
380
+ */
381
+ static staticAll(inputs) {
382
+ const capabilityOptions = [
383
+ ...CapabilityOptions.bots(inputs),
384
+ ...CapabilityOptions.tabs(),
385
+ ...CapabilityOptions.collectMECaps(false),
386
+ ...CapabilityOptions.copilotPlugins(),
387
+ ];
388
+ return capabilityOptions;
389
+ }
390
+ /**
391
+ * dynamic capability list, which depends on feature flags
392
+ */
349
393
  static all(inputs) {
350
394
  const capabilityOptions = [
351
395
  ...CapabilityOptions.bots(inputs),
352
396
  ...CapabilityOptions.tabs(),
353
- ...CapabilityOptions.mes(),
397
+ ...CapabilityOptions.collectMECaps(true),
354
398
  ];
355
- if (featureFlags_1.isCopilotPluginEnabled()) {
399
+ if (featureFlags_1.isApiCopilotPluginEnabled()) {
356
400
  capabilityOptions.push(...CapabilityOptions.copilotPlugins());
357
401
  }
358
402
  return capabilityOptions;
359
403
  }
360
404
  static officeAddinImport() {
361
405
  return {
362
- id: "import-addin-project",
406
+ id: "import",
363
407
  label: localizeUtils_1.getLocalizedString("core.importAddin.label"),
364
- cliName: "import",
365
408
  detail: localizeUtils_1.getLocalizedString("core.importAddin.detail"),
366
409
  description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
367
410
  };
@@ -389,25 +432,32 @@ class CapabilityOptions {
389
432
  // copilot plugin
390
433
  static copilotPluginNewApi() {
391
434
  return {
392
- id: "copilot-new-api",
435
+ id: constants_3.copilotPluginNewApiOptionId,
393
436
  label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.label"),
394
437
  detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.detail"),
395
438
  };
396
439
  }
397
440
  static copilotPluginApiSpec() {
398
441
  return {
399
- id: "copilot-api-spec",
442
+ id: constants_3.copilotPluginApiSpecOptionId,
400
443
  label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.label"),
401
444
  detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.detail"),
402
445
  };
403
446
  }
404
447
  static copilotPluginOpenAIPlugin() {
405
448
  return {
406
- id: "copilot-ai-plugin",
449
+ id: constants_3.copilotPluginOpenAIPluginOptionId,
407
450
  label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginAIPluginOption.label"),
408
451
  detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginAIPluginOption.detail"),
409
452
  };
410
453
  }
454
+ static aiBot() {
455
+ return {
456
+ id: "ai-bot",
457
+ label: localizeUtils_1.getLocalizedString("core.aiBotOption.label"),
458
+ detail: localizeUtils_1.getLocalizedString("core.aiBotOption.detail"),
459
+ };
460
+ }
411
461
  }
412
462
  exports.CapabilityOptions = CapabilityOptions;
413
463
  function capabilityQuestion() {
@@ -430,20 +480,28 @@ function capabilityQuestion() {
430
480
  return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.titleNew");
431
481
  }
432
482
  },
483
+ cliDescription: "Specifies the Microsoft Teams App capability.",
484
+ cliName: questionNames_1.CliQuestionName.Capability,
485
+ cliShortName: "c",
486
+ cliChoiceListCommand: "teamsfx list templates",
433
487
  type: "singleSelect",
434
- staticOptions: CapabilityOptions.all(),
488
+ staticOptions: CapabilityOptions.staticAll(),
435
489
  dynamicOptions: (inputs) => {
436
490
  var _a;
437
491
  // from dev portal
438
492
  if (developerPortalScaffoldUtils_1.isFromDevPortal(inputs)) {
439
- const capability = (_a = developerPortalScaffoldUtils_1.getTemplateId(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.templateId;
493
+ const capability = (_a = developerPortalScaffoldUtils_1.getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.templateId;
440
494
  if (capability) {
441
495
  return [capability];
442
496
  }
443
497
  }
444
498
  // dotnet capabilities
445
499
  if (getRuntime(inputs) === RuntimeOptions.DotNet().id) {
446
- return CapabilityOptions.dotnetCaps();
500
+ return CapabilityOptions.dotnetCaps(inputs);
501
+ }
502
+ if (inputs.nonInteractive && inputs.platform === teamsfx_api_1.Platform.CLI) {
503
+ //cli non-interactive mode the choice list is the same as staticOptions
504
+ return CapabilityOptions.all(inputs);
447
505
  }
448
506
  // nodejs capabilities
449
507
  const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
@@ -463,15 +521,7 @@ function capabilityQuestion() {
463
521
  return CapabilityOptions.copilotPlugins();
464
522
  }
465
523
  else {
466
- const capabilityOptions = [
467
- ...CapabilityOptions.bots(inputs),
468
- ...CapabilityOptions.tabs(),
469
- ...CapabilityOptions.mes(),
470
- ];
471
- if (featureFlags_1.isCopilotPluginEnabled()) {
472
- capabilityOptions.push(...CapabilityOptions.copilotPlugins());
473
- }
474
- return capabilityOptions;
524
+ return CapabilityOptions.all(inputs);
475
525
  }
476
526
  },
477
527
  placeholder: (inputs) => {
@@ -484,6 +534,7 @@ function capabilityQuestion() {
484
534
  skipSingleOption: true,
485
535
  };
486
536
  }
537
+ exports.capabilityQuestion = capabilityQuestion;
487
538
  var HostType;
488
539
  (function (HostType) {
489
540
  HostType["AppService"] = "app-service";
@@ -499,7 +550,6 @@ class NotificationTriggerOptions {
499
550
  id: "http-restify",
500
551
  hostType: HostType.AppService,
501
552
  label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.label"),
502
- cliName: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.cliName"),
503
553
  description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.description"),
504
554
  detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.detail"),
505
555
  };
@@ -509,7 +559,6 @@ class NotificationTriggerOptions {
509
559
  id: "http-webapi",
510
560
  hostType: HostType.AppService,
511
561
  label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.label"),
512
- cliName: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.cliName"),
513
562
  description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.description"),
514
563
  detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.detail"),
515
564
  };
@@ -521,7 +570,6 @@ class NotificationTriggerOptions {
521
570
  hostType: HostType.Functions,
522
571
  triggers: [NotificationTriggers.TIMER],
523
572
  label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.label"),
524
- cliName: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.cliName"),
525
573
  description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.description"),
526
574
  detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.detail"),
527
575
  };
@@ -532,7 +580,6 @@ class NotificationTriggerOptions {
532
580
  hostType: HostType.Functions,
533
581
  triggers: [NotificationTriggers.HTTP, NotificationTriggers.TIMER],
534
582
  label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.label"),
535
- cliName: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.cliName"),
536
583
  description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.description"),
537
584
  detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.detail"),
538
585
  };
@@ -543,7 +590,6 @@ class NotificationTriggerOptions {
543
590
  hostType: HostType.Functions,
544
591
  triggers: [NotificationTriggers.HTTP],
545
592
  label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.label"),
546
- cliName: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.cliName"),
547
593
  description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.description"),
548
594
  detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.detail"),
549
595
  };
@@ -582,6 +628,8 @@ function botTriggerQuestion() {
582
628
  return {
583
629
  name: questionNames_1.QuestionNames.BotTrigger,
584
630
  title: localizeUtils_1.getLocalizedString("plugins.bot.questionHostTypeTrigger.title"),
631
+ cliDescription: "Specifies the trigger for `Chat Notification Message` app template.",
632
+ cliShortName: "t",
585
633
  type: "singleSelect",
586
634
  staticOptions: NotificationTriggerOptions.all(),
587
635
  dynamicOptions: (inputs) => {
@@ -607,6 +655,8 @@ function SPFxSolutionQuestion() {
607
655
  type: "singleSelect",
608
656
  name: questionNames_1.QuestionNames.SPFxSolution,
609
657
  title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.title"),
658
+ cliDescription: "Create a new or import an existing SharePoint Framework solution.",
659
+ cliShortName: "s",
610
660
  staticOptions: [
611
661
  {
612
662
  id: "new",
@@ -627,6 +677,7 @@ function SPFxPackageSelectQuestion() {
627
677
  type: "singleSelect",
628
678
  name: questionNames_1.QuestionNames.SPFxInstallPackage,
629
679
  title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.title"),
680
+ cliDescription: "Install the latest version of SharePoint Framework.",
630
681
  staticOptions: [],
631
682
  placeholder: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.placeholder"),
632
683
  dynamicOptions: async (inputs) => {
@@ -656,18 +707,19 @@ function SPFxPackageSelectQuestion() {
656
707
  },
657
708
  default: SPFxVersionOptionIds.installLocally,
658
709
  validation: {
659
- validFunc: async (input, previousInputs) => {
710
+ validFunc: (input, previousInputs) => {
660
711
  if (input === SPFxVersionOptionIds.globalPackage) {
661
712
  const hasPackagesInstalled = !!previousInputs &&
662
713
  !!previousInputs.globalSpfxPackageVersion &&
663
714
  !!previousInputs.globalYeomanPackageVersion;
664
715
  if (!hasPackagesInstalled) {
665
- throw error_1.DevEnvironmentSetupError();
716
+ return Promise.reject(error_1.DevEnvironmentSetupError());
666
717
  }
667
718
  }
668
- return undefined;
719
+ return Promise.resolve(undefined);
669
720
  },
670
721
  },
722
+ isBoolean: true,
671
723
  };
672
724
  }
673
725
  exports.SPFxPackageSelectQuestion = SPFxPackageSelectQuestion;
@@ -675,6 +727,8 @@ function SPFxFrameworkQuestion() {
675
727
  return {
676
728
  type: "singleSelect",
677
729
  name: questionNames_1.QuestionNames.SPFxFramework,
730
+ cliShortName: "k",
731
+ cliDescription: "Framework.",
678
732
  title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.framework.title"),
679
733
  staticOptions: [
680
734
  { id: "react", label: "React" },
@@ -689,7 +743,9 @@ function SPFxWebpartNameQuestion() {
689
743
  return {
690
744
  type: "text",
691
745
  name: questionNames_1.QuestionNames.SPFxWebpartName,
692
- title: "Web Part Name",
746
+ cliShortName: "w",
747
+ cliDescription: "Name for SharePoint Framework Web Part.",
748
+ title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.webpartName"),
693
749
  default: constants_2.Constants.DEFAULT_WEBPART_NAME,
694
750
  validation: {
695
751
  validFunc: async (input, previousInputs) => {
@@ -725,6 +781,7 @@ function SPFxImportFolderQuestion(hasDefaultFunc = false) {
725
781
  type: "folder",
726
782
  name: questionNames_1.QuestionNames.SPFxFolder,
727
783
  title: localizeUtils_1.getLocalizedString("core.spfxFolder.title"),
784
+ cliDescription: "Directory or Path that contains the existing SharePoint Framework solution.",
728
785
  placeholder: localizeUtils_1.getLocalizedString("core.spfxFolder.placeholder"),
729
786
  default: hasDefaultFunc
730
787
  ? (inputs) => {
@@ -740,7 +797,7 @@ const getTemplate = (inputs) => {
740
797
  const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
741
798
  const templates = officeAddinJsonData.getProjectTemplateNames();
742
799
  const foundTemplate = templates.find((template) => {
743
- return capabilities.includes(template);
800
+ return capabilities && capabilities.includes(template);
744
801
  });
745
802
  return foundTemplate !== null && foundTemplate !== void 0 ? foundTemplate : "";
746
803
  };
@@ -751,7 +808,7 @@ function officeAddinHostingQuestion() {
751
808
  name: questionNames_1.QuestionNames.OfficeAddinHost,
752
809
  title: "Add-in Host",
753
810
  staticOptions: [],
754
- dynamicOptions: async (inputs) => {
811
+ dynamicOptions: (inputs) => {
755
812
  const template = exports.getTemplate(inputs);
756
813
  const getHostTemplateNames = officeAddinJsonData.getHostTemplateNames(template);
757
814
  const options = getHostTemplateNames.map((host) => ({
@@ -760,7 +817,7 @@ function officeAddinHostingQuestion() {
760
817
  }));
761
818
  return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
762
819
  },
763
- default: async (inputs) => {
820
+ default: (inputs) => {
764
821
  const template = exports.getTemplate(inputs);
765
822
  const options = officeAddinJsonData.getHostTemplateNames(template);
766
823
  return options[0] || "No Options";
@@ -769,6 +826,7 @@ function officeAddinHostingQuestion() {
769
826
  };
770
827
  return OfficeHostQuestion;
771
828
  }
829
+ exports.officeAddinHostingQuestion = officeAddinHostingQuestion;
772
830
  const officeAddinJsonData = new projectsJsonData_1.default();
773
831
  function getLanguageOptions(inputs) {
774
832
  const runtime = getRuntime(inputs);
@@ -805,7 +863,8 @@ var ProgrammingLanguage;
805
863
  function programmingLanguageQuestion() {
806
864
  const programmingLanguageQuestion = {
807
865
  name: questionNames_1.QuestionNames.ProgrammingLanguage,
808
- title: "Programming Language",
866
+ cliShortName: "l",
867
+ title: "Programming Language.",
809
868
  type: "singleSelect",
810
869
  staticOptions: [
811
870
  { id: ProgrammingLanguage.JS, label: "JavaScript" },
@@ -842,21 +901,30 @@ function programmingLanguageQuestion() {
842
901
  return programmingLanguageQuestion;
843
902
  }
844
903
  exports.programmingLanguageQuestion = programmingLanguageQuestion;
845
- function rootFolderQuestion() {
904
+ function folderQuestion() {
846
905
  return {
847
906
  type: "folder",
848
907
  name: questionNames_1.QuestionNames.Folder,
849
- title: localizeUtils_1.getLocalizedString("core.question.workspaceFolder.title"),
908
+ cliShortName: "f",
909
+ title: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
910
+ ? "Directory where the project folder will be created in"
911
+ : localizeUtils_1.getLocalizedString("core.question.workspaceFolder.title"),
912
+ cliDescription: "Directory where the project folder will be created in.",
850
913
  placeholder: localizeUtils_1.getLocalizedString("core.question.workspaceFolder.placeholder"),
851
- default: path.join(os.homedir(), constants_1.ConstantString.RootFolder),
914
+ default: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
915
+ ? "./"
916
+ : path.join(os.homedir(), constants_1.ConstantString.RootFolder),
852
917
  };
853
918
  }
919
+ exports.folderQuestion = folderQuestion;
854
920
  exports.AppNamePattern = '^(?=(.*[\\da-zA-Z]){2})[a-zA-Z][^"<>:\\?/*&|\u0000-\u001F]*[^"\\s.<>:\\?/*&|\u0000-\u001F]$';
855
921
  function appNameQuestion() {
856
922
  const question = {
857
923
  type: "text",
858
924
  name: questionNames_1.QuestionNames.AppName,
925
+ cliShortName: "n",
859
926
  title: "Application name",
927
+ required: true,
860
928
  default: async (inputs) => {
861
929
  var _a, _b;
862
930
  let defaultName = undefined;
@@ -908,6 +976,11 @@ function sampleSelectQuestion() {
908
976
  return {
909
977
  type: "singleSelect",
910
978
  name: questionNames_1.QuestionNames.Samples,
979
+ cliName: "sample-name",
980
+ cliDescription: "Specifies the Microsoft Teams App sample name.",
981
+ cliChoiceListCommand: "teamsfx list samples",
982
+ skipValidation: true,
983
+ cliType: "argument",
911
984
  title: localizeUtils_1.getLocalizedString("core.SampleSelect.title"),
912
985
  staticOptions: samples_1.sampleProvider.SampleCollection.samples.map((sample) => {
913
986
  return {
@@ -917,6 +990,17 @@ function sampleSelectQuestion() {
917
990
  detail: sample.shortDescription,
918
991
  };
919
992
  }),
993
+ dynamicOptions: async () => {
994
+ await samples_1.sampleProvider.fetchSampleConfig();
995
+ return samples_1.sampleProvider.SampleCollection.samples.map((sample) => {
996
+ return {
997
+ id: sample.id,
998
+ label: sample.title,
999
+ description: `${sample.time} • ${sample.configuration}`,
1000
+ detail: sample.shortDescription,
1001
+ };
1002
+ });
1003
+ },
920
1004
  placeholder: localizeUtils_1.getLocalizedString("core.SampleSelect.placeholder"),
921
1005
  buttons: [
922
1006
  {
@@ -952,6 +1036,7 @@ function runtimeQuestion() {
952
1036
  staticOptions: [RuntimeOptions.NodeJS(), RuntimeOptions.DotNet()],
953
1037
  default: RuntimeOptions.NodeJS().id,
954
1038
  placeholder: localizeUtils_1.getLocalizedString("core.getRuntimeQuestion.placeholder"),
1039
+ cliHidden: true,
955
1040
  };
956
1041
  }
957
1042
  const defaultTabLocalHostUrl = "https://localhost:53000/index.html#/tab";
@@ -1043,6 +1128,8 @@ function getBotIdAndMeId(appDefinition) {
1043
1128
  }
1044
1129
  function getBotOptions(inputs) {
1045
1130
  const appDefinition = inputs.teamsAppFromTdp;
1131
+ if (!appDefinition)
1132
+ return [];
1046
1133
  const [botId, messageExtensionId] = getBotIdAndMeId(appDefinition);
1047
1134
  const options = [];
1048
1135
  if (botId) {
@@ -1054,14 +1141,14 @@ function getBotOptions(inputs) {
1054
1141
  return options;
1055
1142
  }
1056
1143
  function selectBotIdsQuestion() {
1057
- const statcOptions = [];
1058
- statcOptions.push(botOptionItem(false, "000000-0000-0000"));
1059
- statcOptions.push(botOptionItem(true, "000000-0000-0000"));
1144
+ // const statcOptions: OptionItem[] = [];
1145
+ // statcOptions.push(botOptionItem(false, "000000-0000-0000"));
1146
+ // statcOptions.push(botOptionItem(true, "000000-0000-0000"));
1060
1147
  return {
1061
1148
  type: "multiSelect",
1062
1149
  name: questionNames_1.QuestionNames.ReplaceBotIds,
1063
1150
  title: localizeUtils_1.getLocalizedString("core.updateBotIdsQuestion.title"),
1064
- staticOptions: statcOptions,
1151
+ staticOptions: [],
1065
1152
  dynamicOptions: getBotOptions,
1066
1153
  default: (inputs) => {
1067
1154
  const options = getBotOptions(inputs);
@@ -1071,18 +1158,29 @@ function selectBotIdsQuestion() {
1071
1158
  forgetLastValue: true,
1072
1159
  };
1073
1160
  }
1074
- function apiSpecLocationQuestion() {
1161
+ const maximumLengthOfDetailsErrorMessageInInputBox = 90;
1162
+ function apiSpecLocationQuestion(includeExistingAPIs = true) {
1075
1163
  const validationOnAccept = async (input, inputs) => {
1076
1164
  try {
1077
1165
  const context = utils_4.createContextV3();
1078
- const res = await helper_1.listOperations(context, undefined, input, true);
1166
+ const res = await helper_1.listOperations(context, undefined, input.trim(), inputs[questionNames_1.QuestionNames.ManifestPath], includeExistingAPIs, false);
1079
1167
  if (res.isOk()) {
1080
1168
  inputs.supportedApisFromApiSpec = res.value;
1081
1169
  }
1082
1170
  else {
1083
- // TODO: get validationErrorMessage based on error length
1084
1171
  const errors = res.error;
1085
- return errors[0].content;
1172
+ if ((inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI) {
1173
+ return errors.map((e) => e.content).join("\n");
1174
+ }
1175
+ if (errors.length === 1 &&
1176
+ errors[0].content.length <= maximumLengthOfDetailsErrorMessageInInputBox) {
1177
+ return errors[0].content;
1178
+ }
1179
+ else {
1180
+ return inputs.platform === teamsfx_api_1.Platform.VSCode
1181
+ ? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.vscode.message")
1182
+ : localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.message");
1183
+ }
1086
1184
  }
1087
1185
  }
1088
1186
  catch (e) {
@@ -1093,19 +1191,26 @@ function apiSpecLocationQuestion() {
1093
1191
  return {
1094
1192
  type: "singleFileOrText",
1095
1193
  name: questionNames_1.QuestionNames.ApiSpecLocation,
1194
+ cliShortName: "a",
1195
+ cliDescription: "OpenAPI specification file location.",
1096
1196
  title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.title"),
1097
1197
  forgetLastValue: true,
1098
1198
  inputBoxConfig: {
1199
+ type: "innerText",
1099
1200
  title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.title"),
1100
1201
  placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.placeholder"),
1101
1202
  name: "input-api-spec-url",
1102
1203
  step: 2,
1103
- validation: async (input) => {
1104
- return util_1.isValidHttpUrl(input)
1105
- ? undefined
1106
- : localizeUtils_1.getLocalizedString("core.createProjectQuestion.invalidUrl.message");
1204
+ validation: {
1205
+ validFunc: (input, inputs) => {
1206
+ const result = util_1.isValidHttpUrl(input)
1207
+ ? undefined
1208
+ : (inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI
1209
+ ? "Please enter a valid URL or local path of your API Specification"
1210
+ : localizeUtils_1.getLocalizedString("core.createProjectQuestion.invalidUrl.message");
1211
+ return Promise.resolve(result);
1212
+ },
1107
1213
  },
1108
- additionalValidationOnAccept: validationOnAccept,
1109
1214
  },
1110
1215
  inputOptionItem: {
1111
1216
  id: "input",
@@ -1116,8 +1221,8 @@ function apiSpecLocationQuestion() {
1116
1221
  },
1117
1222
  validation: {
1118
1223
  validFunc: async (input, inputs) => {
1119
- if (input === "input") {
1120
- return undefined;
1224
+ if (!util_1.isValidHttpUrl(input) && !(await fs_extra_1.default.pathExists(input))) {
1225
+ return "Please enter a valid URL or local path of your API Specification";
1121
1226
  }
1122
1227
  return await validationOnAccept(input, inputs);
1123
1228
  },
@@ -1129,15 +1234,20 @@ function openAIPluginManifestLocationQuestion() {
1129
1234
  // export for unit test
1130
1235
  return {
1131
1236
  type: "text",
1132
- name: questionNames_1.QuestionNames.OpenAIPluginManifestLocation,
1133
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.AIPluginManifest.title"),
1134
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.AIPluginManifest.placeholder"),
1237
+ name: questionNames_1.QuestionNames.OpenAIPluginDomain,
1238
+ cliShortName: "d",
1239
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.OpenAIPluginDomain"),
1240
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.OpenAIPluginDomain.placeholder"),
1241
+ cliDescription: "OpenAI plugin website domain.",
1135
1242
  forgetLastValue: true,
1136
1243
  validation: {
1137
- validFunc: async (input) => {
1138
- return util_1.isValidHttpUrl(input)
1244
+ validFunc: (input) => {
1245
+ const pattern = /(https?:\/\/)?([a-z0-9-]+(\.[a-z0-9-]+)*)(:[0-9]{1,5})?(\/)?$/i;
1246
+ const match = pattern.test(input);
1247
+ const result = match
1139
1248
  ? undefined
1140
1249
  : localizeUtils_1.getLocalizedString("core.createProjectQuestion.invalidUrl.message");
1250
+ return Promise.resolve(result);
1141
1251
  },
1142
1252
  },
1143
1253
  additionalValidationOnAccept: {
@@ -1153,14 +1263,24 @@ function openAIPluginManifestLocationQuestion() {
1153
1263
  }
1154
1264
  const context = utils_4.createContextV3();
1155
1265
  try {
1156
- const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation], true);
1266
+ const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation], undefined, true, true);
1157
1267
  if (res.isOk()) {
1158
1268
  inputs.supportedApisFromApiSpec = res.value;
1159
1269
  }
1160
1270
  else {
1161
- // TODO: get validationErrorMessage based on error length
1162
1271
  const errors = res.error;
1163
- return errors[0].content;
1272
+ if ((inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI) {
1273
+ return errors.map((e) => e.content).join("\n");
1274
+ }
1275
+ if (errors.length === 1 &&
1276
+ errors[0].content.length <= maximumLengthOfDetailsErrorMessageInInputBox) {
1277
+ return errors[0].content;
1278
+ }
1279
+ else {
1280
+ return inputs.platform === teamsfx_api_1.Platform.VSCode
1281
+ ? localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.multipleValidationErrors.vscode.message")
1282
+ : localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.multipleValidationErrors.message");
1283
+ }
1164
1284
  }
1165
1285
  }
1166
1286
  catch (e) {
@@ -1178,206 +1298,196 @@ function apiOperationQuestion(includeExistingAPIs = true) {
1178
1298
  type: "multiSelect",
1179
1299
  name: questionNames_1.QuestionNames.ApiOperation,
1180
1300
  title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.title"),
1301
+ cliDescription: "Specifies API(s) to be used in Copilot plugin.",
1302
+ cliShortName: "o",
1181
1303
  placeholder: includeExistingAPIs
1182
1304
  ? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder")
1183
1305
  : localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting"),
1184
1306
  forgetLastValue: true,
1185
1307
  staticOptions: [],
1186
1308
  validation: {
1187
- minItems: 1,
1309
+ validFunc: (input) => {
1310
+ if (input.length < 1 || input.length > 10) {
1311
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.invalidMessage", input.length, 10);
1312
+ }
1313
+ },
1188
1314
  },
1189
- dynamicOptions: async (inputs) => {
1315
+ dynamicOptions: (inputs) => {
1190
1316
  if (!inputs.supportedApisFromApiSpec) {
1191
- throw new error_2.EmptyOptionError();
1192
- }
1193
- if (includeExistingAPIs) {
1194
- return inputs.supportedApisFromApiSpec.map((operation) => {
1195
- return {
1196
- id: operation,
1197
- label: operation,
1198
- };
1199
- });
1200
- }
1201
- else {
1202
- const teamsManifestPath = inputs.teamsManifestPath;
1203
- const manifest = await ManifestUtils_1.manifestUtils._readAppManifest(teamsManifestPath);
1204
- if (manifest.isOk()) {
1205
- const existingOperationIds = ManifestUtils_1.manifestUtils.getOperationIds(manifest.value);
1206
- return inputs.supportedApisFromApiSpec
1207
- .filter((operation) => !existingOperationIds.includes(operation))
1208
- .map((operation) => {
1209
- return { id: operation, label: operation };
1210
- });
1211
- }
1212
- else {
1213
- throw manifest.error;
1214
- }
1317
+ throw new error_2.EmptyOptionError(questionNames_1.QuestionNames.ApiOperation, "question");
1215
1318
  }
1319
+ const operations = inputs.supportedApisFromApiSpec;
1320
+ return operations;
1216
1321
  },
1217
1322
  };
1218
1323
  }
1219
1324
  exports.apiOperationQuestion = apiOperationQuestion;
1220
- function createProjectQuestionNode() {
1221
- const createProjectQuestion = {
1222
- data: scratchOrSampleQuestion(),
1325
+ function capabilitySubTree() {
1326
+ const node = {
1327
+ data: capabilityQuestion(),
1223
1328
  children: [
1224
1329
  {
1225
- condition: { equals: ScratchOptions.yes().id },
1226
- data: { type: "group", name: questionNames_1.QuestionNames.SctatchYes },
1330
+ // Notification bot trigger sub-tree
1331
+ condition: { equals: CapabilityOptions.notificationBot().id },
1332
+ data: botTriggerQuestion(),
1333
+ },
1334
+ {
1335
+ // SPFx sub-tree
1336
+ condition: { equals: CapabilityOptions.SPFxTab().id },
1337
+ data: SPFxSolutionQuestion(),
1227
1338
  children: [
1228
1339
  {
1229
- condition: (inputs) => featureFlags_1.isCLIDotNetEnabled() && teamsfx_api_1.CLIPlatforms.includes(inputs.platform),
1230
- data: runtimeQuestion(),
1340
+ data: { type: "group" },
1341
+ children: [
1342
+ { data: SPFxPackageSelectQuestion() },
1343
+ { data: SPFxFrameworkQuestion() },
1344
+ { data: SPFxWebpartNameQuestion() },
1345
+ ],
1346
+ condition: { equals: "new" },
1231
1347
  },
1232
1348
  {
1233
- condition: (inputs) => inputs.platform === teamsfx_api_1.Platform.VSCode,
1234
- data: projectTypeQuestion(),
1349
+ data: SPFxImportFolderQuestion(),
1350
+ condition: { equals: "import" },
1235
1351
  },
1352
+ ],
1353
+ },
1354
+ {
1355
+ // office addin import sub-tree
1356
+ condition: { equals: CapabilityOptions.officeAddinImport().id },
1357
+ data: { type: "group", name: questionNames_1.QuestionNames.OfficeAddinImport },
1358
+ children: [
1236
1359
  {
1237
- data: capabilityQuestion(),
1238
- children: [
1239
- {
1240
- // Notification bot trigger sub-tree
1241
- condition: { equals: CapabilityOptions.notificationBot().id },
1242
- data: botTriggerQuestion(),
1243
- },
1244
- {
1245
- // SPFx sub-tree
1246
- condition: { equals: CapabilityOptions.SPFxTab().id },
1247
- data: SPFxSolutionQuestion(),
1248
- children: [
1249
- {
1250
- data: { type: "group" },
1251
- children: [
1252
- { data: SPFxPackageSelectQuestion() },
1253
- { data: SPFxFrameworkQuestion() },
1254
- { data: SPFxWebpartNameQuestion() },
1255
- ],
1256
- condition: { equals: "new" },
1257
- },
1258
- {
1259
- data: SPFxImportFolderQuestion(),
1260
- condition: { equals: "import" },
1261
- },
1262
- ],
1263
- },
1264
- {
1265
- // office addin import sub-tree
1266
- condition: { equals: CapabilityOptions.officeAddinImport().id },
1267
- data: { type: "group", name: questionNames_1.QuestionNames.OfficeAddinImport },
1268
- children: [
1269
- {
1270
- data: {
1271
- type: "folder",
1272
- name: questionNames_1.QuestionNames.OfficeAddinFolder,
1273
- title: "Existing add-in project folder",
1274
- },
1275
- },
1276
- {
1277
- data: {
1278
- type: "singleFile",
1279
- name: questionNames_1.QuestionNames.OfficeAddinManifest,
1280
- title: "Select import project manifest file",
1281
- },
1282
- },
1283
- ],
1284
- },
1285
- {
1286
- // office addin other items sub-tree
1287
- condition: {
1288
- enum: CapabilityOptions.officeAddinItems().map((i) => i.id),
1289
- },
1290
- data: officeAddinHostingQuestion(),
1291
- },
1292
- {
1293
- // Copilot plugin from API spec or AI Plugin
1294
- condition: {
1295
- enum: [
1296
- CapabilityOptions.copilotPluginApiSpec().id,
1297
- CapabilityOptions.copilotPluginOpenAIPlugin().id,
1298
- ],
1299
- },
1300
- data: { type: "group", name: questionNames_1.QuestionNames.CopilotPluginExistingApi },
1301
- children: [
1302
- {
1303
- condition: { equals: CapabilityOptions.copilotPluginApiSpec().id },
1304
- data: apiSpecLocationQuestion(),
1305
- },
1306
- {
1307
- condition: { equals: CapabilityOptions.copilotPluginOpenAIPlugin().id },
1308
- data: openAIPluginManifestLocationQuestion(),
1309
- },
1310
- {
1311
- data: apiOperationQuestion(),
1312
- },
1313
- ],
1314
- },
1315
- {
1316
- // programming language
1317
- data: programmingLanguageQuestion(),
1318
- condition: {
1319
- excludesEnum: [
1320
- CapabilityOptions.copilotPluginApiSpec().id,
1321
- CapabilityOptions.copilotPluginOpenAIPlugin().id,
1322
- ],
1323
- },
1324
- },
1325
- {
1326
- // root folder
1327
- data: rootFolderQuestion(),
1328
- },
1329
- {
1330
- // app name
1331
- data: appNameQuestion(),
1332
- },
1333
- ],
1360
+ data: {
1361
+ type: "folder",
1362
+ name: questionNames_1.QuestionNames.OfficeAddinFolder,
1363
+ title: "Existing add-in project folder",
1364
+ },
1334
1365
  },
1335
1366
  {
1336
- condition: (inputs) => inputs.teamsAppFromTdp && utils_2.isPersonalApp(inputs.teamsAppFromTdp),
1337
- data: { type: "group", name: questionNames_1.QuestionNames.RepalceTabUrl },
1338
- children: [
1339
- {
1340
- condition: (inputs) => {
1341
- var _a;
1342
- return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.websiteUrl)) || [])
1343
- .length > 0;
1344
- },
1345
- data: selectTabWebsiteUrlQuestion(),
1346
- },
1347
- {
1348
- condition: (inputs) => {
1349
- var _a;
1350
- return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.contentUrl)) || [])
1351
- .length > 0;
1352
- },
1353
- data: selectTabsContentUrlQuestion(),
1354
- },
1355
- ],
1367
+ data: {
1368
+ type: "singleFile",
1369
+ name: questionNames_1.QuestionNames.OfficeAddinManifest,
1370
+ title: "Select import project manifest file",
1371
+ },
1372
+ },
1373
+ ],
1374
+ },
1375
+ {
1376
+ // office addin other items sub-tree
1377
+ condition: {
1378
+ enum: CapabilityOptions.officeAddinItems().map((i) => i.id),
1379
+ },
1380
+ data: officeAddinHostingQuestion(),
1381
+ },
1382
+ {
1383
+ // Copilot plugin from API spec or AI Plugin
1384
+ condition: {
1385
+ enum: [
1386
+ CapabilityOptions.copilotPluginApiSpec().id,
1387
+ CapabilityOptions.copilotPluginOpenAIPlugin().id,
1388
+ ],
1389
+ },
1390
+ data: { type: "group", name: questionNames_1.QuestionNames.CopilotPluginExistingApi },
1391
+ children: [
1392
+ {
1393
+ condition: { equals: CapabilityOptions.copilotPluginApiSpec().id },
1394
+ data: apiSpecLocationQuestion(),
1356
1395
  },
1357
1396
  {
1358
- condition: (inputs) => {
1359
- const appDef = inputs.teamsAppFromTdp;
1360
- return appDef && utils_2.needBotCode(appDef);
1361
- },
1362
- data: selectBotIdsQuestion(),
1397
+ condition: { equals: CapabilityOptions.copilotPluginOpenAIPlugin().id },
1398
+ data: openAIPluginManifestLocationQuestion(),
1399
+ },
1400
+ {
1401
+ data: apiOperationQuestion(),
1363
1402
  },
1364
1403
  ],
1365
1404
  },
1366
1405
  {
1367
- condition: { equals: ScratchOptions.no().id },
1368
- data: sampleSelectQuestion(),
1406
+ // programming language
1407
+ data: programmingLanguageQuestion(),
1408
+ condition: {
1409
+ excludesEnum: [
1410
+ CapabilityOptions.copilotPluginApiSpec().id,
1411
+ CapabilityOptions.copilotPluginOpenAIPlugin().id,
1412
+ ],
1413
+ },
1414
+ },
1415
+ {
1416
+ // root folder
1417
+ data: folderQuestion(),
1418
+ },
1419
+ {
1420
+ // app name
1421
+ data: appNameQuestion(),
1422
+ },
1423
+ ],
1424
+ };
1425
+ return node;
1426
+ }
1427
+ exports.capabilitySubTree = capabilitySubTree;
1428
+ function createProjectQuestionNode() {
1429
+ const createProjectQuestion = {
1430
+ data: { type: "group" },
1431
+ children: [
1432
+ {
1433
+ condition: (inputs) => featureFlags_1.isCLIDotNetEnabled() && teamsfx_api_1.CLIPlatforms.includes(inputs.platform),
1434
+ data: runtimeQuestion(),
1435
+ },
1436
+ {
1437
+ condition: (inputs) => inputs.platform === teamsfx_api_1.Platform.VSCode || inputs.platform === teamsfx_api_1.Platform.CLI,
1438
+ data: projectTypeQuestion(),
1439
+ cliOptionDisabled: "self",
1440
+ },
1441
+ capabilitySubTree(),
1442
+ {
1443
+ condition: (inputs) => inputs.teamsAppFromTdp && utils_2.isPersonalApp(inputs.teamsAppFromTdp),
1444
+ data: { type: "group", name: questionNames_1.QuestionNames.RepalceTabUrl },
1445
+ cliOptionDisabled: "all",
1446
+ inputsDisabled: "all",
1369
1447
  children: [
1370
1448
  {
1371
- // root folder
1372
- data: rootFolderQuestion(),
1449
+ condition: (inputs) => {
1450
+ var _a;
1451
+ return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.websiteUrl)) || []).length >
1452
+ 0;
1453
+ },
1454
+ data: selectTabWebsiteUrlQuestion(),
1455
+ },
1456
+ {
1457
+ condition: (inputs) => {
1458
+ var _a;
1459
+ return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.contentUrl)) || []).length >
1460
+ 0;
1461
+ },
1462
+ data: selectTabsContentUrlQuestion(),
1373
1463
  },
1374
1464
  ],
1375
1465
  },
1466
+ {
1467
+ condition: (inputs) => {
1468
+ const appDef = inputs.teamsAppFromTdp;
1469
+ return appDef && utils_2.needBotCode(appDef);
1470
+ },
1471
+ data: selectBotIdsQuestion(),
1472
+ cliOptionDisabled: "all",
1473
+ inputsDisabled: "all",
1474
+ },
1376
1475
  ],
1377
1476
  };
1378
1477
  return createProjectQuestion;
1379
1478
  }
1380
1479
  exports.createProjectQuestionNode = createProjectQuestionNode;
1480
+ function createSampleProjectQuestionNode() {
1481
+ return {
1482
+ data: sampleSelectQuestion(),
1483
+ children: [
1484
+ {
1485
+ data: folderQuestion(),
1486
+ },
1487
+ ],
1488
+ };
1489
+ }
1490
+ exports.createSampleProjectQuestionNode = createSampleProjectQuestionNode;
1381
1491
  function createProjectCliHelpNode() {
1382
1492
  const node = lodash_1.cloneDeep(createProjectQuestionNode());
1383
1493
  const deleteNames = [
@@ -1391,12 +1501,11 @@ function createProjectCliHelpNode() {
1391
1501
  if (!featureFlags_1.isCLIDotNetEnabled()) {
1392
1502
  deleteNames.push(questionNames_1.QuestionNames.Runtime);
1393
1503
  }
1394
- if (!featureFlags_1.isCopilotPluginEnabled()) {
1504
+ if (!featureFlags_1.isApiCopilotPluginEnabled()) {
1395
1505
  deleteNames.push(questionNames_1.QuestionNames.CopilotPluginExistingApi);
1396
1506
  }
1397
1507
  trimQuestionTreeForCliHelp(node, deleteNames);
1398
- const subTree = pickSubTree(node, questionNames_1.QuestionNames.SctatchYes);
1399
- return subTree;
1508
+ return node;
1400
1509
  }
1401
1510
  exports.createProjectCliHelpNode = createProjectCliHelpNode;
1402
1511
  function trimQuestionTreeForCliHelp(node, deleteNames) {