@microsoft/teamsfx-core 2.0.8-alpha.e17ffd4d1.0 → 2.0.8-alpha.e1b11d5b2.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 (390) hide show
  1. package/build/common/constants.d.ts +6 -19
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +6 -20
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/deps-checker/constant/message.d.ts +1 -1
  6. package/build/common/deps-checker/constant/message.d.ts.map +1 -1
  7. package/build/common/deps-checker/constant/message.js +1 -1
  8. package/build/common/deps-checker/constant/message.js.map +1 -1
  9. package/build/common/deps-checker/util/fileHelper.js +1 -1
  10. package/build/common/deps-checker/util/fileHelper.js.map +1 -1
  11. package/build/common/featureFlags.d.ts +70 -7
  12. package/build/common/featureFlags.d.ts.map +1 -1
  13. package/build/common/featureFlags.js +66 -42
  14. package/build/common/featureFlags.js.map +1 -1
  15. package/build/common/m365/launchHelper.d.ts +1 -1
  16. package/build/common/m365/launchHelper.d.ts.map +1 -1
  17. package/build/common/m365/launchHelper.js +3 -6
  18. package/build/common/m365/launchHelper.js.map +1 -1
  19. package/build/common/m365/packageService.d.ts +1 -1
  20. package/build/common/m365/packageService.d.ts.map +1 -1
  21. package/build/common/m365/packageService.js +18 -39
  22. package/build/common/m365/packageService.js.map +1 -1
  23. package/build/common/projectSettingsHelper.d.ts +7 -2
  24. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  25. package/build/common/projectSettingsHelper.js +25 -7
  26. package/build/common/projectSettingsHelper.js.map +1 -1
  27. package/build/common/projectTypeChecker.d.ts +2 -0
  28. package/build/common/projectTypeChecker.d.ts.map +1 -1
  29. package/build/common/projectTypeChecker.js +16 -0
  30. package/build/common/projectTypeChecker.js.map +1 -1
  31. package/build/common/samples.d.ts +1 -2
  32. package/build/common/samples.d.ts.map +1 -1
  33. package/build/common/samples.js +37 -83
  34. package/build/common/samples.js.map +1 -1
  35. package/build/common/stringUtils.d.ts +10 -0
  36. package/build/common/stringUtils.d.ts.map +1 -0
  37. package/build/common/stringUtils.js +121 -0
  38. package/build/common/stringUtils.js.map +1 -0
  39. package/build/common/telemetry.d.ts +20 -2
  40. package/build/common/telemetry.d.ts.map +1 -1
  41. package/build/common/telemetry.js +43 -6
  42. package/build/common/telemetry.js.map +1 -1
  43. package/build/common/templates-config.json +1 -1
  44. package/build/common/wrappedAxiosClient.d.ts.map +1 -1
  45. package/build/common/wrappedAxiosClient.js +7 -5
  46. package/build/common/wrappedAxiosClient.js.map +1 -1
  47. package/build/component/configManager/constant.d.ts +2 -1
  48. package/build/component/configManager/constant.d.ts.map +1 -1
  49. package/build/component/configManager/constant.js +1 -0
  50. package/build/component/configManager/constant.js.map +1 -1
  51. package/build/component/configManager/validator.js +1 -1
  52. package/build/component/configManager/validator.js.map +1 -1
  53. package/build/component/constants.js +2 -2
  54. package/build/component/constants.js.map +1 -1
  55. package/build/component/coordinator/index.d.ts +0 -38
  56. package/build/component/coordinator/index.d.ts.map +1 -1
  57. package/build/component/coordinator/index.js +133 -199
  58. package/build/component/coordinator/index.js.map +1 -1
  59. package/build/component/driver/aad/create.d.ts +1 -0
  60. package/build/component/driver/aad/create.d.ts.map +1 -1
  61. package/build/component/driver/aad/create.js +22 -11
  62. package/build/component/driver/aad/create.js.map +1 -1
  63. package/build/component/driver/aad/error/aadManifestError.d.ts +6 -0
  64. package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
  65. package/build/component/driver/aad/error/aadManifestError.js +25 -1
  66. package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
  67. package/build/component/driver/aad/error/clientSecretNotAllowedError.d.ts +5 -0
  68. package/build/component/driver/aad/error/clientSecretNotAllowedError.d.ts.map +1 -0
  69. package/build/component/driver/aad/error/clientSecretNotAllowedError.js +23 -0
  70. package/build/component/driver/aad/error/clientSecretNotAllowedError.js.map +1 -0
  71. package/build/component/driver/aad/error/credentialInvalidLifetimeError.d.ts +5 -0
  72. package/build/component/driver/aad/error/credentialInvalidLifetimeError.d.ts.map +1 -0
  73. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js +23 -0
  74. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js.map +1 -0
  75. package/build/component/driver/aad/interface/IAADDefinition.d.ts +1 -0
  76. package/build/component/driver/aad/interface/IAADDefinition.d.ts.map +1 -1
  77. package/build/component/driver/aad/interface/createAadAppArgs.d.ts +3 -0
  78. package/build/component/driver/aad/interface/createAadAppArgs.d.ts.map +1 -1
  79. package/build/component/driver/aad/permissions/index.d.ts.map +1 -1
  80. package/build/component/driver/aad/permissions/index.js +9 -0
  81. package/build/component/driver/aad/permissions/index.js.map +1 -1
  82. package/build/component/driver/aad/utility/aadAppClient.d.ts +3 -2
  83. package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
  84. package/build/component/driver/aad/utility/aadAppClient.js +35 -17
  85. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  86. package/build/component/driver/aad/utility/aadManifestHelper.d.ts.map +1 -1
  87. package/build/component/driver/aad/utility/aadManifestHelper.js +9 -1
  88. package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
  89. package/build/component/driver/aad/utility/constants.d.ts +6 -0
  90. package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
  91. package/build/component/driver/aad/utility/constants.js +8 -2
  92. package/build/component/driver/aad/utility/constants.js.map +1 -1
  93. package/build/component/driver/apiKey/create.d.ts +0 -3
  94. package/build/component/driver/apiKey/create.d.ts.map +1 -1
  95. package/build/component/driver/apiKey/create.js +23 -48
  96. package/build/component/driver/apiKey/create.js.map +1 -1
  97. package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts +2 -0
  98. package/build/component/driver/apiKey/interface/createApiKeyArgs.d.ts.map +1 -1
  99. package/build/component/driver/apiKey/interface/updateApiKeyArgs.d.ts +9 -0
  100. package/build/component/driver/apiKey/interface/updateApiKeyArgs.d.ts.map +1 -0
  101. package/build/component/driver/apiKey/interface/updateApiKeyArgs.js +5 -0
  102. package/build/component/driver/apiKey/interface/updateApiKeyArgs.js.map +1 -0
  103. package/build/component/driver/apiKey/update.d.ts +13 -0
  104. package/build/component/driver/apiKey/update.d.ts.map +1 -0
  105. package/build/component/driver/apiKey/update.js +182 -0
  106. package/build/component/driver/apiKey/update.js.map +1 -0
  107. package/build/component/driver/apiKey/utility/constants.d.ts +2 -0
  108. package/build/component/driver/apiKey/utility/constants.d.ts.map +1 -1
  109. package/build/component/driver/apiKey/utility/constants.js +2 -0
  110. package/build/component/driver/apiKey/utility/constants.js.map +1 -1
  111. package/build/component/driver/apiKey/utility/utility.d.ts +7 -0
  112. package/build/component/driver/apiKey/utility/utility.d.ts.map +1 -0
  113. package/build/component/driver/apiKey/utility/utility.js +55 -0
  114. package/build/component/driver/apiKey/utility/utility.js.map +1 -0
  115. package/build/component/driver/deploy/spfx/utility/spoClient.d.ts.map +1 -1
  116. package/build/component/driver/deploy/spfx/utility/spoClient.js +3 -1
  117. package/build/component/driver/deploy/spfx/utility/spoClient.js.map +1 -1
  118. package/build/component/driver/index.d.ts +3 -0
  119. package/build/component/driver/index.d.ts.map +1 -1
  120. package/build/component/driver/index.js +3 -0
  121. package/build/component/driver/index.js.map +1 -1
  122. package/build/component/driver/middleware/addSWADeployTelemetry.js +2 -2
  123. package/build/component/driver/middleware/addSWADeployTelemetry.js.map +1 -1
  124. package/build/component/driver/oauth/create.d.ts +12 -0
  125. package/build/component/driver/oauth/create.d.ts.map +1 -0
  126. package/build/component/driver/oauth/create.js +193 -0
  127. package/build/component/driver/oauth/create.js.map +1 -0
  128. package/build/component/driver/oauth/error/oauthAuthInfoInvalid.d.ts +5 -0
  129. package/build/component/driver/oauth/error/oauthAuthInfoInvalid.d.ts.map +1 -0
  130. package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js +21 -0
  131. package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js.map +1 -0
  132. package/build/component/driver/oauth/error/oauthDomainInvalid.d.ts +5 -0
  133. package/build/component/driver/oauth/error/oauthDomainInvalid.d.ts.map +1 -0
  134. package/build/component/driver/oauth/error/oauthDomainInvalid.js +22 -0
  135. package/build/component/driver/oauth/error/oauthDomainInvalid.js.map +1 -0
  136. package/build/component/driver/oauth/error/oauthFailedToGetDomain.d.ts +5 -0
  137. package/build/component/driver/oauth/error/oauthFailedToGetDomain.d.ts.map +1 -0
  138. package/build/component/driver/oauth/error/oauthFailedToGetDomain.js +21 -0
  139. package/build/component/driver/oauth/error/oauthFailedToGetDomain.js.map +1 -0
  140. package/build/component/driver/oauth/error/oauthNameTooLong.d.ts +5 -0
  141. package/build/component/driver/oauth/error/oauthNameTooLong.d.ts.map +1 -0
  142. package/build/component/driver/oauth/error/oauthNameTooLong.js +21 -0
  143. package/build/component/driver/oauth/error/oauthNameTooLong.js.map +1 -0
  144. package/build/component/driver/oauth/interface/createOauthArgs.d.ts +12 -0
  145. package/build/component/driver/oauth/interface/createOauthArgs.d.ts.map +1 -0
  146. package/build/component/driver/oauth/interface/createOauthArgs.js +5 -0
  147. package/build/component/driver/oauth/interface/createOauthArgs.js.map +1 -0
  148. package/build/component/driver/oauth/interface/createOauthOutputs.d.ts +7 -0
  149. package/build/component/driver/oauth/interface/createOauthOutputs.d.ts.map +1 -0
  150. package/build/component/driver/oauth/interface/createOauthOutputs.js +10 -0
  151. package/build/component/driver/oauth/interface/createOauthOutputs.js.map +1 -0
  152. package/build/component/driver/oauth/interface/updateOauthArgs.d.ts +9 -0
  153. package/build/component/driver/oauth/interface/updateOauthArgs.d.ts.map +1 -0
  154. package/build/component/driver/oauth/interface/updateOauthArgs.js +5 -0
  155. package/build/component/driver/oauth/interface/updateOauthArgs.js.map +1 -0
  156. package/build/component/driver/oauth/update.d.ts +13 -0
  157. package/build/component/driver/oauth/update.d.ts.map +1 -0
  158. package/build/component/driver/oauth/update.js +181 -0
  159. package/build/component/driver/oauth/update.js.map +1 -0
  160. package/build/component/driver/oauth/utility/constants.d.ts +13 -0
  161. package/build/component/driver/oauth/utility/constants.d.ts.map +1 -0
  162. package/build/component/driver/oauth/utility/constants.js +18 -0
  163. package/build/component/driver/oauth/utility/constants.js.map +1 -0
  164. package/build/component/driver/oauth/utility/utility.d.ts +12 -0
  165. package/build/component/driver/oauth/utility/utility.d.ts.map +1 -0
  166. package/build/component/driver/oauth/utility/utility.js +90 -0
  167. package/build/component/driver/oauth/utility/utility.js.map +1 -0
  168. package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
  169. package/build/component/driver/script/scriptDriver.js +8 -8
  170. package/build/component/driver/script/scriptDriver.js.map +1 -1
  171. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +11 -3
  172. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
  173. package/build/component/driver/teamsApp/clients/appStudioClient.js +54 -2
  174. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  175. package/build/component/driver/teamsApp/constants.d.ts +4 -0
  176. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  177. package/build/component/driver/teamsApp/constants.js +4 -0
  178. package/build/component/driver/teamsApp/constants.js.map +1 -1
  179. package/build/component/driver/teamsApp/createAppPackage.d.ts +19 -1
  180. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  181. package/build/component/driver/teamsApp/createAppPackage.js +97 -26
  182. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  183. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts +20 -0
  184. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.d.ts.map +1 -1
  185. package/build/component/driver/teamsApp/interfaces/ApiSecretRegistration.js.map +1 -1
  186. package/build/component/driver/teamsApp/interfaces/OauthConfigurationId.d.ts +7 -0
  187. package/build/component/driver/teamsApp/interfaces/OauthConfigurationId.d.ts.map +1 -0
  188. package/build/component/driver/teamsApp/interfaces/OauthConfigurationId.js +5 -0
  189. package/build/component/driver/teamsApp/interfaces/OauthConfigurationId.js.map +1 -0
  190. package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +44 -0
  191. package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -0
  192. package/build/component/driver/teamsApp/interfaces/OauthRegistration.js +21 -0
  193. package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -0
  194. package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
  195. package/build/component/driver/teamsApp/teamsappMgr.js +22 -8
  196. package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
  197. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +8 -0
  198. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -0
  199. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +65 -0
  200. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -0
  201. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
  202. package/build/component/driver/teamsApp/utils/ManifestUtils.js +3 -15
  203. package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
  204. package/build/component/driver/teamsApp/utils/telemetry.d.ts +2 -0
  205. package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
  206. package/build/component/driver/teamsApp/utils/telemetry.js +2 -0
  207. package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
  208. package/build/component/driver/teamsApp/utils/utils.d.ts +1 -0
  209. package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
  210. package/build/component/driver/teamsApp/utils/utils.js +5 -1
  211. package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
  212. package/build/component/driver/teamsApp/validateTestCases.d.ts +18 -0
  213. package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
  214. package/build/component/driver/teamsApp/validateTestCases.js +132 -50
  215. package/build/component/driver/teamsApp/validateTestCases.js.map +1 -1
  216. package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
  217. package/build/component/generator/copilotPlugin/generator.js +20 -26
  218. package/build/component/generator/copilotPlugin/generator.js.map +1 -1
  219. package/build/component/generator/copilotPlugin/helper.d.ts +7 -2
  220. package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
  221. package/build/component/generator/copilotPlugin/helper.js +156 -51
  222. package/build/component/generator/copilotPlugin/helper.js.map +1 -1
  223. package/build/component/generator/generator.d.ts +4 -2
  224. package/build/component/generator/generator.d.ts.map +1 -1
  225. package/build/component/generator/generator.js +11 -7
  226. package/build/component/generator/generator.js.map +1 -1
  227. package/build/component/generator/generatorProvider.d.ts +3 -0
  228. package/build/component/generator/generatorProvider.d.ts.map +1 -0
  229. package/build/component/generator/generatorProvider.js +18 -0
  230. package/build/component/generator/generatorProvider.js.map +1 -0
  231. package/build/component/generator/officeAddin/generator.d.ts +16 -2
  232. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  233. package/build/component/generator/officeAddin/generator.js +96 -44
  234. package/build/component/generator/officeAddin/generator.js.map +1 -1
  235. package/build/component/generator/officeAddin/helperMethods.d.ts +0 -3
  236. package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
  237. package/build/component/generator/officeAddin/helperMethods.js +1 -67
  238. package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
  239. package/build/component/generator/officeXMLAddin/generator.d.ts +6 -2
  240. package/build/component/generator/officeXMLAddin/generator.d.ts.map +1 -1
  241. package/build/component/generator/officeXMLAddin/generator.js +39 -19
  242. package/build/component/generator/officeXMLAddin/generator.js.map +1 -1
  243. package/build/component/generator/officeXMLAddin/projectConfig.d.ts +21 -33
  244. package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -1
  245. package/build/component/generator/officeXMLAddin/projectConfig.js +85 -86
  246. package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -1
  247. package/build/component/generator/spfx/spfxGenerator.d.ts +18 -5
  248. package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
  249. package/build/component/generator/spfx/spfxGenerator.js +123 -20
  250. package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
  251. package/build/component/generator/templates/ssrTabGenerator.d.ts +12 -0
  252. package/build/component/generator/templates/ssrTabGenerator.d.ts.map +1 -0
  253. package/build/component/generator/templates/ssrTabGenerator.js +36 -0
  254. package/build/component/generator/templates/ssrTabGenerator.js.map +1 -0
  255. package/build/component/generator/templates/templateGenerator.d.ts +12 -0
  256. package/build/component/generator/templates/templateGenerator.d.ts.map +1 -0
  257. package/build/component/generator/templates/templateGenerator.js +99 -0
  258. package/build/component/generator/templates/templateGenerator.js.map +1 -0
  259. package/build/component/generator/templates/templateInfo.d.ts +10 -0
  260. package/build/component/generator/templates/templateInfo.d.ts.map +1 -0
  261. package/build/component/generator/templates/templateInfo.js +3 -0
  262. package/build/component/generator/templates/templateInfo.js.map +1 -0
  263. package/build/component/generator/templates/templateNames.d.ts +52 -0
  264. package/build/component/generator/templates/templateNames.d.ts.map +1 -0
  265. package/build/component/generator/templates/templateNames.js +304 -0
  266. package/build/component/generator/templates/templateNames.js.map +1 -0
  267. package/build/component/generator/templates/templateReplaceMap.d.ts +5 -0
  268. package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -0
  269. package/build/component/generator/templates/templateReplaceMap.js +39 -0
  270. package/build/component/generator/templates/templateReplaceMap.js.map +1 -0
  271. package/build/component/generator/utils.d.ts +1 -0
  272. package/build/component/generator/utils.d.ts.map +1 -1
  273. package/build/component/generator/utils.js +2 -1
  274. package/build/component/generator/utils.js.map +1 -1
  275. package/build/component/middleware/actionExecutionMW.d.ts.map +1 -1
  276. package/build/component/middleware/actionExecutionMW.js +5 -4
  277. package/build/component/middleware/actionExecutionMW.js.map +1 -1
  278. package/build/component/middleware/questionMW.d.ts.map +1 -1
  279. package/build/component/middleware/questionMW.js +9 -1
  280. package/build/component/middleware/questionMW.js.map +1 -1
  281. package/build/component/utils/envUtil.d.ts +0 -1
  282. package/build/component/utils/envUtil.d.ts.map +1 -1
  283. package/build/component/utils/envUtil.js +1 -13
  284. package/build/component/utils/envUtil.js.map +1 -1
  285. package/build/component/utils/metadataGraphPermssion.d.ts +8 -6
  286. package/build/component/utils/metadataGraphPermssion.d.ts.map +1 -1
  287. package/build/component/utils/metadataGraphPermssion.js +10 -2
  288. package/build/component/utils/metadataGraphPermssion.js.map +1 -1
  289. package/build/component/utils/metadataRscPermission.d.ts +17 -0
  290. package/build/component/utils/metadataRscPermission.d.ts.map +1 -0
  291. package/build/component/utils/metadataRscPermission.js +81 -0
  292. package/build/component/utils/metadataRscPermission.js.map +1 -0
  293. package/build/component/utils/metadataUtil.d.ts.map +1 -1
  294. package/build/component/utils/metadataUtil.js +2 -0
  295. package/build/component/utils/metadataUtil.js.map +1 -1
  296. package/build/component/utils.d.ts +2 -1
  297. package/build/component/utils.d.ts.map +1 -1
  298. package/build/component/utils.js +43 -1
  299. package/build/component/utils.js.map +1 -1
  300. package/build/core/FxCore.d.ts +10 -5
  301. package/build/core/FxCore.d.ts.map +1 -1
  302. package/build/core/FxCore.js +287 -26
  303. package/build/core/FxCore.js.map +1 -1
  304. package/build/error/common.js +1 -1
  305. package/build/error/common.js.map +1 -1
  306. package/build/error/index.d.ts +1 -0
  307. package/build/error/index.d.ts.map +1 -1
  308. package/build/error/index.js +1 -0
  309. package/build/error/index.js.map +1 -1
  310. package/build/error/script.d.ts +2 -2
  311. package/build/error/script.d.ts.map +1 -1
  312. package/build/error/script.js +6 -6
  313. package/build/error/script.js.map +1 -1
  314. package/build/index.d.ts +4 -0
  315. package/build/index.d.ts.map +1 -1
  316. package/build/index.js +7 -1
  317. package/build/index.js.map +1 -1
  318. package/build/question/constants.d.ts.map +1 -1
  319. package/build/question/constants.js +6 -1
  320. package/build/question/constants.js.map +1 -1
  321. package/build/question/create.d.ts +24 -9
  322. package/build/question/create.d.ts.map +1 -1
  323. package/build/question/create.js +410 -240
  324. package/build/question/create.js.map +1 -1
  325. package/build/question/generator.js +2 -0
  326. package/build/question/generator.js.map +1 -1
  327. package/build/question/index.d.ts +2 -0
  328. package/build/question/index.d.ts.map +1 -1
  329. package/build/question/index.js +6 -0
  330. package/build/question/index.js.map +1 -1
  331. package/build/question/inputs/AddPluginInputs.d.ts +18 -0
  332. package/build/question/inputs/AddPluginInputs.d.ts.map +1 -0
  333. package/build/question/inputs/AddPluginInputs.js +5 -0
  334. package/build/question/inputs/AddPluginInputs.js.map +1 -0
  335. package/build/question/inputs/CreateProjectInputs.d.ts +9 -7
  336. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
  337. package/build/question/inputs/PermissionGrantInputs.d.ts +1 -1
  338. package/build/question/inputs/PermissionListInputs.d.ts +1 -1
  339. package/build/question/inputs/PreviewTeamsAppInputs.d.ts +1 -1
  340. package/build/question/inputs/SPFxAddWebpartInputs.d.ts +1 -1
  341. package/build/question/inputs/SelectTeamsManifestInputs.d.ts +1 -1
  342. package/build/question/inputs/ValidateTeamsAppInputs.d.ts +2 -2
  343. package/build/question/inputs/index.d.ts +1 -0
  344. package/build/question/inputs/index.d.ts.map +1 -1
  345. package/build/question/inputs/index.js +1 -0
  346. package/build/question/inputs/index.js.map +1 -1
  347. package/build/question/options/AddPluginOptions.d.ts +10 -0
  348. package/build/question/options/AddPluginOptions.d.ts.map +1 -0
  349. package/build/question/options/AddPluginOptions.js +39 -0
  350. package/build/question/options/AddPluginOptions.js.map +1 -0
  351. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  352. package/build/question/options/CreateProjectOptions.js +41 -13
  353. package/build/question/options/CreateProjectOptions.js.map +1 -1
  354. package/build/question/options/PermissionGrantOptions.js +1 -1
  355. package/build/question/options/PermissionGrantOptions.js.map +1 -1
  356. package/build/question/options/PermissionListOptions.js +1 -1
  357. package/build/question/options/PermissionListOptions.js.map +1 -1
  358. package/build/question/options/PreviewTeamsAppOptions.js +1 -1
  359. package/build/question/options/PreviewTeamsAppOptions.js.map +1 -1
  360. package/build/question/options/SPFxAddWebpartOptions.js +1 -1
  361. package/build/question/options/SPFxAddWebpartOptions.js.map +1 -1
  362. package/build/question/options/SelectTeamsManifestOptions.js +1 -1
  363. package/build/question/options/SelectTeamsManifestOptions.js.map +1 -1
  364. package/build/question/options/ValidateTeamsAppOptions.js +1 -1
  365. package/build/question/options/ValidateTeamsAppOptions.js.map +1 -1
  366. package/build/question/options/index.d.ts +1 -0
  367. package/build/question/options/index.d.ts.map +1 -1
  368. package/build/question/options/index.js +1 -0
  369. package/build/question/options/index.js.map +1 -1
  370. package/build/question/other.d.ts +9 -0
  371. package/build/question/other.d.ts.map +1 -1
  372. package/build/question/other.js +169 -8
  373. package/build/question/other.js.map +1 -1
  374. package/build/question/questionNames.d.ts +6 -2
  375. package/build/question/questionNames.d.ts.map +1 -1
  376. package/build/question/questionNames.js +5 -1
  377. package/build/question/questionNames.js.map +1 -1
  378. package/package.json +16 -11
  379. package/resource/package.nls.json +138 -79
  380. package/resource/yaml-schema/v1.5/yaml.schema.json +1784 -0
  381. package/resource/yaml-schema/yaml.schema.json +198 -2
  382. package/templates/fallback/common.zip +0 -0
  383. package/templates/fallback/csharp.zip +0 -0
  384. package/templates/fallback/js.zip +0 -0
  385. package/templates/fallback/python.zip +0 -0
  386. package/templates/fallback/ts.zip +0 -0
  387. package/build/component/generator/officeAddin/config/projectsJsonData.d.ts +0 -26
  388. package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +0 -1
  389. package/build/component/generator/officeAddin/config/projectsJsonData.js +0 -165
  390. package/build/component/generator/officeAddin/config/projectsJsonData.js.map +0 -1
