@microsoft/teamsfx-core 2.0.10-alpha.fa1ce1fbb.0 → 2.0.10-alpha.fe2e47f9c.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 (663) hide show
  1. package/build/client/teamsDevPortalClient.d.ts +4 -5
  2. package/build/client/teamsDevPortalClient.d.ts.map +1 -1
  3. package/build/client/teamsDevPortalClient.js +67 -47
  4. package/build/client/teamsDevPortalClient.js.map +1 -1
  5. package/build/common/azureUtils.js +4 -4
  6. package/build/common/azureUtils.js.map +1 -1
  7. package/build/common/constants.d.ts +1 -19
  8. package/build/common/constants.d.ts.map +1 -1
  9. package/build/common/constants.js +10 -29
  10. package/build/common/constants.js.map +1 -1
  11. package/build/common/correlator.d.ts +1 -0
  12. package/build/common/correlator.d.ts.map +1 -1
  13. package/build/common/correlator.js +6 -1
  14. package/build/common/correlator.js.map +1 -1
  15. package/build/common/featureFlags.d.ts +49 -19
  16. package/build/common/featureFlags.d.ts.map +1 -1
  17. package/build/common/featureFlags.js +82 -62
  18. package/build/common/featureFlags.js.map +1 -1
  19. package/build/common/globalState.js +3 -3
  20. package/build/common/globalState.js.map +1 -1
  21. package/build/common/globalVars.d.ts +1 -0
  22. package/build/common/globalVars.d.ts.map +1 -1
  23. package/build/common/globalVars.js +2 -1
  24. package/build/common/globalVars.js.map +1 -1
  25. package/build/common/jsonUtils.js +10 -10
  26. package/build/common/jsonUtils.js.map +1 -1
  27. package/build/common/localizeUtils.js +2 -2
  28. package/build/common/localizeUtils.js.map +1 -1
  29. package/build/common/projectSettingsHelper.js +1 -1
  30. package/build/common/projectSettingsHelper.js.map +1 -1
  31. package/build/common/projectTypeChecker.js +3 -3
  32. package/build/common/projectTypeChecker.js.map +1 -1
  33. package/build/common/samples.js +5 -5
  34. package/build/common/samples.js.map +1 -1
  35. package/build/common/secretmasker/dict.d.ts +22 -0
  36. package/build/common/secretmasker/dict.d.ts.map +1 -0
  37. package/build/common/secretmasker/dict.js +83 -0
  38. package/build/common/secretmasker/dict.js.map +1 -0
  39. package/build/common/secretmasker/feature.d.ts +19 -0
  40. package/build/common/secretmasker/feature.d.ts.map +1 -0
  41. package/build/common/secretmasker/feature.js +389 -0
  42. package/build/common/secretmasker/feature.js.map +1 -0
  43. package/build/common/secretmasker/masker.d.ts +12 -0
  44. package/build/common/secretmasker/masker.d.ts.map +1 -0
  45. package/build/common/secretmasker/masker.js +54 -0
  46. package/build/common/secretmasker/masker.js.map +1 -0
  47. package/build/common/stringUtils.d.ts +3 -5
  48. package/build/common/stringUtils.d.ts.map +1 -1
  49. package/build/common/stringUtils.js +13 -105
  50. package/build/common/stringUtils.js.map +1 -1
  51. package/build/common/telemetry.d.ts +13 -2
  52. package/build/common/telemetry.d.ts.map +1 -1
  53. package/build/common/telemetry.js +21 -3
  54. package/build/common/telemetry.js.map +1 -1
  55. package/build/common/templates-config.json +1 -1
  56. package/build/common/tools.d.ts +1 -6
  57. package/build/common/tools.d.ts.map +1 -1
  58. package/build/common/tools.js +15 -28
  59. package/build/common/tools.js.map +1 -1
  60. package/build/common/utils.d.ts +4 -0
  61. package/build/common/utils.d.ts.map +1 -1
  62. package/build/common/utils.js +38 -1
  63. package/build/common/utils.js.map +1 -1
  64. package/build/common/wrappedAxiosClient.d.ts +1 -0
  65. package/build/common/wrappedAxiosClient.d.ts.map +1 -1
  66. package/build/common/wrappedAxiosClient.js +58 -29
  67. package/build/common/wrappedAxiosClient.js.map +1 -1
  68. package/build/component/configManager/actionInjector.js +2 -2
  69. package/build/component/configManager/actionInjector.js.map +1 -1
  70. package/build/component/configManager/lifecycle.js +9 -9
  71. package/build/component/configManager/lifecycle.js.map +1 -1
  72. package/build/component/configManager/parser.js +20 -20
  73. package/build/component/configManager/parser.js.map +1 -1
  74. package/build/component/configManager/validator.js +2 -2
  75. package/build/component/configManager/validator.js.map +1 -1
  76. package/build/component/constant/commonConstant.d.ts +1 -0
  77. package/build/component/constant/commonConstant.d.ts.map +1 -1
  78. package/build/component/constant/commonConstant.js +1 -0
  79. package/build/component/constant/commonConstant.js.map +1 -1
  80. package/build/component/constants.js +5 -5
  81. package/build/component/constants.js.map +1 -1
  82. package/build/component/coordinator/index.d.ts.map +1 -1
  83. package/build/component/coordinator/index.js +95 -212
  84. package/build/component/coordinator/index.js.map +1 -1
  85. package/build/component/coordinator/summary.js +10 -10
  86. package/build/component/coordinator/summary.js.map +1 -1
  87. package/build/component/deployUtils.js +4 -4
  88. package/build/component/deployUtils.js.map +1 -1
  89. package/build/component/deps-checker/constant/helpLink.d.ts +0 -3
  90. package/build/component/deps-checker/constant/helpLink.d.ts.map +1 -1
  91. package/build/component/deps-checker/constant/helpLink.js +1 -6
  92. package/build/component/deps-checker/constant/helpLink.js.map +1 -1
  93. package/build/component/deps-checker/constant/message.js +24 -24
  94. package/build/component/deps-checker/constant/message.js.map +1 -1
  95. package/build/component/deps-checker/internal/dotnetChecker.js +13 -13
  96. package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
  97. package/build/component/deps-checker/internal/funcToolChecker.js +13 -13
  98. package/build/component/deps-checker/internal/funcToolChecker.js.map +1 -1
  99. package/build/component/deps-checker/internal/testToolChecker.js +21 -21
  100. package/build/component/deps-checker/internal/testToolChecker.js.map +1 -1
  101. package/build/component/deps-checker/internal/vxTestAppChecker.d.ts.map +1 -1
  102. package/build/component/deps-checker/internal/vxTestAppChecker.js +14 -8
  103. package/build/component/deps-checker/internal/vxTestAppChecker.js.map +1 -1
  104. package/build/component/developerPortalScaffoldUtils.js +15 -15
  105. package/build/component/developerPortalScaffoldUtils.js.map +1 -1
  106. package/build/component/driver/aad/create.d.ts.map +1 -1
  107. package/build/component/driver/aad/create.js +38 -23
  108. package/build/component/driver/aad/create.js.map +1 -1
  109. package/build/component/driver/aad/error/aadAppNameTooLongError.js +2 -2
  110. package/build/component/driver/aad/error/aadAppNameTooLongError.js.map +1 -1
  111. package/build/component/driver/aad/error/aadManifestError.js +27 -27
  112. package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
  113. package/build/component/driver/aad/error/clientSecretNotAllowedError.js +2 -2
  114. package/build/component/driver/aad/error/clientSecretNotAllowedError.js.map +1 -1
  115. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js +2 -2
  116. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js.map +1 -1
  117. package/build/component/driver/aad/error/invalidFieldInManifestError.js +2 -2
  118. package/build/component/driver/aad/error/invalidFieldInManifestError.js.map +1 -1
  119. package/build/component/driver/aad/error/missingEnvError.js +2 -2
  120. package/build/component/driver/aad/error/missingEnvError.js.map +1 -1
  121. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.d.ts +5 -0
  122. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.d.ts.map +1 -0
  123. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.js +23 -0
  124. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.js.map +1 -0
  125. package/build/component/driver/aad/update.js +16 -16
  126. package/build/component/driver/aad/update.js.map +1 -1
  127. package/build/component/driver/aad/utility/aadAppClient.js +9 -9
  128. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  129. package/build/component/driver/aad/utility/aadManifestHelper.js +3 -3
  130. package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
  131. package/build/component/driver/aad/utility/buildAadManifest.js +5 -5
  132. package/build/component/driver/aad/utility/buildAadManifest.js.map +1 -1
  133. package/build/component/driver/aad/utility/constants.d.ts +2 -0
  134. package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
  135. package/build/component/driver/aad/utility/constants.js +2 -0
  136. package/build/component/driver/aad/utility/constants.js.map +1 -1
  137. package/build/component/driver/add/addWebPart.js +6 -6
  138. package/build/component/driver/add/addWebPart.js.map +1 -1
  139. package/build/component/driver/add/error/noConfigurationError.js +2 -2
  140. package/build/component/driver/add/error/noConfigurationError.js.map +1 -1
  141. package/build/component/driver/apiKey/create.d.ts.map +1 -1
  142. package/build/component/driver/apiKey/create.js +23 -20
  143. package/build/component/driver/apiKey/create.js.map +1 -1
  144. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js +2 -2
  145. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js.map +1 -1
  146. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js +2 -2
  147. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js.map +1 -1
  148. package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js +2 -2
  149. package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js.map +1 -1
  150. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.d.ts +5 -0
  151. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.d.ts.map +1 -0
  152. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.js +21 -0
  153. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.js.map +1 -0
  154. package/build/component/driver/apiKey/error/apiKeyNameTooLong.js +2 -2
  155. package/build/component/driver/apiKey/error/apiKeyNameTooLong.js.map +1 -1
  156. package/build/component/driver/apiKey/update.d.ts.map +1 -1
  157. package/build/component/driver/apiKey/update.js +20 -20
  158. package/build/component/driver/apiKey/update.js.map +1 -1
  159. package/build/component/driver/apiKey/utility/constants.d.ts +1 -1
  160. package/build/component/driver/apiKey/utility/constants.js +1 -1
  161. package/build/component/driver/apiKey/utility/utility.js +2 -2
  162. package/build/component/driver/apiKey/utility/utility.js.map +1 -1
  163. package/build/component/driver/arm/deploy.js +4 -4
  164. package/build/component/driver/arm/deploy.js.map +1 -1
  165. package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
  166. package/build/component/driver/arm/deployImpl.js +19 -17
  167. package/build/component/driver/arm/deployImpl.js.map +1 -1
  168. package/build/component/driver/arm/util/bicepChecker.js +5 -5
  169. package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
  170. package/build/component/driver/arm/util/handleError.js +9 -9
  171. package/build/component/driver/arm/util/handleError.js.map +1 -1
  172. package/build/component/driver/arm/validator.js +3 -3
  173. package/build/component/driver/arm/validator.js.map +1 -1
  174. package/build/component/driver/botAadApp/create.d.ts.map +1 -1
  175. package/build/component/driver/botAadApp/create.js +38 -22
  176. package/build/component/driver/botAadApp/create.js.map +1 -1
  177. package/build/component/driver/botAadApp/error/unexpectedEmptyBotPasswordError.js +2 -2
  178. package/build/component/driver/botAadApp/error/unexpectedEmptyBotPasswordError.js.map +1 -1
  179. package/build/component/driver/botAadApp/utility/constants.d.ts +1 -0
  180. package/build/component/driver/botAadApp/utility/constants.d.ts.map +1 -1
  181. package/build/component/driver/botAadApp/utility/constants.js +1 -0
  182. package/build/component/driver/botAadApp/utility/constants.js.map +1 -1
  183. package/build/component/driver/botFramework/createOrUpdateBot.js +14 -14
  184. package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
  185. package/build/component/driver/botFramework/error/invalidBotIdError.js +2 -2
  186. package/build/component/driver/botFramework/error/invalidBotIdError.js.map +1 -1
  187. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js +3 -3
  188. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js.map +1 -1
  189. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js +3 -3
  190. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js.map +1 -1
  191. package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts.map +1 -1
  192. package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js +16 -10
  193. package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js.map +1 -1
  194. package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +8 -8
  195. package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
  196. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js +14 -14
  197. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js.map +1 -1
  198. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +6 -6
  199. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
  200. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +8 -8
  201. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
  202. package/build/component/driver/deploy/azure/impl/baseDeployImpl.js +11 -11
  203. package/build/component/driver/deploy/azure/impl/baseDeployImpl.js.map +1 -1
  204. package/build/component/driver/deploy/spfx/deployDriver.js +15 -15
  205. package/build/component/driver/deploy/spfx/deployDriver.js.map +1 -1
  206. package/build/component/driver/deploy/spfx/error/createAppCatalogFailedError.js +2 -2
  207. package/build/component/driver/deploy/spfx/error/createAppCatalogFailedError.js.map +1 -1
  208. package/build/component/driver/deploy/spfx/error/getGraphTokenFailedError.js +2 -2
  209. package/build/component/driver/deploy/spfx/error/getGraphTokenFailedError.js.map +1 -1
  210. package/build/component/driver/deploy/spfx/error/getSPOTokenFailedError.js +2 -2
  211. package/build/component/driver/deploy/spfx/error/getSPOTokenFailedError.js.map +1 -1
  212. package/build/component/driver/deploy/spfx/error/getTenantFailedError.js +2 -2
  213. package/build/component/driver/deploy/spfx/error/getTenantFailedError.js.map +1 -1
  214. package/build/component/driver/deploy/spfx/error/insufficientPermissionError.js +2 -2
  215. package/build/component/driver/deploy/spfx/error/insufficientPermissionError.js.map +1 -1
  216. package/build/component/driver/deploy/spfx/error/noSPPackageError.js +2 -2
  217. package/build/component/driver/deploy/spfx/error/noSPPackageError.js.map +1 -1
  218. package/build/component/driver/deploy/spfx/error/noValidAppCatelogError.js +2 -2
  219. package/build/component/driver/deploy/spfx/error/noValidAppCatelogError.js.map +1 -1
  220. package/build/component/driver/deploy/spfx/error/uploadAppPackageFailedError.js +2 -2
  221. package/build/component/driver/deploy/spfx/error/uploadAppPackageFailedError.js.map +1 -1
  222. package/build/component/driver/deploy/spfx/utility/constants.js +5 -5
  223. package/build/component/driver/deploy/spfx/utility/constants.js.map +1 -1
  224. package/build/component/driver/devTool/constant.d.ts +8 -8
  225. package/build/component/driver/devTool/constant.d.ts.map +1 -1
  226. package/build/component/driver/devTool/constant.js +10 -10
  227. package/build/component/driver/devTool/constant.js.map +1 -1
  228. package/build/component/driver/devTool/error/dotnetInstallationUserError.js +3 -3
  229. package/build/component/driver/devTool/error/dotnetInstallationUserError.js.map +1 -1
  230. package/build/component/driver/devTool/error/funcInstallationUserError.js +3 -3
  231. package/build/component/driver/devTool/error/funcInstallationUserError.js.map +1 -1
  232. package/build/component/driver/devTool/error/testToolInstallationUserError.js +3 -3
  233. package/build/component/driver/devTool/error/testToolInstallationUserError.js.map +1 -1
  234. package/build/component/driver/devTool/installDriver.js +6 -6
  235. package/build/component/driver/devTool/installDriver.js.map +1 -1
  236. package/build/component/driver/error/outputEnvironmentVariableUndefinedError.js +2 -2
  237. package/build/component/driver/error/outputEnvironmentVariableUndefinedError.js.map +1 -1
  238. package/build/component/driver/file/createOrUpdateEnvironmentFile.js +11 -11
  239. package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
  240. package/build/component/driver/file/createOrUpdateJsonFile.js +12 -12
  241. package/build/component/driver/file/createOrUpdateJsonFile.js.map +1 -1
  242. package/build/component/driver/index.d.ts +1 -0
  243. package/build/component/driver/index.d.ts.map +1 -1
  244. package/build/component/driver/index.js +1 -0
  245. package/build/component/driver/index.js.map +1 -1
  246. package/build/component/driver/m365/acquire.js +12 -12
  247. package/build/component/driver/m365/acquire.js.map +1 -1
  248. package/build/component/driver/middleware/addSWADeployTelemetry.js +2 -2
  249. package/build/component/driver/middleware/addSWADeployTelemetry.js.map +1 -1
  250. package/build/component/driver/oauth/create.d.ts.map +1 -1
  251. package/build/component/driver/oauth/create.js +51 -21
  252. package/build/component/driver/oauth/create.js.map +1 -1
  253. package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js +2 -2
  254. package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js.map +1 -1
  255. package/build/component/driver/oauth/error/oauthDisablePKCEError.d.ts +5 -0
  256. package/build/component/driver/oauth/error/oauthDisablePKCEError.d.ts.map +1 -0
  257. package/build/component/driver/oauth/error/oauthDisablePKCEError.js +21 -0
  258. package/build/component/driver/oauth/error/oauthDisablePKCEError.js.map +1 -0
  259. package/build/component/driver/oauth/error/oauthDomainInvalid.js +2 -2
  260. package/build/component/driver/oauth/error/oauthDomainInvalid.js.map +1 -1
  261. package/build/component/driver/oauth/error/oauthFailedToGetDomain.js +2 -2
  262. package/build/component/driver/oauth/error/oauthFailedToGetDomain.js.map +1 -1
  263. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.d.ts +5 -0
  264. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.d.ts.map +1 -0
  265. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.js +21 -0
  266. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.js.map +1 -0
  267. package/build/component/driver/oauth/error/oauthNameTooLong.js +2 -2
  268. package/build/component/driver/oauth/error/oauthNameTooLong.js.map +1 -1
  269. package/build/component/driver/oauth/interface/createOauthArgs.d.ts +2 -0
  270. package/build/component/driver/oauth/interface/createOauthArgs.d.ts.map +1 -1
  271. package/build/component/driver/oauth/interface/updateOauthArgs.d.ts +1 -0
  272. package/build/component/driver/oauth/interface/updateOauthArgs.d.ts.map +1 -1
  273. package/build/component/driver/oauth/update.d.ts.map +1 -1
  274. package/build/component/driver/oauth/update.js +30 -19
  275. package/build/component/driver/oauth/update.js.map +1 -1
  276. package/build/component/driver/oauth/utility/constants.d.ts +1 -1
  277. package/build/component/driver/oauth/utility/constants.js +1 -1
  278. package/build/component/driver/oauth/utility/utility.js +5 -6
  279. package/build/component/driver/oauth/utility/utility.js.map +1 -1
  280. package/build/component/driver/script/baseBuildDriver.js +8 -8
  281. package/build/component/driver/script/baseBuildDriver.js.map +1 -1
  282. package/build/component/driver/script/dotnetBuildDriver.js +3 -3
  283. package/build/component/driver/script/dotnetBuildDriver.js.map +1 -1
  284. package/build/component/driver/script/npmBuildDriver.js +3 -3
  285. package/build/component/driver/script/npmBuildDriver.js.map +1 -1
  286. package/build/component/driver/script/npxBuildDriver.js +5 -5
  287. package/build/component/driver/script/npxBuildDriver.js.map +1 -1
  288. package/build/component/driver/script/scriptDriver.d.ts +2 -0
  289. package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
  290. package/build/component/driver/script/scriptDriver.js +28 -29
  291. package/build/component/driver/script/scriptDriver.js.map +1 -1
  292. package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
  293. package/build/component/driver/teamsApp/appStudio.js +43 -54
  294. package/build/component/driver/teamsApp/appStudio.js.map +1 -1
  295. package/build/component/driver/teamsApp/clients/appStudioClient.js +20 -20
  296. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  297. package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
  298. package/build/component/driver/teamsApp/configure.js +23 -23
  299. package/build/component/driver/teamsApp/configure.js.map +1 -1
  300. package/build/component/driver/teamsApp/constants.d.ts +15 -1
  301. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  302. package/build/component/driver/teamsApp/constants.js +132 -2
  303. package/build/component/driver/teamsApp/constants.js.map +1 -1
  304. package/build/component/driver/teamsApp/copyAppPackageToSPFx.js +8 -8
  305. package/build/component/driver/teamsApp/copyAppPackageToSPFx.js.map +1 -1
  306. package/build/component/driver/teamsApp/create.d.ts.map +1 -1
  307. package/build/component/driver/teamsApp/create.js +21 -21
  308. package/build/component/driver/teamsApp/create.js.map +1 -1
  309. package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -1
  310. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  311. package/build/component/driver/teamsApp/createAppPackage.js +83 -67
  312. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  313. package/build/component/driver/teamsApp/errors.d.ts +6 -2
  314. package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
  315. package/build/component/driver/teamsApp/errors.js +49 -42
  316. package/build/component/driver/teamsApp/errors.js.map +1 -1
  317. package/build/component/driver/teamsApp/interfaces/CreateAppPackageArgs.d.ts +6 -2
  318. package/build/component/driver/teamsApp/interfaces/CreateAppPackageArgs.d.ts.map +1 -1
  319. package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +2 -0
  320. package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -1
  321. package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -1
  322. package/build/component/driver/teamsApp/interfaces/SyncManifest.d.ts +20 -0
  323. package/build/component/driver/teamsApp/interfaces/SyncManifest.d.ts.map +1 -0
  324. package/build/component/driver/teamsApp/interfaces/SyncManifest.js +5 -0
  325. package/build/component/driver/teamsApp/interfaces/SyncManifest.js.map +1 -0
  326. package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts +1 -0
  327. package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts.map +1 -1
  328. package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
  329. package/build/component/driver/teamsApp/publishAppPackage.js +35 -35
  330. package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
  331. package/build/component/driver/teamsApp/syncManifest.d.ts +14 -0
  332. package/build/component/driver/teamsApp/syncManifest.d.ts.map +1 -0
  333. package/build/component/driver/teamsApp/syncManifest.js +226 -0
  334. package/build/component/driver/teamsApp/syncManifest.js.map +1 -0
  335. package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
  336. package/build/component/driver/teamsApp/teamsappMgr.js +41 -42
  337. package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
  338. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +5 -3
  339. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -1
  340. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +45 -21
  341. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
  342. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +3 -2
  343. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
  344. package/build/component/driver/teamsApp/utils/ManifestUtils.js +63 -39
  345. package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
  346. package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts +4 -3
  347. package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -1
  348. package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +36 -18
  349. package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -1
  350. package/build/component/driver/teamsApp/utils/utils.d.ts +4 -4
  351. package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
  352. package/build/component/driver/teamsApp/utils/utils.js +45 -15
  353. package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
  354. package/build/component/driver/teamsApp/validate.js +27 -27
  355. package/build/component/driver/teamsApp/validate.js.map +1 -1
  356. package/build/component/driver/teamsApp/validateAppPackage.d.ts +1 -0
  357. package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
  358. package/build/component/driver/teamsApp/validateAppPackage.js +52 -38
  359. package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
  360. package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
  361. package/build/component/driver/teamsApp/validateTestCases.js +36 -36
  362. package/build/component/driver/teamsApp/validateTestCases.js.map +1 -1
  363. package/build/component/driver/util/wrapUtil.js +6 -6
  364. package/build/component/driver/util/wrapUtil.js.map +1 -1
  365. package/build/component/error/componentError.js +8 -8
  366. package/build/component/error/componentError.js.map +1 -1
  367. package/build/component/feature/collaboration.d.ts.map +1 -1
  368. package/build/component/feature/collaboration.js +56 -56
  369. package/build/component/feature/collaboration.js.map +1 -1
  370. package/build/component/feature/createAuthFiles.js +8 -8
  371. package/build/component/feature/createAuthFiles.js.map +1 -1
  372. package/build/component/feature/sso.js +4 -4
  373. package/build/component/feature/sso.js.map +1 -1
  374. package/build/component/generator/apiSpec/generator.d.ts +15 -0
  375. package/build/component/generator/apiSpec/generator.d.ts.map +1 -0
  376. package/build/component/generator/apiSpec/generator.js +260 -0
  377. package/build/component/generator/apiSpec/generator.js.map +1 -0
  378. package/build/component/generator/{copilotPlugin → apiSpec}/helper.d.ts +23 -9
  379. package/build/component/generator/apiSpec/helper.d.ts.map +1 -0
  380. package/build/component/generator/{copilotPlugin → apiSpec}/helper.js +309 -127
  381. package/build/component/generator/apiSpec/helper.js.map +1 -0
  382. package/build/component/generator/constant.d.ts +1 -0
  383. package/build/component/generator/constant.d.ts.map +1 -1
  384. package/build/component/generator/constant.js +2 -1
  385. package/build/component/generator/constant.js.map +1 -1
  386. package/build/component/generator/{officeXMLAddin → copilotExtension}/generator.d.ts +8 -10
  387. package/build/component/generator/copilotExtension/generator.d.ts.map +1 -0
  388. package/build/component/generator/copilotExtension/generator.js +116 -0
  389. package/build/component/generator/copilotExtension/generator.js.map +1 -0
  390. package/build/component/generator/copilotExtension/helper.d.ts +8 -0
  391. package/build/component/generator/copilotExtension/helper.d.ts.map +1 -0
  392. package/build/component/generator/copilotExtension/helper.js +114 -0
  393. package/build/component/generator/copilotExtension/helper.js.map +1 -0
  394. package/build/component/generator/error.d.ts +1 -1
  395. package/build/component/generator/error.d.ts.map +1 -1
  396. package/build/component/generator/error.js +5 -5
  397. package/build/component/generator/error.js.map +1 -1
  398. package/build/component/generator/generator.d.ts.map +1 -1
  399. package/build/component/generator/generator.js +25 -19
  400. package/build/component/generator/generator.js.map +1 -1
  401. package/build/component/generator/generatorAction.js +7 -7
  402. package/build/component/generator/generatorAction.js.map +1 -1
  403. package/build/component/generator/generatorProvider.js +6 -6
  404. package/build/component/generator/generatorProvider.js.map +1 -1
  405. package/build/component/generator/officeAddin/generator.d.ts +1 -2
  406. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  407. package/build/component/generator/officeAddin/generator.js +39 -41
  408. package/build/component/generator/officeAddin/generator.js.map +1 -1
  409. package/build/component/generator/officeAddin/helperMethods.js +5 -5
  410. package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
  411. package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -1
  412. package/build/component/generator/officeXMLAddin/projectConfig.js +0 -75
  413. package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -1
  414. package/build/component/generator/spfx/depsChecker/generatorChecker.js +4 -4
  415. package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
  416. package/build/component/generator/spfx/depsChecker/yoChecker.js +4 -4
  417. package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
  418. package/build/component/generator/spfx/error.js +19 -19
  419. package/build/component/generator/spfx/error.js.map +1 -1
  420. package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
  421. package/build/component/generator/spfx/spfxGenerator.js +76 -76
  422. package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
  423. package/build/component/generator/spfx/utils/constants.js +8 -8
  424. package/build/component/generator/spfx/utils/constants.js.map +1 -1
  425. package/build/component/generator/spfx/utils/telemetry-helper.js +1 -1
  426. package/build/component/generator/spfx/utils/telemetry-helper.js.map +1 -1
  427. package/build/component/generator/spfx/utils/utils.d.ts +1 -0
  428. package/build/component/generator/spfx/utils/utils.d.ts.map +1 -1
  429. package/build/component/generator/spfx/utils/utils.js +13 -9
  430. package/build/component/generator/spfx/utils/utils.js.map +1 -1
  431. package/build/component/generator/templates/ssrTabGenerator.js +1 -1
  432. package/build/component/generator/templates/ssrTabGenerator.js.map +1 -1
  433. package/build/component/generator/templates/templateGenerator.js +13 -13
  434. package/build/component/generator/templates/templateGenerator.js.map +1 -1
  435. package/build/component/generator/templates/templateNames.d.ts +1 -0
  436. package/build/component/generator/templates/templateNames.d.ts.map +1 -1
  437. package/build/component/generator/templates/templateNames.js +3 -9
  438. package/build/component/generator/templates/templateNames.js.map +1 -1
  439. package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -1
  440. package/build/component/generator/templates/templateReplaceMap.js +29 -9
  441. package/build/component/generator/templates/templateReplaceMap.js.map +1 -1
  442. package/build/component/generator/utils.js +6 -6
  443. package/build/component/generator/utils.js.map +1 -1
  444. package/build/component/local/constants.d.ts +108 -108
  445. package/build/component/local/localCertificateManager.d.ts.map +1 -1
  446. package/build/component/local/localCertificateManager.js +11 -9
  447. package/build/component/local/localCertificateManager.js.map +1 -1
  448. package/build/component/local/localEnvManager.js +2 -2
  449. package/build/component/local/localEnvManager.js.map +1 -1
  450. package/build/component/local/localTelemetryReporter.js +3 -3
  451. package/build/component/local/localTelemetryReporter.js.map +1 -1
  452. package/build/component/local/portChecker.js +4 -4
  453. package/build/component/local/portChecker.js.map +1 -1
  454. package/build/component/local/taskDefinition.js +3 -3
  455. package/build/component/local/taskDefinition.js.map +1 -1
  456. package/build/component/m365/constants.d.ts +3 -0
  457. package/build/component/m365/constants.d.ts.map +1 -1
  458. package/build/component/m365/constants.js +4 -1
  459. package/build/component/m365/constants.js.map +1 -1
  460. package/build/component/m365/errors.js +2 -2
  461. package/build/component/m365/errors.js.map +1 -1
  462. package/build/component/m365/launchHelper.d.ts +2 -2
  463. package/build/component/m365/launchHelper.d.ts.map +1 -1
  464. package/build/component/m365/launchHelper.js +25 -17
  465. package/build/component/m365/launchHelper.js.map +1 -1
  466. package/build/component/m365/packageService.js +19 -19
  467. package/build/component/m365/packageService.js.map +1 -1
  468. package/build/component/messages.js +7 -7
  469. package/build/component/messages.js.map +1 -1
  470. package/build/component/middleware/actionExecutionMW.js +8 -8
  471. package/build/component/middleware/actionExecutionMW.js.map +1 -1
  472. package/build/component/middleware/envMW.js +6 -6
  473. package/build/component/middleware/envMW.js.map +1 -1
  474. package/build/component/middleware/questionMW.js +3 -3
  475. package/build/component/middleware/questionMW.js.map +1 -1
  476. package/build/component/migrate.js +4 -4
  477. package/build/component/migrate.js.map +1 -1
  478. package/build/component/provisionUtils.js +24 -24
  479. package/build/component/provisionUtils.js.map +1 -1
  480. package/build/component/resource/botService/appStudio/appStudioClient.js +11 -11
  481. package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
  482. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts.map +1 -1
  483. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js +7 -7
  484. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js.map +1 -1
  485. package/build/component/resource/botService/errors.js +2 -2
  486. package/build/component/resource/botService/errors.js.map +1 -1
  487. package/build/component/resource/botService/messages.js +6 -6
  488. package/build/component/resource/botService/messages.js.map +1 -1
  489. package/build/component/resource/botService/strings.js +1 -1
  490. package/build/component/resource/botService/strings.js.map +1 -1
  491. package/build/component/utils/ResourceGroupHelper.js +28 -28
  492. package/build/component/utils/ResourceGroupHelper.js.map +1 -1
  493. package/build/component/utils/azureResourceOperation.js +2 -2
  494. package/build/component/utils/azureResourceOperation.js.map +1 -1
  495. package/build/component/utils/common.d.ts +4 -3
  496. package/build/component/utils/common.d.ts.map +1 -1
  497. package/build/component/utils/common.js +17 -6
  498. package/build/component/utils/common.js.map +1 -1
  499. package/build/component/utils/depsChecker/common.js +2 -2
  500. package/build/component/utils/depsChecker/common.js.map +1 -1
  501. package/build/component/utils/envFunctionUtils.d.ts +12 -0
  502. package/build/component/utils/envFunctionUtils.d.ts.map +1 -0
  503. package/build/component/utils/envFunctionUtils.js +185 -0
  504. package/build/component/utils/envFunctionUtils.js.map +1 -0
  505. package/build/component/utils/envUtil.d.ts +1 -0
  506. package/build/component/utils/envUtil.d.ts.map +1 -1
  507. package/build/component/utils/envUtil.js +19 -19
  508. package/build/component/utils/envUtil.js.map +1 -1
  509. package/build/component/utils/fileOperation.js +3 -4
  510. package/build/component/utils/fileOperation.js.map +1 -1
  511. package/build/component/utils/metadataGraphPermssion.js +3 -3
  512. package/build/component/utils/metadataGraphPermssion.js.map +1 -1
  513. package/build/component/utils/metadataUtil.js +2 -2
  514. package/build/component/utils/metadataUtil.js.map +1 -1
  515. package/build/component/utils/pathUtils.js +5 -5
  516. package/build/component/utils/pathUtils.js.map +1 -1
  517. package/build/component/utils/settingsUtil.js +7 -7
  518. package/build/component/utils/settingsUtil.js.map +1 -1
  519. package/build/component/utils/teamsFxTelemetryReporter.js +1 -1
  520. package/build/component/utils/teamsFxTelemetryReporter.js.map +1 -1
  521. package/build/core/FxCore.d.ts +34 -0
  522. package/build/core/FxCore.d.ts.map +1 -1
  523. package/build/core/FxCore.js +715 -413
  524. package/build/core/FxCore.js.map +1 -1
  525. package/build/core/collaborator.js +65 -65
  526. package/build/core/collaborator.js.map +1 -1
  527. package/build/core/crypto.js +4 -4
  528. package/build/core/crypto.js.map +1 -1
  529. package/build/core/environment.js +7 -7
  530. package/build/core/environment.js.map +1 -1
  531. package/build/core/environmentName.d.ts +0 -1
  532. package/build/core/environmentName.d.ts.map +1 -1
  533. package/build/core/environmentName.js +0 -2
  534. package/build/core/environmentName.js.map +1 -1
  535. package/build/core/middleware/concurrentLocker.js +13 -13
  536. package/build/core/middleware/concurrentLocker.js.map +1 -1
  537. package/build/core/middleware/errorHandler.js +4 -4
  538. package/build/core/middleware/errorHandler.js.map +1 -1
  539. package/build/core/middleware/projectMigratorV3.js +78 -78
  540. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  541. package/build/core/middleware/projectSettingsLoader.js +3 -3
  542. package/build/core/middleware/projectSettingsLoader.js.map +1 -1
  543. package/build/core/middleware/projectVersionChecker.js +9 -9
  544. package/build/core/middleware/projectVersionChecker.js.map +1 -1
  545. package/build/core/middleware/utils/MigrationUtils.js +4 -4
  546. package/build/core/middleware/utils/MigrationUtils.js.map +1 -1
  547. package/build/core/middleware/utils/appYmlGenerator.js +4 -4
  548. package/build/core/middleware/utils/appYmlGenerator.js.map +1 -1
  549. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +10 -10
  550. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
  551. package/build/core/middleware/utils/debug/taskMigrator.js +72 -72
  552. package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
  553. package/build/core/middleware/utils/migrationContext.js +1 -1
  554. package/build/core/middleware/utils/migrationContext.js.map +1 -1
  555. package/build/core/middleware/utils/v3MigrationUtils.js +9 -9
  556. package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
  557. package/build/core/middleware/videoFilterAppBlocker.js +4 -4
  558. package/build/core/middleware/videoFilterAppBlocker.js.map +1 -1
  559. package/build/core/telemetry.js +1 -1
  560. package/build/core/telemetry.js.map +1 -1
  561. package/build/error/arm.js +10 -10
  562. package/build/error/arm.js.map +1 -1
  563. package/build/error/azure.js +20 -20
  564. package/build/error/azure.js.map +1 -1
  565. package/build/error/common.d.ts +4 -1
  566. package/build/error/common.d.ts.map +1 -1
  567. package/build/error/common.js +87 -75
  568. package/build/error/common.js.map +1 -1
  569. package/build/error/deploy.js +24 -24
  570. package/build/error/deploy.js.map +1 -1
  571. package/build/error/m365.js +6 -6
  572. package/build/error/m365.js.map +1 -1
  573. package/build/error/script.d.ts +2 -2
  574. package/build/error/script.d.ts.map +1 -1
  575. package/build/error/script.js +14 -8
  576. package/build/error/script.js.map +1 -1
  577. package/build/error/teamsApp.d.ts.map +1 -1
  578. package/build/error/teamsApp.js +10 -8
  579. package/build/error/teamsApp.js.map +1 -1
  580. package/build/error/upgrade.js +2 -2
  581. package/build/error/upgrade.js.map +1 -1
  582. package/build/error/yml.js +12 -12
  583. package/build/error/yml.js.map +1 -1
  584. package/build/index.d.ts +11 -7
  585. package/build/index.d.ts.map +1 -1
  586. package/build/index.js +19 -16
  587. package/build/index.js.map +1 -1
  588. package/build/question/constants.d.ts +38 -27
  589. package/build/question/constants.d.ts.map +1 -1
  590. package/build/question/constants.js +286 -294
  591. package/build/question/constants.js.map +1 -1
  592. package/build/question/create.d.ts +5 -3
  593. package/build/question/create.d.ts.map +1 -1
  594. package/build/question/create.js +338 -230
  595. package/build/question/create.js.map +1 -1
  596. package/build/question/generator.js +6 -2
  597. package/build/question/generator.js.map +1 -1
  598. package/build/question/index.d.ts +2 -0
  599. package/build/question/index.d.ts.map +1 -1
  600. package/build/question/index.js +21 -15
  601. package/build/question/index.js.map +1 -1
  602. package/build/question/inputs/AddPluginInputs.d.ts +8 -4
  603. package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
  604. package/build/question/inputs/CreateProjectInputs.d.ts +10 -4
  605. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
  606. package/build/question/inputs/SyncManifestInputs.d.ts +16 -0
  607. package/build/question/inputs/SyncManifestInputs.d.ts.map +1 -0
  608. package/build/question/inputs/SyncManifestInputs.js +5 -0
  609. package/build/question/inputs/SyncManifestInputs.js.map +1 -0
  610. package/build/question/inputs/UninstallInputs.d.ts +22 -0
  611. package/build/question/inputs/UninstallInputs.d.ts.map +1 -0
  612. package/build/question/inputs/UninstallInputs.js +5 -0
  613. package/build/question/inputs/UninstallInputs.js.map +1 -0
  614. package/build/question/inputs/index.d.ts +2 -0
  615. package/build/question/inputs/index.d.ts.map +1 -1
  616. package/build/question/inputs/index.js +2 -0
  617. package/build/question/inputs/index.js.map +1 -1
  618. package/build/question/options/AddPluginOptions.d.ts.map +1 -1
  619. package/build/question/options/AddPluginOptions.js +19 -10
  620. package/build/question/options/AddPluginOptions.js.map +1 -1
  621. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  622. package/build/question/options/CreateProjectOptions.js +27 -24
  623. package/build/question/options/CreateProjectOptions.js.map +1 -1
  624. package/build/question/options/SyncManifestOptions.d.ts +10 -0
  625. package/build/question/options/SyncManifestOptions.d.ts.map +1 -0
  626. package/build/question/options/SyncManifestOptions.js +28 -0
  627. package/build/question/options/SyncManifestOptions.js.map +1 -0
  628. package/build/question/options/UninstallOptions.d.ts +10 -0
  629. package/build/question/options/UninstallOptions.d.ts.map +1 -0
  630. package/build/question/options/UninstallOptions.js +44 -0
  631. package/build/question/options/UninstallOptions.js.map +1 -0
  632. package/build/question/options/index.d.ts +2 -0
  633. package/build/question/options/index.d.ts.map +1 -1
  634. package/build/question/options/index.js +2 -0
  635. package/build/question/options/index.js.map +1 -1
  636. package/build/question/other.d.ts +2 -1
  637. package/build/question/other.d.ts.map +1 -1
  638. package/build/question/other.js +228 -81
  639. package/build/question/other.js.map +1 -1
  640. package/build/tsconfig.tsbuildinfo +1 -0
  641. package/build/ui/visitor.d.ts.map +1 -1
  642. package/build/ui/visitor.js +41 -27
  643. package/build/ui/visitor.js.map +1 -1
  644. package/package.json +15 -10
  645. package/resource/dict.zip +0 -0
  646. package/resource/package.nls.json +180 -133
  647. package/resource/yaml-schema/v1.6/yaml.schema.json +13 -0
  648. package/resource/yaml-schema/v1.7/yaml.schema.json +1842 -0
  649. package/resource/yaml-schema/yaml.schema.json +13 -0
  650. package/templates/fallback/common.zip +0 -0
  651. package/templates/fallback/csharp.zip +0 -0
  652. package/templates/fallback/js.zip +0 -0
  653. package/templates/fallback/python.zip +0 -0
  654. package/templates/fallback/ts.zip +0 -0
  655. package/build/component/generator/copilotPlugin/generator.d.ts +0 -21
  656. package/build/component/generator/copilotPlugin/generator.d.ts.map +0 -1
  657. package/build/component/generator/copilotPlugin/generator.js +0 -399
  658. package/build/component/generator/copilotPlugin/generator.js.map +0 -1
  659. package/build/component/generator/copilotPlugin/helper.d.ts.map +0 -1
  660. package/build/component/generator/copilotPlugin/helper.js.map +0 -1
  661. package/build/component/generator/officeXMLAddin/generator.d.ts.map +0 -1
  662. package/build/component/generator/officeXMLAddin/generator.js +0 -173
  663. package/build/component/generator/officeXMLAddin/generator.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.createProjectCliHelpNode = exports.createSampleProjectQuestionNode = exports.createProjectQuestionNode = exports.capabilitySubTree = 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.officeAddinHostingQuestion = exports.SPFxImportFolderQuestion = exports.SPFxWebpartNameQuestion = exports.SPFxFrameworkQuestion = exports.SPFxPackageSelectQuestion = exports.meArchitectureQuestion = exports.capabilityQuestion = exports.isFromDevPortal = exports.getProjectTypeAndCapability = exports.projectTypeQuestion = void 0;
