@microsoft/teamsfx-core 2.0.10-rc.0 → 2.0.10

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 (1018) hide show
  1. package/build/common/constants.d.ts +19 -11
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +22 -44
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/correlator.d.ts +0 -1
  6. package/build/common/correlator.d.ts.map +1 -1
  7. package/build/common/correlator.js +1 -6
  8. package/build/common/correlator.js.map +1 -1
  9. package/build/common/deps-checker/checkerFactory.d.ts.map +1 -0
  10. package/build/common/deps-checker/checkerFactory.js.map +1 -0
  11. package/build/{component → common}/deps-checker/constant/helpLink.d.ts +3 -0
  12. package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -0
  13. package/build/{component → common}/deps-checker/constant/helpLink.js +6 -1
  14. package/build/common/deps-checker/constant/helpLink.js.map +1 -0
  15. package/build/common/deps-checker/constant/index.d.ts.map +1 -0
  16. package/build/common/deps-checker/constant/index.js.map +1 -0
  17. package/build/common/deps-checker/constant/message.d.ts.map +1 -0
  18. package/build/common/deps-checker/constant/message.js +45 -0
  19. package/build/common/deps-checker/constant/message.js.map +1 -0
  20. package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -0
  21. package/build/common/deps-checker/constant/telemetry.js.map +1 -0
  22. package/build/common/deps-checker/coreDepsLoggerAdapter.d.ts.map +1 -0
  23. package/build/common/deps-checker/coreDepsLoggerAdapter.js.map +1 -0
  24. package/build/common/deps-checker/coreDepsTelemetryAdapter.d.ts.map +1 -0
  25. package/build/{component → common}/deps-checker/coreDepsTelemetryAdapter.js +4 -4
  26. package/build/common/deps-checker/coreDepsTelemetryAdapter.js.map +1 -0
  27. package/build/common/deps-checker/depsChecker.d.ts.map +1 -0
  28. package/build/common/deps-checker/depsChecker.js.map +1 -0
  29. package/build/common/deps-checker/depsError.d.ts.map +1 -0
  30. package/build/common/deps-checker/depsError.js.map +1 -0
  31. package/build/common/deps-checker/depsLogger.d.ts.map +1 -0
  32. package/build/common/deps-checker/depsLogger.js.map +1 -0
  33. package/build/common/deps-checker/depsManager.d.ts.map +1 -0
  34. package/build/common/deps-checker/depsManager.js.map +1 -0
  35. package/build/common/deps-checker/depsTelemetry.d.ts.map +1 -0
  36. package/build/common/deps-checker/depsTelemetry.js.map +1 -0
  37. package/build/common/deps-checker/index.d.ts.map +1 -0
  38. package/build/common/deps-checker/index.js.map +1 -0
  39. package/build/common/deps-checker/internal/dotnetChecker.d.ts.map +1 -0
  40. package/build/{component → common}/deps-checker/internal/dotnetChecker.js +14 -14
  41. package/build/common/deps-checker/internal/dotnetChecker.js.map +1 -0
  42. package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -0
  43. package/build/{component → common}/deps-checker/internal/funcToolChecker.js +16 -16
  44. package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -0
  45. package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -0
  46. package/build/common/deps-checker/internal/nodeChecker.js.map +1 -0
  47. package/build/common/deps-checker/internal/testToolChecker.d.ts.map +1 -0
  48. package/build/{component → common}/deps-checker/internal/testToolChecker.js +22 -22
  49. package/build/common/deps-checker/internal/testToolChecker.js.map +1 -0
  50. package/build/common/deps-checker/internal/vxTestAppChecker.d.ts.map +1 -0
  51. package/build/{component → common}/deps-checker/internal/vxTestAppChecker.js +8 -14
  52. package/build/common/deps-checker/internal/vxTestAppChecker.js.map +1 -0
  53. package/build/common/deps-checker/util/cpUtils.d.ts.map +1 -0
  54. package/build/common/deps-checker/util/cpUtils.js.map +1 -0
  55. package/build/common/deps-checker/util/downloadHelper.d.ts.map +1 -0
  56. package/build/common/deps-checker/util/downloadHelper.js.map +1 -0
  57. package/build/common/deps-checker/util/fileHelper.d.ts.map +1 -0
  58. package/build/common/deps-checker/util/fileHelper.js.map +1 -0
  59. package/build/common/deps-checker/util/index.d.ts.map +1 -0
  60. package/build/common/deps-checker/util/index.js.map +1 -0
  61. package/build/common/deps-checker/util/progressIndicator.d.ts.map +1 -0
  62. package/build/common/deps-checker/util/progressIndicator.js.map +1 -0
  63. package/build/common/deps-checker/util/system.d.ts.map +1 -0
  64. package/build/common/deps-checker/util/system.js.map +1 -0
  65. package/build/common/featureFlags.d.ts +22 -61
  66. package/build/common/featureFlags.d.ts.map +1 -1
  67. package/build/common/featureFlags.js +70 -91
  68. package/build/common/featureFlags.js.map +1 -1
  69. package/build/common/globalState.js +4 -4
  70. package/build/common/globalState.js.map +1 -1
  71. package/build/common/jsonUtils.js +10 -10
  72. package/build/common/jsonUtils.js.map +1 -1
  73. package/build/common/local/constants.d.ts +185 -0
  74. package/build/common/local/constants.d.ts.map +1 -0
  75. package/build/{component → common}/local/constants.js +0 -1
  76. package/build/common/local/constants.js.map +1 -0
  77. package/build/common/local/index.d.ts.map +1 -0
  78. package/build/common/local/index.js.map +1 -0
  79. package/build/common/local/localCertificateManager.d.ts.map +1 -0
  80. package/build/{component → common}/local/localCertificateManager.js +11 -13
  81. package/build/common/local/localCertificateManager.js.map +1 -0
  82. package/build/common/local/localEnvManager.d.ts.map +1 -0
  83. package/build/{component → common}/local/localEnvManager.js +2 -2
  84. package/build/common/local/localEnvManager.js.map +1 -0
  85. package/build/common/local/localTelemetryReporter.d.ts.map +1 -0
  86. package/build/{component → common}/local/localTelemetryReporter.js +4 -4
  87. package/build/common/local/localTelemetryReporter.js.map +1 -0
  88. package/build/common/local/npmLogHelper.d.ts.map +1 -0
  89. package/build/common/local/npmLogHelper.js.map +1 -0
  90. package/build/common/local/packageJsonHelper.d.ts.map +1 -0
  91. package/build/common/local/packageJsonHelper.js.map +1 -0
  92. package/build/common/local/portChecker.d.ts.map +1 -0
  93. package/build/{component → common}/local/portChecker.js +6 -6
  94. package/build/common/local/portChecker.js.map +1 -0
  95. package/build/common/local/process.d.ts.map +1 -0
  96. package/build/common/local/process.js.map +1 -0
  97. package/build/common/local/taskDefinition.d.ts.map +1 -0
  98. package/build/{component → common}/local/taskDefinition.js +6 -6
  99. package/build/common/local/taskDefinition.js.map +1 -0
  100. package/build/common/localizeUtils.js +3 -3
  101. package/build/common/localizeUtils.js.map +1 -1
  102. package/build/common/m365/constants.d.ts +6 -0
  103. package/build/common/m365/constants.d.ts.map +1 -0
  104. package/build/{component → common}/m365/constants.js +1 -4
  105. package/build/common/m365/constants.js.map +1 -0
  106. package/build/common/m365/errors.d.ts.map +1 -0
  107. package/build/{component → common}/m365/errors.js +3 -3
  108. package/build/common/m365/errors.js.map +1 -0
  109. package/build/common/m365/launchHelper.d.ts +12 -0
  110. package/build/common/m365/launchHelper.d.ts.map +1 -0
  111. package/build/{component → common}/m365/launchHelper.js +30 -38
  112. package/build/common/m365/launchHelper.js.map +1 -0
  113. package/build/common/m365/packageService.d.ts.map +1 -0
  114. package/build/{component → common}/m365/packageService.js +28 -28
  115. package/build/common/m365/packageService.js.map +1 -0
  116. package/build/common/m365/serviceConstant.d.ts +3 -0
  117. package/build/common/m365/serviceConstant.d.ts.map +1 -0
  118. package/build/common/m365/serviceConstant.js +8 -0
  119. package/build/common/m365/serviceConstant.js.map +1 -0
  120. package/build/common/projectSettingsHelper.d.ts +0 -5
  121. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  122. package/build/common/projectSettingsHelper.js +1 -31
  123. package/build/common/projectSettingsHelper.js.map +1 -1
  124. package/build/common/projectSettingsHelperV3.d.ts +2 -0
  125. package/build/common/projectSettingsHelperV3.d.ts.map +1 -0
  126. package/build/common/projectSettingsHelperV3.js +15 -0
  127. package/build/common/projectSettingsHelperV3.js.map +1 -0
  128. package/build/common/projectTypeChecker.js +3 -3
  129. package/build/common/projectTypeChecker.js.map +1 -1
  130. package/build/common/samples.d.ts +1 -6
  131. package/build/common/samples.d.ts.map +1 -1
  132. package/build/common/samples.js +7 -7
  133. package/build/common/samples.js.map +1 -1
  134. package/build/common/stringUtils.d.ts +5 -11
  135. package/build/common/stringUtils.d.ts.map +1 -1
  136. package/build/common/stringUtils.js +101 -71
  137. package/build/common/stringUtils.js.map +1 -1
  138. package/build/common/telemetry.d.ts +13 -43
  139. package/build/common/telemetry.d.ts.map +1 -1
  140. package/build/common/telemetry.js +74 -97
  141. package/build/common/telemetry.js.map +1 -1
  142. package/build/common/templates-config.json +2 -2
  143. package/build/common/tools.d.ts +32 -2
  144. package/build/common/tools.d.ts.map +1 -1
  145. package/build/common/tools.js +250 -17
  146. package/build/common/tools.js.map +1 -1
  147. package/build/common/utils.d.ts +3 -5
  148. package/build/common/utils.d.ts.map +1 -1
  149. package/build/common/utils.js +12 -40
  150. package/build/common/utils.js.map +1 -1
  151. package/build/common/wrappedAxiosClient.d.ts +0 -1
  152. package/build/common/wrappedAxiosClient.d.ts.map +1 -1
  153. package/build/common/wrappedAxiosClient.js +34 -64
  154. package/build/common/wrappedAxiosClient.js.map +1 -1
  155. package/build/component/configManager/actionInjector.js +2 -2
  156. package/build/component/configManager/actionInjector.js.map +1 -1
  157. package/build/component/configManager/lifecycle.js +10 -10
  158. package/build/component/configManager/lifecycle.js.map +1 -1
  159. package/build/component/configManager/parser.js +21 -21
  160. package/build/component/configManager/parser.js.map +1 -1
  161. package/build/component/configManager/validator.js +2 -2
  162. package/build/component/configManager/validator.js.map +1 -1
  163. package/build/component/constant/commonConstant.d.ts +0 -1
  164. package/build/component/constant/commonConstant.d.ts.map +1 -1
  165. package/build/component/constant/commonConstant.js +0 -1
  166. package/build/component/constant/commonConstant.js.map +1 -1
  167. package/build/component/constants.d.ts +223 -7
  168. package/build/component/constants.d.ts.map +1 -1
  169. package/build/component/constants.js +251 -12
  170. package/build/component/constants.js.map +1 -1
  171. package/build/component/coordinator/index.d.ts.map +1 -1
  172. package/build/component/coordinator/index.js +234 -125
  173. package/build/component/coordinator/index.js.map +1 -1
  174. package/build/component/coordinator/summary.js +10 -10
  175. package/build/component/coordinator/summary.js.map +1 -1
  176. package/build/component/deployUtils.js +4 -4
  177. package/build/component/deployUtils.js.map +1 -1
  178. package/build/component/developerPortalScaffoldUtils.d.ts +5 -1
  179. package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
  180. package/build/component/developerPortalScaffoldUtils.js +94 -78
  181. package/build/component/developerPortalScaffoldUtils.js.map +1 -1
  182. package/build/component/driver/aad/create.d.ts.map +1 -1
  183. package/build/component/driver/aad/create.js +29 -43
  184. package/build/component/driver/aad/create.js.map +1 -1
  185. package/build/component/driver/aad/error/aadAppNameTooLongError.js +2 -2
  186. package/build/component/driver/aad/error/aadAppNameTooLongError.js.map +1 -1
  187. package/build/component/driver/aad/error/aadManifestError.js +27 -27
  188. package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
  189. package/build/component/driver/aad/error/clientSecretNotAllowedError.js +2 -2
  190. package/build/component/driver/aad/error/clientSecretNotAllowedError.js.map +1 -1
  191. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js +2 -2
  192. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js.map +1 -1
  193. package/build/component/driver/aad/error/invalidFieldInManifestError.js +2 -2
  194. package/build/component/driver/aad/error/invalidFieldInManifestError.js.map +1 -1
  195. package/build/component/driver/aad/error/missingEnvError.js +2 -2
  196. package/build/component/driver/aad/error/missingEnvError.js.map +1 -1
  197. package/build/component/driver/aad/update.js +16 -16
  198. package/build/component/driver/aad/update.js.map +1 -1
  199. package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
  200. package/build/component/driver/aad/utility/aadAppClient.js +19 -19
  201. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  202. package/build/component/driver/aad/utility/aadManifestHelper.js +3 -3
  203. package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
  204. package/build/component/driver/aad/utility/buildAadManifest.d.ts +1 -1
  205. package/build/component/driver/aad/utility/buildAadManifest.d.ts.map +1 -1
  206. package/build/component/driver/aad/utility/buildAadManifest.js +13 -13
  207. package/build/component/driver/aad/utility/buildAadManifest.js.map +1 -1
  208. package/build/component/driver/aad/utility/constants.d.ts +0 -2
  209. package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
  210. package/build/component/driver/aad/utility/constants.js +0 -2
  211. package/build/component/driver/aad/utility/constants.js.map +1 -1
  212. package/build/component/driver/add/addWebPart.d.ts +2 -2
  213. package/build/component/driver/add/addWebPart.d.ts.map +1 -1
  214. package/build/component/driver/add/addWebPart.js +31 -31
  215. package/build/component/driver/add/addWebPart.js.map +1 -1
  216. package/build/component/driver/add/error/noConfigurationError.js +2 -2
  217. package/build/component/driver/add/error/noConfigurationError.js.map +1 -1
  218. package/build/component/driver/apiKey/create.d.ts.map +1 -1
  219. package/build/component/driver/apiKey/create.js +27 -30
  220. package/build/component/driver/apiKey/create.js.map +1 -1
  221. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js +2 -2
  222. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js.map +1 -1
  223. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js +2 -2
  224. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js.map +1 -1
  225. package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js +2 -2
  226. package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js.map +1 -1
  227. package/build/component/driver/apiKey/error/apiKeyNameTooLong.js +2 -2
  228. package/build/component/driver/apiKey/error/apiKeyNameTooLong.js.map +1 -1
  229. package/build/component/driver/apiKey/update.d.ts +1 -1
  230. package/build/component/driver/apiKey/update.d.ts.map +1 -1
  231. package/build/component/driver/apiKey/update.js +27 -27
  232. package/build/component/driver/apiKey/update.js.map +1 -1
  233. package/build/component/driver/apiKey/utility/constants.d.ts +1 -1
  234. package/build/component/driver/apiKey/utility/constants.js +1 -1
  235. package/build/component/driver/apiKey/utility/utility.js +2 -2
  236. package/build/component/driver/apiKey/utility/utility.js.map +1 -1
  237. package/build/component/driver/arm/deploy.js +4 -4
  238. package/build/component/driver/arm/deploy.js.map +1 -1
  239. package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
  240. package/build/component/driver/arm/deployImpl.js +18 -20
  241. package/build/component/driver/arm/deployImpl.js.map +1 -1
  242. package/build/component/driver/arm/util/bicepChecker.d.ts.map +1 -1
  243. package/build/component/driver/arm/util/bicepChecker.js +9 -29
  244. package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
  245. package/build/component/driver/arm/util/handleError.js +10 -10
  246. package/build/component/driver/arm/util/handleError.js.map +1 -1
  247. package/build/component/driver/arm/validator.js +3 -3
  248. package/build/component/driver/arm/validator.js.map +1 -1
  249. package/build/component/driver/botAadApp/create.d.ts.map +1 -1
  250. package/build/component/driver/botAadApp/create.js +22 -38
  251. package/build/component/driver/botAadApp/create.js.map +1 -1
  252. package/build/component/driver/botAadApp/error/unexpectedEmptyBotPasswordError.js +2 -2
  253. package/build/component/driver/botAadApp/error/unexpectedEmptyBotPasswordError.js.map +1 -1
  254. package/build/component/driver/botAadApp/utility/constants.d.ts +0 -1
  255. package/build/component/driver/botAadApp/utility/constants.d.ts.map +1 -1
  256. package/build/component/driver/botAadApp/utility/constants.js +0 -1
  257. package/build/component/driver/botAadApp/utility/constants.js.map +1 -1
  258. package/build/component/driver/botFramework/createOrUpdateBot.js +14 -14
  259. package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
  260. package/build/component/driver/botFramework/error/invalidBotIdError.js +2 -2
  261. package/build/component/driver/botFramework/error/invalidBotIdError.js.map +1 -1
  262. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js +3 -3
  263. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js.map +1 -1
  264. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js +3 -3
  265. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js.map +1 -1
  266. package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts.map +1 -1
  267. package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js +10 -16
  268. package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js.map +1 -1
  269. package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +9 -9
  270. package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
  271. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js +15 -15
  272. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js.map +1 -1
  273. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +7 -7
  274. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
  275. package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts +4 -4
  276. package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
  277. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +20 -20
  278. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
  279. package/build/component/driver/deploy/azure/impl/baseDeployImpl.js +11 -11
  280. package/build/component/driver/deploy/azure/impl/baseDeployImpl.js.map +1 -1
  281. package/build/component/driver/deploy/spfx/deployDriver.d.ts +1 -1
  282. package/build/component/driver/deploy/spfx/deployDriver.d.ts.map +1 -1
  283. package/build/component/driver/deploy/spfx/deployDriver.js +28 -29
  284. package/build/component/driver/deploy/spfx/deployDriver.js.map +1 -1
  285. package/build/component/driver/deploy/spfx/error/createAppCatalogFailedError.js +2 -2
  286. package/build/component/driver/deploy/spfx/error/createAppCatalogFailedError.js.map +1 -1
  287. package/build/component/driver/deploy/spfx/error/getGraphTokenFailedError.js +2 -2
  288. package/build/component/driver/deploy/spfx/error/getGraphTokenFailedError.js.map +1 -1
  289. package/build/component/driver/deploy/spfx/error/getSPOTokenFailedError.js +2 -2
  290. package/build/component/driver/deploy/spfx/error/getSPOTokenFailedError.js.map +1 -1
  291. package/build/component/driver/deploy/spfx/error/getTenantFailedError.js +2 -2
  292. package/build/component/driver/deploy/spfx/error/getTenantFailedError.js.map +1 -1
  293. package/build/component/driver/deploy/spfx/error/insufficientPermissionError.js +2 -2
  294. package/build/component/driver/deploy/spfx/error/insufficientPermissionError.js.map +1 -1
  295. package/build/component/driver/deploy/spfx/error/noSPPackageError.js +2 -2
  296. package/build/component/driver/deploy/spfx/error/noSPPackageError.js.map +1 -1
  297. package/build/component/driver/deploy/spfx/error/noValidAppCatelogError.js +2 -2
  298. package/build/component/driver/deploy/spfx/error/noValidAppCatelogError.js.map +1 -1
  299. package/build/component/driver/deploy/spfx/error/uploadAppPackageFailedError.js +2 -2
  300. package/build/component/driver/deploy/spfx/error/uploadAppPackageFailedError.js.map +1 -1
  301. package/build/component/driver/deploy/spfx/utility/constants.js +5 -5
  302. package/build/component/driver/deploy/spfx/utility/constants.js.map +1 -1
  303. package/build/component/driver/devTool/constant.d.ts +8 -8
  304. package/build/component/driver/devTool/constant.d.ts.map +1 -1
  305. package/build/component/driver/devTool/constant.js +10 -10
  306. package/build/component/driver/devTool/constant.js.map +1 -1
  307. package/build/component/driver/devTool/error/dotnetInstallationUserError.js +4 -4
  308. package/build/component/driver/devTool/error/dotnetInstallationUserError.js.map +1 -1
  309. package/build/component/driver/devTool/error/funcInstallationUserError.js +4 -4
  310. package/build/component/driver/devTool/error/funcInstallationUserError.js.map +1 -1
  311. package/build/component/driver/devTool/error/testToolInstallationUserError.js +4 -4
  312. package/build/component/driver/devTool/error/testToolInstallationUserError.js.map +1 -1
  313. package/build/component/driver/devTool/installDriver.d.ts +1 -1
  314. package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
  315. package/build/component/driver/devTool/installDriver.js +12 -12
  316. package/build/component/driver/devTool/installDriver.js.map +1 -1
  317. package/build/component/driver/error/outputEnvironmentVariableUndefinedError.js +2 -2
  318. package/build/component/driver/error/outputEnvironmentVariableUndefinedError.js.map +1 -1
  319. package/build/component/driver/file/createOrUpdateEnvironmentFile.js +11 -11
  320. package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
  321. package/build/component/driver/file/createOrUpdateJsonFile.js +12 -12
  322. package/build/component/driver/file/createOrUpdateJsonFile.js.map +1 -1
  323. package/build/component/driver/index.d.ts +0 -1
  324. package/build/component/driver/index.d.ts.map +1 -1
  325. package/build/component/driver/index.js +0 -1
  326. package/build/component/driver/index.js.map +1 -1
  327. package/build/component/driver/m365/acquire.js +16 -16
  328. package/build/component/driver/m365/acquire.js.map +1 -1
  329. package/build/component/driver/middleware/addSWADeployTelemetry.js +7 -7
  330. package/build/component/driver/middleware/addSWADeployTelemetry.js.map +1 -1
  331. package/build/component/driver/middleware/addStartAndEndTelemetry.d.ts.map +1 -1
  332. package/build/component/driver/middleware/addStartAndEndTelemetry.js +3 -3
  333. package/build/component/driver/middleware/addStartAndEndTelemetry.js.map +1 -1
  334. package/build/component/driver/oauth/create.d.ts +1 -1
  335. package/build/component/driver/oauth/create.d.ts.map +1 -1
  336. package/build/component/driver/oauth/create.js +36 -65
  337. package/build/component/driver/oauth/create.js.map +1 -1
  338. package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js +2 -2
  339. package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js.map +1 -1
  340. package/build/component/driver/oauth/error/oauthDomainInvalid.js +2 -2
  341. package/build/component/driver/oauth/error/oauthDomainInvalid.js.map +1 -1
  342. package/build/component/driver/oauth/error/oauthFailedToGetDomain.js +2 -2
  343. package/build/component/driver/oauth/error/oauthFailedToGetDomain.js.map +1 -1
  344. package/build/component/driver/oauth/error/oauthNameTooLong.js +2 -2
  345. package/build/component/driver/oauth/error/oauthNameTooLong.js.map +1 -1
  346. package/build/component/driver/oauth/interface/createOauthArgs.d.ts +0 -2
  347. package/build/component/driver/oauth/interface/createOauthArgs.d.ts.map +1 -1
  348. package/build/component/driver/oauth/interface/updateOauthArgs.d.ts +0 -1
  349. package/build/component/driver/oauth/interface/updateOauthArgs.d.ts.map +1 -1
  350. package/build/component/driver/oauth/update.d.ts +1 -1
  351. package/build/component/driver/oauth/update.d.ts.map +1 -1
  352. package/build/component/driver/oauth/update.js +26 -37
  353. package/build/component/driver/oauth/update.js.map +1 -1
  354. package/build/component/driver/oauth/utility/constants.d.ts +1 -1
  355. package/build/component/driver/oauth/utility/constants.js +1 -1
  356. package/build/component/driver/oauth/utility/utility.js +6 -5
  357. package/build/component/driver/oauth/utility/utility.js.map +1 -1
  358. package/build/component/driver/script/baseBuildDriver.js +8 -8
  359. package/build/component/driver/script/baseBuildDriver.js.map +1 -1
  360. package/build/component/driver/script/dotnetBuildDriver.js +3 -3
  361. package/build/component/driver/script/dotnetBuildDriver.js.map +1 -1
  362. package/build/component/driver/script/npmBuildDriver.js +3 -3
  363. package/build/component/driver/script/npmBuildDriver.js.map +1 -1
  364. package/build/component/driver/script/npxBuildDriver.js +5 -5
  365. package/build/component/driver/script/npxBuildDriver.js.map +1 -1
  366. package/build/component/driver/script/scriptDriver.d.ts +0 -2
  367. package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
  368. package/build/component/driver/script/scriptDriver.js +29 -28
  369. package/build/component/driver/script/scriptDriver.js.map +1 -1
  370. package/build/component/driver/teamsApp/appStudio.d.ts +1 -1
  371. package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
  372. package/build/component/driver/teamsApp/appStudio.js +74 -63
  373. package/build/component/driver/teamsApp/appStudio.js.map +1 -1
  374. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +4 -7
  375. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
  376. package/build/component/driver/teamsApp/clients/appStudioClient.js +77 -78
  377. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  378. package/build/component/driver/teamsApp/configure.d.ts +1 -1
  379. package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
  380. package/build/component/driver/teamsApp/configure.js +32 -32
  381. package/build/component/driver/teamsApp/configure.js.map +1 -1
  382. package/build/component/driver/teamsApp/constants.d.ts +3 -15
  383. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  384. package/build/component/driver/teamsApp/constants.js +16 -136
  385. package/build/component/driver/teamsApp/constants.js.map +1 -1
  386. package/build/component/driver/teamsApp/copyAppPackageToSPFx.js +8 -8
  387. package/build/component/driver/teamsApp/copyAppPackageToSPFx.js.map +1 -1
  388. package/build/component/driver/teamsApp/create.d.ts +2 -2
  389. package/build/component/driver/teamsApp/create.d.ts.map +1 -1
  390. package/build/component/driver/teamsApp/create.js +37 -37
  391. package/build/component/driver/teamsApp/create.js.map +1 -1
  392. package/build/component/driver/teamsApp/createAppPackage.d.ts +1 -3
  393. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  394. package/build/component/driver/teamsApp/createAppPackage.js +68 -84
  395. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  396. package/build/component/driver/teamsApp/errors.d.ts +2 -6
  397. package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
  398. package/build/component/driver/teamsApp/errors.js +42 -49
  399. package/build/component/driver/teamsApp/errors.js.map +1 -1
  400. package/build/component/driver/teamsApp/interfaces/CreateAppPackageArgs.d.ts +2 -6
  401. package/build/component/driver/teamsApp/interfaces/CreateAppPackageArgs.d.ts.map +1 -1
  402. package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +0 -2
  403. package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -1
  404. package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -1
  405. package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts +0 -1
  406. package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts.map +1 -1
  407. package/build/component/driver/teamsApp/publishAppPackage.d.ts +1 -1
  408. package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
  409. package/build/component/driver/teamsApp/publishAppPackage.js +42 -42
  410. package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
  411. package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
  412. package/build/component/driver/teamsApp/teamsappMgr.js +49 -48
  413. package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
  414. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +3 -5
  415. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -1
  416. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +41 -72
  417. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
  418. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +2 -3
  419. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
  420. package/build/component/driver/teamsApp/utils/ManifestUtils.js +61 -85
  421. package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
  422. package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts +3 -4
  423. package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -1
  424. package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +18 -36
  425. package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -1
  426. package/build/component/driver/teamsApp/utils/telemetry.d.ts +9 -0
  427. package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
  428. package/build/component/driver/teamsApp/utils/telemetry.js +9 -0
  429. package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
  430. package/build/component/driver/teamsApp/utils/utils.d.ts +4 -4
  431. package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
  432. package/build/component/driver/teamsApp/utils/utils.js +15 -45
  433. package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
  434. package/build/component/driver/teamsApp/validate.js +27 -27
  435. package/build/component/driver/teamsApp/validate.js.map +1 -1
  436. package/build/component/driver/teamsApp/validateAppPackage.d.ts +5 -3
  437. package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
  438. package/build/component/driver/teamsApp/validateAppPackage.js +54 -68
  439. package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
  440. package/build/component/driver/teamsApp/validateTestCases.d.ts +3 -3
  441. package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
  442. package/build/component/driver/teamsApp/validateTestCases.js +49 -50
  443. package/build/component/driver/teamsApp/validateTestCases.js.map +1 -1
  444. package/build/component/driver/util/utils.d.ts +0 -3
  445. package/build/component/driver/util/utils.d.ts.map +1 -1
  446. package/build/component/driver/util/utils.js +1 -16
  447. package/build/component/driver/util/utils.js.map +1 -1
  448. package/build/component/driver/util/wrapUtil.d.ts.map +1 -1
  449. package/build/component/driver/util/wrapUtil.js +9 -12
  450. package/build/component/driver/util/wrapUtil.js.map +1 -1
  451. package/build/component/error/componentError.js +8 -8
  452. package/build/component/error/componentError.js.map +1 -1
  453. package/build/component/feature/collaboration.d.ts.map +1 -1
  454. package/build/component/feature/collaboration.js +59 -60
  455. package/build/component/feature/collaboration.js.map +1 -1
  456. package/build/component/feature/createAuthFiles.js +8 -8
  457. package/build/component/feature/createAuthFiles.js.map +1 -1
  458. package/build/component/feature/sso.js +6 -7
  459. package/build/component/feature/sso.js.map +1 -1
  460. package/build/component/generator/constant.d.ts +0 -1
  461. package/build/component/generator/constant.d.ts.map +1 -1
  462. package/build/component/generator/constant.js +1 -2
  463. package/build/component/generator/constant.js.map +1 -1
  464. package/build/component/generator/copilotPlugin/generator.d.ts +13 -0
  465. package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -0
  466. package/build/component/generator/copilotPlugin/generator.js +275 -0
  467. package/build/component/generator/copilotPlugin/generator.js.map +1 -0
  468. package/build/component/generator/copilotPlugin/helper.d.ts +45 -0
  469. package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -0
  470. package/build/component/generator/copilotPlugin/helper.js +710 -0
  471. package/build/component/generator/copilotPlugin/helper.js.map +1 -0
  472. package/build/component/generator/error.d.ts +1 -1
  473. package/build/component/generator/error.d.ts.map +1 -1
  474. package/build/component/generator/error.js +5 -5
  475. package/build/component/generator/error.js.map +1 -1
  476. package/build/component/generator/generator.d.ts.map +1 -1
  477. package/build/component/generator/generator.js +21 -27
  478. package/build/component/generator/generator.js.map +1 -1
  479. package/build/component/generator/generatorAction.d.ts +1 -1
  480. package/build/component/generator/generatorAction.d.ts.map +1 -1
  481. package/build/component/generator/generatorAction.js +22 -14
  482. package/build/component/generator/generatorAction.js.map +1 -1
  483. package/build/component/generator/generatorProvider.d.ts.map +1 -1
  484. package/build/component/generator/generatorProvider.js +2 -6
  485. package/build/component/generator/generatorProvider.js.map +1 -1
  486. package/build/component/generator/officeAddin/generator.d.ts +1 -0
  487. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  488. package/build/component/generator/officeAddin/generator.js +73 -72
  489. package/build/component/generator/officeAddin/generator.js.map +1 -1
  490. package/build/component/generator/officeAddin/helperMethods.d.ts +0 -5
  491. package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
  492. package/build/component/generator/officeAddin/helperMethods.js +0 -37
  493. package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
  494. package/build/component/generator/officeXMLAddin/generator.d.ts +13 -0
  495. package/build/component/generator/officeXMLAddin/generator.d.ts.map +1 -0
  496. package/build/component/generator/officeXMLAddin/generator.js +110 -0
  497. package/build/component/generator/officeXMLAddin/generator.js.map +1 -0
  498. package/build/component/generator/officeXMLAddin/projectConfig.d.ts +4 -2
  499. package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -1
  500. package/build/component/generator/officeXMLAddin/projectConfig.js +86 -1
  501. package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -1
  502. package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +1 -1
  503. package/build/component/generator/spfx/depsChecker/generatorChecker.js +10 -11
  504. package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
  505. package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +1 -1
  506. package/build/component/generator/spfx/depsChecker/yoChecker.js +6 -7
  507. package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
  508. package/build/component/generator/spfx/error.d.ts +1 -0
  509. package/build/component/generator/spfx/error.d.ts.map +1 -1
  510. package/build/component/generator/spfx/error.js +24 -20
  511. package/build/component/generator/spfx/error.js.map +1 -1
  512. package/build/component/generator/spfx/spfxGenerator.d.ts +2 -2
  513. package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
  514. package/build/component/generator/spfx/spfxGenerator.js +105 -102
  515. package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
  516. package/build/component/generator/spfx/utils/constants.d.ts +13 -0
  517. package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
  518. package/build/component/generator/spfx/utils/constants.js +24 -9
  519. package/build/component/generator/spfx/utils/constants.js.map +1 -1
  520. package/build/component/generator/spfx/utils/telemetry-helper.d.ts.map +1 -1
  521. package/build/component/generator/spfx/utils/telemetry-helper.js +9 -11
  522. package/build/component/generator/spfx/utils/telemetry-helper.js.map +1 -1
  523. package/build/component/generator/spfx/utils/utils.d.ts +1 -1
  524. package/build/component/generator/spfx/utils/utils.d.ts.map +1 -1
  525. package/build/component/generator/spfx/utils/utils.js +3 -3
  526. package/build/component/generator/spfx/utils/utils.js.map +1 -1
  527. package/build/component/generator/templates/ssrTabGenerator.d.ts.map +1 -1
  528. package/build/component/generator/templates/ssrTabGenerator.js +6 -6
  529. package/build/component/generator/templates/ssrTabGenerator.js.map +1 -1
  530. package/build/component/generator/templates/templateGenerator.d.ts +3 -3
  531. package/build/component/generator/templates/templateGenerator.d.ts.map +1 -1
  532. package/build/component/generator/templates/templateGenerator.js +18 -16
  533. package/build/component/generator/templates/templateGenerator.js.map +1 -1
  534. package/build/component/generator/templates/templateNames.d.ts +0 -3
  535. package/build/component/generator/templates/templateNames.d.ts.map +1 -1
  536. package/build/component/generator/templates/templateNames.js +112 -109
  537. package/build/component/generator/templates/templateNames.js.map +1 -1
  538. package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -1
  539. package/build/component/generator/templates/templateReplaceMap.js +15 -48
  540. package/build/component/generator/templates/templateReplaceMap.js.map +1 -1
  541. package/build/component/generator/utils.d.ts +12 -4
  542. package/build/component/generator/utils.d.ts.map +1 -1
  543. package/build/component/generator/utils.js +80 -49
  544. package/build/component/generator/utils.js.map +1 -1
  545. package/build/component/messages.js +7 -7
  546. package/build/component/messages.js.map +1 -1
  547. package/build/component/middleware/actionExecutionMW.d.ts +1 -1
  548. package/build/component/middleware/actionExecutionMW.d.ts.map +1 -1
  549. package/build/component/middleware/actionExecutionMW.js +13 -13
  550. package/build/component/middleware/actionExecutionMW.js.map +1 -1
  551. package/build/component/middleware/envMW.js +9 -9
  552. package/build/component/middleware/envMW.js.map +1 -1
  553. package/build/component/middleware/questionMW.js +4 -4
  554. package/build/component/middleware/questionMW.js.map +1 -1
  555. package/build/component/migrate.d.ts +0 -32
  556. package/build/component/migrate.d.ts.map +1 -1
  557. package/build/component/migrate.js +35 -112
  558. package/build/component/migrate.js.map +1 -1
  559. package/build/component/provisionUtils.d.ts.map +1 -1
  560. package/build/component/provisionUtils.js +29 -28
  561. package/build/component/provisionUtils.js.map +1 -1
  562. package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
  563. package/build/component/resource/botService/appStudio/appStudioClient.js +22 -23
  564. package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
  565. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts +1 -1
  566. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts.map +1 -1
  567. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js +8 -11
  568. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js.map +1 -1
  569. package/build/component/resource/botService/constants.d.ts +13 -0
  570. package/build/component/resource/botService/constants.d.ts.map +1 -1
  571. package/build/component/resource/botService/constants.js +15 -1
  572. package/build/component/resource/botService/constants.js.map +1 -1
  573. package/build/component/resource/botService/errors.js +2 -2
  574. package/build/component/resource/botService/errors.js.map +1 -1
  575. package/build/component/resource/botService/messages.js +6 -6
  576. package/build/component/resource/botService/messages.js.map +1 -1
  577. package/build/component/resource/botService/strings.js +1 -1
  578. package/build/component/resource/botService/strings.js.map +1 -1
  579. package/build/component/telemetry.d.ts.map +1 -1
  580. package/build/component/telemetry.js +7 -6
  581. package/build/component/telemetry.js.map +1 -1
  582. package/build/component/utils/ResourceGroupHelper.d.ts +2 -10
  583. package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
  584. package/build/component/utils/ResourceGroupHelper.js +62 -155
  585. package/build/component/utils/ResourceGroupHelper.js.map +1 -1
  586. package/build/component/utils/azureResourceOperation.js +2 -2
  587. package/build/component/utils/azureResourceOperation.js.map +1 -1
  588. package/build/component/utils/charsetUtils.d.ts +1 -1
  589. package/build/component/utils/charsetUtils.d.ts.map +1 -1
  590. package/build/component/utils/charsetUtils.js +1 -3
  591. package/build/component/utils/charsetUtils.js.map +1 -1
  592. package/build/component/utils/common.d.ts +3 -4
  593. package/build/component/utils/common.d.ts.map +1 -1
  594. package/build/component/utils/common.js +6 -17
  595. package/build/component/utils/common.js.map +1 -1
  596. package/build/component/utils/depsChecker/common.d.ts +3 -1
  597. package/build/component/utils/depsChecker/common.d.ts.map +1 -1
  598. package/build/component/utils/depsChecker/common.js +4 -2
  599. package/build/component/utils/depsChecker/common.js.map +1 -1
  600. package/build/component/utils/envUtil.d.ts +0 -1
  601. package/build/component/utils/envUtil.d.ts.map +1 -1
  602. package/build/component/utils/envUtil.js +20 -20
  603. package/build/component/utils/envUtil.js.map +1 -1
  604. package/build/component/utils/fileOperation.js +4 -3
  605. package/build/component/utils/fileOperation.js.map +1 -1
  606. package/build/component/utils/metadataGraphPermssion.js +3 -3
  607. package/build/component/utils/metadataGraphPermssion.js.map +1 -1
  608. package/build/component/utils/metadataUtil.js +3 -3
  609. package/build/component/utils/metadataUtil.js.map +1 -1
  610. package/build/component/utils/pathUtils.d.ts.map +1 -1
  611. package/build/component/utils/pathUtils.js +16 -14
  612. package/build/component/utils/pathUtils.js.map +1 -1
  613. package/build/component/utils/settingsUtil.js +8 -8
  614. package/build/component/utils/settingsUtil.js.map +1 -1
  615. package/build/component/utils/teamsFxTelemetryReporter.d.ts.map +1 -1
  616. package/build/component/utils/teamsFxTelemetryReporter.js +10 -7
  617. package/build/component/utils/teamsFxTelemetryReporter.js.map +1 -1
  618. package/build/component/utils.d.ts +12 -0
  619. package/build/component/utils.d.ts.map +1 -0
  620. package/build/component/utils.js +136 -0
  621. package/build/component/utils.js.map +1 -0
  622. package/build/component/workflow.d.ts +4 -0
  623. package/build/component/workflow.d.ts.map +1 -0
  624. package/build/component/workflow.js +18 -0
  625. package/build/component/workflow.js.map +1 -0
  626. package/build/core/FxCore.d.ts +4 -37
  627. package/build/core/FxCore.d.ts.map +1 -1
  628. package/build/core/FxCore.js +477 -750
  629. package/build/core/FxCore.js.map +1 -1
  630. package/build/core/callback.d.ts +2 -2
  631. package/build/core/callback.d.ts.map +1 -1
  632. package/build/core/callback.js.map +1 -1
  633. package/build/core/collaborator.d.ts.map +1 -1
  634. package/build/core/collaborator.js +72 -70
  635. package/build/core/collaborator.js.map +1 -1
  636. package/build/core/crypto.d.ts.map +1 -1
  637. package/build/core/crypto.js +5 -4
  638. package/build/core/crypto.js.map +1 -1
  639. package/build/core/environment.js +7 -7
  640. package/build/core/environment.js.map +1 -1
  641. package/build/core/environmentName.d.ts +1 -0
  642. package/build/core/environmentName.d.ts.map +1 -1
  643. package/build/core/environmentName.js +2 -0
  644. package/build/core/environmentName.js.map +1 -1
  645. package/build/core/error.d.ts +32 -0
  646. package/build/core/error.d.ts.map +1 -0
  647. package/build/core/error.js +122 -0
  648. package/build/core/error.js.map +1 -0
  649. package/build/{common → core}/globalVars.d.ts +1 -3
  650. package/build/core/globalVars.d.ts.map +1 -0
  651. package/build/{common → core}/globalVars.js +1 -12
  652. package/build/core/globalVars.js.map +1 -0
  653. package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
  654. package/build/core/middleware/concurrentLocker.js +20 -19
  655. package/build/core/middleware/concurrentLocker.js.map +1 -1
  656. package/build/core/middleware/errorHandler.js +5 -5
  657. package/build/core/middleware/errorHandler.js.map +1 -1
  658. package/build/core/middleware/projectMigratorV3.d.ts +1 -5
  659. package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
  660. package/build/core/middleware/projectMigratorV3.js +100 -104
  661. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  662. package/build/core/middleware/projectSettingsLoader.js +4 -4
  663. package/build/core/middleware/projectSettingsLoader.js.map +1 -1
  664. package/build/core/middleware/projectVersionChecker.js +14 -14
  665. package/build/core/middleware/projectVersionChecker.js.map +1 -1
  666. package/build/core/middleware/utils/MigrationUtils.js +5 -5
  667. package/build/core/middleware/utils/MigrationUtils.js.map +1 -1
  668. package/build/core/middleware/utils/appYmlGenerator.d.ts +0 -1
  669. package/build/core/middleware/utils/appYmlGenerator.d.ts.map +1 -1
  670. package/build/core/middleware/utils/appYmlGenerator.js +9 -15
  671. package/build/core/middleware/utils/appYmlGenerator.js.map +1 -1
  672. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +10 -10
  673. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
  674. package/build/core/middleware/utils/debug/taskMigrator.js +74 -74
  675. package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
  676. package/build/core/middleware/utils/migrationContext.js +1 -1
  677. package/build/core/middleware/utils/migrationContext.js.map +1 -1
  678. package/build/core/middleware/utils/v3MigrationUtils.js +13 -13
  679. package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
  680. package/build/core/middleware/videoFilterAppBlocker.d.ts +0 -2
  681. package/build/core/middleware/videoFilterAppBlocker.d.ts.map +1 -1
  682. package/build/core/middleware/videoFilterAppBlocker.js +5 -21
  683. package/build/core/middleware/videoFilterAppBlocker.js.map +1 -1
  684. package/build/core/telemetry.d.ts +5 -0
  685. package/build/core/telemetry.d.ts.map +1 -1
  686. package/build/core/telemetry.js +17 -9
  687. package/build/core/telemetry.js.map +1 -1
  688. package/build/error/arm.js +10 -10
  689. package/build/error/arm.js.map +1 -1
  690. package/build/error/azure.js +20 -20
  691. package/build/error/azure.js.map +1 -1
  692. package/build/error/common.d.ts +1 -36
  693. package/build/error/common.d.ts.map +1 -1
  694. package/build/error/common.js +64 -175
  695. package/build/error/common.js.map +1 -1
  696. package/build/error/deploy.js +24 -24
  697. package/build/error/deploy.js.map +1 -1
  698. package/build/error/m365.js +6 -6
  699. package/build/error/m365.js.map +1 -1
  700. package/build/error/script.d.ts +2 -2
  701. package/build/error/script.d.ts.map +1 -1
  702. package/build/error/script.js +8 -14
  703. package/build/error/script.js.map +1 -1
  704. package/build/error/teamsApp.d.ts +0 -3
  705. package/build/error/teamsApp.d.ts.map +1 -1
  706. package/build/error/teamsApp.js +7 -20
  707. package/build/error/teamsApp.js.map +1 -1
  708. package/build/error/upgrade.js +2 -2
  709. package/build/error/upgrade.js.map +1 -1
  710. package/build/error/yml.js +13 -13
  711. package/build/error/yml.js.map +1 -1
  712. package/build/failpoint/index.d.ts +3 -0
  713. package/build/failpoint/index.d.ts.map +1 -0
  714. package/build/failpoint/index.js +11 -0
  715. package/build/failpoint/index.js.map +1 -0
  716. package/build/failpoint/marker.d.ts +13 -0
  717. package/build/failpoint/marker.d.ts.map +1 -0
  718. package/build/{question/inputs/SyncManifestInputs.js → failpoint/marker.js} +4 -1
  719. package/build/failpoint/marker.js.map +1 -0
  720. package/build/failpoint/runtime.d.ts +12 -0
  721. package/build/failpoint/runtime.d.ts.map +1 -0
  722. package/build/failpoint/runtime.js +67 -0
  723. package/build/failpoint/runtime.js.map +1 -0
  724. package/build/index.d.ts +36 -61
  725. package/build/index.d.ts.map +1 -1
  726. package/build/index.js +53 -132
  727. package/build/index.js.map +1 -1
  728. package/build/question/constants.d.ts +5 -269
  729. package/build/question/constants.d.ts.map +1 -1
  730. package/build/question/constants.js +13 -1107
  731. package/build/question/constants.js.map +1 -1
  732. package/build/question/create.d.ts +151 -13
  733. package/build/question/create.d.ts.map +1 -1
  734. package/build/question/create.js +1386 -542
  735. package/build/question/create.js.map +1 -1
  736. package/build/question/generator.js +2 -6
  737. package/build/question/generator.js.map +1 -1
  738. package/build/question/index.d.ts +3 -3
  739. package/build/question/index.d.ts.map +1 -1
  740. package/build/question/index.js +21 -23
  741. package/build/question/index.js.map +1 -1
  742. package/build/question/inputs/AddPluginInputs.d.ts +4 -8
  743. package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
  744. package/build/question/inputs/CreateProjectInputs.d.ts +8 -14
  745. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
  746. package/build/question/inputs/index.d.ts +0 -2
  747. package/build/question/inputs/index.d.ts.map +1 -1
  748. package/build/question/inputs/index.js +0 -2
  749. package/build/question/inputs/index.js.map +1 -1
  750. package/build/question/options/AddPluginOptions.d.ts.map +1 -1
  751. package/build/question/options/AddPluginOptions.js +10 -19
  752. package/build/question/options/AddPluginOptions.js.map +1 -1
  753. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  754. package/build/question/options/CreateProjectOptions.js +33 -36
  755. package/build/question/options/CreateProjectOptions.js.map +1 -1
  756. package/build/question/options/index.d.ts +0 -2
  757. package/build/question/options/index.d.ts.map +1 -1
  758. package/build/question/options/index.js +0 -2
  759. package/build/question/options/index.js.map +1 -1
  760. package/build/question/other.d.ts +29 -4
  761. package/build/question/other.d.ts.map +1 -1
  762. package/build/question/other.js +343 -284
  763. package/build/question/other.js.map +1 -1
  764. package/build/question/questionNames.d.ts +78 -0
  765. package/build/question/questionNames.d.ts.map +1 -0
  766. package/build/question/questionNames.js +85 -0
  767. package/build/question/questionNames.js.map +1 -0
  768. package/build/question/util.d.ts +2 -0
  769. package/build/question/util.d.ts.map +1 -0
  770. package/build/question/util.js +18 -0
  771. package/build/question/util.js.map +1 -0
  772. package/build/ui/visitor.d.ts +1 -0
  773. package/build/ui/visitor.d.ts.map +1 -1
  774. package/build/ui/visitor.js +38 -57
  775. package/build/ui/visitor.js.map +1 -1
  776. package/package.json +14 -21
  777. package/resource/deps-checker/dotnet-install.ps1 +423 -912
  778. package/resource/deps-checker/dotnet-install.sh +238 -876
  779. package/resource/package.nls.json +156 -189
  780. package/resource/yaml-schema/yaml.schema.json +1 -59
  781. package/templates/core/v3Migration/js.ts.app.local.yml +3 -3
  782. package/templates/fallback/common.zip +0 -0
  783. package/templates/fallback/csharp.zip +0 -0
  784. package/templates/fallback/js.zip +0 -0
  785. package/templates/fallback/python.zip +0 -0
  786. package/templates/fallback/ts.zip +0 -0
  787. package/templates/plugins/resource/aad/auth/V3/aad.manifest.template.json +0 -6
  788. package/templates/plugins/resource/aad/manifest/aad.template.json +0 -6
  789. package/templates/plugins/resource/aad/manifest/bot/aad.manifest.template.json +0 -6
  790. package/templates/plugins/resource/aad/manifest/tab/aad.manifest.template.json +0 -6
  791. package/build/client/teamsDevPortalClient.d.ts +0 -128
  792. package/build/client/teamsDevPortalClient.d.ts.map +0 -1
  793. package/build/client/teamsDevPortalClient.js +0 -949
  794. package/build/client/teamsDevPortalClient.js.map +0 -1
  795. package/build/common/azureUtils.d.ts +0 -3
  796. package/build/common/azureUtils.d.ts.map +0 -1
  797. package/build/common/azureUtils.js +0 -50
  798. package/build/common/azureUtils.js.map +0 -1
  799. package/build/common/globalVars.d.ts.map +0 -1
  800. package/build/common/globalVars.js.map +0 -1
  801. package/build/common/requestUtils.d.ts +0 -4
  802. package/build/common/requestUtils.d.ts.map +0 -1
  803. package/build/common/requestUtils.js +0 -52
  804. package/build/common/requestUtils.js.map +0 -1
  805. package/build/common/secretmasker/dict.d.ts +0 -22
  806. package/build/common/secretmasker/dict.d.ts.map +0 -1
  807. package/build/common/secretmasker/dict.js +0 -83
  808. package/build/common/secretmasker/dict.js.map +0 -1
  809. package/build/common/secretmasker/feature.d.ts +0 -19
  810. package/build/common/secretmasker/feature.d.ts.map +0 -1
  811. package/build/common/secretmasker/feature.js +0 -389
  812. package/build/common/secretmasker/feature.js.map +0 -1
  813. package/build/common/secretmasker/masker.d.ts +0 -12
  814. package/build/common/secretmasker/masker.d.ts.map +0 -1
  815. package/build/common/secretmasker/masker.js +0 -54
  816. package/build/common/secretmasker/masker.js.map +0 -1
  817. package/build/component/deps-checker/checkerFactory.d.ts.map +0 -1
  818. package/build/component/deps-checker/checkerFactory.js.map +0 -1
  819. package/build/component/deps-checker/constant/helpLink.d.ts.map +0 -1
  820. package/build/component/deps-checker/constant/helpLink.js.map +0 -1
  821. package/build/component/deps-checker/constant/index.d.ts.map +0 -1
  822. package/build/component/deps-checker/constant/index.js.map +0 -1
  823. package/build/component/deps-checker/constant/message.d.ts.map +0 -1
  824. package/build/component/deps-checker/constant/message.js +0 -45
  825. package/build/component/deps-checker/constant/message.js.map +0 -1
  826. package/build/component/deps-checker/constant/telemetry.d.ts.map +0 -1
  827. package/build/component/deps-checker/constant/telemetry.js.map +0 -1
  828. package/build/component/deps-checker/coreDepsLoggerAdapter.d.ts.map +0 -1
  829. package/build/component/deps-checker/coreDepsLoggerAdapter.js.map +0 -1
  830. package/build/component/deps-checker/coreDepsTelemetryAdapter.d.ts.map +0 -1
  831. package/build/component/deps-checker/coreDepsTelemetryAdapter.js.map +0 -1
  832. package/build/component/deps-checker/depsChecker.d.ts.map +0 -1
  833. package/build/component/deps-checker/depsChecker.js.map +0 -1
  834. package/build/component/deps-checker/depsError.d.ts.map +0 -1
  835. package/build/component/deps-checker/depsError.js.map +0 -1
  836. package/build/component/deps-checker/depsLogger.d.ts.map +0 -1
  837. package/build/component/deps-checker/depsLogger.js.map +0 -1
  838. package/build/component/deps-checker/depsManager.d.ts.map +0 -1
  839. package/build/component/deps-checker/depsManager.js.map +0 -1
  840. package/build/component/deps-checker/depsTelemetry.d.ts.map +0 -1
  841. package/build/component/deps-checker/depsTelemetry.js.map +0 -1
  842. package/build/component/deps-checker/index.d.ts.map +0 -1
  843. package/build/component/deps-checker/index.js.map +0 -1
  844. package/build/component/deps-checker/internal/dotnetChecker.d.ts.map +0 -1
  845. package/build/component/deps-checker/internal/dotnetChecker.js.map +0 -1
  846. package/build/component/deps-checker/internal/funcToolChecker.d.ts.map +0 -1
  847. package/build/component/deps-checker/internal/funcToolChecker.js.map +0 -1
  848. package/build/component/deps-checker/internal/nodeChecker.d.ts.map +0 -1
  849. package/build/component/deps-checker/internal/nodeChecker.js.map +0 -1
  850. package/build/component/deps-checker/internal/testToolChecker.d.ts.map +0 -1
  851. package/build/component/deps-checker/internal/testToolChecker.js.map +0 -1
  852. package/build/component/deps-checker/internal/vxTestAppChecker.d.ts.map +0 -1
  853. package/build/component/deps-checker/internal/vxTestAppChecker.js.map +0 -1
  854. package/build/component/deps-checker/util/cpUtils.d.ts.map +0 -1
  855. package/build/component/deps-checker/util/cpUtils.js.map +0 -1
  856. package/build/component/deps-checker/util/downloadHelper.d.ts.map +0 -1
  857. package/build/component/deps-checker/util/downloadHelper.js.map +0 -1
  858. package/build/component/deps-checker/util/fileHelper.d.ts.map +0 -1
  859. package/build/component/deps-checker/util/fileHelper.js.map +0 -1
  860. package/build/component/deps-checker/util/index.d.ts.map +0 -1
  861. package/build/component/deps-checker/util/index.js.map +0 -1
  862. package/build/component/deps-checker/util/progressIndicator.d.ts.map +0 -1
  863. package/build/component/deps-checker/util/progressIndicator.js.map +0 -1
  864. package/build/component/deps-checker/util/system.d.ts.map +0 -1
  865. package/build/component/deps-checker/util/system.js.map +0 -1
  866. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.d.ts +0 -5
  867. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.d.ts.map +0 -1
  868. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.js +0 -23
  869. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.js.map +0 -1
  870. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.d.ts +0 -5
  871. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.d.ts.map +0 -1
  872. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.js +0 -21
  873. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.js.map +0 -1
  874. package/build/component/driver/oauth/error/oauthDisablePKCEError.d.ts +0 -5
  875. package/build/component/driver/oauth/error/oauthDisablePKCEError.d.ts.map +0 -1
  876. package/build/component/driver/oauth/error/oauthDisablePKCEError.js +0 -21
  877. package/build/component/driver/oauth/error/oauthDisablePKCEError.js.map +0 -1
  878. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.d.ts +0 -5
  879. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.d.ts.map +0 -1
  880. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.js +0 -21
  881. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.js.map +0 -1
  882. package/build/component/driver/teamsApp/interfaces/SyncManifest.d.ts +0 -20
  883. package/build/component/driver/teamsApp/interfaces/SyncManifest.d.ts.map +0 -1
  884. package/build/component/driver/teamsApp/interfaces/SyncManifest.js +0 -5
  885. package/build/component/driver/teamsApp/interfaces/SyncManifest.js.map +0 -1
  886. package/build/component/driver/teamsApp/syncManifest.d.ts +0 -14
  887. package/build/component/driver/teamsApp/syncManifest.d.ts.map +0 -1
  888. package/build/component/driver/teamsApp/syncManifest.js +0 -226
  889. package/build/component/driver/teamsApp/syncManifest.js.map +0 -1
  890. package/build/component/generator/apiSpec/generator.d.ts +0 -15
  891. package/build/component/generator/apiSpec/generator.d.ts.map +0 -1
  892. package/build/component/generator/apiSpec/generator.js +0 -274
  893. package/build/component/generator/apiSpec/generator.js.map +0 -1
  894. package/build/component/generator/apiSpec/helper.d.ts +0 -50
  895. package/build/component/generator/apiSpec/helper.d.ts.map +0 -1
  896. package/build/component/generator/apiSpec/helper.js +0 -834
  897. package/build/component/generator/apiSpec/helper.js.map +0 -1
  898. package/build/component/generator/copilotExtension/generator.d.ts +0 -19
  899. package/build/component/generator/copilotExtension/generator.d.ts.map +0 -1
  900. package/build/component/generator/copilotExtension/generator.js +0 -116
  901. package/build/component/generator/copilotExtension/generator.js.map +0 -1
  902. package/build/component/generator/copilotExtension/helper.d.ts +0 -8
  903. package/build/component/generator/copilotExtension/helper.d.ts.map +0 -1
  904. package/build/component/generator/copilotExtension/helper.js +0 -114
  905. package/build/component/generator/copilotExtension/helper.js.map +0 -1
  906. package/build/component/local/constants.d.ts +0 -186
  907. package/build/component/local/constants.d.ts.map +0 -1
  908. package/build/component/local/constants.js.map +0 -1
  909. package/build/component/local/index.d.ts.map +0 -1
  910. package/build/component/local/index.js.map +0 -1
  911. package/build/component/local/localCertificateManager.d.ts.map +0 -1
  912. package/build/component/local/localCertificateManager.js.map +0 -1
  913. package/build/component/local/localEnvManager.d.ts.map +0 -1
  914. package/build/component/local/localEnvManager.js.map +0 -1
  915. package/build/component/local/localTelemetryReporter.d.ts.map +0 -1
  916. package/build/component/local/localTelemetryReporter.js.map +0 -1
  917. package/build/component/local/npmLogHelper.d.ts.map +0 -1
  918. package/build/component/local/npmLogHelper.js.map +0 -1
  919. package/build/component/local/packageJsonHelper.d.ts.map +0 -1
  920. package/build/component/local/packageJsonHelper.js.map +0 -1
  921. package/build/component/local/portChecker.d.ts.map +0 -1
  922. package/build/component/local/portChecker.js.map +0 -1
  923. package/build/component/local/process.d.ts.map +0 -1
  924. package/build/component/local/process.js.map +0 -1
  925. package/build/component/local/taskDefinition.d.ts.map +0 -1
  926. package/build/component/local/taskDefinition.js.map +0 -1
  927. package/build/component/m365/constants.d.ts +0 -9
  928. package/build/component/m365/constants.d.ts.map +0 -1
  929. package/build/component/m365/constants.js.map +0 -1
  930. package/build/component/m365/errors.d.ts.map +0 -1
  931. package/build/component/m365/errors.js.map +0 -1
  932. package/build/component/m365/launchHelper.d.ts +0 -12
  933. package/build/component/m365/launchHelper.d.ts.map +0 -1
  934. package/build/component/m365/launchHelper.js.map +0 -1
  935. package/build/component/m365/packageService.d.ts.map +0 -1
  936. package/build/component/m365/packageService.js.map +0 -1
  937. package/build/component/m365/serviceConstant.d.ts +0 -3
  938. package/build/component/m365/serviceConstant.d.ts.map +0 -1
  939. package/build/component/m365/serviceConstant.js +0 -8
  940. package/build/component/m365/serviceConstant.js.map +0 -1
  941. package/build/component/utils/envFunctionUtils.d.ts +0 -12
  942. package/build/component/utils/envFunctionUtils.d.ts.map +0 -1
  943. package/build/component/utils/envFunctionUtils.js +0 -185
  944. package/build/component/utils/envFunctionUtils.js.map +0 -1
  945. package/build/question/inputs/SyncManifestInputs.d.ts +0 -16
  946. package/build/question/inputs/SyncManifestInputs.d.ts.map +0 -1
  947. package/build/question/inputs/SyncManifestInputs.js.map +0 -1
  948. package/build/question/inputs/UninstallInputs.d.ts +0 -22
  949. package/build/question/inputs/UninstallInputs.d.ts.map +0 -1
  950. package/build/question/inputs/UninstallInputs.js +0 -5
  951. package/build/question/inputs/UninstallInputs.js.map +0 -1
  952. package/build/question/options/SyncManifestOptions.d.ts +0 -10
  953. package/build/question/options/SyncManifestOptions.d.ts.map +0 -1
  954. package/build/question/options/SyncManifestOptions.js +0 -28
  955. package/build/question/options/SyncManifestOptions.js.map +0 -1
  956. package/build/question/options/UninstallOptions.d.ts +0 -10
  957. package/build/question/options/UninstallOptions.d.ts.map +0 -1
  958. package/build/question/options/UninstallOptions.js +0 -44
  959. package/build/question/options/UninstallOptions.js.map +0 -1
  960. package/build/tsconfig.tsbuildinfo +0 -1
  961. package/resource/dict.zip +0 -0
  962. package/resource/yaml-schema/v1.6/yaml.schema.json +0 -1842
  963. package/resource/yaml-schema/v1.7/yaml.schema.json +0 -1842
  964. /package/build/{component → common}/deps-checker/checkerFactory.d.ts +0 -0
  965. /package/build/{component → common}/deps-checker/checkerFactory.js +0 -0
  966. /package/build/{component → common}/deps-checker/constant/index.d.ts +0 -0
  967. /package/build/{component → common}/deps-checker/constant/index.js +0 -0
  968. /package/build/{component → common}/deps-checker/constant/message.d.ts +0 -0
  969. /package/build/{component → common}/deps-checker/constant/telemetry.d.ts +0 -0
  970. /package/build/{component → common}/deps-checker/constant/telemetry.js +0 -0
  971. /package/build/{component → common}/deps-checker/coreDepsLoggerAdapter.d.ts +0 -0
  972. /package/build/{component → common}/deps-checker/coreDepsLoggerAdapter.js +0 -0
  973. /package/build/{component → common}/deps-checker/coreDepsTelemetryAdapter.d.ts +0 -0
  974. /package/build/{component → common}/deps-checker/depsChecker.d.ts +0 -0
  975. /package/build/{component → common}/deps-checker/depsChecker.js +0 -0
  976. /package/build/{component → common}/deps-checker/depsError.d.ts +0 -0
  977. /package/build/{component → common}/deps-checker/depsError.js +0 -0
  978. /package/build/{component → common}/deps-checker/depsLogger.d.ts +0 -0
  979. /package/build/{component → common}/deps-checker/depsLogger.js +0 -0
  980. /package/build/{component → common}/deps-checker/depsManager.d.ts +0 -0
  981. /package/build/{component → common}/deps-checker/depsManager.js +0 -0
  982. /package/build/{component → common}/deps-checker/depsTelemetry.d.ts +0 -0
  983. /package/build/{component → common}/deps-checker/depsTelemetry.js +0 -0
  984. /package/build/{component → common}/deps-checker/index.d.ts +0 -0
  985. /package/build/{component → common}/deps-checker/index.js +0 -0
  986. /package/build/{component → common}/deps-checker/internal/dotnetChecker.d.ts +0 -0
  987. /package/build/{component → common}/deps-checker/internal/funcToolChecker.d.ts +0 -0
  988. /package/build/{component → common}/deps-checker/internal/nodeChecker.d.ts +0 -0
  989. /package/build/{component → common}/deps-checker/internal/nodeChecker.js +0 -0
  990. /package/build/{component → common}/deps-checker/internal/testToolChecker.d.ts +0 -0
  991. /package/build/{component → common}/deps-checker/internal/vxTestAppChecker.d.ts +0 -0
  992. /package/build/{component → common}/deps-checker/util/cpUtils.d.ts +0 -0
  993. /package/build/{component → common}/deps-checker/util/cpUtils.js +0 -0
  994. /package/build/{component → common}/deps-checker/util/downloadHelper.d.ts +0 -0
  995. /package/build/{component → common}/deps-checker/util/downloadHelper.js +0 -0
  996. /package/build/{component → common}/deps-checker/util/fileHelper.d.ts +0 -0
  997. /package/build/{component → common}/deps-checker/util/fileHelper.js +0 -0
  998. /package/build/{component → common}/deps-checker/util/index.d.ts +0 -0
  999. /package/build/{component → common}/deps-checker/util/index.js +0 -0
  1000. /package/build/{component → common}/deps-checker/util/progressIndicator.d.ts +0 -0
  1001. /package/build/{component → common}/deps-checker/util/progressIndicator.js +0 -0
  1002. /package/build/{component → common}/deps-checker/util/system.d.ts +0 -0
  1003. /package/build/{component → common}/deps-checker/util/system.js +0 -0
  1004. /package/build/{component → common}/local/index.d.ts +0 -0
  1005. /package/build/{component → common}/local/index.js +0 -0
  1006. /package/build/{component → common}/local/localCertificateManager.d.ts +0 -0
  1007. /package/build/{component → common}/local/localEnvManager.d.ts +0 -0
  1008. /package/build/{component → common}/local/localTelemetryReporter.d.ts +0 -0
  1009. /package/build/{component → common}/local/npmLogHelper.d.ts +0 -0
  1010. /package/build/{component → common}/local/npmLogHelper.js +0 -0
  1011. /package/build/{component → common}/local/packageJsonHelper.d.ts +0 -0
  1012. /package/build/{component → common}/local/packageJsonHelper.js +0 -0
  1013. /package/build/{component → common}/local/portChecker.d.ts +0 -0
  1014. /package/build/{component → common}/local/process.d.ts +0 -0
  1015. /package/build/{component → common}/local/process.js +0 -0
  1016. /package/build/{component → common}/local/taskDefinition.d.ts +0 -0
  1017. /package/build/{component → common}/m365/errors.d.ts +0 -0
  1018. /package/build/{component → common}/m365/packageService.d.ts +0 -0