@@ -10,55 +10,75 @@ const tslib_1 = require("tslib");
10
10
  const lib_1 = require("@feathersjs/hooks/lib");
11
11
  const teamsfx_api_1 = require("@microsoft/teamsfx-api");
12
12
  const childProcess = tslib_1.__importStar(require("child_process"));
13
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
13
+ const lodash_1 = tslib_1.__importStar(require("lodash"));
14
14
  const office_addin_manifest_1 = require("office-addin-manifest");
15
15
  const path_1 = require("path");
16
16
  const util_1 = require("util");
17
- const generator_1 = require("../generator");
18
- const helperMethods_1 = require("../officeAddin/helperMethods");
19
- const actionExecutionMW_1 = require("../../middleware/actionExecutionMW");
17
+ const localizeUtils_1 = require("../../../common/localizeUtils");
20
18
  const error_1 = require("../../../error");
21
- const create_1 = require("../../../question/create");
22
19
  const questionNames_1 = require("../../../question/questionNames");
20
+ const actionExecutionMW_1 = require("../../middleware/actionExecutionMW");
21
+ const generator_1 = require("../generator");
23
22
  const projectConfig_1 = require("./projectConfig");
24
- const localizeUtils_1 = require("../../../common/localizeUtils");
23
+ const utils_1 = require("../utils");
24
+ const utils_2 = require("../../utils");
25
25
  const COMPONENT_NAME = "office-xml-addin";
