@microsoft/teamsfx-core 2.0.4-alpha.e83c26af7.0 → 2.0.4-alpha.ea55e6d34.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 (603) hide show
  1. package/build/common/constants.d.ts +1 -0
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +1 -0
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/deps-checker/checkerFactory.d.ts +1 -2
  6. package/build/common/deps-checker/checkerFactory.d.ts.map +1 -1
  7. package/build/common/deps-checker/checkerFactory.js +2 -2
  8. package/build/common/deps-checker/checkerFactory.js.map +1 -1
  9. package/build/common/deps-checker/depsLogger.d.ts +14 -14
  10. package/build/common/deps-checker/depsLogger.d.ts.map +1 -1
  11. package/build/common/deps-checker/depsLogger.js +7 -21
  12. package/build/common/deps-checker/depsLogger.js.map +1 -1
  13. package/build/common/deps-checker/internal/dotnetChecker.d.ts.map +1 -1
  14. package/build/common/deps-checker/internal/dotnetChecker.js +42 -37
  15. package/build/common/deps-checker/internal/dotnetChecker.js.map +1 -1
  16. package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
  17. package/build/common/deps-checker/internal/funcToolChecker.js +2 -2
  18. package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
  19. package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
  20. package/build/common/deps-checker/internal/nodeChecker.js +8 -8
  21. package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
  22. package/build/common/deps-checker/internal/vxTestAppChecker.js +1 -1
  23. package/build/common/deps-checker/internal/vxTestAppChecker.js.map +1 -1
  24. package/build/common/deps-checker/util/cpUtils.d.ts +1 -1
  25. package/build/common/deps-checker/util/cpUtils.d.ts.map +1 -1
  26. package/build/common/deps-checker/util/cpUtils.js +4 -4
  27. package/build/common/deps-checker/util/cpUtils.js.map +1 -1
  28. package/build/common/deps-checker/util/progressIndicator.js +2 -2
  29. package/build/common/deps-checker/util/progressIndicator.js.map +1 -1
  30. package/build/common/featureFlags.d.ts +1 -0
  31. package/build/common/featureFlags.d.ts.map +1 -1
  32. package/build/common/featureFlags.js +5 -1
  33. package/build/common/featureFlags.js.map +1 -1
  34. package/build/common/local/localCertificateManager.d.ts.map +1 -1
  35. package/build/common/local/localCertificateManager.js +4 -1
  36. package/build/common/local/localCertificateManager.js.map +1 -1
  37. package/build/common/local/packageJsonHelper.d.ts.map +1 -1
  38. package/build/common/local/packageJsonHelper.js +1 -0
  39. package/build/common/local/packageJsonHelper.js.map +1 -1
  40. package/build/common/local/portChecker.js.map +1 -1
  41. package/build/common/m365/launchHelper.d.ts +2 -2
  42. package/build/common/m365/launchHelper.d.ts.map +1 -1
  43. package/build/common/m365/launchHelper.js +24 -6
  44. package/build/common/m365/launchHelper.js.map +1 -1
  45. package/build/common/m365/packageService.d.ts.map +1 -1
  46. package/build/common/m365/packageService.js +66 -19
  47. package/build/common/m365/packageService.js.map +1 -1
  48. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  49. package/build/common/projectSettingsHelper.js +1 -0
  50. package/build/common/projectSettingsHelper.js.map +1 -1
  51. package/build/common/samples.d.ts +13 -5
  52. package/build/common/samples.d.ts.map +1 -1
  53. package/build/common/samples.js +58 -38
  54. package/build/common/samples.js.map +1 -1
  55. package/build/common/spec-parser/adaptiveCardGenerator.d.ts +5 -0
  56. package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +1 -0
  57. package/build/common/spec-parser/adaptiveCardGenerator.js +120 -0
  58. package/build/common/spec-parser/adaptiveCardGenerator.js.map +1 -0
  59. package/build/common/spec-parser/constants.d.ts +21 -7
  60. package/build/common/spec-parser/constants.d.ts.map +1 -1
  61. package/build/common/spec-parser/constants.js +45 -7
  62. package/build/common/spec-parser/constants.js.map +1 -1
  63. package/build/common/spec-parser/interfaces.d.ts +83 -13
  64. package/build/common/spec-parser/interfaces.d.ts.map +1 -1
  65. package/build/common/spec-parser/interfaces.js +23 -13
  66. package/build/common/spec-parser/interfaces.js.map +1 -1
  67. package/build/common/spec-parser/manifestUpdater.d.ts +6 -0
  68. package/build/common/spec-parser/manifestUpdater.d.ts.map +1 -0
  69. package/build/common/spec-parser/manifestUpdater.js +133 -0
  70. package/build/common/spec-parser/manifestUpdater.js.map +1 -0
  71. package/build/common/spec-parser/specFilter.d.ts +3 -0
  72. package/build/common/spec-parser/specFilter.d.ts.map +1 -0
  73. package/build/common/spec-parser/specFilter.js +40 -0
  74. package/build/common/spec-parser/specFilter.js.map +1 -0
  75. package/build/common/spec-parser/specParser.d.ts +14 -5
  76. package/build/common/spec-parser/specParser.d.ts.map +1 -1
  77. package/build/common/spec-parser/specParser.js +181 -94
  78. package/build/common/spec-parser/specParser.js.map +1 -1
  79. package/build/common/spec-parser/utils.d.ts +29 -0
  80. package/build/common/spec-parser/utils.d.ts.map +1 -0
  81. package/build/common/spec-parser/utils.js +309 -0
  82. package/build/common/spec-parser/utils.js.map +1 -0
  83. package/build/common/telemetry.d.ts +7 -5
  84. package/build/common/telemetry.d.ts.map +1 -1
  85. package/build/common/telemetry.js +41 -15
  86. package/build/common/telemetry.js.map +1 -1
  87. package/build/common/tools.d.ts.map +1 -1
  88. package/build/common/tools.js +7 -2
  89. package/build/common/tools.js.map +1 -1
  90. package/build/common/utils.d.ts +1 -0
  91. package/build/common/utils.d.ts.map +1 -1
  92. package/build/common/utils.js +5 -1
  93. package/build/common/utils.js.map +1 -1
  94. package/build/component/configManager/interface.d.ts +5 -1
  95. package/build/component/configManager/interface.d.ts.map +1 -1
  96. package/build/component/configManager/interface.js.map +1 -1
  97. package/build/component/configManager/lifecycle.d.ts +1 -3
  98. package/build/component/configManager/lifecycle.d.ts.map +1 -1
  99. package/build/component/configManager/lifecycle.js +25 -52
  100. package/build/component/configManager/lifecycle.js.map +1 -1
  101. package/build/component/configManager/parser.d.ts.map +1 -1
  102. package/build/component/configManager/parser.js +12 -6
  103. package/build/component/configManager/parser.js.map +1 -1
  104. package/build/component/configManager/validator.d.ts +0 -3
  105. package/build/component/configManager/validator.d.ts.map +1 -1
  106. package/build/component/configManager/validator.js +2 -12
  107. package/build/component/configManager/validator.js.map +1 -1
  108. package/build/component/constants.d.ts +11 -0
  109. package/build/component/constants.d.ts.map +1 -1
  110. package/build/component/constants.js +11 -0
  111. package/build/component/constants.js.map +1 -1
  112. package/build/component/coordinator/index.d.ts +12 -8
  113. package/build/component/coordinator/index.d.ts.map +1 -1
  114. package/build/component/coordinator/index.js +80 -67
  115. package/build/component/coordinator/index.js.map +1 -1
  116. package/build/component/coordinator/summary.d.ts.map +1 -1
  117. package/build/component/coordinator/summary.js +2 -1
  118. package/build/component/coordinator/summary.js.map +1 -1
  119. package/build/component/developerPortalScaffoldUtils.d.ts +1 -1
  120. package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
  121. package/build/component/developerPortalScaffoldUtils.js +7 -7
  122. package/build/component/developerPortalScaffoldUtils.js.map +1 -1
  123. package/build/component/driver/aad/create.d.ts +1 -2
  124. package/build/component/driver/aad/create.d.ts.map +1 -1
  125. package/build/component/driver/aad/create.js +4 -11
  126. package/build/component/driver/aad/create.js.map +1 -1
  127. package/build/component/driver/aad/error/aadManifestError.d.ts +3 -0
  128. package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
  129. package/build/component/driver/aad/error/aadManifestError.js +13 -1
  130. package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
  131. package/build/component/driver/aad/update.d.ts +1 -2
  132. package/build/component/driver/aad/update.d.ts.map +1 -1
  133. package/build/component/driver/aad/update.js +4 -11
  134. package/build/component/driver/aad/update.js.map +1 -1
  135. package/build/component/driver/aad/utility/aadAppClient.d.ts +1 -1
  136. package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
  137. package/build/component/driver/aad/utility/aadAppClient.js +58 -13
  138. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  139. package/build/component/driver/aad/utility/constants.d.ts +3 -0
  140. package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
  141. package/build/component/driver/aad/utility/constants.js +4 -1
  142. package/build/component/driver/aad/utility/constants.js.map +1 -1
  143. package/build/component/driver/add/addWebPart.d.ts.map +1 -1
  144. package/build/component/driver/add/addWebPart.js +10 -1
  145. package/build/component/driver/add/addWebPart.js.map +1 -1
  146. package/build/component/driver/arm/deploy.d.ts +1 -3
  147. package/build/component/driver/arm/deploy.d.ts.map +1 -1
  148. package/build/component/driver/arm/deploy.js +1 -14
  149. package/build/component/driver/arm/deploy.js.map +1 -1
  150. package/build/component/driver/arm/deployImpl.d.ts +2 -1
  151. package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
  152. package/build/component/driver/arm/deployImpl.js +15 -0
  153. package/build/component/driver/arm/deployImpl.js.map +1 -1
  154. package/build/component/driver/arm/util/bicepChecker.js +7 -6
  155. package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
  156. package/build/component/driver/arm/util/handleError.js.map +1 -1
  157. package/build/component/driver/arm/validator.d.ts.map +1 -1
  158. package/build/component/driver/arm/validator.js +3 -3
  159. package/build/component/driver/arm/validator.js.map +1 -1
  160. package/build/component/driver/botAadApp/create.d.ts +2 -1
  161. package/build/component/driver/botAadApp/create.d.ts.map +1 -1
  162. package/build/component/driver/botAadApp/create.js +7 -10
  163. package/build/component/driver/botAadApp/create.js.map +1 -1
  164. package/build/component/driver/botFramework/createOrUpdateBot.d.ts +1 -0
  165. package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
  166. package/build/component/driver/botFramework/createOrUpdateBot.js +8 -12
  167. package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
  168. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.d.ts +0 -2
  169. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.d.ts.map +1 -1
  170. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js +0 -10
  171. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js.map +1 -1
  172. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.d.ts +0 -2
  173. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.d.ts.map +1 -1
  174. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js +0 -10
  175. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js.map +1 -1
  176. package/build/component/driver/deploy/azure/azureStorageDeployDriver.d.ts +0 -2
  177. package/build/component/driver/deploy/azure/azureStorageDeployDriver.d.ts.map +1 -1
  178. package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +17 -19
  179. package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
  180. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.d.ts.map +1 -1
  181. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js +11 -4
  182. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js.map +1 -1
  183. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
  184. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +29 -16
  185. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
  186. package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
  187. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +18 -15
  188. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
  189. package/build/component/driver/deploy/azure/impl/baseDeployImpl.d.ts.map +1 -1
  190. package/build/component/driver/deploy/azure/impl/baseDeployImpl.js +4 -4
  191. package/build/component/driver/deploy/azure/impl/baseDeployImpl.js.map +1 -1
  192. package/build/component/driver/deploy/spfx/deployDriver.d.ts +1 -0
  193. package/build/component/driver/deploy/spfx/deployDriver.d.ts.map +1 -1
  194. package/build/component/driver/deploy/spfx/deployDriver.js +27 -5
  195. package/build/component/driver/deploy/spfx/deployDriver.js.map +1 -1
  196. package/build/component/driver/devTool/installDriver.d.ts +1 -0
  197. package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
  198. package/build/component/driver/devTool/installDriver.js +33 -11
  199. package/build/component/driver/devTool/installDriver.js.map +1 -1
  200. package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts +1 -0
  201. package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts.map +1 -1
  202. package/build/component/driver/file/createOrUpdateEnvironmentFile.js +12 -18
  203. package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
  204. package/build/component/driver/file/createOrUpdateJsonFile.d.ts +1 -0
  205. package/build/component/driver/file/createOrUpdateJsonFile.d.ts.map +1 -1
  206. package/build/component/driver/file/createOrUpdateJsonFile.js +5 -11
  207. package/build/component/driver/file/createOrUpdateJsonFile.js.map +1 -1
  208. package/build/component/driver/interface/stepDriver.d.ts +2 -7
  209. package/build/component/driver/interface/stepDriver.d.ts.map +1 -1
  210. package/build/component/driver/m365/acquire.d.ts +1 -0
  211. package/build/component/driver/m365/acquire.d.ts.map +1 -1
  212. package/build/component/driver/m365/acquire.js +6 -12
  213. package/build/component/driver/m365/acquire.js.map +1 -1
  214. package/build/component/driver/script/baseBuildDriver.d.ts.map +1 -1
  215. package/build/component/driver/script/baseBuildDriver.js +1 -0
  216. package/build/component/driver/script/baseBuildDriver.js.map +1 -1
  217. package/build/component/driver/script/baseBuildStepDriver.d.ts +0 -2
  218. package/build/component/driver/script/baseBuildStepDriver.d.ts.map +1 -1
  219. package/build/component/driver/script/baseBuildStepDriver.js +0 -4
  220. package/build/component/driver/script/baseBuildStepDriver.js.map +1 -1
  221. package/build/component/driver/script/dotnetBuildDriver.d.ts +0 -2
  222. package/build/component/driver/script/dotnetBuildDriver.d.ts.map +1 -1
  223. package/build/component/driver/script/dotnetBuildDriver.js +0 -9
  224. package/build/component/driver/script/dotnetBuildDriver.js.map +1 -1
  225. package/build/component/driver/script/npmBuildDriver.d.ts +0 -2
  226. package/build/component/driver/script/npmBuildDriver.d.ts.map +1 -1
  227. package/build/component/driver/script/npmBuildDriver.js +0 -9
  228. package/build/component/driver/script/npmBuildDriver.js.map +1 -1
  229. package/build/component/driver/script/npxBuildDriver.d.ts +0 -2
  230. package/build/component/driver/script/npxBuildDriver.d.ts.map +1 -1
  231. package/build/component/driver/script/npxBuildDriver.js +0 -9
  232. package/build/component/driver/script/npxBuildDriver.js.map +1 -1
  233. package/build/component/driver/script/scriptDriver.d.ts +10 -1
  234. package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
  235. package/build/component/driver/script/scriptDriver.js +31 -30
  236. package/build/component/driver/script/scriptDriver.js.map +1 -1
  237. package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
  238. package/build/component/driver/teamsApp/appStudio.js +11 -11
  239. package/build/component/driver/teamsApp/appStudio.js.map +1 -1
  240. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +5 -5
  241. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
  242. package/build/component/driver/teamsApp/clients/appStudioClient.js +31 -11
  243. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  244. package/build/component/driver/teamsApp/clients/authSvcClient.d.ts.map +1 -1
  245. package/build/component/driver/teamsApp/clients/authSvcClient.js +2 -0
  246. package/build/component/driver/teamsApp/clients/authSvcClient.js.map +1 -1
  247. package/build/component/driver/teamsApp/configure.d.ts +1 -1
  248. package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
  249. package/build/component/driver/teamsApp/configure.js +5 -23
  250. package/build/component/driver/teamsApp/configure.js.map +1 -1
  251. package/build/component/driver/teamsApp/constants.d.ts +0 -1
  252. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  253. package/build/component/driver/teamsApp/constants.js +1 -2
  254. package/build/component/driver/teamsApp/constants.js.map +1 -1
  255. package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts +1 -2
  256. package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts.map +1 -1
  257. package/build/component/driver/teamsApp/copyAppPackageToSPFx.js +4 -11
  258. package/build/component/driver/teamsApp/copyAppPackageToSPFx.js.map +1 -1
  259. package/build/component/driver/teamsApp/create.d.ts +1 -1
  260. package/build/component/driver/teamsApp/create.d.ts.map +1 -1
  261. package/build/component/driver/teamsApp/create.js +6 -11
  262. package/build/component/driver/teamsApp/create.js.map +1 -1
  263. package/build/component/driver/teamsApp/createAppPackage.d.ts +4 -3
  264. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  265. package/build/component/driver/teamsApp/createAppPackage.js +68 -32
  266. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  267. package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
  268. package/build/component/driver/teamsApp/errors.js +2 -0
  269. package/build/component/driver/teamsApp/errors.js.map +1 -1
  270. package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtension.d.ts +2 -0
  271. package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtension.d.ts.map +1 -1
  272. package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtensionCommand.d.ts +1 -0
  273. package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtensionCommand.d.ts.map +1 -1
  274. package/build/component/driver/teamsApp/publishAppPackage.d.ts +1 -1
  275. package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
  276. package/build/component/driver/teamsApp/publishAppPackage.js +4 -12
  277. package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
  278. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +8 -2
  279. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
  280. package/build/component/driver/teamsApp/utils/ManifestUtils.js +24 -4
  281. package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
  282. package/build/component/driver/teamsApp/utils/telemetry.d.ts +1 -0
  283. package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
  284. package/build/component/driver/teamsApp/utils/telemetry.js +1 -0
  285. package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
  286. package/build/component/driver/teamsApp/utils/utils.d.ts +2 -3
  287. package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
  288. package/build/component/driver/teamsApp/utils/utils.js +21 -19
  289. package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
  290. package/build/component/driver/teamsApp/validate.d.ts +1 -1
  291. package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
  292. package/build/component/driver/teamsApp/validate.js +17 -12
  293. package/build/component/driver/teamsApp/validate.js.map +1 -1
  294. package/build/component/driver/teamsApp/validateAppPackage.d.ts +1 -1
  295. package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
  296. package/build/component/driver/teamsApp/validateAppPackage.js +22 -18
  297. package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
  298. package/build/component/error/componentError.d.ts +2 -1
  299. package/build/component/error/componentError.d.ts.map +1 -1
  300. package/build/component/error/componentError.js +8 -4
  301. package/build/component/error/componentError.js.map +1 -1
  302. package/build/component/feature/collaboration.d.ts.map +1 -1
  303. package/build/component/feature/collaboration.js +55 -26
  304. package/build/component/feature/collaboration.js.map +1 -1
  305. package/build/component/feature/createAuthFiles.js.map +1 -1
  306. package/build/component/generator/copilotPlugin/generator.d.ts +7 -2
  307. package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
  308. package/build/component/generator/copilotPlugin/generator.js +133 -25
  309. package/build/component/generator/copilotPlugin/generator.js.map +1 -1
  310. package/build/component/generator/copilotPlugin/helper.d.ts +12 -12
  311. package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
  312. package/build/component/generator/copilotPlugin/helper.js +214 -28
  313. package/build/component/generator/copilotPlugin/helper.js.map +1 -1
  314. package/build/component/generator/error.d.ts +7 -1
  315. package/build/component/generator/error.d.ts.map +1 -1
  316. package/build/component/generator/error.js +15 -3
  317. package/build/component/generator/error.js.map +1 -1
  318. package/build/component/generator/generator.d.ts.map +1 -1
  319. package/build/component/generator/generator.js +31 -22
  320. package/build/component/generator/generator.js.map +1 -1
  321. package/build/component/generator/generatorAction.d.ts +2 -1
  322. package/build/component/generator/generatorAction.d.ts.map +1 -1
  323. package/build/component/generator/generatorAction.js +12 -5
  324. package/build/component/generator/generatorAction.js.map +1 -1
  325. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  326. package/build/component/generator/officeAddin/generator.js +9 -1
  327. package/build/component/generator/officeAddin/generator.js.map +1 -1
  328. package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
  329. package/build/component/generator/officeAddin/helperMethods.js +9 -5
  330. package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
  331. package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts +1 -1
  332. package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +1 -1
  333. package/build/component/generator/spfx/depsChecker/generatorChecker.js +12 -12
  334. package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
  335. package/build/component/generator/spfx/depsChecker/yoChecker.d.ts +1 -1
  336. package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +1 -1
  337. package/build/component/generator/spfx/depsChecker/yoChecker.js +10 -10
  338. package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
  339. package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
  340. package/build/component/generator/spfx/spfxGenerator.js +16 -14
  341. package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
  342. package/build/component/generator/spfx/utils/constants.d.ts +1 -0
  343. package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
  344. package/build/component/generator/spfx/utils/constants.js +1 -0
  345. package/build/component/generator/spfx/utils/constants.js.map +1 -1
  346. package/build/component/generator/spfx/utils/utils.js +3 -3
  347. package/build/component/generator/spfx/utils/utils.js.map +1 -1
  348. package/build/component/generator/utils.d.ts +12 -4
  349. package/build/component/generator/utils.d.ts.map +1 -1
  350. package/build/component/generator/utils.js +17 -16
  351. package/build/component/generator/utils.js.map +1 -1
  352. package/build/component/messages.d.ts +2 -3
  353. package/build/component/messages.d.ts.map +1 -1
  354. package/build/component/messages.js +3 -4
  355. package/build/component/messages.js.map +1 -1
  356. package/build/component/middleware/actionExecutionMW.d.ts +2 -2
  357. package/build/component/middleware/actionExecutionMW.d.ts.map +1 -1
  358. package/build/component/middleware/envMW.js +1 -1
  359. package/build/component/middleware/envMW.js.map +1 -1
  360. package/build/component/middleware/questionMW.d.ts +2 -2
  361. package/build/component/middleware/questionMW.d.ts.map +1 -1
  362. package/build/component/middleware/questionMW.js +7 -11
  363. package/build/component/middleware/questionMW.js.map +1 -1
  364. package/build/component/migrate.js.map +1 -1
  365. package/build/component/provisionUtils.d.ts +3 -3
  366. package/build/component/provisionUtils.d.ts.map +1 -1
  367. package/build/component/provisionUtils.js +3 -3
  368. package/build/component/provisionUtils.js.map +1 -1
  369. package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
  370. package/build/component/resource/botService/appStudio/appStudioClient.js +24 -2
  371. package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
  372. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts +2 -2
  373. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts.map +1 -1
  374. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js +6 -1
  375. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js.map +1 -1
  376. package/build/component/telemetry.d.ts.map +1 -1
  377. package/build/component/telemetry.js +3 -6
  378. package/build/component/telemetry.js.map +1 -1
  379. package/build/component/utils/ResourceGroupHelper.d.ts +2 -2
  380. package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
  381. package/build/component/utils/ResourceGroupHelper.js +1 -4
  382. package/build/component/utils/ResourceGroupHelper.js.map +1 -1
  383. package/build/component/utils/azureResourceOperation.js +2 -2
  384. package/build/component/utils/azureResourceOperation.js.map +1 -1
  385. package/build/component/utils/charsetUtils.js +3 -3
  386. package/build/component/utils/charsetUtils.js.map +1 -1
  387. package/build/component/utils/common.d.ts +1 -1
  388. package/build/component/utils/common.d.ts.map +1 -1
  389. package/build/component/utils/common.js +4 -5
  390. package/build/component/utils/common.js.map +1 -1
  391. package/build/component/utils/depsChecker/cpUtils.d.ts.map +1 -1
  392. package/build/component/utils/depsChecker/cpUtils.js +8 -4
  393. package/build/component/utils/depsChecker/cpUtils.js.map +1 -1
  394. package/build/component/utils/envUtil.js +2 -2
  395. package/build/component/utils/envUtil.js.map +1 -1
  396. package/build/component/utils/metadataUtil.d.ts +3 -0
  397. package/build/component/utils/metadataUtil.d.ts.map +1 -1
  398. package/build/component/utils/metadataUtil.js +16 -4
  399. package/build/component/utils/metadataUtil.js.map +1 -1
  400. package/build/component/utils/teamsFxTelemetryReporter.d.ts.map +1 -1
  401. package/build/component/utils/teamsFxTelemetryReporter.js +3 -6
  402. package/build/component/utils/teamsFxTelemetryReporter.js.map +1 -1
  403. package/build/component/utils.js.map +1 -1
  404. package/build/core/FxCore.d.ts +44 -33
  405. package/build/core/FxCore.d.ts.map +1 -1
  406. package/build/core/FxCore.js +821 -64
  407. package/build/core/FxCore.js.map +1 -1
  408. package/build/core/collaborator.d.ts +1 -1
  409. package/build/core/collaborator.d.ts.map +1 -1
  410. package/build/core/collaborator.js +16 -10
  411. package/build/core/collaborator.js.map +1 -1
  412. package/build/core/error.d.ts +6 -0
  413. package/build/core/error.d.ts.map +1 -1
  414. package/build/core/error.js +23 -1
  415. package/build/core/error.js.map +1 -1
  416. package/build/core/globalVars.d.ts +16 -0
  417. package/build/core/globalVars.d.ts.map +1 -1
  418. package/build/core/globalVars.js +34 -1
  419. package/build/core/globalVars.js.map +1 -1
  420. package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
  421. package/build/core/middleware/concurrentLocker.js +7 -3
  422. package/build/core/middleware/concurrentLocker.js.map +1 -1
  423. package/build/core/middleware/errorHandler.d.ts +2 -0
  424. package/build/core/middleware/errorHandler.d.ts.map +1 -1
  425. package/build/core/middleware/errorHandler.js +16 -25
  426. package/build/core/middleware/errorHandler.js.map +1 -1
  427. package/build/core/middleware/projectMigratorV3.d.ts +7 -1
  428. package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
  429. package/build/core/middleware/projectMigratorV3.js +35 -34
  430. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  431. package/build/core/middleware/projectVersionChecker.js +8 -8
  432. package/build/core/middleware/projectVersionChecker.js.map +1 -1
  433. package/build/core/middleware/utils/appYmlGenerator.d.ts.map +1 -1
  434. package/build/core/middleware/utils/appYmlGenerator.js +2 -1
  435. package/build/core/middleware/utils/appYmlGenerator.js.map +1 -1
  436. package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts.map +1 -1
  437. package/build/core/middleware/utils/debug/appLocalYmlGenerator.js +3 -2
  438. package/build/core/middleware/utils/debug/appLocalYmlGenerator.js.map +1 -1
  439. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
  440. package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +1 -1
  441. package/build/core/middleware/utils/debug/taskMigrator.js +33 -15
  442. package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
  443. package/build/core/middleware/utils/migrationContext.d.ts +1 -0
  444. package/build/core/middleware/utils/migrationContext.d.ts.map +1 -1
  445. package/build/core/middleware/utils/migrationContext.js.map +1 -1
  446. package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
  447. package/build/core/middleware/utils/v3MigrationUtils.js +6 -2
  448. package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
  449. package/build/error/common.d.ts +10 -4
  450. package/build/error/common.d.ts.map +1 -1
  451. package/build/error/common.js +132 -24
  452. package/build/error/common.js.map +1 -1
  453. package/build/index.d.ts +4 -1
  454. package/build/index.d.ts.map +1 -1
  455. package/build/index.js +5 -1
  456. package/build/index.js.map +1 -1
  457. package/build/question/constants.d.ts +6 -0
  458. package/build/question/constants.d.ts.map +1 -0
  459. package/build/question/constants.js +18 -0
  460. package/build/question/constants.js.map +1 -0
  461. package/build/question/create.d.ts +19 -21
  462. package/build/question/create.d.ts.map +1 -1
  463. package/build/question/create.js +454 -344
  464. package/build/question/create.js.map +1 -1
  465. package/build/question/generator.d.ts +4 -0
  466. package/build/question/generator.d.ts.map +1 -0
  467. package/build/question/generator.js +365 -0
  468. package/build/question/generator.js.map +1 -0
  469. package/build/question/index.d.ts +19 -30
  470. package/build/question/index.d.ts.map +1 -1
  471. package/build/question/index.js +14 -47
  472. package/build/question/index.js.map +1 -1
  473. package/build/question/inputs/CreateEnvInputs.d.ts +14 -0
  474. package/build/question/inputs/CreateEnvInputs.d.ts.map +1 -0
  475. package/build/question/inputs/CreateEnvInputs.js +5 -0
  476. package/build/question/inputs/CreateEnvInputs.js.map +1 -0
  477. package/build/question/inputs/CreateProjectInputs.d.ts +38 -0
  478. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -0
  479. package/build/question/inputs/CreateProjectInputs.js +5 -0
  480. package/build/question/inputs/CreateProjectInputs.js.map +1 -0
  481. package/build/question/inputs/CreateSampleProjectInputs.d.ts +12 -0
  482. package/build/question/inputs/CreateSampleProjectInputs.d.ts.map +1 -0
  483. package/build/question/inputs/CreateSampleProjectInputs.js +5 -0
  484. package/build/question/inputs/CreateSampleProjectInputs.js.map +1 -0
  485. package/build/question/inputs/DeployAadManifestInputs.d.ts +14 -0
  486. package/build/question/inputs/DeployAadManifestInputs.d.ts.map +1 -0
  487. package/build/question/inputs/DeployAadManifestInputs.js +5 -0
  488. package/build/question/inputs/DeployAadManifestInputs.js.map +1 -0
  489. package/build/question/inputs/PermissionGrantInputs.d.ts +18 -0
  490. package/build/question/inputs/PermissionGrantInputs.d.ts.map +1 -0
  491. package/build/question/inputs/PermissionGrantInputs.js +5 -0
  492. package/build/question/inputs/PermissionGrantInputs.js.map +1 -0
  493. package/build/question/inputs/PermissionListInputs.d.ts +16 -0
  494. package/build/question/inputs/PermissionListInputs.d.ts.map +1 -0
  495. package/build/question/inputs/PermissionListInputs.js +5 -0
  496. package/build/question/inputs/PermissionListInputs.js.map +1 -0
  497. package/build/question/inputs/PreviewTeamsAppInputs.d.ts +14 -0
  498. package/build/question/inputs/PreviewTeamsAppInputs.d.ts.map +1 -0
  499. package/build/question/inputs/PreviewTeamsAppInputs.js +5 -0
  500. package/build/question/inputs/PreviewTeamsAppInputs.js.map +1 -0
  501. package/build/question/inputs/SPFxAddWebpartInputs.d.ts +18 -0
  502. package/build/question/inputs/SPFxAddWebpartInputs.d.ts.map +1 -0
  503. package/build/question/inputs/SPFxAddWebpartInputs.js +5 -0
  504. package/build/question/inputs/SPFxAddWebpartInputs.js.map +1 -0
  505. package/build/question/inputs/SelectTeamsManifestInputs.d.ts +12 -0
  506. package/build/question/inputs/SelectTeamsManifestInputs.d.ts.map +1 -0
  507. package/build/question/inputs/SelectTeamsManifestInputs.js +5 -0
  508. package/build/question/inputs/SelectTeamsManifestInputs.js.map +1 -0
  509. package/build/question/inputs/ValidateTeamsAppInputs.d.ts +14 -0
  510. package/build/question/inputs/ValidateTeamsAppInputs.d.ts.map +1 -0
  511. package/build/question/inputs/ValidateTeamsAppInputs.js +5 -0
  512. package/build/question/inputs/ValidateTeamsAppInputs.js.map +1 -0
  513. package/build/question/inputs/index.d.ts +11 -0
  514. package/build/question/inputs/index.d.ts.map +1 -0
  515. package/build/question/inputs/index.js +16 -0
  516. package/build/question/inputs/index.js.map +1 -0
  517. package/build/question/options/CreateEnvOptions.d.ts +10 -0
  518. package/build/question/options/CreateEnvOptions.d.ts.map +1 -0
  519. package/build/question/options/CreateEnvOptions.js +24 -0
  520. package/build/question/options/CreateEnvOptions.js.map +1 -0
  521. package/build/question/options/CreateProjectOptions.d.ts +10 -0
  522. package/build/question/options/CreateProjectOptions.d.ts.map +1 -0
  523. package/build/question/options/CreateProjectOptions.js +132 -0
  524. package/build/question/options/CreateProjectOptions.js.map +1 -0
  525. package/build/question/options/CreateSampleProjectOptions.d.ts +10 -0
  526. package/build/question/options/CreateSampleProjectOptions.d.ts.map +1 -0
  527. package/build/question/options/CreateSampleProjectOptions.js +52 -0
  528. package/build/question/options/CreateSampleProjectOptions.js.map +1 -0
  529. package/build/question/options/DeployAadManifestOptions.d.ts +10 -0
  530. package/build/question/options/DeployAadManifestOptions.d.ts.map +1 -0
  531. package/build/question/options/DeployAadManifestOptions.js +21 -0
  532. package/build/question/options/DeployAadManifestOptions.js.map +1 -0
  533. package/build/question/options/PermissionGrantOptions.d.ts +10 -0
  534. package/build/question/options/PermissionGrantOptions.d.ts.map +1 -0
  535. package/build/question/options/PermissionGrantOptions.js +33 -0
  536. package/build/question/options/PermissionGrantOptions.js.map +1 -0
  537. package/build/question/options/PermissionListOptions.d.ts +10 -0
  538. package/build/question/options/PermissionListOptions.d.ts.map +1 -0
  539. package/build/question/options/PermissionListOptions.js +28 -0
  540. package/build/question/options/PermissionListOptions.js.map +1 -0
  541. package/build/question/options/PreviewTeamsAppOptions.d.ts +10 -0
  542. package/build/question/options/PreviewTeamsAppOptions.d.ts.map +1 -0
  543. package/build/question/options/PreviewTeamsAppOptions.js +26 -0
  544. package/build/question/options/PreviewTeamsAppOptions.js.map +1 -0
  545. package/build/question/options/SPFxAddWebpartOptions.d.ts +10 -0
  546. package/build/question/options/SPFxAddWebpartOptions.d.ts.map +1 -0
  547. package/build/question/options/SPFxAddWebpartOptions.js +39 -0
  548. package/build/question/options/SPFxAddWebpartOptions.js.map +1 -0
  549. package/build/question/options/SelectTeamsManifestOptions.d.ts +10 -0
  550. package/build/question/options/SelectTeamsManifestOptions.d.ts.map +1 -0
  551. package/build/question/options/SelectTeamsManifestOptions.js +17 -0
  552. package/build/question/options/SelectTeamsManifestOptions.js.map +1 -0
  553. package/build/question/options/ValidateTeamsAppOptions.d.ts +10 -0
  554. package/build/question/options/ValidateTeamsAppOptions.d.ts.map +1 -0
  555. package/build/question/options/ValidateTeamsAppOptions.js +23 -0
  556. package/build/question/options/ValidateTeamsAppOptions.js.map +1 -0
  557. package/build/question/options/index.d.ts +11 -0
  558. package/build/question/options/index.d.ts.map +1 -0
  559. package/build/question/options/index.js +16 -0
  560. package/build/question/options/index.js.map +1 -0
  561. package/build/question/other.d.ts +12 -1
  562. package/build/question/other.d.ts.map +1 -1
  563. package/build/question/other.js +129 -31
  564. package/build/question/other.js.map +1 -1
  565. package/build/question/questionNames.d.ts +6 -2
  566. package/build/question/questionNames.d.ts.map +1 -1
  567. package/build/question/questionNames.js +8 -3
  568. package/build/question/questionNames.js.map +1 -1
  569. package/build/ui/validationUtils.d.ts +31 -0
  570. package/build/ui/validationUtils.d.ts.map +1 -0
  571. package/build/ui/validationUtils.js +297 -0
  572. package/build/ui/validationUtils.js.map +1 -0
  573. package/build/ui/visitor.d.ts +13 -1
  574. package/build/ui/visitor.d.ts.map +1 -1
  575. package/build/ui/visitor.js +264 -215
  576. package/build/ui/visitor.js.map +1 -1
  577. package/package.json +21 -14
  578. package/resource/package.nls.json +59 -18
  579. package/resource/yaml-schema/v1.2/yaml.schema.json +1474 -0
  580. package/templates/fallback/common.zip +0 -0
  581. package/templates/fallback/csharp.zip +0 -0
  582. package/templates/fallback/js.zip +0 -0
  583. package/templates/fallback/ts.zip +0 -0
  584. package/templates/plugins/resource/aad/auth/V3/Tab/GetUserProfile.razor +1 -2
  585. package/templates/plugins/resource/aad/auth/bot/README.md +281 -263
  586. package/templates/plugins/resource/aad/auth/bot/js/sso/handleMessageExtensionQueryWithToken.js +13 -3
  587. package/templates/plugins/resource/aad/auth/bot/js/sso/profileSsoCommandHandler.js +14 -5
  588. package/templates/plugins/resource/aad/auth/bot/ts/sso/handleMessageExtensionQueryWithToken.ts +11 -3
  589. package/templates/plugins/resource/aad/auth/bot/ts/sso/profileSsoCommandHandler.ts +12 -3
  590. package/templates/plugins/resource/aad/auth/tab/csharp/GetUserProfile.razor +1 -2
  591. package/build/common/samples-config-v3.json +0 -233
  592. package/build/component/configManager/diagnostic.d.ts +0 -9
  593. package/build/component/configManager/diagnostic.d.ts.map +0 -1
  594. package/build/component/configManager/diagnostic.js +0 -49
  595. package/build/component/configManager/diagnostic.js.map +0 -1
  596. package/build/component/driver/middleware/updateProgress.d.ts +0 -6
  597. package/build/component/driver/middleware/updateProgress.d.ts.map +0 -1
  598. package/build/component/driver/middleware/updateProgress.js +0 -15
  599. package/build/component/driver/middleware/updateProgress.js.map +0 -1
  600. package/build/core/FxCoreImplementV3.d.ts +0 -44
  601. package/build/core/FxCoreImplementV3.d.ts.map +0 -1
  602. package/build/core/FxCoreImplementV3.js +0 -663
  603. package/build/core/FxCoreImplementV3.js.map +0 -1