5
+ exports.createProjectCliHelpNode = exports.createSampleProjectQuestionNode = exports.createProjectQuestionNode = exports.capabilitySubTree = exports.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"));
@@ -18,39 +18,39 @@ const localizeUtils_1 = require("../common/localizeUtils");
18
18
  const samples_1 = require("../common/samples");
19
19
  const stringUtils_1 = require("../common/stringUtils");
20
20
  const utils_1 = require("../component/driver/teamsApp/utils/utils");
21
- const helper_1 = require("../component/generator/copilotPlugin/helper");
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
25
  const utils_2 = require("../component/generator/spfx/utils/utils");
26
26
  const error_2 = require("../error");
27
27
  const constants_3 = require("./constants");
28
+ const m365_spec_parser_1 = require("@microsoft/m365-spec-parser");
29
+ const PluginManifestUtils_1 = require("../component/driver/teamsApp/utils/PluginManifestUtils");
30
+ const helper_2 = require("../component/generator/copilotExtension/helper");
31
+ const telemetry_1 = require("../common/telemetry");
28
32
  function projectTypeQuestion() {
29
33
  const staticOptions = [
30
34
  constants_3.ProjectTypeOptions.bot(teamsfx_api_1.Platform.CLI),
31
35
  constants_3.ProjectTypeOptions.tab(teamsfx_api_1.Platform.CLI),
32
36
  constants_3.ProjectTypeOptions.me(teamsfx_api_1.Platform.CLI),
33
- constants_3.ProjectTypeOptions.officeXMLAddin(teamsfx_api_1.Platform.CLI),
34
37
  constants_3.ProjectTypeOptions.officeAddin(teamsfx_api_1.Platform.CLI),
35
38
  constants_3.ProjectTypeOptions.outlookAddin(teamsfx_api_1.Platform.CLI),
36
39
  ];
37
40
  return {
38
41
  name: constants_3.QuestionNames.ProjectType,
39
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.title"),
42
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.title"),
40
43
  type: "singleSelect",
41
44
  staticOptions: staticOptions,
42
45
  dynamicOptions: (inputs) => {
43
46
  var _a;
44
47
  const staticOptions = [];
45
- if (teamsfx_api_1.CLIPlatforms.includes(inputs.platform) &&
46
- featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.CustomizeGpt)) {
47
- // Show in CLI only
48
- staticOptions.push(constants_3.ProjectTypeOptions.customizeGpt());
48
+ if ((0, featureFlags_1.isCopilotExtensionEnabled)()) {
49
+ staticOptions.push(constants_3.ProjectTypeOptions.copilotExtension(inputs.platform));
49
50
  }
50
- if (featureFlags_1.isApiCopilotPluginEnabled()) {
51
- staticOptions.push(constants_3.ProjectTypeOptions.copilotPlugin(inputs.platform));
51
+ if ((0, constants_3.getRuntime)(inputs) === constants_3.RuntimeOptions.NodeJS().id) {
52
+ staticOptions.push(constants_3.ProjectTypeOptions.customCopilot(inputs.platform));
52
53
  }
53
- staticOptions.push(constants_3.ProjectTypeOptions.customCopilot(inputs.platform));
54
54
  staticOptions.push(constants_3.ProjectTypeOptions.bot(inputs.platform), constants_3.ProjectTypeOptions.tab(inputs.platform), constants_3.ProjectTypeOptions.me(inputs.platform));
55
55
  if (isFromDevPortal(inputs)) {
56
56
  const projectType = (_a = getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.projectType;
@@ -58,28 +58,22 @@ function projectTypeQuestion() {
58
58
  return [projectType];
59
59
  }
60
60
  }
61
- else {
62
- if (inputs.agent === "office") {
63
- //only for @office agent, officeXMLAddin are supported
64
- staticOptions.push(constants_3.ProjectTypeOptions.officeXMLAddin(inputs.platform));
61
+ else if ((0, constants_3.getRuntime)(inputs) === constants_3.RuntimeOptions.NodeJS().id) {
62
+ if (featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.OfficeAddin)) {
63
+ staticOptions.push(constants_3.ProjectTypeOptions.officeAddin(inputs.platform));
65
64
  }
66
65
  else {
67
- if (featureFlags_1.isOfficeJSONAddinEnabled()) {
68
- staticOptions.push(constants_3.ProjectTypeOptions.officeAddin(inputs.platform));
69
- }
70
- else {
71
- staticOptions.push(constants_3.ProjectTypeOptions.outlookAddin(inputs.platform));
72
- }
66
+ staticOptions.push(constants_3.ProjectTypeOptions.outlookAddin(inputs.platform));
73
67
  }
74
68
  }
75
69
  if (inputs.platform === teamsfx_api_1.Platform.VSCode &&
76
- featureFlags_1.isChatParticipantEnabled() &&
70
+ featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.ChatParticipant) &&
77
71
  !inputs.teamsAppFromTdp) {
78
72
  staticOptions.push(constants_3.ProjectTypeOptions.startWithGithubCopilot());
79
73
  }
80
74
  return staticOptions;
81
75
  },
82
- placeholder: localizeUtils_1.getLocalizedString("core.getCreateNewOrFromSampleQuestion.placeholder"),
76
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.getCreateNewOrFromSampleQuestion.placeholder"),
83
77
  forgetLastValue: true,
84
78
  skipSingleOption: true,
85
79
  };
@@ -87,23 +81,23 @@ function projectTypeQuestion() {
87
81
  exports.projectTypeQuestion = projectTypeQuestion;
88
82
  function getProjectTypeAndCapability(teamsApp) {
89
83
  // tab with bot, tab with message extension, tab with bot and message extension
90
- if (utils_1.needTabAndBotCode(teamsApp)) {
84
+ if ((0, utils_1.needTabAndBotCode)(teamsApp)) {
91
85
  return { projectType: "tab-bot-type", templateId: constants_3.CapabilityOptions.nonSsoTabAndBot().id };
92
86
  }
93
87
  // tab only
94
- if (utils_1.needTabCode(teamsApp)) {
88
+ if ((0, utils_1.needTabCode)(teamsApp)) {
95
89
  return { projectType: "tab-type", templateId: constants_3.CapabilityOptions.nonSsoTab().id };
96
90
  }
97
91
  // bot and message extension
98
- if (utils_1.isBotAndBotBasedMessageExtension(teamsApp)) {
92
+ if ((0, utils_1.isBotAndBotBasedMessageExtension)(teamsApp)) {
99
93
  return { projectType: "bot-me-type", templateId: constants_3.CapabilityOptions.botAndMe().id };
100
94
  }
101
95
  // bot based message extension
102
- if (utils_1.isBotBasedMessageExtension(teamsApp)) {
96
+ if ((0, utils_1.isBotBasedMessageExtension)(teamsApp)) {
103
97
  return { projectType: "me-type", templateId: constants_3.CapabilityOptions.me().id };
104
98
  }
105
99
  // bot
106
- if (utils_1.isBot(teamsApp)) {
100
+ if ((0, utils_1.isBot)(teamsApp)) {
107
101
  return { projectType: "bot-type", templateId: constants_3.CapabilityOptions.basicBot().id };
108
102
  }
109
103
  return undefined;
@@ -120,34 +114,21 @@ function capabilityQuestion() {
120
114
  const projectType = inputs[constants_3.QuestionNames.ProjectType];
121
115
  switch (projectType) {
122
116
  case constants_3.ProjectTypeOptions.bot().id:
123
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.bot.title");
117
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.bot.title");
124
118
  case constants_3.ProjectTypeOptions.tab().id:
125
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.tab.title");
119
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.tab.title");
126
120
  case constants_3.ProjectTypeOptions.me().id:
127
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.messageExtension.title");
121
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.messageExtension.title");
128
122
  case constants_3.ProjectTypeOptions.outlookAddin().id:
123
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.outlookAddin.title");
129
124
  case constants_3.ProjectTypeOptions.officeAddin().id:
130
- case constants_3.ProjectTypeOptions.officeXMLAddin().id: {
131
- switch (inputs[constants_3.QuestionNames.OfficeAddinHost]) {
132
- case constants_3.OfficeAddinHostOptions.outlook().id:
133
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.outlookAddin.title");
134
- case constants_3.OfficeAddinHostOptions.word().id:
135
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.word.create.title");
136
- case constants_3.OfficeAddinHostOptions.excel().id:
137
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.excel.create.title");
138
- case constants_3.OfficeAddinHostOptions.powerpoint().id:
139
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.powerpoint.create.title");
140
- }
141
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.title");
142
- }
143
- case constants_3.ProjectTypeOptions.copilotPlugin().id:
144
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.title");
125
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.officeAddin.title");
126
+ case constants_3.ProjectTypeOptions.copilotExtension().id:
127
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.title");
145
128
  case constants_3.ProjectTypeOptions.customCopilot().id:
146
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.title");
147
- case constants_3.ProjectTypeOptions.customizeGpt().id:
148
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.declarativeCopilotType.title");
129
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.customCopilot.title");
149
130
  default:
150
- return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.titleNew");
131
+ return (0, localizeUtils_1.getLocalizedString)("core.createCapabilityQuestion.titleNew");
151
132
  }
152
133
  },
153
134
  cliDescription: "Specifies the Microsoft Teams App capability.",
@@ -166,14 +147,14 @@ function capabilityQuestion() {
166
147
  }
167
148
  }
168
149
  // dotnet capabilities
169
- if (constants_3.getRuntime(inputs) === constants_3.RuntimeOptions.DotNet().id) {
150
+ if (inputs.platform === teamsfx_api_1.Platform.VS) {
170
151
  return constants_3.CapabilityOptions.dotnetCaps(inputs);
171
152
  }
172
153
  if (inputs.nonInteractive && inputs.platform === teamsfx_api_1.Platform.CLI) {
173
154
  //cli non-interactive mode the choice list is the same as staticOptions
174
155
  return constants_3.CapabilityOptions.all(inputs);
175
156
  }
176
- // nodejs capabilities
157
+ // capabilities if VSC or CLI interactive mode
177
158
  const projectType = inputs[constants_3.QuestionNames.ProjectType];
178
159
  if (projectType === constants_3.ProjectTypeOptions.bot().id) {
179
160
  return constants_3.CapabilityOptions.bots(inputs);
@@ -187,27 +168,24 @@ function capabilityQuestion() {
187
168
  else if (constants_3.ProjectTypeOptions.officeAddinAllIds().includes(projectType)) {
188
169
  return constants_3.CapabilityOptions.officeAddinDynamicCapabilities(projectType, inputs[constants_3.QuestionNames.OfficeAddinHost]);
189
170
  }
190
- else if (projectType === constants_3.ProjectTypeOptions.copilotPlugin().id) {
191
- return constants_3.CapabilityOptions.copilotPlugins();
171
+ else if (projectType === constants_3.ProjectTypeOptions.copilotExtension().id) {
172
+ return constants_3.CapabilityOptions.copilotExtensions();
192
173
  }
193
174
  else if (projectType === constants_3.ProjectTypeOptions.customCopilot().id) {
194
175
  return constants_3.CapabilityOptions.customCopilots();
195
176
  }
196
- else if (projectType === constants_3.ProjectTypeOptions.customizeGpt().id) {
197
- return constants_3.CapabilityOptions.customizeGptOptions();
198
- }
199
177
  else {
200
178
  return constants_3.CapabilityOptions.all(inputs);
201
179
  }
202
180
  },
203
181
  placeholder: (inputs) => {
204
- if (inputs[constants_3.QuestionNames.ProjectType] === constants_3.ProjectTypeOptions.copilotPlugin().id) {
205
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.placeholder");
182
+ if (inputs[constants_3.QuestionNames.ProjectType] === constants_3.ProjectTypeOptions.copilotExtension().id) {
183
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.placeholder");
206
184
  }
207
185
  else if (inputs[constants_3.QuestionNames.ProjectType] === constants_3.ProjectTypeOptions.customCopilot().id) {
208
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.customCopilot.placeholder");
186
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.customCopilot.placeholder");
209
187
  }
210
- return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.placeholder");
188
+ return (0, localizeUtils_1.getLocalizedString)("core.createCapabilityQuestion.placeholder");
211
189
  },
212
190
  forgetLastValue: true,
213
191
  skipSingleOption: true,
@@ -217,7 +195,7 @@ exports.capabilityQuestion = capabilityQuestion;
217
195
  function meArchitectureQuestion() {
218
196
  return {
219
197
  name: constants_3.QuestionNames.MeArchitectureType,
220
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.meArchitecture.title"),
198
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.meArchitecture.title"),
221
199
  cliDescription: "Architecture of Search Based Message Extension.",
222
200
  cliShortName: "m",
223
201
  type: "singleSelect",
@@ -226,7 +204,7 @@ function meArchitectureQuestion() {
226
204
  return constants_3.MeArchitectureOptions.all();
227
205
  },
228
206
  default: constants_3.MeArchitectureOptions.newApi().id,
229
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.placeholder"),
207
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.placeholder"),
230
208
  forgetLastValue: true,
231
209
  skipSingleOption: true,
232
210
  };
@@ -235,13 +213,13 @@ exports.meArchitectureQuestion = meArchitectureQuestion;
235
213
  function botTriggerQuestion() {
236
214
  return {
237
215
  name: constants_3.QuestionNames.BotTrigger,
238
- title: localizeUtils_1.getLocalizedString("plugins.bot.questionHostTypeTrigger.title"),
216
+ title: (0, localizeUtils_1.getLocalizedString)("plugins.bot.questionHostTypeTrigger.title"),
239
217
  cliDescription: "Specifies the trigger for `Chat Notification Message` app template.",
240
218
  cliShortName: "t",
241
219
  type: "singleSelect",
242
220
  staticOptions: constants_3.NotificationTriggerOptions.all(),
243
221
  dynamicOptions: (inputs) => {
244
- const runtime = constants_3.getRuntime(inputs);
222
+ const runtime = (0, constants_3.getRuntime)(inputs);
245
223
  return [
246
224
  runtime === constants_3.RuntimeOptions.DotNet().id
247
225
  ? constants_3.NotificationTriggerOptions.appServiceForVS()
@@ -250,31 +228,31 @@ function botTriggerQuestion() {
250
228
  ];
251
229
  },
252
230
  default: (inputs) => {
253
- const runtime = constants_3.getRuntime(inputs);
231
+ const runtime = (0, constants_3.getRuntime)(inputs);
254
232
  return runtime === constants_3.RuntimeOptions.DotNet().id
255
233
  ? constants_3.NotificationTriggerOptions.appServiceForVS().id
256
234
  : constants_3.NotificationTriggerOptions.appService().id;
257
235
  },
258
- placeholder: localizeUtils_1.getLocalizedString("plugins.bot.questionHostTypeTrigger.placeholder"),
236
+ placeholder: (0, localizeUtils_1.getLocalizedString)("plugins.bot.questionHostTypeTrigger.placeholder"),
259
237
  };
260
238
  }
261
239
  function SPFxSolutionQuestion() {
262
240
  return {
263
241
  type: "singleSelect",
264
242
  name: constants_3.QuestionNames.SPFxSolution,
265
- title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.title"),
243
+ title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.title"),
266
244
  cliDescription: "Create a new or import an existing SharePoint Framework solution.",
267
245
  cliShortName: "s",
268
246
  staticOptions: [
269
247
  {
270
248
  id: "new",
271
- label: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.createNew"),
272
- detail: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.createNew.detail"),
249
+ label: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.createNew"),
250
+ detail: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.createNew.detail"),
273
251
  },
274
252
  {
275
253
  id: "import",
276
- label: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.importExisting"),
277
- detail: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.importExisting.detail"),
254
+ label: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.importExisting"),
255
+ detail: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.spfxSolution.importExisting.detail"),
278
256
  },
279
257
  ],
280
258
  default: "new",
@@ -284,10 +262,10 @@ function SPFxPackageSelectQuestion() {
284
262
  return {
285
263
  type: "singleSelect",
286
264
  name: constants_3.QuestionNames.SPFxInstallPackage,
287
- title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.title"),
265
+ title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.title"),
288
266
  cliDescription: "Install the latest version of SharePoint Framework.",
289
267
  staticOptions: [],
290
- placeholder: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.placeholder"),
268
+ placeholder: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.placeholder"),
291
269
  dynamicOptions: async (inputs) => {
292
270
  const versions = await Promise.all([
293
271
  utils_2.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.GeneratorPackageName, 0, false),
@@ -301,15 +279,15 @@ function SPFxPackageSelectQuestion() {
301
279
  {
302
280
  id: constants_3.SPFxVersionOptionIds.installLocally,
303
281
  label: versions[1] !== undefined
304
- ? localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.installLocally.withVersion.label", "v" + versions[1])
305
- : localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.installLocally.noVersion.label"),
282
+ ? (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.installLocally.withVersion.label", "v" + versions[1])
283
+ : (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.installLocally.noVersion.label"),
306
284
  },
307
285
  {
308
286
  id: constants_3.SPFxVersionOptionIds.globalPackage,
309
287
  label: versions[0] !== undefined
310
- ? localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.withVersion.label", "v" + versions[0])
311
- : localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.noVersion.label"),
312
- description: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.detail", constants_2.Constants.RecommendedLowestSpfxVersion),
288
+ ? (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.useGlobalPackage.withVersion.label", "v" + versions[0])
289
+ : (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.useGlobalPackage.noVersion.label"),
290
+ description: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.packageSelect.useGlobalPackage.detail", constants_2.Constants.RecommendedLowestSpfxVersion),
313
291
  },
314
292
  ];
315
293
  },
@@ -321,7 +299,7 @@ function SPFxPackageSelectQuestion() {
321
299
  !!previousInputs.globalSpfxPackageVersion &&
322
300
  !!previousInputs.globalYeomanPackageVersion;
323
301
  if (!hasPackagesInstalled) {
324
- return Promise.reject(error_1.DevEnvironmentSetupError());
302
+ return Promise.reject((0, error_1.DevEnvironmentSetupError)());
325
303
  }
326
304
  }
327
305
  return Promise.resolve(undefined);
@@ -337,7 +315,7 @@ function SPFxFrameworkQuestion() {
337
315
  name: constants_3.QuestionNames.SPFxFramework,
338
316
  cliShortName: "k",
339
317
  cliDescription: "Framework.",
340
- title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.framework.title"),
318
+ title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.framework.title"),
341
319
  staticOptions: [
342
320
  { id: "react", label: "React" },
343
321
  { id: "minimal", label: "Minimal" },
@@ -354,7 +332,7 @@ function SPFxWebpartNameQuestion() {
354
332
  name: constants_3.QuestionNames.SPFxWebpartName,
355
333
  cliShortName: "w",
356
334
  cliDescription: "Name for SharePoint Framework Web Part.",
357
- title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.webpartName"),
335
+ title: (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.webpartName"),
358
336
  default: constants_2.Constants.DEFAULT_WEBPART_NAME,
359
337
  validation: {
360
338
  validFunc: async (input, previousInputs) => {
@@ -363,7 +341,7 @@ function SPFxWebpartNameQuestion() {
363
341
  };
364
342
  const validateRes = jsonschema.validate(input, schema);
365
343
  if (validateRes.errors && validateRes.errors.length > 0) {
366
- return localizeUtils_1.getLocalizedString("plugins.spfx.questions.webpartName.error.notMatch", input, schema.pattern);
344
+ return (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.webpartName.error.notMatch", input, schema.pattern);
367
345
  }
368
346
  if (previousInputs &&
369
347
  ((previousInputs.stage === teamsfx_api_1.Stage.addWebpart &&
@@ -371,7 +349,7 @@ function SPFxWebpartNameQuestion() {
371
349
  ((previousInputs === null || previousInputs === void 0 ? void 0 : previousInputs.stage) === teamsfx_api_1.Stage.addFeature && (previousInputs === null || previousInputs === void 0 ? void 0 : previousInputs.projectPath)))) {
372
350
  const webpartFolder = path.join(previousInputs[constants_3.QuestionNames.SPFxFolder], "src", "webparts", input);
373
351
  if (await fs_extra_1.default.pathExists(webpartFolder)) {
374
- return localizeUtils_1.getLocalizedString("plugins.spfx.questions.webpartName.error.duplicate", webpartFolder);
352
+ return (0, localizeUtils_1.getLocalizedString)("plugins.spfx.questions.webpartName.error.duplicate", webpartFolder);
375
353
  }
376
354
  }
377
355
  return undefined;
@@ -384,9 +362,9 @@ function SPFxImportFolderQuestion(hasDefaultFunc = false) {
384
362
  return {
385
363
  type: "folder",
386
364
  name: constants_3.QuestionNames.SPFxFolder,
387
- title: localizeUtils_1.getLocalizedString("core.spfxFolder.title"),
365
+ title: (0, localizeUtils_1.getLocalizedString)("core.spfxFolder.title"),
388
366
  cliDescription: "Directory or Path that contains the existing SharePoint Framework solution.",
389
- placeholder: localizeUtils_1.getLocalizedString("core.spfxFolder.placeholder"),
367
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.spfxFolder.placeholder"),
390
368
  default: hasDefaultFunc
391
369
  ? (inputs) => {
392
370
  if (inputs.projectPath)
@@ -397,28 +375,19 @@ function SPFxImportFolderQuestion(hasDefaultFunc = false) {
397
375
  };
398
376
  }
399
377
  exports.SPFxImportFolderQuestion = SPFxImportFolderQuestion;
400
- function officeAddinHostingQuestion() {
401
- return {
402
- name: constants_3.QuestionNames.OfficeAddinHost,
403
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.create.title"),
404
- type: "singleSelect",
405
- staticOptions: constants_3.OfficeAddinHostOptions.all(),
406
- };
407
- }
408
- exports.officeAddinHostingQuestion = officeAddinHostingQuestion;
409
378
  function officeAddinFrameworkQuestion() {
410
379
  return {
411
380
  type: "singleSelect",
412
381
  name: constants_3.QuestionNames.OfficeAddinFramework,
413
382
  cliShortName: "f",
414
383
  cliDescription: "Framework for WXP extension.",
415
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.framework.title"),
384
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.officeAddin.framework.title"),
416
385
  dynamicOptions: getAddinFrameworkOptions,
417
386
  staticOptions: [
418
387
  { id: "default", label: "Default" },
419
388
  { id: "react", label: "React" },
420
389
  ],
421
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.officeAddin.framework.placeholder"),
390
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.officeAddin.framework.placeholder"),
422
391
  skipSingleOption: true,
423
392
  };
424
393
  }
@@ -426,10 +395,7 @@ exports.officeAddinFrameworkQuestion = officeAddinFrameworkQuestion;
426
395
  function getAddinFrameworkOptions(inputs) {
427
396
  const projectType = inputs[constants_3.QuestionNames.ProjectType];
428
397
  const capabilities = inputs[constants_3.QuestionNames.Capabilities];
429
- const host = inputs[constants_3.QuestionNames.OfficeAddinHost];
430
- if (projectType === constants_3.ProjectTypeOptions.outlookAddin().id ||
431
- (projectType === constants_3.ProjectTypeOptions.officeXMLAddin().id &&
432
- host === constants_3.OfficeAddinHostOptions.outlook().id)) {
398
+ if (projectType === constants_3.ProjectTypeOptions.outlookAddin().id) {
433
399
  return [{ id: "default", label: "Default" }];
434
400
  }
435
401
  else if ((projectType === constants_3.ProjectTypeOptions.officeAddin().id &&
@@ -456,9 +422,7 @@ function getOfficeAddinFramework(inputs) {
456
422
  inputs[constants_3.QuestionNames.OfficeAddinFramework]) {
457
423
  return inputs[constants_3.QuestionNames.OfficeAddinFramework];
458
424
  }
459
- else if ((projectType === constants_3.ProjectTypeOptions.officeXMLAddin().id &&
460
- inputs[constants_3.QuestionNames.OfficeAddinHost] === constants_3.OfficeAddinHostOptions.outlook().id) ||
461
- projectType === constants_3.ProjectTypeOptions.outlookAddin().id) {
425
+ else if (projectType === constants_3.ProjectTypeOptions.outlookAddin().id) {
462
426
  return "default_old";
463
427
  }
464
428
  else {
@@ -466,40 +430,31 @@ function getOfficeAddinFramework(inputs) {
466
430
  }
467
431
  }
468
432
  exports.getOfficeAddinFramework = getOfficeAddinFramework;
469
- function getOfficeAddinTemplateConfig(projectType, addinHost) {
470
- if (projectType === constants_3.ProjectTypeOptions.officeXMLAddin().id &&
471
- addinHost &&
472
- addinHost !== constants_3.OfficeAddinHostOptions.outlook().id) {
473
- return projectConfig_1.OfficeAddinProjectConfig[addinHost];
474
- }
433
+ function getOfficeAddinTemplateConfig() {
475
434
  return projectConfig_1.OfficeAddinProjectConfig["json"];
476
435
  }
477
436
  exports.getOfficeAddinTemplateConfig = getOfficeAddinTemplateConfig;
478
437
  function getLanguageOptions(inputs) {
479
- const runtime = constants_3.getRuntime(inputs);
438
+ const runtime = (0, constants_3.getRuntime)(inputs);
480
439
  // dotnet runtime only supports C#
481
440
  if (runtime === constants_3.RuntimeOptions.DotNet().id) {
482
441
  return [{ id: constants_3.ProgrammingLanguage.CSharp, label: "C#" }];
483
442
  }
484
443
  const capabilities = inputs[constants_3.QuestionNames.Capabilities];
485
- const host = inputs[constants_3.QuestionNames.OfficeAddinHost];
486
444
  // office addin supports language defined in officeAddinJsonData
487
445
  const projectType = inputs[constants_3.QuestionNames.ProjectType];
488
446
  if (constants_3.ProjectTypeOptions.officeAddinAllIds().includes(projectType)) {
489
447
  if (capabilities.endsWith("-manifest")) {
490
448
  return [{ id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" }];
491
449
  }
492
- if (projectType === constants_3.ProjectTypeOptions.outlookAddin().id ||
493
- (projectType === constants_3.ProjectTypeOptions.officeXMLAddin().id &&
494
- host === constants_3.OfficeAddinHostOptions.outlook().id)) {
450
+ if (projectType === constants_3.ProjectTypeOptions.outlookAddin().id) {
495
451
  return [{ id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" }];
496
452
  }
497
- const officeXMLAddinLangConfig = getOfficeAddinTemplateConfig(projectType, host)[capabilities]
498
- .framework["default"];
453
+ const officeAddinLangConfig = getOfficeAddinTemplateConfig()[capabilities].framework["default"];
499
454
  const officeXMLAddinLangOptions = [];
500
- if (!!officeXMLAddinLangConfig.typescript)
455
+ if (!!officeAddinLangConfig.typescript)
501
456
  officeXMLAddinLangOptions.push({ id: constants_3.ProgrammingLanguage.TS, label: "TypeScript" });
502
- if (!!officeXMLAddinLangConfig.javascript)
457
+ if (!!officeAddinLangConfig.javascript)
503
458
  officeXMLAddinLangOptions.push({ id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" });
504
459
  return officeXMLAddinLangOptions;
505
460
  }
@@ -509,9 +464,7 @@ function getLanguageOptions(inputs) {
509
464
  }
510
465
  else if (constants_3.capabilitiesHavePythonOption.includes(inputs[capabilities] ? inputs[capabilities] : capabilities) &&
511
466
  !(capabilities == constants_3.CapabilityOptions.customCopilotRag().id &&
512
- (inputs[constants_3.CapabilityOptions.customCopilotRag().id] ==
513
- constants_3.CustomCopilotRagOptions.microsoft365().id ||
514
- inputs[constants_3.CapabilityOptions.customCopilotRag().id] == constants_3.CustomCopilotRagOptions.customApi().id))) {
467
+ inputs[constants_3.CapabilityOptions.customCopilotRag().id] == constants_3.CustomCopilotRagOptions.microsoft365().id)) {
515
468
  // support python language
516
469
  return [
517
470
  { id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" },
@@ -520,7 +473,7 @@ function getLanguageOptions(inputs) {
520
473
  id: constants_3.ProgrammingLanguage.PY,
521
474
  label: "Python",
522
475
  detail: "",
523
- description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.preview"),
476
+ description: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.option.description.preview"),
524
477
  },
525
478
  ];
526
479
  }
@@ -537,7 +490,7 @@ function programmingLanguageQuestion() {
537
490
  const programmingLanguageQuestion = {
538
491
  name: constants_3.QuestionNames.ProgrammingLanguage,
539
492
  cliShortName: "l",
540
- title: localizeUtils_1.getLocalizedString("core.ProgrammingLanguageQuestion.title"),
493
+ title: (0, localizeUtils_1.getLocalizedString)("core.ProgrammingLanguageQuestion.title"),
541
494
  type: "singleSelect",
542
495
  staticOptions: [
543
496
  { id: constants_3.ProgrammingLanguage.JS, label: "JavaScript" },
@@ -550,7 +503,7 @@ function programmingLanguageQuestion() {
550
503
  return getLanguageOptions(inputs)[0].id;
551
504
  },
552
505
  placeholder: (inputs) => {
553
- const runtime = constants_3.getRuntime(inputs);
506
+ const runtime = (0, constants_3.getRuntime)(inputs);
554
507
  // dotnet
555
508
  if (runtime === constants_3.RuntimeOptions.DotNet().id) {
556
509
  return "";
@@ -565,10 +518,10 @@ function programmingLanguageQuestion() {
565
518
  // }
566
519
  // SPFx
567
520
  if (capabilities === constants_3.CapabilityOptions.SPFxTab().id) {
568
- return localizeUtils_1.getLocalizedString("core.ProgrammingLanguageQuestion.placeholder.spfx");
521
+ return (0, localizeUtils_1.getLocalizedString)("core.ProgrammingLanguageQuestion.placeholder.spfx");
569
522
  }
570
523
  // other
571
- return localizeUtils_1.getLocalizedString("core.ProgrammingLanguageQuestion.placeholder");
524
+ return (0, localizeUtils_1.getLocalizedString)("core.ProgrammingLanguageQuestion.placeholder");
572
525
  },
573
526
  skipSingleOption: true,
574
527
  };
@@ -582,9 +535,9 @@ function folderQuestion() {
582
535
  cliShortName: "f",
583
536
  title: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
584
537
  ? "Directory where the project folder will be created in"
585
- : localizeUtils_1.getLocalizedString("core.question.workspaceFolder.title"),
538
+ : (0, localizeUtils_1.getLocalizedString)("core.question.workspaceFolder.title"),
586
539
  cliDescription: "Directory where the project folder will be created in.",
587
- placeholder: localizeUtils_1.getLocalizedString("core.question.workspaceFolder.placeholder"),
540
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.question.workspaceFolder.placeholder"),
588
541
  default: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
589
542
  ? "./"
590
543
  : path.join(os.homedir(), constants_1.ConstantString.RootFolder),
@@ -612,13 +565,13 @@ function appNameQuestion() {
612
565
  type: "text",
613
566
  name: constants_3.QuestionNames.AppName,
614
567
  cliShortName: "n",
615
- title: localizeUtils_1.getLocalizedString("core.question.appName.title"),
568
+ title: (0, localizeUtils_1.getLocalizedString)("core.question.appName.title"),
616
569
  required: true,
617
570
  default: async (inputs) => {
618
571
  var _a, _b;
619
572
  let defaultName = undefined;
620
573
  if ((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.appName) {
621
- defaultName = stringUtils_1.convertToAlphanumericOnly((_b = inputs.teamsAppFromTdp) === null || _b === void 0 ? void 0 : _b.appName);
574
+ defaultName = (0, stringUtils_1.convertToAlphanumericOnly)((_b = inputs.teamsAppFromTdp) === null || _b === void 0 ? void 0 : _b.appName);
622
575
  }
623
576
  else if (inputs[constants_3.QuestionNames.SPFxSolution] == "import") {
624
577
  defaultName = await getSolutionName(inputs[constants_3.QuestionNames.SPFxFolder]);
@@ -633,22 +586,22 @@ function appNameQuestion() {
633
586
  };
634
587
  if (input.length === 25) {
635
588
  // show warning notification because it may exceed the Teams app name max length after appending suffix
636
- const context = globalVars_1.createContext();
589
+ const context = (0, globalVars_1.createContext)();
637
590
  if ((previousInputs === null || previousInputs === void 0 ? void 0 : previousInputs.platform) === teamsfx_api_1.Platform.VSCode) {
638
- void context.userInteraction.showMessage("warn", localizeUtils_1.getLocalizedString("core.QuestionAppName.validation.lengthWarning"), false);
591
+ void context.userInteraction.showMessage("warn", (0, localizeUtils_1.getLocalizedString)("core.QuestionAppName.validation.lengthWarning"), false);
639
592
  }
640
593
  else {
641
- context.logProvider.warning(localizeUtils_1.getLocalizedString("core.QuestionAppName.validation.lengthWarning"));
594
+ context.logProvider.warning((0, localizeUtils_1.getLocalizedString)("core.QuestionAppName.validation.lengthWarning"));
642
595
  }
643
596
  }
644
597
  const appName = input;
645
598
  const validateResult = jsonschema.validate(appName, schema);
646
599
  if (validateResult.errors && validateResult.errors.length > 0) {
647
600
  if (validateResult.errors[0].name === "pattern") {
648
- return localizeUtils_1.getLocalizedString("core.QuestionAppName.validation.pattern");
601
+ return (0, localizeUtils_1.getLocalizedString)("core.QuestionAppName.validation.pattern");
649
602
  }
650
603
  if (validateResult.errors[0].name === "maxLength") {
651
- return localizeUtils_1.getLocalizedString("core.QuestionAppName.validation.maxlength");
604
+ return (0, localizeUtils_1.getLocalizedString)("core.QuestionAppName.validation.maxlength");
652
605
  }
653
606
  }
654
607
  if (previousInputs && previousInputs.folder) {
@@ -657,13 +610,13 @@ function appNameQuestion() {
657
610
  const projectPath = path.resolve(folder, appName);
658
611
  const exists = await fs_extra_1.default.pathExists(projectPath);
659
612
  if (exists)
660
- return localizeUtils_1.getLocalizedString("core.QuestionAppName.validation.pathExist", projectPath);
613
+ return (0, localizeUtils_1.getLocalizedString)("core.QuestionAppName.validation.pathExist", projectPath);
661
614
  }
662
615
  }
663
616
  return undefined;
664
617
  },
665
618
  },
666
- placeholder: localizeUtils_1.getLocalizedString("core.question.appName.placeholder"),
619
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.question.appName.placeholder"),
667
620
  };
668
621
  return question;
669
622
  }
@@ -677,7 +630,7 @@ function sampleSelectQuestion() {
677
630
  cliChoiceListCommand: "teamsapp list samples",
678
631
  skipValidation: true,
679
632
  cliType: "argument",
680
- title: localizeUtils_1.getLocalizedString("core.SampleSelect.title"),
633
+ title: (0, localizeUtils_1.getLocalizedString)("core.SampleSelect.title"),
681
634
  staticOptions: [
682
635
  "hello-world-tab-with-backend",
683
636
  "graph-toolkit-contact-exporter",
@@ -717,11 +670,11 @@ function sampleSelectQuestion() {
717
670
  };
718
671
  });
719
672
  },
720
- placeholder: localizeUtils_1.getLocalizedString("core.SampleSelect.placeholder"),
673
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.SampleSelect.placeholder"),
721
674
  buttons: [
722
675
  {
723
676
  icon: "library",
724
- tooltip: localizeUtils_1.getLocalizedString("core.SampleSelect.buttons.viewSamples"),
677
+ tooltip: (0, localizeUtils_1.getLocalizedString)("core.SampleSelect.buttons.viewSamples"),
725
678
  command: "fx-extension.openSamples",
726
679
  },
727
680
  ],
@@ -731,10 +684,10 @@ function runtimeQuestion() {
731
684
  return {
732
685
  type: "singleSelect",
733
686
  name: constants_3.QuestionNames.Runtime,
734
- title: localizeUtils_1.getLocalizedString("core.getRuntimeQuestion.title"),
687
+ title: (0, localizeUtils_1.getLocalizedString)("core.getRuntimeQuestion.title"),
735
688
  staticOptions: [constants_3.RuntimeOptions.NodeJS(), constants_3.RuntimeOptions.DotNet()],
736
689
  default: constants_3.RuntimeOptions.NodeJS().id,
737
- placeholder: localizeUtils_1.getLocalizedString("core.getRuntimeQuestion.placeholder"),
690
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.getRuntimeQuestion.placeholder"),
738
691
  cliHidden: true,
739
692
  };
740
693
  }
@@ -743,14 +696,14 @@ const tabContentUrlOptionItem = (tab) => {
743
696
  return {
744
697
  id: tab.name,
745
698
  label: tab.name,
746
- detail: localizeUtils_1.getLocalizedString("core.updateContentUrlOption.description", tab.contentUrl, defaultTabLocalHostUrl),
699
+ detail: (0, localizeUtils_1.getLocalizedString)("core.updateContentUrlOption.description", tab.contentUrl, defaultTabLocalHostUrl),
747
700
  };
748
701
  };
749
702
  const tabWebsiteUrlOptionItem = (tab) => {
750
703
  return {
751
704
  id: tab.name,
752
705
  label: tab.name,
753
- detail: localizeUtils_1.getLocalizedString("core.updateWebsiteUrlOption.description", tab.websiteUrl, defaultTabLocalHostUrl),
706
+ detail: (0, localizeUtils_1.getLocalizedString)("core.updateWebsiteUrlOption.description", tab.websiteUrl, defaultTabLocalHostUrl),
754
707
  };
755
708
  };
756
709
  function getTabWebsiteOptions(inputs) {
@@ -767,14 +720,14 @@ function selectTabWebsiteUrlQuestion() {
767
720
  return {
768
721
  type: "multiSelect",
769
722
  name: constants_3.QuestionNames.ReplaceWebsiteUrl,
770
- title: localizeUtils_1.getLocalizedString("core.updateWebsiteUrlQuestion.title"),
723
+ title: (0, localizeUtils_1.getLocalizedString)("core.updateWebsiteUrlQuestion.title"),
771
724
  staticOptions: [],
772
725
  dynamicOptions: getTabWebsiteOptions,
773
726
  default: (inputs) => {
774
727
  const options = getTabWebsiteOptions(inputs);
775
728
  return options.map((o) => o.id);
776
729
  },
777
- placeholder: localizeUtils_1.getLocalizedString("core.updateUrlQuestion.placeholder"),
730
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.updateUrlQuestion.placeholder"),
778
731
  forgetLastValue: true,
779
732
  };
780
733
  }
@@ -792,14 +745,14 @@ const selectTabsContentUrlQuestion = () => {
792
745
  return {
793
746
  type: "multiSelect",
794
747
  name: constants_3.QuestionNames.ReplaceContentUrl,
795
- title: localizeUtils_1.getLocalizedString("core.updateContentUrlQuestion.title"),
748
+ title: (0, localizeUtils_1.getLocalizedString)("core.updateContentUrlQuestion.title"),
796
749
  staticOptions: [],
797
750
  dynamicOptions: getTabContentUrlOptions,
798
751
  default: (inputs) => {
799
752
  const options = getTabContentUrlOptions(inputs);
800
753
  return options.map((o) => o.id);
801
754
  },
802
- placeholder: localizeUtils_1.getLocalizedString("core.updateUrlQuestion.placeholder"),
755
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.updateUrlQuestion.placeholder"),
803
756
  forgetLastValue: true,
804
757
  };
805
758
  };
@@ -809,11 +762,11 @@ const botOptionItem = (isMessageExtension, botId) => {
809
762
  return {
810
763
  id: isMessageExtension ? answerToReplaceMessageExtensionBotId : answerToRepaceBotId,
811
764
  label: isMessageExtension
812
- ? localizeUtils_1.getLocalizedString("core.updateBotIdForMessageExtension.label")
813
- : localizeUtils_1.getLocalizedString("core.updateBotIdForBot.label"),
765
+ ? (0, localizeUtils_1.getLocalizedString)("core.updateBotIdForMessageExtension.label")
766
+ : (0, localizeUtils_1.getLocalizedString)("core.updateBotIdForBot.label"),
814
767
  detail: isMessageExtension
815
- ? localizeUtils_1.getLocalizedString("core.updateBotIdForMessageExtension.description", botId)
816
- : localizeUtils_1.getLocalizedString("core.updateBotIdForBot.description", botId),
768
+ ? (0, localizeUtils_1.getLocalizedString)("core.updateBotIdForMessageExtension.description", botId)
769
+ : (0, localizeUtils_1.getLocalizedString)("core.updateBotIdForBot.description", botId),
817
770
  };
818
771
  };
819
772
  function getBotIdAndMeId(appDefinition) {
@@ -846,14 +799,14 @@ function selectBotIdsQuestion() {
846
799
  return {
847
800
  type: "multiSelect",
848
801
  name: constants_3.QuestionNames.ReplaceBotIds,
849
- title: localizeUtils_1.getLocalizedString("core.updateBotIdsQuestion.title"),
802
+ title: (0, localizeUtils_1.getLocalizedString)("core.updateBotIdsQuestion.title"),
850
803
  staticOptions: [],
851
804
  dynamicOptions: getBotOptions,
852
805
  default: (inputs) => {
853
806
  const options = getBotOptions(inputs);
854
807
  return options.map((o) => o.id);
855
808
  },
856
- placeholder: localizeUtils_1.getLocalizedString("core.updateBotIdsQuestion.placeholder"),
809
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.updateBotIdsQuestion.placeholder"),
857
810
  forgetLastValue: true,
858
811
  };
859
812
  }
@@ -865,8 +818,8 @@ function apiSpecLocationQuestion(includeExistingAPIs = true) {
865
818
  if (!inputs) {
866
819
  throw new Error("inputs is undefined"); // should never happen
867
820
  }
868
- const context = globalVars_1.createContext();
869
- const res = await helper_1.listOperations(context, input.trim(), inputs, includeExistingAPIs, false, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
821
+ const context = (0, globalVars_1.createContext)();
822
+ const res = await (0, helper_1.listOperations)(context, input.trim(), inputs, includeExistingAPIs, false, inputs.platform === teamsfx_api_1.Platform.VSCode ? correlationId : undefined);
870
823
  if (res.isOk()) {
871
824
  inputs.supportedApisFromApiSpec = res.value;
872
825
  }
@@ -880,12 +833,12 @@ function apiSpecLocationQuestion(includeExistingAPIs = true) {
880
833
  return errors[0].content;
881
834
  }
882
835
  else {
883
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.vscode.message");
836
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.multipleValidationErrors.vscode.message");
884
837
  }
885
838
  }
886
839
  }
887
840
  catch (e) {
888
- const error = error_2.assembleError(e);
841
+ const error = (0, error_2.assembleError)(e);
889
842
  throw error;
890
843
  }
891
844
  };
@@ -894,35 +847,35 @@ function apiSpecLocationQuestion(includeExistingAPIs = true) {
894
847
  name: constants_3.QuestionNames.ApiSpecLocation,
895
848
  cliShortName: "a",
896
849
  cliDescription: "OpenAPI description document location.",
897
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.title"),
850
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.title"),
898
851
  forgetLastValue: true,
899
852
  inputBoxConfig: {
900
853
  type: "innerText",
901
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.title"),
902
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.placeholder"),
854
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.title"),
855
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.placeholder"),
903
856
  name: "input-api-spec-url",
904
857
  step: 2,
905
858
  validation: {
906
859
  validFunc: (input, inputs) => {
907
- const result = stringUtils_1.isValidHttpUrl(input.trim())
860
+ const result = (0, stringUtils_1.isValidHttpUrl)(input.trim())
908
861
  ? undefined
909
862
  : (inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI
910
- ? "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."
911
- : localizeUtils_1.getLocalizedString("core.createProjectQuestion.invalidUrl.message");
863
+ ? "Please enter a valid HTTP URL to access your OpenAPI description document or enter a file path of your local OpenAPI description document."
864
+ : (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.invalidUrl.message");
912
865
  return Promise.resolve(result);
913
866
  },
914
867
  },
915
868
  },
916
869
  inputOptionItem: {
917
870
  id: "input",
918
- label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpecInputUrl.label"),
871
+ label: `$(cloud) ` + (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpecInputUrl.label"),
919
872
  },
920
873
  filters: {
921
874
  files: ["json", "yml", "yaml"],
922
875
  },
923
876
  validation: {
924
877
  validFunc: async (input, inputs) => {
925
- if (!stringUtils_1.isValidHttpUrl(input.trim()) && !(await fs_extra_1.default.pathExists(input.trim()))) {
878
+ if (!(0, stringUtils_1.isValidHttpUrl)(input.trim()) && !(await fs_extra_1.default.pathExists(input.trim()))) {
926
879
  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.";
927
880
  }
928
881
  return await validationOnAccept(input, inputs);
@@ -935,8 +888,8 @@ function apiAuthQuestion() {
935
888
  return {
936
889
  type: "singleSelect",
937
890
  name: constants_3.QuestionNames.ApiAuth,
938
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiMessageExtensionAuth.title"),
939
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiMessageExtensionAuth.placeholder"),
891
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiMessageExtensionAuth.title"),
892
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiMessageExtensionAuth.placeholder"),
940
893
  cliDescription: "The authentication type for the API.",
941
894
  staticOptions: constants_3.ApiAuthOptions.all(),
942
895
  dynamicOptions: (inputs) => {
@@ -944,9 +897,8 @@ function apiAuthQuestion() {
944
897
  if (inputs[constants_3.QuestionNames.MeArchitectureType] === constants_3.MeArchitectureOptions.newApi().id) {
945
898
  options.push(constants_3.ApiAuthOptions.apiKey(), constants_3.ApiAuthOptions.microsoftEntra());
946
899
  }
947
- else if (featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.CopilotAuth) &&
948
- inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.copilotPluginNewApi().id) {
949
- options.push(constants_3.ApiAuthOptions.apiKey(), constants_3.ApiAuthOptions.oauth());
900
+ else if (inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.newApi().id) {
901
+ options.push(constants_3.ApiAuthOptions.apiKey(), constants_3.ApiAuthOptions.microsoftEntra(), constants_3.ApiAuthOptions.oauth());
950
902
  }
951
903
  return options;
952
904
  },
@@ -959,31 +911,30 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
959
911
  let placeholder = "";
960
912
  const isPlugin = (inputs) => {
961
913
  return (isAddPlugin ||
962
- (!!inputs &&
963
- inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.copilotPluginApiSpec().id));
914
+ (!!inputs && inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.apiSpec().id));
964
915
  };
965
916
  return {
966
917
  type: "multiSelect",
967
918
  name: constants_3.QuestionNames.ApiOperation,
968
919
  title: (inputs) => {
969
920
  return isPlugin(inputs)
970
- ? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.copilotOperation.title")
971
- : localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.title");
921
+ ? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.copilotOperation.title")
922
+ : (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.title");
972
923
  },
973
924
  cliDescription: isAddPlugin
974
925
  ? "Select operation(s) Copilot can interact with."
975
926
  : "Select operation(s) Teams can interact with.",
976
927
  cliShortName: "o",
977
928
  placeholder: (inputs) => {
978
- const isPlugin = inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.copilotPluginApiSpec().id;
929
+ const isPlugin = inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.apiSpec().id;
979
930
  if (!includeExistingAPIs) {
980
- placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting");
931
+ placeholder = (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting");
981
932
  }
982
933
  else if (isPlugin) {
983
- placeholder = ""; // TODO: add placeholder for api plugin
934
+ placeholder = (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.plugin.placeholder");
984
935
  }
985
936
  else {
986
- placeholder = localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.apikey.placeholder");
937
+ placeholder = (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.apikey.placeholder");
987
938
  }
988
939
  return placeholder;
989
940
  },
@@ -996,8 +947,9 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
996
947
  }
997
948
  if (input.length < 1 ||
998
949
  (input.length > 10 &&
999
- inputs[constants_3.QuestionNames.CustomCopilotRag] != constants_3.CustomCopilotRagOptions.customApi().id)) {
1000
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.invalidMessage", input.length, 10);
950
+ inputs[constants_3.QuestionNames.CustomCopilotRag] !== constants_3.CustomCopilotRagOptions.customApi().id &&
951
+ inputs[constants_3.QuestionNames.ProjectType] !== constants_3.ProjectTypeOptions.copilotExtension().id)) {
952
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.invalidMessage", input.length, 10);
1001
953
  }
1002
954
  const operations = inputs.supportedApisFromApiSpec;
1003
955
  const authNames = new Set();
@@ -1012,10 +964,10 @@ function apiOperationQuestion(includeExistingAPIs = true, isAddPlugin = false) {
1012
964
  }
1013
965
  }
1014
966
  if (authNames.size > 1) {
1015
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.multipleAuth", Array.from(authNames).join(", "));
967
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.multipleAuth", Array.from(authNames).join(", "));
1016
968
  }
1017
969
  if (serverUrls.size > 1) {
1018
- return localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.multipleServer", Array.from(serverUrls).join(", "));
970
+ return (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.apiSpec.operation.multipleServer", Array.from(serverUrls).join(", "));
1019
971
  }
1020
972
  const authApi = operations.find((api) => !!api.data.authName && input.includes(api.id));
1021
973
  if (authApi) {
@@ -1037,8 +989,8 @@ function customCopilotRagQuestion() {
1037
989
  return {
1038
990
  type: "singleSelect",
1039
991
  name: constants_3.QuestionNames.CustomCopilotRag,
1040
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRag.title"),
1041
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotRag.placeholder"),
992
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotRag.title"),
993
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotRag.placeholder"),
1042
994
  staticOptions: constants_3.CustomCopilotRagOptions.all(),
1043
995
  dynamicOptions: () => constants_3.CustomCopilotRagOptions.all(),
1044
996
  default: constants_3.CustomCopilotRagOptions.customize().id,
@@ -1048,8 +1000,8 @@ function customCopilotAssistantQuestion() {
1048
1000
  return {
1049
1001
  type: "singleSelect",
1050
1002
  name: constants_3.QuestionNames.CustomCopilotAssistant,
1051
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistant.title"),
1052
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.customCopilotAssistant.placeholder"),
1003
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotAssistant.title"),
1004
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.capability.customCopilotAssistant.placeholder"),
1053
1005
  staticOptions: constants_3.CustomCopilotAssistantOptions.all(),
1054
1006
  dynamicOptions: () => constants_3.CustomCopilotAssistantOptions.all(),
1055
1007
  default: constants_3.CustomCopilotAssistantOptions.new().id,
@@ -1059,34 +1011,31 @@ function llmServiceQuestion() {
1059
1011
  return {
1060
1012
  type: "singleSelect",
1061
1013
  name: constants_3.QuestionNames.LLMService,
1062
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.title"),
1063
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.placeholder"),
1014
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.title"),
1015
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.placeholder"),
1064
1016
  staticOptions: [
1065
1017
  {
1066
1018
  id: "llm-service-azure-openai",
1067
1019
  cliName: "azure-openai",
1068
- label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
1069
- detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
1020
+ label: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
1021
+ detail: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
1070
1022
  },
1071
1023
  {
1072
1024
  id: "llm-service-openai",
1073
- label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.label"),
1074
- detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
1025
+ label: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceOpenAIOption.label"),
1026
+ detail: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
1075
1027
  },
1076
1028
  ],
1077
1029
  dynamicOptions: (inputs) => {
1078
1030
  const options = [];
1079
- if (inputs[constants_3.QuestionNames.CustomCopilotAssistant] !== "custom-copilot-agent-assistants-api") {
1080
- options.push({
1081
- id: "llm-service-azure-openai",
1082
- label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
1083
- detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
1084
- });
1085
- }
1086
1031
  options.push({
1032
+ id: "llm-service-azure-openai",
1033
+ label: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceAzureOpenAIOption.label"),
1034
+ detail: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceAzureOpenAIOption.detail"),
1035
+ }, {
1087
1036
  id: "llm-service-openai",
1088
- label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.label"),
1089
- detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
1037
+ label: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceOpenAIOption.label"),
1038
+ detail: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmServiceOpenAIOption.detail"),
1090
1039
  });
1091
1040
  return options;
1092
1041
  },
@@ -1099,8 +1048,8 @@ function openAIKeyQuestion() {
1099
1048
  type: "text",
1100
1049
  password: true,
1101
1050
  name: constants_3.QuestionNames.OpenAIKey,
1102
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.openAIKey.title"),
1103
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.openAIKey.placeholder"),
1051
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.openAIKey.title"),
1052
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.openAIKey.placeholder"),
1104
1053
  };
1105
1054
  }
1106
1055
  function azureOpenAIKeyQuestion() {
@@ -1108,26 +1057,142 @@ function azureOpenAIKeyQuestion() {
1108
1057
  type: "text",
1109
1058
  password: true,
1110
1059
  name: constants_3.QuestionNames.AzureOpenAIKey,
1111
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIKey.title"),
1112
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIKey.placeholder"),
1060
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIKey.title"),
1061
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIKey.placeholder"),
1113
1062
  };
1114
1063
  }
1115
1064
  function azureOpenAIEndpointQuestion() {
1116
1065
  return {
1117
1066
  type: "text",
1118
1067
  name: constants_3.QuestionNames.AzureOpenAIEndpoint,
1119
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIEndpoint.title"),
1120
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIEndpoint.placeholder"),
1068
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIEndpoint.title"),
1069
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIEndpoint.placeholder"),
1121
1070
  };
1122
1071
  }
1123
1072
  function azureOpenAIDeploymentNameQuestion() {
1124
1073
  return {
1125
1074
  type: "text",
1126
1075
  name: constants_3.QuestionNames.AzureOpenAIDeploymentName,
1127
- title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIDeploymentName.title"),
1128
- placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.llmService.azureOpenAIDeploymentName.placeholder"),
1076
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIDeploymentName.title"),
1077
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.llmService.azureOpenAIDeploymentName.placeholder"),
1078
+ };
1079
+ }
1080
+ function declarativeCopilotPluginQuestion() {
1081
+ return {
1082
+ type: "singleSelect",
1083
+ name: constants_3.QuestionNames.WithPlugin,
1084
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.declarativeCopilot.title"),
1085
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.declarativeCopilot.placeholder"),
1086
+ cliDescription: "Whether to add API plugin for your declarative Copilot.",
1087
+ staticOptions: constants_3.DeclarativeCopilotTypeOptions.all(),
1088
+ default: constants_3.DeclarativeCopilotTypeOptions.noPlugin().id,
1129
1089
  };
1130
1090
  }
1091
+ function apiPluginStartQuestion(doesProjectExists) {
1092
+ return {
1093
+ type: "singleSelect",
1094
+ name: constants_3.QuestionNames.ApiPluginType,
1095
+ title: (inputs) => {
1096
+ return inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.declarativeCopilot().id ||
1097
+ doesProjectExists
1098
+ ? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addApiPlugin.title")
1099
+ : (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.createApiPlugin.title");
1100
+ },
1101
+ placeholder: (inputs) => {
1102
+ return inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.declarativeCopilot().id ||
1103
+ doesProjectExists
1104
+ ? (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addApiPlugin.placeholder")
1105
+ : (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.projectType.copilotExtension.placeholder");
1106
+ },
1107
+ cliDescription: "API plugin type.",
1108
+ staticOptions: constants_3.ApiPluginStartOptions.staticAll(doesProjectExists),
1109
+ dynamicOptions: (inputs) => {
1110
+ return constants_3.ApiPluginStartOptions.all(inputs, doesProjectExists);
1111
+ },
1112
+ default: constants_3.ApiPluginStartOptions.newApi().id,
1113
+ };
1114
+ }
1115
+ exports.apiPluginStartQuestion = apiPluginStartQuestion;
1116
+ function pluginManifestQuestion() {
1117
+ const correlationId = correlator_1.Correlator.getId();
1118
+ return {
1119
+ type: "singleFile",
1120
+ name: constants_3.QuestionNames.PluginManifestFilePath,
1121
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.pluginManifest.title"),
1122
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.pluginManifest.placeholder"),
1123
+ cliDescription: "Plugin manifest path.",
1124
+ filters: {
1125
+ files: ["json"],
1126
+ },
1127
+ defaultFolder: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform) ? "./" : os.homedir(),
1128
+ validation: {
1129
+ validFunc: async (input) => {
1130
+ const manifestRes = await PluginManifestUtils_1.pluginManifestUtils.readPluginManifestFile(input.trim());
1131
+ if (manifestRes.isErr()) {
1132
+ (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginManifestFilePath), manifestRes.error, {
1133
+ "correlation-id": correlationId,
1134
+ });
1135
+ return manifestRes.error.displayMessage;
1136
+ }
1137
+ else {
1138
+ const manifest = manifestRes.value;
1139
+ const checkRes = (0, helper_2.validateSourcePluginManifest)(manifest, constants_3.QuestionNames.PluginManifestFilePath);
1140
+ if (checkRes.isErr()) {
1141
+ (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginManifestFilePath), checkRes.error, {
1142
+ "correlation-id": correlationId,
1143
+ });
1144
+ return checkRes.error.displayMessage;
1145
+ }
1146
+ }
1147
+ },
1148
+ },
1149
+ };
1150
+ }
1151
+ exports.pluginManifestQuestion = pluginManifestQuestion;
1152
+ function pluginApiSpecQuestion() {
1153
+ const correlationId = correlator_1.Correlator.getId();
1154
+ return {
1155
+ type: "singleFile",
1156
+ name: constants_3.QuestionNames.PluginOpenApiSpecFilePath,
1157
+ title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.apiSpec.title"),
1158
+ placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.addExistingPlugin.openApiSpec.placeholder"),
1159
+ cliDescription: "OpenAPI description document used for your API plugin.",
1160
+ filters: {
1161
+ files: ["json", "yml", "yaml"],
1162
+ },
1163
+ defaultFolder: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
1164
+ ? "./"
1165
+ : path.dirname(inputs[constants_3.QuestionNames.PluginManifestFilePath]),
1166
+ validation: {
1167
+ validFunc: async (input, inputs) => {
1168
+ if (!inputs) {
1169
+ throw new Error("inputs is undefined"); // should never happen
1170
+ }
1171
+ const filePath = input.trim();
1172
+ const ext = path.extname(filePath).toLowerCase();
1173
+ if (![".json", ".yml", ".yaml"].includes(ext)) {
1174
+ const error = new error_2.FileNotSupportError(error_2.CoreSource, ["json", "yml", "yaml"].join(", "));
1175
+ (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginOpenApiSpecFilePath), error, {
1176
+ "correlation-id": correlationId,
1177
+ });
1178
+ return error.displayMessage;
1179
+ }
1180
+ const specParser = new m365_spec_parser_1.SpecParser(filePath, (0, helper_1.getParserOptions)(m365_spec_parser_1.ProjectType.Copilot));
1181
+ const validationRes = await specParser.validate();
1182
+ const invalidSpecError = validationRes.errors.find((o) => o.type === m365_spec_parser_1.ErrorType.SpecNotValid);
1183
+ if (invalidSpecError) {
1184
+ const error = new teamsfx_api_1.UserError(constants_1.SpecParserSource, telemetry_1.ApiSpecTelemetryPropertis.InvalidApiSpec, invalidSpecError.content, invalidSpecError.content);
1185
+ (0, telemetry_1.sendTelemetryErrorEvent)(error_2.CoreSource, (0, telemetry_1.getQuestionValidationErrorEventName)(constants_3.QuestionNames.PluginOpenApiSpecFilePath), error, {
1186
+ "correlation-id": correlationId,
1187
+ [telemetry_1.ApiSpecTelemetryPropertis.SpecNotValidDetails]: invalidSpecError.content,
1188
+ });
1189
+ }
1190
+ return invalidSpecError === null || invalidSpecError === void 0 ? void 0 : invalidSpecError.content;
1191
+ },
1192
+ },
1193
+ };
1194
+ }
1195
+ exports.pluginApiSpecQuestion = pluginApiSpecQuestion;
1131
1196
  function capabilitySubTree() {
1132
1197
  const node = {
1133
1198
  data: capabilityQuestion(),
@@ -1188,12 +1253,35 @@ function capabilitySubTree() {
1188
1253
  condition: { equals: constants_3.CapabilityOptions.m365SearchMe().id },
1189
1254
  data: meArchitectureQuestion(),
1190
1255
  },
1256
+ {
1257
+ condition: { equals: constants_3.CapabilityOptions.declarativeCopilot().id },
1258
+ data: declarativeCopilotPluginQuestion(),
1259
+ },
1260
+ {
1261
+ condition: (inputs) => {
1262
+ return (inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.apiPlugin().id ||
1263
+ inputs[constants_3.QuestionNames.WithPlugin] === constants_3.DeclarativeCopilotTypeOptions.withPlugin().id);
1264
+ },
1265
+ data: apiPluginStartQuestion(),
1266
+ },
1267
+ {
1268
+ condition: (inputs) => {
1269
+ return inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.existingPlugin().id;
1270
+ },
1271
+ data: { type: "group", name: constants_3.QuestionNames.ImportPlugin },
1272
+ children: [
1273
+ {
1274
+ data: pluginManifestQuestion(),
1275
+ },
1276
+ {
1277
+ data: pluginApiSpecQuestion(),
1278
+ },
1279
+ ],
1280
+ },
1191
1281
  {
1192
1282
  condition: (inputs) => {
1193
1283
  return (inputs[constants_3.QuestionNames.MeArchitectureType] == constants_3.MeArchitectureOptions.newApi().id ||
1194
- (featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.CopilotAuth) &&
1195
- featureFlags_1.isCopilotPluginEnabled() &&
1196
- inputs[constants_3.QuestionNames.Capabilities] == constants_3.CapabilityOptions.copilotPluginNewApi().id));
1284
+ inputs[constants_3.QuestionNames.ApiPluginType] == constants_3.ApiPluginStartOptions.newApi().id);
1197
1285
  },
1198
1286
  data: apiAuthQuestion(),
1199
1287
  },
@@ -1206,9 +1294,10 @@ function capabilitySubTree() {
1206
1294
  {
1207
1295
  // from API spec
1208
1296
  condition: (inputs) => {
1209
- return (inputs[constants_3.QuestionNames.Capabilities] === constants_3.CapabilityOptions.copilotPluginApiSpec().id ||
1210
- inputs[constants_3.QuestionNames.MeArchitectureType] === constants_3.MeArchitectureOptions.apiSpec().id ||
1211
- inputs[constants_3.QuestionNames.CustomCopilotRag] === constants_3.CustomCopilotRagOptions.customApi().id);
1297
+ return (!featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaIntegration) &&
1298
+ (inputs[constants_3.QuestionNames.ApiPluginType] === constants_3.ApiPluginStartOptions.apiSpec().id ||
1299
+ inputs[constants_3.QuestionNames.MeArchitectureType] === constants_3.MeArchitectureOptions.apiSpec().id ||
1300
+ inputs[constants_3.QuestionNames.CustomCopilotRag] === constants_3.CustomCopilotRagOptions.customApi().id));
1212
1301
  },
1213
1302
  data: { type: "group", name: constants_3.QuestionNames.FromExistingApi },
1214
1303
  children: [
@@ -1217,6 +1306,9 @@ function capabilitySubTree() {
1217
1306
  },
1218
1307
  {
1219
1308
  data: apiOperationQuestion(),
1309
+ condition: (inputs) => {
1310
+ return !inputs[constants_3.QuestionNames.ApiPluginManifestPath];
1311
+ },
1220
1312
  },
1221
1313
  ],
1222
1314
  },
@@ -1230,12 +1322,14 @@ function capabilitySubTree() {
1230
1322
  // programming language
1231
1323
  data: programmingLanguageQuestion(),
1232
1324
  condition: (inputs) => {
1233
- return (!!inputs[constants_3.QuestionNames.Capabilities] &&
1234
- inputs[constants_3.QuestionNames.Capabilities] !== constants_3.CapabilityOptions.copilotPluginApiSpec().id &&
1235
- inputs[constants_3.QuestionNames.Capabilities] !== constants_3.CapabilityOptions.customizeGptBasic().id &&
1325
+ return ((!!inputs[constants_3.QuestionNames.Capabilities] &&
1326
+ inputs[constants_3.QuestionNames.WithPlugin] !== constants_3.DeclarativeCopilotTypeOptions.noPlugin().id &&
1327
+ inputs[constants_3.QuestionNames.ApiPluginType] !== constants_3.ApiPluginStartOptions.apiSpec().id &&
1328
+ inputs[constants_3.QuestionNames.ApiPluginType] !== constants_3.ApiPluginStartOptions.existingPlugin().id &&
1236
1329
  inputs[constants_3.QuestionNames.MeArchitectureType] !== constants_3.MeArchitectureOptions.apiSpec().id &&
1237
1330
  inputs[constants_3.QuestionNames.Capabilities] !== constants_3.CapabilityOptions.officeAddinImport().id &&
1238
- inputs[constants_3.QuestionNames.Capabilities] !== constants_3.CapabilityOptions.outlookAddinImport().id);
1331
+ inputs[constants_3.QuestionNames.Capabilities] !== constants_3.CapabilityOptions.outlookAddinImport().id) ||
1332
+ (0, constants_3.getRuntime)(inputs) === constants_3.RuntimeOptions.DotNet().id);
1239
1333
  },
1240
1334
  },
1241
1335
  {
@@ -1285,10 +1379,22 @@ function capabilitySubTree() {
1285
1379
  {
1286
1380
  // root folder
1287
1381
  data: folderQuestion(),
1382
+ condition: (inputs) => {
1383
+ // Only skip this project when need to rediect to Kiota: 1. Feature flag enabled 2. Creating plugin from existing spec 3. No plugin manifest path
1384
+ return (!featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaIntegration) ||
1385
+ inputs[constants_3.QuestionNames.ApiPluginType] !== constants_3.ApiPluginStartOptions.apiSpec().id ||
1386
+ !!inputs[constants_3.QuestionNames.ApiPluginManifestPath]);
1387
+ },
1288
1388
  },
1289
1389
  {
1290
1390
  // app name
1291
1391
  data: appNameQuestion(),
1392
+ condition: (inputs) => {
1393
+ // Only skip this project when need to rediect to Kiota: 1. Feature flag enabled 2. Creating plugin from existing spec 3. No plugin manifest path
1394
+ return (!featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaIntegration) ||
1395
+ inputs[constants_3.QuestionNames.ApiPluginType] !== constants_3.ApiPluginStartOptions.apiSpec().id ||
1396
+ !!inputs[constants_3.QuestionNames.ApiPluginManifestPath]);
1397
+ },
1292
1398
  },
1293
1399
  ],
1294
1400
  condition: (inputs) => {
@@ -1303,7 +1409,8 @@ function createProjectQuestionNode() {
1303
1409
  data: { type: "group" },
1304
1410
  children: [
1305
1411
  {
1306
- condition: (inputs) => featureFlags_1.isCLIDotNetEnabled() && teamsfx_api_1.CLIPlatforms.includes(inputs.platform),
1412
+ condition: (inputs) => featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.CLIDotNet) &&
1413
+ teamsfx_api_1.CLIPlatforms.includes(inputs.platform),
1307
1414
  data: runtimeQuestion(),
1308
1415
  },
1309
1416
  {
@@ -1311,13 +1418,9 @@ function createProjectQuestionNode() {
1311
1418
  data: projectTypeQuestion(),
1312
1419
  cliOptionDisabled: "self",
1313
1420
  },
1314
- {
1315
- condition: (inputs) => inputs[constants_3.QuestionNames.ProjectType] === constants_3.ProjectTypeOptions.officeXMLAddin().id,
1316
- data: officeAddinHostingQuestion(),
1317
- },
1318
1421
  capabilitySubTree(),
1319
1422
  {
1320
- condition: (inputs) => inputs.teamsAppFromTdp && utils_1.isPersonalApp(inputs.teamsAppFromTdp),
1423
+ condition: (inputs) => inputs.teamsAppFromTdp && (0, utils_1.isPersonalApp)(inputs.teamsAppFromTdp),
1321
1424
  data: { type: "group", name: constants_3.QuestionNames.RepalceTabUrl },
1322
1425
  cliOptionDisabled: "all",
1323
1426
  inputsDisabled: "all",
@@ -1343,7 +1446,7 @@ function createProjectQuestionNode() {
1343
1446
  {
1344
1447
  condition: (inputs) => {
1345
1448
  const appDef = inputs.teamsAppFromTdp;
1346
- return appDef && utils_1.needBotCode(appDef);
1449
+ return appDef && (0, utils_1.needBotCode)(appDef);
1347
1450
  },
1348
1451
  data: selectBotIdsQuestion(),
1349
1452
  cliOptionDisabled: "all",
@@ -1366,7 +1469,7 @@ function createSampleProjectQuestionNode() {
1366
1469
  }
1367
1470
  exports.createSampleProjectQuestionNode = createSampleProjectQuestionNode;
1368
1471
  function createProjectCliHelpNode() {
1369
- const node = lodash_1.cloneDeep(createProjectQuestionNode());
1472
+ const node = (0, lodash_1.cloneDeep)(createProjectQuestionNode());
1370
1473
  const deleteNames = [
1371
1474
  constants_3.QuestionNames.ProjectType,
1372
1475
  constants_3.QuestionNames.OfficeAddinImport,
@@ -1375,9 +1478,14 @@ function createProjectCliHelpNode() {
1375
1478
  constants_3.QuestionNames.ReplaceBotIds,
1376
1479
  constants_3.QuestionNames.Samples,
1377
1480
  ];
1378
- if (!featureFlags_1.isCLIDotNetEnabled()) {
1481
+ if (!featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.CLIDotNet)) {
1379
1482
  deleteNames.push(constants_3.QuestionNames.Runtime);
1380
1483
  }
1484
+ if (!(0, featureFlags_1.isCopilotExtensionEnabled)()) {
1485
+ deleteNames.push(constants_3.QuestionNames.ApiPluginType);
1486
+ deleteNames.push(constants_3.QuestionNames.WithPlugin);
1487
+ deleteNames.push(constants_3.QuestionNames.ImportPlugin);
1488
+ }
1381
1489
  trimQuestionTreeForCliHelp(node, deleteNames);
1382
1490
  return node;
1383
1491
  }