26
26
  const TELEMETRY_EVENT = "generate";
27
27
  const TEMPLATE_BASE = "office-xml-addin";
28
+ const TEMPLATE_COMMON_NAME = "office-xml-addin-common";
29
+ const TEMPLATE_COMMON_LANG = "common";
30
+ /**
31
+ * project-type=office-xml-addin-type addin-host!==outlook
32
+ */
28
33
  class OfficeXMLAddinGenerator {
29
- static async generate(context, inputs, destinationPath) {
30
- const host = inputs[questionNames_1.QuestionNames.OfficeAddinCapability];
31
- const project = inputs[questionNames_1.QuestionNames.Capabilities];
32
- const lang = inputs[questionNames_1.QuestionNames.ProgrammingLanguage] === create_1.ProgrammingLanguage.TS ? "ts" : "js";
34
+ static async generate(context, inputs, destinationPath, actionContext) {
35
+ const host = inputs[questionNames_1.QuestionNames.OfficeAddinHost];
36
+ const capability = inputs[questionNames_1.QuestionNames.Capabilities];
37
+ const lang = lodash_1.default.toLower(inputs[questionNames_1.QuestionNames.ProgrammingLanguage]);
38
+ const langKey = utils_1.convertToLangKey(lang);
33
39
  const appName = inputs[questionNames_1.QuestionNames.AppName];
34
- const templateName = projectConfig_1.getOfficeXMLAddinHostProjectTemplateName(host, project);
35
- const repoInfo = projectConfig_1.getOfficeXMLAddinHostProjectRepoInfo(host, project, lang);
40
+ const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
41
+ const templateConfig = projectConfig_1.getOfficeAddinTemplateConfig(projectType, host);
42
+ const templateName = templateConfig[capability].localTemplate;
43
+ const projectLink = templateConfig[capability].framework["default"][lang];
36
44
  const workingDir = process.cwd();
37
45
  const progressBar = context.userInteraction.createProgressBar(localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.bar.title"), 1);
46
+ lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
47
+ ["office-xml-addin-host" /* host */]: host,
48
+ ["office-xml-addin-project" /* project */]: capability,
49
+ ["office-xml-addin-lang" /* lang */]: lang,
50
+ });
38
51
  try {
39
52
  process.chdir(destinationPath);
40
53
  await progressBar.start();
41
54
  await progressBar.next(localizeUtils_1.getLocalizedString("core.createProjectQuestion.officeXMLAddin.bar.detail"));
42
- if (!!repoInfo) {
55
+ if (!!projectLink) {
43
56
  // [Condition]: Project have remote repo (not manifest-only proj)
44
57
  // -> Step: Download the project from GitHub
45
- await helperMethods_1.HelperMethods.downloadProjectTemplateZipFile(destinationPath, repoInfo);
58
+ const fetchRes = await utils_2.fetchAndUnzip("office-xml-addin-generator", projectLink, destinationPath);
59
+ if (fetchRes.isErr()) {
60
+ return teamsfx_api_1.err(fetchRes.error);
61
+ }
46
62
  // -> Step: Convert to single Host
47
63
  await OfficeXMLAddinGenerator.childProcessExec(`npm run convert-to-single-host --if-present -- ${lodash_1.default.toLower(host)}`);
48
64
  }
49
65
  else {
50
66
  // [Condition]: Manifest Only
51
67
  // -> Step: Copy proj files for manifest-only project
52
- const getManifestOnlyProjectTemplateRes = await generator_1.Generator.generateTemplate(context, destinationPath, `${TEMPLATE_BASE}-manifest-only`, lang);
68
+ const getManifestOnlyProjectTemplateRes = await generator_1.Generator.generateTemplate(context, destinationPath, `${TEMPLATE_BASE}-manifest-only`, langKey);
53
69
  if (getManifestOnlyProjectTemplateRes.isErr())
54
- return teamsfx_api_1.err(getManifestOnlyProjectTemplateRes.error);
70
+ throw teamsfx_api_1.err(getManifestOnlyProjectTemplateRes.error);
55
71
  }
56
72
  // -> Common Step: Copy the README (or with manifest for manifest-only proj)
57
- const getReadmeTemplateRes = await generator_1.Generator.generateTemplate(context, destinationPath, `${TEMPLATE_BASE}-${templateName}`, lang);
73
+ const getReadmeTemplateRes = await generator_1.Generator.generateTemplate(context, destinationPath, `${TEMPLATE_BASE}-${templateName}`, langKey);
58
74
  if (getReadmeTemplateRes.isErr())
59
- return teamsfx_api_1.err(getReadmeTemplateRes.error);
75
+ throw teamsfx_api_1.err(getReadmeTemplateRes.error);
60
76
  // -> Common Step: Modify the Manifest
61
77
  await office_addin_manifest_1.OfficeAddinManifest.modifyManifestFile(`${path_1.join(destinationPath, "manifest.xml")}`, "random", `${appName}`);
78
+ // -> Common Step: Generate OfficeXMLAddin specific `teamsapp.yml`
79
+ const generateOfficeYMLRes = await generator_1.Generator.generateTemplate(context, destinationPath, TEMPLATE_COMMON_NAME, TEMPLATE_COMMON_LANG);
80
+ if (generateOfficeYMLRes.isErr())
81
+ throw teamsfx_api_1.err(generateOfficeYMLRes.error);
62
82
  process.chdir(workingDir);
63
83
  await progressBar.end(true, true);
64
84
  return teamsfx_api_1.ok(undefined);
@@ -83,7 +103,7 @@ tslib_1.__decorate([
83
103
  }),
84
104
  ]),
85
105
  tslib_1.__metadata("design:type", Function),
86
- tslib_1.__metadata("design:paramtypes", [Object, Object, String]),
106
+ tslib_1.__metadata("design:paramtypes", [Object, Object, String, Object]),
87
107
  tslib_1.__metadata("design:returntype", Promise)
88
108
  ], OfficeXMLAddinGenerator, "generate", null);
