@microsoft/teamsfx-core 1.4.0 → 1.4.1-alpha.0535e2d27.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 (431) hide show
  1. package/build/common/constants.d.ts +1 -0
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +1 -0
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/local/constants.d.ts +0 -4
  6. package/build/common/local/constants.d.ts.map +1 -1
  7. package/build/common/local/constants.js +1 -5
  8. package/build/common/local/constants.js.map +1 -1
  9. package/build/common/local/localEnvProvider.d.ts +4 -8
  10. package/build/common/local/localEnvProvider.d.ts.map +1 -1
  11. package/build/common/local/localEnvProvider.js +21 -33
  12. package/build/common/local/localEnvProvider.js.map +1 -1
  13. package/build/common/local/localSettingsHelper.d.ts.map +1 -1
  14. package/build/common/local/localSettingsHelper.js +12 -21
  15. package/build/common/local/localSettingsHelper.js.map +1 -1
  16. package/build/common/local/portChecker.d.ts.map +1 -1
  17. package/build/common/local/portChecker.js +1 -8
  18. package/build/common/local/portChecker.js.map +1 -1
  19. package/build/common/local/projectSettingsHelper.d.ts +0 -1
  20. package/build/common/local/projectSettingsHelper.d.ts.map +1 -1
  21. package/build/common/local/projectSettingsHelper.js +2 -5
  22. package/build/common/local/projectSettingsHelper.js.map +1 -1
  23. package/build/common/localSettingsProvider.d.ts +2 -2
  24. package/build/common/localSettingsProvider.d.ts.map +1 -1
  25. package/build/common/localSettingsProvider.js +4 -4
  26. package/build/common/localSettingsProvider.js.map +1 -1
  27. package/build/common/projectSettingsValidator.d.ts.map +1 -1
  28. package/build/common/projectSettingsValidator.js +5 -0
  29. package/build/common/projectSettingsValidator.js.map +1 -1
  30. package/build/common/samples-config.json +12 -2
  31. package/build/common/template-utils/templates.d.ts +1 -0
  32. package/build/common/template-utils/templates.d.ts.map +1 -1
  33. package/build/common/template-utils/templates.js +5 -1
  34. package/build/common/template-utils/templates.js.map +1 -1
  35. package/build/common/templates-config.json +2 -2
  36. package/build/common/tools.d.ts +0 -4
  37. package/build/common/tools.d.ts.map +1 -1
  38. package/build/common/tools.js +1 -20
  39. package/build/common/tools.js.map +1 -1
  40. package/build/core/SolutionPluginContainer.js +1 -1
  41. package/build/core/SolutionPluginContainer.js.map +1 -1
  42. package/build/core/collaborator.d.ts +10 -0
  43. package/build/core/collaborator.d.ts.map +1 -0
  44. package/build/core/collaborator.js +381 -0
  45. package/build/core/collaborator.js.map +1 -0
  46. package/build/core/environment.d.ts.map +1 -1
  47. package/build/core/environment.js +7 -2
  48. package/build/core/environment.js.map +1 -1
  49. package/build/core/error.d.ts +0 -6
  50. package/build/core/error.d.ts.map +1 -1
  51. package/build/core/error.js +1 -25
  52. package/build/core/error.js.map +1 -1
  53. package/build/core/index.d.ts +11 -9
  54. package/build/core/index.d.ts.map +1 -1
  55. package/build/core/index.js +232 -233
  56. package/build/core/index.js.map +1 -1
  57. package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
  58. package/build/core/middleware/concurrentLocker.js +1 -2
  59. package/build/core/middleware/concurrentLocker.js.map +1 -1
  60. package/build/core/middleware/envInfoLoaderV3.d.ts.map +1 -1
  61. package/build/core/middleware/envInfoLoaderV3.js +3 -0
  62. package/build/core/middleware/envInfoLoaderV3.js.map +1 -1
  63. package/build/core/middleware/index.d.ts +0 -2
  64. package/build/core/middleware/index.d.ts.map +1 -1
  65. package/build/core/middleware/index.js +0 -2
  66. package/build/core/middleware/index.js.map +1 -1
  67. package/build/core/middleware/localSettingsLoader.d.ts.map +1 -1
  68. package/build/core/middleware/localSettingsLoader.js +2 -2
  69. package/build/core/middleware/localSettingsLoader.js.map +1 -1
  70. package/build/core/middleware/projectMigrator.d.ts.map +1 -1
  71. package/build/core/middleware/projectMigrator.js +28 -35
  72. package/build/core/middleware/projectMigrator.js.map +1 -1
  73. package/build/core/middleware/questionModel.d.ts +0 -1
  74. package/build/core/middleware/questionModel.d.ts.map +1 -1
  75. package/build/core/middleware/questionModel.js +48 -71
  76. package/build/core/middleware/questionModel.js.map +1 -1
  77. package/build/core/middleware/solutionLoaderV3.d.ts +1 -1
  78. package/build/core/middleware/solutionLoaderV3.d.ts.map +1 -1
  79. package/build/core/middleware/solutionLoaderV3.js +1 -8
  80. package/build/core/middleware/solutionLoaderV3.js.map +1 -1
  81. package/build/core/question.d.ts +0 -1
  82. package/build/core/question.d.ts.map +1 -1
  83. package/build/core/question.js +1 -26
  84. package/build/core/question.js.map +1 -1
  85. package/build/core/tools.d.ts +0 -2
  86. package/build/core/tools.d.ts.map +1 -1
  87. package/build/core/tools.js +3 -63
  88. package/build/core/tools.js.map +1 -1
  89. package/build/core/utils.d.ts +1 -2
  90. package/build/core/utils.d.ts.map +1 -1
  91. package/build/core/utils.js +1 -5
  92. package/build/core/utils.js.map +1 -1
  93. package/build/plugins/resource/aad/aadAppClient.d.ts +4 -4
  94. package/build/plugins/resource/aad/aadAppClient.d.ts.map +1 -1
  95. package/build/plugins/resource/aad/aadAppClient.js +3 -3
  96. package/build/plugins/resource/aad/aadAppClient.js.map +1 -1
  97. package/build/plugins/resource/aad/index.d.ts.map +1 -1
  98. package/build/plugins/resource/aad/index.js +0 -3
  99. package/build/plugins/resource/aad/index.js.map +1 -1
  100. package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
  101. package/build/plugins/resource/aad/plugin.js +13 -8
  102. package/build/plugins/resource/aad/plugin.js.map +1 -1
  103. package/build/plugins/resource/aad/v2/index.d.ts +3 -2
  104. package/build/plugins/resource/aad/v2/index.d.ts.map +1 -1
  105. package/build/plugins/resource/aad/v2/index.js +4 -4
  106. package/build/plugins/resource/aad/v2/index.js.map +1 -1
  107. package/build/plugins/resource/aad/v3/index.d.ts +8 -2
  108. package/build/plugins/resource/aad/v3/index.d.ts.map +1 -1
  109. package/build/plugins/resource/aad/v3/index.js +148 -49
  110. package/build/plugins/resource/aad/v3/index.js.map +1 -1
  111. package/build/plugins/resource/apim/config.js +2 -1
  112. package/build/plugins/resource/apim/config.js.map +1 -1
  113. package/build/plugins/resource/apim/managers/questionManager.d.ts.map +1 -1
  114. package/build/plugins/resource/apim/managers/questionManager.js +8 -4
  115. package/build/plugins/resource/apim/managers/questionManager.js.map +1 -1
  116. package/build/plugins/resource/apim/v3/index.d.ts +7 -7
  117. package/build/plugins/resource/apim/v3/index.d.ts.map +1 -1
  118. package/build/plugins/resource/apim/v3/index.js +63 -55
  119. package/build/plugins/resource/apim/v3/index.js.map +1 -1
  120. package/build/plugins/resource/appstudio/appStudio.js +1 -1
  121. package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
  122. package/build/plugins/resource/appstudio/errors.d.ts +8 -16
  123. package/build/plugins/resource/appstudio/errors.d.ts.map +1 -1
  124. package/build/plugins/resource/appstudio/errors.js +8 -16
  125. package/build/plugins/resource/appstudio/errors.js.map +1 -1
  126. package/build/plugins/resource/appstudio/index.d.ts +0 -4
  127. package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
  128. package/build/plugins/resource/appstudio/index.js +0 -21
  129. package/build/plugins/resource/appstudio/index.js.map +1 -1
  130. package/build/plugins/resource/appstudio/manifestTemplate.d.ts +3 -1
  131. package/build/plugins/resource/appstudio/manifestTemplate.d.ts.map +1 -1
  132. package/build/plugins/resource/appstudio/manifestTemplate.js +111 -1
  133. package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
  134. package/build/plugins/resource/appstudio/plugin.d.ts +2 -13
  135. package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
  136. package/build/plugins/resource/appstudio/plugin.js +46 -127
  137. package/build/plugins/resource/appstudio/plugin.js.map +1 -1
  138. package/build/plugins/resource/appstudio/utils/telemetry.d.ts +1 -1
  139. package/build/plugins/resource/appstudio/utils/telemetry.d.ts.map +1 -1
  140. package/build/plugins/resource/appstudio/utils/telemetry.js +22 -10
  141. package/build/plugins/resource/appstudio/utils/telemetry.js.map +1 -1
  142. package/build/plugins/resource/appstudio/v2/index.d.ts +2 -2
  143. package/build/plugins/resource/appstudio/v2/index.d.ts.map +1 -1
  144. package/build/plugins/resource/appstudio/v2/index.js +2 -2
  145. package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
  146. package/build/plugins/resource/appstudio/v3/index.d.ts +24 -4
  147. package/build/plugins/resource/appstudio/v3/index.d.ts.map +1 -1
  148. package/build/plugins/resource/appstudio/v3/index.js +133 -5
  149. package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
  150. package/build/plugins/resource/appstudio/v3/plugin.d.ts +17 -4
  151. package/build/plugins/resource/appstudio/v3/plugin.d.ts.map +1 -1
  152. package/build/plugins/resource/appstudio/v3/plugin.js +117 -25
  153. package/build/plugins/resource/appstudio/v3/plugin.js.map +1 -1
  154. package/build/plugins/resource/bot/configs/deployConfig.js.map +1 -1
  155. package/build/plugins/resource/bot/constants.d.ts +0 -4
  156. package/build/plugins/resource/bot/constants.d.ts.map +1 -1
  157. package/build/plugins/resource/bot/constants.js +0 -6
  158. package/build/plugins/resource/bot/constants.js.map +1 -1
  159. package/build/plugins/resource/bot/dotnet/plugin.d.ts +0 -3
  160. package/build/plugins/resource/bot/dotnet/plugin.d.ts.map +1 -1
  161. package/build/plugins/resource/bot/dotnet/plugin.js +0 -9
  162. package/build/plugins/resource/bot/dotnet/plugin.js.map +1 -1
  163. package/build/plugins/resource/bot/errors.d.ts +0 -3
  164. package/build/plugins/resource/bot/errors.d.ts.map +1 -1
  165. package/build/plugins/resource/bot/errors.js +1 -9
  166. package/build/plugins/resource/bot/errors.js.map +1 -1
  167. package/build/plugins/resource/bot/index.d.ts +2 -3
  168. package/build/plugins/resource/bot/index.d.ts.map +1 -1
  169. package/build/plugins/resource/bot/index.js +5 -16
  170. package/build/plugins/resource/bot/index.js.map +1 -1
  171. package/build/plugins/resource/bot/interface.d.ts +0 -1
  172. package/build/plugins/resource/bot/interface.d.ts.map +1 -1
  173. package/build/plugins/resource/bot/plugin.d.ts +0 -1
  174. package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
  175. package/build/plugins/resource/bot/plugin.js +0 -26
  176. package/build/plugins/resource/bot/plugin.js.map +1 -1
  177. package/build/plugins/resource/bot/progressBars.d.ts +2 -2
  178. package/build/plugins/resource/bot/progressBars.d.ts.map +1 -1
  179. package/build/plugins/resource/bot/progressBars.js +4 -3
  180. package/build/plugins/resource/bot/progressBars.js.map +1 -1
  181. package/build/plugins/resource/bot/resources/messages.d.ts +0 -3
  182. package/build/plugins/resource/bot/resources/messages.d.ts.map +1 -1
  183. package/build/plugins/resource/bot/resources/messages.js +0 -5
  184. package/build/plugins/resource/bot/resources/messages.js.map +1 -1
  185. package/build/plugins/resource/bot/resources/strings.d.ts +0 -1
  186. package/build/plugins/resource/bot/resources/strings.d.ts.map +1 -1
  187. package/build/plugins/resource/bot/resources/strings.js +0 -2
  188. package/build/plugins/resource/bot/resources/strings.js.map +1 -1
  189. package/build/plugins/resource/bot/v3/error.d.ts +15 -0
  190. package/build/plugins/resource/bot/v3/error.d.ts.map +1 -0
  191. package/build/plugins/resource/bot/v3/error.js +46 -0
  192. package/build/plugins/resource/bot/v3/error.js.map +1 -0
  193. package/build/plugins/resource/bot/v3/index.d.ts +19 -0
  194. package/build/plugins/resource/bot/v3/index.d.ts.map +1 -0
  195. package/build/plugins/resource/bot/v3/index.js +376 -0
  196. package/build/plugins/resource/bot/v3/index.js.map +1 -0
  197. package/build/plugins/resource/frontend/constants.d.ts +1 -0
  198. package/build/plugins/resource/frontend/constants.d.ts.map +1 -1
  199. package/build/plugins/resource/frontend/constants.js +1 -0
  200. package/build/plugins/resource/frontend/constants.js.map +1 -1
  201. package/build/plugins/resource/frontend/dotnet/constants.d.ts +21 -0
  202. package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -1
  203. package/build/plugins/resource/frontend/dotnet/constants.js +23 -1
  204. package/build/plugins/resource/frontend/dotnet/constants.js.map +1 -1
  205. package/build/plugins/resource/frontend/dotnet/plugin.d.ts +1 -0
  206. package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -1
  207. package/build/plugins/resource/frontend/dotnet/plugin.js +59 -0
  208. package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
  209. package/build/plugins/resource/frontend/dotnet/resources/errors.d.ts +3 -0
  210. package/build/plugins/resource/frontend/dotnet/resources/errors.d.ts.map +1 -1
  211. package/build/plugins/resource/frontend/dotnet/resources/errors.js +10 -1
  212. package/build/plugins/resource/frontend/dotnet/resources/errors.js.map +1 -1
  213. package/build/plugins/resource/frontend/index.d.ts +2 -3
  214. package/build/plugins/resource/frontend/index.d.ts.map +1 -1
  215. package/build/plugins/resource/frontend/index.js +5 -9
  216. package/build/plugins/resource/frontend/index.js.map +1 -1
  217. package/build/plugins/resource/frontend/interface.d.ts +2 -2
  218. package/build/plugins/resource/frontend/interface.d.ts.map +1 -1
  219. package/build/plugins/resource/frontend/plugin.d.ts +2 -2
  220. package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
  221. package/build/plugins/resource/frontend/plugin.js +12 -25
  222. package/build/plugins/resource/frontend/plugin.js.map +1 -1
  223. package/build/plugins/resource/frontend/resources/errors.d.ts +0 -7
  224. package/build/plugins/resource/frontend/resources/errors.d.ts.map +1 -1
  225. package/build/plugins/resource/frontend/resources/errors.js +1 -14
  226. package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
  227. package/build/plugins/resource/frontend/resources/messages.d.ts +0 -2
  228. package/build/plugins/resource/frontend/resources/messages.d.ts.map +1 -1
  229. package/build/plugins/resource/frontend/resources/messages.js +0 -2
  230. package/build/plugins/resource/frontend/resources/messages.js.map +1 -1
  231. package/build/plugins/resource/frontend/resources/steps.d.ts +0 -1
  232. package/build/plugins/resource/frontend/resources/steps.d.ts.map +1 -1
  233. package/build/plugins/resource/frontend/resources/steps.js +1 -7
  234. package/build/plugins/resource/frontend/resources/steps.js.map +1 -1
  235. package/build/plugins/resource/frontend/v2/index.d.ts +3 -2
  236. package/build/plugins/resource/frontend/v2/index.d.ts.map +1 -1
  237. package/build/plugins/resource/frontend/v2/index.js +5 -2
  238. package/build/plugins/resource/frontend/v2/index.js.map +1 -1
  239. package/build/plugins/resource/frontend/v3/index.d.ts +7 -7
  240. package/build/plugins/resource/frontend/v3/index.d.ts.map +1 -1
  241. package/build/plugins/resource/frontend/v3/index.js +21 -28
  242. package/build/plugins/resource/frontend/v3/index.js.map +1 -1
  243. package/build/plugins/resource/function/v3/index.d.ts +8 -9
  244. package/build/plugins/resource/function/v3/index.d.ts.map +1 -1
  245. package/build/plugins/resource/function/v3/index.js +20 -26
  246. package/build/plugins/resource/function/v3/index.js.map +1 -1
  247. package/build/plugins/resource/identity/index.d.ts.map +1 -1
  248. package/build/plugins/resource/identity/index.js +0 -3
  249. package/build/plugins/resource/identity/index.js.map +1 -1
  250. package/build/plugins/resource/identity/v3/index.d.ts +4 -4
  251. package/build/plugins/resource/identity/v3/index.d.ts.map +1 -1
  252. package/build/plugins/resource/identity/v3/index.js +10 -14
  253. package/build/plugins/resource/identity/v3/index.js.map +1 -1
  254. package/build/plugins/resource/keyvault/v3/index.d.ts +5 -6
  255. package/build/plugins/resource/keyvault/v3/index.d.ts.map +1 -1
  256. package/build/plugins/resource/keyvault/v3/index.js +10 -17
  257. package/build/plugins/resource/keyvault/v3/index.js.map +1 -1
  258. package/build/plugins/resource/localdebug/constants.d.ts +0 -4
  259. package/build/plugins/resource/localdebug/constants.d.ts.map +1 -1
  260. package/build/plugins/resource/localdebug/constants.js +1 -5
  261. package/build/plugins/resource/localdebug/constants.js.map +1 -1
  262. package/build/plugins/resource/localdebug/localEnv.d.ts +2 -2
  263. package/build/plugins/resource/localdebug/localEnv.d.ts.map +1 -1
  264. package/build/plugins/resource/localdebug/localEnv.js +4 -6
  265. package/build/plugins/resource/localdebug/localEnv.js.map +1 -1
  266. package/build/plugins/resource/localdebug/projectSettingLoader.d.ts +0 -1
  267. package/build/plugins/resource/localdebug/projectSettingLoader.d.ts.map +1 -1
  268. package/build/plugins/resource/localdebug/projectSettingLoader.js +0 -1
  269. package/build/plugins/resource/localdebug/projectSettingLoader.js.map +1 -1
  270. package/build/plugins/resource/spfx/index.d.ts +1 -5
  271. package/build/plugins/resource/spfx/index.d.ts.map +1 -1
  272. package/build/plugins/resource/spfx/index.js +6 -10
  273. package/build/plugins/resource/spfx/index.js.map +1 -1
  274. package/build/plugins/resource/spfx/plugin.js +6 -6
  275. package/build/plugins/resource/spfx/plugin.js.map +1 -1
  276. package/build/plugins/resource/spfx/utils/constants.d.ts +9 -0
  277. package/build/plugins/resource/spfx/utils/constants.d.ts.map +1 -1
  278. package/build/plugins/resource/spfx/utils/constants.js +11 -1
  279. package/build/plugins/resource/spfx/utils/constants.js.map +1 -1
  280. package/build/plugins/resource/spfx/utils/progress-helper.d.ts +3 -3
  281. package/build/plugins/resource/spfx/utils/progress-helper.d.ts.map +1 -1
  282. package/build/plugins/resource/spfx/utils/progress-helper.js +8 -8
  283. package/build/plugins/resource/spfx/utils/progress-helper.js.map +1 -1
  284. package/build/plugins/resource/spfx/utils/questions.d.ts +10 -0
  285. package/build/plugins/resource/spfx/utils/questions.d.ts.map +1 -0
  286. package/build/plugins/resource/spfx/utils/questions.js +39 -0
  287. package/build/plugins/resource/spfx/utils/questions.js.map +1 -0
  288. package/build/plugins/resource/spfx/v3/error.d.ts +5 -0
  289. package/build/plugins/resource/spfx/v3/error.d.ts.map +1 -0
  290. package/build/plugins/resource/spfx/v3/error.js +20 -0
  291. package/build/plugins/resource/spfx/v3/error.js.map +1 -0
  292. package/build/plugins/resource/spfx/v3/index.d.ts +13 -0
  293. package/build/plugins/resource/spfx/v3/index.d.ts.map +1 -0
  294. package/build/plugins/resource/spfx/v3/index.js +122 -0
  295. package/build/plugins/resource/spfx/v3/index.js.map +1 -0
  296. package/build/plugins/resource/spfx/v3/plugin.d.ts +11 -0
  297. package/build/plugins/resource/spfx/v3/plugin.d.ts.map +1 -0
  298. package/build/plugins/resource/spfx/v3/plugin.js +290 -0
  299. package/build/plugins/resource/spfx/v3/plugin.js.map +1 -0
  300. package/build/plugins/resource/sql/v3/index.d.ts +9 -6
  301. package/build/plugins/resource/sql/v3/index.d.ts.map +1 -1
  302. package/build/plugins/resource/sql/v3/index.js +82 -20
  303. package/build/plugins/resource/sql/v3/index.js.map +1 -1
  304. package/build/plugins/resource/utils4v2.d.ts +3 -2
  305. package/build/plugins/resource/utils4v2.d.ts.map +1 -1
  306. package/build/plugins/resource/utils4v2.js +24 -7
  307. package/build/plugins/resource/utils4v2.js.map +1 -1
  308. package/build/plugins/solution/fx-solution/arm.d.ts +2 -2
  309. package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
  310. package/build/plugins/solution/fx-solution/arm.js +52 -59
  311. package/build/plugins/solution/fx-solution/arm.js.map +1 -1
  312. package/build/plugins/solution/fx-solution/commonQuestions.d.ts +15 -3
  313. package/build/plugins/solution/fx-solution/commonQuestions.d.ts.map +1 -1
  314. package/build/plugins/solution/fx-solution/commonQuestions.js +14 -8
  315. package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
  316. package/build/plugins/solution/fx-solution/constants.d.ts +0 -2
  317. package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
  318. package/build/plugins/solution/fx-solution/constants.js +0 -2
  319. package/build/plugins/solution/fx-solution/constants.js.map +1 -1
  320. package/build/plugins/solution/fx-solution/debug/error.d.ts +0 -1
  321. package/build/plugins/solution/fx-solution/debug/error.d.ts.map +1 -1
  322. package/build/plugins/solution/fx-solution/debug/error.js +1 -5
  323. package/build/plugins/solution/fx-solution/debug/error.js.map +1 -1
  324. package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts +3 -0
  325. package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -1
  326. package/build/plugins/solution/fx-solution/debug/provisionLocal.js +254 -28
  327. package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -1
  328. package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts +3 -4
  329. package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts.map +1 -1
  330. package/build/plugins/solution/fx-solution/debug/scaffolding.js +18 -19
  331. package/build/plugins/solution/fx-solution/debug/scaffolding.js.map +1 -1
  332. package/build/plugins/solution/fx-solution/debug/util/launch.d.ts +1 -1
  333. package/build/plugins/solution/fx-solution/debug/util/launch.d.ts.map +1 -1
  334. package/build/plugins/solution/fx-solution/debug/util/launch.js +109 -290
  335. package/build/plugins/solution/fx-solution/debug/util/launch.js.map +1 -1
  336. package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts.map +1 -1
  337. package/build/plugins/solution/fx-solution/debug/util/launchNext.js +102 -236
  338. package/build/plugins/solution/fx-solution/debug/util/launchNext.js.map +1 -1
  339. package/build/plugins/solution/fx-solution/debug/util/tasks.d.ts +1 -1
  340. package/build/plugins/solution/fx-solution/debug/util/tasks.d.ts.map +1 -1
  341. package/build/plugins/solution/fx-solution/debug/util/tasks.js +12 -18
  342. package/build/plugins/solution/fx-solution/debug/util/tasks.js.map +1 -1
  343. package/build/plugins/solution/fx-solution/debug/util/tasksNext.d.ts.map +1 -1
  344. package/build/plugins/solution/fx-solution/debug/util/tasksNext.js +5 -5
  345. package/build/plugins/solution/fx-solution/debug/util/tasksNext.js.map +1 -1
  346. package/build/plugins/solution/fx-solution/question.d.ts +0 -2
  347. package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
  348. package/build/plugins/solution/fx-solution/question.js +1 -14
  349. package/build/plugins/solution/fx-solution/question.js.map +1 -1
  350. package/build/plugins/solution/fx-solution/solution.d.ts +0 -2
  351. package/build/plugins/solution/fx-solution/solution.d.ts.map +1 -1
  352. package/build/plugins/solution/fx-solution/solution.js +4 -84
  353. package/build/plugins/solution/fx-solution/solution.js.map +1 -1
  354. package/build/plugins/solution/fx-solution/v2/deploy.d.ts.map +1 -1
  355. package/build/plugins/solution/fx-solution/v2/deploy.js +17 -0
  356. package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
  357. package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
  358. package/build/plugins/solution/fx-solution/v2/getQuestions.js +1 -6
  359. package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
  360. package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
  361. package/build/plugins/solution/fx-solution/v2/provision.js +4 -0
  362. package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
  363. package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts +2 -0
  364. package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +1 -1
  365. package/build/plugins/solution/fx-solution/v2/provisionLocal.js +52 -11
  366. package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
  367. package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts +1 -1
  368. package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +1 -1
  369. package/build/plugins/solution/fx-solution/v2/scaffolding.js +5 -8
  370. package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +1 -1
  371. package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
  372. package/build/plugins/solution/fx-solution/v2/utils.js +0 -3
  373. package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
  374. package/build/plugins/solution/fx-solution/v3/addFeature.d.ts +4 -3
  375. package/build/plugins/solution/fx-solution/v3/addFeature.d.ts.map +1 -1
  376. package/build/plugins/solution/fx-solution/v3/addFeature.js +124 -45
  377. package/build/plugins/solution/fx-solution/v3/addFeature.js.map +1 -1
  378. package/build/plugins/solution/fx-solution/v3/constants.d.ts +0 -1
  379. package/build/plugins/solution/fx-solution/v3/constants.d.ts.map +1 -1
  380. package/build/plugins/solution/fx-solution/v3/constants.js +2 -3
  381. package/build/plugins/solution/fx-solution/v3/constants.js.map +1 -1
  382. package/build/plugins/solution/fx-solution/v3/deploy.d.ts.map +1 -1
  383. package/build/plugins/solution/fx-solution/v3/deploy.js +21 -11
  384. package/build/plugins/solution/fx-solution/v3/deploy.js.map +1 -1
  385. package/build/plugins/solution/fx-solution/v3/provision.d.ts.map +1 -1
  386. package/build/plugins/solution/fx-solution/v3/provision.js +37 -24
  387. package/build/plugins/solution/fx-solution/v3/provision.js.map +1 -1
  388. package/build/plugins/solution/fx-solution/v3/solution.js +2 -2
  389. package/build/plugins/solution/fx-solution/v3/solution.js.map +1 -1
  390. package/build/plugins/solution/fx-solution/v3/userTask.d.ts.map +1 -1
  391. package/build/plugins/solution/fx-solution/v3/userTask.js +58 -58
  392. package/build/plugins/solution/fx-solution/v3/userTask.js.map +1 -1
  393. package/build/plugins/solution/spfx-solution/addFeature.d.ts.map +1 -1
  394. package/build/plugins/solution/spfx-solution/addFeature.js +0 -8
  395. package/build/plugins/solution/spfx-solution/addFeature.js.map +1 -1
  396. package/build/plugins/solution/utils/questions.d.ts +3 -3
  397. package/build/plugins/solution/utils/questions.d.ts.map +1 -1
  398. package/build/plugins/solution/utils/questions.js +6 -6
  399. package/build/plugins/solution/utils/questions.js.map +1 -1
  400. package/package.json +4 -3
  401. package/resource/strings.json +1 -0
  402. package/templates/plugins/resource/bot/bot-msgext.csharp.default.zip +0 -0
  403. package/templates/plugins/resource/bot/bot-msgext.js.default.zip +0 -0
  404. package/templates/plugins/resource/bot/bot-msgext.ts.default.zip +0 -0
  405. package/templates/plugins/resource/bot/bot.csharp.default.zip +0 -0
  406. package/templates/plugins/resource/bot/bot.js.default.zip +0 -0
  407. package/templates/plugins/resource/bot/bot.ts.default.zip +0 -0
  408. package/templates/plugins/resource/bot/msgext.js.default.zip +0 -0
  409. package/templates/plugins/resource/bot/msgext.ts.default.zip +0 -0
  410. package/templates/plugins/resource/dotnet/blazor-base.csharp.default.zip +0 -0
  411. package/templates/plugins/resource/frontend/tab.csharp.default.zip +0 -0
  412. package/templates/plugins/resource/frontend/tab.js.default.zip +0 -0
  413. package/templates/plugins/resource/frontend/tab.ts.default.zip +0 -0
  414. package/templates/plugins/resource/function/function-base.js.default.zip +0 -0
  415. package/templates/plugins/resource/function/function-base.ts.default.zip +0 -0
  416. package/templates/plugins/resource/function/function-triggers.js.HTTPTrigger.zip +0 -0
  417. package/templates/plugins/resource/function/function-triggers.ts.HTTPTrigger.zip +0 -0
  418. package/build/core/middleware/migrateConditionHandler.d.ts +0 -3
  419. package/build/core/middleware/migrateConditionHandler.d.ts.map +0 -1
  420. package/build/core/middleware/migrateConditionHandler.js +0 -23
  421. package/build/core/middleware/migrateConditionHandler.js.map +0 -1
  422. package/build/core/middleware/supportV1ConditionHandler.d.ts +0 -3
  423. package/build/core/middleware/supportV1ConditionHandler.d.ts.map +0 -1
  424. package/build/core/middleware/supportV1ConditionHandler.js +0 -23
  425. package/build/core/middleware/supportV1ConditionHandler.js.map +0 -1
  426. package/build/core/middleware/telemetrySender.d.ts +0 -6
  427. package/build/core/middleware/telemetrySender.d.ts.map +0 -1
  428. package/build/core/middleware/telemetrySender.js +0 -43
  429. package/build/core/middleware/telemetrySender.js.map +0 -1
  430. package/templates/plugins/resource/storage/bicep/azureStorageProvision.bicep +0 -25
  431. package/templates/plugins/resource/storage/bicep/provision.template.bicep +0 -15
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SPFxPluginV3 = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const lib_1 = require("@feathersjs/hooks/lib");
6
+ const teamsfx_api_1 = require("@microsoft/teamsfx-api");
7
+ const typedi_1 = require("typedi");
8
+ const CommonErrorHandlerMW_1 = require("../../../../core/middleware/CommonErrorHandlerMW");
9
+ const constants_1 = require("../../../solution/fx-solution/v3/constants");
10
+ const solutionSettingsHelper_1 = require("../../../solution/fx-solution/utils/solutionSettingsHelper");
11
+ const question_1 = require("../../../solution/fx-solution/question");
12
+ const error_1 = require("./error");
13
+ const uuid = tslib_1.__importStar(require("uuid"));
14
+ const questions_1 = require("../utils/questions");
15
+ const plugin_1 = require("./plugin");
16
+ const constants_2 = require("../utils/constants");
17
+ const util = tslib_1.__importStar(require("util"));
18
+ let SPFxPluginV3 = class SPFxPluginV3 {
19
+ constructor() {
20
+ this.name = constants_1.BuiltInFeaturePluginNames.spfx;
21
+ this.displayName = "SPFx";
22
+ this.description = "SharePoint Framework (SPFx)";
23
+ this.spfxPluginImpl = new plugin_1.SPFxPluginImpl();
24
+ }
25
+ async getQuestionsForAddInstance(ctx, inputs) {
26
+ const spfx_frontend_host = new teamsfx_api_1.QTreeNode({
27
+ type: "group",
28
+ });
29
+ const spfx_framework_type = new teamsfx_api_1.QTreeNode(questions_1.frameworkQuestion);
30
+ spfx_frontend_host.addChild(spfx_framework_type);
31
+ const spfx_webpart_name = new teamsfx_api_1.QTreeNode(questions_1.webpartNameQuestion);
32
+ spfx_frontend_host.addChild(spfx_webpart_name);
33
+ const spfx_webpart_desp = new teamsfx_api_1.QTreeNode(questions_1.webpartDescriptionQuestion);
34
+ spfx_frontend_host.addChild(spfx_webpart_desp);
35
+ return teamsfx_api_1.ok(spfx_frontend_host);
36
+ }
37
+ async addInstance(ctx, inputs) {
38
+ solutionSettingsHelper_1.ensureSolutionSettings(ctx.projectSetting);
39
+ const solutionSettings = ctx.projectSetting.solutionSettings;
40
+ const capabilities = solutionSettings.capabilities;
41
+ if (capabilities.includes(question_1.TabSPFxItem.id)) {
42
+ return teamsfx_api_1.err(error_1.SPFxAlreadyExistError());
43
+ }
44
+ const componentId = uuid.v4();
45
+ const webpartName = inputs[questions_1.SPFXQuestionNames.webpart_name];
46
+ // spfx is added for first time, scaffold and generate resource template
47
+ const scaffoldRes = await this.spfxPluginImpl.scaffold(ctx, inputs, componentId);
48
+ if (scaffoldRes.isErr())
49
+ return teamsfx_api_1.err(scaffoldRes.error);
50
+ capabilities.push(question_1.TabSPFxItem.id);
51
+ const capabilitiesToAddManifest = [];
52
+ const localStaticSnippet = {
53
+ entityId: componentId,
54
+ name: webpartName,
55
+ contentUrl: util.format(constants_2.ManifestTemplate.LOCAL_CONTENT_URL, componentId),
56
+ websiteUrl: constants_2.ManifestTemplate.WEBSITE_URL,
57
+ scopes: ["personal"],
58
+ };
59
+ const localConfigurableSnippet = {
60
+ configurationUrl: util.format(constants_2.ManifestTemplate.LOCAL_CONFIGURATION_URL, componentId),
61
+ canUpdateConfiguration: true,
62
+ scopes: ["team"],
63
+ };
64
+ const remoteStaticSnippet = {
65
+ entityId: componentId,
66
+ name: webpartName,
67
+ contentUrl: util.format(constants_2.ManifestTemplate.REMOTE_CONTENT_URL, componentId),
68
+ websiteUrl: constants_2.ManifestTemplate.WEBSITE_URL,
69
+ scopes: ["personal"],
70
+ };
71
+ const remoteConfigurableSnippet = {
72
+ configurationUrl: util.format(constants_2.ManifestTemplate.REMOTE_CONFIGURATION_URL, componentId),
73
+ canUpdateConfiguration: true,
74
+ scopes: ["team"],
75
+ };
76
+ capabilitiesToAddManifest.push({ name: "staticTab", snippet: { local: localStaticSnippet, remote: remoteStaticSnippet } }, {
77
+ name: "configurableTab",
78
+ snippet: { local: localConfigurableSnippet, remote: remoteConfigurableSnippet },
79
+ });
80
+ const addCapRes = await ctx.appManifestProvider.addCapabilities(ctx, inputs, capabilitiesToAddManifest);
81
+ if (addCapRes.isErr())
82
+ return teamsfx_api_1.err(addCapRes.error);
83
+ const webAppInfo = {
84
+ name: "WebApplicationInfo",
85
+ snippet: {
86
+ resource: constants_2.ManifestTemplate.WEB_APP_INFO_RESOURCE,
87
+ id: constants_2.ManifestTemplate.WEB_APP_INFO_ID,
88
+ },
89
+ };
90
+ const updateWebAppInfoRes = await ctx.appManifestProvider.updateCapability(ctx, inputs, webAppInfo);
91
+ if (updateWebAppInfoRes.isErr())
92
+ return teamsfx_api_1.err(updateWebAppInfoRes.error);
93
+ const activeResourcePlugins = solutionSettings.activeResourcePlugins;
94
+ if (!activeResourcePlugins.includes(this.name))
95
+ activeResourcePlugins.push(this.name);
96
+ return teamsfx_api_1.ok([]);
97
+ }
98
+ async deploy(ctx, inputs, envInfo, tokenProvider) {
99
+ const buildRes = await this.spfxPluginImpl.buildSPPackage(ctx, inputs);
100
+ if (buildRes.isErr()) {
101
+ return buildRes;
102
+ }
103
+ return await this.spfxPluginImpl.deploy(ctx, inputs, tokenProvider);
104
+ }
105
+ };
106
+ tslib_1.__decorate([
107
+ lib_1.hooks([CommonErrorHandlerMW_1.CommonErrorHandlerMW({ telemetry: { component: constants_1.BuiltInFeaturePluginNames.spfx } })]),
108
+ tslib_1.__metadata("design:type", Function),
109
+ tslib_1.__metadata("design:paramtypes", [Object, Object]),
110
+ tslib_1.__metadata("design:returntype", Promise)
111
+ ], SPFxPluginV3.prototype, "addInstance", null);
112
+ tslib_1.__decorate([
113
+ lib_1.hooks([CommonErrorHandlerMW_1.CommonErrorHandlerMW({ telemetry: { component: constants_1.BuiltInFeaturePluginNames.spfx } })]),
114
+ tslib_1.__metadata("design:type", Function),
115
+ tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object]),
116
+ tslib_1.__metadata("design:returntype", Promise)
117
+ ], SPFxPluginV3.prototype, "deploy", null);
118
+ SPFxPluginV3 = tslib_1.__decorate([
119
+ typedi_1.Service(constants_1.BuiltInFeaturePluginNames.spfx)
120
+ ], SPFxPluginV3);
121
+ exports.SPFxPluginV3 = SPFxPluginV3;
122
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/resource/spfx/v3/index.ts"],"names":[],"mappings":";;;;AAAA,+CAA8C;AAC9C,wDAcgC;AAChC,mCAAiC;AACjC,2FAAwF;AACxF,0EAAuF;AACvF,uGAAoG;AACpG,qEAAqE;AACrE,mCAAgD;AAChD,mDAA6B;AAC7B,kDAK4B;AAE5B,qCAA0C;AAC1C,kDAAsD;AACtD,mDAA6B;AAG7B,IAAa,YAAY,GAAzB,MAAa,YAAY;IAAzB;QACE,SAAI,GAAG,qCAAyB,CAAC,IAAI,CAAC;QACtC,gBAAW,GAAG,MAAM,CAAC;QACrB,gBAAW,GAAG,6BAA6B,CAAC;QAE5C,mBAAc,GAAmB,IAAI,uBAAc,EAAE,CAAC;IAkHxD,CAAC;I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,2CAAoB,CAAC,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,qCAAyB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;;;;+CA6E3F;AAGD;IADC,WAAK,CAAC,CAAC,2CAAoB,CAAC,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,qCAAyB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;;;;0CAY3F;AAtHU,YAAY;IADxB,gBAAO,CAAC,qCAAyB,CAAC,IAAI,CAAC;GAC3B,YAAY,CAuHxB;AAvHY,oCAAY"}
@@ -0,0 +1,11 @@
1
+ import { FxError, Result, TokenProvider, v2, v3 } from "@microsoft/teamsfx-api";
2
+ export declare class SPFxPluginImpl {
3
+ scaffold(ctx: v3.ContextWithManifestProvider, inputs: v2.InputsWithProjectPath, componentId: string): Promise<Result<any, FxError>>;
4
+ buildSPPackage(ctx: v2.Context, inputs: v2.InputsWithProjectPath): Promise<Result<any, FxError>>;
5
+ deploy(ctx: v2.Context, inputs: v2.InputsWithProjectPath, tokenProvider: TokenProvider): Promise<Result<any, FxError>>;
6
+ private getAppID;
7
+ private getTenant;
8
+ private static findGulpCommand;
9
+ private getPackage;
10
+ }
11
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/resource/spfx/v3/plugin.ts"],"names":[],"mappings":"AAwBA,OAAO,EAGL,OAAO,EAGP,MAAM,EACN,aAAa,EAEb,EAAE,EACF,EAAE,EACH,MAAM,wBAAwB,CAAC;AAMhC,qBAAa,cAAc;IACnB,QAAQ,CACZ,GAAG,EAAE,EAAE,CAAC,2BAA2B,EACnC,MAAM,EAAE,EAAE,CAAC,qBAAqB,EAChC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAgK1B,cAAc,CAClB,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,EAAE,CAAC,qBAAqB,GAC/B,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAuD1B,MAAM,CACV,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,EAAE,CAAC,qBAAqB,EAChC,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YAgHlB,QAAQ;YAMR,SAAS;mBA4BF,eAAe;YAmBtB,UAAU;CAKzB"}
@@ -0,0 +1,290 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SPFxPluginImpl = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const __1 = require("../../../..");
6
+ const constants_1 = require("../../appstudio/constants");
7
+ const error_1 = require("../error");
8
+ const constants_2 = require("../utils/constants");
9
+ const lodash_1 = tslib_1.__importDefault(require("lodash"));
10
+ const questions_1 = require("../utils/questions");
11
+ const utils_1 = require("../utils/utils");
12
+ const path_1 = tslib_1.__importDefault(require("path"));
13
+ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
14
+ const teamsfx_api_1 = require("@microsoft/teamsfx-api");
15
+ const progress_helper_1 = require("../utils/progress-helper");
16
+ const util = tslib_1.__importStar(require("util"));
17
+ const spoClient_1 = require("../spoClient");
18
+ const axios_1 = tslib_1.__importDefault(require("axios"));
19
+ class SPFxPluginImpl {
20
+ async scaffold(ctx, inputs, componentId) {
21
+ var _a;
22
+ try {
23
+ const webpartName = inputs[questions_1.SPFXQuestionNames.webpart_name];
24
+ const componentName = utils_1.Utils.normalizeComponentName(webpartName);
25
+ const componentNameCamelCase = lodash_1.default.camelCase(componentName);
26
+ const componentClassName = `${componentName}WebPart`;
27
+ const componentStrings = componentClassName + "Strings";
28
+ const libraryName = lodash_1.default.kebabCase((_a = ctx.projectSetting) === null || _a === void 0 ? void 0 : _a.appName);
29
+ let componentAlias = componentClassName;
30
+ if (componentClassName.length > constants_2.Constants.MAX_ALIAS_LENGTH) {
31
+ componentAlias = componentClassName.substring(0, constants_2.Constants.MAX_ALIAS_LENGTH);
32
+ }
33
+ let componentClassNameKebabCase = lodash_1.default.kebabCase(componentClassName);
34
+ if (componentClassNameKebabCase.length > constants_2.Constants.MAX_BUNDLE_NAME_LENGTH) {
35
+ componentClassNameKebabCase = componentClassNameKebabCase.substring(0, constants_2.Constants.MAX_BUNDLE_NAME_LENGTH);
36
+ const lastCharacterIndex = componentClassNameKebabCase.length - 1;
37
+ if (componentClassNameKebabCase[lastCharacterIndex] === "-") {
38
+ componentClassNameKebabCase = componentClassNameKebabCase.substring(0, lastCharacterIndex);
39
+ }
40
+ }
41
+ const outputFolderPath = `${inputs.projectPath}/SPFx`;
42
+ await fs_extra_1.default.mkdir(outputFolderPath);
43
+ // teams folder
44
+ const teamsDir = `${outputFolderPath}/teams`;
45
+ const templateFolder = path_1.default.join(__1.getTemplatesFolder(), "plugins", "resource", "spfx");
46
+ await fs_extra_1.default.mkdir(teamsDir);
47
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./webpart/base/images/color.png"), `${teamsDir}/${componentId}_color.png`);
48
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./webpart/base/images/outline.png"), `${teamsDir}/${componentId}_outline.png`);
49
+ // src folder
50
+ const srcDir = `${outputFolderPath}/src`;
51
+ await fs_extra_1.default.mkdir(srcDir);
52
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./solution/src/index.ts"), `${srcDir}/index.ts`);
53
+ switch (inputs[questions_1.SPFXQuestionNames.framework_type]) {
54
+ case constants_2.Constants.FRAMEWORK_NONE:
55
+ fs_extra_1.default.mkdirSync(`${srcDir}/webparts/${componentNameCamelCase}`, {
56
+ recursive: true,
57
+ });
58
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./webpart/none/{componentClassName}.module.scss"), `${srcDir}/webparts/${componentNameCamelCase}/${componentClassName}.module.scss`);
59
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./webpart/none/{componentClassName}.ts"), `${srcDir}/webparts/${componentNameCamelCase}/${componentClassName}.ts`);
60
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./webpart/none/package.json"), `${outputFolderPath}/package.json`);
61
+ break;
62
+ case constants_2.Constants.FRAMEWORK_REACT:
63
+ const componentDir = `${srcDir}/webparts/${componentNameCamelCase}/components`;
64
+ fs_extra_1.default.mkdirSync(componentDir, { recursive: true });
65
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./webpart/react/{componentClassName}.ts"), `${srcDir}/webparts/${componentNameCamelCase}/${componentClassName}.ts`);
66
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./webpart/react/components/{componentName}.module.scss"), `${componentDir}/${componentName}.module.scss`);
67
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./webpart/react/components/{componentName}.tsx"), `${componentDir}/${componentName}.tsx`);
68
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./webpart/react/components/I{componentName}Props.ts"), `${componentDir}/I${componentName}Props.ts`);
69
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./webpart/react/package.json"), `${outputFolderPath}/package.json`);
70
+ break;
71
+ }
72
+ await fs_extra_1.default.copy(path_1.default.resolve(templateFolder, "./webpart/base/loc"), `${srcDir}/webparts/${componentNameCamelCase}/loc`);
73
+ await fs_extra_1.default.copy(path_1.default.resolve(templateFolder, "./webpart/base/{componentClassName}.manifest.json"), `${srcDir}/webparts/${componentNameCamelCase}/${componentClassName}.manifest.json`);
74
+ // config folder
75
+ await fs_extra_1.default.copy(path_1.default.resolve(templateFolder, "./solution/config"), `${outputFolderPath}/config`);
76
+ // Other files
77
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./solution/README.md"), `${outputFolderPath}/README.md`);
78
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./solution/_gitignore"), `${outputFolderPath}/.gitignore`);
79
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./solution/gulpfile.js"), `${outputFolderPath}/gulpfile.js`);
80
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./solution/tsconfig.json"), `${outputFolderPath}/tsconfig.json`);
81
+ await fs_extra_1.default.copyFile(path_1.default.resolve(templateFolder, "./solution/tslint.json"), `${outputFolderPath}/tslint.json`);
82
+ // Configure placeholders
83
+ const replaceMap = new Map();
84
+ replaceMap.set(constants_2.PlaceHolders.componentName, componentName);
85
+ replaceMap.set(constants_2.PlaceHolders.componentNameCamelCase, componentNameCamelCase);
86
+ replaceMap.set(constants_2.PlaceHolders.componentClassName, componentClassName);
87
+ replaceMap.set(constants_2.PlaceHolders.componentStrings, componentStrings);
88
+ replaceMap.set(constants_2.PlaceHolders.libraryName, libraryName);
89
+ replaceMap.set(constants_2.PlaceHolders.componentId, componentId);
90
+ replaceMap.set(constants_2.PlaceHolders.componentAlias, componentAlias);
91
+ replaceMap.set(constants_2.PlaceHolders.componentDescription, inputs[questions_1.SPFXQuestionNames.webpart_desp]);
92
+ replaceMap.set(constants_2.PlaceHolders.componentNameUnescaped, webpartName);
93
+ replaceMap.set(constants_2.PlaceHolders.componentClassNameKebabCase, componentClassNameKebabCase);
94
+ const appDirectory = await __1.getAppDirectory(inputs.projectPath);
95
+ await utils_1.Utils.configure(outputFolderPath, replaceMap);
96
+ await utils_1.Utils.configure(path_1.default.join(appDirectory, constants_1.MANIFEST_TEMPLATE), replaceMap);
97
+ await utils_1.Utils.configure(path_1.default.join(appDirectory, constants_1.MANIFEST_LOCAL), replaceMap);
98
+ return teamsfx_api_1.ok(undefined);
99
+ }
100
+ catch (error) {
101
+ return teamsfx_api_1.err(error_1.ScaffoldError(error));
102
+ }
103
+ }
104
+ async buildSPPackage(ctx, inputs) {
105
+ var _a;
106
+ const progressHandler = await progress_helper_1.ProgressHelper.startPreDeployProgressHandler(ctx.userInteraction);
107
+ if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
108
+ ctx.logProvider.outputChannel.show();
109
+ }
110
+ try {
111
+ const workspacePath = `${inputs.projectPath}/SPFx`;
112
+ await (progressHandler === null || progressHandler === void 0 ? void 0 : progressHandler.next(constants_2.PreDeployProgressMessage.NpmInstall));
113
+ await utils_1.Utils.execute(`npm install`, "SPFx", workspacePath, ctx.logProvider, true);
114
+ const gulpCommand = await SPFxPluginImpl.findGulpCommand(workspacePath);
115
+ await (progressHandler === null || progressHandler === void 0 ? void 0 : progressHandler.next(constants_2.PreDeployProgressMessage.GulpBundle));
116
+ await utils_1.Utils.execute(`${gulpCommand} bundle --ship --no-color`, "SPFx", workspacePath, ctx.logProvider, true);
117
+ await (progressHandler === null || progressHandler === void 0 ? void 0 : progressHandler.next(constants_2.PreDeployProgressMessage.GulpPackage));
118
+ await utils_1.Utils.execute(`${gulpCommand} package-solution --ship --no-color`, "SPFx", workspacePath, ctx.logProvider, true);
119
+ await progress_helper_1.ProgressHelper.endPreDeployProgress(true);
120
+ const sharepointPackage = await this.getPackage(inputs.projectPath);
121
+ if (!(await fs_extra_1.default.pathExists(sharepointPackage))) {
122
+ throw error_1.NoSPPackageError(sharepointPackage);
123
+ }
124
+ const dir = path_1.default.normalize(path_1.default.parse(sharepointPackage).dir);
125
+ if (inputs.platform === teamsfx_api_1.Platform.CLI) {
126
+ const guidance = [
127
+ {
128
+ content: "Success: SharePoint package successfully built at ",
129
+ color: teamsfx_api_1.Colors.BRIGHT_GREEN,
130
+ },
131
+ { content: dir, color: teamsfx_api_1.Colors.BRIGHT_MAGENTA },
132
+ ];
133
+ ctx.userInteraction.showMessage("info", guidance, false);
134
+ }
135
+ else {
136
+ const guidance = util.format(__1.getStrings().plugins.SPFx.buildNotice, dir);
137
+ (_a = ctx.userInteraction) === null || _a === void 0 ? void 0 : _a.showMessage("info", guidance, false, "OK");
138
+ }
139
+ return teamsfx_api_1.ok(undefined);
140
+ }
141
+ catch (error) {
142
+ await progress_helper_1.ProgressHelper.endPreDeployProgress(false);
143
+ return teamsfx_api_1.err(error_1.BuildSPPackageError(error));
144
+ }
145
+ }
146
+ async deploy(ctx, inputs, tokenProvider) {
147
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
148
+ const progressHandler = await progress_helper_1.ProgressHelper.startDeployProgressHandler(ctx.userInteraction);
149
+ let success = false;
150
+ try {
151
+ const tenant = await this.getTenant(tokenProvider);
152
+ if (tenant.isErr()) {
153
+ return tenant;
154
+ }
155
+ spoClient_1.SPOClient.setBaseUrl(tenant.value);
156
+ const spoToken = await ((_a = tokenProvider.sharepointTokenProvider) === null || _a === void 0 ? void 0 : _a.getAccessToken());
157
+ if (!spoToken) {
158
+ return teamsfx_api_1.err(error_1.GetSPOTokenFailedError());
159
+ }
160
+ let appCatalogSite = await spoClient_1.SPOClient.getAppCatalogSite(spoToken);
161
+ if (appCatalogSite) {
162
+ spoClient_1.SPOClient.setBaseUrl(appCatalogSite);
163
+ }
164
+ else {
165
+ const res = await ((_b = ctx.userInteraction) === null || _b === void 0 ? void 0 : _b.showMessage("warn", util.format(__1.getStrings().plugins.SPFx.createAppCatalogNotice, tenant.value), true, "OK", constants_2.Constants.READ_MORE));
166
+ const confirm = (res === null || res === void 0 ? void 0 : res.isOk()) ? res.value : undefined;
167
+ switch (confirm) {
168
+ case "OK":
169
+ try {
170
+ await (progressHandler === null || progressHandler === void 0 ? void 0 : progressHandler.next(constants_2.DeployProgressMessage.CreateSPAppCatalog));
171
+ await spoClient_1.SPOClient.createAppCatalog(spoToken);
172
+ }
173
+ catch (e) {
174
+ return teamsfx_api_1.err(error_1.CreateAppCatalogFailedError(e));
175
+ }
176
+ let retry = 0;
177
+ appCatalogSite = await spoClient_1.SPOClient.getAppCatalogSite(spoToken);
178
+ while (appCatalogSite == null && retry < constants_2.Constants.APP_CATALOG_MAX_TIMES) {
179
+ (_c = ctx.logProvider) === null || _c === void 0 ? void 0 : _c.warning(`No tenant app catalog found, retry: ${retry}`);
180
+ await utils_1.sleep(constants_2.Constants.APP_CATALOG_REFRESH_TIME);
181
+ appCatalogSite = await spoClient_1.SPOClient.getAppCatalogSite(spoToken);
182
+ retry += 1;
183
+ }
184
+ if (appCatalogSite) {
185
+ spoClient_1.SPOClient.setBaseUrl(appCatalogSite);
186
+ (_d = ctx.logProvider) === null || _d === void 0 ? void 0 : _d.info(`Sharepoint tenant app catalog ${appCatalogSite} created, wait for a few minutes to be active.`);
187
+ await utils_1.sleep(constants_2.Constants.APP_CATALOG_ACTIVE_TIME);
188
+ }
189
+ else {
190
+ return teamsfx_api_1.err(error_1.CreateAppCatalogFailedError(new Error("Cannot get app catalog site url after creation. You may need wait a few minutes and retry.")));
191
+ }
192
+ break;
193
+ case constants_2.Constants.READ_MORE:
194
+ (_e = ctx.userInteraction) === null || _e === void 0 ? void 0 : _e.openUrl(constants_2.Constants.CREATE_APP_CATALOG_GUIDE);
195
+ return teamsfx_api_1.ok(teamsfx_api_1.UserCancelError);
196
+ default:
197
+ return teamsfx_api_1.ok(undefined);
198
+ }
199
+ }
200
+ const appPackage = await this.getPackage(inputs.projectPath);
201
+ if (!(await fs_extra_1.default.pathExists(appPackage))) {
202
+ return teamsfx_api_1.err(error_1.NoSPPackageError(appPackage));
203
+ }
204
+ const fileName = path_1.default.parse(appPackage).base;
205
+ const bytes = await fs_extra_1.default.readFile(appPackage);
206
+ try {
207
+ await (progressHandler === null || progressHandler === void 0 ? void 0 : progressHandler.next(constants_2.DeployProgressMessage.UploadAndDeploy));
208
+ await spoClient_1.SPOClient.uploadAppPackage(spoToken, fileName, bytes);
209
+ }
210
+ catch (e) {
211
+ if (((_f = e.response) === null || _f === void 0 ? void 0 : _f.status) === 403) {
212
+ (_g = ctx.userInteraction) === null || _g === void 0 ? void 0 : _g.showMessage("error", util.format(__1.getStrings().plugins.SPFx.deployFailedNotice, appCatalogSite), false, "OK");
213
+ return teamsfx_api_1.err(error_1.InsufficientPermissionError(appCatalogSite));
214
+ }
215
+ else {
216
+ return teamsfx_api_1.err(error_1.UploadAppPackageFailedError(e));
217
+ }
218
+ }
219
+ const appID = await this.getAppID(inputs.projectPath);
220
+ await spoClient_1.SPOClient.deployAppPackage(spoToken, appID);
221
+ const guidance = util.format(__1.getStrings().plugins.SPFx.deployNotice, appPackage, appCatalogSite, appCatalogSite);
222
+ if (inputs.platform === teamsfx_api_1.Platform.CLI) {
223
+ (_h = ctx.userInteraction) === null || _h === void 0 ? void 0 : _h.showMessage("info", guidance, false);
224
+ }
225
+ else {
226
+ (_j = ctx.userInteraction) === null || _j === void 0 ? void 0 : _j.showMessage("info", guidance, false, "OK");
227
+ }
228
+ success = true;
229
+ return teamsfx_api_1.ok(undefined);
230
+ }
231
+ finally {
232
+ await progress_helper_1.ProgressHelper.endDeployProgress(success);
233
+ }
234
+ }
235
+ async getAppID(root) {
236
+ const solutionConfig = await fs_extra_1.default.readJson(`${root}/SPFx/config/package-solution.json`);
237
+ const appID = solutionConfig["solution"]["id"];
238
+ return appID;
239
+ }
240
+ async getTenant(tokenProvider) {
241
+ var _a, _b;
242
+ const graphToken = await ((_a = tokenProvider.graphTokenProvider) === null || _a === void 0 ? void 0 : _a.getAccessToken());
243
+ if (!graphToken) {
244
+ return teamsfx_api_1.err(error_1.GetGraphTokenFailedError());
245
+ }
246
+ const tokenJson = await ((_b = tokenProvider.graphTokenProvider) === null || _b === void 0 ? void 0 : _b.getJsonObject());
247
+ const username = tokenJson.unique_name;
248
+ const instance = axios_1.default.create({
249
+ baseURL: "https://graph.microsoft.com/v1.0",
250
+ });
251
+ instance.defaults.headers.common["Authorization"] = `Bearer ${graphToken}`;
252
+ let tenant = "";
253
+ try {
254
+ const res = await instance.get("/sites/root?$select=webUrl");
255
+ if (res && res.data && res.data.webUrl) {
256
+ tenant = res.data.webUrl;
257
+ }
258
+ else {
259
+ return teamsfx_api_1.err(error_1.GetTenantFailedError(username));
260
+ }
261
+ }
262
+ catch (e) {
263
+ return teamsfx_api_1.err(error_1.GetTenantFailedError(username, e));
264
+ }
265
+ return teamsfx_api_1.ok(tenant);
266
+ }
267
+ static async findGulpCommand(rootPath) {
268
+ let gulpCommand;
269
+ const platform = process.platform;
270
+ if (platform === "win32" &&
271
+ (await fs_extra_1.default.pathExists(path_1.default.join(rootPath, "node_modules", ".bin", "gulp.cmd")))) {
272
+ gulpCommand = path_1.default.join(".", "node_modules", ".bin", "gulp.cmd");
273
+ }
274
+ else if ((platform === "linux" || platform === "darwin") &&
275
+ (await fs_extra_1.default.pathExists(path_1.default.join(rootPath, "node_modules", ".bin", "gulp")))) {
276
+ gulpCommand = path_1.default.join(".", "node_modules", ".bin", "gulp");
277
+ }
278
+ else {
279
+ gulpCommand = "gulp";
280
+ }
281
+ return gulpCommand;
282
+ }
283
+ async getPackage(root) {
284
+ const solutionConfig = await fs_extra_1.default.readJson(`${root}/SPFx/config/package-solution.json`);
285
+ const sharepointPackage = `${root}/SPFx/sharepoint/${solutionConfig.paths.zippedPackage}`;
286
+ return sharepointPackage;
287
+ }
288
+ }
289
+ exports.SPFxPluginImpl = SPFxPluginImpl;
290
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../../src/plugins/resource/spfx/v3/plugin.ts"],"names":[],"mappings":";;;;AAAA,mCAA8E;AAC9E,yDAA8E;AAC9E,oCAUkB;AAClB,kDAK4B;AAC5B,4DAA4B;AAC5B,kDAAuD;AACvD,0CAA8C;AAC9C,wDAAwB;AACxB,gEAA0B;AAC1B,wDAWgC;AAChC,8DAA0D;AAC1D,mDAA6B;AAC7B,4CAAyC;AACzC,0DAA0B;AAE1B,MAAa,cAAc;IACzB,KAAK,CAAC,QAAQ,CACZ,GAAmC,EACnC,MAAgC,EAChC,WAAmB;;QAEnB,IAAI;YACF,MAAM,WAAW,GAAG,MAAM,CAAC,6BAAiB,CAAC,YAAY,CAAW,CAAC;YACrE,MAAM,aAAa,GAAG,aAAK,CAAC,sBAAsB,CAAC,WA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, v2, v3, Void } from
2
2
  import { SqlConfig } from "../config";
