@microsoft/teamsfx-core 2.0.10 → 2.0.11-alpha.2beeded72.0

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