89
109
  exports.OfficeXMLAddinGenerator = OfficeXMLAddinGenerator;
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../src/component/generator/officeXMLAddin/generator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AAEH,+CAA8C;AAC9C,wDAAmF;AACnF,oEAA8C;AAC9C,4DAAuB;AACvB,iEAA4D;AAC5D,+BAA4B;AAC5B,+B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Aa,CAAC,CAAU,CAAC,CAAC,CAAC;SACvC;IACH,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAe;QAIlD,OAAO,gBAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF;AAhFC;IARC,WAAK,CAAC;QACL,qCAAiB,CAAC;YAChB,eAAe,EAAE,IAAI;YACrB,sBAAsB,EAAE,cAAc;YACtC,kBAAkB,EAAE,eAAe;YACnC,WAAW,EAAE,cAAc;SAC5B,CAAC;KACH,CAAC;;;;6CAyED;AAjFH,0DAyFC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../src/component/generator/officeXMLAddin/generator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AAEH,+CAA8C;AAC9C,wDAAmF;AACnF,oEAA8C;AAC9C,yDAAkC;AAClC,iEAA4D;AAC5D,+BAA4B;AAC5B,+BAAiC;AACjC,iEAAmE;AACnE,0CAA+C;AAC/C,mEAAgE;AAChE,0EAAsF;AACtF,4CAAyC;AAEzC,mDAA+D;AAC/D,oCAA4C;AAC5C,uCAA4C;AAE5C,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAC1C,MAAM,eAAe,GAAG,UAAU,CAAC;AACnC,MAAM,aAAa,GAAG,kBAAkB,CAAC;AACzC,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AACvD,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AAQtC;;GAEG;AACH,MAAa,uBAAuB;IASlC,MAAM,CAAC,KAAK,CAAC,QAAQ,CACnB,OAAgB,EAChB,MAAc,EACd,eAAuB,EACvB,aAA6B;QAE7B,MAAM,IAAI,GAAG,MAAM,CAAC,6BAAa,CAAC,eAAe,CAAW,CAAC;QAC7D,MAAM,UAAU,GAAG,MAAM,CAAC,6BAAa,CAAC,YAAY,CAAC,CAAC;QACtD,MAAM,IAAI,GAAG,gBAAC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AC,CAAC;SACtB;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YAC1B,MAAM,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACnC,OAAO,iBAAG,CAAC,qBAAa,CAAC,CAAU,CAAC,CAAC,CAAC;SACvC;IACH,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAe;QAIlD,OAAO,gBAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;CACF;AA3GC;IARC,WAAK,CAAC;QACL,qCAAiB,CAAC;YAChB,eAAe,EAAE,IAAI;YACrB,sBAAsB,EAAE,cAAc;YACtC,kBAAkB,EAAE,eAAe;YACnC,WAAW,EAAE,cAAc;SAC5B,CAAC;KACH,CAAC;;;;6CAoGD;AA5GH,0DAoHC"}
@@ -1,36 +1,24 @@
1
1
  /**
2
- * Get all available Office XML Addin Project Options of one host
3
- * @param host Office host
4
- * @returns the detail proj options[] of the host
2
+ * @author zyun@microsoft.com
5
3
  */
