@microsoft/teamsfx-core 2.0.1-alpha.c8eab1a43.0 → 2.0.1-alpha.d4f96cccc.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 (493) hide show
  1. package/build/common/local/localStateHelper.d.ts.map +1 -1
  2. package/build/common/local/localStateHelper.js.map +1 -1
  3. package/build/common/samples.d.ts.map +1 -1
  4. package/build/common/samples.js +2 -2
  5. package/build/common/samples.js.map +1 -1
  6. package/build/common/telemetry.d.ts +0 -13
  7. package/build/common/telemetry.d.ts.map +1 -1
  8. package/build/common/telemetry.js +0 -13
  9. package/build/common/telemetry.js.map +1 -1
  10. package/build/common/templates-config.json +2 -1
  11. package/build/common/tools.d.ts +1 -15
  12. package/build/common/tools.d.ts.map +1 -1
  13. package/build/common/tools.js +53 -138
  14. package/build/common/tools.js.map +1 -1
  15. package/build/component/code/appSettingUtils.d.ts +1 -2
  16. package/build/component/code/appSettingUtils.d.ts.map +1 -1
  17. package/build/component/code/appSettingUtils.js +1 -46
  18. package/build/component/code/appSettingUtils.js.map +1 -1
  19. package/build/component/constant/deployConstant.d.ts.map +1 -1
  20. package/build/component/constant/deployConstant.js.map +1 -1
  21. package/build/component/constants.d.ts +3 -210
  22. package/build/component/constants.d.ts.map +1 -1
  23. package/build/component/constants.js +7 -404
  24. package/build/component/constants.js.map +1 -1
  25. package/build/component/coordinator/index.d.ts +1 -0
  26. package/build/component/coordinator/index.d.ts.map +1 -1
  27. package/build/component/coordinator/index.js +21 -10
  28. package/build/component/coordinator/index.js.map +1 -1
  29. package/build/component/deployUtils.d.ts +1 -8
  30. package/build/component/deployUtils.d.ts.map +1 -1
  31. package/build/component/deployUtils.js +2 -98
  32. package/build/component/deployUtils.js.map +1 -1
  33. package/build/component/driver/add/addWebPart.js +3 -3
  34. package/build/component/driver/add/addWebPart.js.map +1 -1
  35. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +9 -9
  36. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
  37. package/build/component/driver/interface/buildAndDeployArgs.d.ts +11 -11
  38. package/build/component/driver/interface/buildAndDeployArgs.d.ts.map +1 -1
  39. package/build/component/driver/script/scriptDriver.js +6 -6
  40. package/build/component/driver/script/scriptDriver.js.map +1 -1
  41. package/build/component/error.d.ts +0 -3
  42. package/build/component/error.d.ts.map +1 -1
  43. package/build/component/error.js +1 -11
  44. package/build/component/error.js.map +1 -1
  45. package/build/component/feature/cicd/cicd.d.ts +1 -2
  46. package/build/component/feature/cicd/cicd.d.ts.map +1 -1
  47. package/build/component/feature/cicd/cicd.js +2 -87
  48. package/build/component/feature/cicd/cicd.js.map +1 -1
  49. package/build/component/feature/sso.d.ts +0 -1
  50. package/build/component/feature/sso.d.ts.map +1 -1
  51. package/build/component/feature/sso.js +0 -1
  52. package/build/component/feature/sso.js.map +1 -1
  53. package/build/component/generator/generatorAction.d.ts.map +1 -1
  54. package/build/component/generator/generatorAction.js +1 -1
  55. package/build/component/generator/generatorAction.js.map +1 -1
  56. package/build/component/generator/spfx/depsChecker/dependencyChecker.d.ts +8 -0
  57. package/build/component/generator/spfx/depsChecker/dependencyChecker.d.ts.map +1 -0
  58. package/build/component/generator/spfx/depsChecker/dependencyChecker.js.map +1 -0
  59. package/build/component/{resource → generator}/spfx/depsChecker/generatorChecker.d.ts +1 -4
  60. package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +1 -0
  61. package/build/component/{resource → generator}/spfx/depsChecker/generatorChecker.js +0 -39
  62. package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -0
  63. package/build/component/{resource → generator}/spfx/depsChecker/yoChecker.d.ts +1 -4
  64. package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +1 -0
  65. package/build/component/{resource → generator}/spfx/depsChecker/yoChecker.js +0 -33
  66. package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -0
  67. package/build/component/generator/spfx/error.d.ts +8 -0
  68. package/build/component/generator/spfx/error.d.ts.map +1 -0
  69. package/build/component/generator/spfx/error.js +55 -0
  70. package/build/component/generator/spfx/error.js.map +1 -0
  71. package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -0
  72. package/build/component/generator/{spfxGenerator.js → spfx/spfxGenerator.js} +16 -16
  73. package/build/component/generator/spfx/spfxGenerator.js.map +1 -0
  74. package/build/component/{resource → generator}/spfx/utils/constants.d.ts +0 -33
  75. package/build/component/generator/spfx/utils/constants.d.ts.map +1 -0
  76. package/build/component/{resource → generator}/spfx/utils/constants.js +1 -39
  77. package/build/component/generator/spfx/utils/constants.js.map +1 -0
  78. package/build/component/{resource → generator}/spfx/utils/progress-helper.d.ts +0 -5
  79. package/build/component/generator/spfx/utils/progress-helper.d.ts.map +1 -0
  80. package/build/component/generator/spfx/utils/progress-helper.js +21 -0
  81. package/build/component/generator/spfx/utils/progress-helper.js.map +1 -0
  82. package/build/component/generator/spfx/utils/question-helper.d.ts.map +1 -0
  83. package/build/component/generator/spfx/utils/question-helper.js.map +1 -0
  84. package/build/component/{resource → generator}/spfx/utils/questions.d.ts +0 -1
  85. package/build/component/generator/spfx/utils/questions.d.ts.map +1 -0
  86. package/build/component/{resource → generator}/spfx/utils/questions.js +1 -23
  87. package/build/component/generator/spfx/utils/questions.js.map +1 -0
  88. package/build/component/generator/spfx/utils/telemetry-helper.d.ts.map +1 -0
  89. package/build/component/generator/spfx/utils/telemetry-helper.js.map +1 -0
  90. package/build/component/generator/spfx/utils/telemetryEvents.d.ts.map +1 -0
  91. package/build/component/generator/spfx/utils/telemetryEvents.js.map +1 -0
  92. package/build/component/generator/spfx/utils/utils.d.ts.map +1 -0
  93. package/build/component/generator/spfx/utils/utils.js.map +1 -0
  94. package/build/component/generator/utils.js +2 -2
  95. package/build/component/generator/utils.js.map +1 -1
  96. package/build/component/middleware/envMW.js.map +1 -1
  97. package/build/component/provisionUtils.d.ts +2 -23
  98. package/build/component/provisionUtils.d.ts.map +1 -1
  99. package/build/component/provisionUtils.js +5 -523
  100. package/build/component/provisionUtils.js.map +1 -1
  101. package/build/component/question.js +1 -1
  102. package/build/component/question.js.map +1 -1
  103. package/build/component/registerService.d.ts +0 -3
  104. package/build/component/registerService.d.ts.map +1 -1
  105. package/build/component/registerService.js +0 -3
  106. package/build/component/registerService.js.map +1 -1
  107. package/build/component/resource/aadApp/utils/aadManifestHelper.js +2 -1
  108. package/build/component/resource/aadApp/utils/aadManifestHelper.js.map +1 -1
  109. package/build/component/resource/appManifest/appManifest.d.ts +0 -6
  110. package/build/component/resource/appManifest/appManifest.d.ts.map +1 -1
  111. package/build/component/resource/appManifest/appManifest.js +24 -247
  112. package/build/component/resource/appManifest/appManifest.js.map +1 -1
  113. package/build/component/resource/appManifest/appStudio.d.ts +1 -21
  114. package/build/component/resource/appManifest/appStudio.d.ts.map +1 -1
  115. package/build/component/resource/appManifest/appStudio.js +15 -257
  116. package/build/component/resource/appManifest/appStudio.js.map +1 -1
  117. package/build/component/resource/botService/errors.d.ts +0 -2
  118. package/build/component/resource/botService/errors.d.ts.map +1 -1
  119. package/build/component/resource/botService/errors.js +1 -43
  120. package/build/component/resource/botService/errors.js.map +1 -1
  121. package/build/component/utils/ResourceGroupHelper.d.ts +1 -5
  122. package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
  123. package/build/component/utils/ResourceGroupHelper.js +0 -6
  124. package/build/component/utils/ResourceGroupHelper.js.map +1 -1
  125. package/build/component/utils/pathUtils.d.ts.map +1 -1
  126. package/build/component/utils/pathUtils.js +2 -2
  127. package/build/component/utils/pathUtils.js.map +1 -1
  128. package/build/component/utils.d.ts +1 -18
  129. package/build/component/utils.d.ts.map +1 -1
  130. package/build/component/utils.js +23 -277
  131. package/build/component/utils.js.map +1 -1
  132. package/build/component/workflow.d.ts +0 -1
  133. package/build/component/workflow.d.ts.map +1 -1
  134. package/build/component/workflow.js +1 -6
  135. package/build/component/workflow.js.map +1 -1
  136. package/build/core/FxCore.d.ts +0 -8
  137. package/build/core/FxCore.d.ts.map +1 -1
  138. package/build/core/FxCore.js +0 -12
  139. package/build/core/FxCore.js.map +1 -1
  140. package/build/core/FxCoreImplementV3.d.ts.map +1 -1
  141. package/build/core/FxCoreImplementV3.js +7 -20
  142. package/build/core/FxCoreImplementV3.js.map +1 -1
  143. package/build/core/collaborator.d.ts +2 -0
  144. package/build/core/collaborator.d.ts.map +1 -1
  145. package/build/core/collaborator.js +2 -0
  146. package/build/core/collaborator.js.map +1 -1
  147. package/build/core/environment.d.ts +2 -4
  148. package/build/core/environment.d.ts.map +1 -1
  149. package/build/core/environment.js +44 -108
  150. package/build/core/environment.js.map +1 -1
  151. package/build/core/error.d.ts +1 -34
  152. package/build/core/error.d.ts.map +1 -1
  153. package/build/core/error.js +1 -112
  154. package/build/core/error.js.map +1 -1
  155. package/build/core/globalVars.d.ts +0 -1
  156. package/build/core/globalVars.d.ts.map +1 -1
  157. package/build/core/globalVars.js +1 -15
  158. package/build/core/globalVars.js.map +1 -1
  159. package/build/core/middleware/projectMigratorV3.d.ts +2 -1
  160. package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
  161. package/build/core/middleware/projectMigratorV3.js +40 -46
  162. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  163. package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
  164. package/build/core/middleware/projectSettingsLoader.js +9 -20
  165. package/build/core/middleware/projectSettingsLoader.js.map +1 -1
  166. package/build/core/middleware/projectVersionChecker.d.ts.map +1 -1
  167. package/build/core/middleware/projectVersionChecker.js +6 -18
  168. package/build/core/middleware/projectVersionChecker.js.map +1 -1
  169. package/build/core/middleware/utils/migrationContext.d.ts.map +1 -1
  170. package/build/core/middleware/utils/migrationContext.js +0 -4
  171. package/build/core/middleware/utils/migrationContext.js.map +1 -1
  172. package/build/core/question.d.ts.map +1 -1
  173. package/build/core/question.js +4 -4
  174. package/build/core/question.js.map +1 -1
  175. package/build/core/types.d.ts +0 -10
  176. package/build/core/types.d.ts.map +1 -1
  177. package/build/index.d.ts +0 -1
  178. package/build/index.d.ts.map +1 -1
  179. package/build/index.js +0 -1
  180. package/build/index.js.map +1 -1
  181. package/package.json +7 -11
  182. package/resource/package.nls.json +3 -177
  183. package/templates/fallback/common.zip +0 -0
  184. package/templates/fallback/csharp.zip +0 -0
  185. package/templates/fallback/js.zip +0 -0
  186. package/templates/fallback/ts.zip +0 -0
  187. package/build/common/azure-hosting/azureAppServiceHosting.d.ts +0 -16
  188. package/build/common/azure-hosting/azureAppServiceHosting.d.ts.map +0 -1
  189. package/build/common/azure-hosting/azureAppServiceHosting.js +0 -33
  190. package/build/common/azure-hosting/azureAppServiceHosting.js.map +0 -1
  191. package/build/common/azure-hosting/azureFunctionHosting.d.ts +0 -14
  192. package/build/common/azure-hosting/azureFunctionHosting.d.ts.map +0 -1
  193. package/build/common/azure-hosting/azureFunctionHosting.js +0 -34
  194. package/build/common/azure-hosting/azureFunctionHosting.js.map +0 -1
  195. package/build/common/azure-hosting/azureHosting.d.ts +0 -23
  196. package/build/common/azure-hosting/azureHosting.d.ts.map +0 -1
  197. package/build/common/azure-hosting/azureHosting.js +0 -95
  198. package/build/common/azure-hosting/azureHosting.js.map +0 -1
  199. package/build/common/azure-hosting/azureOps.d.ts +0 -17
  200. package/build/common/azure-hosting/azureOps.d.ts.map +0 -1
  201. package/build/common/azure-hosting/azureOps.js +0 -94
  202. package/build/common/azure-hosting/azureOps.js.map +0 -1
  203. package/build/common/azure-hosting/hostingConstant.d.ts +0 -46
  204. package/build/common/azure-hosting/hostingConstant.d.ts.map +0 -1
  205. package/build/common/azure-hosting/hostingConstant.js +0 -86
  206. package/build/common/azure-hosting/hostingConstant.js.map +0 -1
  207. package/build/common/azure-hosting/hostingError.d.ts +0 -47
  208. package/build/common/azure-hosting/hostingError.d.ts.map +0 -1
  209. package/build/common/azure-hosting/hostingError.js +0 -83
  210. package/build/common/azure-hosting/hostingError.js.map +0 -1
  211. package/build/common/azure-hosting/hostingFactory.d.ts +0 -6
  212. package/build/common/azure-hosting/hostingFactory.d.ts.map +0 -1
  213. package/build/common/azure-hosting/hostingFactory.js +0 -22
  214. package/build/common/azure-hosting/hostingFactory.js.map +0 -1
  215. package/build/common/azure-hosting/interfaces.d.ts +0 -58
  216. package/build/common/azure-hosting/interfaces.d.ts.map +0 -1
  217. package/build/common/azure-hosting/interfaces.js +0 -12
  218. package/build/common/azure-hosting/interfaces.js.map +0 -1
  219. package/build/common/azure-hosting/messages.d.ts +0 -10
  220. package/build/common/azure-hosting/messages.d.ts.map +0 -1
  221. package/build/common/azure-hosting/messages.js +0 -16
  222. package/build/common/azure-hosting/messages.js.map +0 -1
  223. package/build/common/azure-hosting/utils.d.ts +0 -10
  224. package/build/common/azure-hosting/utils.d.ts.map +0 -1
  225. package/build/common/azure-hosting/utils.js +0 -107
  226. package/build/common/azure-hosting/utils.js.map +0 -1
  227. package/build/common/samples-config.json +0 -201
  228. package/build/component/code/spfxTabCode.d.ts +0 -11
  229. package/build/component/code/spfxTabCode.d.ts.map +0 -1
  230. package/build/component/code/spfxTabCode.js +0 -237
  231. package/build/component/code/spfxTabCode.js.map +0 -1
  232. package/build/component/envManager.d.ts +0 -4
  233. package/build/component/envManager.d.ts.map +0 -1
  234. package/build/component/envManager.js +0 -25
  235. package/build/component/envManager.js.map +0 -1
  236. package/build/component/feature/apiconnector/ApiConnectorImpl.d.ts +0 -23
  237. package/build/component/feature/apiconnector/ApiConnectorImpl.d.ts.map +0 -1
  238. package/build/component/feature/apiconnector/ApiConnectorImpl.js +0 -288
  239. package/build/component/feature/apiconnector/ApiConnectorImpl.js.map +0 -1
  240. package/build/component/feature/apiconnector/checker.d.ts +0 -7
  241. package/build/component/feature/apiconnector/checker.d.ts.map +0 -1
  242. package/build/component/feature/apiconnector/checker.js +0 -74
  243. package/build/component/feature/apiconnector/checker.js.map +0 -1
  244. package/build/component/feature/apiconnector/config.d.ts +0 -23
  245. package/build/component/feature/apiconnector/config.d.ts.map +0 -1
  246. package/build/component/feature/apiconnector/config.js +0 -5
  247. package/build/component/feature/apiconnector/config.js.map +0 -1
  248. package/build/component/feature/apiconnector/constants.d.ts +0 -50
  249. package/build/component/feature/apiconnector/constants.d.ts.map +0 -1
  250. package/build/component/feature/apiconnector/constants.js +0 -61
  251. package/build/component/feature/apiconnector/constants.js.map +0 -1
  252. package/build/component/feature/apiconnector/depsHandler.d.ts +0 -14
  253. package/build/component/feature/apiconnector/depsHandler.d.ts.map +0 -1
  254. package/build/component/feature/apiconnector/depsHandler.js +0 -109
  255. package/build/component/feature/apiconnector/depsHandler.js.map +0 -1
  256. package/build/component/feature/apiconnector/envHandler.d.ts +0 -21
  257. package/build/component/feature/apiconnector/envHandler.d.ts.map +0 -1
  258. package/build/component/feature/apiconnector/envHandler.js +0 -128
  259. package/build/component/feature/apiconnector/envHandler.js.map +0 -1
  260. package/build/component/feature/apiconnector/errors.d.ts +0 -53
  261. package/build/component/feature/apiconnector/errors.d.ts.map +0 -1
  262. package/build/component/feature/apiconnector/errors.js +0 -64
  263. package/build/component/feature/apiconnector/errors.js.map +0 -1
  264. package/build/component/feature/apiconnector/questions.d.ts +0 -41
  265. package/build/component/feature/apiconnector/questions.d.ts.map +0 -1
  266. package/build/component/feature/apiconnector/questions.js +0 -262
  267. package/build/component/feature/apiconnector/questions.js.map +0 -1
  268. package/build/component/feature/apiconnector/result.d.ts +0 -23
  269. package/build/component/feature/apiconnector/result.d.ts.map +0 -1
  270. package/build/component/feature/apiconnector/result.js +0 -40
  271. package/build/component/feature/apiconnector/result.js.map +0 -1
  272. package/build/component/feature/apiconnector/sampleHandler.d.ts +0 -10
  273. package/build/component/feature/apiconnector/sampleHandler.d.ts.map +0 -1
  274. package/build/component/feature/apiconnector/sampleHandler.js +0 -62
  275. package/build/component/feature/apiconnector/sampleHandler.js.map +0 -1
  276. package/build/component/feature/apiconnector/telemetry.d.ts +0 -42
  277. package/build/component/feature/apiconnector/telemetry.d.ts.map +0 -1
  278. package/build/component/feature/apiconnector/telemetry.js +0 -70
  279. package/build/component/feature/apiconnector/telemetry.js.map +0 -1
  280. package/build/component/feature/apiconnector/utils.d.ts +0 -18
  281. package/build/component/feature/apiconnector/utils.d.ts.map +0 -1
  282. package/build/component/feature/apiconnector/utils.js +0 -90
  283. package/build/component/feature/apiconnector/utils.js.map +0 -1
  284. package/build/component/generator/spfxGenerator.d.ts.map +0 -1
  285. package/build/component/generator/spfxGenerator.js.map +0 -1
  286. package/build/component/resource/azureAppService/azureAppService.d.ts +0 -12
  287. package/build/component/resource/azureAppService/azureAppService.d.ts.map +0 -1
  288. package/build/component/resource/azureAppService/azureAppService.js +0 -48
  289. package/build/component/resource/azureAppService/azureAppService.js.map +0 -1
  290. package/build/component/resource/azureAppService/azureFunction.d.ts +0 -36
  291. package/build/component/resource/azureAppService/azureFunction.d.ts.map +0 -1
  292. package/build/component/resource/azureAppService/azureFunction.js +0 -155
  293. package/build/component/resource/azureAppService/azureFunction.js.map +0 -1
  294. package/build/component/resource/azureAppService/azureLibs.d.ts +0 -6
  295. package/build/component/resource/azureAppService/azureLibs.d.ts.map +0 -1
  296. package/build/component/resource/azureAppService/azureLibs.js +0 -13
  297. package/build/component/resource/azureAppService/azureLibs.js.map +0 -1
  298. package/build/component/resource/azureAppService/azureWebApp.d.ts +0 -30
  299. package/build/component/resource/azureAppService/azureWebApp.d.ts.map +0 -1
  300. package/build/component/resource/azureAppService/azureWebApp.js +0 -43
  301. package/build/component/resource/azureAppService/azureWebApp.js.map +0 -1
  302. package/build/component/resource/azureAppService/common.d.ts +0 -10
  303. package/build/component/resource/azureAppService/common.d.ts.map +0 -1
  304. package/build/component/resource/azureAppService/common.js +0 -80
  305. package/build/component/resource/azureAppService/common.js.map +0 -1
  306. package/build/component/resource/azureAppService/dir-walk.d.ts +0 -4
  307. package/build/component/resource/azureAppService/dir-walk.d.ts.map +0 -1
  308. package/build/component/resource/azureAppService/dir-walk.js +0 -21
  309. package/build/component/resource/azureAppService/dir-walk.js.map +0 -1
  310. package/build/component/resource/azureSql/actions/configure.d.ts +0 -15
  311. package/build/component/resource/azureSql/actions/configure.d.ts.map +0 -1
  312. package/build/component/resource/azureSql/actions/configure.js +0 -92
  313. package/build/component/resource/azureSql/actions/configure.js.map +0 -1
  314. package/build/component/resource/azureSql/actions/provision.d.ts +0 -10
  315. package/build/component/resource/azureSql/actions/provision.d.ts.map +0 -1
  316. package/build/component/resource/azureSql/actions/provision.js +0 -63
  317. package/build/component/resource/azureSql/actions/provision.js.map +0 -1
  318. package/build/component/resource/azureSql/actions/utils.d.ts +0 -12
  319. package/build/component/resource/azureSql/actions/utils.d.ts.map +0 -1
  320. package/build/component/resource/azureSql/actions/utils.js +0 -82
  321. package/build/component/resource/azureSql/actions/utils.js.map +0 -1
  322. package/build/component/resource/azureSql/azureSql.d.ts +0 -24
  323. package/build/component/resource/azureSql/azureSql.d.ts.map +0 -1
  324. package/build/component/resource/azureSql/azureSql.js +0 -75
  325. package/build/component/resource/azureSql/azureSql.js.map +0 -1
  326. package/build/component/resource/azureSql/clients/management.d.ts +0 -18
  327. package/build/component/resource/azureSql/clients/management.d.ts.map +0 -1
  328. package/build/component/resource/azureSql/clients/management.js +0 -124
  329. package/build/component/resource/azureSql/clients/management.js.map +0 -1
  330. package/build/component/resource/azureSql/clients/sql.d.ts +0 -13
  331. package/build/component/resource/azureSql/clients/sql.d.ts.map +0 -1
  332. package/build/component/resource/azureSql/clients/sql.js +0 -153
  333. package/build/component/resource/azureSql/clients/sql.js.map +0 -1
  334. package/build/component/resource/azureSql/config.d.ts +0 -7
  335. package/build/component/resource/azureSql/config.d.ts.map +0 -1
  336. package/build/component/resource/azureSql/config.js +0 -77
  337. package/build/component/resource/azureSql/config.js.map +0 -1
  338. package/build/component/resource/azureSql/constants.d.ts +0 -85
  339. package/build/component/resource/azureSql/constants.d.ts.map +0 -1
  340. package/build/component/resource/azureSql/constants.js +0 -95
  341. package/build/component/resource/azureSql/constants.js.map +0 -1
  342. package/build/component/resource/azureSql/errors.d.ts +0 -63
  343. package/build/component/resource/azureSql/errors.d.ts.map +0 -1
  344. package/build/component/resource/azureSql/errors.js +0 -107
  345. package/build/component/resource/azureSql/errors.js.map +0 -1
  346. package/build/component/resource/azureSql/index.d.ts +0 -2
  347. package/build/component/resource/azureSql/index.d.ts.map +0 -1
  348. package/build/component/resource/azureSql/index.js +0 -7
  349. package/build/component/resource/azureSql/index.js.map +0 -1
  350. package/build/component/resource/azureSql/questions.d.ts +0 -6
  351. package/build/component/resource/azureSql/questions.d.ts.map +0 -1
  352. package/build/component/resource/azureSql/questions.js +0 -59
  353. package/build/component/resource/azureSql/questions.js.map +0 -1
  354. package/build/component/resource/azureSql/results.d.ts +0 -10
  355. package/build/component/resource/azureSql/results.d.ts.map +0 -1
  356. package/build/component/resource/azureSql/results.js +0 -34
  357. package/build/component/resource/azureSql/results.js.map +0 -1
  358. package/build/component/resource/azureSql/types.d.ts +0 -12
  359. package/build/component/resource/azureSql/types.d.ts.map +0 -1
  360. package/build/component/resource/azureSql/types.js +0 -5
  361. package/build/component/resource/azureSql/types.js.map +0 -1
  362. package/build/component/resource/azureSql/utils/checkInput.d.ts +0 -10
  363. package/build/component/resource/azureSql/utils/checkInput.d.ts.map +0 -1
  364. package/build/component/resource/azureSql/utils/checkInput.js +0 -89
  365. package/build/component/resource/azureSql/utils/checkInput.js.map +0 -1
  366. package/build/component/resource/azureSql/utils/common.d.ts +0 -12
  367. package/build/component/resource/azureSql/utils/common.d.ts.map +0 -1
  368. package/build/component/resource/azureSql/utils/common.js +0 -51
  369. package/build/component/resource/azureSql/utils/common.js.map +0 -1
  370. package/build/component/resource/azureStorage/azureStorage.d.ts +0 -31
  371. package/build/component/resource/azureStorage/azureStorage.d.ts.map +0 -1
  372. package/build/component/resource/azureStorage/azureStorage.js +0 -111
  373. package/build/component/resource/azureStorage/azureStorage.js.map +0 -1
  374. package/build/component/resource/azureStorage/clients.d.ts +0 -23
  375. package/build/component/resource/azureStorage/clients.d.ts.map +0 -1
  376. package/build/component/resource/azureStorage/clients.js +0 -133
  377. package/build/component/resource/azureStorage/clients.js.map +0 -1
  378. package/build/component/resource/azureStorage/configs.d.ts +0 -12
  379. package/build/component/resource/azureStorage/configs.d.ts.map +0 -1
  380. package/build/component/resource/azureStorage/configs.js +0 -30
  381. package/build/component/resource/azureStorage/configs.js.map +0 -1
  382. package/build/component/resource/azureStorage/constants.d.ts +0 -11
  383. package/build/component/resource/azureStorage/constants.d.ts.map +0 -1
  384. package/build/component/resource/azureStorage/constants.js +0 -17
  385. package/build/component/resource/azureStorage/constants.js.map +0 -1
  386. package/build/component/resource/azureStorage/messages.d.ts +0 -14
  387. package/build/component/resource/azureStorage/messages.d.ts.map +0 -1
  388. package/build/component/resource/azureStorage/messages.js +0 -28
  389. package/build/component/resource/azureStorage/messages.js.map +0 -1
  390. package/build/component/resource/botService/botService.d.ts +0 -24
  391. package/build/component/resource/botService/botService.d.ts.map +0 -1
  392. package/build/component/resource/botService/botService.js +0 -146
  393. package/build/component/resource/botService/botService.js.map +0 -1
  394. package/build/component/resource/spfx/depsChecker/dependencyChecker.d.ts +0 -11
  395. package/build/component/resource/spfx/depsChecker/dependencyChecker.d.ts.map +0 -1
  396. package/build/component/resource/spfx/depsChecker/dependencyChecker.js.map +0 -1
  397. package/build/component/resource/spfx/depsChecker/generatorChecker.d.ts.map +0 -1
  398. package/build/component/resource/spfx/depsChecker/generatorChecker.js.map +0 -1
  399. package/build/component/resource/spfx/depsChecker/yoChecker.d.ts.map +0 -1
  400. package/build/component/resource/spfx/depsChecker/yoChecker.js.map +0 -1
  401. package/build/component/resource/spfx/error.d.ts +0 -21
  402. package/build/component/resource/spfx/error.d.ts.map +0 -1
  403. package/build/component/resource/spfx/error.js +0 -138
  404. package/build/component/resource/spfx/error.js.map +0 -1
  405. package/build/component/resource/spfx/index.d.ts +0 -15
  406. package/build/component/resource/spfx/index.d.ts.map +0 -1
  407. package/build/component/resource/spfx/index.js +0 -248
  408. package/build/component/resource/spfx/index.js.map +0 -1
  409. package/build/component/resource/spfx/spoClient.d.ts +0 -25
  410. package/build/component/resource/spfx/spoClient.d.ts.map +0 -1
  411. package/build/component/resource/spfx/spoClient.js +0 -79
  412. package/build/component/resource/spfx/spoClient.js.map +0 -1
  413. package/build/component/resource/spfx/utils/constants.d.ts.map +0 -1
  414. package/build/component/resource/spfx/utils/constants.js.map +0 -1
  415. package/build/component/resource/spfx/utils/progress-helper.d.ts.map +0 -1
  416. package/build/component/resource/spfx/utils/progress-helper.js +0 -46
  417. package/build/component/resource/spfx/utils/progress-helper.js.map +0 -1
  418. package/build/component/resource/spfx/utils/question-helper.d.ts.map +0 -1
  419. package/build/component/resource/spfx/utils/question-helper.js.map +0 -1
  420. package/build/component/resource/spfx/utils/questions.d.ts.map +0 -1
  421. package/build/component/resource/spfx/utils/questions.js.map +0 -1
  422. package/build/component/resource/spfx/utils/telemetry-helper.d.ts.map +0 -1
  423. package/build/component/resource/spfx/utils/telemetry-helper.js.map +0 -1
  424. package/build/component/resource/spfx/utils/telemetryEvents.d.ts.map +0 -1
  425. package/build/component/resource/spfx/utils/telemetryEvents.js.map +0 -1
  426. package/build/component/resource/spfx/utils/utils.d.ts.map +0 -1
  427. package/build/component/resource/spfx/utils/utils.js.map +0 -1
  428. package/build/component/utils/backupFiles.d.ts +0 -4
  429. package/build/component/utils/backupFiles.d.ts.map +0 -1
  430. package/build/component/utils/backupFiles.js +0 -162
  431. package/build/component/utils/backupFiles.js.map +0 -1
  432. package/build/component/utils/executor.d.ts +0 -12
  433. package/build/component/utils/executor.d.ts.map +0 -1
  434. package/build/component/utils/executor.js +0 -87
  435. package/build/component/utils/executor.js.map +0 -1
  436. package/build/core/downloadSample.d.ts +0 -9
  437. package/build/core/downloadSample.d.ts.map +0 -1
  438. package/build/core/downloadSample.js +0 -161
  439. package/build/core/downloadSample.js.map +0 -1
  440. package/resource/backup-config-change-logs.md +0 -24
  441. package/templates/bicep/azureSql.parameters.json +0 -4
  442. package/templates/bicep/azureSql.provisionDatabase.module.bicep +0 -15
  443. package/templates/bicep/azureSql.provisionDatabase.orchestration.bicep +0 -5
  444. package/templates/bicep/azureSql.provisionServer.module.bicep +0 -44
  445. package/templates/bicep/azureSql.provisionServer.orchestration.bicep +0 -14
  446. package/templates/bicep/identity.provision.module.bicep +0 -15
  447. package/templates/bicep/identity.provision.orchestration.bicep +0 -14
  448. package/templates/bicep/keyVault.provision.module.bicep +0 -57
  449. package/templates/bicep/keyVault.provision.orchestration.bicep +0 -15
  450. package/templates/plugins/resource/apiconnector/package.json +0 -5
  451. package/templates/plugins/resource/apiconnector/sample/footerComment.template +0 -20
  452. package/templates/plugins/resource/apiconnector/sample/headerComment.template +0 -52
  453. package/templates/plugins/resource/apiconnector/sample/js/aad.template +0 -31
  454. package/templates/plugins/resource/apiconnector/sample/js/apikey.template +0 -19
  455. package/templates/plugins/resource/apiconnector/sample/js/basic.template +0 -14
  456. package/templates/plugins/resource/apiconnector/sample/js/cert.template +0 -17
  457. package/templates/plugins/resource/apiconnector/sample/js/custom.template +0 -39
  458. package/templates/plugins/resource/apiconnector/sample/ts/aad.template +0 -36
  459. package/templates/plugins/resource/apiconnector/sample/ts/apikey.template +0 -16
  460. package/templates/plugins/resource/apiconnector/sample/ts/basic.template +0 -14
  461. package/templates/plugins/resource/apiconnector/sample/ts/cert.template +0 -19
  462. package/templates/plugins/resource/apiconnector/sample/ts/custom.template +0 -42
  463. package/templates/plugins/resource/identity/bicep/identityProvision.template.bicep +0 -15
  464. package/templates/plugins/resource/identity/bicep/provision.template.bicep +0 -14
  465. package/templates/plugins/resource/identity/parameters.json +0 -12
  466. package/templates/plugins/resource/identity/template.json +0 -28
  467. package/templates/plugins/resource/keyvault/bicep/keyVaultProvision.template.bicep +0 -57
  468. package/templates/plugins/resource/keyvault/bicep/provision.template.bicep +0 -15
  469. package/templates/plugins/resource/simpleauth/SimpleAuth.zip +0 -0
  470. package/templates/plugins/resource/simpleauth/bicep/config.template.bicep +0 -12
  471. package/templates/plugins/resource/simpleauth/bicep/provision.template.bicep +0 -14
  472. package/templates/plugins/resource/simpleauth/bicep/simpleAuthConfiguration.template.bicep +0 -62
  473. package/templates/plugins/resource/simpleauth/bicep/simpleAuthProvision.template.bicep +0 -51
  474. package/templates/plugins/resource/simpleauth/version.txt +0 -2
  475. package/templates/plugins/resource/spfx/solution/README.md +0 -82
  476. package/templates/plugins/resource/spfx/solution/manifest.local.template.json +0 -62
  477. package/templates/plugins/resource/spfx/solution/manifest_multi_env.json +0 -63
  478. package/templates/plugins/resource/spfx/solution/rootREADME.md +0 -13
  479. package/templates/plugins/resource/sql/bicep/newDatabase.orchestration.template.bicep +0 -5
  480. package/templates/plugins/resource/sql/bicep/newDatabaseProvision.template.bicep +0 -15
  481. package/templates/plugins/resource/sql/bicep/parameters.json +0 -4
  482. package/templates/plugins/resource/sql/bicep/provision.template.bicep +0 -14
  483. package/templates/plugins/resource/sql/bicep/sqlProvision.template.bicep +0 -44
  484. /package/build/component/{resource → generator}/spfx/depsChecker/dependencyChecker.js +0 -0
  485. /package/build/component/generator/{spfxGenerator.d.ts → spfx/spfxGenerator.d.ts} +0 -0
  486. /package/build/component/{resource → generator}/spfx/utils/question-helper.d.ts +0 -0
  487. /package/build/component/{resource → generator}/spfx/utils/question-helper.js +0 -0
  488. /package/build/component/{resource → generator}/spfx/utils/telemetry-helper.d.ts +0 -0
  489. /package/build/component/{resource → generator}/spfx/utils/telemetry-helper.js +0 -0
  490. /package/build/component/{resource → generator}/spfx/utils/telemetryEvents.d.ts +0 -0
  491. /package/build/component/{resource → generator}/spfx/utils/telemetryEvents.js +0 -0
  492. /package/build/component/{resource → generator}/spfx/utils/utils.d.ts +0 -0
  493. /package/build/component/{resource → generator}/spfx/utils/utils.js +0 -0