@@ -16,45 +16,153 @@ const telemetryEvents_1 = require("../spfx/utils/telemetryEvents");
16
16
  const specParser_1 = require("../../../common/spec-parser/specParser");
17
17
  const questionNames_1 = require("../../../question/questionNames");
18
18
  const helper_1 = require("./helper");
19
- const componentName = "copilot-plugin-existing-api";
20
- const templateName = "copilot-plugin-existing-api";
21
- const appPackageName = "appPackage";
22
- const manifestFileName = "manifest.json";
23
- const adaptiveFolderName = "adaptiveCards";
24
- const apiSpecFolderName = "apiSpecFiles";
25
- const apiSpecFileName = "openapi.yaml";
19
+ const interfaces_1 = require("../../../common/spec-parser/interfaces");
20
+ const localizeUtils_1 = require("../../../common/localizeUtils");
21
+ const ManifestUtils_1 = require("../../driver/teamsApp/utils/ManifestUtils");
22
+ const create_1 = require("../../../question/create");
23
+ const fs = tslib_1.__importStar(require("fs-extra"));
24
+ const error_1 = require("../../../error");
25
+ const utils_1 = require("../../../common/spec-parser/utils");
26
+ const constants_1 = require("../../../common/spec-parser/constants");
27
+ const util = tslib_1.__importStar(require("util"));
28
+ const specParserError_1 = require("../../../common/spec-parser/specParserError");
29
+ const fromApiSpeccomponentName = "copilot-plugin-existing-api";
30
+ const fromApiSpecTemplateName = "copilot-plugin-existing-api";
31
+ const fromOpenAIPlugincomponentName = "copilot-plugin-from-oai-plugin";
32
+ const fromOpenAIPluginTemplateName = "copilot-plugin-from-oai-plugin";
33
+ const apiSpecFolderName = "apiSpecificationFiles";
34
+ const apiSpecYamlFileName = "openapi.yaml";
35
+ const apiSpecJsonFileName = "openapi.json";
36
+ const invalidApiSpecErrorName = "invalid-api-spec";
26
37
  class CopilotPluginGenerator {
27
- static async generate(context, inputs, destinationPath) {
38
+ static async generateFromApiSpec(context, inputs, destinationPath) {
39
+ return await this.generateForME(context, inputs, destinationPath, fromApiSpecTemplateName, fromApiSpeccomponentName);
40
+ }
41
+ static async generateFromOpenAIPlugin(context, inputs, destinationPath) {
42
+ return await this.generateForME(context, inputs, destinationPath, fromOpenAIPluginTemplateName, fromOpenAIPlugincomponentName);
43
+ }
44
+ static async generateForME(context, inputs, destinationPath, templateName, componentName) {
28
45
  var _a, _b;
29
- // download template
30
- const templateRes = await generator_1.Generator.generateTemplate(context, destinationPath, templateName, undefined, undefined);
31
- if (templateRes.isErr())
32
- return teamsfx_api_1.err(templateRes.error);
33
- const url = (_a = inputs[questionNames_1.QuestionNames.ApiSpecLocation]) !== null && _a !== void 0 ? _a : (_b = inputs.openAIPluginManifest) === null || _b === void 0 ? void 0 : _b.api.url;
34
- const specParser = new specParser_1.SpecParser(url);
35
- const manifestPath = path_1.default.join(destinationPath, appPackageName, manifestFileName);
36
- const filters = inputs[questionNames_1.QuestionNames.ApiOperation];
37
- const openapiSpecPath = path_1.default.join(destinationPath, apiSpecFolderName, apiSpecFileName);
38
- await specParser.generate(manifestPath, filters, openapiSpecPath, adaptiveFolderName);
39
- if (inputs.openAIPluginManifest) {
40
- await helper_1.OpenAIManifestHelper.updateManifest(inputs.openAIPluginManifest, manifestPath);
46
+ try {
47
+ const appName = inputs[questionNames_1.QuestionNames.AppName];
48
+ const language = inputs[questionNames_1.QuestionNames.ProgrammingLanguage];
49
+ const safeProjectNameFromVS = language === "csharp" ? inputs[questionNames_1.QuestionNames.SafeProjectName] : undefined;
50
+ context.templateVariables = generator_1.Generator.getDefaultVariables(appName, safeProjectNameFromVS);
51
+ const filters = inputs[questionNames_1.QuestionNames.ApiOperation];
52
+ // download template
53
+ const templateRes = await generator_1.Generator.generateTemplate(context, destinationPath, templateName, language === create_1.ProgrammingLanguage.CSharp ? create_1.ProgrammingLanguage.CSharp : undefined);
54
+ if (templateRes.isErr())
55
+ return teamsfx_api_1.err(templateRes.error);
56
+ const url = (_a = inputs[questionNames_1.QuestionNames.ApiSpecLocation]) !== null && _a !== void 0 ? _a : (_b = inputs.openAIPluginManifest) === null || _b === void 0 ? void 0 : _b.api.url;
57
+ // validate API spec
58
+ const specParser = new specParser_1.SpecParser(url);
59
+ const validationRes = await specParser.validate();
60
+ const warnings = validationRes.warnings;
61
+ const operationIdWarning = warnings.find((w) => w.type === interfaces_1.WarningType.OperationIdMissing);
62
+ if (operationIdWarning && operationIdWarning.data) {
63
+ const apisMissingOperationId = operationIdWarning.data.filter((api) => filters.includes(api));
64
+ if (apisMissingOperationId.length > 0) {
65
+ operationIdWarning.content = util.format(constants_1.ConstantString.MissingOperationId, apisMissingOperationId.join(", "));
66
+ delete operationIdWarning.data;
67
+ }
68
+ else {
69
+ warnings.splice(warnings.indexOf(operationIdWarning), 1);
70
+ }
71
+ }
72
+ if (validationRes.status === interfaces_1.ValidationStatus.Error) {
73
+ helper_1.logValidationResults(validationRes.errors, warnings, context, true, false, true);
74
+ const errorMessage = inputs.platform === teamsfx_api_1.Platform.VSCode
75
+ ? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.vscode.message")
76
+ : localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.message");
77
+ return teamsfx_api_1.err(new teamsfx_api_1.UserError(componentName, invalidApiSpecErrorName, errorMessage, errorMessage));
78
+ }
79
+ // generate files
80
+ const manifestPath = path_1.default.join(destinationPath, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ManifestTemplateFileName);
81
+ const apiSpecFolderPath = path_1.default.join(destinationPath, teamsfx_api_1.AppPackageFolderName, apiSpecFolderName);
82
+ await fs.ensureDir(apiSpecFolderPath);
83
+ let isYaml;
84
+ try {
85
+ isYaml = await utils_1.isYamlSpecFile(url);
86
+ }
87
+ catch (e) {
88
+ isYaml = false;
89
+ }
90
+ const openapiSpecPath = path_1.default.join(apiSpecFolderPath, isYaml ? apiSpecYamlFileName : apiSpecJsonFileName);
91
+ const adaptiveCardFolder = path_1.default.join(destinationPath, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.AdaptiveFolderName);
92
+ const generateResult = await specParser.generate(manifestPath, filters, openapiSpecPath, adaptiveCardFolder);
93
+ if (generateResult.warnings.length > 0) {
94
+ warnings.push(...generateResult.warnings);
95
+ }
96
+ // update manifest based on openAI plugin manifest
97
+ const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(manifestPath);
98
+ if (manifestRes.isErr()) {
99
+ return teamsfx_api_1.err(manifestRes.error);
100
+ }
101
+ const teamsManifest = manifestRes.value;
102
+ if (inputs.openAIPluginManifest) {
103
+ const updateManifestRes = await helper_1.OpenAIPluginManifestHelper.updateManifest(inputs.openAIPluginManifest, teamsManifest, manifestPath);
104
+ if (updateManifestRes.isErr())
105
+ return teamsfx_api_1.err(updateManifestRes.error);
106
+ }
107
+ // log warnings
108
+ if (inputs.platform === teamsfx_api_1.Platform.CLI || inputs.platform === teamsfx_api_1.Platform.VS) {
109
+ const warnSummary = helper_1.generateScaffoldingSummary(warnings, teamsManifest, destinationPath);
110
+ if (warnSummary) {
111
+ void context.logProvider.info(warnSummary);
112
+ }
113
+ }
114
+ if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
115
+ return teamsfx_api_1.ok({
116
+ warnings: warnings.map((warning) => {
117
+ return {
118
+ type: warning.type,
119
+ content: warning.content,
120
+ data: warning.data,
121
+ };
122
+ }),
123
+ });
124
+ }
125
+ else {
126
+ return teamsfx_api_1.ok({ warnings: undefined });
127
+ }
128
+ }
129
+ catch (e) {
130
+ let error;
131
+ if (e instanceof specParserError_1.SpecParserError) {
132
+ error = helper_1.convertSpecParserErrorToFxError(e);
133
+ }
134
+ else {
135
+ error = error_1.assembleError(e);
136
+ }
137
+ return teamsfx_api_1.err(error);
41
138
  }
42
- // TODO: log warnings
43
- return teamsfx_api_1.ok(undefined);
44
139
  }
45
140
  }
46
141
  tslib_1.__decorate([
47
142
  lib_1.hooks([
48
143
  actionExecutionMW_1.ActionExecutionMW({
49
144
  enableTelemetry: true,
50
- telemetryComponentName: componentName,
145
+ telemetryComponentName: fromApiSpeccomponentName,
146
+ telemetryEventName: telemetryEvents_1.TelemetryEvents.Generate,
147
+ errorSource: fromApiSpeccomponentName,
148
+ }),
149
+ ]),
150
+ tslib_1.__metadata("design:type", Function),
151
+ tslib_1.__metadata("design:paramtypes", [Object, Object, String]),
152
+ tslib_1.__metadata("design:returntype", Promise)
153
+ ], CopilotPluginGenerator, "generateFromApiSpec", null);
154
+ tslib_1.__decorate([
155
+ lib_1.hooks([
156
+ actionExecutionMW_1.ActionExecutionMW({
157
+ enableTelemetry: true,
158
+ telemetryComponentName: fromOpenAIPlugincomponentName,
51
159
  telemetryEventName: telemetryEvents_1.TelemetryEvents.Generate,
52
- errorSource: componentName,
160
+ errorSource: fromOpenAIPlugincomponentName,
53
161
  }),
54
162
  ]),
55
163
  tslib_1.__metadata("design:type", Function),
56
164
  tslib_1.__metadata("design:paramtypes", [Object, Object, String]),
57
165
  tslib_1.__metadata("design:returntype", Promise)
58
- ], CopilotPluginGenerator, "generate", null);
166
+ ], CopilotPluginGenerator, "generateFromOpenAIPlugin", null);
59
167
  exports.CopilotPluginGenerator = CopilotPluginGenerator;