6
- export declare function getOfficeXMLAddinHostProjectOptions(host: string): {
7
- proj: string;
8
- title: string;
9
- detail: string;
10
- }[];
11
- /**
12
- * Get all available Lang Options of one host and proj
13
- * @param host Office host
14
- * @param proj proj name
15
- * @returns the detail lang options[] of the proj
16
- */
17
- export declare function getOfficeXMLAddinHostProjectLangOptions(host: string, proj: string): {
18
- id: string;
19
- label: string;
20
- }[];
21
- /**
22
- * Get all available Lang Options of one host and proj
23
- * @param host Office host
24
- * @param proj proj name
25
- * @returns the detail lang options[] of the proj
26
- */
27
- export declare function getOfficeXMLAddinHostProjectTemplateName(host: string, proj: string): string;
28
- /**
29
- * Get the Repo Info of the proj
30
- * @param host wxp
31
- * @param proj proj name
32
- * @param lang ts or js
33
- * @returns Repo Info
34
- */
35
- export declare function getOfficeXMLAddinHostProjectRepoInfo(host: string, proj: string, lang: "ts" | "js"): string;
4
+ interface IOfficeAddinHostConfig {
5
+ [property: string]: {
6
+ title: string;
7
+ detail: string;
8
+ localTemplate: string;
9
+ manifestPath?: string;
10
+ framework: {
11
+ [property: string]: {
12
+ typescript?: string;
13
+ javascript?: string;
14
+ };
15
+ };
16
+ };
17
+ }
18
+ interface IOfficeAddinProjectConfig {
19
+ [property: string]: IOfficeAddinHostConfig;
20
+ }
21
+ export declare const OfficeAddinProjectConfig: IOfficeAddinProjectConfig;
22
+ export declare function getOfficeAddinTemplateConfig(projectType: string, addinHost?: string): IOfficeAddinHostConfig;
23
+ export {};
36
24
  //# sourceMappingURL=projectConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"projectConfig.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/officeXMLAddin/projectConfig.ts"],"names":[],"mappings":"AA0IA;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,MAAM,GAAG;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,EAAE,CAUF;AAED;;;;;GAKG;AACH,wBAAgB,uCAAuC,CACrD,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX;IACD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,EAAE,CAUF;AAED;;;;;GAKG;AACH,wBAAgB,wCAAwC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3F;AAED;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,IAAI,GAAG,IAAI,GAChB,MAAM,CAGR"}