@@ -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.createSampleProjectQuestionNode = exports.createProjectQuestionNode = exports.capabilitySubTree = exports.pluginApiSpecQuestion = exports.pluginManifestQuestion = exports.apiPluginStartQuestion = exports.apiOperationQuestion = exports.apiAuthQuestion = exports.apiSpecLocationQuestion = exports.appNameQuestion = exports.getSolutionName = exports.folderQuestion = exports.programmingLanguageQuestion = exports.getLanguageOptions = exports.getOfficeAddinTemplateConfig = exports.getOfficeAddinFramework = exports.getAddinFrameworkOptions = exports.officeAddinFrameworkQuestion = exports.SPFxImportFolderQuestion = exports.SPFxWebpartNameQuestion = exports.SPFxFrameworkQuestion = exports.SPFxPackageSelectQuestion = exports.meArchitectureQuestion = exports.capabilityQuestion = exports.isFromDevPortal = exports.getProjectTypeAndCapability = exports.projectTypeQuestion = void 0;
5
+ exports.createProjectCliHelpNode = exports.createSampleProjectQuestionNode = exports.createProjectQuestionNode = exports.capabilitySubTree = exports.CustomCopilotAssistantOptions = exports.CustomCopilotRagOptions = exports.apiOperationQuestion = exports.apiMessageExtensionAuthQuestion = exports.openAIPluginManifestLocationQuestion = exports.apiSpecLocationQuestion = exports.ApiMessageExtensionAuthOptions = exports.RuntimeOptions = exports.appNameQuestion = exports.getSolutionName = exports.AppNamePattern = exports.folderQuestion = exports.programmingLanguageQuestion = exports.ProgrammingLanguage = exports.getLanguageOptions = exports.getOfficeAddinFramework = exports.getAddinFrameworkOptions = exports.officeAddinFrameworkQuestion = exports.officeAddinHostingQuestion = exports.SPFxImportFolderQuestion = exports.SPFxVersionOptionIds = exports.SPFxWebpartNameQuestion = exports.SPFxFrameworkQuestion = exports.SPFxPackageSelectQuestion = exports.NotificationTriggerOptions = exports.meArchitectureQuestion = exports.MeArchitectureOptions = exports.capabilityQuestion = exports.CapabilityOptions = exports.OfficeAddinHostOptions = exports.projectTypeQuestion = 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"));
@@ -13,250 +13,1045 @@ const path = tslib_1.__importStar(require("path"));
13
13
  const constants_1 = require("../common/constants");