60
168
  //# sourceMappingURL=generator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/generator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AAEH,+CAA8C;AAC9C,wDAAmF;AACnF,4CAAyC;AACzC,wDAAwB;AACxB,0EAAuE;AACvE,mEAAgE;AAChE,uEAAoE;AACpE,mEAAgE;AAChE,qCAAgD;AAEhD,MAAM,aAAa,GAAG,6BAA6B,CAAC;AACpD,MAAM,YAAY,GAAG,6BAA6B,CAAC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,CAAC,CAAC;IACvB,CAAC;CACF;AA7BC;IARC,WAAK,CAAC;QACL,qCAAiB,CAAC;YAChB,eAAe,EAAE,IAAI;YACrB,sBAAsB,EAAE,aAAa;YACrC,kBAAkB,EAAE,iCAAe,CAAC,QAAQ;YAC5C,WAAW,EAAE,aAAa;SAC3B,CAAC;KACH,CAAC;;;;4CA6BD;AArCH,wDAsCC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/generator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AAEH,+CAA8C;AAC9C,wDAagC;AAChC,4CAAyC;AACzC,wDAAwB;AACxB,0EAAuE;AACvE,mEAAgE;AAChE,uEAAoE;AACpE,mEAAgE;AAChE,qCAKkB;AAClB,uEAAuF;AACvF,iEAAmE;AACnE,6EAA0E;AAC1E,qDAA+D;AAC/D,qDAA+B;AAC/B,0CAA+C;AAC/C,6DAAmE;AACnE,qEAAuE;AACvE,mDAA6B;AAC7B,iFAA8E;AAE9E,MAAM,wBAAwB,GAAG,6BAA6B,CAAC;AAC/D,MAAM,uBAAuB,GAAG,6BAA6B,CAAC;AAC9D,MAAM,6BAA6B,GAAG,gCAAgC,CAAC;AACvE,MAAM,4BAA4B,GAAG,gCAAgC,CAAC;AACtE,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AAClD,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAC3C,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAE3C,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAMnD,MAAa,sBAAsB;IAS1B,MAAM,CAAC,KAAK,CAAC,mBAAmB,CACrC,OAAgB,EAChB,MAAc,EACd,eAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,aAAa,CAC7B,OAAO,EACP,MAAM,EACN,eAAe,EACf,uBAAuB,EACvB,wBAAwB,CACzB,CAAC;IACJ,CAAC;IAUM,MAAM,CAAC,KAAK,CAAC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AAC;QACL,qCAAiB,CAAC;YAChB,eAAe,EAAE,IAAI;YACrB,sBAAsB,EAAE,wBAAwB;YAChD,kBAAkB,EAAE,iCAAe,CAAC,QAAQ;YAC5C,WAAW,EAAE,wBAAwB;SACtC,CAAC;KACH,CAAC;;;;uDAaD;AAUD;IARC,WAAK,CAAC;QACL,qCAAiB,CAAC;YAChB,eAAe,EAAE,IAAI;YACrB,sBAAsB,EAAE,6BAA6B;YACrD,kBAAkB,EAAE,iCAAe,CAAC,QAAQ;YAC5C,WAAW,EAAE,6BAA6B;SAC3C,CAAC;KACH,CAAC;;;;4DAaD;AA3CH,wDA+LC"}
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * @author yuqzho@microsoft.com
3
3
  */