@@ -1,61 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- "use strict";
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.Constants = exports.FileType = exports.LanguageType = exports.KeyLocation = exports.AuthType = exports.ComponentType = void 0;
6
- var ComponentType;
7
- (function (ComponentType) {
8
- ComponentType["API"] = "api";
9
- ComponentType["BOT"] = "bot";
10
- })(ComponentType = exports.ComponentType || (exports.ComponentType = {}));
11
- var AuthType;
12
- (function (AuthType) {
13
- AuthType["BASIC"] = "basic";
14
- AuthType["APIKEY"] = "apikey";
15
- AuthType["AAD"] = "aad";
16
- AuthType["CERT"] = "cert";
17
- AuthType["CUSTOM"] = "custom";
18
- })(AuthType = exports.AuthType || (exports.AuthType = {}));
19
- var KeyLocation;
20
- (function (KeyLocation) {
21
- KeyLocation["Header"] = "request header";
22
- KeyLocation["QueryParams"] = "query parameter";
23
- })(KeyLocation = exports.KeyLocation || (exports.KeyLocation = {}));
24
- var LanguageType;
25
- (function (LanguageType) {
26
- LanguageType["JS"] = "javascript";
27
- LanguageType["TS"] = "typescript";
28
- })(LanguageType = exports.LanguageType || (exports.LanguageType = {}));
29
- var FileType;
30
- (function (FileType) {
31
- FileType["JS"] = "js";
32
- FileType["TS"] = "ts";
33
- })(FileType = exports.FileType || (exports.FileType = {}));
34
- class Constants {
35
- }
36
- exports.Constants = Constants;
37
- Constants.PLUGIN_NAME = "APIConnector";
38
- Constants.pluginNameShort = "api-connector";
39
- Constants.headerCommentTemplate = "headerComment.template";
40
- Constants.footerCommentTemplate = "footerComment.template";
41
- Constants.templateEx = ".template";
42
- Constants.envPrefix = "TEAMSFX_API_";
43
- Constants.sampleCodeDir = "apiConnections";
44
- Constants.envFileName = ".env.teamsfx.local";
45
- Constants.pkgJsonFile = "package.json";
46
- Constants.pkgLockFile = "package-lock.json";
47
- Constants.sdkName = "@microsoft/teamsfx";
48
- Constants.sdkJsName = "@microsft/teams-js";
49
- Constants.questionKey = {
50
- componentsSelect: "component",
51
- endpoint: "endpoint",
52
- apiName: "alias",
53
- apiType: "auth-type",
54
- apiUserName: "user-name",
55
- apiAppType: "app-type",
56
- apiAppTenentId: "tenant-id",
57
- apiAppId: "app-id",
58
- apiAPIKeyLocation: "key-location",
59
- apiAPIKeyName: "key-name", // for aad auth
60
- };
61
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAEb,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,4BAAW,CAAA;IACX,4BAAW,CAAA;AACb,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAED,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,6BAAiB,CAAA;IACjB,uBAAW,CAAA;IACX,yBAAa,CAAA;IACb,6BAAiB,CAAA;AACnB,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB;AAED,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,wCAAyB,CAAA;IACzB,8CAA+B,CAAA;AACjC,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AAED,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,iCAAiB,CAAA;AACnB,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB;AAED,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,qBAAS,CAAA;IACT,qBAAS,CAAA;AACX,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB;AACD,MAAa,SAAS;;AAAtB,8BA2BC;AA1BwB,qBAAW,GAAG,cAAc,CAAC;AAC7B,yBAAe,GAAG,eAAe,CAAC;AAClC,+BAAqB,GAAG,wBAAwB,CAAC;AACjD,+BAAqB,GAAG,wBAAwB,CAAC;AACjD,oBAAU,GAAG,WAAW,CAAC;AACzB,mBAAS,GAAG,cAAc,CAAC;AAC3B,uBAAa,GAAG,gBAAgB,CAAC;AAEjC,qBAAW,GAAG,oBAAoB,CAAC;AACnC,qBAAW,GAAG,cAAc,CAAC;AAC7B,qBAAW,GAAG,mBAAmB,CAAC;AAClC,iBAAO,GAAG,oBAAoB,CAAC;AAC/B,mBAAS,GAAG,oBAAoB,CAAC;AAEjC,qBAAW,GAAG;IACnC,gBAAgB,EAAE,WAAW;IAC7B,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,WAAW;IACpB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,UAAU;IACtB,cAAc,EAAE,WAAW;IAC3B,QAAQ,EAAE,QAAQ;IAClB,iBAAiB,EAAE,cAAc;IACjC,aAAa,EAAE,UAAU,EAAE,eAAe;CAC3C,CAAC"}
@@ -1,14 +0,0 @@
1
- import { Json } from "@microsoft/teamsfx-api";
2
- import { FileChange } from "./result";
3
- export declare class DepsHandler {
4
- private readonly projectRoot;
5
- private readonly componentType;
6
- constructor(workspaceFolder: string, componentType: string);
7
- addPkgDeps(): Promise<FileChange | undefined>;
8
- static getDepsConfig(): Promise<Json>;
9
- static checkDepsVerSupport(projectPath: string, component: string): Promise<boolean>;
10
- updateLocalPkgDepsVersion(pkgConfig: Json): Promise<FileChange | undefined>;
11
- private static sdkVersionCheck;
12
- private static caretPrereleases;
13
- }
14
- //# sourceMappingURL=depsHandler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"depsHandler.d.ts","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/depsHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAK9C,OAAO,EAAiB,UAAU,EAAkB,MAAM,UAAU,CAAC;AAIrE,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;gBAC3B,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IAK7C,UAAU,IAAI,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;WAKtC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;WAO9B,mBAAmB,CACrC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC;IAuBN,yBAAyB,CAAC,SAAS,EAAE,IAAI,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAsCxF,OAAO,CAAC,MAAM,CAAC,eAAe;IAgC9B,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAchC"}
@@ -1,109 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- "use strict";
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.DepsHandler = void 0;
6
- const tslib_1 = require("tslib");
7
- const fs = tslib_1.__importStar(require("fs-extra"));
8
- const path = tslib_1.__importStar(require("path"));
9
- const semver_1 = tslib_1.__importDefault(require("semver"));
10
- const constants_1 = require("./constants");
11
- const result_1 = require("./result");
12
- const errors_1 = require("./errors");
13
- const telemetry_1 = require("./telemetry");
14
- const folder_1 = require("../../../folder");
15
- class DepsHandler {
16
- constructor(workspaceFolder, componentType) {
17
- this.projectRoot = workspaceFolder;
18
- this.componentType = componentType;
19
- }
20
- async addPkgDeps() {
21
- const depsConfig = await DepsHandler.getDepsConfig();
22
- return await this.updateLocalPkgDepsVersion(depsConfig);
23
- }
24
- static async getDepsConfig() {
25
- const configPath = path.join(folder_1.getTemplatesFolder(), "plugins", "resource", "apiconnector");
26
- const sdkConfigPath = path.join(configPath, constants_1.Constants.pkgJsonFile);
27
- const sdkContent = fs.readJsonSync(sdkConfigPath);
28
- return sdkContent.dependencies;
29
- }
30
- static async checkDepsVerSupport(projectPath, component) {
31
- const localPkgPath = path.join(projectPath, component, constants_1.Constants.pkgJsonFile);
32
- // fs.pathExist and fs.readJson in CLI question validation will cause unexpected behaviors
33
- if (!fs.pathExistsSync(localPkgPath)) {
34
- return false;
35
- }
36
- const pkgContent = fs.readJsonSync(localPkgPath);
37
- const depsConfig = await DepsHandler.getDepsConfig();
38
- for (const pkgItem in depsConfig) {
39
- if (!DepsHandler.sdkVersionCheck(pkgContent.dependencies, pkgItem, depsConfig[pkgItem], component)) {
40
- return false;
41
- }
42
- }
43
- return true;
44
- }
45
- async updateLocalPkgDepsVersion(pkgConfig) {
46
- const localPkgPath = path.join(this.projectRoot, this.componentType, constants_1.Constants.pkgJsonFile);
47
- if (!(await fs.pathExists(localPkgPath))) {
48
- throw result_1.ResultFactory.UserError(errors_1.ErrorMessage.localPkgFileNotExistError.name, errors_1.ErrorMessage.localPkgFileNotExistError.message(this.componentType));
49
- }
50
- const pkgContent = await fs.readJson(localPkgPath);
51
- let needUpdate = false;
52
- for (const pkgItem in pkgConfig) {
53
- if (DepsHandler.sdkVersionCheck(pkgContent.dependencies, pkgItem, pkgConfig[pkgItem], this.componentType)) {
54
- pkgContent.dependencies[pkgItem] = pkgConfig[pkgItem];
55
- needUpdate = true;
56
- }
57
- }
58
- if (needUpdate) {
59
- await fs.writeFile(localPkgPath, JSON.stringify(pkgContent, null, 4));
60
- const telemetryProperties = {
61
- [telemetry_1.Telemetry.properties.componentType]: this.componentType,
62
- };
63
- telemetry_1.TelemetryUtils.sendEvent(telemetry_1.Telemetry.stage.updatePkg, undefined, telemetryProperties);
64
- return {
65
- changeType: result_1.FileChangeType.Update,
66
- filePath: localPkgPath,
67
- }; // return modified files
68
- }
69
- return undefined;
70
- }
71
- static sdkVersionCheck(deps, sdkName, sdkVersion, componentType) {
72
- // sdk alpha version
73
- if (DepsHandler.caretPrereleases(deps[sdkName], sdkVersion)) {
74
- return false;
75
- }
76
- // sdk not in dependencies.
77
- else if (!deps[sdkName]) {
78
- return true;
79
- }
80
- // local sdk version intersect with sdk version in config.
81
- else if (semver_1.default.intersects(deps[sdkName], sdkVersion)) {
82
- return false;
83
- }
84
- // local sdk version lager than sdk version in config.
85
- else if (semver_1.default.gte(semver_1.default.minVersion(deps[sdkName]), "1.0.0") &&
86
- semver_1.default.lt(semver_1.default.minVersion(deps[sdkName]), "3.0.0")) {
87
- return false;
88
- }
89
- else {
90
- throw result_1.ResultFactory.UserError(errors_1.ErrorMessage.sdkVersionImcompatibleError.name, errors_1.ErrorMessage.sdkVersionImcompatibleError.message(componentType, deps[sdkName], sdkVersion));
91
- }
92
- }
93
- static caretPrereleases(ver1, ver2) {
94
- if (!semver_1.default.prerelease(ver1) || !semver_1.default.prerelease(ver2)) {
95
- return false;
96
- }
97
- // semver.prerelease an prerelease version return alpha, beta or rc.
98
- // example: semver.prerelease(0.6.0-alpha.12345.0) return ["alpha", "12345", "0"]
99
- if (semver_1.default.prerelease(ver1)[0] != semver_1.default.prerelease(ver2)[0]) {
100
- return false;
101
- }
102
- if (semver_1.default.satisfies(semver_1.default.coerce(ver1).version, `^${semver_1.default.coerce(ver2).version}`)) {
103
- return true;
104
- }
105
- return false;
106
- }
107
- }
108
- exports.DepsHandler = DepsHandler;
109
- //# sourceMappingURL=depsHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"depsHandler.js","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/depsHandler.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;;AAGb,qDAA+B;AAC/B,mDAA6B;AAC7B,4DAA4B;AAC5B,2CAAwC;AACxC,qCAAqE;AACrE,qCAAwC;AACxC,2CAAwD;AACxD,4CAAqD;AACrD,MAAa,WAAW;IAGtB,YAAY,eAAuB,EAAE,aAAqB;QACxD,IAAI,CAAC,WAAW,GAAG,eAAe,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAEM,KAAK,CAAC,UAAU;QACrB,MAAM,UAAU,GAAS,MAAM,WAAW,CAAC,aAAa,EAAE,CAAC;QAC3D,OAAO,MAAM,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC;IAC1D,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,aAAa;QAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,IA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O,KAAK,CAAC;IACf,CAAC;CACF;AAlID,kCAkIC"}
@@ -1,21 +0,0 @@
1
- import { LocalEnvs } from "../../../common/local/localEnvProvider";
2
- import { ApiConnectorConfiguration } from "./config";
3
- import { FileChange } from "./result";
4
- export declare class ApiDataManager {
5
- private apiConnector;
6
- updateLocalApiEnvs(localEnvs: LocalEnvs): LocalEnvs;
7
- addApiEnvs(config: ApiConnectorConfiguration): void;
8
- addBasicEnvs(config: ApiConnectorConfiguration): void;
9
- addAADEnvs(config: ApiConnectorConfiguration): void;
10
- addAPIKeyEnvs(config: ApiConnectorConfiguration): void;
11
- }
12
- export declare class EnvHandler {
13
- private readonly projectRoot;
14
- private readonly componentType;
15
- private apiDataManager;
16
- constructor(workspaceFolder: string, componentType: string);
17
- updateEnvs(config: ApiConnectorConfiguration): void;
18
- saveLocalEnvFile(): Promise<FileChange>;
19
- private updateLocalApiEnvs;
20
- }
21
- //# sourceMappingURL=envHandler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"envHandler.d.ts","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/envHandler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoB,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAiB,yBAAyB,EAAmB,MAAM,UAAU,CAAC;AACrF,OAAO,EAAE,UAAU,EAAiC,MAAM,UAAU,CAAC;AAMrE,qBAAa,cAAc;IACzB,OAAO,CAAC,YAAY,CAAqB;IAClC,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS;IAmBnD,UAAU,CAAC,MAAM,EAAE,yBAAyB;IAgB5C,YAAY,CAAC,MAAM,EAAE,yBAAyB;IAU9C,UAAU,CAAC,MAAM,EAAE,yBAAyB;IAc5C,aAAa,CAAC,MAAM,EAAE,yBAAyB;CAMvD;AACD,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,cAAc,CAAiB;gBAE3B,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IAMnD,UAAU,CAAC,MAAM,EAAE,yBAAyB;IAItC,gBAAgB,IAAI,OAAO,CAAC,UAAU,CAAC;IAkCpD,OAAO,CAAC,kBAAkB;CAI3B"}
@@ -1,128 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- "use strict";
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.EnvHandler = exports.ApiDataManager = void 0;
6
- const tslib_1 = require("tslib");
7
- const fs = tslib_1.__importStar(require("fs-extra"));
8
- const path = tslib_1.__importStar(require("path"));
9
- const localEnvProvider_1 = require("../../../common/local/localEnvProvider");
10
- const result_1 = require("./result");
11
- const constants_1 = require("./constants");
12
- const errors_1 = require("./errors");
13
- const teamsfx_api_1 = require("@microsoft/teamsfx-api");
14
- class ApiDataManager {
15
- constructor() {
16
- this.apiConnector = {};
17
- }
18
- updateLocalApiEnvs(localEnvs) {
19
- const customEnvs = localEnvs.customizedLocalEnvs;
20
- for (const item in this.apiConnector) {
21
- const apis = this.apiConnector[item];
22
- for (const [key, value] of Array.from(apis)) {
23
- if (customEnvs[key]) {
24
- throw result_1.ResultFactory.UserError(errors_1.ErrorMessage.envVarExistError.name, errors_1.ErrorMessage.envVarExistError.message(key));
25
- }
26
- else {
27
- customEnvs[key] = value;
28
- }
29
- }
30
- }
31
- localEnvs.customizedLocalEnvs = customEnvs;
32
- return localEnvs;
33
- }
34
- addApiEnvs(config) {
35
- const apiName = config.APIName.toUpperCase();
36
- if (!this.apiConnector[apiName]) {
37
- this.apiConnector[apiName] = new Map();
38
- }
39
- const endPoint = constants_1.Constants.envPrefix + apiName + "_ENDPOINT";
40
- this.apiConnector[apiName].set(endPoint, config.EndPoint);
41
- if (config.AuthConfig.AuthType === constants_1.AuthType.BASIC) {
42
- this.addBasicEnvs(config);
43
- }
44
- else if (config.AuthConfig.AuthType === constants_1.AuthType.AAD) {
45
- this.addAADEnvs(config);
46
- }
47
- else if (config.AuthConfig.AuthType === constants_1.AuthType.APIKEY) {
48
- this.addAPIKeyEnvs(config);
49
- }
50
- }
51
- addBasicEnvs(config) {
52
- const apiName = config.APIName.toUpperCase();
53
- const apiConfig = this.apiConnector[apiName];
54
- const userName = constants_1.Constants.envPrefix + apiName + "_USERNAME";
55
- const passWd = constants_1.Constants.envPrefix + apiName + "_PASSWORD";
56
- const authConfig = config.AuthConfig;
57
- apiConfig.set(userName, authConfig.UserName);
58
- apiConfig.set(passWd, "");
59
- }
60
- addAADEnvs(config) {
61
- const apiName = config.APIName.toUpperCase();
62
- const apiConfig = this.apiConnector[apiName];
63
- const authConfig = config.AuthConfig;
64
- if (!authConfig.ReuseTeamsApp) {
65
- const tenantId = constants_1.Constants.envPrefix + apiName + "_TENANT_ID";
66
- const clientId = constants_1.Constants.envPrefix + apiName + "_CLIENT_ID";
67
- const clientSecret = constants_1.Constants.envPrefix + apiName + "_CLIENT_SECRET";
68
- apiConfig.set(tenantId, authConfig.TenantId);
69
- apiConfig.set(clientId, authConfig.ClientId);
70
- apiConfig.set(clientSecret, "");
71
- }
72
- }
73
- addAPIKeyEnvs(config) {
74
- const apiName = config.APIName.toUpperCase();
75
- const apiConfig = this.apiConnector[apiName];
76
- const apiKey = constants_1.Constants.envPrefix + apiName + "_API_KEY";
77
- apiConfig.set(apiKey, "");
78
- }
79
- }
80
- exports.ApiDataManager = ApiDataManager;
81
- class EnvHandler {
82
- constructor(workspaceFolder, componentType) {
83
- this.projectRoot = workspaceFolder;
84
- this.componentType = componentType;
85
- this.apiDataManager = new ApiDataManager();
86
- }
87
- updateEnvs(config) {
88
- this.apiDataManager.addApiEnvs(config);
89
- }
90
- async saveLocalEnvFile() {
91
- const srcFile = path.join(this.projectRoot, this.componentType, constants_1.Constants.envFileName);
92
- let fileChangeType = result_1.FileChangeType.Update;
93
- if (!(await fs.pathExists(srcFile))) {
94
- await fs.createFile(srcFile);
95
- fileChangeType = result_1.FileChangeType.Create;
96
- }
97
- // update localEnvs
98
- try {
99
- const provider = new localEnvProvider_1.LocalEnvProvider(this.projectRoot);
100
- if (this.componentType === constants_1.ComponentType.BOT) {
101
- let localEnvsBot = await provider.loadBotLocalEnvs();
102
- localEnvsBot = this.updateLocalApiEnvs(localEnvsBot);
103
- await provider.saveLocalEnvs(undefined, undefined, localEnvsBot);
104
- }
105
- else if (this.componentType === constants_1.ComponentType.API) {
106
- let localEnvsBE = await provider.loadBackendLocalEnvs();
107
- localEnvsBE = this.updateLocalApiEnvs(localEnvsBE);
108
- await provider.saveLocalEnvs(undefined, localEnvsBE, undefined);
109
- }
110
- }
111
- catch (err) {
112
- if (err instanceof teamsfx_api_1.UserError) {
113
- throw err;
114
- }
115
- throw result_1.ResultFactory.SystemError(errors_1.ErrorMessage.ApiConnectorFileCreateFailError.name, errors_1.ErrorMessage.ApiConnectorFileCreateFailError.message(srcFile));
116
- }
117
- return {
118
- changeType: fileChangeType,
119
- filePath: srcFile,
120
- }; // return modified env file
121
- }
122
- updateLocalApiEnvs(localEnvs) {
123
- const res = this.apiDataManager.updateLocalApiEnvs(localEnvs);
124
- return res;
125
- }
126
- }
127
- exports.EnvHandler = EnvHandler;
128
- //# sourceMappingURL=envHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"envHandler.js","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/envHandler.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;;AAEb,qDAA+B;AAC/B,mDAA6B;AAC7B,6EAAqF;AAErF,qCAAqE;AACrE,2CAAiE;AACjE,qCAAwC;AACxC,wDAAmD;AAGnD,MAAa,cAAc;IAA3B;QACU,iBAAY,GAAkB,EAAE,CAAC;IAkE3C,CAAC;IAjEQ,kBAAkB,CAAC,SAAoB;QAC5C,MAAM,UAAU,GAAG,SAAS,CAAC,mBAAmB,CAAC;QACjD,KAAK,MAAM,IAAI,IAAI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I,CAAC,aAAa,KAAK,yBAAa,CAAC,GAAG,EAAE;gBAC5C,IAAI,YAAY,GAAc,MAAM,QAAQ,CAAC,gBAAgB,EAAE,CAAC;gBAChE,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;gBACrD,MAAM,QAAQ,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;aAClE;iBAAM,IAAI,IAAI,CAAC,aAAa,KAAK,yBAAa,CAAC,GAAG,EAAE;gBACnD,IAAI,WAAW,GAAc,MAAM,QAAQ,CAAC,oBAAoB,EAAE,CAAC;gBACnE,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;gBACnD,MAAM,QAAQ,CAAC,aAAa,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;aACjE;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,YAAY,uBAAS,EAAE;gBAC5B,MAAM,GAAG,CAAC;aACX;YACD,MAAM,sBAAa,CAAC,WAAW,CAC7B,qBAAY,CAAC,+BAA+B,CAAC,IAAI,EACjD,qBAAY,CAAC,+BAA+B,CAAC,OAAO,CAAC,OAAO,CAAC,CAC9D,CAAC;SACH;QACD,OAAO;YACL,UAAU,EAAE,cAAc;YAC1B,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC,2BAA2B;IAChC,CAAC;IAEO,kBAAkB,CAAC,SAAoB;QAC7C,MAAM,GAAG,GAAc,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;QACzE,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AArDD,gCAqDC"}
@@ -1,53 +0,0 @@
1
- import { ApiConnectionMsg } from "./result";
2
- export declare class ErrorMessage {
3
- static getMessages(key: string, ...params: any[]): ApiConnectionMsg;
4
- static readonly ApiConnectorInputError: {
5
- name: string;
6
- message: (key: string) => ApiConnectionMsg;
7
- };
8
- static readonly ApiConnectorPathError: {
9
- name: string;
10
- message: (pathName: string) => ApiConnectionMsg;
11
- };
12
- static readonly ApiConnectorFileCreateFailError: {
13
- name: string;
14
- message: (pathName: string) => ApiConnectionMsg;
15
- };
16
- static readonly ApiConnectorRouteError: {
17
- name: string;
18
- message: (funcName: string) => ApiConnectionMsg;
19
- };
20
- static readonly SampleCodeCreateFailError: {
21
- name: string;
22
- message: (pathName: string, reason: string) => ApiConnectionMsg;
23
- };
24
- static readonly NoValidCompoentExistError: {
25
- name: string;
26
- message: () => ApiConnectionMsg;
27
- };
28
- static readonly NoActivePluginsExistError: {
29
- name: string;
30
- message: () => ApiConnectionMsg;
31
- };
32
- static readonly generateApiConFilesError: {
33
- name: string;
34
- message: (reason: string) => ApiConnectionMsg;
35
- };
36
- static readonly sdkVersionImcompatibleError: {
37
- name: string;
38
- message: (component: string, localVersion: string, targetVersion: string) => ApiConnectionMsg;
39
- };
40
- static readonly localPkgFileNotExistError: {
41
- name: string;
42
- message: (component: string) => ApiConnectionMsg;
43
- };
44
- static readonly componentNotExistError: {
45
- name: string;
46
- message: (component: string) => ApiConnectionMsg;
47
- };
48
- static readonly envVarExistError: {
49
- name: string;
50
- message: (varName: string) => ApiConnectionMsg;
51
- };
52
- }
53
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,qBAAa,YAAY;WACT,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,GAAG,gBAAgB;IAO1E,gBAAuB,sBAAsB;;uBAE5B,MAAM,KAAG,gBAAgB;MAExC;IAEF,gBAAuB,qBAAqB;;4BAEtB,MAAM,KAAG,gBAAgB;MAE7C;IAEF,gBAAuB,+BAA+B;;4BAEhC,MAAM,KAAG,gBAAgB;MAE7C;IAEF,gBAAuB,sBAAsB;;4BAEvB,MAAM,KAAG,gBAAgB;MAE7C;IAEF,gBAAuB,yBAAyB;;4BAE1B,MAAM,UAAU,MAAM,KAAG,gBAAgB;MAE7D;IAEF,gBAAuB,yBAAyB;;uBAEjC,gBAAgB;MAE7B;IAEF,gBAAuB,yBAAyB;;uBAEjC,gBAAgB;MAE7B;IAEF,gBAAuB,wBAAwB;;0BAE3B,MAAM,KAAG,gBAAgB;MAE3C;IAEF,gBAAuB,2BAA2B;;6BAE3B,MAAM,gBAAgB,MAAM,iBAAiB,MAAM,KAAG,gBAAgB;MAO3F;IAEF,gBAAuB,yBAAyB;;6BAEzB,MAAM,KAAG,gBAAgB;MAE9C;IAEF,gBAAuB,sBAAsB;;6BAEtB,MAAM,KAAG,gBAAgB;MAE9C;IAEF,gBAAuB,gBAAgB;;2BAElB,MAAM,KAAG,gBAAgB;MAE5C;CACH"}
@@ -1,64 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- "use strict";
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.ErrorMessage = void 0;
6
- const localizeUtils_1 = require("../../../common/localizeUtils");
7
- class ErrorMessage {
8
- static getMessages(key, ...params) {
9
- return {
10
- defaultMsg: localizeUtils_1.getDefaultString(key, ...params),
11
- localizedMsg: localizeUtils_1.getLocalizedString(key, ...params),
12
- };
13
- }
14
- }
15
- exports.ErrorMessage = ErrorMessage;
16
- ErrorMessage.ApiConnectorInputError = {
17
- name: "ApiConnectorInputError",
18
- message: (key) => ErrorMessage.getMessages("error.apiConnector.ApiConnectorInputError", key),
19
- };
20
- ErrorMessage.ApiConnectorPathError = {
21
- name: "ApiConnectorPathNotExistError",
22
- message: (pathName) => ErrorMessage.getMessages("error.apiConnector.ApiConnectorPathNotExistError", pathName),
23
- };
24
- ErrorMessage.ApiConnectorFileCreateFailError = {
25
- name: "ApiConnectorCreateFileFail",
26
- message: (pathName) => ErrorMessage.getMessages("error.apiConnector.ApiConnectorCreateFileFail", pathName),
27
- };
28
- ErrorMessage.ApiConnectorRouteError = {
29
- name: "ApiConnectorFunctionRouteError",
30
- message: (funcName) => ErrorMessage.getMessages("error.apiConnector.ApiConnectorFunctionRouteError", funcName),
31
- };
32
- ErrorMessage.SampleCodeCreateFailError = {
33
- name: "SampleCodeCreateFailError",
34
- message: (pathName, reason) => ErrorMessage.getMessages("error.apiConnector.SampleCodeCreateFailError", pathName, reason),
35
- };
36
- ErrorMessage.NoValidCompoentExistError = {
37
- name: "NoBotOrFunctionExistError",
38
- message: () => ErrorMessage.getMessages("error.apiConnector.NoBotOrFunctionExistError"),
39
- };
40
- ErrorMessage.NoActivePluginsExistError = {
41
- name: "NoActivePluginsExistError",
42
- message: () => ErrorMessage.getMessages("error.apiConnector.NoActivePluginsExistError"),
43
- };
44
- ErrorMessage.generateApiConFilesError = {
45
- name: "ScaffoldApiFilesError",
46
- message: (reason) => ErrorMessage.getMessages("error.apiConnector.ScaffoldApiFilesError", reason),
47
- };
48
- ErrorMessage.sdkVersionImcompatibleError = {
49
- name: "SDKVersionImcompatibleError",
50
- message: (component, localVersion, targetVersion) => ErrorMessage.getMessages("error.apiConnector.SDKVersionImcompatibleError", component, localVersion, targetVersion),
51
- };
52
- ErrorMessage.localPkgFileNotExistError = {
53
- name: "pkgFileNotExistError",
54
- message: (component) => ErrorMessage.getMessages("error.apiConnector.pkgFileNotExistError", component),
55
- };
56
- ErrorMessage.componentNotExistError = {
57
- name: "componentNotExistError",
58
- message: (component) => ErrorMessage.getMessages("error.apiConnector.componentNotExistError", component),
59
- };
60
- ErrorMessage.envVarExistError = {
61
- name: "envVarExistError",
62
- message: (varName) => ErrorMessage.getMessages("error.apiConnector.envVarExistError", varName),
63
- };
64
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/errors.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAk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AAW,CAAC,8CAA8C,CAAC;CAC3E,CAAC;AAEqB,sCAAyB,GAAG;IACjD,IAAI,EAAE,2BAA2B;IACjC,OAAO,EAAE,GAAqB,EAAE,CAC9B,YAAY,CAAC,WAAW,CAAC,8CAA8C,CAAC;CAC3E,CAAC;AAEqB,qCAAwB,GAAG;IAChD,IAAI,EAAE,uBAAuB;IAC7B,OAAO,EAAE,CAAC,MAAc,EAAoB,EAAE,CAC5C,YAAY,CAAC,WAAW,CAAC,0CAA0C,EAAE,MAAM,CAAC;CAC/E,CAAC;AAEqB,wCAA2B,GAAG;IACnD,IAAI,EAAE,6BAA6B;IACnC,OAAO,EAAE,CAAC,SAAiB,EAAE,YAAoB,EAAE,aAAqB,EAAoB,EAAE,CAC5F,YAAY,CAAC,WAAW,CACtB,gDAAgD,EAChD,SAAS,EACT,YAAY,EACZ,aAAa,CACd;CACJ,CAAC;AAEqB,sCAAyB,GAAG;IACjD,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,CAAC,SAAiB,EAAoB,EAAE,CAC/C,YAAY,CAAC,WAAW,CAAC,yCAAyC,EAAE,SAAS,CAAC;CACjF,CAAC;AAEqB,mCAAsB,GAAG;IAC9C,IAAI,EAAE,wBAAwB;IAC9B,OAAO,EAAE,CAAC,SAAiB,EAAoB,EAAE,CAC/C,YAAY,CAAC,WAAW,CAAC,2CAA2C,EAAE,SAAS,CAAC;CACnF,CAAC;AAEqB,6BAAgB,GAAG;IACxC,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,CAAC,OAAe,EAAoB,EAAE,CAC7C,YAAY,CAAC,WAAW,CAAC,qCAAqC,EAAE,OAAO,CAAC;CAC3E,CAAC"}
@@ -1,41 +0,0 @@
1
- import { Inputs, LogProvider, OptionItem, PluginContext, TelemetryReporter, Question, ValidationSchema, TextInputQuestion, MultiSelectQuestion, ContextV3 } from "@microsoft/teamsfx-api";
2
- export interface IQuestionService {
3
- condition?(parentAnswerPath: string): {
4
- target?: string;
5
- } & ValidationSchema;
6
- getQuestion(ctx: PluginContext): Question;
7
- }
8
- export declare class BaseQuestionService {
9
- protected readonly logger: LogProvider | undefined;
10
- protected readonly telemetryReporter: TelemetryReporter | undefined;
11
- constructor(telemetryReporter?: TelemetryReporter, logger?: LogProvider);
12
- }
13
- export declare class ComponentsQuestion extends BaseQuestionService implements IQuestionService {
14
- protected readonly ctx: ContextV3;
15
- protected readonly components: OptionItem[];
16
- protected readonly projectPath: string;
17
- constructor(ctx: ContextV3, inputs: Inputs, telemetryReporter?: TelemetryReporter, logger?: LogProvider);
18
- getQuestion(): MultiSelectQuestion;
19
- }
20
- export declare class ApiNameQuestion extends BaseQuestionService implements IQuestionService {
21
- protected readonly ctx: ContextV3 | undefined;
22
- constructor(ctx?: ContextV3, telemetryReporter?: TelemetryReporter, logger?: LogProvider);
23
- getQuestion(): TextInputQuestion;
24
- }
25
- export declare function apiEndpointQuestion(): TextInputQuestion;
26
- export declare function basicAuthUsernameQuestion(): TextInputQuestion;
27
- export declare function appTenantIdQuestion(): TextInputQuestion;
28
- export declare function appIdQuestion(): TextInputQuestion;
29
- export declare function buildAPIKeyNameQuestion(): TextInputQuestion;
30
- export declare function reuseAppOption(): OptionItem;
31
- export declare function anotherAppOption(): OptionItem;
32
- export declare function requestHeaderOption(): OptionItem;
33
- export declare function queryParamsOption(): OptionItem;
34
- export declare function botOption(): OptionItem;
35
- export declare function functionOption(): OptionItem;
36
- export declare function BasicAuthOption(): OptionItem;
37
- export declare function CertAuthOption(): OptionItem;
38
- export declare function AADAuthOption(): OptionItem;
39
- export declare function APIKeyAuthOption(): OptionItem;
40
- export declare function ImplementMyselfOption(): OptionItem;
41
- //# sourceMappingURL=questions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"questions.d.ts","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/questions.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,MAAM,EACN,WAAW,EACX,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,QA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