14
14
  const correlator_1 = require("../common/correlator");
15
15
  const featureFlags_1 = require("../common/featureFlags");
16
- const globalVars_1 = require("../common/globalVars");
17
16
  const localizeUtils_1 = require("../common/localizeUtils");
18
17
  const samples_1 = require("../common/samples");
19
- const stringUtils_1 = require("../common/stringUtils");
20
- const utils_1 = require("../component/driver/teamsApp/utils/utils");
21
- const helper_1 = require("../component/generator/apiSpec/helper");
18
+ const utils_1 = require("../common/utils");
19
+ const developerPortalScaffoldUtils_1 = require("../component/developerPortalScaffoldUtils");
20
+ const utils_2 = require("../component/driver/teamsApp/utils/utils");
21
+ const helper_1 = require("../component/generator/copilotPlugin/helper");
22
22
  const projectConfig_1 = require("../component/generator/officeXMLAddin/projectConfig");
23
23
  const error_1 = require("../component/generator/spfx/error");
24
24
  const constants_2 = require("../component/generator/spfx/utils/constants");
25
- const utils_2 = require("../component/generator/spfx/utils/utils");
25
+ const utils_3 = require("../component/generator/spfx/utils/utils");
26
+ const utils_4 = require("../component/utils");
26
27
  const error_2 = require("../error");
27
28
  const constants_3 = require("./constants");