1
+ {"version":3,"file":"projectConfig.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/officeXMLAddin/projectConfig.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,UAAU,sBAAsB;IAC9B,CAAC,QAAQ,EAAE,MAAM,GAAG;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE;YACT,CAAC,QAAQ,EAAE,MAAM,GAAG;gBAClB,UAAU,CAAC,EAAE,MAAM,CAAC;gBACpB,UAAU,CAAC,EAAE,MAAM,CAAC;aACrB,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,UAAU,yBAAyB;IACjC,CAAC,QAAQ,EAAE,MAAM,GAAG,sBAAsB,CAAC;CAC5C;AAsCD,eAAO,MAAM,wBAAwB,EAAE,yBA0HtC,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,sBAAsB,CASxB"}
@@ -2,126 +2,125 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT license.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getOfficeXMLAddinHostProjectRepoInfo = exports.getOfficeXMLAddinHostProjectTemplateName = exports.getOfficeXMLAddinHostProjectLangOptions = exports.getOfficeXMLAddinHostProjectOptions = void 0;
5
+ exports.getOfficeAddinTemplateConfig = exports.OfficeAddinProjectConfig = void 0;
6
+ const question_1 = require("../../../question");
6
7
  const CommonProjectConfig = {
7
8
  taskpane: {
8
9
  title: "core.createProjectQuestion.officeXMLAddin.taskpane.title",
9
10
  detail: "core.createProjectQuestion.officeXMLAddin.taskpane.detail",
10
- lang: {
11
- ts: "https://aka.ms/ccdevx-fx-taskpane-ts",
12
- js: "https://aka.ms/ccdevx-fx-taskpane-js",
11
+ framework: {
12
+ default: {
13
+ typescript: "https://aka.ms/ccdevx-fx-taskpane-ts",
14
+ javascript: "https://aka.ms/ccdevx-fx-taskpane-js",
15
+ },
13
16
  },
14
17
  },
15
18
  sso: {
16
- lang: {
17
- ts: "https://aka.ms/ccdevx-fx-sso-ts",
18
- js: "https://aka.ms/ccdevx-fx-sso-js",
19
+ framework: {
20
+ default: {
21
+ typescript: "https://aka.ms/ccdevx-fx-sso-ts",
22
+ javascript: "https://aka.ms/ccdevx-fx-sso-js",
23
+ },
19
24
  },
20
25
  },
21
26
  react: {
22
- lang: {
23
- ts: "https://aka.ms/ccdevx-fx-react-ts",
24
- js: "https://aka.ms/ccdevx-fx-react-js",
27
+ framework: {
28
+ default: {
29
+ typescript: "https://aka.ms/ccdevx-fx-react-ts",
30
+ javascript: "https://aka.ms/ccdevx-fx-react-js",
31
+ },
25
32
  },
26
33
  },
27
34
  manifest: {
28
35
  title: "core.createProjectQuestion.officeXMLAddin.manifestOnly.title",
29
36
  detail: "core.createProjectQuestion.officeXMLAddin.manifestOnly.detail",
30
- lang: {},
37
+ framework: {
38
+ default: {},
39
+ },
31
40
  },
32
41
  };
33
- const OfficeXMLAddinProjectConfig = {
42
+ exports.OfficeAddinProjectConfig = {
43
+ json: {
44
+ "json-taskpane": {
45
+ title: "core.newTaskpaneAddin.label",
46
+ detail: "core.newTaskpaneAddin.detail",
47
+ localTemplate: "",
48
+ framework: {
49
+ default_old: {
50
+ typescript: "https://aka.ms/teams-toolkit/office-addin-taskpane",
51
+ },
52
+ default: {
53
+ typescript: "https://aka.ms/teams-toolkit/office-addin-taskpane/ts-default",
54
+ javascript: "https://aka.ms/teams-toolkit/office-addin-taskpane/js-default",
55
+ },
56
+ react: {
57
+ typescript: "https://aka.ms/teams-toolkit/office-addin-taskpane/ts-react",
58
+ javascript: "https://aka.ms/teams-toolkit/office-addin-taskpane/js-react",
59
+ },
60
+ },
61
+ manifestPath: "manifest.json",
62
+ },
63
+ "office-content-addin": {
64
+ title: "core.newContentAddin.label",
65
+ detail: "core.newContentAddin.detail",
66
+ localTemplate: "",
67
+ framework: {
68
+ default: {
69
+ typescript: "https://aka.ms/teams-toolkit/office-addin-content/ts-default",
70
+ javascript: "https://aka.ms/teams-toolkit/office-addin-content/js-default",
71
+ },
72
+ },
73
+ manifestPath: "manifest.json",
74
+ },
75
+ },
34
76
  word: {
35
- taskpane: Object.assign({ localTemplate: "word-taskpane" }, CommonProjectConfig.taskpane),
36
- sso: Object.assign({ title: "core.createProjectQuestion.officeXMLAddin.word.sso.title", detail: "core.createProjectQuestion.officeXMLAddin.word.sso.detail", localTemplate: "word-sso" }, CommonProjectConfig.sso),
37
- react: Object.assign({ title: "core.createProjectQuestion.officeXMLAddin.word.react.title", detail: "core.createProjectQuestion.officeXMLAddin.word.react.detail", localTemplate: "word-react" }, CommonProjectConfig.react),
38
- manifest: Object.assign({ localTemplate: "word-manifest-only" }, CommonProjectConfig.manifest),
77
+ "word-taskpane": Object.assign({ localTemplate: "word-taskpane" }, CommonProjectConfig.taskpane),
78
+ "word-sso": Object.assign({ title: "core.createProjectQuestion.officeXMLAddin.word.sso.title", detail: "core.createProjectQuestion.officeXMLAddin.word.sso.detail", localTemplate: "word-sso" }, CommonProjectConfig.sso),
79
+ "word-react": Object.assign({ title: "core.createProjectQuestion.officeXMLAddin.word.react.title", detail: "core.createProjectQuestion.officeXMLAddin.word.react.detail", localTemplate: "word-react" }, CommonProjectConfig.react),
80
+ "word-manifest": Object.assign({ localTemplate: "word-manifest-only" }, CommonProjectConfig.manifest),
39
81
  },
40
82
  excel: {
41
- taskpane: Object.assign({ localTemplate: "excel-taskpane" }, CommonProjectConfig.taskpane),
42
- sso: Object.assign({ title: "core.createProjectQuestion.officeXMLAddin.excel.sso.title", detail: "core.createProjectQuestion.officeXMLAddin.excel.sso.detail", localTemplate: "excel-sso" }, CommonProjectConfig.sso),
43
- react: Object.assign({ title: "core.createProjectQuestion.officeXMLAddin.excel.react.title", detail: "core.createProjectQuestion.officeXMLAddin.excel.react.detail", localTemplate: "excel-react" }, CommonProjectConfig.react),
44
- cfShared: {
83
+ "excel-taskpane": Object.assign({ localTemplate: "excel-taskpane" }, CommonProjectConfig.taskpane),
84
+ "excel-sso": Object.assign({ title: "core.createProjectQuestion.officeXMLAddin.excel.sso.title", detail: "core.createProjectQuestion.officeXMLAddin.excel.sso.detail", localTemplate: "excel-sso" }, CommonProjectConfig.sso),
85
+ "excel-react": Object.assign({ title: "core.createProjectQuestion.officeXMLAddin.excel.react.title", detail: "core.createProjectQuestion.officeXMLAddin.excel.react.detail", localTemplate: "excel-react" }, CommonProjectConfig.react),
86
+ "excel-custom-functions-shared": {
45
87
  title: "core.createProjectQuestion.officeXMLAddin.excel.cf.shared.title",
46
88
  detail: "core.createProjectQuestion.officeXMLAddin.excel.cf.shared.detail",
47
89
  localTemplate: "excel-cf",
48
- lang: {
49
- ts: "https://aka.ms/ccdevx-fx-cf-shared-ts",
50
- js: "https://aka.ms/ccdevx-fx-cf-shared-js",
90
+ framework: {
91
+ default: {
92
+ typescript: "https://aka.ms/ccdevx-fx-cf-shared-ts",
93
+ javascript: "https://aka.ms/ccdevx-fx-cf-shared-js",
94
+ },
51
95
  },
52
96
  },
53
- cfJS: {
97
+ "excel-custom-functions-js": {
54
98
  title: "core.createProjectQuestion.officeXMLAddin.excel.cf.js.title",
55
99
  detail: "core.createProjectQuestion.officeXMLAddin.excel.cf.js.detail",
56
100
  localTemplate: "excel-cf",
57
- lang: {
58
- ts: "https://aka.ms/ccdevx-fx-cf-js-ts",
59
- js: "https://aka.ms/ccdevx-fx-cf-js-js",
101
+ framework: {
102
+ default: {
103
+ typescript: "https://aka.ms/ccdevx-fx-cf-js-ts",
104
+ javascript: "https://aka.ms/ccdevx-fx-cf-js-js",
105
+ },
60
106
  },
61
107
  },
62
- manifest: Object.assign({ localTemplate: "excel-manifest-only" }, CommonProjectConfig.manifest),
108
+ "excel-manifest": Object.assign({ localTemplate: "excel-manifest-only" }, CommonProjectConfig.manifest),
63
109
  },
64
110
  powerpoint: {
65
- taskpane: Object.assign({ localTemplate: "powerpoint-taskpane" }, CommonProjectConfig.taskpane),
66
- sso: Object.assign({ localTemplate: "powerpoint-sso", title: "core.createProjectQuestion.officeXMLAddin.powerpoint.sso.title", detail: "core.createProjectQuestion.officeXMLAddin.powerpoint.sso.detail" }, CommonProjectConfig.sso),
67
- react: Object.assign({ localTemplate: "powerpoint-react", title: "core.createProjectQuestion.officeXMLAddin.powerpoint.react.title", detail: "core.createProjectQuestion.officeXMLAddin.powerpoint.react.detail" }, CommonProjectConfig.react),
68
- manifest: Object.assign({ localTemplate: "powerpoint-manifest-only" }, CommonProjectConfig.manifest),
111
+ "powerpoint-taskpane": Object.assign({ localTemplate: "powerpoint-taskpane" }, CommonProjectConfig.taskpane),
112
+ "powerpoint-sso": Object.assign({ localTemplate: "powerpoint-sso", title: "core.createProjectQuestion.officeXMLAddin.powerpoint.sso.title", detail: "core.createProjectQuestion.officeXMLAddin.powerpoint.sso.detail" }, CommonProjectConfig.sso),
113
+ "powerpoint-react": Object.assign({ localTemplate: "powerpoint-react", title: "core.createProjectQuestion.officeXMLAddin.powerpoint.react.title", detail: "core.createProjectQuestion.officeXMLAddin.powerpoint.react.detail" }, CommonProjectConfig.react),
114
+ "powerpoint-manifest": Object.assign({ localTemplate: "powerpoint-manifest-only" }, CommonProjectConfig.manifest),
69
115
  },
70
116
  };
71
- /**
72
- * Get all available Office XML Addin Project Options of one host
73
- * @param host Office host
74
- * @returns the detail proj options[] of the host
75
- */
76
- function getOfficeXMLAddinHostProjectOptions(host) {
77
- const result = [];
78
- for (const proj in OfficeXMLAddinProjectConfig[host]) {
79
- result.push({
80
- proj,
81
- title: OfficeXMLAddinProjectConfig[host][proj].title,
82
- detail: OfficeXMLAddinProjectConfig[host][proj].detail,
83
- });
84
- }
85
- return result;
86
- }
87
- exports.getOfficeXMLAddinHostProjectOptions = getOfficeXMLAddinHostProjectOptions;
88
- /**
89
- * Get all available Lang Options of one host and proj
90
- * @param host Office host
91
- * @param proj proj name
92
- * @returns the detail lang options[] of the proj
93
- */
94
- function getOfficeXMLAddinHostProjectLangOptions(host, proj) {
95
- const result = [];
96
- for (const lang in OfficeXMLAddinProjectConfig[host][proj].lang) {
97
- result.push(lang === "ts"
98
- ? { id: "typescript", label: "TypeScript" }
99
- : { id: "javascript", label: "JavaScript" });
117
+ function getOfficeAddinTemplateConfig(projectType, addinHost) {
118
+ if (projectType === question_1.ProjectTypeOptions.officeXMLAddin().id &&
119
+ addinHost &&
120
+ addinHost !== question_1.OfficeAddinHostOptions.outlook().id) {
121
+ return exports.OfficeAddinProjectConfig[addinHost];
100
122
  }
101
- return result;
102
- }
103
- exports.getOfficeXMLAddinHostProjectLangOptions = getOfficeXMLAddinHostProjectLangOptions;
104
- /**
105
- * Get all available Lang Options of one host and proj
106
- * @param host Office host
107
- * @param proj proj name
108
- * @returns the detail lang options[] of the proj
109
- */
110
- function getOfficeXMLAddinHostProjectTemplateName(host, proj) {
111
- return OfficeXMLAddinProjectConfig[host][proj].localTemplate;
112
- }
113
- exports.getOfficeXMLAddinHostProjectTemplateName = getOfficeXMLAddinHostProjectTemplateName;
114
- /**
115
- * Get the Repo Info of the proj
116
- * @param host wxp
117
- * @param proj proj name
118
- * @param lang ts or js
119
- * @returns Repo Info
120
- */
121
- function getOfficeXMLAddinHostProjectRepoInfo(host, proj, lang) {
122
- var _a;
123
- const result = (_a = OfficeXMLAddinProjectConfig[host][proj].lang) === null || _a === void 0 ? void 0 : _a[lang];
124
- return !!result ? result : "";
123
+ return exports.OfficeAddinProjectConfig["json"];
125
124
  }
126
- exports.getOfficeXMLAddinHostProjectRepoInfo = getOfficeXMLAddinHostProjectRepoInfo;
125
+ exports.getOfficeAddinTemplateConfig = getOfficeAddinTemplateConfig;
127
126
  //# sourceMappingURL=projectConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"projectConfig.js","sourceRoot":"","sources":["../../../../src/component/generator/officeXMLAddin/projectConfig.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAsBlC,MAAM,mBAAmB,GAAG;IAC1B,QAAQ,EAAE;QACR,KAAK,EAAE,0DAA0D;QACjE,MAAM,EAAE,2DAA2D;QACnE,IAAI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IAAY,EACZ,IAAY;IAKZ,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,KAAK,MAAM,IAAI,IAAI,2BAA2B,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;QAC/D,MAAM,CAAC,IAAI,CACT,IAAI,KAAK,IAAI;YACX,CAAC,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;YAC3C,CAAC,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,CAC9C,CAAC;KACH;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAhBD,0FAgBC;AAED;;;;;GAKG;AACH,SAAgB,wCAAwC,CAAC,IAAY,EAAE,IAAY;IACjF,OAAO,2BAA2B,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,CAAC;AAC/D,CAAC;AAFD,4FAEC;AAED;;;;;;GAMG;AACH,SAAgB,oCAAoC,CAClD,IAAY,EACZ,IAAY,EACZ,IAAiB;;IAEjB,MAAM,MAAM,GAAG,MAAA,2BAA2B,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,0CAAG,IAAI,CAAC,CAAC;IACpE,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AAChC,CAAC;AAPD,oFAOC"}
1
+ {"version":3,"file":"projectConfig.js","sourceRoot":"","sources":["../../../../src/component/generator/officeXMLAddin/projectConfig.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,gDAA+E;AAyB/E,MAAM,mBAAmB,GAAG;IAC1B,QAAQ,EAAE;QACR,KAAK,EAAE,0DAA0D;QACjE,MAAM,EAAE,2DAA2D;QACnE,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,UAAU,EAAE,sCAAsC;gBAClD,UAAU,EAAE,sCAAsC;aACnD;SACF;KACF;IACD,GAAG,EAAE;Q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kBAChB,aAAa,EAAE,kBAAkB,EACjC,KAAK,EAAE,kEAAkE,EACzE,MAAM,EAAE,mEAAmE,IACxE,mBAAmB,CAAC,KAAK,CAC7B;QACD,qBAAqB,kBACnB,aAAa,EAAE,0BAA0B,IACtC,mBAAmB,CAAC,QAAQ,CAChC;KACF;CACF,CAAC;AAEF,SAAgB,4BAA4B,CAC1C,WAAmB,EACnB,SAAkB;IAElB,IACE,WAAW,KAAK,6BAAkB,CAAC,cAAc,EAAE,CAAC,EAAE;QACtD,SAAS;QACT,SAAS,KAAK,iCAAsB,CAAC,OAAO,EAAE,CAAC,EAAE,EACjD;QACA,OAAO,gCAAwB,CAAC,SAAS,CAAC,CAAC;KAC5C;IACD,OAAO,gCAAwB,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC;AAZD,oEAYC"}
@@ -1,17 +1,30 @@
1
1
  import { Context, FxError, Inputs, Result } from "@microsoft/teamsfx-api";
2
2
  import { ActionContext } from "../../middleware/actionExecutionMW";
3
+ import { DefaultTemplateGenerator } from "../templates/templateGenerator";
4
+ import { TemplateInfo } from "../templates/templateInfo";
3
5
  export declare class SPFxGenerator {
4
6
  static generate(context: Context, inputs: Inputs, destinationPath: string, actionContext?: ActionContext): Promise<Result<undefined, FxError>>;
5
7
  private static newSPFxProject;
6
8
  private static importSPFxProject;
7
9
  static doYeomanScaffold(context: Context, inputs: Inputs, destinationPath: string): Promise<Result<string, FxError>>;
8
- static getSolutionName(spfxFolder: string): Promise<string | undefined>;
9
10
  private static getSolutionVersion;
10
11
  private static ensureLocalDependencies;
11
12
  private static shouldAddWebPartWithLocalDependencies;
12
- private static copySPFxSolution;
13
- private static getWebpartManifest;
14
- private static updateSPFxTemplate;
15
- private static getNodeVersion;
13
+ static copySPFxSolution(src: string, dest: string): Promise<void>;
14
+ static getWebpartManifest(spfxFolder: string): Promise<any | undefined>;
15
+ static updateSPFxTemplate(spfxFolder: string, destinationPath: string, importDetails: string[]): Promise<void>;
16
+ static getNodeVersion(solutionPath: string, context: Context): Promise<string>;
17
+ }
18
+ export declare class SPFxGeneratorNew extends DefaultTemplateGenerator {
19
+ componentName: string;
20
+ activate(context: Context, inputs: Inputs): boolean;
21
+ getTemplateInfos(context: Context, inputs: Inputs, destinationPath: string, actionContext?: ActionContext): Promise<Result<TemplateInfo[], FxError>>;
22
+ }
23
+ export declare class SPFxGeneratorImport extends DefaultTemplateGenerator {
24
+ componentName: string;
25
+ importDetails: string[];
26
+ activate(context: Context, inputs: Inputs): boolean;
27
+ getTemplateInfos(context: Context, inputs: Inputs, destinationPath: string, actionContext?: ActionContext): Promise<Result<TemplateInfo[], FxError>>;
28
+ post(context: Context, inputs: Inputs, destinationPath: string, actionContext?: ActionContext): Promise<Result<undefined, FxError>>;
16
29
  }
17
30
  //# sourceMappingURL=spfxGenerator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spfxGenerator.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/spfx/spfxGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,OAAO,EAEP,OAAO,EACP,MAAM,EAMN,MAAM,EAIP,MAAM,wBAAwB,CAAC;AAahC,OAAO,EAAE,aAAa,EAAqB,MAAM,oCAAoC,CAAC;AA0BtF,qBAAa,aAAa;WASJ,QAAQ,CAC1B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,EACvB,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;mBAajB,cAAc;mBAmBd,iBAAiB;WAiHlB,gBAAgB,CAClC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;WAmMf,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;mBAa/D,kBAAkB;mBAY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