3
3
  import { SqlClient } from "../sqlClient";
4
4
  import { ManagementClient } from "../managementClient";
5
- export declare class SqlPluginV3 implements v3.FeaturePlugin {
5
+ export declare class SqlPluginV3 implements v3.PluginV3 {
6
6
  name: string;
7
7
  displayName: string;
8
8
  totalFirewallRuleCount: number;
9
9
  config: SqlConfig;
10
- pluginDependencies(ctx: v2.Context, inputs: Inputs): Promise<Result<string[], FxError>>;
11
- generateNewSqlServerBicep(ctx: v3.ContextWithManifestProvider): Promise<Result<v2.ResourceTemplate[], FxError>>;
12
- generateNewDatabaseBicep(ctx: v3.ContextWithManifestProvider): Promise<Result<v2.ResourceTemplate[], FxError>>;
13
- addFeature(ctx: v3.ContextWithManifestProvider, inputs: v2.InputsWithProjectPath): Promise<Result<v2.ResourceTemplate[], FxError>>;
14
- afterOtherFeaturesAdded(ctx: v3.ContextWithManifestProvider, inputs: v3.OtherFeaturesAddedInputs): Promise<Result<v2.ResourceTemplate[], FxError>>;
10
+ generateBicep(ctx: v3.ContextWithManifestProvider, inputs: v3.AddFeatureInputs): Promise<Result<v3.BicepTemplate[], FxError>>;
11
+ generateNewSqlServerBicep(ctx: v3.ContextWithManifestProvider, inputs: v3.AddFeatureInputs): Promise<Result<v3.BicepTemplate[], FxError>>;
12
+ generateNewDatabaseBicep(): Promise<Result<v3.BicepTemplate[], FxError>>;
13
+ addInstance(ctx: v3.ContextWithManifestProvider, inputs: v2.InputsWithProjectPath): Promise<Result<string[], FxError>>;
14
+ updateBicep(ctx: v3.ContextWithManifestProvider, inputs: v3.UpdateInputs): Promise<Result<v3.BicepTemplate[], FxError>>;
15
15
  getQuestionsForProvision(ctx: v2.Context, inputs: Inputs, envInfo: v2.DeepReadonly<v3.EnvInfoV3>, tokenProvider: TokenProvider): Promise<Result<QTreeNode | undefined, FxError>>;
16
16
  getRuleName(suffix: number): string;
17
+ private removeDatabases;
18
+ private parseLoginToken;
19
+ provisionResource(ctx: v2.Context, inputs: v2.InputsWithProjectPath, envInfo: v3.EnvInfoV3, tokenProvider: TokenProvider): Promise<Result<Void, FxError>>;
17
20
  configureResource(ctx: v2.Context, inputs: v2.InputsWithProjectPath, envInfo: v3.EnvInfoV3, tokenProvider: TokenProvider, telemetryProps?: any): Promise<Result<Void, FxError>>;
18
21
  addDatabaseUser(ctx: v2.Context, sqlClient: SqlClient, managementClient: ManagementClient): Promise<void>;
19
22
  private CheckAndSetAadAdmin;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/resource/sql/v3/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,OAAO,EACP,MAAM,EAGN,SAAS,EACT,MAAM,EACN,aAAa,EACb,EAAE,EACF,EAAE,EACF,IAAI,EACL,MAAM,wBAAwB,CAAC;AAqBhC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAItC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,EAAE,gBAAgB,EAAgB,MAAM,qBAAqB,CAAC;AAErE,qBACa,WAAY,YAAW,EAAE,CAAC,aAAa;IAClD,IAAI,SAAiC;IACrC,WAAW,SAAwB;IACnC,sBAAsB,SAAK;IAC3B,MAAM,EAAE,SAAS,CAAmB;IAE9B,kBAAkB,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAIhF,yBAAyB,CACpC,GAAG,EAAE,EAAE,CAAC,2BAA2B,GAClC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,gBAAgB,EAAE,EAAE,OAAO,CAAC,CAAC;IAmCrC,wBAAwB,CACnC,GAAG,EAAE,EAAE,CAAC,2BAA2B,GAClC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,gBAAgB,EAAE,EAAE,OAAO,CAAC,CAAC;IAkC5C,UAAU,CACd,GA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