@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,90 +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.Notification = exports.concatLines = exports.checkInputEmpty = exports.sendErrorTelemetry = exports.removeFileIfExist = exports.copyFileIfExist = exports.getSampleDirPath = exports.getSampleFileName = exports.generateTempFolder = void 0;
6
- const tslib_1 = require("tslib");
7
- const teamsfx_api_1 = require("@microsoft/teamsfx-api");
8
- const fs = tslib_1.__importStar(require("fs-extra"));
9
- const constants_1 = require("./constants");
10
- const errors_1 = require("./errors");
11
- const result_1 = require("./result");
12
- const localizeUtils_1 = require("../../../common/localizeUtils");
13
- const path_1 = tslib_1.__importDefault(require("path"));
14
- const telemetry_1 = require("./telemetry");
15
- function generateTempFolder() {
16
- const timestamp = Date.now();
17
- const backupFolderName = "ApiConnectorBackup-" + timestamp;
18
- return backupFolderName;
19
- }
20
- exports.generateTempFolder = generateTempFolder;
21
- function getSampleFileName(apiName, languageType) {
22
- const languageExt = languageType === constants_1.LanguageType.JS ? constants_1.FileType.JS : constants_1.FileType.TS;
23
- return apiName + "." + languageExt;
24
- }
25
- exports.getSampleFileName = getSampleFileName;
26
- function getSampleDirPath(componentPath) {
27
- let basePath = componentPath;
28
- if (fs.pathExistsSync(path_1.default.join(basePath, "src"))) {
29
- basePath = path_1.default.join(basePath, "src");
30
- }
31
- const sampleDirPath = path_1.default.join(basePath, constants_1.Constants.sampleCodeDir);
32
- return sampleDirPath;
33
- }
34
- exports.getSampleDirPath = getSampleDirPath;
35
- async function copyFileIfExist(srcFile, targetFile) {
36
- if (await fs.pathExists(srcFile)) {
37
- await fs.copyFile(srcFile, targetFile);
38
- }
39
- }
40
- exports.copyFileIfExist = copyFileIfExist;
41
- async function removeFileIfExist(file) {
42
- if (await fs.pathExists(file)) {
43
- await fs.remove(file);
44
- }
45
- }
46
- exports.removeFileIfExist = removeFileIfExist;
47
- function sendErrorTelemetry(thrownErr, stage) {
48
- const errorCode = thrownErr.source + "." + thrownErr.name;
49
- const errorType = thrownErr instanceof teamsfx_api_1.SystemError ? telemetry_1.Telemetry.systemError : telemetry_1.Telemetry.userError;
50
- const errorMessage = thrownErr.message;
51
- telemetry_1.TelemetryUtils.sendErrorEvent(stage, errorCode, errorType, errorMessage);
52
- return thrownErr;
53
- }
54
- exports.sendErrorTelemetry = sendErrorTelemetry;
55
- function checkInputEmpty(inputs, ...keys) {
56
- for (const key of keys) {
57
- if (!inputs[key]) {
58
- throw result_1.ResultFactory.SystemError(errors_1.ErrorMessage.ApiConnectorInputError.name, errors_1.ErrorMessage.ApiConnectorInputError.message(key));
59
- }
60
- }
61
- }
62
- exports.checkInputEmpty = checkInputEmpty;
63
- function concatLines(line, interval = " ") {
64
- return line.reduce((prev, cur) => {
65
- return prev + interval + cur;
66
- });
67
- }
68
- exports.concatLines = concatLines;
69
- class Notification {
70
- static GetBasicString(projectPath, apiName, components, languageType) {
71
- const fileName = getSampleFileName(apiName, languageType);
72
- const generatedFiles = concatLines(components.map((item) => {
73
- const sampleDirPath = getSampleDirPath(path_1.default.join(projectPath, item));
74
- return path_1.default.join(path_1.default.relative(projectPath, sampleDirPath), fileName);
75
- }), " and ");
76
- return localizeUtils_1.getLocalizedString("plugins.apiConnector.Notification.GenerateFiles", generatedFiles);
77
- }
78
- static GetLinkNotification() {
79
- return localizeUtils_1.getLocalizedString("plugins.apiConnector.Notification.LinkNotification", Notification.READ_MORE_URL);
80
- }
81
- static getNotificationMsg(projectPath, config, languageType) {
82
- const apiName = config.APIName;
83
- const retMsg = Notification.GetBasicString(projectPath, apiName, config.ComponentType, languageType);
84
- return retMsg;
85
- }
86
- }
87
- exports.Notification = Notification;
88
- Notification.READ_MORE = () => localizeUtils_1.getLocalizedString("core.Notification.ReadMore");
89
- Notification.READ_MORE_URL = "https://aka.ms/teamsfx-connect-api";
90
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/component/feature/apiconnector/utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;;AACb,wDAAsE;AACtE,qDAA+B;AAC/B,2CAAgE;AAChE,qCAAwC;AACxC,qCAAyC;AACzC,iEAAmE;AACnE,wDA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EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CA8KpC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"spfxGenerator.js","sourceRoot":"","sources":["../../../src/component/generator/spfxGenerator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,+CAA8C;AAC9C,wDASgC;AAChC,mDAA6B;AAC7B,gEAA0B;AAC1B,uEAAoE;AACpE,4EAAwE;AACxE,gEAAqE;AACrE,kDAIgC;AAChC,wDAAqD;AACrD,mCAAmC;AACnC,gEAAsF;AACtF,sEAAmE;AACnE,oFAAiF;AACjF,4DAAoD;AACpD,4EAAyE;AACzE,2CAAwC;AACxC,kDAAwD;AACxD,8DAAgE;AAChE,4EAGgD;AAChD,4CAAiD;AAEjD,MAAa,aAAa;IASjB,MAAM,CAAC,KAAK,CAAC,QAAQ,CAC1B,OAAkB,EAClB,MAAc,EACd,eAAuB;QAEvB,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAChF,IAAI,SAAS,CAAC,KAAK,EAAE;YAAE,OAAO,iBAAG,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAEnD,MAAM,WAAW,GAAG,MAAM,qBAAS,CAAC,gBAAgB,CAClD,OAAO,EACP,eAAe,EACf,qBAAS,CAAC,aAAa,EACvB,IAAI,CACL,CAAC;QACF,IAAI,WAAW,CAAC,KAAK,EAAE;YAAE,OAAO,iBAAG,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAEvD,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAClC,OAAkB,EAClB,MAAc,EACd,eAAuB;;QAEvB,MAAM,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC;QACnC,MAAM,eAAe,GA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Ae,CAAC,QAAQ;YAC5C,WAAW,EAAE,qBAAS,CAAC,eAAe;SACvC,CAAC;KACH,CAAC;;;;mCAkBD;AA1BH,sCA8MC"}
@@ -1,12 +0,0 @@
1
- import { FxError, InputsWithProjectPath, ResourceContextV3, ResourceOutputs, Result } from "@microsoft/teamsfx-api";
2
- import { AzureResource } from "./../azureResource";
3
- export declare abstract class AzureAppService extends AzureResource {
4
- abstract readonly name: string;
5
- abstract readonly alias: string;
6
- abstract readonly displayName: string;
7
- abstract readonly bicepModuleName: string;
8
- abstract readonly outputs: ResourceOutputs;
9
- abstract readonly finalOutputKeys: string[];
10
- deploy(context: ResourceContextV3, inputs: InputsWithProjectPath, restart?: boolean, givenResourceIdKey?: string): Promise<Result<undefined, FxError>>;
11
- }
12
- //# sourceMappingURL=azureAppService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureAppService.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureAppService.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,EACP,qBAAqB,EAErB,iBAAiB,EACjB,eAAe,EACf,MAAM,EACP,MAAM,wBAAwB,CAAC;AAUhC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAQnD,8BAAsB,eAAgB,SAAQ,aAAa;IACzD,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAC1C,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAC3C,QAAQ,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IACtC,MAAM,CACV,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,qBAAqB,EAC7B,OAAO,UAAQ,EACf,kBAAkB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;CA2CvC"}
@@ -1,48 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.AzureAppService = void 0;
6
- const tslib_1 = require("tslib");
7
- const teamsfx_api_1 = require("@microsoft/teamsfx-api");
8
- const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
9
- const path = tslib_1.__importStar(require("path"));
10
- const utils_1 = require("../../../common/azure-hosting/utils");
11
- const utils = tslib_1.__importStar(require("./common"));
12
- const error_1 = require("../../error");
13
- const azureResource_1 = require("./../azureResource");
14
- const messages_1 = require("../../messages");
15
- const azureOps_1 = require("../../../common/azure-hosting/azureOps");
16
- const tools_1 = require("../../../common/tools");
17
- class AzureAppService extends azureResource_1.AzureResource {
18
- async deploy(context, inputs, restart = false, givenResourceIdKey) {
19
- const progressBar = context.userInteraction.createProgressBar(messages_1.ProgressTitles.deploying(this.displayName, inputs.scenario), 2);
20
- await progressBar.start();
21
- try {
22
- // Preconditions checking.
23
- if (!inputs.projectPath || !inputs.artifactFolder) {
24
- throw new error_1.PreconditionError(this.alias, messages_1.ErrorMessage.WorkingDirIsMissing, []);
25
- }
26
- const publishDir = path.resolve(inputs.projectPath, inputs.artifactFolder);
27
- const packDirExisted = await fs_extra_1.default.pathExists(publishDir);
28
- if (!packDirExisted) {
29
- throw new error_1.PackDirectoryExistenceError(this.alias);
30
- }
31
- const state = context.envInfo.state[inputs.componentId];
32
- const resourceIdKey = givenResourceIdKey || this.outputs.resourceId.key;
33
- const resourceId = error_1.CheckThrowSomethingMissing(this.name, resourceIdKey, state[resourceIdKey]);
34
- await progressBar.next(messages_1.ProgressMessages.packingCode());
35
- const zipBuffer = await utils.zipFolderAsync(publishDir, "");
36
- const client = await utils_1.azureWebSiteDeploy(resourceId, context.tokenProvider, zipBuffer, context.logProvider, progressBar);
37
- if (restart) {
38
- await azureOps_1.AzureOperations.restartWebApp(client, tools_1.getResourceGroupNameFromResourceId(resourceId), tools_1.getSiteNameFromResourceId(resourceId), context.logProvider);
39
- }
40
- }
41
- finally {
42
- progressBar.end(true);
43
- }
44
- return teamsfx_api_1.ok(undefined);
45
- }
46
- }
47
- exports.AzureAppService = AzureAppService;
48
- //# sourceMappingURL=azureAppService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureAppService.js","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureAppService.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAOgC;AAChC,gEAA0B;AAC1B,mDAA6B;AAC7B,+DAAyE;AACzE,wDAAkC;AAClC,uCAIqB;AACrB,sDAAmD;AACnD,6CAAgF;AAChF,qEAAyE;AACzE,iDAG+B;AAE/B,MAAsB,eAAgB,SAAQ,6BAAa;IAOzD,KAAK,CAAC,MAAM,CACV,OAA0B,EAC1B,MAA6B,EAC7B,OAAO,GAAG,KAAK,EACf,kBAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAC3D,yBAAc,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,EAC3D,CAAC,CACF,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,EAAE,CAAC;QAC1B,IAAI;YACF,0BAA0B;YAC1B,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;gBACjD,MAAM,IAAI,yBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,uBAAY,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;aAC/E;YACD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;YAC3E,MAAM,cAAc,GAAG,MAAM,kBAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YACvD,IAAI,CAAC,cAAc,EAAE;gBACnB,MAAM,IAAI,mCAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACnD;YAED,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACxD,MAAM,aAAa,GAAG,kBAAkB,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;YACxE,MAAM,UAAU,GAAG,kCAA0B,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;YAC9F,MAAM,WAAW,CAAC,IAAI,CAAC,2BAAgB,CAAC,WAAW,EAAE,CAAC,CAAC;YACvD,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAE7D,MAAM,MAAM,GAAG,MAAM,0BAAkB,CACrC,UAAU,EACV,OAAO,CAAC,aAAa,EACrB,SAAS,EACT,OAAO,CAAC,WAAW,EACnB,WAAW,CACZ,CAAC;YACF,IAAI,OAAO,EAAE;gBACX,MAAM,0BAAe,CAAC,aAAa,CACjC,MAAM,EACN,0CAAkC,CAAC,UAAU,CAAC,EAC9C,iCAAyB,CAAC,UAAU,CAAC,EACrC,OAAO,CAAC,WAAW,CACpB,CAAC;aACH;SACF;gBAAS;YACR,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SACvB;QACD,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC;CACF;AAvDD,0CAuDC"}
@@ -1,36 +0,0 @@
1
- import { FxError, InputsWithProjectPath, ResourceContextV3, Result } from "@microsoft/teamsfx-api";
2
- import { AzureAppService } from "./azureAppService";
3
- import { Site } from "@azure/arm-appservice";
4
- export declare class AzureFunctionResource extends AzureAppService {
5
- readonly name = "azure-function";
6
- readonly alias = "Functions";
7
- readonly displayName = "Azure Functions";
8
- readonly bicepModuleName = "azureFunction";
9
- outputs: {
10
- resourceId: {
11
- key: string;
12
- bicepVariable: string;
13
- };
14
- endpoint: {
15
- key: string;
16
- bicepVariable: string;
17
- };
18
- endpointAsParam: {
19
- key: string;
20
- bicepVariable: string;
21
- };
22
- };
23
- finalOutputKeys: string[];
24
- templateContext: {
25
- identity: {
26
- resourceId: string;
27
- };
28
- };
29
- configure(context: ResourceContextV3, inputs: InputsWithProjectPath): Promise<Result<undefined, FxError>>;
30
- deploy(context: ResourceContextV3, inputs: InputsWithProjectPath): Promise<Result<undefined, FxError>>;
31
- private needConfigure;
32
- private collectFunctionAppSettings;
33
- ensureFunctionAllowAppIds(site: Site, clientIds: string[]): void;
34
- private pushAppSettings;
35
- }
36
- //# sourceMappingURL=azureFunction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureFunction.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureFunction.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,EACP,qBAAqB,EAErB,iBAAiB,EACjB,MAAM,EACP,MAAM,wBAAwB,CAAC;AAWhC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpD,OAAO,EAAiB,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAO5D,qBACa,qBAAsB,SAAQ,eAAe;IACxD,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,KAAK,eAAe;IAC7B,QAAQ,CAAC,WAAW,qBAAqB;IACzC,QAAQ,CAAC,eAAe,mBAAmB;IAC3C,OAAO;;;;;;;;;;;;;MAAmB;IAC1B,eAAe,WAA8B;IAC7C,eAAe;;;;MAIb;IAMI,SAAS,CACb,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IA8ChC,MAAM,CACV,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAetC,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,0BAA0B;IAe3B,yBAAyB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI;IA0BvE,OAAO,CAAC,eAAe;CAqBxB"}
@@ -1,155 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.AzureFunctionResource = void 0;
6
- const tslib_1 = require("tslib");
7
- const teamsfx_api_1 = require("@microsoft/teamsfx-api");
8
- const typedi_1 = require("typedi");
9
- const workflow_1 = require("../../workflow");
10
- const constants_1 = require("../../constants");
11
- const azureAppService_1 = require("./azureAppService");
12
- const error_1 = require("../../error");
13
- const tools_1 = require("../../../common/tools");
14
- const lib_1 = require("@feathersjs/hooks/lib");
15
- const actionExecutionMW_1 = require("../../middleware/actionExecutionMW");
16
- const messages_1 = require("../../messages");
17
- const azureLibs_1 = require("./azureLibs");
18
- const ErrorSource = "Functions";
19
- let AzureFunctionResource = class AzureFunctionResource extends azureAppService_1.AzureAppService {
20
- constructor() {
21
- super(...arguments);
22
- this.name = "azure-function";
23
- this.alias = ErrorSource;
24
- this.displayName = "Azure Functions";
25
- this.bicepModuleName = "azureFunction";
26
- this.outputs = constants_1.FunctionOutputs;
27
- this.finalOutputKeys = ["resourceId", "endpoint"];
28
- this.templateContext = {
29
- identity: {
30
- resourceId: constants_1.IdentityOutputs.identityResourceId.bicepVariable,
31
- },
32
- };
33
- }
34
- async configure(context, inputs) {
35
- var e_1, _a;
36
- var _b;
37
- if (!this.needConfigure(context)) {
38
- return teamsfx_api_1.ok(undefined);
39
- }
40
- context.logProvider.info(messages_1.LogMessages.updateFunctionAppSettings);
41
- const resourceId = error_1.CheckThrowSomethingMissing(this.alias, "resourceId", (_b = context.envInfo.state[constants_1.ComponentNames.TeamsApi]) === null || _b === void 0 ? void 0 : _b[constants_1.FunctionOutputs.resourceId.key]);
42
- const credentials = error_1.CheckThrowSomethingMissing(this.alias, "Azure account", await context.tokenProvider.azureAccountProvider.getIdentityCredentialAsync());
43
- const resourceGroupName = tools_1.getResourceGroupNameFromResourceId(resourceId);
44
- const functionAppName = tools_1.getSiteNameFromResourceId(resourceId);
45
- const subscriptionId = tools_1.getSubscriptionIdFromResourceId(resourceId);
46
- const client = azureLibs_1.AzureClientFactory.getWebSiteManagementClient(credentials, subscriptionId);
47
- let site = undefined;
48
- try {
49
- for (var _c = tslib_1.__asyncValues(client.webApps.listByResourceGroup(resourceGroupName).byPage()), _d; _d = await _c.next(), !_d.done;) {
50
- const page = _d.value;
51
- for (const webApp of page) {
52
- if (webApp.name === functionAppName) {
53
- site = webApp;
54
- }
55
- }
56
- }
57
- }
58
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
59
- finally {
60
- try {
61
- if (_d && !_d.done && (_a = _c.return)) await _a.call(_c);
62
- }
63
- finally { if (e_1) throw e_1.error; }
64
- }
65
- if (!site) {
66
- throw new error_1.FindFunctionAppError(this.alias);
67
- }
68
- const settings = await client.webApps.listApplicationSettings(resourceGroupName, functionAppName);
69
- if (settings === null || settings === void 0 ? void 0 : settings.properties) {
70
- Object.entries(settings.properties).forEach((kv) => {
71
- this.pushAppSettings(site, kv[0], kv[1], false);
72
- });
73
- }
74
- this.collectFunctionAppSettings(context, site);
75
- await client.webApps.update(resourceGroupName, functionAppName, site);
76
- return teamsfx_api_1.ok(undefined);
77
- }
78
- async deploy(context, inputs) {
79
- let resourceIdKey = this.outputs.resourceId.key;
80
- if (inputs.componentId === constants_1.ComponentNames.TeamsBot) {
81
- const state = context.envInfo.state[inputs.componentId];
82
- if (!state[resourceIdKey]) {
83
- if (state["resourceId"]) {
84
- resourceIdKey = "resourceId";
85
- }
86
- else if (state["botWebAppResourceId"]) {
87
- resourceIdKey = "botWebAppResourceId";
88
- }
89
- }
90
- }
91
- return await super.deploy(context, inputs, true, resourceIdKey);
92
- }
93
- needConfigure(context) {
94
- var _a;
95
- const func = workflow_1.getComponentByScenario(context.projectSetting, constants_1.ComponentNames.Function, constants_1.Scenarios.Api);
96
- return (context.envInfo.envName !== "local" && !!((_a = func === null || func === void 0 ? void 0 : func.connections) === null || _a === void 0 ? void 0 : _a.includes(constants_1.ComponentNames.APIM)));
97
- }
98
- collectFunctionAppSettings(ctx, site) {
99
- const apimConfig = ctx.envInfo.state[constants_1.ComponentNames.APIM];
100
- if (apimConfig) {
101
- // Logger.info(InfoMessages.dependPluginDetected(ComponentNames.APIM));
102
- const clientId = error_1.CheckThrowSomethingMissing(this.alias, "APIM app Id", apimConfig[constants_1.APIMOutputs.apimClientAADClientId.key]);
103
- this.ensureFunctionAllowAppIds(site, [clientId]);
104
- }
105
- }
106
- ensureFunctionAllowAppIds(site, clientIds) {
107
- var _a, _b;
108
- if (!site.siteConfig) {
109
- site.siteConfig = {};
110
- }
111
- const rawOldClientIds = (_b = (_a = site.siteConfig.appSettings) === null || _a === void 0 ? void 0 : _a.find((kv) => kv.name === constants_1.FunctionAppSetting.keys.allowedAppIds)) === null || _b === void 0 ? void 0 : _b.value;
112
- const oldClientIds = rawOldClientIds
113
- ? rawOldClientIds.split(constants_1.FunctionAppSetting.allowedAppIdSep).filter((e) => e)
114
- : [];
115
- for (const id of oldClientIds) {
116
- if (!clientIds.includes(id)) {
117
- clientIds.push(id);
118
- }
119
- }
120
- this.pushAppSettings(site, constants_1.FunctionAppSetting.keys.allowedAppIds, clientIds.join(constants_1.FunctionAppSetting.allowedAppIdSep), true);
121
- }
122
- pushAppSettings(site, newName, newValue, replace = true) {
123
- if (!site.siteConfig) {
124
- site.siteConfig = {};
125
- }
126
- if (!site.siteConfig.appSettings) {
127
- site.siteConfig.appSettings = [];
128
- }
129
- const kv = site.siteConfig.appSettings.find((kv) => kv.name === newName);
130
- if (!kv) {
131
- site.siteConfig.appSettings.push({
132
- name: newName,
133
- value: newValue,
134
- });
135
- }
136
- else if (replace) {
137
- kv.value = newValue;
138
- }
139
- }
140
- };
141
- tslib_1.__decorate([
142
- lib_1.hooks([
143
- actionExecutionMW_1.ActionExecutionMW({
144
- errorSource: ErrorSource,
145
- }),
146
- ]),
147
- tslib_1.__metadata("design:type", Function),
148
- tslib_1.__metadata("design:paramtypes", [Object, Object]),
149
- tslib_1.__metadata("design:returntype", Promise)
150
- ], AzureFunctionResource.prototype, "configure", null);
151
- AzureFunctionResource = tslib_1.__decorate([
152
- typedi_1.Service("azure-function")
153
- ], AzureFunctionResource);
154
- exports.AzureFunctionResource = AzureFunctionResource;
155
- //# sourceMappingURL=azureFunction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureFunction.js","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureFunction.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAMgC;AAChC,mCAAiC;AACjC,6CAAwD;AACxD,+CAOyB;AACzB,uDAAoD;AACpD,uCAA+E;AAC/E,iDAI+B;AAE/B,+CAA8C;AAC9C,0EAAuE;AACvE,6CAA6C;AAC7C,2CAAiD;AAEjD,MAAM,WAAW,GAAG,WAAW,CAAC;AAEhC,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,iCAAe;IAA1D;;QACW,SAAI,GAAG,gBAAgB,CAAC;QACxB,UAAK,GAAG,WAAW,CAAC;QACpB,gBAAW,GAAG,iBAAiB,CAAC;QAChC,oBAAe,GAAG,eAAe,CAAC;QAC3C,YAAO,GAAG,2BAAe,CAAC;QAC1B,oBAAe,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QAC7C,oBAAe,GAAG;YAChB,QAAQ,EAAE;gBACR,UAAU,EAAE,2BAAe,CAAC,kBAAkB,CAAC,aAAa;aAC7D;SACF,CAAC;IAkJJ,CAAC;IA5IC,KAAK,CAAC,SAAS,CACb,OAA0B,EAC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jC;AA7JY,sDAAqB"}
@@ -1,6 +0,0 @@
1
- import { WebSiteManagementClient } from "@azure/arm-appservice";
2
- import { TokenCredential } from "@azure/identity";
3
- export declare class AzureClientFactory {
4
- static getWebSiteManagementClient(credentials: TokenCredential, subscriptionId: string): WebSiteManagementClient;
5
- }
6
- //# sourceMappingURL=azureLibs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureLibs.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureLibs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,0BAA0B,CAC/B,WAAW,EAAE,eAAe,EAC5B,cAAc,EAAE,MAAM,GACrB,uBAAuB;CAG3B"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.AzureClientFactory = void 0;
6
- const arm_appservice_1 = require("@azure/arm-appservice");
7
- class AzureClientFactory {
8
- static getWebSiteManagementClient(credentials, subscriptionId) {
9
- return new arm_appservice_1.WebSiteManagementClient(credentials, subscriptionId);
10
- }
11
- }
12
- exports.AzureClientFactory = AzureClientFactory;
13
- //# sourceMappingURL=azureLibs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureLibs.js","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureLibs.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0DAAgE;AAGhE,MAAa,kBAAkB;IAC7B,MAAM,CAAC,0BAA0B,CAC/B,WAA4B,EAC5B,cAAsB;QAEtB,OAAO,IAAI,wCAAuB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAClE,CAAC;CACF;AAPD,gDAOC"}
@@ -1,30 +0,0 @@
1
- import { FxError, InputsWithProjectPath, ResourceContextV3, Result } from "@microsoft/teamsfx-api";
2
- import { AzureAppService } from "./azureAppService";
3
- export declare class AzureWebAppResource extends AzureAppService {
4
- readonly name = "azure-web-app";
5
- readonly alias = "WebApp";
6
- readonly displayName = "Azure Web App";
7
- readonly bicepModuleName = "azureWebApp";
8
- readonly outputs: {
9
- resourceId: {
10
- key: string;
11
- bicepVariable: string;
12
- };
13
- endpoint: {
14
- key: string;
15
- bicepVariable: string;
16
- };
17
- endpointAsParam: {
18
- key: string;
19
- bicepVariable: string;
20
- };
21
- };
22
- readonly finalOutputKeys: string[];
23
- templateContext: {
24
- identity: {
25
- resourceId: string;
26
- };
27
- };
28
- deploy(context: ResourceContextV3, inputs: InputsWithProjectPath): Promise<Result<undefined, FxError>>;
29
- }
30
- //# sourceMappingURL=azureWebApp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureWebApp.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureWebApp.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGnG,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,qBACa,mBAAoB,SAAQ,eAAe;IACtD,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,KAAK,YAAY;IAC1B,QAAQ,CAAC,WAAW,mBAAmB;IACvC,QAAQ,CAAC,eAAe,iBAAiB;IACzC,QAAQ,CAAC,OAAO;;;;;;;;;;;;;MAAiB;IACjC,QAAQ,CAAC,eAAe,WAA8B;IACtD,eAAe;;;;MAIb;IAEI,MAAM,CACV,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;CAavC"}
@@ -1,43 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.AzureWebAppResource = void 0;
6
- const tslib_1 = require("tslib");
7
- const typedi_1 = require("typedi");
8
- const constants_1 = require("../../constants");
9
- const azureAppService_1 = require("./azureAppService");
10
- let AzureWebAppResource = class AzureWebAppResource extends azureAppService_1.AzureAppService {
11
- constructor() {
12
- super(...arguments);
13
- this.name = "azure-web-app";
14
- this.alias = "WebApp";
15
- this.displayName = "Azure Web App";
16
- this.bicepModuleName = "azureWebApp";
17
- this.outputs = constants_1.WebAppOutputs;
18
- this.finalOutputKeys = ["resourceId", "endpoint"];
19
- this.templateContext = {
20
- identity: {
21
- resourceId: constants_1.IdentityOutputs.identityResourceId.bicepVariable,
22
- },
23
- };
24
- }
25
- async deploy(context, inputs) {
26
- let resourceIdKey = this.outputs.resourceId.key;
27
- const state = context.envInfo.state[inputs.componentId];
28
- if (!state[resourceIdKey]) {
29
- if (state["botWebAppResourceId"]) {
30
- resourceIdKey = "botWebAppResourceId";
31
- }
32
- if (state["webAppResourceId"]) {
33
- resourceIdKey = "webAppResourceId";
34
- }
35
- }
36
- return await super.deploy(context, inputs, false, resourceIdKey);
37
- }
38
- };
39
- AzureWebAppResource = tslib_1.__decorate([
40
- typedi_1.Service("azure-web-app")
41
- ], AzureWebAppResource);
42
- exports.AzureWebAppResource = AzureWebAppResource;
43
- //# sourceMappingURL=azureWebApp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureWebApp.js","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureWebApp.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAGlC,mCAAiC;AACjC,+CAAiF;AACjF,uDAAoD;AAEpD,IAAa,mBAAmB,GAAhC,MAAa,mBAAoB,SAAQ,iCAAe;IAAxD;;QACW,SAAI,GAAG,eAAe,CAAC;QACvB,UAAK,GAAG,QAAQ,CAAC;QACjB,gBAAW,GAAG,eAAe,CAAC;QAC9B,oBAAe,GAAG,aAAa,CAAC;QAChC,YAAO,GAAG,yBAAa,CAAC;QACxB,oBAAe,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACtD,oBAAe,GAAG;YAChB,QAAQ,EAAE;gBACR,UAAU,EAAE,2BAAe,CAAC,kBAAkB,CAAC,aAAa;aAC7D;SACF,CAAC;IAkBJ,CAAC;IAhBC,KAAK,CAAC,MAAM,CACV,OAA0B,EAC1B,MAA6B;QAE7B,IAAI,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;QAChD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE;YACzB,IAAI,KAAK,CAAC,qBAAqB,CAAC,EAAE;gBAChC,aAAa,GAAG,qBAAqB,CAAC;aACvC;YACD,IAAI,KAAK,CAAC,kBAAkB,CAAC,EAAE;gBAC7B,aAAa,GAAG,kBAAkB,CAAC;aACpC;SACF;QACD,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IACnE,CAAC;CACF,CAAA;AA7BY,mBAAmB;IAD/B,gBAAO,CAAC,eAAe,CAAC;GACZ,mBAAmB,CA6B/B;AA7BY,kDAAmB"}
@@ -1,10 +0,0 @@
1
- /// <reference types="node" />
2
- import { Ignore } from "ignore";
3
- /**
4
- * Asynchronously zip a folder and return buffer
5
- * @param sourceDir base dir
6
- * @param notIncluded block list
7
- * @param cache zip cache file location
8
- */
9
- export declare function zipFolderAsync(sourceDir: string, cache: string, notIncluded?: Ignore): Promise<Buffer>;
10
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/common.ts"],"names":[],"mappings":";AAIA,OAAe,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAMxC;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,CAyDjB"}
@@ -1,80 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.zipFolderAsync = void 0;
6
- const tslib_1 = require("tslib");
7
- const adm_zip_1 = tslib_1.__importDefault(require("adm-zip"));
8
- const ignore_1 = tslib_1.__importDefault(require("ignore"));
9
- const fs = tslib_1.__importStar(require("fs-extra"));
10
- const dir_walk_1 = require("./dir-walk");
11
- const path_1 = tslib_1.__importDefault(require("path"));
12
- const hostingConstant_1 = require("../../../common/azure-hosting/hostingConstant");
13
- /**
14
- * Asynchronously zip a folder and return buffer
15
- * @param sourceDir base dir
16
- * @param notIncluded block list
17
- * @param cache zip cache file location
18
- */
19
- async function zipFolderAsync(sourceDir, cache, notIncluded) {
20
- const normalizeTime = (t) => Math.floor(t / hostingConstant_1.AzureOperationCommonConstants.zipTimeMSGranularity);
21
- const tasks = [];
22
- const zipFiles = new Set();
23
- const ig = notIncluded !== null && notIncluded !== void 0 ? notIncluded : ignore_1.default();
24
- const zip = (await readZipFromCache(cache)) || new adm_zip_1.default();
25
- const addFileIntoZip = async (zp, filePath, zipPath, stats) => {
26
- const content = await fs.readFile(filePath);
27
- zp.addFile(zipPath, content);
28
- if (stats) {
29
- zp.getEntry(zipPath).header.time = stats.mtime;
30
- }
31
- };
32
- await dir_walk_1.forEachFileAndDir(sourceDir, (itemPath, stats) => {
33
- const relativePath = path_1.default.relative(sourceDir, itemPath);
34
- if (relativePath && !stats.isDirectory() && ig.filter([relativePath]).length > 0) {
35
- zipFiles.add(relativePath);
36
- const entry = zip.getEntry(relativePath);
37
- if (entry) {
38
- // The header is an object, the ts declare of adm-zip is wrong.
39
- const header = entry.header;
40
- const mtime = header && header.time;
41
- // Some files' mtime in node_modules are too old, which may be invalid,
42
- // so we arbitrarily add a limitation to update this kind of files.
43
- // If mtime is valid and the two mtime is same in two-seconds, we think the two are same file.
44
- if (mtime >= hostingConstant_1.AzureOperationCommonConstants.latestTrustMtime &&
45
- normalizeTime(mtime.getTime()) === normalizeTime(stats.mtime.getTime())) {
46
- return;
47
- }
48
- // Delete the entry because the file has been updated.
49
- zip.deleteFile(relativePath);
50
- }
51
- // If fail to reuse cached entry, load it from disk.
52
- const fullPath = path_1.default.join(sourceDir, relativePath);
53
- const task = addFileIntoZip(zip, fullPath, relativePath, stats);
54
- tasks.push(task);
55
- }
56
- });
57
- await Promise.all(tasks);
58
- removeLegacyFileInZip(zip, zipFiles);
59
- return zip.toBuffer();
60
- }
61
- exports.zipFolderAsync = zipFolderAsync;
62
- async function readZipFromCache(cache) {
63
- try {
64
- const content = await fs.readFile(cache);
65
- return new adm_zip_1.default(content);
66
- }
67
- catch (_a) {
68
- // Failed to load cache, it doesn't block deployment.
69
- }
70
- return undefined;
71
- }
72
- function removeLegacyFileInZip(zip, existenceFiles) {
73
- zip
74
- .getEntries()
75
- .filter((entry) => !existenceFiles.has(entry.name))
76
- .forEach((entry) => {
77
- zip.deleteFile(entry.name);
78
- });
79
- }
80
- //# sourceMappingURL=common.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/common.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,8DAA6B;AAC7B,4DAAwC;AACxC,qDAA+B;AAC/B,yCAA+C;AAC/C,wDAAwB;AACxB,mFAA8F;AAE9F;;;;;GAKG;AACI,KAAK,UAAU,cAAc,CAClC,SAAiB,EACjB,KAAa,EACb,WAAoB;IAEpB,MAAM,aAAa,GAAG,CAAC,CAAS,EAAE,EAAE,CAClC,IAAI,CAAC,KAAK,CAAC,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AG,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,4 +0,0 @@
1
- /// <reference types="node" />
2
- import * as fs from "fs-extra";
3
- export declare function forEachFileAndDir(root: string, callback: (itemPath: string, stats: fs.Stats) => boolean | void, filter?: (itemPath: string) => boolean): Promise<void>;
4
- //# sourceMappingURL=dir-walk.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dir-walk.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/dir-walk.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAG/B,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,OAAO,GAAG,IAAI,EAC/D,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,GACrC,OAAO,CAAC,IAAI,CAAC,CAaf"}