4
- import { Context, OpenAIPluginManifest, Result } from "@microsoft/teamsfx-api";
5
- import { ErrorType as ApiSpecErrorType } from "../../../common/spec-parser/interfaces";
4
+ import { Context, FxError, OpenAIPluginManifest, Result, TeamsAppManifest, ApiOperation, Warning } from "@microsoft/teamsfx-api";
5
+ import { ErrorType as ApiSpecErrorType, WarningResult } from "../../../common/spec-parser/interfaces";
6
+ import { SpecParserError } from "../../../common/spec-parser/specParserError";
6
7
  declare enum OpenAIPluginManifestErrorType {
7
- AuthNotSupported = 0,
8
- ApiUrlMissing = 1
8
+ AuthNotSupported = "openai-pliugin-auth-not-supported",
9
+ ApiUrlMissing = "openai-plugin-api-url-missing"
9
10
  }
10
11
  export interface ErrorResult {
11
12
  /**
@@ -16,15 +17,14 @@ export interface ErrorResult {
16
17
  * The content of the error.
17
18
  */
18
19
  content: string;
19
- /**
20
- * The api path of the error.
21
- */
22
- apiPath?: string;
23
20
  }
24
- export declare class OpenAIManifestHelper {
25
- static loadOpenAIPluginManifest(domain: string): Promise<OpenAIPluginManifest>;
26
- static updateManifest(manifest: OpenAIPluginManifest, manifestPath: string): Promise<void>;
21
+ export declare class OpenAIPluginManifestHelper {
22
+ static loadOpenAIPluginManifest(input: string): Promise<OpenAIPluginManifest>;
23
+ static updateManifest(openAiPluginManifest: OpenAIPluginManifest, teamsAppManifest: TeamsAppManifest, manifestPath: string): Promise<Result<undefined, FxError>>;
27
24
  }
28
- export declare function listOperations(context: Context, manifest: OpenAIPluginManifest | undefined, apiSpecUrl: string | undefined, shouldLogWarning?: boolean): Promise<Result<string[], ErrorResult[]>>;
25
+ export declare function listOperations(context: Context, manifest: OpenAIPluginManifest | undefined, apiSpecUrl: string | undefined, teamsManifestPath: string | undefined, includeExistingAPIs?: boolean, shouldLogWarning?: boolean): Promise<Result<ApiOperation[], ErrorResult[]>>;
26
+ export declare function logValidationResults(errors: ErrorResult[], warnings: WarningResult[], context: Context, isApiSpec: boolean, shouldLogWarning: boolean, shouldSkipTelemetry?: boolean): void;
27
+ export declare function generateScaffoldingSummary(warnings: Warning[], teamsManifest: TeamsAppManifest, projectPath: string): string;
28
+ export declare function convertSpecParserErrorToFxError(error: SpecParserError): FxError;
29
29
  export {};
30
30
  //# sourceMappingURL=helper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/helper.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH,OAAO,EACL,OAAO,EAEP,oBAAoB,EACpB,MAAM,EAGP,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,SAAS,IAAI,gBAAgB,EAE9B,MAAM,wCAAwC,CAAC;AAKhD,aAAK,6BAA6B;IAChC,gBAAgB,IAAA;IAChB,aAAa,IAAA;CACd;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,gBAAgB,GAAG,6BAA6B,CAAC;IAEvD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,oBAAoB;WAClB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;WAQvE,cAAc,CAAC,QAA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G,SAAS,EAC9B,iBAAiB,EAAE,MAAM,GAAG,SAAS,EACrC,mBAAmB,UAAO,EAC1B,gBAAgB,UAAO,GACtB,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,CAsDhD;AAoBD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,WAAW,EAAE,EACrB,QAAQ,EAAE,aAAa,EAAE,EACzB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,OAAO,EAClB,gBAAgB,EAAE,OAAO,EACzB,mBAAmB,UAAQ,GAC1B,IAAI,CAmEN;AA0BD,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,OAAO,EAAE,EACnB,aAAa,EAAE,gBAAgB,EAC/B,WAAW,EAAE,MAAM,GAClB,MAAM,CAqBR;AA2GD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAE/E"}
@@ -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.listOperations = exports.OpenAIManifestHelper = void 0;
5
+ exports.convertSpecParserErrorToFxError = exports.generateScaffoldingSummary = exports.logValidationResults = exports.listOperations = exports.OpenAIPluginManifestHelper = void 0;
6
6
  const tslib_1 = require("tslib");
7
7
  /**
8
8
  * @author yuqzho@microsoft.com
@@ -12,61 +12,247 @@ const axios_1 = tslib_1.__importDefault(require("axios"));
12
12
  const utils_1 = require("../utils");
13
13
  const interfaces_1 = require("../../../common/spec-parser/interfaces");
14
14
  const specParser_1 = require("../../../common/spec-parser/specParser");
15
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
16
+ const localizeUtils_1 = require("../../../common/localizeUtils");
17
+ const error_1 = require("../../../error");
18
+ const os_1 = require("os");
19
+ const constant_1 = require("../../configManager/constant");
20
+ const ManifestUtils_1 = require("../../driver/teamsApp/utils/ManifestUtils");
21
+ const path_1 = tslib_1.__importDefault(require("path"));
22
+ const specParserError_1 = require("../../../common/spec-parser/specParserError");
15
23
  const manifestFilePath = "/.well-known/ai-plugin.json";
24
+ const componentName = "OpenAIPluginManifestHelper";
16
25
  var OpenAIPluginManifestErrorType;
17
26
  (function (OpenAIPluginManifestErrorType) {
18
- OpenAIPluginManifestErrorType[OpenAIPluginManifestErrorType["AuthNotSupported"] = 0] = "AuthNotSupported";
19
- OpenAIPluginManifestErrorType[OpenAIPluginManifestErrorType["ApiUrlMissing"] = 1] = "ApiUrlMissing";
27
+ OpenAIPluginManifestErrorType["AuthNotSupported"] = "openai-pliugin-auth-not-supported";
28
+ OpenAIPluginManifestErrorType["ApiUrlMissing"] = "openai-plugin-api-url-missing";
20
29
  })(OpenAIPluginManifestErrorType || (OpenAIPluginManifestErrorType = {}));
21
- class OpenAIManifestHelper {
22
- static async loadOpenAIPluginManifest(domain) {
23
- const path = domain + manifestFilePath;
24
- const res = await utils_1.sendRequestWithRetry(async () => {
25
- return await axios_1.default.get(path);
26
- }, 3);
27
- return res.data;
30
+ class OpenAIPluginManifestHelper {
31
+ static async loadOpenAIPluginManifest(input) {
32
+ let path = (input.endsWith("/") ? input.substring(0, input.length - 1) : input) + manifestFilePath;
33
+ if (!input.toLowerCase().startsWith("https://") && !input.toLowerCase().startsWith("http://")) {
34
+ path = "https://" + path;
35
+ }
36
+ try {
37
+ const res = await utils_1.sendRequestWithRetry(async () => {
38
+ return await axios_1.default.get(path);
39
+ }, 3);
40
+ return res.data;
41
+ }
42
+ catch (e) {
43
+ throw new teamsfx_api_1.UserError(componentName, "loadOpenAIPluginManifest", localizeUtils_1.getLocalizedString("error.copilotPlugin.openAiPluginManifest.CannotGetManifest", path), localizeUtils_1.getLocalizedString("error.copilotPlugin.openAiPluginManifest.CannotGetManifest", path));
44
+ }
28
45
  }
29
- static async updateManifest(manifest, manifestPath) {
30
- //TODO: implementation
46
+ static async updateManifest(openAiPluginManifest, teamsAppManifest, manifestPath) {
47
+ teamsAppManifest.description.full = openAiPluginManifest.description_for_human;
48
+ teamsAppManifest.description.short = openAiPluginManifest.description_for_human;
49
+ teamsAppManifest.developer.websiteUrl = openAiPluginManifest.legal_info_url;
50
+ teamsAppManifest.developer.privacyUrl = openAiPluginManifest.legal_info_url;
51
+ teamsAppManifest.developer.termsOfUseUrl = openAiPluginManifest.legal_info_url;
52
+ await fs_extra_1.default.writeFile(manifestPath, JSON.stringify(teamsAppManifest, null, "\t"), "utf-8");
53
+ return teamsfx_api_1.ok(undefined);
31
54
  }
32
55
  }
33
- exports.OpenAIManifestHelper = OpenAIManifestHelper;
34
- async function listOperations(context, manifest, apiSpecUrl, shouldLogWarning = true) {
56
+ exports.OpenAIPluginManifestHelper = OpenAIPluginManifestHelper;
57
+ async function listOperations(context, manifest, apiSpecUrl, teamsManifestPath, includeExistingAPIs = true, shouldLogWarning = true) {
35
58
  if (manifest) {
36
- apiSpecUrl = manifest.api.url;
37
59
  const errors = validateOpenAIPluginManifest(manifest);
60
+ logValidationResults(errors, [], context, false, shouldLogWarning);
38
61
  if (errors.length > 0) {
39
62
  return teamsfx_api_1.err(errors);
40
63
  }
64
+ apiSpecUrl = manifest.api.url;
41
65
  }
42
- const specParser = new specParser_1.SpecParser(apiSpecUrl);
43
- const validationRes = await specParser.validate();
44
- if (validationRes.status === interfaces_1.ValidationStatus.Error) {
45
- return teamsfx_api_1.err(validationRes.errors);
66
+ try {
67
+ const specParser = new specParser_1.SpecParser(apiSpecUrl);
68
+ const validationRes = await specParser.validate();
69
+ logValidationResults(validationRes.errors, validationRes.warnings, context, true, shouldLogWarning);
70
+ if (validationRes.status === interfaces_1.ValidationStatus.Error) {
71
+ return teamsfx_api_1.err(validationRes.errors);
72
+ }
73
+ let operations = await specParser.list();
74
+ // Filter out exsiting APIs
75
+ if (!includeExistingAPIs) {
76
+ if (!teamsManifestPath) {
77
+ throw new error_1.MissingRequiredInputError("teamsManifestPath", "inputs");
78
+ }
79
+ const manifest = await ManifestUtils_1.manifestUtils._readAppManifest(teamsManifestPath);
80
+ if (manifest.isOk()) {
81
+ const existingOperationIds = ManifestUtils_1.manifestUtils.getOperationIds(manifest.value);
82
+ const operationMaps = await specParser.listOperationMap();
83
+ const existingOperations = existingOperationIds.map((key) => operationMaps.get(key));
84
+ operations = operations.filter((operation) => !existingOperations.includes(operation));
85
+ }
86
+ else {
87
+ throw manifest.error;
88
+ }
89
+ }
90
+ const sortedOperations = sortOperations(operations);
91
+ return teamsfx_api_1.ok(sortedOperations);
46
92
  }
47
- if (shouldLogWarning && validationRes.warnings.length > 0) {
48
- for (const warning of validationRes.warnings) {
49
- context.logProvider.warning(warning.content);
93
+ catch (e) {
94
+ if (e instanceof specParserError_1.SpecParserError) {
95
+ throw convertSpecParserErrorToFxError(e);
96
+ }
97
+ else {
98
+ throw e;
50
99
  }
51
100
  }
52
- const operations = await specParser.list();
53
- return teamsfx_api_1.ok(operations);
54
101
  }
55
102
  exports.listOperations = listOperations;
103
+ function sortOperations(operations) {
104
+ const operationsWithSeparator = [];
105
+ for (const operation of operations) {
106
+ const arr = operation.toUpperCase().split(" ");
107
+ operationsWithSeparator.push({ id: operation, label: operation, groupName: arr[0] });
108
+ }
109
+ return operationsWithSeparator.sort((operation1, operation2) => {
110
+ const arr1 = operation1.id.toLowerCase().split(" ");
111
+ const arr2 = operation2.id.toLowerCase().split(" ");
112
+ return arr1[0] < arr2[0] ? -1 : arr1[0] > arr2[0] ? 1 : arr1[1].localeCompare(arr2[1]);
113
+ });
114
+ }
115
+ function formatTelemetryValidationProperty(result) {
116
+ return result.type.toString() + ": " + result.content;
117
+ }
118
+ function logValidationResults(errors, warnings, context, isApiSpec, shouldLogWarning, shouldSkipTelemetry = false) {
119
+ if (!shouldSkipTelemetry) {
120
+ context.telemetryReporter.sendTelemetryEvent(isApiSpec ? "validate-api-spec" /* validateApiSpec */ : "validate-openai-plugin-manifest" /* validateOpenAiPluginManifest */, {
121
+ ["validation-status" /* validationStatus */]: errors.length !== 0 ? "error" : warnings.length !== 0 ? "warning" : "success",
122
+ ["validation-errors" /* validationErrors */]: errors
123
+ .map((error) => formatTelemetryValidationProperty(error))
124
+ .join(";"),
125
+ ["validation-warnings" /* validationWarnings */]: warnings
126
+ .map((warn) => formatTelemetryValidationProperty(warn))
127
+ .join(";"),
128
+ });
129
+ }
130
+ if (errors.length === 0 && (warnings.length === 0 || !shouldLogWarning)) {
131
+ return;
132
+ }
133
+ // errors > 0 || (warnings > 0 && shouldLogWarning)
134
+ const errorMessage = errors
135
+ .map((error) => {
136
+ return `${constant_1.SummaryConstant.Failed} ${error.content}`;
137
+ })
138
+ .join(os_1.EOL);
139
+ const warningMessage = shouldLogWarning
140
+ ? warnings
141
+ .map((warning) => {
142
+ return `${constant_1.SummaryConstant.NotExecuted} ${warning.content}`;
143
+ })
144
+ .join(os_1.EOL)
145
+ : "";
146
+ const failed = errors.length;
147
+ const warns = warnings.length;
148
+ const summaryStr = [];
149
+ if (failed > 0) {
150
+ summaryStr.push(localizeUtils_1.getLocalizedString("core.copilotPlugin.validate.summary.validate.failed", failed));
151
+ }
152
+ if (warns > 0 && shouldLogWarning) {
153
+ summaryStr.push(localizeUtils_1.getLocalizedString("core.copilotPlugin.validate.summary.validate.warning", warns));
154
+ }
155
+ const outputMessage = isApiSpec
156
+ ? os_1.EOL +
157
+ localizeUtils_1.getLocalizedString("core.copilotPlugin.validate.apiSpec.summary", summaryStr.join(", "), errorMessage, warningMessage)
158
+ : os_1.EOL +
159
+ localizeUtils_1.getLocalizedString("core.copilotPlugin.validate.openAIPluginManifest.summary", summaryStr.join(", "), errorMessage, warningMessage);
160
+ void context.logProvider.info(outputMessage);
161
+ }
162
+ exports.logValidationResults = logValidationResults;
56
163
  function validateOpenAIPluginManifest(manifest) {
164
+ var _a, _b;
57
165
  const errors = [];
58
- if (!manifest.api.url) {
166
+ if (!((_a = manifest.api) === null || _a === void 0 ? void 0 : _a.url)) {
59
167
  errors.push({
60
168
  type: OpenAIPluginManifestErrorType.ApiUrlMissing,
61
- content: "Missing url in manifest",
169
+ content: localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.validationError.missingApiUrl", "api.url"),
62
170
  });
63
171
  }
64
- if (manifest.auth.type !== teamsfx_api_1.OpenAIManifestAuthType.None) {
172
+ if (((_b = manifest.auth) === null || _b === void 0 ? void 0 : _b.type) !== teamsfx_api_1.OpenAIManifestAuthType.None) {
65
173
  errors.push({
66
174
  type: OpenAIPluginManifestErrorType.AuthNotSupported,
67
- content: "Auth type not supported",
175
+ content: localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.validationError.authNotSupported", "none"),
68
176
  });
69
177
  }
70
178
  return errors;
71
179
  }
180
+ function generateScaffoldingSummary(warnings, teamsManifest, projectPath) {
181
+ const apiSpecWarningMessage = formatApiSpecValidationWarningMessage(warnings);
182
+ const manifestWarningResult = validateTeamsManifestLength(teamsManifest, projectPath, warnings);
183
+ const manifestWarningMessage = manifestWarningResult.map((warn) => {
184
+ return `${constant_1.SummaryConstant.NotExecuted} ${warn}`;
185
+ });
186
+ if (apiSpecWarningMessage || manifestWarningMessage.length) {
187
+ let details = "";
188
+ if (apiSpecWarningMessage) {
189
+ details += os_1.EOL + apiSpecWarningMessage;
190
+ }
191
+ if (manifestWarningMessage.length) {
192
+ details += os_1.EOL + manifestWarningMessage.join(os_1.EOL);
193
+ }
194
+ return localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary", details);
195
+ }
196
+ else {
197
+ return "";
198
+ }
199
+ }
200
+ exports.generateScaffoldingSummary = generateScaffoldingSummary;
201
+ function formatApiSpecValidationWarningMessage(specWarnings) {
202
+ const apiSpecWarning = specWarnings.length > 0 && specWarnings[0].type === interfaces_1.WarningType.OperationIdMissing
203
+ ? `${constant_1.SummaryConstant.NotExecuted} ${specWarnings[0].content}`
204
+ : "";
205
+ return apiSpecWarning
206
+ ? localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.operationId", apiSpecWarning, teamsfx_api_1.ManifestTemplateFileName)
207
+ : "";
208
+ }
209
+ function validateTeamsManifestLength(teamsManifest, projectPath, warnings) {
210
+ var _a, _b, _c, _d;
211
+ const nameShortLimit = 30;
212
+ const nameFullLimit = 100;
213
+ const descriptionShortLimit = 80;
214
+ const descriptionFullLimit = 4000;
215
+ const resultWarnings = [];
216
+ // validate name
217
+ if (teamsManifest.name.short.length > nameShortLimit) {
218
+ resultWarnings.push(formatLengthExceedingErrorMessage("/name/short", nameShortLimit));
219
+ }
220
+ if (!!teamsManifest.name.full && ((_a = teamsManifest.name.full) === null || _a === void 0 ? void 0 : _a.length) > nameFullLimit) {
221
+ resultWarnings.push(formatLengthExceedingErrorMessage("/name/full", nameFullLimit));
222
+ }
223
+ // validate description
224
+ if (teamsManifest.description.short.length > descriptionShortLimit) {
225
+ resultWarnings.push(formatLengthExceedingErrorMessage("/description/short", descriptionShortLimit));
226
+ }
227
+ if (!((_b = teamsManifest.description.full) === null || _b === void 0 ? void 0 : _b.length)) {
228
+ resultWarnings.push(localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.missingFullDescription") +
229
+ localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.mitigation", "full/description", path_1.default.join(teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ManifestTemplateFileName)));
230
+ }
231
+ if (teamsManifest.description.full.length > descriptionFullLimit) {
232
+ resultWarnings.push(formatLengthExceedingErrorMessage("/description/full", descriptionFullLimit));
233
+ }
234
+ // validate card
235
+ if (teamsfx_api_1.ManifestUtil.parseCommonProperties(teamsManifest).isCopilotPlugin) {
236
+ const commands = ((_c = teamsManifest.composeExtensions) === null || _c === void 0 ? void 0 : _c[0]).commands;
237
+ for (const command of commands) {
238
+ if (command.type === "query") {
239
+ if (!command.apiResponseRenderingTemplateFile) {
240
+ const errorDetail = (_d = warnings.find((w) => w.type === interfaces_1.WarningType.GenerateCardFailed && w.data === command.id)) === null || _d === void 0 ? void 0 : _d.content;
241
+ resultWarnings.push(localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.missingCardTemlate", "apiResponseRenderingTemplateFile", command.id) +
242
+ localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.missingCardTemlate.mitigation", teamsfx_api_1.AppPackageFolderName, `composeExtensions/commands/${command.id}/apiResponseRenderingTemplateFile`, path_1.default.join(teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ManifestTemplateFileName)) +
243
+ (errorDetail ? os_1.EOL + errorDetail : ""));
244
+ }
245
+ }
246
+ }
247
+ }
248
+ return resultWarnings;
249
+ }
250
+ function formatLengthExceedingErrorMessage(field, limit) {
251
+ return (localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.lengthExceeding", field, limit.toString()) +
252
+ localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.mitigation", field, path_1.default.join(teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ManifestTemplateFileName)));
253
+ }
254
+ function convertSpecParserErrorToFxError(error) {
255
+ return new teamsfx_api_1.SystemError("SpecParser", error.errorType.toString(), error.message, error.message);
256
+ }
257
+ exports.convertSpecParserErrorToFxError = convertSpecParserErrorToFxError;
72
258
  //# sourceMappingURL=helper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/helper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AAEH,wDAOgC;AAChC,0DAA6C;AAC7C,oCAAgD;AAChD,uEAGgD;AAChD,uEAAoE;AAEpE,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AAEvD,IAAK,6BAGJ;AAHD,WAAK,6BAA6B;IAChC,yGAAgB,CAAA;IAChB,mGAAa,CAAA;AACf,CAAC,EAHI,6BAA6B,KAA7B,6BAA6B,QAGjC;AAmBD,MAAa,oBAAoB;IAC/B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MAAM,UAAU,CAAC,IAAI,EAAE,CAAC;IAC3C,OAAO,gBAAE,CAAC,UAAU,CAAC,CAAC;AACxB,CAAC;AA7BD,wCA6BC;AAED,SAAS,4BAA4B,CAAC,QAA8B;IAClE,MAAM,MAAM,GAAkB,EAAE,CAAC;IACjC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE;QACrB,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,6BAA6B,CAAC,aAAa;YACjD,OAAO,EAAE,yBAAyB;SACnC,CAAC,CAAC;KACJ;IAED,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,oCAAsB,CAAC,IAAI,EAAE;QACtD,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,6BAA6B,CAAC,gBAAgB;YACpD,OAAO,EAAE,yBAAyB;SACnC,CAAC,CAAC;KACJ;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/helper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AAEH,wDAiBgC;AAChC,0DAA6C;AAC7C,oCAAgD;AAChD,uEAKgD;AAChD,uEAAoE;AACpE,gEAA0B;AAC1B,iEAAmE;AACnE,0CAA2D;AAC3D,2BAAyB;AACzB,2DAA+D;AAC/D,6EAA0E;AAC1E,wDAAwB;AACxB,iFAA8E;AAE9E,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AACvD,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAanD,IAAK,6BAGJ;AAHD,WAAK,6BAA6B;IAChC,uFAAsD,CAAA;IACtD,gFAA+C,CAAA;AACjD,CAAC,EAHI,6BAA6B,KAA7B,6BAA6B,QAGjC;AAcD,MAAa,0BAA0B;IACrC,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAa;QACjD,IAAI,IAAI,GACN,CAAC,KAAK,CAAC,Q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AAE;oBAC7C,MAAM,WAAW,GAAG,MAAA,QAAQ,CAAC,IAAI,CAC/B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,wBAAW,CAAC,kBAAkB,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,EAAE,CAC1E,0CAAE,OAAO,CAAC;oBACX,cAAc,CAAC,IAAI,CACjB,kCAAkB,CAChB,8EAA8E,EAC9E,kCAAkC,EAClC,OAAO,CAAC,EAAE,CACX;wBACC,kCAAkB,CAChB,yFAAyF,EACzF,kCAAoB,EACpB,8BAA8B,OAAO,CAAC,EAAE,mCAAmC,EAC3E,cAAI,CAAC,IAAI,CAAC,kCAAoB,EAAE,sCAAwB,CAAC,CAC1D;wBACD,CAAC,WAAW,CAAC,CAAC,CAAC,QAAG,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CACzC,CAAC;iBACH;aACF;SACF;KACF;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,SAAS,iCAAiC,CAAC,KAAa,EAAE,KAAa;IACrE,OAAO,CACL,kCAAkB,CAChB,2EAA2E,EAC3E,KAAK,EACL,KAAK,CAAC,QAAQ,EAAE,CACjB;QACD,kCAAkB,CAChB,sEAAsE,EACtE,KAAK,EACL,cAAI,CAAC,IAAI,CAAC,kCAAoB,EAAE,sCAAwB,CAAC,CAC1D,CACF,CAAC;AACJ,CAAC;AAED,SAAgB,+BAA+B,CAAC,KAAsB;IACpE,OAAO,IAAI,yBAAW,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;AACjG,CAAC;AAFD,0EAEC"}
@@ -1,6 +1,12 @@
1
1
  import { BaseComponentInnerError } from "../error/componentError";
2
2
  export declare class CancelDownloading extends Error {
3
3
  }
4
+ export declare class SampleNotFoundError extends BaseComponentInnerError {
5
+ constructor(templateName: string);
6
+ }
7
+ export declare class TemplateNotFoundError extends BaseComponentInnerError {
8
+ constructor(templateName: string);
9
+ }
4
10
  export declare class TemplateZipFallbackError extends BaseComponentInnerError {
5
11
  constructor();
6
12
  }
@@ -17,7 +23,7 @@ export declare class ParseUrlError extends BaseComponentInnerError {
17
23
  constructor(url: string);
18
24
  }
19
25
  export declare class FetchZipFromUrlError extends BaseComponentInnerError {
20
- constructor(url: string);
26
+ constructor(url: string, error?: Error);
21
27
  }
22
28
  export declare class MissKeyError extends BaseComponentInnerError {
23
29
  constructor(keyName: string);
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/component/generator/error.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,qBAAa,wBAAyB,SAAQ,uBAAuB;;CASpE;AAED,qBAAa,UAAW,SAAQ,uBAAuB;;CAMtD;AAED,qBAAa,0BAA2B,SAAQ,uBAAuB;gBACzD,GAAG,EAAE,MAAM;CASxB;AAED,qBAAa,2BAA4B,SAAQ,uBAAuB;gBAC1D,GAAG,EAAE,MAAM;CASxB;AAED,qBAAa,aAAc,SAAQ,uBAAuB;gBAC5C,GAAG,EAAE,MAAM;CAGxB;AAED,qBAAa,oBAAqB,SAAQ,uBAAuB;gBACnD,GAAG,EAAE,MAAM;CAUxB;AAED,qBAAa,YAAa,SAAQ,uBAAuB;gBAC3C,OAAO,EAAE,MAAM;CAG5B"}
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/component/generator/error.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,qBAAa,mBAAoB,SAAQ,uBAAuB;gBAClD,YAAY,EAAE,MAAM;CASjC;AAED,qBAAa,qBAAsB,SAAQ,uBAAuB;gBACpD,YAA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