@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,262 +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.ImplementMyselfOption = exports.APIKeyAuthOption = exports.AADAuthOption = exports.CertAuthOption = exports.BasicAuthOption = exports.functionOption = exports.botOption = exports.queryParamsOption = exports.requestHeaderOption = exports.anotherAppOption = exports.reuseAppOption = exports.buildAPIKeyNameQuestion = exports.appIdQuestion = exports.appTenantIdQuestion = exports.basicAuthUsernameQuestion = exports.apiEndpointQuestion = exports.ApiNameQuestion = exports.ComponentsQuestion = exports.BaseQuestionService = void 0;
6
- const teamsfx_api_1 = require("@microsoft/teamsfx-api");
7
- const constants_1 = require("./constants");
8
- const localizeUtils_1 = require("../../../common/localizeUtils");
9
- const checker_1 = require("./checker");
10
- const depsHandler_1 = require("./depsHandler");
11
- const utils_1 = require("./utils");
12
- const result_1 = require("./result");
13
- const errors_1 = require("./errors");
14
- const projectSettingsHelperV3_1 = require("../../../common/projectSettingsHelperV3");
15
- const telemetry_1 = require("./telemetry");
16
- class BaseQuestionService {
17
- constructor(telemetryReporter, logger) {
18
- this.telemetryReporter = telemetryReporter;
19
- this.logger = logger;
20
- }
21
- }
22
- exports.BaseQuestionService = BaseQuestionService;
23
- class ComponentsQuestion extends BaseQuestionService {
24
- constructor(ctx, inputs, telemetryReporter, logger) {
25
- super(telemetryReporter, logger);
26
- this.ctx = ctx;
27
- telemetry_1.TelemetryUtils.init(ctx.telemetryReporter);
28
- this.projectPath = inputs.projectPath;
29
- this.components = [];
30
- if (inputs.platform === teamsfx_api_1.Platform.CLI_HELP) {
31
- this.components.push(botOption());
32
- this.components.push(functionOption());
33
- }
34
- else {
35
- if (projectSettingsHelperV3_1.hasBot(ctx.projectSetting)) {
36
- this.components.push(botOption());
37
- }
38
- if (projectSettingsHelperV3_1.hasApi(ctx.projectSetting)) {
39
- this.components.push(functionOption());
40
- }
41
- if (this.components.length === 0) {
42
- throw result_1.ResultFactory.UserError(errors_1.ErrorMessage.NoValidCompoentExistError.name, errors_1.ErrorMessage.NoValidCompoentExistError.message());
43
- }
44
- }
45
- }
46
- getQuestion() {
47
- return {
48
- type: "multiSelect",
49
- name: constants_1.Constants.questionKey.componentsSelect,
50
- title: localizeUtils_1.getLocalizedString("plugins.apiConnector.whichService.title"),
51
- staticOptions: this.components,
52
- onDidChangeSelection: async (currentSelectedIds) => {
53
- var _a;
54
- if (!this.ctx || !this.projectPath) {
55
- return currentSelectedIds;
56
- }
57
- for (const item of currentSelectedIds) {
58
- try {
59
- await depsHandler_1.DepsHandler.checkDepsVerSupport(this.projectPath, item);
60
- }
61
- catch (err) {
62
- const errMsg = err.message;
63
- (_a = this.ctx.userInteraction) === null || _a === void 0 ? void 0 : _a.showMessage("warn", errMsg, false, "OK", utils_1.Notification.READ_MORE());
64
- currentSelectedIds.delete(item);
65
- // this only send on vscode extension
66
- utils_1.sendErrorTelemetry(err, telemetry_1.Telemetry.stage.questionModel);
67
- }
68
- }
69
- return currentSelectedIds;
70
- },
71
- validation: {
72
- validFunc: async (inputs, previousInputs) => {
73
- const projectPath = previousInputs === null || previousInputs === void 0 ? void 0 : previousInputs.projectPath;
74
- for (const item of inputs) {
75
- try {
76
- await depsHandler_1.DepsHandler.checkDepsVerSupport(projectPath, item);
77
- }
78
- catch (err) {
79
- // this only send on cli
80
- utils_1.sendErrorTelemetry(err, telemetry_1.Telemetry.stage.questionModel);
81
- return err.message;
82
- }
83
- }
84
- return checker_1.checkEmptySelect(inputs);
85
- },
86
- },
87
- placeholder: localizeUtils_1.getLocalizedString("plugins.apiConnector.whichService.placeholder"), // Use the placeholder to display some description
88
- };
89
- }
90
- }
91
- exports.ComponentsQuestion = ComponentsQuestion;
92
- class ApiNameQuestion extends BaseQuestionService {
93
- constructor(ctx, telemetryReporter, logger) {
94
- super(telemetryReporter, logger);
95
- this.ctx = ctx;
96
- }
97
- getQuestion() {
98
- return {
99
- type: "text",
100
- name: constants_1.Constants.questionKey.apiName,
101
- title: localizeUtils_1.getLocalizedString("plugins.apiConnector.getQuestionApiName.title"),
102
- placeholder: localizeUtils_1.getLocalizedString("plugins.apiConnector.getQuestionApiName.placeholder"),
103
- validation: {
104
- validFunc: async (input, previousInputs) => {
105
- var _a;
106
- const languageType = (_a = this.ctx) === null || _a === void 0 ? void 0 : _a.projectSetting.programmingLanguage;
107
- const components = previousInputs[constants_1.Constants.questionKey.componentsSelect];
108
- return ((await checker_1.checkEmptyValue(input)) ||
109
- (await checker_1.checkApiNameExist(input, previousInputs === null || previousInputs === void 0 ? void 0 : previousInputs.projectPath, components, languageType)) ||
110
- checker_1.checkApiNameValid(input));
111
- },
112
- },
113
- };
114
- }
115
- }
116
- exports.ApiNameQuestion = ApiNameQuestion;
117
- function apiEndpointQuestion() {
118
- return {
119
- name: constants_1.Constants.questionKey.endpoint,
120
- title: localizeUtils_1.getLocalizedString("plugins.apiConnector.getQuestionEndpoint.title"),
121
- type: "text",
122
- placeholder: localizeUtils_1.getLocalizedString("plugins.apiConnector.getQuestionEndpoint.placeholder"),
123
- validation: {
124
- validFunc: checker_1.checkHttp,
125
- },
126
- forgetLastValue: true,
127
- };
128
- }
129
- exports.apiEndpointQuestion = apiEndpointQuestion;
130
- function basicAuthUsernameQuestion() {
131
- return {
132
- name: constants_1.Constants.questionKey.apiUserName,
133
- title: localizeUtils_1.getLocalizedString("plugins.apiConnector.getQuestion.basicAuth.userName.title"),
134
- type: "text",
135
- placeholder: localizeUtils_1.getLocalizedString("plugins.apiConnector.getQuestion.basicAuth.userName.placeholder"),
136
- validation: {
137
- validFunc: checker_1.checkEmptyValue,
138
- },
139
- };
140
- }
141
- exports.basicAuthUsernameQuestion = basicAuthUsernameQuestion;
142
- function appTenantIdQuestion() {
143
- return {
144
- name: constants_1.Constants.questionKey.apiAppTenentId,
145
- title: localizeUtils_1.getLocalizedString("plugins.apiConnector.appTenantId.title"),
146
- type: "text",
147
- placeholder: localizeUtils_1.getLocalizedString("plugins.apiConnector.appTenantId.placeholder"),
148
- validation: {
149
- validFunc: checker_1.checkIsGuid,
150
- },
151
- };
152
- }
153
- exports.appTenantIdQuestion = appTenantIdQuestion;
154
- function appIdQuestion() {
155
- return {
156
- name: constants_1.Constants.questionKey.apiAppId,
157
- title: localizeUtils_1.getLocalizedString("plugins.apiConnector.appId.title"),
158
- type: "text",
159
- placeholder: localizeUtils_1.getLocalizedString("plugins.apiConnector.appId.placeholder"),
160
- validation: {
161
- validFunc: checker_1.checkIsGuid,
162
- },
163
- };
164
- }
165
- exports.appIdQuestion = appIdQuestion;
166
- function buildAPIKeyNameQuestion() {
167
- return {
168
- name: constants_1.Constants.questionKey.apiAPIKeyName,
169
- title: localizeUtils_1.getLocalizedString("plugins.apiConnector.getQuestion.apiKeyName.title"),
170
- type: "text",
171
- placeholder: localizeUtils_1.getLocalizedString("plugins.apiConnector.getQuestion.apiKeyName.placeholder"),
172
- validation: {
173
- validFunc: checker_1.checkEmptyValue,
174
- },
175
- };
176
- }
177
- exports.buildAPIKeyNameQuestion = buildAPIKeyNameQuestion;
178
- function reuseAppOption() {
179
- return {
180
- id: "existing",
181
- label: localizeUtils_1.getLocalizedString("plugins.apiConnector.reuseAppOption.title"),
182
- };
183
- }
184
- exports.reuseAppOption = reuseAppOption;
185
- function anotherAppOption() {
186
- return {
187
- id: "custom",
188
- label: localizeUtils_1.getLocalizedString("plugins.apiConnector.anotherAppOption.title"),
189
- };
190
- }
191
- exports.anotherAppOption = anotherAppOption;
192
- function requestHeaderOption() {
193
- return {
194
- id: "header",
195
- label: localizeUtils_1.getLocalizedString("plugins.apiConnector.requestHeaderOption.title"),
196
- };
197
- }
198
- exports.requestHeaderOption = requestHeaderOption;
199
- function queryParamsOption() {
200
- return {
201
- id: "querystring",
202
- label: localizeUtils_1.getLocalizedString("plugins.apiConnector.queryParamsOption.title"),
203
- };
204
- }
205
- exports.queryParamsOption = queryParamsOption;
206
- function botOption() {
207
- return {
208
- id: "bot",
209
- label: localizeUtils_1.getLocalizedString("plugins.apiConnector.botOption.title"),
210
- detail: "./bot",
211
- };
212
- }
213
- exports.botOption = botOption;
214
- function functionOption() {
215
- return {
216
- id: "api",
217
- label: localizeUtils_1.getLocalizedString("plugins.apiConnector.functionOption.title"),
218
- detail: "./api",
219
- };
220
- }
221
- exports.functionOption = functionOption;
222
- function BasicAuthOption() {
223
- return {
224
- id: constants_1.AuthType.BASIC,
225
- label: "Basic",
226
- detail: localizeUtils_1.getLocalizedString("plugins.apiConnector.BasicAuthOption.detail"),
227
- };
228
- }
229
- exports.BasicAuthOption = BasicAuthOption;
230
- function CertAuthOption() {
231
- return {
232
- id: constants_1.AuthType.CERT,
233
- label: "Certification",
234
- detail: localizeUtils_1.getLocalizedString("plugins.apiConnector.CertAuthOption.detail"),
235
- };
236
- }
237
- exports.CertAuthOption = CertAuthOption;
238
- function AADAuthOption() {
239
- return {
240
- id: constants_1.AuthType.AAD,
241
- label: "Azure Active Directory",
242
- detail: localizeUtils_1.getLocalizedString("plugins.apiConnector.AADAuthOption.detail"),
243
- };
244
- }
245
- exports.AADAuthOption = AADAuthOption;
246
- function APIKeyAuthOption() {
247
- return {
248
- id: constants_1.AuthType.APIKEY,
249
- label: "API Key",
250
- detail: localizeUtils_1.getLocalizedString("plugins.apiConnector.APIKeyOption.detail"),
251
- };
252
- }
253
- exports.APIKeyAuthOption = APIKeyAuthOption;
254
- function ImplementMyselfOption() {
255
- return {
256
- id: constants_1.AuthType.CUSTOM,
257
- label: "Custom Auth Implementation",
258
- detail: localizeUtils_1.getLocalizedString("plugins.apiConnector.ImplementMyselfOption.detail"),
259
- };
260
- }
261
- exports.ImplementMyselfOption = ImplementMyselfOption;
262
- //# sourceMappingURL=questions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"questions.js","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/questions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AACb,wDAcgC;AAChC,2CAAkD;AAClD,iEAAmE;AACnE,uCAOmB;AACnB,+CAA4C;AAC5C,mCAA2D;AAC3D,qCAAyC;AACzC,qCAAwC;AACxC,qFAAyE;AACzE,2CAAwD;AASxD,MAAa,mBAAmB;IAI9B,YAAY,iBAAqC,EAAE,MAAoB;QACrE,IAAI,CAAC,i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E,eAAe;QACtB,MAAM,EAAE,kCAAkB,CAAC,4CAA4C,CAAC;KACzE,CAAC;AACJ,CAAC;AAND,wCAMC;AAED,SAAgB,aAAa;IAC3B,OAAO;QACL,EAAE,EAAE,oBAAQ,CAAC,GAAG;QAChB,KAAK,EAAE,wBAAwB;QAC/B,MAAM,EAAE,kCAAkB,CAAC,2CAA2C,CAAC;KACxE,CAAC;AACJ,CAAC;AAND,sCAMC;AAED,SAAgB,gBAAgB;IAC9B,OAAO;QACL,EAAE,EAAE,oBAAQ,CAAC,MAAM;QACnB,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,kCAAkB,CAAC,0CAA0C,CAAC;KACvE,CAAC;AACJ,CAAC;AAND,4CAMC;AAED,SAAgB,qBAAqB;IACnC,OAAO;QACL,EAAE,EAAE,oBAAQ,CAAC,MAAM;QACnB,KAAK,EAAE,4BAA4B;QACnC,MAAM,EAAE,kCAAkB,CAAC,mDAAmD,CAAC;KAChF,CAAC;AACJ,CAAC;AAND,sDAMC"}
@@ -1,23 +0,0 @@
1
- import { FxError, SystemError, UserError, Result, QTreeNode } from "@microsoft/teamsfx-api";
2
- export declare type FxResult = Result<any, FxError>;
3
- export declare type ApiConnectorResult = Record<string, any>;
4
- export declare type QuestionResult = Result<QTreeNode | undefined, FxError>;
5
- export interface ApiConnectionMsg {
6
- defaultMsg: string;
7
- localizedMsg: string;
8
- }
9
- export declare enum FileChangeType {
10
- Create = "Create",
11
- Update = "Update"
12
- }
13
- export interface FileChange {
14
- changeType: FileChangeType;
15
- filePath: string;
16
- }
17
- export declare class ResultFactory {
18
- static readonly source: string;
19
- static UserError(name: string, messages: ApiConnectionMsg, innerError?: any, stack?: string, helpLink?: string): UserError;
20
- static SystemError(name: string, messages: ApiConnectionMsg, innerError?: any, stack?: string, issueLink?: string): SystemError;
21
- static Success(result?: any): FxResult;
22
- }
23
- //# sourceMappingURL=result.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/result.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAM,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEhG,oBAAY,QAAQ,GAAG,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAC5C,oBAAY,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACrD,oBAAY,cAAc,GAAG,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC;AACpE,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,cAAc,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,aAAa;IACxB,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAA6B;WAC7C,SAAS,CACrB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,CAAC,EAAE,GAAG,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,GAChB,SAAS;WAWE,WAAW,CACvB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,CAAC,EAAE,GAAG,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,WAAW;WAWA,OAAO,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,QAAQ;CAG9C"}
@@ -1,40 +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.ResultFactory = exports.FileChangeType = void 0;
6
- const teamsfx_api_1 = require("@microsoft/teamsfx-api");
7
- const constants_1 = require("./constants");
8
- var FileChangeType;
9
- (function (FileChangeType) {
10
- FileChangeType["Create"] = "Create";
11
- FileChangeType["Update"] = "Update";
12
- })(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
13
- class ResultFactory {
14
- static UserError(name, messages, innerError, stack, helpLink) {
15
- return new teamsfx_api_1.UserError({
16
- name,
17
- message: messages.defaultMsg,
18
- displayMessage: messages.localizedMsg,
19
- source: this.source,
20
- helpLink,
21
- error: innerError,
22
- });
23
- }
24
- static SystemError(name, messages, innerError, stack, issueLink) {
25
- return new teamsfx_api_1.SystemError({
26
- name,
27
- message: messages.defaultMsg,
28
- displayMessage: messages.localizedMsg,
29
- source: this.source,
30
- issueLink,
31
- error: innerError,
32
- });
33
- }
34
- static Success(result) {
35
- return teamsfx_api_1.ok(result);
36
- }
37
- }
38
- exports.ResultFactory = ResultFactory;
39
- ResultFactory.source = constants_1.Constants.pluginNameShort;
40
- //# sourceMappingURL=result.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"result.js","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/result.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AACb,wDAAgG;AAChG,2CAAwC;AASxC,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;AACnB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAOD,MAAa,aAAa;IAEjB,MAAM,CAAC,SAAS,CACrB,IAAY,EACZ,QAA0B,EAC1B,UAAgB,EAChB,KAAc,EACd,QAAiB;QAEjB,OAAO,IAAI,uBAAS,CAAC;YACnB,IAAI;YACJ,OAAO,EAAE,QAAQ,CAAC,UAAU;YAC5B,cAAc,EAAE,QAAQ,CAAC,YAAY;YACrC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ;YACR,KAAK,EAAE,UAAU;SAClB,CAAC,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,WAAW,CACvB,IAAY,EACZ,QAA0B,EAC1B,UAAgB,EAChB,KAAc,EACd,SAAkB;QAElB,OAAO,IAAI,yBAAW,CAAC;YACrB,IAAI;YACJ,OAAO,EAAE,QAAQ,CAAC,UAAU;YAC5B,cAAc,EAAE,QAAQ,CAAC,YAAY;YACrC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,SAAS;YACT,KAAK,EAAE,UAAU;SAClB,CAAC,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,MAAY;QAChC,OAAO,gBAAE,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;;AAtCH,sCAuCC;AAtCiB,oBAAM,GAAW,qBAAS,CAAC,eAAe,CAAC"}
@@ -1,10 +0,0 @@
1
- import { FileChange } from "./result";
2
- import { ApiConnectorConfiguration } from "./config";
3
- export declare class SampleHandler {
4
- private readonly projectRoot;
5
- private readonly languageExt;
6
- private readonly component;
7
- constructor(projectPath: string, languageType: string, component: string);
8
- generateSampleCode(config: ApiConnectorConfiguration): Promise<FileChange>;
9
- }
10
- //# sourceMappingURL=sampleHandler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sampleHandler.d.ts","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/sampleHandler.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAiC,MAAM,UAAU,CAAC;AAErE,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAW;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBACvB,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAM3D,kBAAkB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,UAAU,CAAC;CAoDxF"}
@@ -1,62 +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.SampleHandler = void 0;
6
- const tslib_1 = require("tslib");
7
- const path = tslib_1.__importStar(require("path"));
8
- const fs = tslib_1.__importStar(require("fs-extra"));
9
- const constants_1 = require("./constants");
10
- const folder_1 = require("../../../folder");
11
- const result_1 = require("./result");
12
- const constants_2 = require("../../../common/constants");
13
- const errors_1 = require("./errors");
14
- const utils_1 = require("./utils");
15
- const tools_1 = require("../../../common/tools");
16
- class SampleHandler {
17
- constructor(projectPath, languageType, component) {
18
- this.projectRoot = projectPath;
19
- this.languageExt = languageType === constants_1.LanguageType.JS ? constants_1.FileType.JS : constants_1.FileType.TS;
20
- this.component = component;
21
- }
22
- async generateSampleCode(config) {
23
- const fileSuffix = this.languageExt;
24
- const baseDirectory = path.join(folder_1.getTemplatesFolder(), "plugins", "resource", "apiconnector", "sample");
25
- const templateDirectory = path.join(baseDirectory, fileSuffix);
26
- const headerCommentTemplateFilePath = path.join(baseDirectory, constants_1.Constants.headerCommentTemplate);
27
- const footerCommentTemplateFilePath = path.join(baseDirectory, constants_1.Constants.footerCommentTemplate);
28
- const templateName = config.AuthConfig.AuthType + constants_1.Constants.templateEx;
29
- const templateFilePath = path.join(templateDirectory, templateName);
30
- try {
31
- const footerCommentString = await fs.readFile(footerCommentTemplateFilePath, constants_2.ConstantString.UTF8Encoding);
32
- const headerCommentString = await fs.readFile(headerCommentTemplateFilePath, constants_2.ConstantString.UTF8Encoding);
33
- let templateString = await fs.readFile(templateFilePath, constants_2.ConstantString.UTF8Encoding);
34
- templateString = `${headerCommentString}\n${templateString}\n${footerCommentString}`;
35
- const context = {
36
- config: config,
37
- capitalName: config.APIName.toUpperCase(),
38
- component: this.component,
39
- languageExt: this.languageExt,
40
- };
41
- const sampleFileName = config.APIName + "." + fileSuffix;
42
- const componentPath = path.join(this.projectRoot, this.component);
43
- const sampleDirPath = utils_1.getSampleDirPath(componentPath);
44
- fs.ensureDir(sampleDirPath);
45
- const sampleFilePath = path.join(sampleDirPath, sampleFileName);
46
- if (await fs.pathExists(sampleFilePath)) {
47
- await fs.remove(sampleFilePath);
48
- }
49
- const sampleFile = tools_1.compileHandlebarsTemplateString(templateString, context);
50
- await fs.writeFile(sampleFilePath, sampleFile);
51
- return {
52
- changeType: result_1.FileChangeType.Create,
53
- filePath: sampleFilePath,
54
- };
55
- }
56
- catch (error) {
57
- throw result_1.ResultFactory.SystemError(errors_1.ErrorMessage.SampleCodeCreateFailError.name, errors_1.ErrorMessage.SampleCodeCreateFailError.message(templateFilePath, error.message));
58
- }
59
- }
60
- }
61
- exports.SampleHandler = SampleHandler;
62
- //# sourceMappingURL=sampleHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sampleHandler.js","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/sampleHandler.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;;AACb,mDAA6B;AAC7B,qDAA+B;AAC/B,2CAAgE;AAChE,4CAAqD;AACrD,qCAAqE;AACrE,yDAA2D;AAE3D,qCAAwC;AACxC,mCAA2C;AAC3C,iDAAwE;AACxE,MAAa,aAAa;IAIxB,YAAY,WAAmB,EAAE,YAAoB,EAAE,SAAiB;QACtE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,YAAY,KAAK,wBAAY,CAAC,EAAE,CAAC,CAAC,CAAC,oBAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,oBAAQ,CAAC,EAAE,CAAC;QAChF,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,MAAiC;QAC/D,MAAM,UAAU,GAAW,IAAI,CAAC,WAAW,CAAC;QAC5C,MAAM,aAAa,GAAG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,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAClE,MAAM,aAAa,GAAG,wBAAgB,CAAC,aAAa,CAAC,CAAC;YACtD,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;YAC5B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;YAChE,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;gBACvC,MAAM,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;aACjC;YACD,MAAM,UAAU,GAAG,uCAA+B,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YAC5E,MAAM,EAAE,CAAC,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;YAC/C,OAAO;gBACL,UAAU,EAAE,uBAAc,CAAC,MAAM;gBACjC,QAAQ,EAAE,cAAc;aACzB,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,sBAAa,CAAC,WAAW,CAC7B,qBAAY,CAAC,yBAAyB,CAAC,IAAI,EAC3C,qBAAY,CAAC,yBAAyB,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,OAAO,CAAC,CAChF,CAAC;SACH;IACH,CAAC;CACF;AA9DD,sCA8DC"}
@@ -1,42 +0,0 @@
1
- import { TelemetryReporter } from "@microsoft/teamsfx-api";
2
- export declare class Telemetry {
3
- static readonly componentName = "fx-resource-api-connector";
4
- static startSuffix: string;
5
- static valueYes: string;
6
- static valueNo: string;
7
- static userError: string;
8
- static systemError: string;
9
- static readonly stage: {
10
- questionModel: string;
11
- scaffold: string;
12
- updatePkg: string;
13
- };
14
- static readonly properties: {
15
- component: string;
16
- success: string;
17
- errorCode: string;
18
- errorType: string;
19
- errorMessage: string;
20
- appid: string;
21
- authType: string;
22
- reuseTeamsApp: string;
23
- keyLocation: string;
24
- componentType: string;
25
- };
26
- }
27
- export declare class TelemetryUtils {
28
- static telemetryReporter?: TelemetryReporter;
29
- static init(telemetryReporter?: TelemetryReporter): void;
30
- static sendEvent(eventName: string, success?: boolean, properties?: {
31
- [key: string]: string;
32
- }, measurements?: {
33
- [key: string]: number;
34
- }): void;
35
- static sendErrorEvent(eventName: string, errorCode: string, errorType: string, errorMessage: string, properties?: {
36
- [key: string]: string;
37
- }, measurements?: {
38
- [key: string]: number;
39
- }): void;
40
- private static addProperties;
41
- }
42
- //# sourceMappingURL=telemetry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG3D,qBAAa,SAAS;IACpB,MAAM,CAAC,QAAQ,CAAC,aAAa,+BAA+B;IAC5D,MAAM,CAAC,WAAW,SAAY;IAC9B,MAAM,CAAC,QAAQ,SAAS;IACxB,MAAM,CAAC,OAAO,SAAQ;IACtB,MAAM,CAAC,SAAS,SAAU;IAC1B,MAAM,CAAC,WAAW,SAAY;IAE9B,MAAM,CAAC,QAAQ,CAAC,KAAK;;;;MAInB;IAEF,MAAM,CAAC,QAAQ,CAAC,UAAU;;;;;;;;;;;MAWxB;CACH;AAED,qBAAa,cAAc;IACzB,MAAM,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;WAE/B,IAAI,CAAC,iBAAiB,CAAC,EAAE,iBAAiB;WAI1C,SAAS,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,OAAO,EACjB,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,EACtC,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;WAY5B,cAAc,CAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,EACtC,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAa1C,OAAO,CAAC,MAAM,CAAC,aAAa;CAS7B"}
@@ -1,70 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TelemetryUtils = exports.Telemetry = void 0;
4
- const globalVars_1 = require("../../../core/globalVars");
5
- class Telemetry {
6
- }
7
- exports.Telemetry = Telemetry;
8
- Telemetry.componentName = "fx-resource-api-connector";
9
- Telemetry.startSuffix = "-start";
10
- Telemetry.valueYes = "yes";
11
- Telemetry.valueNo = "no";
12
- Telemetry.userError = "user";
13
- Telemetry.systemError = "system";
14
- Telemetry.stage = {
15
- questionModel: "question-model",
16
- scaffold: "scaffold",
17
- updatePkg: "update-package",
18
- };
19
- Telemetry.properties = {
20
- component: "component",
21
- success: "success",
22
- errorCode: "error-code",
23
- errorType: "error-type",
24
- errorMessage: "error-message",
25
- appid: "appid",
26
- authType: "auth-type",
27
- reuseTeamsApp: "reuse-teams-app",
28
- keyLocation: "key-location",
29
- componentType: "component-type",
30
- };
31
- class TelemetryUtils {
32
- static init(telemetryReporter) {
33
- TelemetryUtils.telemetryReporter = telemetryReporter;
34
- }
35
- static sendEvent(eventName, success, properties, measurements) {
36
- var _a;
37
- if (!properties) {
38
- properties = {};
39
- }
40
- if (success) {
41
- properties[Telemetry.properties.success] = Telemetry.valueYes;
42
- }
43
- this.addProperties(properties);
44
- (_a = TelemetryUtils.telemetryReporter) === null || _a === void 0 ? void 0 : _a.sendTelemetryEvent(eventName, properties, measurements);
45
- }
46
- static sendErrorEvent(eventName, errorCode, errorType, errorMessage, properties, measurements) {
47
- var _a;
48
- if (!properties) {
49
- properties = {};
50
- }
51
- properties[Telemetry.properties.success] = Telemetry.valueNo;
52
- properties[Telemetry.properties.errorCode] = errorCode;
53
- properties[Telemetry.properties.errorType] = errorType;
54
- properties[Telemetry.properties.errorMessage] = errorMessage;
55
- this.addProperties(properties);
56
- (_a = TelemetryUtils.telemetryReporter) === null || _a === void 0 ? void 0 : _a.sendTelemetryErrorEvent(eventName, properties, measurements);
57
- }
58
- static addProperties(properties) {
59
- properties[Telemetry.properties.component] = Telemetry.componentName;
60
- const appId = globalVars_1.globalVars.teamsAppId;
61
- if (appId) {
62
- properties[Telemetry.properties.appid] = appId;
63
- }
64
- else {
65
- properties[Telemetry.properties.appid] = "";
66
- }
67
- }
68
- }
69
- exports.TelemetryUtils = TelemetryUtils;
70
- //# sourceMappingURL=telemetry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/telemetry.ts"],"names":[],"mappings":";;;AACA,yDAAsD;AAEtD,MAAa,SAAS;;AAAtB,8BA0BC;AAzBiB,uBAAa,GAAG,2BAA2B,CAAC;AACrD,qBAAW,GAAG,QAAQ,CAAC;AACvB,kBAAQ,GAAG,KAAK,CAAC;AACjB,iBAAO,GAAG,IAAI,CAAC;AACf,mBAAS,GAAG,MAAM,CAAC;AACnB,qBAAW,GAAG,QAAQ,CAAC;AAEd,eAAK,GAAG;IACtB,aAAa,EAAE,gBAAgB;IAC/B,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,gBAAgB;CAC5B,CAAC;AAEc,oBAAU,GAAG;IAC3B,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,YAAY;IACvB,YAAY,EAAE,eAAe;IAC7B,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,WAAW;IACrB,aAAa,EAAE,iBAAiB;IAChC,WAAW,EAAE,cAAc;IAC3B,aAAa,EAAE,gBAAgB;CAChC,CAAC;AAGJ,MAAa,cAAc;IAGlB,MAAM,CAAC,IAAI,CAAC,iB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QACrE,MAAM,KAAK,GAAG,uBAAU,CAAC,UAAU,CAAC;QACpC,IAAI,KAAK,EAAE;YACT,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,KAAe,CAAC;SAC1D;aAAM;YACL,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;SAC7C;IACH,CAAC;CACF;AAnDD,wCAmDC"}
@@ -1,18 +0,0 @@
1
- import { Inputs, FxError } from "@microsoft/teamsfx-api";
2
- import { ApiConnectorConfiguration } from "./config";
3
- export declare function generateTempFolder(): string;
4
- export declare function getSampleFileName(apiName: string, languageType: string): string;
5
- export declare function getSampleDirPath(componentPath: string): string;
6
- export declare function copyFileIfExist(srcFile: string, targetFile: string): Promise<void>;
7
- export declare function removeFileIfExist(file: string): Promise<void>;
8
- export declare function sendErrorTelemetry(thrownErr: FxError, stage: string): FxError;
9
- export declare function checkInputEmpty(inputs: Inputs, ...keys: string[]): void;
10
- export declare function concatLines(line: string[], interval?: string): string;
11
- export declare class Notification {
12
- static readonly READ_MORE: () => string;
13
- static readonly READ_MORE_URL = "https://aka.ms/teamsfx-connect-api";
14
- static GetBasicString(projectPath: string, apiName: string, components: string[], languageType: string): string;
15
- static GetLinkNotification(): string;
16
- static getNotificationMsg(projectPath: string, config: ApiConnectorConfiguration, languageType: string): string;
17
- }
18
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAe,MAAM,wBAAwB,CAAC;AAOtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAGrD,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAGtE;AAED,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,UAOrD;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iBAIxE;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,iBAInD;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,WAMnE;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,QAShE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,SAAM,GAAG,MAAM,CAIlE;AAED,qBAAa,YAAY;IACvB,gBAAuB,SAAS,eAA0D;IAC1F,gBAAuB,aAAa,wCAAwC;WAE9D,cAAc,CAC1B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAAE,EACpB,YAAY,EAAE,MAAM,GACnB,MAAM;WAYK,mBAAmB,IAAI,MAAM;WAO7B,kBAAkB,CAC9B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,yBAAyB,EACjC,YAAY,EAAE,MAAM,GACnB,MAAM;CAUV"}