28
- const m365_spec_parser_1 = require("@microsoft/m365-spec-parser");
29
- const PluginManifestUtils_1 = require("../component/driver/teamsApp/utils/PluginManifestUtils");
30
- const helper_2 = require("../component/generator/copilotExtension/helper");
31
- const telemetry_1 = require("../common/telemetry");
29
+ const questionNames_1 = require("./questionNames");
30
+ const util_1 = require("./util");
31
+ class ScratchOptions {
32
+ static yes() {
33
+ return {
34
+ id: "yes",
35
+ label: localizeUtils_1.getLocalizedString("core.ScratchOptionYes.label"),
36
+ detail: localizeUtils_1.getLocalizedString("core.ScratchOptionYes.detail"),
37
+ };
38
+ }
39
+ static no() {
40
+ return {
41
+ id: "no",
42
+ label: localizeUtils_1.getLocalizedString("core.ScratchOptionNo.label"),
43
+ detail: localizeUtils_1.getLocalizedString("core.ScratchOptionNo.detail"),
44
+ };
45
+ }
46
+ static all() {
47
+ return [ScratchOptions.yes(), ScratchOptions.no()];
48
+ }
49
+ }
50
+ exports.ScratchOptions = ScratchOptions;
51
+ class ProjectTypeOptions {
52
+ static getCreateGroupName() {
53
+ return featureFlags_1.isChatParticipantEnabled()
54
+ ? localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.createGroup.title")
55
+ : undefined;
56
+ }
57
+ static tab(platform) {
58
+ return {
59
+ id: "tab-type",
60
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(browser) " : ""}${localizeUtils_1.getLocalizedString("core.TabOption.label")}`,
61
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.tab.detail"),
62
+ groupName: ProjectTypeOptions.getCreateGroupName(),
63
+ };
64
+ }
65
+ static bot(platform) {
66
+ return {
67
+ id: "bot-type",
68
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(hubot) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.bot.label")}`,
69
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.bot.detail"),
70
+ groupName: ProjectTypeOptions.getCreateGroupName(),
71
+ };
72
+ }
73
+ static me(platform) {
74
+ return {
75
+ id: "me-type",
76
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(symbol-keyword) " : ""}${localizeUtils_1.getLocalizedString("core.MessageExtensionOption.label")}`,
77
+ detail: featureFlags_1.isCopilotPluginEnabled()
78
+ ? localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.messageExtension.copilotEnabled.detail")
79
+ : localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.messageExtension.detail"),
80
+ groupName: ProjectTypeOptions.getCreateGroupName(),
81
+ };
82
+ }
83
+ static outlookAddin(platform) {
84
+ return {
85
+ id: "outlook-addin-type",
86
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(mail) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.label")}`,
87
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.detail"),
88
+ groupName: ProjectTypeOptions.getCreateGroupName(),
89
+ };
90
+ }
91
+ static officeXMLAddin(platform) {
92
+ return {
93
+ id: "office-xml-addin-type",
94
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(teamsfx-m365) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.mainEntry.title")}`,
95
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.mainEntry.detail"),
96
+ groupName: ProjectTypeOptions.getCreateGroupName(),
97
+ };
98
+ }
99
+ static officeAddin(platform) {
100
+ return {
101
+ id: "office-addin-type",
102
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(extensions) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.label")}`,
103
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.detail"),
104
+ groupName: ProjectTypeOptions.getCreateGroupName(),
105
+ };
106
+ }
107
+ static officeAddinAllIds(platform) {
108
+ return [
109
+ ProjectTypeOptions.officeAddin(platform).id,
110
+ ProjectTypeOptions.officeXMLAddin(platform).id,
111
+ ProjectTypeOptions.outlookAddin(platform).id,
112
+ ];
113
+ }
114
+ static copilotPlugin(platform) {
115
+ return {
116
+ id: "copilot-plugin-type",
117
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(teamsfx-copilot-plugin) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.label")}`,
118
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.detail"),
119
+ groupName: ProjectTypeOptions.getCreateGroupName(),
120
+ };
121
+ }
122
+ static customCopilot(platform) {
123
+ return {
124
+ id: "custom-copilot-type",
125
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(teamsfx-custom-copilot) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.label")}`,
126
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.detail"),
127
+ groupName: ProjectTypeOptions.getCreateGroupName(),
128
+ };
129
+ }
130
+ static startWithGithubCopilot() {
131
+ return {
132
+ id: "start-with-github-copilot",
133
+ label: `$(comment-discussion) ${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotHelp.label")}`,
134
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotHelp.detail"),
135
+ groupName: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotGroup.title"),
136
+ };
137
+ }
138
+ static customizeGpt() {
139
+ return {
140
+ id: "customize-gpt-type",
141
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.declarativeCopilot.label"),
142
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.declarativeCopilot.title"),
143
+ groupName: ProjectTypeOptions.getCreateGroupName(),
144
+ };
145
+ }
146
+ }
147
+ exports.ProjectTypeOptions = ProjectTypeOptions;
32
148
  function projectTypeQuestion() {
33
149
  const staticOptions = [
34
- constants_3.ProjectTypeOptions.bot(teamsfx_api_1.Platform.CLI),
35
- constants_3.ProjectTypeOptions.tab(teamsfx_api_1.Platform.CLI),
36
- constants_3.ProjectTypeOptions.me(teamsfx_api_1.Platform.CLI),
37
- constants_3.ProjectTypeOptions.officeAddin(teamsfx_api_1.Platform.CLI),
38
- constants_3.ProjectTypeOptions.outlookAddin(teamsfx_api_1.Platform.CLI),
150
+ ProjectTypeOptions.bot(teamsfx_api_1.Platform.CLI),
151
+ ProjectTypeOptions.tab(teamsfx_api_1.Platform.CLI),
152
+ ProjectTypeOptions.me(teamsfx_api_1.Platform.CLI),
153
+ ProjectTypeOptions.officeXMLAddin(teamsfx_api_1.Platform.CLI),
154
+ ProjectTypeOptions.officeAddin(teamsfx_api_1.Platform.CLI),
155
+ ProjectTypeOptions.outlookAddin(teamsfx_api_1.Platform.CLI),
39
156
  ];
40
157
  return {
41
- name: constants_3.QuestionNames.ProjectType,
42
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.title"),
158
+ name: questionNames_1.QuestionNames.ProjectType,
159
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.title"),
43
160
  type: "singleSelect",
44
161
  staticOptions: staticOptions,
45
162
  dynamicOptions: (inputs) => {
46
163
  var _a;
47
164
  const staticOptions = [];
48
- staticOptions.push(constants_3.ProjectTypeOptions.copilotExtension(inputs.platform));
49
- if ((0, constants_3.getRuntime)(inputs) === constants_3.RuntimeOptions.NodeJS().id) {
50
- staticOptions.push(constants_3.ProjectTypeOptions.customCopilot(inputs.platform));
165
+ if (teamsfx_api_1.CLIPlatforms.includes(inputs.platform) &&
166
+ featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.CustomizeGpt)) {
167
+ // Show in CLI only
168
+ staticOptions.push(ProjectTypeOptions.customizeGpt());
169
+ }
170
+ if (featureFlags_1.isApiCopilotPluginEnabled()) {
171
+ staticOptions.push(ProjectTypeOptions.copilotPlugin(inputs.platform));
51
172
  }
52
- staticOptions.push(constants_3.ProjectTypeOptions.bot(inputs.platform), constants_3.ProjectTypeOptions.tab(inputs.platform), constants_3.ProjectTypeOptions.me(inputs.platform));
53
- if (isFromDevPortal(inputs)) {
54
- const projectType = (_a = getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.projectType;
173
+ staticOptions.push(ProjectTypeOptions.customCopilot(inputs.platform));
174
+ staticOptions.push(ProjectTypeOptions.bot(inputs.platform), ProjectTypeOptions.tab(inputs.platform), ProjectTypeOptions.me(inputs.platform));
175
+ if (developerPortalScaffoldUtils_1.isFromDevPortal(inputs)) {
176
+ const projectType = (_a = developerPortalScaffoldUtils_1.getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.projectType;
55
177
  if (projectType) {
56
178
  return [projectType];
57
179
  }
58
180
  }
59
- else if ((0, constants_3.getRuntime)(inputs) === constants_3.RuntimeOptions.NodeJS().id) {
60
- if (featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.OfficeMetaOS)) {
61
- staticOptions.push(constants_3.ProjectTypeOptions.officeMetaOS(inputs.platform));
62
- }
63
- else if (featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.OfficeAddin)) {
64
- staticOptions.push(constants_3.ProjectTypeOptions.officeAddin(inputs.platform));
181
+ else {
182
+ if (inputs.agent === "office") {
183
+ //only for @office agent, officeXMLAddin are supported
184
+ staticOptions.push(ProjectTypeOptions.officeXMLAddin(inputs.platform));
65
185
  }
66
186
  else {
67
- staticOptions.push(constants_3.ProjectTypeOptions.outlookAddin(inputs.platform));
187
+ if (featureFlags_1.isOfficeJSONAddinEnabled()) {
188
+ staticOptions.push(ProjectTypeOptions.officeAddin(inputs.platform));
189
+ }
190
+ else {
191
+ staticOptions.push(ProjectTypeOptions.outlookAddin(inputs.platform));
192
+ }
68
193
  }
69
194
  }
70
195
  if (inputs.platform === teamsfx_api_1.Platform.VSCode &&
71
- featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.ChatParticipantUIEntries) &&
196
+ featureFlags_1.isChatParticipantEnabled() &&
72
197
  !inputs.teamsAppFromTdp) {
73
- staticOptions.push(constants_3.ProjectTypeOptions.startWithGithubCopilot());
198
+ staticOptions.push(ProjectTypeOptions.startWithGithubCopilot());
74
199
  }
75
200
  return staticOptions;
76
201
  },
77
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.getCreateNewOrFromSampleQuestion.placeholder"),
202
+ placeholder: localizeUtils_1.getLocalizedString("core.getCreateNewOrFromSampleQuestion.placeholder"),
78
203
  forgetLastValue: true,
79
204
  skipSingleOption: true,
80
205
  };
81
206
  }
82
207
  exports.projectTypeQuestion = projectTypeQuestion;
83
- function getProjectTypeAndCapability(teamsApp) {
84
- // tab with bot, tab with message extension, tab with bot and message extension
85
- if ((0, utils_1.needTabAndBotCode)(teamsApp)) {
86
- return { projectType: "tab-bot-type", templateId: constants_3.CapabilityOptions.nonSsoTabAndBot().id };
208
+ class OfficeAddinHostOptions {
209
+ static all(platform) {
210
+ return [
211
+ OfficeAddinHostOptions.outlook(platform),
212
+ OfficeAddinHostOptions.word(),
213
+ OfficeAddinHostOptions.excel(),
214
+ OfficeAddinHostOptions.powerpoint(),
215
+ ];
87
216
  }
88
- // tab only
89
- if ((0, utils_1.needTabCode)(teamsApp)) {
90
- return { projectType: "tab-type", templateId: constants_3.CapabilityOptions.nonSsoTab().id };
217
+ static outlook(platform) {
218
+ return {
219
+ id: "outlook",
220
+ label: `${platform === teamsfx_api_1.Platform.VSCode ? "$(mail) " : ""}${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.label")}`,
221
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.detail"),
222
+ data: "Outlook",
223
+ };
91
224
  }
92
- // bot and message extension
93
- if ((0, utils_1.isBotAndBotBasedMessageExtension)(teamsApp)) {
94
- return { projectType: "bot-me-type", templateId: constants_3.CapabilityOptions.botAndMe().id };
225
+ static word() {
226
+ return {
227
+ id: "word",
228
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.title"),
229
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.detail"),
230
+ data: "Word",
231
+ };
95
232
  }
96
- // bot based message extension
97
- if ((0, utils_1.isBotBasedMessageExtension)(teamsApp)) {
98
- return { projectType: "me-type", templateId: constants_3.CapabilityOptions.me().id };
233
+ static excel() {
234
+ return {
235
+ id: "excel",
236
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.title"),
237
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.detail"),
238
+ data: "Excel",
239
+ };
99
240
  }
100
- // bot
101
- if ((0, utils_1.isBot)(teamsApp)) {
102
- return { projectType: "bot-type", templateId: constants_3.CapabilityOptions.basicBot().id };
241
+ static powerpoint() {
242
+ return {
243
+ id: "powerpoint",
244
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.title"),
245
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.detail"),
246
+ data: "PowerPoint",
247
+ };
103
248
  }
104
- return undefined;
105
249
  }
106
- exports.getProjectTypeAndCapability = getProjectTypeAndCapability;
107
- function isFromDevPortal(inputs) {
108
- return !!(inputs === null || inputs === void 0 ? void 0 : inputs.teamsAppFromTdp);
250
+ exports.OfficeAddinHostOptions = OfficeAddinHostOptions;
251
+ class CapabilityOptions {
252
+ // bot
253
+ static basicBot() {
254
+ return {
255
+ id: "bot",
256
+ label: `${localizeUtils_1.getLocalizedString("core.BotNewUIOption.label")}`,
257
+ detail: localizeUtils_1.getLocalizedString("core.BotNewUIOption.detail"),
258
+ };
259
+ }
260
+ static notificationBot() {
261
+ return {
262
+ // For default option, id and cliName must be the same
263
+ id: "notification",
264
+ label: `${localizeUtils_1.getLocalizedString("core.NotificationOption.label")}`,
265
+ detail: localizeUtils_1.getLocalizedString("core.NotificationOption.detail"),
266
+ data: "https://aka.ms/teamsfx-send-notification",
267
+ buttons: [
268
+ {
269
+ iconPath: "file-symlink-file",
270
+ tooltip: localizeUtils_1.getLocalizedString("core.option.github"),
271
+ command: "fx-extension.openTutorial",
272
+ },
273
+ ],
274
+ };
275
+ }
276
+ static commandBot() {
277
+ return {
278
+ // id must match cli `yargsHelp`
279
+ id: "command-bot",
280
+ label: `${localizeUtils_1.getLocalizedString("core.CommandAndResponseOption.label")}`,
281
+ detail: localizeUtils_1.getLocalizedString("core.CommandAndResponseOption.detail"),
282
+ data: "https://aka.ms/teamsfx-create-command",
283
+ buttons: [
284
+ {
285
+ iconPath: "file-symlink-file",
286
+ tooltip: localizeUtils_1.getLocalizedString("core.option.github"),
287
+ command: "fx-extension.openTutorial",
288
+ },
289
+ ],
290
+ };
291
+ }
292
+ static workflowBot(inputs) {
293
+ const item = {
294
+ // id must match cli `yargsHelp`
295
+ id: "workflow-bot",
296
+ label: `${localizeUtils_1.getLocalizedString("core.WorkflowOption.label")}`,
297
+ detail: localizeUtils_1.getLocalizedString("core.WorkflowOption.detail"),
298
+ data: "https://aka.ms/teamsfx-create-workflow",
299
+ buttons: [
300
+ {
301
+ iconPath: "file-symlink-file",
302
+ tooltip: localizeUtils_1.getLocalizedString("core.option.github"),
303
+ command: "fx-extension.openTutorial",
304
+ },
305
+ ],
306
+ };
307
+ if (inputs === null || inputs === void 0 ? void 0 : inputs.inProductDoc) {
308
+ item.data = "cardActionResponse";
309
+ item.buttons = [
310
+ {
311
+ iconPath: "file-code",
312
+ tooltip: localizeUtils_1.getLocalizedString("core.option.inProduct"),
313
+ command: "fx-extension.openTutorial",
314
+ },
315
+ ];
316
+ }
317
+ return item;
318
+ }
319
+ //tab
320
+ static nonSsoTab() {
321
+ return {
322
+ id: "tab-non-sso",
323
+ label: `${localizeUtils_1.getLocalizedString("core.TabNonSso.label")}`,
324
+ detail: localizeUtils_1.getLocalizedString("core.TabNonSso.detail"),
325
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
326
+ };
327
+ }
328
+ static tab() {
329
+ return {
330
+ id: "tab",
331
+ label: localizeUtils_1.getLocalizedString("core.TabOption.label"),
332
+ description: localizeUtils_1.getLocalizedString("core.TabOption.description"),
333
+ detail: localizeUtils_1.getLocalizedString("core.TabOption.detail"),
334
+ };
335
+ }
336
+ static m365SsoLaunchPage() {
337
+ return {
338
+ id: "sso-launch-page",
339
+ label: `${localizeUtils_1.getLocalizedString("core.M365SsoLaunchPageOptionItem.label")}`,
340
+ detail: localizeUtils_1.getLocalizedString("core.M365SsoLaunchPageOptionItem.detail"),
341
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
342
+ };
343
+ }
344
+ static dashboardTab() {
345
+ return {
346
+ id: "dashboard-tab",
347
+ label: `${localizeUtils_1.getLocalizedString("core.DashboardOption.label")}`,
348
+ detail: localizeUtils_1.getLocalizedString("core.DashboardOption.detail"),
349
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
350
+ data: "https://aka.ms/teamsfx-dashboard-app",
351
+ buttons: [
352
+ {
353
+ iconPath: "file-symlink-file",
354
+ tooltip: localizeUtils_1.getLocalizedString("core.option.github"),
355
+ command: "fx-extension.openTutorial",
356
+ },
357
+ ],
358
+ };
359
+ }
360
+ static SPFxTab() {
361
+ return {
362
+ id: "tab-spfx",
363
+ label: localizeUtils_1.getLocalizedString("core.TabSPFxOption.labelNew"),
364
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
365
+ detail: localizeUtils_1.getLocalizedString("core.TabSPFxOption.detailNew"),
366
+ };
367
+ }
368
+ //message extension
369
+ static linkUnfurling() {
370
+ return {
371
+ id: "link-unfurling",
372
+ label: `${localizeUtils_1.getLocalizedString("core.LinkUnfurlingOption.label")}`,
373
+ detail: localizeUtils_1.getLocalizedString("core.LinkUnfurlingOption.detail"),
374
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlook"),
375
+ };
376
+ }
377
+ static m365SearchMe() {
378
+ return {
379
+ id: "search-app",
380
+ label: `${localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.label")}`,
381
+ detail: featureFlags_1.isCopilotPluginEnabled()
382
+ ? localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.copilot.detail")
383
+ : localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.detail"),
384
+ };
385
+ }
386
+ static SearchMe() {
387
+ return {
388
+ id: "search-message-extension",
389
+ label: `${localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.label")}`,
390
+ detail: localizeUtils_1.getLocalizedString("core.SearchAppOptionItem.detail"),
391
+ };
392
+ }
393
+ static collectFormMe() {
394
+ return {
395
+ id: "collect-form-message-extension",
396
+ label: `${localizeUtils_1.getLocalizedString("core.MessageExtensionOption.labelNew")}`,
397
+ detail: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.detail"),
398
+ };
399
+ }
400
+ static me() {
401
+ return {
402
+ id: "message-extension",
403
+ label: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.label"),
404
+ description: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.description"),
405
+ detail: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.detail"),
406
+ };
407
+ }
408
+ static bots(inputs) {
409
+ if ((inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.VS) {
410
+ return [
411
+ CapabilityOptions.basicBot(),
412
+ CapabilityOptions.aiBot(),
413
+ CapabilityOptions.aiAssistantBot(),
414
+ CapabilityOptions.notificationBot(),
415
+ CapabilityOptions.commandBot(),
416
+ CapabilityOptions.workflowBot(inputs),
417
+ ];
418
+ }
419
+ return [
420
+ CapabilityOptions.basicBot(),
421
+ CapabilityOptions.notificationBot(),
422
+ CapabilityOptions.commandBot(),
423
+ CapabilityOptions.workflowBot(inputs),
424
+ ];
425
+ }
426
+ static tabs() {
427
+ return [
428
+ CapabilityOptions.nonSsoTab(),
429
+ CapabilityOptions.m365SsoLaunchPage(),
430
+ CapabilityOptions.dashboardTab(),
431
+ CapabilityOptions.SPFxTab(),
432
+ ];
433
+ }
434
+ static dotnetCaps(inputs) {
435
+ const capabilities = [
436
+ ...CapabilityOptions.copilotPlugins(),
437
+ ...CapabilityOptions.bots(inputs),
438
+ CapabilityOptions.nonSsoTab(),
439
+ CapabilityOptions.tab(),
440
+ ...CapabilityOptions.collectMECaps(),
441
+ ];
442
+ if (featureFlags_1.isTdpTemplateCliTestEnabled()) {
443
+ capabilities.push(CapabilityOptions.me());
444
+ }
445
+ return capabilities;
446
+ }
447
+ /**
448
+ * Collect all capabilities for message extension, including dotnet and nodejs.
449
+ * @returns OptionItem[] capability list
450
+ */
451
+ static collectMECaps() {
452
+ return [
453
+ CapabilityOptions.m365SearchMe(),
454
+ CapabilityOptions.collectFormMe(),
455
+ CapabilityOptions.SearchMe(),
456
+ CapabilityOptions.linkUnfurling(),
457
+ ];
458
+ }
459
+ static mes(inputs) {
460
+ return inputs !== undefined && getRuntime(inputs) === RuntimeOptions.DotNet().id
461
+ ? [
462
+ CapabilityOptions.SearchMe(),
463
+ CapabilityOptions.collectFormMe(),
464
+ CapabilityOptions.linkUnfurling(),
465
+ ]
466
+ : [
467
+ CapabilityOptions.m365SearchMe(),
468
+ CapabilityOptions.collectFormMe(),
469
+ CapabilityOptions.linkUnfurling(),
470
+ ];
471
+ }
472
+ static officeAddinStaticCapabilities(host) {
473
+ const items = [];
474
+ for (const h of Object.keys(projectConfig_1.OfficeAddinProjectConfig)) {
475
+ if (host && h !== host)
476
+ continue;
477
+ const hostValue = projectConfig_1.OfficeAddinProjectConfig[h];
478
+ for (const capability of Object.keys(hostValue)) {
479
+ const capabilityValue = hostValue[capability];
480
+ items.push({
481
+ id: capability,
482
+ label: localizeUtils_1.getLocalizedString(capabilityValue.title),
483
+ detail: localizeUtils_1.getLocalizedString(capabilityValue.detail),
484
+ });
485
+ }
486
+ }
487
+ return items;
488
+ }
489
+ static officeAddinDynamicCapabilities(projectType, host) {
490
+ const items = [];
491
+ const isOutlookAddin = projectType === ProjectTypeOptions.outlookAddin().id;
492
+ const isOfficeAddin = projectType === ProjectTypeOptions.officeAddin().id;
493
+ const isOfficeXMLAddinForOutlook = projectType === ProjectTypeOptions.officeXMLAddin().id &&
494
+ host === OfficeAddinHostOptions.outlook().id;
495
+ const pushToItems = (option) => {
496
+ const capabilityValue = projectConfig_1.OfficeAddinProjectConfig.json[option];
497
+ items.push({
498
+ id: option,
499
+ label: localizeUtils_1.getLocalizedString(capabilityValue.title),
500
+ detail: localizeUtils_1.getLocalizedString(capabilityValue.detail),
501
+ });
502
+ };
503
+ if (isOutlookAddin || isOfficeAddin || isOfficeXMLAddinForOutlook) {
504
+ pushToItems("json-taskpane");
505
+ if (isOutlookAddin || isOfficeXMLAddinForOutlook) {
506
+ items.push(CapabilityOptions.outlookAddinImport());
507
+ }
508
+ else if (isOfficeAddin) {
509
+ items.push(CapabilityOptions.officeContentAddin());
510
+ items.push(CapabilityOptions.officeAddinImport());
511
+ }
512
+ }
513
+ else {
514
+ if (host) {
515
+ const hostValue = projectConfig_1.OfficeAddinProjectConfig[host];
516
+ for (const capability of Object.keys(hostValue)) {
517
+ const capabilityValue = hostValue[capability];
518
+ items.push({
519
+ id: capability,
520
+ label: localizeUtils_1.getLocalizedString(capabilityValue.title),
521
+ detail: localizeUtils_1.getLocalizedString(capabilityValue.detail),
522
+ });
523
+ }
524
+ }
525
+ }
526
+ return items;
527
+ }
528
+ static copilotPlugins() {
529
+ return [
530
+ CapabilityOptions.copilotPluginNewApi(),
531
+ CapabilityOptions.copilotPluginApiSpec(),
532
+ // CapabilityOptions.copilotPluginOpenAIPlugin(),
533
+ ];
534
+ }
535
+ static customCopilots() {
536
+ return [
537
+ CapabilityOptions.customCopilotBasic(),
538
+ CapabilityOptions.customCopilotRag(),
539
+ CapabilityOptions.customCopilotAssistant(),
540
+ ];
541
+ }
542
+ static tdpIntegrationCapabilities() {
543
+ // templates that are used by TDP integration only
544
+ return [
545
+ CapabilityOptions.me(),
546
+ CapabilityOptions.botAndMe(),
547
+ CapabilityOptions.nonSsoTabAndBot(),
548
+ ];
549
+ }
550
+ static customizeGptOptions() {
551
+ return [CapabilityOptions.customizeGptBasic(), CapabilityOptions.customizeGptWithPlugin()];
552
+ }
553
+ /**
554
+ * static capability list, which does not depend on any feature flags
555
+ */
556
+ static staticAll(inputs) {
557
+ const capabilityOptions = [
558
+ ...CapabilityOptions.bots(inputs),
559
+ ...CapabilityOptions.tabs(),
560
+ ...CapabilityOptions.collectMECaps(),
561
+ ...CapabilityOptions.copilotPlugins(),
562
+ ...CapabilityOptions.customCopilots(),
563
+ ...CapabilityOptions.tdpIntegrationCapabilities(),
564
+ ...CapabilityOptions.customizeGptOptions(),
565
+ ];
566
+ capabilityOptions.push(...CapabilityOptions.officeAddinStaticCapabilities());
567
+ return capabilityOptions;
568
+ }
569
+ /**
570
+ * dynamic capability list, which depends on feature flags
571
+ */
572
+ static all(inputs) {
573
+ const capabilityOptions = [
574
+ ...CapabilityOptions.bots(inputs),
575
+ ...CapabilityOptions.tabs(),
576
+ ...CapabilityOptions.collectMECaps(),
577
+ ];
578
+ if (featureFlags_1.isApiCopilotPluginEnabled()) {
579
+ capabilityOptions.push(...CapabilityOptions.copilotPlugins());
580
+ }
581
+ if (featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.CustomizeGpt)) {
582
+ capabilityOptions.push(...CapabilityOptions.customizeGptOptions());
583
+ }
584
+ capabilityOptions.push(...CapabilityOptions.customCopilots());
585
+ if (featureFlags_1.isTdpTemplateCliTestEnabled()) {
586
+ // test templates that are used by TDP integration only
587
+ capabilityOptions.push(...CapabilityOptions.tdpIntegrationCapabilities());
588
+ }
589
+ capabilityOptions.push(...CapabilityOptions.officeAddinDynamicCapabilities(inputs === null || inputs === void 0 ? void 0 : inputs.projectType, inputs === null || inputs === void 0 ? void 0 : inputs.host));
590
+ return capabilityOptions;
591
+ }
592
+ static outlookAddinImport() {
593
+ return {
594
+ id: "outlook-addin-import",
595
+ label: localizeUtils_1.getLocalizedString("core.importAddin.label"),
596
+ detail: localizeUtils_1.getLocalizedString("core.importAddin.detail"),
597
+ };
598
+ }
599
+ static officeAddinImport() {
600
+ return {
601
+ id: "office-addin-import",
602
+ label: localizeUtils_1.getLocalizedString("core.importOfficeAddin.label"),
603
+ detail: localizeUtils_1.getLocalizedString("core.importAddin.detail"),
604
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
605
+ };
606
+ }
607
+ static officeContentAddin() {
608
+ return {
609
+ id: "office-content-addin",
610
+ label: localizeUtils_1.getLocalizedString("core.officeContentAddin.label"),
611
+ detail: localizeUtils_1.getLocalizedString("core.officeContentAddin.detail"),
612
+ };
613
+ }
614
+ // static officeXMLAddinHostOptionItems(host: string): OptionItem[] {
615
+ // return getOfficeXMLAddinHostProjectOptions(host).map((x) => ({
616
+ // id: x.proj,
617
+ // label: getLocalizedString(x.title),
618
+ // detail: getLocalizedString(x.detail),
619
+ // }));
620
+ // }
621
+ // static jsonAddinTaskpane(): OptionItem {
622
+ // return {
623
+ // id: "json-taskpane",
624
+ // label: getLocalizedString("core.newTaskpaneAddin.label"),
625
+ // detail: getLocalizedString("core.newTaskpaneAddin.detail"),
626
+ // description: getLocalizedString(
627
+ // "core.createProjectQuestion.option.description.previewOnWindow"
628
+ // ),
629
+ // };
630
+ // }
631
+ // static officeAddinItems(): OptionItem[] {
632
+ // return officeAddinJsonData.getProjectTemplateNames().map((template) => ({
633
+ // id: template,
634
+ // label: getLocalizedString(officeAddinJsonData.getProjectDisplayName(template)),
635
+ // detail: getLocalizedString(officeAddinJsonData.getProjectDetails(template)),
636
+ // }));
637
+ // }
638
+ static nonSsoTabAndBot() {
639
+ return {
640
+ id: "TabNonSsoAndBot",
641
+ label: "", // No need to set display name as this option won't be shown in UI
642
+ };
643
+ }
644
+ static botAndMe() {
645
+ return {
646
+ id: "BotAndMessageExtension",
647
+ label: "", // No need to set display name as this option won't be shown in UI
648
+ };
649
+ }
650
+ // copilot plugin
651
+ static copilotPluginNewApi() {
652
+ return {
653
+ id: constants_3.copilotPluginNewApiOptionId,
654
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.label"),
655
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.detail"),
656
+ };
657
+ }
658
+ static copilotPluginApiSpec() {
659
+ return {
660
+ id: constants_3.copilotPluginApiSpecOptionId,
661
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.label"),
662
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.detail"),
663
+ };
664
+ }
665
+ static copilotPluginOpenAIPlugin() {
666
+ return {
667
+ id: constants_3.copilotPluginOpenAIPluginOptionId,
668
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginAIPluginOption.label"),
669
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginAIPluginOption.detail"),
670
+ };
671
+ }
672
+ static aiBot() {
673
+ return {
674
+ id: "ai-bot",
675
+ label: localizeUtils_1.getLocalizedString("core.aiBotOption.label"),
676
+ detail: localizeUtils_1.getLocalizedString("core.aiBotOption.detail"),
677
+ };
678
+ }
679
+ static aiAssistantBot() {
680
+ return {
681
+ id: "ai-assistant-bot",
682
+ label: localizeUtils_1.getLocalizedString("core.aiAssistantBotOption.label"),
683
+ detail: localizeUtils_1.getLocalizedString("core.aiAssistantBotOption.detail"),
684
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
685
+ };
686
+ }
687
+ // custom copilot
688
+ static customCopilotBasic() {
689
+ return {
690
+ id: "custom-copilot-basic",
691
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotBasicOption.label"),
692
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotBasicOption.detail"),
693
+ };
694
+ }
695
+ static customCopilotRag() {
696
+ return {
697
+ id: "custom-copilot-rag",
698
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagOption.label"),
699
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagOption.detail"),
700
+ };
701
+ }
702
+ static customCopilotAssistant() {
703
+ return {
704
+ id: "custom-copilot-agent",
705
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantOption.label"),
706
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantOption.detail"),
707
+ };
708
+ }
709
+ // customize GPT
710
+ static customizeGptBasic() {
711
+ return {
712
+ id: "basic-declarative-copilot",
713
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.declarativeCopilotBasic.title"),
714
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.declarativeCopilotBasic.detail"),
715
+ };
716
+ }
717
+ static customizeGptWithPlugin() {
718
+ return {
719
+ id: "declarative-copilot-with-plugin-from-scratch",
720
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.declarativeCopilotWithPlugin.title"),
721
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.declarativeCopilotWithPlugin.detail"),
722
+ };
723
+ }
109
724
  }
110
- exports.isFromDevPortal = isFromDevPortal;
725
+ exports.CapabilityOptions = CapabilityOptions;
111
726
  function capabilityQuestion() {
112
727
  return {
113
- name: constants_3.QuestionNames.Capabilities,
728
+ name: questionNames_1.QuestionNames.Capabilities,
114
729
  title: (inputs) => {
115
- const projectType = inputs[constants_3.QuestionNames.ProjectType];
730
+ const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
116
731
  switch (projectType) {
117
- case constants_3.ProjectTypeOptions.bot().id:
118
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.bot.title");
119
- case constants_3.ProjectTypeOptions.tab().id:
120
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.tab.title");
121
- case constants_3.ProjectTypeOptions.me().id:
122
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.messageExtension.title");
123
- case constants_3.ProjectTypeOptions.outlookAddin().id:
124
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.outlookAddin.title");
125
- case constants_3.ProjectTypeOptions.officeMetaOS().id:
126
- case constants_3.ProjectTypeOptions.officeAddin().id:
127
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.officeAddin.title");
128
- case constants_3.ProjectTypeOptions.copilotExtension().id:
129
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.title");
130
- case constants_3.ProjectTypeOptions.customCopilot().id:
131
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.customCopilot.title");
732
+ case ProjectTypeOptions.bot().id:
733
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.bot.title");
734
+ case ProjectTypeOptions.tab().id:
735
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.tab.title");
736
+ case ProjectTypeOptions.me().id:
737
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.messageExtension.title");
738
+ case ProjectTypeOptions.outlookAddin().id:
739
+ case ProjectTypeOptions.officeAddin().id:
740
+ case ProjectTypeOptions.officeXMLAddin().id: {
741
+ switch (inputs[questionNames_1.QuestionNames.OfficeAddinHost]) {
742
+ case OfficeAddinHostOptions.outlook().id:
743
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.title");
744
+ case OfficeAddinHostOptions.word().id:
745
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.create.title");
746
+ case OfficeAddinHostOptions.excel().id:
747
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.create.title");
748
+ case OfficeAddinHostOptions.powerpoint().id:
749
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.create.title");
750
+ }
751
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.title");
752
+ }
753
+ case ProjectTypeOptions.copilotPlugin().id:
754
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.title");
755
+ case ProjectTypeOptions.customCopilot().id:
756
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.title");
757
+ case ProjectTypeOptions.customizeGpt().id:
758
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.declarativeCopilotType.title");
132
759
  default:
133
- return (0, localizeUtils_1.getLocalizedString)("core.createCapabilityQuestion.titleNew");
760
+ return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.titleNew");
134
761
  }
135
762
  },
136
763
  cliDescription: "Specifies the Microsoft Teams App capability.",
137
- cliName: constants_3.CliQuestionName.Capability,
764
+ cliName: questionNames_1.CliQuestionName.Capability,
138
765
  cliShortName: "c",
139
766
  cliChoiceListCommand: "teamsapp list templates",
140
767
  type: "singleSelect",
141
- staticOptions: constants_3.CapabilityOptions.staticAll(),
768
+ staticOptions: CapabilityOptions.staticAll(),
142
769
  dynamicOptions: (inputs) => {
143
770
  var _a;
144
771
  // from dev portal
145
- if (isFromDevPortal(inputs)) {
146
- const capability = (_a = getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.templateId;
772
+ if (developerPortalScaffoldUtils_1.isFromDevPortal(inputs)) {
773
+ const capability = (_a = developerPortalScaffoldUtils_1.getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.templateId;
147
774
  if (capability) {
148
775
  return [capability];
149
776
  }
150
777
  }
151
778
  // dotnet capabilities
152
- if (inputs.platform === teamsfx_api_1.Platform.VS) {
153
- return constants_3.CapabilityOptions.dotnetCaps(inputs);
779
+ if (getRuntime(inputs) === RuntimeOptions.DotNet().id) {
780
+ return CapabilityOptions.dotnetCaps(inputs);
154
781
  }
155
782
  if (inputs.nonInteractive && inputs.platform === teamsfx_api_1.Platform.CLI) {
156
783
  //cli non-interactive mode the choice list is the same as staticOptions
157
- return constants_3.CapabilityOptions.all(inputs);
784
+ return CapabilityOptions.all(inputs);
158
785
  }
159
- // capabilities if VSC or CLI interactive mode
160
- const projectType = inputs[constants_3.QuestionNames.ProjectType];
161
- if (projectType === constants_3.ProjectTypeOptions.bot().id) {
162
- return constants_3.CapabilityOptions.bots(inputs);
786
+ // nodejs capabilities
787
+ const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
788
+ if (projectType === ProjectTypeOptions.bot().id) {
789
+ return CapabilityOptions.bots(inputs);
163
790
  }
164
- else if (projectType === constants_3.ProjectTypeOptions.tab().id) {
165
- return constants_3.CapabilityOptions.tabs();
791
+ else if (projectType === ProjectTypeOptions.tab().id) {
792
+ return CapabilityOptions.tabs();
166
793
  }
167
- else if (projectType === constants_3.ProjectTypeOptions.me().id) {
168
- return constants_3.CapabilityOptions.mes();
794
+ else if (projectType === ProjectTypeOptions.me().id) {
795
+ return CapabilityOptions.mes();
169
796
  }
170
- else if (constants_3.ProjectTypeOptions.officeAddinAllIds().includes(projectType)) {
171
- return constants_3.CapabilityOptions.officeAddinDynamicCapabilities(projectType, inputs[constants_3.QuestionNames.OfficeAddinHost]);
797
+ else if (ProjectTypeOptions.officeAddinAllIds().includes(projectType)) {
798
+ return CapabilityOptions.officeAddinDynamicCapabilities(projectType, inputs[questionNames_1.QuestionNames.OfficeAddinHost]);
172
799
  }
173
- else if (projectType === constants_3.ProjectTypeOptions.copilotExtension().id) {
174
- return constants_3.CapabilityOptions.copilotExtensions();
800
+ else if (projectType === ProjectTypeOptions.copilotPlugin().id) {
801
+ return CapabilityOptions.copilotPlugins();
175
802
  }
176
- else if (projectType === constants_3.ProjectTypeOptions.customCopilot().id) {
177
- return constants_3.CapabilityOptions.customCopilots();
803
+ else if (projectType === ProjectTypeOptions.customCopilot().id) {
804
+ return CapabilityOptions.customCopilots();
805
+ }
806
+ else if (projectType === ProjectTypeOptions.customizeGpt().id) {
807
+ return CapabilityOptions.customizeGptOptions();
178
808
  }
179
809
  else {
180
- return constants_3.CapabilityOptions.all(inputs);
810
+ return CapabilityOptions.all(inputs);
181
811
  }
182
812
  },
183
813
  placeholder: (inputs) => {
184
- if (inputs[constants_3.QuestionNames.ProjectType] === constants_3.ProjectTypeOptions.copilotExtension().id) {
185
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.placeholder");
814
+ if (inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.copilotPlugin().id) {
815
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.placeholder");
186
816
  }
187
- else if (inputs[constants_3.QuestionNames.ProjectType] === constants_3.ProjectTypeOptions.customCopilot().id) {
188
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.customCopilot.placeholder");
817
+ else if (inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.customCopilot().id) {
818
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.placeholder");
189
819
  }
190
- return (0, localizeUtils_1.getLocalizedString)("core.createCapabilityQuestion.placeholder");
820
+ return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.placeholder");
191
821
  },
192
822
  forgetLastValue: true,
193
- skipSingleOption: (inputs) => {
194
- return isFromDevPortal(inputs);
195
- },
823
+ skipSingleOption: true,
196
824
  };
197
825
  }
198
826
  exports.capabilityQuestion = capabilityQuestion;
827
+ class MeArchitectureOptions {
828
+ static botMe() {
829
+ return {
830
+ id: "bot",
831
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.botMessageExtension.label"),
832
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.botMessageExtension.detail"),
833
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlook"),
834
+ };
835
+ }
836
+ static botPlugin() {
837
+ return {
838
+ id: "bot-plugin",
839
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.botMessageExtension.label"),
840
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.botMessageExtension.detail"),
841
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookCopilot"),
842
+ };
843
+ }
844
+ static newApi() {
845
+ return {
846
+ id: "new-api",
847
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.label"),
848
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.messageExtensionNewApiOption.detail"),
849
+ };
850
+ }
851
+ static apiSpec() {
852
+ return {
853
+ id: "api-spec",
854
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.label"),
855
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.messageExtensionApiSpecOption.detail"),
856
+ };
857
+ }
858
+ static all() {
859
+ return [
860
+ MeArchitectureOptions.newApi(),
861
+ MeArchitectureOptions.apiSpec(),
862
+ featureFlags_1.isCopilotPluginEnabled() ? MeArchitectureOptions.botPlugin() : MeArchitectureOptions.botMe(),
863
+ ];
864
+ }
865
+ static staticAll() {
866
+ return [
867
+ MeArchitectureOptions.newApi(),
868
+ MeArchitectureOptions.apiSpec(),
869
+ MeArchitectureOptions.botPlugin(),
870
+ MeArchitectureOptions.botMe(),
871
+ ];
872
+ }
873
+ }
874
+ exports.MeArchitectureOptions = MeArchitectureOptions;
199
875
  function meArchitectureQuestion() {
200
876
  return {
201
- name: constants_3.QuestionNames.MeArchitectureType,
202
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.meArchitecture.title"),
877
+ name: questionNames_1.QuestionNames.MeArchitectureType,
878
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.meArchitecture.title"),
203
879
  cliDescription: "Architecture of Search Based Message Extension.",
204
880
  cliShortName: "m",
205
881
  type: "singleSelect",
206
- staticOptions: constants_3.MeArchitectureOptions.staticAll(),
882
+ staticOptions: MeArchitectureOptions.staticAll(),
207
883
  dynamicOptions: (inputs) => {
208
- return constants_3.MeArchitectureOptions.all();
884
+ return MeArchitectureOptions.all();
209
885
  },
210
- default: constants_3.MeArchitectureOptions.newApi().id,
211
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.placeholder"),
886
+ default: MeArchitectureOptions.newApi().id,
887
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.placeholder"),
212
888
  forgetLastValue: true,
213
889
  skipSingleOption: true,
214
890
  };
215
891
  }
216
892
  exports.meArchitectureQuestion = meArchitectureQuestion;
893
+ var HostType;
894
+ (function (HostType) {
895
+ HostType["AppService"] = "app-service";
896
+ HostType["Functions"] = "azure-functions";
897
+ })(HostType || (HostType = {}));
898
+ const NotificationTriggers = {
899
+ HTTP: "http",
900
+ TIMER: "timer",
901
+ };
902
+ class NotificationTriggerOptions {
903
+ static appService() {
904
+ return {
905
+ id: "http-restify",
906
+ hostType: HostType.AppService,
907
+ label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.label"),
908
+ description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.description"),
909
+ detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.detail"),
910
+ };
911
+ }
912
+ static appServiceForVS() {
913
+ return {
914
+ id: "http-webapi",
915
+ hostType: HostType.AppService,
916
+ label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.label"),
917
+ description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.description"),
918
+ detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.detail"),
919
+ };
920
+ }
921
+ // NOTE: id must be the sample as cliName to prevent parsing error for CLI default value.
922
+ static functionsTimerTrigger() {
923
+ return {
924
+ id: "timer-functions",
925
+ hostType: HostType.Functions,
926
+ triggers: [NotificationTriggers.TIMER],
927
+ label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.label"),
928
+ description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.description"),
929
+ detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.detail"),
930
+ };
931
+ }
932
+ static functionsTimerTriggerIsolated() {
933
+ return {
934
+ id: "timer-functions-isolated",
935
+ hostType: HostType.Functions,
936
+ triggers: [NotificationTriggers.TIMER],
937
+ label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.label"),
938
+ description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.description"),
939
+ detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.detail"),
940
+ };
941
+ }
942
+ static functionsHttpAndTimerTrigger() {
943
+ return {
944
+ id: "http-and-timer-functions",
945
+ hostType: HostType.Functions,
946
+ triggers: [NotificationTriggers.HTTP, NotificationTriggers.TIMER],
947
+ label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.label"),
948
+ description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.description"),
949
+ detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.detail"),
950
+ };
951
+ }
952
+ static functionsHttpAndTimerTriggerIsolated() {
953
+ return {
954
+ id: "http-and-timer-functions-isolated",
955
+ hostType: HostType.Functions,
956
+ triggers: [NotificationTriggers.HTTP, NotificationTriggers.TIMER],
957
+ label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.label"),
958
+ description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.description"),
959
+ detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.detail"),
960
+ };
961
+ }
962
+ static functionsHttpTrigger() {
963
+ return {
964
+ id: "http-functions",
965
+ hostType: HostType.Functions,
966
+ triggers: [NotificationTriggers.HTTP],
967
+ label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.label"),
968
+ description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.description"),
969
+ detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.detail"),
970
+ };
971
+ }
972
+ static functionsHttpTriggerIsolated() {
973
+ return {
974
+ id: "http-functions-isolated",
975
+ hostType: HostType.Functions,
976
+ triggers: [NotificationTriggers.HTTP],
977
+ label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.label"),
978
+ description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.description"),
979
+ detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.detail"),
980
+ };
981
+ }
982
+ static functionsTriggers() {
983
+ return [
984
+ NotificationTriggerOptions.functionsHttpAndTimerTrigger(),
985
+ NotificationTriggerOptions.functionsHttpTrigger(),
986
+ NotificationTriggerOptions.functionsTimerTrigger(),
987
+ ];
988
+ }
989
+ static all() {
990
+ return [
991
+ NotificationTriggerOptions.appService(),
992
+ NotificationTriggerOptions.appServiceForVS(),
993
+ NotificationTriggerOptions.functionsHttpAndTimerTrigger(),
994
+ NotificationTriggerOptions.functionsHttpTrigger(),
995
+ NotificationTriggerOptions.functionsTimerTrigger(),
996
+ ];
997
+ }
998
+ }
999
+ exports.NotificationTriggerOptions = NotificationTriggerOptions;
1000
+ function getRuntime(inputs) {
1001
+ let runtime = RuntimeOptions.NodeJS().id;
1002
+ if (featureFlags_1.isCLIDotNetEnabled()) {
1003
+ runtime = inputs[questionNames_1.QuestionNames.Runtime] || runtime;
1004
+ }
1005
+ else {
1006
+ if ((inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.VS) {
1007
+ runtime = RuntimeOptions.DotNet().id;
1008
+ }
1009
+ }
1010
+ return runtime;
1011
+ }
217
1012
  function botTriggerQuestion() {
218
1013
  return {
219
- name: constants_3.QuestionNames.BotTrigger,
220
- title: (0, localizeUtils_1.getLocalizedString)("plugins.bot.questionHostTypeTrigger.title"),
1014
+ name: questionNames_1.QuestionNames.BotTrigger,
1015
+ title: localizeUtils_1.getLocalizedString("plugins.bot.questionHostTypeTrigger.title"),
221
1016
  cliDescription: "Specifies the trigger for `Chat Notification Message` app template.",
222
1017
  cliShortName: "t",
223
1018
  type: "singleSelect",
224
- staticOptions: constants_3.NotificationTriggerOptions.all(),
1019
+ staticOptions: NotificationTriggerOptions.all(),
225
1020
  dynamicOptions: (inputs) => {
226
- const runtime = (0, constants_3.getRuntime)(inputs);
1021
+ const runtime = getRuntime(inputs);
227
1022
  return [
228
- runtime === constants_3.RuntimeOptions.DotNet().id
229
- ? constants_3.NotificationTriggerOptions.appServiceForVS()
230
- : constants_3.NotificationTriggerOptions.appService(),
231
- ...constants_3.NotificationTriggerOptions.functionsTriggers(),
1023
+ runtime === RuntimeOptions.DotNet().id
1024
+ ? NotificationTriggerOptions.appServiceForVS()
1025
+ : NotificationTriggerOptions.appService(),
1026
+ ...NotificationTriggerOptions.functionsTriggers(),
232
1027
  ];
233
1028
  },
234
1029
  default: (inputs) => {
235
- const runtime = (0, constants_3.getRuntime)(inputs);
236
- return runtime === constants_3.RuntimeOptions.DotNet().id
237
- ? constants_3.NotificationTriggerOptions.appServiceForVS().id
238
- : constants_3.NotificationTriggerOptions.appService().id;
1030
+ const runtime = getRuntime(inputs);
1031
+ return runtime === RuntimeOptions.DotNet().id
1032
+ ? NotificationTriggerOptions.appServiceForVS().id
1033
+ : NotificationTriggerOptions.appService().id;
239
1034
  },
240
- placeholder: (0, localizeUtils_1.getLocalizedString)("plugins.bot.questionHostTypeTrigger.placeholder"),
1035
+ placeholder: localizeUtils_1.getLocalizedString("plugins.bot.questionHostTypeTrigger.placeholder"),
241
1036
  };
242
1037
  }
243
1038
  function SPFxSolutionQuestion() {
244
1039
  return {
245
1040
  type: "singleSelect",
246
- name: constants_3.QuestionNames.SPFxSolution,
247
- title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.title"),
1041
+ name: questionNames_1.QuestionNames.SPFxSolution,
1042
+ title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.title"),
248
1043
  cliDescription: "Create a new or import an existing SharePoint Framework solution.",
249
1044
  cliShortName: "s",
250
1045
  staticOptions: [
251
1046
  {
252
1047
  id: "new",
253
- label: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.createNew"),
254
- detail: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.createNew.detail"),
1048
+ label: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.createNew"),
1049
+ detail: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.createNew.detail"),
255
1050
  },
256
1051
  {
257
1052
  id: "import",
258
- label: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.importExisting"),
259
- detail: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.importExisting.detail"),
1053
+ label: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.importExisting"),
1054
+ detail: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.importExisting.detail"),
260
1055
  },
261
1056
  ],
262
1057
  default: "new",
@@ -265,45 +1060,45 @@ function SPFxSolutionQuestion() {
265
1060
  function SPFxPackageSelectQuestion() {
266
1061
  return {
267
1062
  type: "singleSelect",
268
- name: constants_3.QuestionNames.SPFxInstallPackage,
269
- title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.title"),
1063
+ name: questionNames_1.QuestionNames.SPFxInstallPackage,
1064
+ title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.title"),
270
1065
  cliDescription: "Install the latest version of SharePoint Framework.",
271
1066
  staticOptions: [],
272
- placeholder: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.placeholder"),
1067
+ placeholder: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.placeholder"),
273
1068
  dynamicOptions: async (inputs) => {
274
1069
  const versions = await Promise.all([
275
- utils_2.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.GeneratorPackageName, 0, false),
276
- utils_2.Utils.findLatestVersion(undefined, constants_2.Constants.GeneratorPackageName, 5),
277
- utils_2.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.YeomanPackageName, 0, false),
1070
+ utils_3.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.GeneratorPackageName, 0, false),
1071
+ utils_3.Utils.findLatestVersion(undefined, constants_2.Constants.GeneratorPackageName, 5),
1072
+ utils_3.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.YeomanPackageName, 0, false),
278
1073
  ]);
279
1074
  inputs.globalSpfxPackageVersion = versions[0];
280
1075
  inputs.latestSpfxPackageVersion = versions[1];
281
1076
  inputs.globalYeomanPackageVersion = versions[2];
282
1077
  return [
283
1078
  {
284
- id: constants_3.SPFxVersionOptionIds.installLocally,
1079
+ id: SPFxVersionOptionIds.installLocally,
285
1080
  label: versions[1] !== undefined
286
- ? (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.installLocally.withVersion.label", "v" + versions[1])
287
- : (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.installLocally.noVersion.label"),
1081
+ ? localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.installLocally.withVersion.label", "v" + versions[1])
1082
+ : localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.installLocally.noVersion.label"),
288
1083
  },
289
1084
  {
290
- id: constants_3.SPFxVersionOptionIds.globalPackage,
1085
+ id: SPFxVersionOptionIds.globalPackage,
291
1086
  label: versions[0] !== undefined
292
- ? (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.useGlobalPackage.withVersion.label", "v" + versions[0])
293
- : (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.useGlobalPackage.noVersion.label"),
294
- description: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.useGlobalPackage.detail", constants_2.Constants.RecommendedLowestSpfxVersion),
1087
+ ? localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.withVersion.label", "v" + versions[0])
1088
+ : localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.noVersion.label"),
1089
+ description: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.detail", constants_2.Constants.RecommendedLowestSpfxVersion),
295
1090
  },
296
1091
  ];
297
1092
  },
298
- default: constants_3.SPFxVersionOptionIds.installLocally,
1093
+ default: SPFxVersionOptionIds.installLocally,
299
1094
  validation: {
300
1095
  validFunc: (input, previousInputs) => {
301
- if (input === constants_3.SPFxVersionOptionIds.globalPackage) {
1096
+ if (input === SPFxVersionOptionIds.globalPackage) {
302
1097
  const hasPackagesInstalled = !!previousInputs &&
303
1098
  !!previousInputs.globalSpfxPackageVersion &&
304
1099
  !!previousInputs.globalYeomanPackageVersion;
305
1100
  if (!hasPackagesInstalled) {
306
- return Promise.reject((0, error_1.DevEnvironmentSetupError)());
1101
+ return Promise.reject(error_1.DevEnvironmentSetupError());
307
1102
  }
308
1103
  }
309
1104
  return Promise.resolve(undefined);
@@ -316,10 +1111,10 @@ exports.SPFxPackageSelectQuestion = SPFxPackageSelectQuestion;
316
1111
  function SPFxFrameworkQuestion() {
317
1112
  return {
318
1113
  type: "singleSelect",
319
- name: constants_3.QuestionNames.SPFxFramework,
1114
+ name: questionNames_1.QuestionNames.SPFxFramework,
320
1115
  cliShortName: "k",
321
1116
  cliDescription: "Framework.",
322
- title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.framework.title"),
1117
+ title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.framework.title"),
323
1118
  staticOptions: [
324
1119
  { id: "react", label: "React" },
325
1120
  { id: "minimal", label: "Minimal" },
@@ -333,10 +1128,10 @@ exports.SPFxFrameworkQuestion = SPFxFrameworkQuestion;
333
1128
  function SPFxWebpartNameQuestion() {
334
1129
  return {
335
1130
  type: "text",
336
- name: constants_3.QuestionNames.SPFxWebpartName,
1131
+ name: questionNames_1.QuestionNames.SPFxWebpartName,
337
1132
  cliShortName: "w",
338
1133
  cliDescription: "Name for SharePoint Framework Web Part.",
339
- title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.webpartName"),
1134
+ title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.webpartName"),
340
1135
  default: constants_2.Constants.DEFAULT_WEBPART_NAME,
341
1136
  validation: {
342
1137
  validFunc: async (input, previousInputs) => {
@@ -345,15 +1140,15 @@ function SPFxWebpartNameQuestion() {
345
1140
  };
346
1141
  const validateRes = jsonschema.validate(input, schema);
347
1142
  if (validateRes.errors && validateRes.errors.length > 0) {
348
- return (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.webpartName.error.notMatch", input, schema.pattern);
1143
+ return localizeUtils_1.getLocalizedString("plugins.spfx.questions.webpartName.error.notMatch", input, schema.pattern);
349
1144
  }
350
1145
  if (previousInputs &&
351
1146
  ((previousInputs.stage === teamsfx_api_1.Stage.addWebpart &&
352
- previousInputs[constants_3.QuestionNames.SPFxFolder]) ||
1147
+ previousInputs[questionNames_1.QuestionNames.SPFxFolder]) ||
353
1148
  ((previousInputs === null || previousInputs === void 0 ? void 0 : previousInputs.stage) === teamsfx_api_1.Stage.addFeature && (previousInputs === null || previousInputs === void 0 ? void 0 : previousInputs.projectPath)))) {
354
- const webpartFolder = path.join(previousInputs[constants_3.QuestionNames.SPFxFolder], "src", "webparts", input);
1149
+ const webpartFolder = path.join(previousInputs[questionNames_1.QuestionNames.SPFxFolder], "src", "webparts", input);
355
1150
  if (await fs_extra_1.default.pathExists(webpartFolder)) {
356
- return (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.webpartName.error.duplicate", webpartFolder);
1151
+ return localizeUtils_1.getLocalizedString("plugins.spfx.questions.webpartName.error.duplicate", webpartFolder);
357
1152
  }
358
1153
  }
359
1154
  return undefined;
@@ -362,13 +1157,18 @@ function SPFxWebpartNameQuestion() {
362
1157
  };
363
1158
  }
364
1159
  exports.SPFxWebpartNameQuestion = SPFxWebpartNameQuestion;
1160
+ var SPFxVersionOptionIds;
1161
+ (function (SPFxVersionOptionIds) {
1162
+ SPFxVersionOptionIds["installLocally"] = "true";
1163
+ SPFxVersionOptionIds["globalPackage"] = "false";
1164
+ })(SPFxVersionOptionIds = exports.SPFxVersionOptionIds || (exports.SPFxVersionOptionIds = {}));
365
1165
  function SPFxImportFolderQuestion(hasDefaultFunc = false) {
366
1166
  return {
367
1167
  type: "folder",
368
- name: constants_3.QuestionNames.SPFxFolder,
369
- title: (0, localizeUtils_1.getLocalizedString)("core.spfxFolder.title"),
1168
+ name: questionNames_1.QuestionNames.SPFxFolder,
1169
+ title: localizeUtils_1.getLocalizedString("core.spfxFolder.title"),
370
1170
  cliDescription: "Directory or Path that contains the existing SharePoint Framework solution.",
371
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.spfxFolder.placeholder"),
1171
+ placeholder: localizeUtils_1.getLocalizedString("core.spfxFolder.placeholder"),
372
1172
  default: hasDefaultFunc
373
1173
  ? (inputs) => {
374
1174
  if (inputs.projectPath)
@@ -379,32 +1179,44 @@ function SPFxImportFolderQuestion(hasDefaultFunc = false) {
379
1179
  };
380
1180
  }
381
1181
  exports.SPFxImportFolderQuestion = SPFxImportFolderQuestion;
1182
+ function officeAddinHostingQuestion() {
1183
+ return {
1184
+ name: questionNames_1.QuestionNames.OfficeAddinHost,
1185
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.create.title"),
1186
+ type: "singleSelect",
1187
+ staticOptions: OfficeAddinHostOptions.all(),
1188
+ };
1189
+ }
1190
+ exports.officeAddinHostingQuestion = officeAddinHostingQuestion;
382
1191
  function officeAddinFrameworkQuestion() {
383
1192
  return {
384
1193
  type: "singleSelect",
385
- name: constants_3.QuestionNames.OfficeAddinFramework,
1194
+ name: questionNames_1.QuestionNames.OfficeAddinFramework,
386
1195
  cliShortName: "f",
387
1196
  cliDescription: "Framework for WXP extension.",
388
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.officeAddin.framework.title"),
1197
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.framework.title"),
389
1198
  dynamicOptions: getAddinFrameworkOptions,
390
1199
  staticOptions: [
391
1200
  { id: "default", label: "Default" },
392
1201
  { id: "react", label: "React" },
393
1202
  ],
394
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.officeAddin.framework.placeholder"),
1203
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.framework.placeholder"),
395
1204
  skipSingleOption: true,
396
1205
  };
397
1206
  }
398
1207
  exports.officeAddinFrameworkQuestion = officeAddinFrameworkQuestion;
399
1208
  function getAddinFrameworkOptions(inputs) {
400
- const projectType = inputs[constants_3.QuestionNames.ProjectType];
401
- const capabilities = inputs[constants_3.QuestionNames.Capabilities];
402
- if (projectType === constants_3.ProjectTypeOptions.outlookAddin().id) {
1209
+ const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
1210
+ const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
1211
+ const host = inputs[questionNames_1.QuestionNames.OfficeAddinHost];
1212
+ if (projectType === ProjectTypeOptions.outlookAddin().id ||
1213
+ (projectType === ProjectTypeOptions.officeXMLAddin().id &&
1214
+ host === OfficeAddinHostOptions.outlook().id)) {
403
1215
  return [{ id: "default", label: "Default" }];
404
1216
  }
405
- else if ((projectType === constants_3.ProjectTypeOptions.officeAddin().id &&
406
- capabilities === constants_3.CapabilityOptions.officeContentAddin().id) ||
407
- capabilities === constants_3.CapabilityOptions.officeAddinImport().id) {
1217
+ else if ((projectType === ProjectTypeOptions.officeAddin().id &&
1218
+ capabilities === CapabilityOptions.officeContentAddin().id) ||
1219
+ capabilities === CapabilityOptions.officeAddinImport().id) {
408
1220
  return [{ id: "default", label: "Default" }];
409
1221
  }
410
1222
  else {
@@ -421,12 +1233,14 @@ exports.getAddinFrameworkOptions = getAddinFrameworkOptions;
421
1233
  * when project-type=office-xml-addin-type, no framework to select, office-addin-framework-type=default_old
422
1234
  */
423
1235
  function getOfficeAddinFramework(inputs) {
424
- const projectType = inputs[constants_3.QuestionNames.ProjectType];
425
- if (projectType === constants_3.ProjectTypeOptions.officeAddin().id &&
426
- inputs[constants_3.QuestionNames.OfficeAddinFramework]) {
427
- return inputs[constants_3.QuestionNames.OfficeAddinFramework];
1236
+ const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
1237
+ if (projectType === ProjectTypeOptions.officeAddin().id &&
1238
+ inputs[questionNames_1.QuestionNames.OfficeAddinFramework]) {
1239
+ return inputs[questionNames_1.QuestionNames.OfficeAddinFramework];
428
1240
  }
429
- else if (projectType === constants_3.ProjectTypeOptions.outlookAddin().id) {
1241
+ else if ((projectType === ProjectTypeOptions.officeXMLAddin().id &&
1242
+ inputs[questionNames_1.QuestionNames.OfficeAddinHost] === OfficeAddinHostOptions.outlook().id) ||
1243
+ projectType === ProjectTypeOptions.outlookAddin().id) {
430
1244
  return "default_old";
431
1245
  }
432
1246
  else {
@@ -434,83 +1248,94 @@ function getOfficeAddinFramework(inputs) {
434
1248
  }
435
1249
  }
436
1250
  exports.getOfficeAddinFramework = getOfficeAddinFramework;
437
- function getOfficeAddinTemplateConfig() {
438
- return projectConfig_1.OfficeAddinProjectConfig["json"];
439
- }
440
- exports.getOfficeAddinTemplateConfig = getOfficeAddinTemplateConfig;
441
1251
  function getLanguageOptions(inputs) {
442
- const runtime = (0, constants_3.getRuntime)(inputs);
1252
+ const runtime = getRuntime(inputs);
443
1253
  // dotnet runtime only supports C#
444
- if (runtime === constants_3.RuntimeOptions.DotNet().id) {
445
- return [{ id: constants_3.ProgrammingLanguage.CSharp, label: "C#" }];
1254
+ if (runtime === RuntimeOptions.DotNet().id) {
1255
+ return [{ id: ProgrammingLanguage.CSharp, label: "C#" }];
446
1256
  }
447
- const capabilities = inputs[constants_3.QuestionNames.Capabilities];
1257
+ const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
1258
+ const host = inputs[questionNames_1.QuestionNames.OfficeAddinHost];
448
1259
  // office addin supports language defined in officeAddinJsonData
449
- const projectType = inputs[constants_3.QuestionNames.ProjectType];
450
- if (constants_3.ProjectTypeOptions.officeAddinAllIds().includes(projectType)) {
451
- if (projectType === constants_3.ProjectTypeOptions.officeMetaOS().id) {
452
- return [{ id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" }];
453
- }
1260
+ const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
1261
+ if (ProjectTypeOptions.officeAddinAllIds().includes(projectType)) {
454
1262
  if (capabilities.endsWith("-manifest")) {
455
- return [{ id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" }];
1263
+ return [{ id: ProgrammingLanguage.JS, label: "JavaScript" }];
456
1264
  }
457
- if (projectType === constants_3.ProjectTypeOptions.outlookAddin().id) {
458
- return [{ id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" }];
1265
+ if (projectType === ProjectTypeOptions.outlookAddin().id ||
1266
+ (projectType === ProjectTypeOptions.officeXMLAddin().id &&
1267
+ host === OfficeAddinHostOptions.outlook().id)) {
1268
+ return [{ id: ProgrammingLanguage.TS, label: "TypeScript" }];
459
1269
  }
460
- const officeAddinLangConfig = getOfficeAddinTemplateConfig()[capabilities].framework["default"];
1270
+ const officeXMLAddinLangConfig = projectConfig_1.getOfficeAddinTemplateConfig(projectType, host)[capabilities]
1271
+ .framework["default"];
461
1272
  const officeXMLAddinLangOptions = [];
462
- if (!!officeAddinLangConfig.typescript)
463
- officeXMLAddinLangOptions.push({ id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" });
464
- if (!!officeAddinLangConfig.javascript)
465
- officeXMLAddinLangOptions.push({ id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" });
1273
+ if (!!officeXMLAddinLangConfig.typescript)
1274
+ officeXMLAddinLangOptions.push({ id: ProgrammingLanguage.TS, label: "TypeScript" });
1275
+ if (!!officeXMLAddinLangConfig.javascript)
1276
+ officeXMLAddinLangOptions.push({ id: ProgrammingLanguage.JS, label: "JavaScript" });
466
1277
  return officeXMLAddinLangOptions;
467
1278
  }
468
- if (capabilities === constants_3.CapabilityOptions.SPFxTab().id) {
1279
+ if (capabilities === CapabilityOptions.SPFxTab().id) {
469
1280
  // SPFx only supports typescript
470
- return [{ id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" }];
1281
+ return [{ id: ProgrammingLanguage.TS, label: "TypeScript" }];
471
1282
  }
472
1283
  else if (constants_3.capabilitiesHavePythonOption.includes(inputs[capabilities] ? inputs[capabilities] : capabilities) &&
473
- !(capabilities == constants_3.CapabilityOptions.customCopilotRag().id &&
474
- inputs[constants_3.CapabilityOptions.customCopilotRag().id] == constants_3.CustomCopilotRagOptions.microsoft365().id)) {
1284
+ !(capabilities == CapabilityOptions.customCopilotRag().id &&
1285
+ (inputs[CapabilityOptions.customCopilotRag().id] ==
1286
+ CustomCopilotRagOptions.microsoft365().id ||
1287
+ inputs[CapabilityOptions.customCopilotRag().id] == CustomCopilotRagOptions.customApi().id))) {
475
1288
  // support python language
476
1289
  return [
477
- { id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" },
478
- { id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" },
479
- { id: constants_3.ProgrammingLanguage.PY, label: "Python" },
1290
+ { id: ProgrammingLanguage.JS, label: "JavaScript" },
1291
+ { id: ProgrammingLanguage.TS, label: "TypeScript" },
1292
+ {
1293
+ id: ProgrammingLanguage.PY,
1294
+ label: "Python",
1295
+ detail: "",
1296
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
1297
+ },
480
1298
  ];
481
1299
  }
482
1300
  else {
483
1301
  // other cases
484
1302
  return [
485
- { id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" },
486
- { id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" },
1303
+ { id: ProgrammingLanguage.JS, label: "JavaScript" },
1304
+ { id: ProgrammingLanguage.TS, label: "TypeScript" },
487
1305
  ];
488
1306
  }
489
1307
  }
490
1308
  exports.getLanguageOptions = getLanguageOptions;
1309
+ var ProgrammingLanguage;
1310
+ (function (ProgrammingLanguage) {
1311
+ ProgrammingLanguage["JS"] = "javascript";
1312
+ ProgrammingLanguage["TS"] = "typescript";
1313
+ ProgrammingLanguage["CSharp"] = "csharp";
1314
+ ProgrammingLanguage["PY"] = "python";
1315
+ })(ProgrammingLanguage = exports.ProgrammingLanguage || (exports.ProgrammingLanguage = {}));
491
1316
  function programmingLanguageQuestion() {
492
1317
  const programmingLanguageQuestion = {
493
- name: constants_3.QuestionNames.ProgrammingLanguage,
1318
+ name: questionNames_1.QuestionNames.ProgrammingLanguage,
494
1319
  cliShortName: "l",
495
- title: (0, localizeUtils_1.getLocalizedString)("core.ProgrammingLanguageQuestion.title"),
1320
+ title: localizeUtils_1.getLocalizedString("core.ProgrammingLanguageQuestion.title"),
496
1321
  type: "singleSelect",
497
1322
  staticOptions: [
498
- { id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" },
499
- { id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" },
500
- { id: constants_3.ProgrammingLanguage.CSharp, label: "C#" },
501
- { id: constants_3.ProgrammingLanguage.PY, label: "Python" },
1323
+ { id: ProgrammingLanguage.JS, label: "JavaScript" },
1324
+ { id: ProgrammingLanguage.TS, label: "TypeScript" },
1325
+ { id: ProgrammingLanguage.CSharp, label: "C#" },
1326
+ { id: ProgrammingLanguage.PY, label: "Python" },
502
1327
  ],
503
1328
  dynamicOptions: getLanguageOptions,
504
1329
  default: (inputs) => {
505
1330
  return getLanguageOptions(inputs)[0].id;
506
1331
  },
507
1332
  placeholder: (inputs) => {
508
- const runtime = (0, constants_3.getRuntime)(inputs);
1333
+ const runtime = getRuntime(inputs);
509
1334
  // dotnet
510
- if (runtime === constants_3.RuntimeOptions.DotNet().id) {
1335
+ if (runtime === RuntimeOptions.DotNet().id) {
511
1336
  return "";
512
1337
  }
513
- const capabilities = inputs[constants_3.QuestionNames.Capabilities];
1338
+ const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
514
1339
  // // office addin
515
1340
  // const projectType = inputs[QuestionNames.ProjectType];
516
1341
  // if (projectType === ProjectTypeOptions.outlookAddin().id) {
@@ -519,11 +1344,11 @@ function programmingLanguageQuestion() {
519
1344
  // return options[0] || "No Options";
520
1345
  // }
521
1346
  // SPFx
522
- if (capabilities === constants_3.CapabilityOptions.SPFxTab().id) {
523
- return (0, localizeUtils_1.getLocalizedString)("core.ProgrammingLanguageQuestion.placeholder.spfx");
1347
+ if (capabilities === CapabilityOptions.SPFxTab().id) {
1348
+ return localizeUtils_1.getLocalizedString("core.ProgrammingLanguageQuestion.placeholder.spfx");
524
1349
  }
525
1350
  // other
526
- return (0, localizeUtils_1.getLocalizedString)("core.ProgrammingLanguageQuestion.placeholder");
1351
+ return localizeUtils_1.getLocalizedString("core.ProgrammingLanguageQuestion.placeholder");
527
1352
  },
528
1353
  skipSingleOption: true,
529
1354
  };
@@ -533,19 +1358,20 @@ exports.programmingLanguageQuestion = programmingLanguageQuestion;
533
1358
  function folderQuestion() {
534
1359
  return {
535
1360
  type: "folder",
536
- name: constants_3.QuestionNames.Folder,
1361
+ name: questionNames_1.QuestionNames.Folder,
537
1362
  cliShortName: "f",
538
1363
  title: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
539
1364
  ? "Directory where the project folder will be created in"
540
- : (0, localizeUtils_1.getLocalizedString)("core.question.workspaceFolder.title"),
1365
+ : localizeUtils_1.getLocalizedString("core.question.workspaceFolder.title"),
541
1366
  cliDescription: "Directory where the project folder will be created in.",
542
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.question.workspaceFolder.placeholder"),
1367
+ placeholder: localizeUtils_1.getLocalizedString("core.question.workspaceFolder.placeholder"),
543
1368
  default: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
544
1369
  ? "./"
545
1370
  : path.join(os.homedir(), constants_1.ConstantString.RootFolder),
546
1371
  };
547
1372
  }
548
1373
  exports.folderQuestion = folderQuestion;
1374
+ exports.AppNamePattern = '^(?=(.*[\\da-zA-Z]){2})[a-zA-Z][^"<>:\\?/*&|\u0000-\u001F]*[^"\\s.<>:\\?/*&|\u0000-\u001F]$';
549
1375
  async function getSolutionName(spfxFolder) {
550
1376
  const yoInfoPath = path.join(spfxFolder, constants_2.Constants.YO_RC_FILE);
551
1377
  if (await fs_extra_1.default.pathExists(yoInfoPath)) {
@@ -565,45 +1391,48 @@ exports.getSolutionName = getSolutionName;
565
1391
  function appNameQuestion() {
566
1392
  const question = {
567
1393
  type: "text",
568
- name: constants_3.QuestionNames.AppName,
1394
+ name: questionNames_1.QuestionNames.AppName,
569
1395
  cliShortName: "n",
570
- title: (0, localizeUtils_1.getLocalizedString)("core.question.appName.title"),
1396
+ title: localizeUtils_1.getLocalizedString("core.question.appName.title"),
571
1397
  required: true,
572
1398
  default: async (inputs) => {
573
1399
  var _a, _b;
574
1400
  let defaultName = undefined;
575
1401
  if ((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.appName) {
576
- defaultName = (0, stringUtils_1.convertToAlphanumericOnly)((_b = inputs.teamsAppFromTdp) === null || _b === void 0 ? void 0 : _b.appName);
1402
+ defaultName = utils_1.convertToAlphanumericOnly((_b = inputs.teamsAppFromTdp) === null || _b === void 0 ? void 0 : _b.appName);
1403
+ }
1404
+ else if (inputs[questionNames_1.QuestionNames.SPFxSolution] == "import") {
1405
+ defaultName = await getSolutionName(inputs[questionNames_1.QuestionNames.SPFxFolder]);
577
1406
  }
578
- else if (inputs[constants_3.QuestionNames.SPFxSolution] == "import") {
579
- defaultName = await getSolutionName(inputs[constants_3.QuestionNames.SPFxFolder]);
1407
+ else if (inputs.openAIPluginManifest) {
1408
+ defaultName = inputs.openAIPluginManifest.name_for_human;
580
1409
  }
581
1410
  return defaultName;
582
1411
  },
583
1412
  validation: {
584
1413
  validFunc: async (input, previousInputs) => {
585
1414
  const schema = {
586
- pattern: constants_3.AppNamePattern,
1415
+ pattern: exports.AppNamePattern,
587
1416
  maxLength: 30,
588
1417
  };
589
1418
  if (input.length === 25) {
590
1419
  // show warning notification because it may exceed the Teams app name max length after appending suffix
591
- const context = (0, globalVars_1.createContext)();
1420
+ const context = utils_4.createContextV3();
592
1421
  if ((previousInputs === null || previousInputs === void 0 ? void 0 : previousInputs.platform) === teamsfx_api_1.Platform.VSCode) {
593
- void context.userInteraction.showMessage("warn", (0, localizeUtils_1.getLocalizedString)("core.QuestionAppName.validation.lengthWarning"), false);
1422
+ void context.userInteraction.showMessage("warn", localizeUtils_1.getLocalizedString("core.QuestionAppName.validation.lengthWarning"), false);
594
1423
  }
595
1424
  else {
596
- context.logProvider.warning((0, localizeUtils_1.getLocalizedString)("core.QuestionAppName.validation.lengthWarning"));
1425
+ context.logProvider.warning(localizeUtils_1.getLocalizedString("core.QuestionAppName.validation.lengthWarning"));
597
1426
  }
598
1427
  }
599
1428
  const appName = input;
600
1429
  const validateResult = jsonschema.validate(appName, schema);
601
1430
  if (validateResult.errors && validateResult.errors.length > 0) {
602
1431
  if (validateResult.errors[0].name === "pattern") {
603
- return (0, localizeUtils_1.getLocalizedString)("core.QuestionAppName.validation.pattern");
1432
+ return localizeUtils_1.getLocalizedString("core.QuestionAppName.validation.pattern");
604
1433
  }
605
1434
  if (validateResult.errors[0].name === "maxLength") {
606
- return (0, localizeUtils_1.getLocalizedString)("core.QuestionAppName.validation.maxlength");
1435
+ return localizeUtils_1.getLocalizedString("core.QuestionAppName.validation.maxlength");
607
1436
  }
608
1437
  }
609
1438
  if (previousInputs && previousInputs.folder) {
@@ -612,13 +1441,13 @@ function appNameQuestion() {
612
1441
  const projectPath = path.resolve(folder, appName);
613
1442
  const exists = await fs_extra_1.default.pathExists(projectPath);
614
1443
  if (exists)
615
- return (0, localizeUtils_1.getLocalizedString)("core.QuestionAppName.validation.pathExist", projectPath);
1444
+ return localizeUtils_1.getLocalizedString("core.QuestionAppName.validation.pathExist", projectPath);
616
1445
  }
617
1446
  }
618
1447
  return undefined;
619
1448
  },
620
1449
  },
621
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.question.appName.placeholder"),
1450
+ placeholder: localizeUtils_1.getLocalizedString("core.question.appName.placeholder"),
622
1451
  };
623
1452
  return question;
624
1453
  }
@@ -626,13 +1455,13 @@ exports.appNameQuestion = appNameQuestion;
626
1455
  function sampleSelectQuestion() {
627
1456
  return {
628
1457
  type: "singleSelect",
629
- name: constants_3.QuestionNames.Samples,
1458
+ name: questionNames_1.QuestionNames.Samples,
630
1459
  cliName: "sample-name",
631
1460
  cliDescription: "Specifies the Microsoft Teams App sample name.",
632
1461
  cliChoiceListCommand: "teamsapp list samples",
633
1462
  skipValidation: true,
634
1463
  cliType: "argument",
635
- title: (0, localizeUtils_1.getLocalizedString)("core.SampleSelect.title"),
1464
+ title: localizeUtils_1.getLocalizedString("core.SampleSelect.title"),
636
1465
  staticOptions: [
637
1466
  "hello-world-tab-with-backend",
638
1467
  "graph-toolkit-contact-exporter",
@@ -672,24 +1501,41 @@ function sampleSelectQuestion() {
672
1501
  };
673
1502
  });
674
1503
  },
675
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.SampleSelect.placeholder"),
1504
+ placeholder: localizeUtils_1.getLocalizedString("core.SampleSelect.placeholder"),
676
1505
  buttons: [
677
1506
  {
678
1507
  icon: "library",
679
- tooltip: (0, localizeUtils_1.getLocalizedString)("core.SampleSelect.buttons.viewSamples"),
1508
+ tooltip: localizeUtils_1.getLocalizedString("core.SampleSelect.buttons.viewSamples"),
680
1509
  command: "fx-extension.openSamples",
681
1510
  },
682
1511
  ],
683
1512
  };
684
1513
  }
1514
+ class RuntimeOptions {
1515
+ static NodeJS() {
1516
+ return {
1517
+ id: "node",
1518
+ label: "Node.js",
1519
+ detail: localizeUtils_1.getLocalizedString("core.RuntimeOptionNodeJS.detail"),
1520
+ };
1521
+ }
1522
+ static DotNet() {
1523
+ return {
1524
+ id: "dotnet",
1525
+ label: ".NET Core",
1526
+ detail: localizeUtils_1.getLocalizedString("core.RuntimeOptionDotNet.detail"),
1527
+ };
1528
+ }
1529
+ }
1530
+ exports.RuntimeOptions = RuntimeOptions;
685
1531
  function runtimeQuestion() {
686
1532
  return {
687
1533
  type: "singleSelect",
688
- name: constants_3.QuestionNames.Runtime,
689
- title: (0, localizeUtils_1.getLocalizedString)("core.getRuntimeQuestion.title"),
690
- staticOptions: [constants_3.RuntimeOptions.NodeJS(), constants_3.RuntimeOptions.DotNet()],
691
- default: constants_3.RuntimeOptions.NodeJS().id,
692
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.getRuntimeQuestion.placeholder"),
1534
+ name: questionNames_1.QuestionNames.Runtime,
1535
+ title: localizeUtils_1.getLocalizedString("core.getRuntimeQuestion.title"),
1536
+ staticOptions: [RuntimeOptions.NodeJS(), RuntimeOptions.DotNet()],
1537
+ default: RuntimeOptions.NodeJS().id,
1538
+ placeholder: localizeUtils_1.getLocalizedString("core.getRuntimeQuestion.placeholder"),
693
1539
  cliHidden: true,
694
1540
  };
695
1541
  }
@@ -698,14 +1544,14 @@ const tabContentUrlOptionItem = (tab) => {
698
1544
  return {
699
1545
  id: tab.name,
700
1546
  label: tab.name,
701
- detail: (0, localizeUtils_1.getLocalizedString)("core.updateContentUrlOption.description", tab.contentUrl, defaultTabLocalHostUrl),
1547
+ detail: localizeUtils_1.getLocalizedString("core.updateContentUrlOption.description", tab.contentUrl, defaultTabLocalHostUrl),
702
1548
  };
703
1549
  };
704
1550
  const tabWebsiteUrlOptionItem = (tab) => {
705
1551
  return {
706
1552
  id: tab.name,
707
1553
  label: tab.name,
708
- detail: (0, localizeUtils_1.getLocalizedString)("core.updateWebsiteUrlOption.description", tab.websiteUrl, defaultTabLocalHostUrl),
1554
+ detail: localizeUtils_1.getLocalizedString("core.updateWebsiteUrlOption.description", tab.websiteUrl, defaultTabLocalHostUrl),
709
1555
  };
710
1556
  };
711
1557
  function getTabWebsiteOptions(inputs) {
@@ -721,15 +1567,15 @@ function getTabWebsiteOptions(inputs) {
721
1567
  function selectTabWebsiteUrlQuestion() {
722
1568
  return {
723
1569
  type: "multiSelect",
724
- name: constants_3.QuestionNames.ReplaceWebsiteUrl,
725
- title: (0, localizeUtils_1.getLocalizedString)("core.updateWebsiteUrlQuestion.title"),
1570
+ name: questionNames_1.QuestionNames.ReplaceWebsiteUrl,
1571
+ title: localizeUtils_1.getLocalizedString("core.updateWebsiteUrlQuestion.title"),
726
1572
  staticOptions: [],
727
1573
  dynamicOptions: getTabWebsiteOptions,
728
1574
  default: (inputs) => {
729
1575
  const options = getTabWebsiteOptions(inputs);
730
1576
  return options.map((o) => o.id);
731
1577
  },
732
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.updateUrlQuestion.placeholder"),
1578
+ placeholder: localizeUtils_1.getLocalizedString("core.updateUrlQuestion.placeholder"),
733
1579
  forgetLastValue: true,
734
1580
  };
735
1581
  }
@@ -746,15 +1592,15 @@ function getTabContentUrlOptions(inputs) {
746
1592
  const selectTabsContentUrlQuestion = () => {
747
1593
  return {
748
1594
  type: "multiSelect",
749
- name: constants_3.QuestionNames.ReplaceContentUrl,
750
- title: (0, localizeUtils_1.getLocalizedString)("core.updateContentUrlQuestion.title"),
1595
+ name: questionNames_1.QuestionNames.ReplaceContentUrl,
1596
+ title: localizeUtils_1.getLocalizedString("core.updateContentUrlQuestion.title"),
751
1597
  staticOptions: [],
752
1598
  dynamicOptions: getTabContentUrlOptions,
753
1599
  default: (inputs) => {
754
1600
  const options = getTabContentUrlOptions(inputs);
755
1601
  return options.map((o) => o.id);
756
1602
  },
757
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.updateUrlQuestion.placeholder"),
1603
+ placeholder: localizeUtils_1.getLocalizedString("core.updateUrlQuestion.placeholder"),
758
1604
  forgetLastValue: true,
759
1605
  };
760
1606
  };
@@ -764,11 +1610,11 @@ const botOptionItem = (isMessageExtension, botId) => {
764
1610
  return {
765
1611
  id: isMessageExtension ? answerToReplaceMessageExtensionBotId : answerToRepaceBotId,
766
1612
  label: isMessageExtension
767
- ? (0, localizeUtils_1.getLocalizedString)("core.updateBotIdForMessageExtension.label")
768
- : (0, localizeUtils_1.getLocalizedString)("core.updateBotIdForBot.label"),
1613
+ ? localizeUtils_1.getLocalizedString("core.updateBotIdForMessageExtension.label")
1614
+ : localizeUtils_1.getLocalizedString("core.updateBotIdForBot.label"),
769
1615
  detail: isMessageExtension
770
- ? (0, localizeUtils_1.getLocalizedString)("core.updateBotIdForMessageExtension.description", botId)
771
- : (0, localizeUtils_1.getLocalizedString)("core.updateBotIdForBot.description", botId),
1616
+ ? localizeUtils_1.getLocalizedString("core.updateBotIdForMessageExtension.description", botId)
1617
+ : localizeUtils_1.getLocalizedString("core.updateBotIdForBot.description", botId),
772
1618
  };
773
1619
  };
774
1620
  function getBotIdAndMeId(appDefinition) {
@@ -794,21 +1640,49 @@ function getBotOptions(inputs) {
794
1640
  }
795
1641
  return options;
796
1642
  }
1643
+ class ApiMessageExtensionAuthOptions {
1644
+ static none() {
1645
+ return {
1646
+ id: "none",
1647
+ label: "None",
1648
+ };
1649
+ }
1650
+ static apiKey() {
1651
+ return {
1652
+ id: "api-key",
1653
+ label: "API Key",
1654
+ };
1655
+ }
1656
+ static microsoftEntra() {
1657
+ return {
1658
+ id: "microsoft-entra",
1659
+ label: "Microsoft Entra",
1660
+ };
1661
+ }
1662
+ static all() {
1663
+ return [
1664
+ ApiMessageExtensionAuthOptions.none(),
1665
+ ApiMessageExtensionAuthOptions.apiKey(),
1666
+ ApiMessageExtensionAuthOptions.microsoftEntra(),
1667
+ ];
1668
+ }
1669
+ }
1670
+ exports.ApiMessageExtensionAuthOptions = ApiMessageExtensionAuthOptions;
797
1671
  function selectBotIdsQuestion() {
798
1672
  // const statcOptions: OptionItem[] = [];
799
1673
  // statcOptions.push(botOptionItem(false, "000000-0000-0000"));
800
1674
  // statcOptions.push(botOptionItem(true, "000000-0000-0000"));
801
1675
  return {
802
1676
  type: "multiSelect",
803
- name: constants_3.QuestionNames.ReplaceBotIds,
804
- title: (0, localizeUtils_1.getLocalizedString)("core.updateBotIdsQuestion.title"),
1677
+ name: questionNames_1.QuestionNames.ReplaceBotIds,
1678
+ title: localizeUtils_1.getLocalizedString("core.updateBotIdsQuestion.title"),
805
1679
  staticOptions: [],
806
1680
  dynamicOptions: getBotOptions,
807
1681
  default: (inputs) => {
808
1682
  const options = getBotOptions(inputs);
809
1683
  return options.map((o) => o.id);
810
1684
  },
811
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.updateBotIdsQuestion.placeholder"),
1685
+ placeholder: localizeUtils_1.getLocalizedString("core.updateBotIdsQuestion.placeholder"),
812
1686
  forgetLastValue: true,
813
1687
  };
814
1688
  }
@@ -820,8 +1694,8 @@ function apiSpecLocationQuestion(includeExistingAPIs = true) {
820
1694
  if (!inputs) {
821
1695
  throw new Error("inputs is undefined"); // should never happen
822
1696
  }
823
- const context = (0, globalVars_1.createContext)();
824
- const res = await (0, helper_1.listOperations)(context, input.trim(), inputs, includeExistingAPIs, false, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
1697
+ const context = utils_4.createContextV3();
1698
+ const res = await helper_1.listOperations(context, undefined, input.trim(), inputs, includeExistingAPIs, false, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
825
1699
  if (res.isOk()) {
826
1700
  inputs.supportedApisFromApiSpec = res.value;
827
1701
  }
@@ -835,49 +1709,49 @@ function apiSpecLocationQuestion(includeExistingAPIs = true) {
835
1709
  return errors[0].content;
836
1710
  }
837
1711
  else {
838
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.multipleValidationErrors.vscode.message");
1712
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.vscode.message");
839
1713
  }
840
1714
  }
841
1715
  }
842
1716
  catch (e) {
843
- const error = (0, error_2.assembleError)(e);
1717
+ const error = error_2.assembleError(e);
844
1718
  throw error;
845
1719
  }
846
1720
  };
847
1721
  return {
848
1722
  type: "singleFileOrText",
849
- name: constants_3.QuestionNames.ApiSpecLocation,
1723
+ name: questionNames_1.QuestionNames.ApiSpecLocation,
850
1724
  cliShortName: "a",
851
1725
  cliDescription: "OpenAPI description document location.",
852
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.title"),
1726
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.title"),
853
1727
  forgetLastValue: true,
854
1728
  inputBoxConfig: {
855
1729
  type: "innerText",
856
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.title"),
857
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.placeholder"),
1730
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.title"),
1731
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.placeholder"),
858
1732
  name: "input-api-spec-url",
859
1733
  step: 2,
860
1734
  validation: {
861
1735
  validFunc: (input, inputs) => {
862
- const result = (0, stringUtils_1.isValidHttpUrl)(input.trim())
1736
+ const result = util_1.isValidHttpUrl(input.trim())
863
1737
  ? undefined
864
1738
  : (inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI
865
- ? "Please enter a valid HTTP URL to access your OpenAPI description document or enter a file path of your local OpenAPI description document."
866
- : (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.invalidUrl.message");
1739
+ ? "Please enter a valid HTTP URL without authentication to access your OpenAPI description document or enter a file path of your local OpenAPI description document."
1740
+ : localizeUtils_1.getLocalizedString("core.createProjectQuestion.invalidUrl.message");
867
1741
  return Promise.resolve(result);
868
1742
  },
869
1743
  },
870
1744
  },
871
1745
  inputOptionItem: {
872
1746
  id: "input",
873
- label: `$(cloud) ` + (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpecInputUrl.label"),
1747
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpecInputUrl.label"),
874
1748
  },
875
1749
  filters: {
876
1750
  files: ["json", "yml", "yaml"],
877
1751
  },
878
1752
  validation: {
879
1753
  validFunc: async (input, inputs) => {
880
- if (!(0, stringUtils_1.isValidHttpUrl)(input.trim()) && !(await fs_extra_1.default.pathExists(input.trim()))) {
1754
+ if (!util_1.isValidHttpUrl(input.trim()) && !(await fs_extra_1.default.pathExists(input.trim()))) {
881
1755
  return "Please enter a valid HTTP URL without authentication to access your OpenAPI description document or enter a file path of your local OpenAPI description document.";
882
1756
  }
883
1757
  return await validationOnAccept(input, inputs);
@@ -886,61 +1760,113 @@ function apiSpecLocationQuestion(includeExistingAPIs = true) {
886
1760
  };
887
1761
  }
888
1762
  exports.apiSpecLocationQuestion = apiSpecLocationQuestion;
889
- function apiAuthQuestion() {
1763
+ function openAIPluginManifestLocationQuestion() {
1764
+ // export for unit test
1765
+ const correlationId = correlator_1.Correlator.getId(); // This is a workaround for VSCode which will lose correlation id when user accepts the value.
890
1766
  return {
891
- type: "singleSelect",
892
- name: constants_3.QuestionNames.ApiAuth,
893
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiMessageExtensionAuth.title"),
894
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiMessageExtensionAuth.placeholder"),
895
- cliDescription: "The authentication type for the API.",
896
- staticOptions: constants_3.ApiAuthOptions.all(),
897
- dynamicOptions: (inputs) => {
898
- const options = [constants_3.ApiAuthOptions.none()];
899
- if (inputs[constants_3.QuestionNames.MeArchitectureType] === constants_3.MeArchitectureOptions.newApi().id) {
900
- options.push(constants_3.ApiAuthOptions.apiKey(), constants_3.ApiAuthOptions.microsoftEntra());
901
- }
902
- else if (inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.newApi().id) {
903
- options.push(constants_3.ApiAuthOptions.apiKey());
904
- if (featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.ApiPluginAAD)) {
905
- options.push(constants_3.ApiAuthOptions.microsoftEntra());
1767
+ type: "text",
1768
+ name: questionNames_1.QuestionNames.OpenAIPluginManifest,
1769
+ cliShortName: "m",
1770
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.OpenAIPluginDomain"),
1771
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.OpenAIPluginDomain.placeholder"),
1772
+ cliDescription: "OpenAI plugin website domain or manifest URL.",
1773
+ forgetLastValue: true,
1774
+ validation: {
1775
+ validFunc: (input) => {
1776
+ const pattern = /(https?:\/\/)?([a-z0-9-]+(\.[a-z0-9-]+)*)(:[0-9]{1,5})?(\/)?$/i;
1777
+ const match = pattern.test(input);
1778
+ const result = match
1779
+ ? undefined
1780
+ : localizeUtils_1.getLocalizedString("core.createProjectQuestion.invalidUrl.message");
1781
+ return Promise.resolve(result);
1782
+ },
1783
+ },
1784
+ additionalValidationOnAccept: {
1785
+ validFunc: async (input, inputs) => {
1786
+ if (!inputs) {
1787
+ throw new Error("inputs is undefined"); // should never happen
906
1788
  }
907
- options.push(constants_3.ApiAuthOptions.oauth());
908
- }
909
- return options;
1789
+ let manifest;
1790
+ try {
1791
+ manifest = await helper_1.OpenAIPluginManifestHelper.loadOpenAIPluginManifest(input);
1792
+ inputs.openAIPluginManifest = manifest;
1793
+ }
1794
+ catch (e) {
1795
+ const error = error_2.assembleError(e);
1796
+ return error.message;
1797
+ }
1798
+ const context = utils_4.createContextV3();
1799
+ try {
1800
+ const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation], inputs, true, true, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
1801
+ if (res.isOk()) {
1802
+ inputs.supportedApisFromApiSpec = res.value;
1803
+ }
1804
+ else {
1805
+ const errors = res.error;
1806
+ if (inputs.platform === teamsfx_api_1.Platform.CLI) {
1807
+ return errors.map((e) => e.content).join("\n");
1808
+ }
1809
+ if (errors.length === 1 &&
1810
+ errors[0].content.length <= maximumLengthOfDetailsErrorMessageInInputBox) {
1811
+ return errors[0].content;
1812
+ }
1813
+ else {
1814
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.multipleValidationErrors.vscode.message");
1815
+ }
1816
+ }
1817
+ }
1818
+ catch (e) {
1819
+ const error = error_2.assembleError(e);
1820
+ throw error;
1821
+ }
1822
+ },
910
1823
  },
911
- default: constants_3.ApiAuthOptions.none().id,
912
1824
  };
913
1825
  }
914
- exports.apiAuthQuestion = apiAuthQuestion;
1826
+ exports.openAIPluginManifestLocationQuestion = openAIPluginManifestLocationQuestion;
1827
+ function apiMessageExtensionAuthQuestion() {
1828
+ return {
1829
+ type: "singleSelect",
1830
+ name: questionNames_1.QuestionNames.ApiMEAuth,
1831
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiMessageExtensionAuth.title"),
1832
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiMessageExtensionAuth.placeholder"),
1833
+ cliDescription: "The authentication type for the API.",
1834
+ staticOptions: ApiMessageExtensionAuthOptions.all(),
1835
+ dynamicOptions: () => ApiMessageExtensionAuthOptions.all(),
1836
+ default: ApiMessageExtensionAuthOptions.none().id,
1837
+ };
1838
+ }
1839
+ exports.apiMessageExtensionAuthQuestion = apiMessageExtensionAuthQuestion;
915
1840
  function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
916
1841
  // export for unit test
917
1842
  let placeholder = "";
918
1843
  const isPlugin = (inputs) => {
919
1844
  return (isAddPlugin ||
920
- (!!inputs && inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.apiSpec().id));
1845
+ (!!inputs &&
1846
+ inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginApiSpec().id));
921
1847
  };
922
1848
  return {
923
1849
  type: "multiSelect",
924
- name: constants_3.QuestionNames.ApiOperation,
1850
+ name: questionNames_1.QuestionNames.ApiOperation,
925
1851
  title: (inputs) => {
926
1852
  return isPlugin(inputs)
927
- ? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.copilotOperation.title")
928
- : (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.title");
1853
+ ? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.copilotOperation.title")
1854
+ : localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.title");
929
1855
  },
930
1856
  cliDescription: isAddPlugin
931
1857
  ? "Select operation(s) Copilot can interact with."
932
1858
  : "Select operation(s) Teams can interact with.",
933
1859
  cliShortName: "o",
934
1860
  placeholder: (inputs) => {
935
- const isPlugin = inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.apiSpec().id;
1861
+ const isPlugin = inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginApiSpec().id;
936
1862
  if (!includeExistingAPIs) {
937
- placeholder = (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting");
1863
+ placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting");
938
1864
  }
939
1865
  else if (isPlugin) {
940
- placeholder = (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.plugin.placeholder");
1866
+ placeholder = ""; // TODO: add placeholder for api plugin
941
1867
  }
942
1868
  else {
943
- placeholder = (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.apikey.placeholder");
1869
+ placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.apikey.placeholder");
944
1870
  }
945
1871
  return placeholder;
946
1872
  },
@@ -953,9 +1879,8 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
953
1879
  }
954
1880
  if (input.length < 1 ||
955
1881
  (input.length > 10 &&
956
- inputs[constants_3.QuestionNames.CustomCopilotRag] !== constants_3.CustomCopilotRagOptions.customApi().id &&
957
- inputs[constants_3.QuestionNames.ProjectType] !== constants_3.ProjectTypeOptions.copilotExtension().id)) {
958
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.invalidMessage", input.length, 10);
1882
+ inputs[questionNames_1.QuestionNames.CustomCopilotRag] != CustomCopilotRagOptions.customApi().id)) {
1883
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.invalidMessage", input.length, 10);
959
1884
  }
960
1885
  const operations = inputs.supportedApisFromApiSpec;
961
1886
  const authNames = new Set();
@@ -970,10 +1895,10 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
970
1895
  }
971
1896
  }
972
1897
  if (authNames.size > 1) {
973
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.multipleAuth", Array.from(authNames).join(", "));
1898
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.multipleAuth", Array.from(authNames).join(", "));
974
1899
  }
975
1900
  if (serverUrls.size > 1) {
976
- return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.multipleServer", Array.from(serverUrls).join(", "));
1901
+ return localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.multipleServer", Array.from(serverUrls).join(", "));
977
1902
  }
978
1903
  const authApi = operations.find((api) => !!api.data.authName && input.includes(api.id));
979
1904
  if (authApi) {
@@ -983,7 +1908,7 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
983
1908
  },
984
1909
  dynamicOptions: (inputs) => {
985
1910
  if (!inputs.supportedApisFromApiSpec) {
986
- throw new error_2.EmptyOptionError(constants_3.QuestionNames.ApiOperation, "question");
1911
+ throw new error_2.EmptyOptionError(questionNames_1.QuestionNames.ApiOperation, "question");
987
1912
  }
988
1913
  const operations = inputs.supportedApisFromApiSpec;
989
1914
  return operations;
@@ -991,57 +1916,121 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
991
1916
  };
992
1917
  }
993
1918
  exports.apiOperationQuestion = apiOperationQuestion;
1919
+ class CustomCopilotRagOptions {
1920
+ static customize() {
1921
+ return {
1922
+ id: "custom-copilot-rag-customize",
1923
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomizeOption.label"),
1924
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomizeOption.detail"),
1925
+ };
1926
+ }
1927
+ static azureAISearch() {
1928
+ return {
1929
+ id: "custom-copilot-rag-azureAISearch",
1930
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagAzureAISearchOption.label"),
1931
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagAzureAISearchOption.detail"),
1932
+ };
1933
+ }
1934
+ static customApi() {
1935
+ return {
1936
+ id: "custom-copilot-rag-customApi",
1937
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomApiOption.label"),
1938
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagCustomApiOption.detail"),
1939
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
1940
+ };
1941
+ }
1942
+ static microsoft365() {
1943
+ return {
1944
+ id: "custom-copilot-rag-microsoft365",
1945
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagMicrosoft365Option.label"),
1946
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRagMicrosoft365Option.detail"),
1947
+ };
1948
+ }
1949
+ static all() {
1950
+ return [
1951
+ CustomCopilotRagOptions.customize(),
1952
+ CustomCopilotRagOptions.azureAISearch(),
1953
+ CustomCopilotRagOptions.customApi(),
1954
+ CustomCopilotRagOptions.microsoft365(),
1955
+ ];
1956
+ }
1957
+ }
1958
+ exports.CustomCopilotRagOptions = CustomCopilotRagOptions;
1959
+ class CustomCopilotAssistantOptions {
1960
+ static new() {
1961
+ return {
1962
+ id: "custom-copilot-agent-new",
1963
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantNewOption.label"),
1964
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantNewOption.detail"),
1965
+ };
1966
+ }
1967
+ static assistantsApi() {
1968
+ return {
1969
+ id: "custom-copilot-agent-assistants-api",
1970
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantAssistantsApiOption.label"),
1971
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistantAssistantsApiOption.detail"),
1972
+ description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
1973
+ };
1974
+ }
1975
+ static all() {
1976
+ return [CustomCopilotAssistantOptions.new(), CustomCopilotAssistantOptions.assistantsApi()];
1977
+ }
1978
+ }
1979
+ exports.CustomCopilotAssistantOptions = CustomCopilotAssistantOptions;
994
1980
  function customCopilotRagQuestion() {
995
1981
  return {
996
1982
  type: "singleSelect",
997
- name: constants_3.QuestionNames.CustomCopilotRag,
998
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotRag.title"),
999
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotRag.placeholder"),
1000
- staticOptions: constants_3.CustomCopilotRagOptions.all(),
1001
- dynamicOptions: () => constants_3.CustomCopilotRagOptions.all(),
1002
- default: constants_3.CustomCopilotRagOptions.customize().id,
1983
+ name: questionNames_1.QuestionNames.CustomCopilotRag,
1984
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRag.title"),
1985
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRag.placeholder"),
1986
+ staticOptions: CustomCopilotRagOptions.all(),
1987
+ dynamicOptions: () => CustomCopilotRagOptions.all(),
1988
+ default: CustomCopilotRagOptions.customize().id,
1003
1989
  };
1004
1990
  }
1005
1991
  function customCopilotAssistantQuestion() {
1006
1992
  return {
1007
1993
  type: "singleSelect",
1008
- name: constants_3.QuestionNames.CustomCopilotAssistant,
1009
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotAssistant.title"),
1010
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotAssistant.placeholder"),
1011
- staticOptions: constants_3.CustomCopilotAssistantOptions.all(),
1012
- dynamicOptions: () => constants_3.CustomCopilotAssistantOptions.all(),
1013
- default: constants_3.CustomCopilotAssistantOptions.new().id,
1994
+ name: questionNames_1.QuestionNames.CustomCopilotAssistant,
1995
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistant.title"),
1996
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistant.placeholder"),
1997
+ staticOptions: CustomCopilotAssistantOptions.all(),
1998
+ dynamicOptions: () => CustomCopilotAssistantOptions.all(),
1999
+ default: CustomCopilotAssistantOptions.new().id,
1014
2000
  };
1015
2001
  }
1016
2002
  function llmServiceQuestion() {
1017
2003
  return {
1018
2004
  type: "singleSelect",
1019
- name: constants_3.QuestionNames.LLMService,
1020
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.title"),
1021
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.placeholder"),
2005
+ name: questionNames_1.QuestionNames.LLMService,
2006
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.title"),
2007
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.placeholder"),
1022
2008
  staticOptions: [
1023
2009
  {
1024
2010
  id: "llm-service-azure-openai",
1025
2011
  cliName: "azure-openai",
1026
- label: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
1027
- detail: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
2012
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
2013
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
1028
2014
  },
1029
2015
  {
1030
2016
  id: "llm-service-openai",
1031
- label: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceOpenAIOption.label"),
1032
- detail: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
2017
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.label"),
2018
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
1033
2019
  },
1034
2020
  ],
1035
2021
  dynamicOptions: (inputs) => {
1036
2022
  const options = [];
2023
+ if (inputs[questionNames_1.QuestionNames.CustomCopilotAssistant] !== "custom-copilot-agent-assistants-api") {
2024
+ options.push({
2025
+ id: "llm-service-azure-openai",
2026
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
2027
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
2028
+ });
2029
+ }
1037
2030
  options.push({
1038
- id: "llm-service-azure-openai",
1039
- label: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
1040
- detail: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
1041
- }, {
1042
2031
  id: "llm-service-openai",
1043
- label: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceOpenAIOption.label"),
1044
- detail: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
2032
+ label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.label"),
2033
+ detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
1045
2034
  });
1046
2035
  return options;
1047
2036
  },
@@ -1053,164 +2042,48 @@ function openAIKeyQuestion() {
1053
2042
  return {
1054
2043
  type: "text",
1055
2044
  password: true,
1056
- name: constants_3.QuestionNames.OpenAIKey,
1057
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.openAIKey.title"),
1058
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.openAIKey.placeholder"),
2045
+ name: questionNames_1.QuestionNames.OpenAIKey,
2046
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.openAIKey.title"),
2047
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.openAIKey.placeholder"),
1059
2048
  };
1060
2049
  }
1061
2050
  function azureOpenAIKeyQuestion() {
1062
2051
  return {
1063
2052
  type: "text",
1064
2053
  password: true,
1065
- name: constants_3.QuestionNames.AzureOpenAIKey,
1066
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIKey.title"),
1067
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIKey.placeholder"),
2054
+ name: questionNames_1.QuestionNames.AzureOpenAIKey,
2055
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIKey.title"),
2056
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIKey.placeholder"),
1068
2057
  };
1069
2058
  }
1070
2059
  function azureOpenAIEndpointQuestion() {
1071
2060
  return {
1072
2061
  type: "text",
1073
- name: constants_3.QuestionNames.AzureOpenAIEndpoint,
1074
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIEndpoint.title"),
1075
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIEndpoint.placeholder"),
2062
+ name: questionNames_1.QuestionNames.AzureOpenAIEndpoint,
2063
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIEndpoint.title"),
2064
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIEndpoint.placeholder"),
1076
2065
  };
1077
2066
  }
1078
2067
  function azureOpenAIDeploymentNameQuestion() {
1079
2068
  return {
1080
2069
  type: "text",
1081
- name: constants_3.QuestionNames.AzureOpenAIDeploymentName,
1082
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIDeploymentName.title"),
1083
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIDeploymentName.placeholder"),
1084
- };
1085
- }
1086
- function declarativeCopilotPluginQuestion() {
1087
- return {
1088
- type: "singleSelect",
1089
- name: constants_3.QuestionNames.WithPlugin,
1090
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.declarativeCopilot.title"),
1091
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.declarativeCopilot.placeholder"),
1092
- cliDescription: "Whether to add API plugin for your declarative Copilot.",
1093
- staticOptions: constants_3.DeclarativeCopilotTypeOptions.all(),
1094
- default: constants_3.DeclarativeCopilotTypeOptions.noPlugin().id,
1095
- };
1096
- }
1097
- function apiPluginStartQuestion(doesProjectExists) {
1098
- return {
1099
- type: "singleSelect",
1100
- name: constants_3.QuestionNames.ApiPluginType,
1101
- title: (inputs) => {
1102
- return inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.declarativeCopilot().id ||
1103
- doesProjectExists
1104
- ? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addApiPlugin.title")
1105
- : (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.createApiPlugin.title");
1106
- },
1107
- placeholder: (inputs) => {
1108
- return inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.declarativeCopilot().id ||
1109
- doesProjectExists
1110
- ? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addApiPlugin.placeholder")
1111
- : (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.placeholder");
1112
- },
1113
- cliDescription: "API plugin type.",
1114
- staticOptions: constants_3.ApiPluginStartOptions.staticAll(doesProjectExists),
1115
- dynamicOptions: (inputs) => {
1116
- return constants_3.ApiPluginStartOptions.all(inputs, doesProjectExists);
1117
- },
1118
- default: constants_3.ApiPluginStartOptions.newApi().id,
1119
- };
1120
- }
1121
- exports.apiPluginStartQuestion = apiPluginStartQuestion;
1122
- function pluginManifestQuestion() {
1123
- const correlationId = correlator_1.Correlator.getId();
1124
- return {
1125
- type: "singleFile",
1126
- name: constants_3.QuestionNames.PluginManifestFilePath,
1127
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.pluginManifest.title"),
1128
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.pluginManifest.placeholder"),
1129
- cliDescription: "Plugin manifest path.",
1130
- filters: {
1131
- files: ["json"],
1132
- },
1133
- defaultFolder: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform) ? "./" : os.homedir(),
1134
- validation: {
1135
- validFunc: async (input) => {
1136
- const manifestRes = await PluginManifestUtils_1.pluginManifestUtils.readPluginManifestFile(input.trim());
1137
- if (manifestRes.isErr()) {
1138
- (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginManifestFilePath), manifestRes.error, {
1139
- "correlation-id": correlationId,
1140
- });
1141
- return manifestRes.error.displayMessage;
1142
- }
1143
- else {
1144
- const manifest = manifestRes.value;
1145
- const checkRes = (0, helper_2.validateSourcePluginManifest)(manifest, constants_3.QuestionNames.PluginManifestFilePath);
1146
- if (checkRes.isErr()) {
1147
- (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginManifestFilePath), checkRes.error, {
1148
- "correlation-id": correlationId,
1149
- });
1150
- return checkRes.error.displayMessage;
1151
- }
1152
- }
1153
- },
1154
- },
1155
- };
1156
- }
1157
- exports.pluginManifestQuestion = pluginManifestQuestion;
1158
- function pluginApiSpecQuestion() {
1159
- const correlationId = correlator_1.Correlator.getId();
1160
- return {
1161
- type: "singleFile",
1162
- name: constants_3.QuestionNames.PluginOpenApiSpecFilePath,
1163
- title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.apiSpec.title"),
1164
- placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.openApiSpec.placeholder"),
1165
- cliDescription: "OpenAPI description document used for your API plugin.",
1166
- filters: {
1167
- files: ["json", "yml", "yaml"],
1168
- },
1169
- defaultFolder: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
1170
- ? "./"
1171
- : path.dirname(inputs[constants_3.QuestionNames.PluginManifestFilePath]),
1172
- validation: {
1173
- validFunc: async (input, inputs) => {
1174
- if (!inputs) {
1175
- throw new Error("inputs is undefined"); // should never happen
1176
- }
1177
- const filePath = input.trim();
1178
- const ext = path.extname(filePath).toLowerCase();
1179
- if (![".json", ".yml", ".yaml"].includes(ext)) {
1180
- const error = new error_2.FileNotSupportError(error_2.CoreSource, ["json", "yml", "yaml"].join(", "));
1181
- (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginOpenApiSpecFilePath), error, {
1182
- "correlation-id": correlationId,
1183
- });
1184
- return error.displayMessage;
1185
- }
1186
- const specParser = new m365_spec_parser_1.SpecParser(filePath, (0, helper_1.getParserOptions)(m365_spec_parser_1.ProjectType.Copilot));
1187
- const validationRes = await specParser.validate();
1188
- const invalidSpecError = validationRes.errors.find((o) => o.type === m365_spec_parser_1.ErrorType.SpecNotValid);
1189
- if (invalidSpecError) {
1190
- const error = new teamsfx_api_1.UserError(constants_1.SpecParserSource, telemetry_1.ApiSpecTelemetryPropertis.InvalidApiSpec, invalidSpecError.content, invalidSpecError.content);
1191
- (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginOpenApiSpecFilePath), error, {
1192
- "correlation-id": correlationId,
1193
- [telemetry_1.ApiSpecTelemetryPropertis.SpecNotValidDetails]: invalidSpecError.content,
1194
- });
1195
- }
1196
- return invalidSpecError === null || invalidSpecError === void 0 ? void 0 : invalidSpecError.content;
1197
- },
1198
- },
2070
+ name: questionNames_1.QuestionNames.AzureOpenAIDeploymentName,
2071
+ title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIDeploymentName.title"),
2072
+ placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIDeploymentName.placeholder"),
1199
2073
  };
1200
2074
  }
1201
- exports.pluginApiSpecQuestion = pluginApiSpecQuestion;
1202
2075
  function capabilitySubTree() {
1203
2076
  const node = {
1204
2077
  data: capabilityQuestion(),
1205
2078
  children: [
1206
2079
  {
1207
2080
  // Notification bot trigger sub-tree
1208
- condition: { equals: constants_3.CapabilityOptions.notificationBot().id },
2081
+ condition: { equals: CapabilityOptions.notificationBot().id },
1209
2082
  data: botTriggerQuestion(),
1210
2083
  },
1211
2084
  {
1212
2085
  // SPFx sub-tree
1213
- condition: { equals: constants_3.CapabilityOptions.SPFxTab().id },
2086
+ condition: { equals: CapabilityOptions.SPFxTab().id },
1214
2087
  data: SPFxSolutionQuestion(),
1215
2088
  children: [
1216
2089
  {
@@ -1232,23 +2105,23 @@ function capabilitySubTree() {
1232
2105
  // office addin import sub-tree (capabilities=office-addin-import | outlook-addin-import)
1233
2106
  condition: {
1234
2107
  enum: [
1235
- constants_3.CapabilityOptions.outlookAddinImport().id,
1236
- constants_3.CapabilityOptions.officeAddinImport().id,
2108
+ CapabilityOptions.outlookAddinImport().id,
2109
+ CapabilityOptions.officeAddinImport().id,
1237
2110
  ],
1238
2111
  },
1239
- data: { type: "group", name: constants_3.QuestionNames.OfficeAddinImport },
2112
+ data: { type: "group", name: questionNames_1.QuestionNames.OfficeAddinImport },
1240
2113
  children: [
1241
2114
  {
1242
2115
  data: {
1243
2116
  type: "folder",
1244
- name: constants_3.QuestionNames.OfficeAddinFolder,
2117
+ name: questionNames_1.QuestionNames.OfficeAddinFolder,
1245
2118
  title: "Existing add-in project folder",
1246
2119
  },
1247
2120
  },
1248
2121
  {
1249
2122
  data: {
1250
2123
  type: "singleFile",
1251
- name: constants_3.QuestionNames.OfficeAddinManifest,
2124
+ name: questionNames_1.QuestionNames.OfficeAddinManifest,
1252
2125
  title: "Select import project manifest file",
1253
2126
  },
1254
2127
  },
@@ -1256,76 +2129,60 @@ function capabilitySubTree() {
1256
2129
  },
1257
2130
  {
1258
2131
  // Search ME sub-tree
1259
- condition: { equals: constants_3.CapabilityOptions.m365SearchMe().id },
2132
+ condition: { equals: CapabilityOptions.m365SearchMe().id },
1260
2133
  data: meArchitectureQuestion(),
1261
2134
  },
1262
2135
  {
1263
- condition: { equals: constants_3.CapabilityOptions.declarativeCopilot().id },
1264
- data: declarativeCopilotPluginQuestion(),
1265
- },
1266
- {
1267
- condition: (inputs) => {
1268
- return (inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.apiPlugin().id ||
1269
- inputs[constants_3.QuestionNames.WithPlugin] === constants_3.DeclarativeCopilotTypeOptions.withPlugin().id);
1270
- },
1271
- data: apiPluginStartQuestion(),
1272
- },
1273
- {
2136
+ // API ME from API Spec or Copilot plugin from API spec or AI Plugin
1274
2137
  condition: (inputs) => {
1275
- return inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.existingPlugin().id;
2138
+ return (inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginApiSpec().id ||
2139
+ inputs[questionNames_1.QuestionNames.Capabilities] ===
2140
+ CapabilityOptions.copilotPluginOpenAIPlugin().id ||
2141
+ inputs[questionNames_1.QuestionNames.MeArchitectureType] === MeArchitectureOptions.apiSpec().id);
1276
2142
  },
1277
- data: { type: "group", name: constants_3.QuestionNames.ImportPlugin },
2143
+ data: { type: "group", name: questionNames_1.QuestionNames.CopilotPluginExistingApi },
1278
2144
  children: [
1279
2145
  {
1280
- data: pluginManifestQuestion(),
2146
+ data: apiSpecLocationQuestion(),
1281
2147
  },
2148
+ // {
2149
+ // condition: { equals: CapabilityOptions.copilotPluginOpenAIPlugin().id },
2150
+ // data: openAIPluginManifestLocationQuestion(),
2151
+ // },
1282
2152
  {
1283
- data: pluginApiSpecQuestion(),
2153
+ data: apiOperationQuestion(),
1284
2154
  },
1285
2155
  ],
1286
2156
  },
1287
2157
  {
1288
2158
  condition: (inputs) => {
1289
- return (inputs[constants_3.QuestionNames.MeArchitectureType] == constants_3.MeArchitectureOptions.newApi().id ||
1290
- inputs[constants_3.QuestionNames.ApiPluginType] == constants_3.ApiPluginStartOptions.newApi().id);
2159
+ return inputs[questionNames_1.QuestionNames.MeArchitectureType] == MeArchitectureOptions.newApi().id;
1291
2160
  },
1292
- data: apiAuthQuestion(),
2161
+ data: apiMessageExtensionAuthQuestion(),
1293
2162
  },
1294
2163
  {
1295
2164
  condition: (inputs) => {
1296
- return inputs[constants_3.QuestionNames.Capabilities] == constants_3.CapabilityOptions.customCopilotRag().id;
2165
+ return inputs[questionNames_1.QuestionNames.Capabilities] == CapabilityOptions.customCopilotRag().id;
1297
2166
  },
1298
2167
  data: customCopilotRagQuestion(),
1299
- },
1300
- {
1301
- // from API spec
1302
- condition: (inputs) => {
1303
- return ((inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.apiSpec().id ||
1304
- inputs[constants_3.QuestionNames.MeArchitectureType] === constants_3.MeArchitectureOptions.apiSpec().id ||
1305
- inputs[constants_3.QuestionNames.CustomCopilotRag] === constants_3.CustomCopilotRagOptions.customApi().id) &&
1306
- !(
1307
- // Only skip this project when need to rediect to Kiota: 1. Feature flag enabled 2. Creating plugin/declarative copilot from existing spec
1308
- (featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaIntegration) &&
1309
- inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.apiSpec().id &&
1310
- (inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.apiPlugin().id ||
1311
- inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.declarativeCopilot().id))));
1312
- },
1313
- data: { type: "group", name: constants_3.QuestionNames.FromExistingApi },
1314
2168
  children: [
1315
2169
  {
2170
+ condition: (inputs) => {
2171
+ return (inputs[questionNames_1.QuestionNames.CustomCopilotRag] === CustomCopilotRagOptions.customApi().id);
2172
+ },
1316
2173
  data: apiSpecLocationQuestion(),
1317
2174
  },
1318
2175
  {
1319
- data: apiOperationQuestion(),
1320
2176
  condition: (inputs) => {
1321
- return !inputs[constants_3.QuestionNames.ApiPluginManifestPath];
2177
+ return (inputs[questionNames_1.QuestionNames.CustomCopilotRag] === CustomCopilotRagOptions.customApi().id);
1322
2178
  },
2179
+ data: apiOperationQuestion(),
1323
2180
  },
1324
2181
  ],
1325
2182
  },
1326
2183
  {
1327
2184
  condition: (inputs) => {
1328
- return (inputs[constants_3.QuestionNames.Capabilities] == constants_3.CapabilityOptions.customCopilotAssistant().id);
2185
+ return (inputs[questionNames_1.QuestionNames.Capabilities] == CapabilityOptions.customCopilotAssistant().id);
1329
2186
  },
1330
2187
  data: customCopilotAssistantQuestion(),
1331
2188
  },
@@ -1333,21 +2190,21 @@ function capabilitySubTree() {
1333
2190
  // programming language
1334
2191
  data: programmingLanguageQuestion(),
1335
2192
  condition: (inputs) => {
1336
- return ((!!inputs[constants_3.QuestionNames.Capabilities] &&
1337
- inputs[constants_3.QuestionNames.WithPlugin] !== constants_3.DeclarativeCopilotTypeOptions.noPlugin().id &&
1338
- inputs[constants_3.QuestionNames.ApiPluginType] !== constants_3.ApiPluginStartOptions.apiSpec().id &&
1339
- inputs[constants_3.QuestionNames.ApiPluginType] !== constants_3.ApiPluginStartOptions.existingPlugin().id &&
1340
- inputs[constants_3.QuestionNames.MeArchitectureType] !== constants_3.MeArchitectureOptions.apiSpec().id &&
1341
- inputs[constants_3.QuestionNames.Capabilities] !== constants_3.CapabilityOptions.officeAddinImport().id &&
1342
- inputs[constants_3.QuestionNames.Capabilities] !== constants_3.CapabilityOptions.outlookAddinImport().id) ||
1343
- (0, constants_3.getRuntime)(inputs) === constants_3.RuntimeOptions.DotNet().id);
2193
+ return (!!inputs[questionNames_1.QuestionNames.Capabilities] &&
2194
+ inputs[questionNames_1.QuestionNames.Capabilities] !== CapabilityOptions.copilotPluginApiSpec().id &&
2195
+ inputs[questionNames_1.QuestionNames.Capabilities] !==
2196
+ CapabilityOptions.copilotPluginOpenAIPlugin().id &&
2197
+ inputs[questionNames_1.QuestionNames.Capabilities] !== CapabilityOptions.customizeGptBasic().id &&
2198
+ inputs[questionNames_1.QuestionNames.MeArchitectureType] !== MeArchitectureOptions.apiSpec().id &&
2199
+ inputs[questionNames_1.QuestionNames.Capabilities] !== CapabilityOptions.officeAddinImport().id &&
2200
+ inputs[questionNames_1.QuestionNames.Capabilities] !== CapabilityOptions.outlookAddinImport().id);
1344
2201
  },
1345
2202
  },
1346
2203
  {
1347
2204
  condition: (inputs) => {
1348
- return (inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.customCopilotBasic().id ||
1349
- inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.customCopilotRag().id ||
1350
- inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.customCopilotAssistant().id);
2205
+ return (inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotBasic().id ||
2206
+ inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotRag().id ||
2207
+ inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.customCopilotAssistant().id);
1351
2208
  },
1352
2209
  data: llmServiceQuestion(),
1353
2210
  children: [
@@ -1358,14 +2215,14 @@ function capabilitySubTree() {
1358
2215
  {
1359
2216
  condition: (inputs) => {
1360
2217
  var _a;
1361
- return ((_a = inputs[constants_3.QuestionNames.AzureOpenAIKey]) === null || _a === void 0 ? void 0 : _a.length) > 0;
2218
+ return ((_a = inputs[questionNames_1.QuestionNames.AzureOpenAIKey]) === null || _a === void 0 ? void 0 : _a.length) > 0;
1362
2219
  },
1363
2220
  data: azureOpenAIEndpointQuestion(),
1364
2221
  children: [
1365
2222
  {
1366
2223
  condition: (inputs) => {
1367
2224
  var _a;
1368
- return ((_a = inputs[constants_3.QuestionNames.AzureOpenAIEndpoint]) === null || _a === void 0 ? void 0 : _a.length) > 0;
2225
+ return ((_a = inputs[questionNames_1.QuestionNames.AzureOpenAIEndpoint]) === null || _a === void 0 ? void 0 : _a.length) > 0;
1369
2226
  },
1370
2227
  data: azureOpenAIDeploymentNameQuestion(),
1371
2228
  },
@@ -1383,37 +2240,21 @@ function capabilitySubTree() {
1383
2240
  // Office addin framework for json manifest
1384
2241
  data: officeAddinFrameworkQuestion(),
1385
2242
  condition: (inputs) => {
1386
- return (inputs[constants_3.QuestionNames.ProjectType] === constants_3.ProjectTypeOptions.officeAddin().id &&
1387
- inputs[constants_3.QuestionNames.Capabilities] !== constants_3.CapabilityOptions.officeAddinImport().id);
2243
+ return (inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.officeAddin().id &&
2244
+ inputs[questionNames_1.QuestionNames.Capabilities] !== CapabilityOptions.officeAddinImport().id);
1388
2245
  },
1389
2246
  },
1390
2247
  {
1391
2248
  // root folder
1392
2249
  data: folderQuestion(),
1393
- condition: (inputs) => {
1394
- // Only skip this project when need to rediect to Kiota: 1. Feature flag enabled 2. Creating plugin/declarative copilot from existing spec 3. No plugin manifest path
1395
- return !(featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaIntegration) &&
1396
- inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.apiSpec().id &&
1397
- (inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.apiPlugin().id ||
1398
- inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.declarativeCopilot().id) &&
1399
- !inputs[constants_3.QuestionNames.ApiPluginManifestPath]);
1400
- },
1401
2250
  },
1402
2251
  {
1403
2252
  // app name
1404
2253
  data: appNameQuestion(),
1405
- condition: (inputs) => {
1406
- // Only skip this project when need to rediect to Kiota: 1. Feature flag enabled 2. Creating plugin/declarative copilot from existing spec 3. No plugin manifest path
1407
- return !(featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaIntegration) &&
1408
- inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.apiSpec().id &&
1409
- (inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.apiPlugin().id ||
1410
- inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.declarativeCopilot().id) &&
1411
- !inputs[constants_3.QuestionNames.ApiPluginManifestPath]);
1412
- },
1413
2254
  },
1414
2255
  ],
1415
2256
  condition: (inputs) => {
1416
- return inputs[constants_3.QuestionNames.ProjectType] !== constants_3.ProjectTypeOptions.startWithGithubCopilot().id;
2257
+ return inputs[questionNames_1.QuestionNames.ProjectType] !== ProjectTypeOptions.startWithGithubCopilot().id;
1417
2258
  },
1418
2259
  };
1419
2260
  return node;
@@ -1424,8 +2265,7 @@ function createProjectQuestionNode() {
1424
2265
  data: { type: "group" },
1425
2266
  children: [
1426
2267
  {
1427
- condition: (inputs) => featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.CLIDotNet) &&
1428
- teamsfx_api_1.CLIPlatforms.includes(inputs.platform),
2268
+ condition: (inputs) => featureFlags_1.isCLIDotNetEnabled() && teamsfx_api_1.CLIPlatforms.includes(inputs.platform),
1429
2269
  data: runtimeQuestion(),
1430
2270
  },
1431
2271
  {
@@ -1433,10 +2273,14 @@ function createProjectQuestionNode() {
1433
2273
  data: projectTypeQuestion(),
1434
2274
  cliOptionDisabled: "self",
1435
2275
  },
2276
+ {
2277
+ condition: (inputs) => inputs[questionNames_1.QuestionNames.ProjectType] === ProjectTypeOptions.officeXMLAddin().id,
2278
+ data: officeAddinHostingQuestion(),
2279
+ },
1436
2280
  capabilitySubTree(),
1437
2281
  {
1438
- condition: (inputs) => inputs.teamsAppFromTdp && (0, utils_1.isPersonalApp)(inputs.teamsAppFromTdp),
1439
- data: { type: "group", name: constants_3.QuestionNames.RepalceTabUrl },
2282
+ condition: (inputs) => inputs.teamsAppFromTdp && utils_2.isPersonalApp(inputs.teamsAppFromTdp),
2283
+ data: { type: "group", name: questionNames_1.QuestionNames.RepalceTabUrl },
1440
2284
  cliOptionDisabled: "all",
1441
2285
  inputsDisabled: "all",
1442
2286
  children: [
@@ -1461,7 +2305,7 @@ function createProjectQuestionNode() {
1461
2305
  {
1462
2306
  condition: (inputs) => {
1463
2307
  const appDef = inputs.teamsAppFromTdp;
1464
- return appDef && (0, utils_1.needBotCode)(appDef);
2308
+ return appDef && utils_2.needBotCode(appDef);
1465
2309
  },
1466
2310
  data: selectBotIdsQuestion(),
1467
2311
  cliOptionDisabled: "all",
@@ -1484,17 +2328,17 @@ function createSampleProjectQuestionNode() {
1484
2328
  }
1485
2329
  exports.createSampleProjectQuestionNode = createSampleProjectQuestionNode;
1486
2330
  function createProjectCliHelpNode() {
1487
- const node = (0, lodash_1.cloneDeep)(createProjectQuestionNode());
2331
+ const node = lodash_1.cloneDeep(createProjectQuestionNode());
1488
2332
  const deleteNames = [
1489
- constants_3.QuestionNames.ProjectType,
1490
- constants_3.QuestionNames.OfficeAddinImport,
1491
- constants_3.QuestionNames.OfficeAddinHost,
1492
- constants_3.QuestionNames.RepalceTabUrl,
1493
- constants_3.QuestionNames.ReplaceBotIds,
1494
- constants_3.QuestionNames.Samples,
2333
+ questionNames_1.QuestionNames.ProjectType,
2334
+ questionNames_1.QuestionNames.OfficeAddinImport,
2335
+ questionNames_1.QuestionNames.OfficeAddinHost,
2336
+ questionNames_1.QuestionNames.RepalceTabUrl,
2337
+ questionNames_1.QuestionNames.ReplaceBotIds,
2338
+ questionNames_1.QuestionNames.Samples,
1495
2339
  ];
1496
- if (!featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.CLIDotNet)) {
1497
- deleteNames.push(constants_3.QuestionNames.Runtime);
2340
+ if (!featureFlags_1.isCLIDotNetEnabled()) {
2341
+ deleteNames.push(questionNames_1.QuestionNames.Runtime);
1498
2342
  }
1499
2343
  trimQuestionTreeForCliHelp(node, deleteNames);
1500
2344
  return node;