@microsoft/teamsfx-core 2.0.10-alpha.fa1ce1fbb.0 → 2.0.10-alpha.fe2e47f9c.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 (663) hide show
  1. package/build/client/teamsDevPortalClient.d.ts +4 -5
  2. package/build/client/teamsDevPortalClient.d.ts.map +1 -1
  3. package/build/client/teamsDevPortalClient.js +67 -47
  4. package/build/client/teamsDevPortalClient.js.map +1 -1
  5. package/build/common/azureUtils.js +4 -4
  6. package/build/common/azureUtils.js.map +1 -1
  7. package/build/common/constants.d.ts +1 -19
  8. package/build/common/constants.d.ts.map +1 -1
  9. package/build/common/constants.js +10 -29
  10. package/build/common/constants.js.map +1 -1
  11. package/build/common/correlator.d.ts +1 -0
  12. package/build/common/correlator.d.ts.map +1 -1
  13. package/build/common/correlator.js +6 -1
  14. package/build/common/correlator.js.map +1 -1
  15. package/build/common/featureFlags.d.ts +49 -19
  16. package/build/common/featureFlags.d.ts.map +1 -1
  17. package/build/common/featureFlags.js +82 -62
  18. package/build/common/featureFlags.js.map +1 -1
  19. package/build/common/globalState.js +3 -3
  20. package/build/common/globalState.js.map +1 -1
  21. package/build/common/globalVars.d.ts +1 -0
  22. package/build/common/globalVars.d.ts.map +1 -1
  23. package/build/common/globalVars.js +2 -1
  24. package/build/common/globalVars.js.map +1 -1
  25. package/build/common/jsonUtils.js +10 -10
  26. package/build/common/jsonUtils.js.map +1 -1
  27. package/build/common/localizeUtils.js +2 -2
  28. package/build/common/localizeUtils.js.map +1 -1
  29. package/build/common/projectSettingsHelper.js +1 -1
  30. package/build/common/projectSettingsHelper.js.map +1 -1
  31. package/build/common/projectTypeChecker.js +3 -3
  32. package/build/common/projectTypeChecker.js.map +1 -1
  33. package/build/common/samples.js +5 -5
  34. package/build/common/samples.js.map +1 -1
  35. package/build/common/secretmasker/dict.d.ts +22 -0
  36. package/build/common/secretmasker/dict.d.ts.map +1 -0
  37. package/build/common/secretmasker/dict.js +83 -0
  38. package/build/common/secretmasker/dict.js.map +1 -0
  39. package/build/common/secretmasker/feature.d.ts +19 -0
  40. package/build/common/secretmasker/feature.d.ts.map +1 -0
  41. package/build/common/secretmasker/feature.js +389 -0
  42. package/build/common/secretmasker/feature.js.map +1 -0
  43. package/build/common/secretmasker/masker.d.ts +12 -0
  44. package/build/common/secretmasker/masker.d.ts.map +1 -0
  45. package/build/common/secretmasker/masker.js +54 -0
  46. package/build/common/secretmasker/masker.js.map +1 -0
  47. package/build/common/stringUtils.d.ts +3 -5
  48. package/build/common/stringUtils.d.ts.map +1 -1
  49. package/build/common/stringUtils.js +13 -105
  50. package/build/common/stringUtils.js.map +1 -1
  51. package/build/common/telemetry.d.ts +13 -2
  52. package/build/common/telemetry.d.ts.map +1 -1
  53. package/build/common/telemetry.js +21 -3
  54. package/build/common/telemetry.js.map +1 -1
  55. package/build/common/templates-config.json +1 -1
  56. package/build/common/tools.d.ts +1 -6
  57. package/build/common/tools.d.ts.map +1 -1
  58. package/build/common/tools.js +15 -28
  59. package/build/common/tools.js.map +1 -1
  60. package/build/common/utils.d.ts +4 -0
  61. package/build/common/utils.d.ts.map +1 -1
  62. package/build/common/utils.js +38 -1
  63. package/build/common/utils.js.map +1 -1
  64. package/build/common/wrappedAxiosClient.d.ts +1 -0
  65. package/build/common/wrappedAxiosClient.d.ts.map +1 -1
  66. package/build/common/wrappedAxiosClient.js +58 -29
  67. package/build/common/wrappedAxiosClient.js.map +1 -1
  68. package/build/component/configManager/actionInjector.js +2 -2
  69. package/build/component/configManager/actionInjector.js.map +1 -1
  70. package/build/component/configManager/lifecycle.js +9 -9
  71. package/build/component/configManager/lifecycle.js.map +1 -1
  72. package/build/component/configManager/parser.js +20 -20
  73. package/build/component/configManager/parser.js.map +1 -1
  74. package/build/component/configManager/validator.js +2 -2
  75. package/build/component/configManager/validator.js.map +1 -1
  76. package/build/component/constant/commonConstant.d.ts +1 -0
  77. package/build/component/constant/commonConstant.d.ts.map +1 -1
  78. package/build/component/constant/commonConstant.js +1 -0
  79. package/build/component/constant/commonConstant.js.map +1 -1
  80. package/build/component/constants.js +5 -5
  81. package/build/component/constants.js.map +1 -1
  82. package/build/component/coordinator/index.d.ts.map +1 -1
  83. package/build/component/coordinator/index.js +95 -212
  84. package/build/component/coordinator/index.js.map +1 -1
  85. package/build/component/coordinator/summary.js +10 -10
  86. package/build/component/coordinator/summary.js.map +1 -1
  87. package/build/component/deployUtils.js +4 -4
  88. package/build/component/deployUtils.js.map +1 -1
  89. package/build/component/deps-checker/constant/helpLink.d.ts +0 -3
  90. package/build/component/deps-checker/constant/helpLink.d.ts.map +1 -1
  91. package/build/component/deps-checker/constant/helpLink.js +1 -6
  92. package/build/component/deps-checker/constant/helpLink.js.map +1 -1
  93. package/build/component/deps-checker/constant/message.js +24 -24
  94. package/build/component/deps-checker/constant/message.js.map +1 -1
  95. package/build/component/deps-checker/internal/dotnetChecker.js +13 -13
  96. package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
  97. package/build/component/deps-checker/internal/funcToolChecker.js +13 -13
  98. package/build/component/deps-checker/internal/funcToolChecker.js.map +1 -1
  99. package/build/component/deps-checker/internal/testToolChecker.js +21 -21
  100. package/build/component/deps-checker/internal/testToolChecker.js.map +1 -1
  101. package/build/component/deps-checker/internal/vxTestAppChecker.d.ts.map +1 -1
  102. package/build/component/deps-checker/internal/vxTestAppChecker.js +14 -8
  103. package/build/component/deps-checker/internal/vxTestAppChecker.js.map +1 -1
  104. package/build/component/developerPortalScaffoldUtils.js +15 -15
  105. package/build/component/developerPortalScaffoldUtils.js.map +1 -1
  106. package/build/component/driver/aad/create.d.ts.map +1 -1
  107. package/build/component/driver/aad/create.js +38 -23
  108. package/build/component/driver/aad/create.js.map +1 -1
  109. package/build/component/driver/aad/error/aadAppNameTooLongError.js +2 -2
  110. package/build/component/driver/aad/error/aadAppNameTooLongError.js.map +1 -1
  111. package/build/component/driver/aad/error/aadManifestError.js +27 -27
  112. package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
  113. package/build/component/driver/aad/error/clientSecretNotAllowedError.js +2 -2
  114. package/build/component/driver/aad/error/clientSecretNotAllowedError.js.map +1 -1
  115. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js +2 -2
  116. package/build/component/driver/aad/error/credentialInvalidLifetimeError.js.map +1 -1
  117. package/build/component/driver/aad/error/invalidFieldInManifestError.js +2 -2
  118. package/build/component/driver/aad/error/invalidFieldInManifestError.js.map +1 -1
  119. package/build/component/driver/aad/error/missingEnvError.js +2 -2
  120. package/build/component/driver/aad/error/missingEnvError.js.map +1 -1
  121. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.d.ts +5 -0
  122. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.d.ts.map +1 -0
  123. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.js +23 -0
  124. package/build/component/driver/aad/error/missingServiceManagamentReferenceError.js.map +1 -0
  125. package/build/component/driver/aad/update.js +16 -16
  126. package/build/component/driver/aad/update.js.map +1 -1
  127. package/build/component/driver/aad/utility/aadAppClient.js +9 -9
  128. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  129. package/build/component/driver/aad/utility/aadManifestHelper.js +3 -3
  130. package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
  131. package/build/component/driver/aad/utility/buildAadManifest.js +5 -5
  132. package/build/component/driver/aad/utility/buildAadManifest.js.map +1 -1
  133. package/build/component/driver/aad/utility/constants.d.ts +2 -0
  134. package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
  135. package/build/component/driver/aad/utility/constants.js +2 -0
  136. package/build/component/driver/aad/utility/constants.js.map +1 -1
  137. package/build/component/driver/add/addWebPart.js +6 -6
  138. package/build/component/driver/add/addWebPart.js.map +1 -1
  139. package/build/component/driver/add/error/noConfigurationError.js +2 -2
  140. package/build/component/driver/add/error/noConfigurationError.js.map +1 -1
  141. package/build/component/driver/apiKey/create.d.ts.map +1 -1
  142. package/build/component/driver/apiKey/create.js +23 -20
  143. package/build/component/driver/apiKey/create.js.map +1 -1
  144. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js +2 -2
  145. package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js.map +1 -1
  146. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js +2 -2
  147. package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js.map +1 -1
  148. package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js +2 -2
  149. package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js.map +1 -1
  150. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.d.ts +5 -0
  151. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.d.ts.map +1 -0
  152. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.js +21 -0
  153. package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.js.map +1 -0
  154. package/build/component/driver/apiKey/error/apiKeyNameTooLong.js +2 -2
  155. package/build/component/driver/apiKey/error/apiKeyNameTooLong.js.map +1 -1
  156. package/build/component/driver/apiKey/update.d.ts.map +1 -1
  157. package/build/component/driver/apiKey/update.js +20 -20
  158. package/build/component/driver/apiKey/update.js.map +1 -1
  159. package/build/component/driver/apiKey/utility/constants.d.ts +1 -1
  160. package/build/component/driver/apiKey/utility/constants.js +1 -1
  161. package/build/component/driver/apiKey/utility/utility.js +2 -2
  162. package/build/component/driver/apiKey/utility/utility.js.map +1 -1
  163. package/build/component/driver/arm/deploy.js +4 -4
  164. package/build/component/driver/arm/deploy.js.map +1 -1
  165. package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
  166. package/build/component/driver/arm/deployImpl.js +19 -17
  167. package/build/component/driver/arm/deployImpl.js.map +1 -1
  168. package/build/component/driver/arm/util/bicepChecker.js +5 -5
  169. package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
  170. package/build/component/driver/arm/util/handleError.js +9 -9
  171. package/build/component/driver/arm/util/handleError.js.map +1 -1
  172. package/build/component/driver/arm/validator.js +3 -3
  173. package/build/component/driver/arm/validator.js.map +1 -1
  174. package/build/component/driver/botAadApp/create.d.ts.map +1 -1
  175. package/build/component/driver/botAadApp/create.js +38 -22
  176. package/build/component/driver/botAadApp/create.js.map +1 -1
  177. package/build/component/driver/botAadApp/error/unexpectedEmptyBotPasswordError.js +2 -2
  178. package/build/component/driver/botAadApp/error/unexpectedEmptyBotPasswordError.js.map +1 -1
  179. package/build/component/driver/botAadApp/utility/constants.d.ts +1 -0
  180. package/build/component/driver/botAadApp/utility/constants.d.ts.map +1 -1
  181. package/build/component/driver/botAadApp/utility/constants.js +1 -0
  182. package/build/component/driver/botAadApp/utility/constants.js.map +1 -1
  183. package/build/component/driver/botFramework/createOrUpdateBot.js +14 -14
  184. package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
  185. package/build/component/driver/botFramework/error/invalidBotIdError.js +2 -2
  186. package/build/component/driver/botFramework/error/invalidBotIdError.js.map +1 -1
  187. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js +3 -3
  188. package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js.map +1 -1
  189. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js +3 -3
  190. package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js.map +1 -1
  191. package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts.map +1 -1
  192. package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js +16 -10
  193. package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js.map +1 -1
  194. package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +8 -8
  195. package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
  196. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js +14 -14
  197. package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js.map +1 -1
  198. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +6 -6
  199. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
  200. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +8 -8
  201. package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
  202. package/build/component/driver/deploy/azure/impl/baseDeployImpl.js +11 -11
  203. package/build/component/driver/deploy/azure/impl/baseDeployImpl.js.map +1 -1
  204. package/build/component/driver/deploy/spfx/deployDriver.js +15 -15
  205. package/build/component/driver/deploy/spfx/deployDriver.js.map +1 -1
  206. package/build/component/driver/deploy/spfx/error/createAppCatalogFailedError.js +2 -2
  207. package/build/component/driver/deploy/spfx/error/createAppCatalogFailedError.js.map +1 -1
  208. package/build/component/driver/deploy/spfx/error/getGraphTokenFailedError.js +2 -2
  209. package/build/component/driver/deploy/spfx/error/getGraphTokenFailedError.js.map +1 -1
  210. package/build/component/driver/deploy/spfx/error/getSPOTokenFailedError.js +2 -2
  211. package/build/component/driver/deploy/spfx/error/getSPOTokenFailedError.js.map +1 -1
  212. package/build/component/driver/deploy/spfx/error/getTenantFailedError.js +2 -2
  213. package/build/component/driver/deploy/spfx/error/getTenantFailedError.js.map +1 -1
  214. package/build/component/driver/deploy/spfx/error/insufficientPermissionError.js +2 -2
  215. package/build/component/driver/deploy/spfx/error/insufficientPermissionError.js.map +1 -1
  216. package/build/component/driver/deploy/spfx/error/noSPPackageError.js +2 -2
  217. package/build/component/driver/deploy/spfx/error/noSPPackageError.js.map +1 -1
  218. package/build/component/driver/deploy/spfx/error/noValidAppCatelogError.js +2 -2
  219. package/build/component/driver/deploy/spfx/error/noValidAppCatelogError.js.map +1 -1
  220. package/build/component/driver/deploy/spfx/error/uploadAppPackageFailedError.js +2 -2
  221. package/build/component/driver/deploy/spfx/error/uploadAppPackageFailedError.js.map +1 -1
  222. package/build/component/driver/deploy/spfx/utility/constants.js +5 -5
  223. package/build/component/driver/deploy/spfx/utility/constants.js.map +1 -1
  224. package/build/component/driver/devTool/constant.d.ts +8 -8
  225. package/build/component/driver/devTool/constant.d.ts.map +1 -1
  226. package/build/component/driver/devTool/constant.js +10 -10
  227. package/build/component/driver/devTool/constant.js.map +1 -1
  228. package/build/component/driver/devTool/error/dotnetInstallationUserError.js +3 -3
  229. package/build/component/driver/devTool/error/dotnetInstallationUserError.js.map +1 -1
  230. package/build/component/driver/devTool/error/funcInstallationUserError.js +3 -3
  231. package/build/component/driver/devTool/error/funcInstallationUserError.js.map +1 -1
  232. package/build/component/driver/devTool/error/testToolInstallationUserError.js +3 -3
  233. package/build/component/driver/devTool/error/testToolInstallationUserError.js.map +1 -1
  234. package/build/component/driver/devTool/installDriver.js +6 -6
  235. package/build/component/driver/devTool/installDriver.js.map +1 -1
  236. package/build/component/driver/error/outputEnvironmentVariableUndefinedError.js +2 -2
  237. package/build/component/driver/error/outputEnvironmentVariableUndefinedError.js.map +1 -1
  238. package/build/component/driver/file/createOrUpdateEnvironmentFile.js +11 -11
  239. package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
  240. package/build/component/driver/file/createOrUpdateJsonFile.js +12 -12
  241. package/build/component/driver/file/createOrUpdateJsonFile.js.map +1 -1
  242. package/build/component/driver/index.d.ts +1 -0
  243. package/build/component/driver/index.d.ts.map +1 -1
  244. package/build/component/driver/index.js +1 -0
  245. package/build/component/driver/index.js.map +1 -1
  246. package/build/component/driver/m365/acquire.js +12 -12
  247. package/build/component/driver/m365/acquire.js.map +1 -1
  248. package/build/component/driver/middleware/addSWADeployTelemetry.js +2 -2
  249. package/build/component/driver/middleware/addSWADeployTelemetry.js.map +1 -1
  250. package/build/component/driver/oauth/create.d.ts.map +1 -1
  251. package/build/component/driver/oauth/create.js +51 -21
  252. package/build/component/driver/oauth/create.js.map +1 -1
  253. package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js +2 -2
  254. package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js.map +1 -1
  255. package/build/component/driver/oauth/error/oauthDisablePKCEError.d.ts +5 -0
  256. package/build/component/driver/oauth/error/oauthDisablePKCEError.d.ts.map +1 -0
  257. package/build/component/driver/oauth/error/oauthDisablePKCEError.js +21 -0
  258. package/build/component/driver/oauth/error/oauthDisablePKCEError.js.map +1 -0
  259. package/build/component/driver/oauth/error/oauthDomainInvalid.js +2 -2
  260. package/build/component/driver/oauth/error/oauthDomainInvalid.js.map +1 -1
  261. package/build/component/driver/oauth/error/oauthFailedToGetDomain.js +2 -2
  262. package/build/component/driver/oauth/error/oauthFailedToGetDomain.js.map +1 -1
  263. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.d.ts +5 -0
  264. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.d.ts.map +1 -0
  265. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.js +21 -0
  266. package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.js.map +1 -0
  267. package/build/component/driver/oauth/error/oauthNameTooLong.js +2 -2
  268. package/build/component/driver/oauth/error/oauthNameTooLong.js.map +1 -1
  269. package/build/component/driver/oauth/interface/createOauthArgs.d.ts +2 -0
  270. package/build/component/driver/oauth/interface/createOauthArgs.d.ts.map +1 -1
  271. package/build/component/driver/oauth/interface/updateOauthArgs.d.ts +1 -0
  272. package/build/component/driver/oauth/interface/updateOauthArgs.d.ts.map +1 -1
  273. package/build/component/driver/oauth/update.d.ts.map +1 -1
  274. package/build/component/driver/oauth/update.js +30 -19
  275. package/build/component/driver/oauth/update.js.map +1 -1
  276. package/build/component/driver/oauth/utility/constants.d.ts +1 -1
  277. package/build/component/driver/oauth/utility/constants.js +1 -1
  278. package/build/component/driver/oauth/utility/utility.js +5 -6
  279. package/build/component/driver/oauth/utility/utility.js.map +1 -1
  280. package/build/component/driver/script/baseBuildDriver.js +8 -8
  281. package/build/component/driver/script/baseBuildDriver.js.map +1 -1
  282. package/build/component/driver/script/dotnetBuildDriver.js +3 -3
  283. package/build/component/driver/script/dotnetBuildDriver.js.map +1 -1
  284. package/build/component/driver/script/npmBuildDriver.js +3 -3
  285. package/build/component/driver/script/npmBuildDriver.js.map +1 -1
  286. package/build/component/driver/script/npxBuildDriver.js +5 -5
  287. package/build/component/driver/script/npxBuildDriver.js.map +1 -1
  288. package/build/component/driver/script/scriptDriver.d.ts +2 -0
  289. package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
  290. package/build/component/driver/script/scriptDriver.js +28 -29
  291. package/build/component/driver/script/scriptDriver.js.map +1 -1
  292. package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
  293. package/build/component/driver/teamsApp/appStudio.js +43 -54
  294. package/build/component/driver/teamsApp/appStudio.js.map +1 -1
  295. package/build/component/driver/teamsApp/clients/appStudioClient.js +20 -20
  296. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  297. package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
  298. package/build/component/driver/teamsApp/configure.js +23 -23
  299. package/build/component/driver/teamsApp/configure.js.map +1 -1
  300. package/build/component/driver/teamsApp/constants.d.ts +15 -1
  301. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  302. package/build/component/driver/teamsApp/constants.js +132 -2
  303. package/build/component/driver/teamsApp/constants.js.map +1 -1
  304. package/build/component/driver/teamsApp/copyAppPackageToSPFx.js +8 -8
  305. package/build/component/driver/teamsApp/copyAppPackageToSPFx.js.map +1 -1
  306. package/build/component/driver/teamsApp/create.d.ts.map +1 -1
  307. package/build/component/driver/teamsApp/create.js +21 -21
  308. package/build/component/driver/teamsApp/create.js.map +1 -1
  309. package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -1
  310. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  311. package/build/component/driver/teamsApp/createAppPackage.js +83 -67
  312. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  313. package/build/component/driver/teamsApp/errors.d.ts +6 -2
  314. package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
  315. package/build/component/driver/teamsApp/errors.js +49 -42
  316. package/build/component/driver/teamsApp/errors.js.map +1 -1
  317. package/build/component/driver/teamsApp/interfaces/CreateAppPackageArgs.d.ts +6 -2
  318. package/build/component/driver/teamsApp/interfaces/CreateAppPackageArgs.d.ts.map +1 -1
  319. package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +2 -0
  320. package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -1
  321. package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -1
  322. package/build/component/driver/teamsApp/interfaces/SyncManifest.d.ts +20 -0
  323. package/build/component/driver/teamsApp/interfaces/SyncManifest.d.ts.map +1 -0
  324. package/build/component/driver/teamsApp/interfaces/SyncManifest.js +5 -0
  325. package/build/component/driver/teamsApp/interfaces/SyncManifest.js.map +1 -0
  326. package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts +1 -0
  327. package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts.map +1 -1
  328. package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
  329. package/build/component/driver/teamsApp/publishAppPackage.js +35 -35
  330. package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
  331. package/build/component/driver/teamsApp/syncManifest.d.ts +14 -0
  332. package/build/component/driver/teamsApp/syncManifest.d.ts.map +1 -0
  333. package/build/component/driver/teamsApp/syncManifest.js +226 -0
  334. package/build/component/driver/teamsApp/syncManifest.js.map +1 -0
  335. package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
  336. package/build/component/driver/teamsApp/teamsappMgr.js +41 -42
  337. package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
  338. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +5 -3
  339. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -1
  340. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +45 -21
  341. package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
  342. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +3 -2
  343. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
  344. package/build/component/driver/teamsApp/utils/ManifestUtils.js +63 -39
  345. package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
  346. package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts +4 -3
  347. package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -1
  348. package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +36 -18
  349. package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -1
  350. package/build/component/driver/teamsApp/utils/utils.d.ts +4 -4
  351. package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
  352. package/build/component/driver/teamsApp/utils/utils.js +45 -15
  353. package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
  354. package/build/component/driver/teamsApp/validate.js +27 -27
  355. package/build/component/driver/teamsApp/validate.js.map +1 -1
  356. package/build/component/driver/teamsApp/validateAppPackage.d.ts +1 -0
  357. package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
  358. package/build/component/driver/teamsApp/validateAppPackage.js +52 -38
  359. package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
  360. package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
  361. package/build/component/driver/teamsApp/validateTestCases.js +36 -36
  362. package/build/component/driver/teamsApp/validateTestCases.js.map +1 -1
  363. package/build/component/driver/util/wrapUtil.js +6 -6
  364. package/build/component/driver/util/wrapUtil.js.map +1 -1
  365. package/build/component/error/componentError.js +8 -8
  366. package/build/component/error/componentError.js.map +1 -1
  367. package/build/component/feature/collaboration.d.ts.map +1 -1
  368. package/build/component/feature/collaboration.js +56 -56
  369. package/build/component/feature/collaboration.js.map +1 -1
  370. package/build/component/feature/createAuthFiles.js +8 -8
  371. package/build/component/feature/createAuthFiles.js.map +1 -1
  372. package/build/component/feature/sso.js +4 -4
  373. package/build/component/feature/sso.js.map +1 -1
  374. package/build/component/generator/apiSpec/generator.d.ts +15 -0
  375. package/build/component/generator/apiSpec/generator.d.ts.map +1 -0
  376. package/build/component/generator/apiSpec/generator.js +260 -0
  377. package/build/component/generator/apiSpec/generator.js.map +1 -0
  378. package/build/component/generator/{copilotPlugin → apiSpec}/helper.d.ts +23 -9
  379. package/build/component/generator/apiSpec/helper.d.ts.map +1 -0
  380. package/build/component/generator/{copilotPlugin → apiSpec}/helper.js +309 -127
  381. package/build/component/generator/apiSpec/helper.js.map +1 -0
  382. package/build/component/generator/constant.d.ts +1 -0
  383. package/build/component/generator/constant.d.ts.map +1 -1
  384. package/build/component/generator/constant.js +2 -1
  385. package/build/component/generator/constant.js.map +1 -1
  386. package/build/component/generator/{officeXMLAddin → copilotExtension}/generator.d.ts +8 -10
  387. package/build/component/generator/copilotExtension/generator.d.ts.map +1 -0
  388. package/build/component/generator/copilotExtension/generator.js +116 -0
  389. package/build/component/generator/copilotExtension/generator.js.map +1 -0
  390. package/build/component/generator/copilotExtension/helper.d.ts +8 -0
  391. package/build/component/generator/copilotExtension/helper.d.ts.map +1 -0
  392. package/build/component/generator/copilotExtension/helper.js +114 -0
  393. package/build/component/generator/copilotExtension/helper.js.map +1 -0
  394. package/build/component/generator/error.d.ts +1 -1
  395. package/build/component/generator/error.d.ts.map +1 -1
  396. package/build/component/generator/error.js +5 -5
  397. package/build/component/generator/error.js.map +1 -1
  398. package/build/component/generator/generator.d.ts.map +1 -1
  399. package/build/component/generator/generator.js +25 -19
  400. package/build/component/generator/generator.js.map +1 -1
  401. package/build/component/generator/generatorAction.js +7 -7
  402. package/build/component/generator/generatorAction.js.map +1 -1
  403. package/build/component/generator/generatorProvider.js +6 -6
  404. package/build/component/generator/generatorProvider.js.map +1 -1
  405. package/build/component/generator/officeAddin/generator.d.ts +1 -2
  406. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  407. package/build/component/generator/officeAddin/generator.js +39 -41
  408. package/build/component/generator/officeAddin/generator.js.map +1 -1
  409. package/build/component/generator/officeAddin/helperMethods.js +5 -5
  410. package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
  411. package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -1
  412. package/build/component/generator/officeXMLAddin/projectConfig.js +0 -75
  413. package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -1
  414. package/build/component/generator/spfx/depsChecker/generatorChecker.js +4 -4
  415. package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
  416. package/build/component/generator/spfx/depsChecker/yoChecker.js +4 -4
  417. package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
  418. package/build/component/generator/spfx/error.js +19 -19
  419. package/build/component/generator/spfx/error.js.map +1 -1
  420. package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
  421. package/build/component/generator/spfx/spfxGenerator.js +76 -76
  422. package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
  423. package/build/component/generator/spfx/utils/constants.js +8 -8
  424. package/build/component/generator/spfx/utils/constants.js.map +1 -1
  425. package/build/component/generator/spfx/utils/telemetry-helper.js +1 -1
  426. package/build/component/generator/spfx/utils/telemetry-helper.js.map +1 -1
  427. package/build/component/generator/spfx/utils/utils.d.ts +1 -0
  428. package/build/component/generator/spfx/utils/utils.d.ts.map +1 -1
  429. package/build/component/generator/spfx/utils/utils.js +13 -9
  430. package/build/component/generator/spfx/utils/utils.js.map +1 -1
  431. package/build/component/generator/templates/ssrTabGenerator.js +1 -1
  432. package/build/component/generator/templates/ssrTabGenerator.js.map +1 -1
  433. package/build/component/generator/templates/templateGenerator.js +13 -13
  434. package/build/component/generator/templates/templateGenerator.js.map +1 -1
  435. package/build/component/generator/templates/templateNames.d.ts +1 -0
  436. package/build/component/generator/templates/templateNames.d.ts.map +1 -1
  437. package/build/component/generator/templates/templateNames.js +3 -9
  438. package/build/component/generator/templates/templateNames.js.map +1 -1
  439. package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -1
  440. package/build/component/generator/templates/templateReplaceMap.js +29 -9
  441. package/build/component/generator/templates/templateReplaceMap.js.map +1 -1
  442. package/build/component/generator/utils.js +6 -6
  443. package/build/component/generator/utils.js.map +1 -1
  444. package/build/component/local/constants.d.ts +108 -108
  445. package/build/component/local/localCertificateManager.d.ts.map +1 -1
  446. package/build/component/local/localCertificateManager.js +11 -9
  447. package/build/component/local/localCertificateManager.js.map +1 -1
  448. package/build/component/local/localEnvManager.js +2 -2
  449. package/build/component/local/localEnvManager.js.map +1 -1
  450. package/build/component/local/localTelemetryReporter.js +3 -3
  451. package/build/component/local/localTelemetryReporter.js.map +1 -1
  452. package/build/component/local/portChecker.js +4 -4
  453. package/build/component/local/portChecker.js.map +1 -1
  454. package/build/component/local/taskDefinition.js +3 -3
  455. package/build/component/local/taskDefinition.js.map +1 -1
  456. package/build/component/m365/constants.d.ts +3 -0
  457. package/build/component/m365/constants.d.ts.map +1 -1
  458. package/build/component/m365/constants.js +4 -1
  459. package/build/component/m365/constants.js.map +1 -1
  460. package/build/component/m365/errors.js +2 -2
  461. package/build/component/m365/errors.js.map +1 -1
  462. package/build/component/m365/launchHelper.d.ts +2 -2
  463. package/build/component/m365/launchHelper.d.ts.map +1 -1
  464. package/build/component/m365/launchHelper.js +25 -17
  465. package/build/component/m365/launchHelper.js.map +1 -1
  466. package/build/component/m365/packageService.js +19 -19
  467. package/build/component/m365/packageService.js.map +1 -1
  468. package/build/component/messages.js +7 -7
  469. package/build/component/messages.js.map +1 -1
  470. package/build/component/middleware/actionExecutionMW.js +8 -8
  471. package/build/component/middleware/actionExecutionMW.js.map +1 -1
  472. package/build/component/middleware/envMW.js +6 -6
  473. package/build/component/middleware/envMW.js.map +1 -1
  474. package/build/component/middleware/questionMW.js +3 -3
  475. package/build/component/middleware/questionMW.js.map +1 -1
  476. package/build/component/migrate.js +4 -4
  477. package/build/component/migrate.js.map +1 -1
  478. package/build/component/provisionUtils.js +24 -24
  479. package/build/component/provisionUtils.js.map +1 -1
  480. package/build/component/resource/botService/appStudio/appStudioClient.js +11 -11
  481. package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
  482. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts.map +1 -1
  483. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js +7 -7
  484. package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js.map +1 -1
  485. package/build/component/resource/botService/errors.js +2 -2
  486. package/build/component/resource/botService/errors.js.map +1 -1
  487. package/build/component/resource/botService/messages.js +6 -6
  488. package/build/component/resource/botService/messages.js.map +1 -1
  489. package/build/component/resource/botService/strings.js +1 -1
  490. package/build/component/resource/botService/strings.js.map +1 -1
  491. package/build/component/utils/ResourceGroupHelper.js +28 -28
  492. package/build/component/utils/ResourceGroupHelper.js.map +1 -1
  493. package/build/component/utils/azureResourceOperation.js +2 -2
  494. package/build/component/utils/azureResourceOperation.js.map +1 -1
  495. package/build/component/utils/common.d.ts +4 -3
  496. package/build/component/utils/common.d.ts.map +1 -1
  497. package/build/component/utils/common.js +17 -6
  498. package/build/component/utils/common.js.map +1 -1
  499. package/build/component/utils/depsChecker/common.js +2 -2
  500. package/build/component/utils/depsChecker/common.js.map +1 -1
  501. package/build/component/utils/envFunctionUtils.d.ts +12 -0
  502. package/build/component/utils/envFunctionUtils.d.ts.map +1 -0
  503. package/build/component/utils/envFunctionUtils.js +185 -0
  504. package/build/component/utils/envFunctionUtils.js.map +1 -0
  505. package/build/component/utils/envUtil.d.ts +1 -0
  506. package/build/component/utils/envUtil.d.ts.map +1 -1
  507. package/build/component/utils/envUtil.js +19 -19
  508. package/build/component/utils/envUtil.js.map +1 -1
  509. package/build/component/utils/fileOperation.js +3 -4
  510. package/build/component/utils/fileOperation.js.map +1 -1
  511. package/build/component/utils/metadataGraphPermssion.js +3 -3
  512. package/build/component/utils/metadataGraphPermssion.js.map +1 -1
  513. package/build/component/utils/metadataUtil.js +2 -2
  514. package/build/component/utils/metadataUtil.js.map +1 -1
  515. package/build/component/utils/pathUtils.js +5 -5
  516. package/build/component/utils/pathUtils.js.map +1 -1
  517. package/build/component/utils/settingsUtil.js +7 -7
  518. package/build/component/utils/settingsUtil.js.map +1 -1
  519. package/build/component/utils/teamsFxTelemetryReporter.js +1 -1
  520. package/build/component/utils/teamsFxTelemetryReporter.js.map +1 -1
  521. package/build/core/FxCore.d.ts +34 -0
  522. package/build/core/FxCore.d.ts.map +1 -1
  523. package/build/core/FxCore.js +715 -413
  524. package/build/core/FxCore.js.map +1 -1
  525. package/build/core/collaborator.js +65 -65
  526. package/build/core/collaborator.js.map +1 -1
  527. package/build/core/crypto.js +4 -4
  528. package/build/core/crypto.js.map +1 -1
  529. package/build/core/environment.js +7 -7
  530. package/build/core/environment.js.map +1 -1
  531. package/build/core/environmentName.d.ts +0 -1
  532. package/build/core/environmentName.d.ts.map +1 -1
  533. package/build/core/environmentName.js +0 -2
  534. package/build/core/environmentName.js.map +1 -1
  535. package/build/core/middleware/concurrentLocker.js +13 -13
  536. package/build/core/middleware/concurrentLocker.js.map +1 -1
  537. package/build/core/middleware/errorHandler.js +4 -4
  538. package/build/core/middleware/errorHandler.js.map +1 -1
  539. package/build/core/middleware/projectMigratorV3.js +78 -78
  540. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  541. package/build/core/middleware/projectSettingsLoader.js +3 -3
  542. package/build/core/middleware/projectSettingsLoader.js.map +1 -1
  543. package/build/core/middleware/projectVersionChecker.js +9 -9
  544. package/build/core/middleware/projectVersionChecker.js.map +1 -1
  545. package/build/core/middleware/utils/MigrationUtils.js +4 -4
  546. package/build/core/middleware/utils/MigrationUtils.js.map +1 -1
  547. package/build/core/middleware/utils/appYmlGenerator.js +4 -4
  548. package/build/core/middleware/utils/appYmlGenerator.js.map +1 -1
  549. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +10 -10
  550. package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
  551. package/build/core/middleware/utils/debug/taskMigrator.js +72 -72
  552. package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
  553. package/build/core/middleware/utils/migrationContext.js +1 -1
  554. package/build/core/middleware/utils/migrationContext.js.map +1 -1
  555. package/build/core/middleware/utils/v3MigrationUtils.js +9 -9
  556. package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
  557. package/build/core/middleware/videoFilterAppBlocker.js +4 -4
  558. package/build/core/middleware/videoFilterAppBlocker.js.map +1 -1
  559. package/build/core/telemetry.js +1 -1
  560. package/build/core/telemetry.js.map +1 -1
  561. package/build/error/arm.js +10 -10
  562. package/build/error/arm.js.map +1 -1
  563. package/build/error/azure.js +20 -20
  564. package/build/error/azure.js.map +1 -1
  565. package/build/error/common.d.ts +4 -1
  566. package/build/error/common.d.ts.map +1 -1
  567. package/build/error/common.js +87 -75
  568. package/build/error/common.js.map +1 -1
  569. package/build/error/deploy.js +24 -24
  570. package/build/error/deploy.js.map +1 -1
  571. package/build/error/m365.js +6 -6
  572. package/build/error/m365.js.map +1 -1
  573. package/build/error/script.d.ts +2 -2
  574. package/build/error/script.d.ts.map +1 -1
  575. package/build/error/script.js +14 -8
  576. package/build/error/script.js.map +1 -1
  577. package/build/error/teamsApp.d.ts.map +1 -1
  578. package/build/error/teamsApp.js +10 -8
  579. package/build/error/teamsApp.js.map +1 -1
  580. package/build/error/upgrade.js +2 -2
  581. package/build/error/upgrade.js.map +1 -1
  582. package/build/error/yml.js +12 -12
  583. package/build/error/yml.js.map +1 -1
  584. package/build/index.d.ts +11 -7
  585. package/build/index.d.ts.map +1 -1
  586. package/build/index.js +19 -16
  587. package/build/index.js.map +1 -1
  588. package/build/question/constants.d.ts +38 -27
  589. package/build/question/constants.d.ts.map +1 -1
  590. package/build/question/constants.js +286 -294
  591. package/build/question/constants.js.map +1 -1
  592. package/build/question/create.d.ts +5 -3
  593. package/build/question/create.d.ts.map +1 -1
  594. package/build/question/create.js +338 -230
  595. package/build/question/create.js.map +1 -1
  596. package/build/question/generator.js +6 -2
  597. package/build/question/generator.js.map +1 -1
  598. package/build/question/index.d.ts +2 -0
  599. package/build/question/index.d.ts.map +1 -1
  600. package/build/question/index.js +21 -15
  601. package/build/question/index.js.map +1 -1
  602. package/build/question/inputs/AddPluginInputs.d.ts +8 -4
  603. package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
  604. package/build/question/inputs/CreateProjectInputs.d.ts +10 -4
  605. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
  606. package/build/question/inputs/SyncManifestInputs.d.ts +16 -0
  607. package/build/question/inputs/SyncManifestInputs.d.ts.map +1 -0
  608. package/build/question/inputs/SyncManifestInputs.js +5 -0
  609. package/build/question/inputs/SyncManifestInputs.js.map +1 -0
  610. package/build/question/inputs/UninstallInputs.d.ts +22 -0
  611. package/build/question/inputs/UninstallInputs.d.ts.map +1 -0
  612. package/build/question/inputs/UninstallInputs.js +5 -0
  613. package/build/question/inputs/UninstallInputs.js.map +1 -0
  614. package/build/question/inputs/index.d.ts +2 -0
  615. package/build/question/inputs/index.d.ts.map +1 -1
  616. package/build/question/inputs/index.js +2 -0
  617. package/build/question/inputs/index.js.map +1 -1
  618. package/build/question/options/AddPluginOptions.d.ts.map +1 -1
  619. package/build/question/options/AddPluginOptions.js +19 -10
  620. package/build/question/options/AddPluginOptions.js.map +1 -1
  621. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  622. package/build/question/options/CreateProjectOptions.js +27 -24
  623. package/build/question/options/CreateProjectOptions.js.map +1 -1
  624. package/build/question/options/SyncManifestOptions.d.ts +10 -0
  625. package/build/question/options/SyncManifestOptions.d.ts.map +1 -0
  626. package/build/question/options/SyncManifestOptions.js +28 -0
  627. package/build/question/options/SyncManifestOptions.js.map +1 -0
  628. package/build/question/options/UninstallOptions.d.ts +10 -0
  629. package/build/question/options/UninstallOptions.d.ts.map +1 -0
  630. package/build/question/options/UninstallOptions.js +44 -0
  631. package/build/question/options/UninstallOptions.js.map +1 -0
  632. package/build/question/options/index.d.ts +2 -0
  633. package/build/question/options/index.d.ts.map +1 -1
  634. package/build/question/options/index.js +2 -0
  635. package/build/question/options/index.js.map +1 -1
  636. package/build/question/other.d.ts +2 -1
  637. package/build/question/other.d.ts.map +1 -1
  638. package/build/question/other.js +228 -81
  639. package/build/question/other.js.map +1 -1
  640. package/build/tsconfig.tsbuildinfo +1 -0
  641. package/build/ui/visitor.d.ts.map +1 -1
  642. package/build/ui/visitor.js +41 -27
  643. package/build/ui/visitor.js.map +1 -1
  644. package/package.json +15 -10
  645. package/resource/dict.zip +0 -0
  646. package/resource/package.nls.json +180 -133
  647. package/resource/yaml-schema/v1.6/yaml.schema.json +13 -0
  648. package/resource/yaml-schema/v1.7/yaml.schema.json +1842 -0
  649. package/resource/yaml-schema/yaml.schema.json +13 -0
  650. package/templates/fallback/common.zip +0 -0
  651. package/templates/fallback/csharp.zip +0 -0
  652. package/templates/fallback/js.zip +0 -0
  653. package/templates/fallback/python.zip +0 -0
  654. package/templates/fallback/ts.zip +0 -0
  655. package/build/component/generator/copilotPlugin/generator.d.ts +0 -21
  656. package/build/component/generator/copilotPlugin/generator.d.ts.map +0 -1
  657. package/build/component/generator/copilotPlugin/generator.js +0 -399
  658. package/build/component/generator/copilotPlugin/generator.js.map +0 -1
  659. package/build/component/generator/copilotPlugin/helper.d.ts.map +0 -1
  660. package/build/component/generator/copilotPlugin/helper.js.map +0 -1
  661. package/build/component/generator/officeXMLAddin/generator.d.ts.map +0 -1
  662. package/build/component/generator/officeXMLAddin/generator.js +0 -173
  663. package/build/component/generator/officeXMLAddin/generator.js.map +0 -1
@@ -21,27 +21,27 @@ let doingTask = undefined;
21
21
  const ConcurrentLockerMW = async (ctx, next) => {
22
22
  var _a;
23
23
  const inputs = ctx.arguments[ctx.arguments.length - 1];
24
- if (projectSettingsLoader_1.shouldIgnored(ctx)) {
24
+ if ((0, projectSettingsLoader_1.shouldIgnored)(ctx)) {
25
25
  await next();
26
26
  return;
27
27
  }
28
28
  if (!inputs.projectPath) {
29
- ctx.result = teamsfx_api_1.err(new common_1.NoProjectOpenedError());
29
+ ctx.result = (0, teamsfx_api_1.err)(new common_1.NoProjectOpenedError());
30
30
  return;
31
31
  }
32
32
  if (!(await fs.pathExists(inputs.projectPath))) {
33
- ctx.result = teamsfx_api_1.err(new common_1.FileNotFoundError("ConcurrentLockerMW", inputs.projectPath));
33
+ ctx.result = (0, teamsfx_api_1.err)(new common_1.FileNotFoundError("ConcurrentLockerMW", inputs.projectPath));
34
34
  return;
35
35
  }
36
36
  let configFolder = "";
37
- if (projectSettingsHelper_1.isValidProjectV3(inputs.projectPath)) {
37
+ if ((0, projectSettingsHelper_1.isValidProjectV3)(inputs.projectPath)) {
38
38
  configFolder = path.join(inputs.projectPath);
39
39
  }
40
- else if (projectSettingsHelper_1.isValidProjectV2(inputs.projectPath)) {
40
+ else if ((0, projectSettingsHelper_1.isValidProjectV2)(inputs.projectPath)) {
41
41
  configFolder = path.join(inputs.projectPath, `.${teamsfx_api_1.ConfigFolderName}`);
42
42
  }
43
43
  else {
44
- ctx.result = teamsfx_api_1.err(new common_1.InvalidProjectError());
44
+ ctx.result = (0, teamsfx_api_1.err)(new common_1.InvalidProjectError(inputs.projectPath));
45
45
  return;
46
46
  }
47
47
  const lockFileDir = getLockFolder(inputs.projectPath);
@@ -55,7 +55,7 @@ const ConcurrentLockerMW = async (ctx, next) => {
55
55
  let retryNum = 0;
56
56
  for (let i = 0; i < 10; ++i) {
57
57
  try {
58
- await proper_lockfile_1.lock(configFolder, { lockfilePath: lockfilePath });
58
+ await (0, proper_lockfile_1.lock)(configFolder, { lockfilePath: lockfilePath });
59
59
  acquired = true;
60
60
  for (const f of callback_1.CallbackRegistry.get(teamsfx_api_1.CoreCallbackEvent.lock)) {
61
61
  await f(taskName);
@@ -64,14 +64,14 @@ const ConcurrentLockerMW = async (ctx, next) => {
64
64
  doingTask = taskName;
65
65
  if (retryNum > 0) {
66
66
  // failed for some try and finally success
67
- telemetry_1.sendTelemetryErrorEvent(common_1.CoreSource, "concurrent-operation", new common_1.ConcurrentError(common_1.CoreSource),
67
+ (0, telemetry_1.sendTelemetryErrorEvent)(common_1.CoreSource, "concurrent-operation", new common_1.ConcurrentError(common_1.CoreSource),
68
68
  // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
69
69
  { retry: retryNum + "", acquired: "true", doing: doingTask, todo: taskName });
70
70
  }
71
71
  await next();
72
72
  }
73
73
  finally {
74
- await proper_lockfile_1.unlock(configFolder, { lockfilePath: lockfilePath });
74
+ await (0, proper_lockfile_1.unlock)(configFolder, { lockfilePath: lockfilePath });
75
75
  for (const f of callback_1.CallbackRegistry.get(teamsfx_api_1.CoreCallbackEvent.unlock)) {
76
76
  await f(taskName);
77
77
  }
@@ -81,7 +81,7 @@ const ConcurrentLockerMW = async (ctx, next) => {
81
81
  }
82
82
  catch (e) {
83
83
  if (e["code"] === "ELOCKED") {
84
- await utils_1.waitSeconds(1);
84
+ await (0, utils_1.waitSeconds)(1);
85
85
  ++retryNum;
86
86
  continue;
87
87
  }
@@ -92,19 +92,19 @@ const ConcurrentLockerMW = async (ctx, next) => {
92
92
  const log = `Failed to acquire lock for task ${taskName} on: ${configFolder}`;
93
93
  (_a = globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.logProvider) === null || _a === void 0 ? void 0 : _a.error(log);
94
94
  // failed for 10 times and finally failed
95
- telemetry_1.sendTelemetryErrorEvent(common_1.CoreSource, "concurrent-operation", new common_1.ConcurrentError(common_1.CoreSource), {
95
+ (0, telemetry_1.sendTelemetryErrorEvent)(common_1.CoreSource, "concurrent-operation", new common_1.ConcurrentError(common_1.CoreSource), {
96
96
  // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
97
97
  retry: retryNum + "",
98
98
  acquired: "false",
99
99
  doing: doingTask || "",
100
100
  todo: taskName,
101
101
  });
102
- ctx.result = teamsfx_api_1.err(new common_1.ConcurrentError(common_1.CoreSource));
102
+ ctx.result = (0, teamsfx_api_1.err)(new common_1.ConcurrentError(common_1.CoreSource));
103
103
  }
104
104
  };
105
105
  exports.ConcurrentLockerMW = ConcurrentLockerMW;
106
106
  function getLockFolder(projectPath) {
107
- return path.join(os.tmpdir(), `${teamsfx_api_1.ProductName}-${crypto_1.default.createHash("md5").update(projectPath).digest("hex")}`);
107
+ return path.join(os.tmpdir(), `${teamsfx_api_1.ProductName}-${crypto_1.default.createHash("sha256").update(projectPath).digest("hex")}`);
108
108
  }
109
109
  exports.getLockFolder = getLockFolder;
110
110
  //# sourceMappingURL=concurrentLocker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"concurrentLocker.js","sourceRoot":"","sources":["../../../src/core/middleware/concurrentLocker.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;;AAGb,wDAOgC;AAChC,4DAA4B;AAC5B,qDAA+B;AAC/B,+CAAyB;AACzB,mDAA6B;AAC7B,qDAA+C;AAC/C,wDAAgD;AAChD,8EAAwF;AACxF,sDAAiE;AACjE,8CAAiD;AACjD,+CAM4B;AAC5B,0CAA+C;AAC/C,mEAAwD;AAExD,IAAI,SAAS,GAAuB,SAAS,CAAC;AACvC,MAAM,kBAAkB,GAAe,KAAK,EAAE,GAAgB,EAAE,IAAkB,EAAE,EAAE;;IAC3F,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAW,CAAC;IACjE,IAAI,qCAAa,CAAC,GAAG,CAAC,EAAE;QACtB,MAAM,IAAI,EAAE,CAAC;QACb,OAAO;KACR;IACD,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;QACvB,GAAG,CAAC,MAAM,GAAG,iBAAG,CAAC,IAAI,6BAAoB,EAAE,CAAC,CAAC;QAC7C,OAAO;KACR;IACD,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,EAAE;QAC9C,GAAG,CAAC,MAAM,GAAG,iBAAG,CAAC,IAAI,0BAAiB,CAAC,oBAAoB,EAAE,M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AC,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE;gBAC3B,MAAM,IAAA,mBAAW,EAAC,CAAC,CAAC,CAAC;gBACrB,EAAE,QAAQ,CAAC;gBACX,SAAS;aACV;YACD,MAAM,CAAC,CAAC;SACT;KACF;IACD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,GAAG,GAAG,mCAAmC,QAAQ,QAAQ,YAAY,EAAE,CAAC;QAC9E,MAAA,kBAAK,aAAL,kBAAK,uBAAL,kBAAK,CAAE,WAAW,0CAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/B,yCAAyC;QACzC,IAAA,mCAAuB,EAAC,mBAAU,EAAE,sBAAsB,EAAE,IAAI,wBAAe,CAAC,mBAAU,CAAC,EAAE;YAC3F,qEAAqE;YACrE,KAAK,EAAE,QAAQ,GAAG,EAAE;YACpB,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,SAAS,IAAI,EAAE;YACtB,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;QACH,GAAG,CAAC,MAAM,GAAG,IAAA,iBAAG,EAAC,IAAI,wBAAe,CAAC,mBAAU,CAAC,CAAC,CAAC;KACnD;AACH,CAAC,CAAC;AArFW,QAAA,kBAAkB,sBAqF7B;AAEF,SAAgB,aAAa,CAAC,WAAmB;IAC/C,OAAO,IAAI,CAAC,IAAI,CACd,EAAE,CAAC,MAAM,EAAE,EACX,GAAG,yBAAW,IAAI,gBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAClF,CAAC;AACJ,CAAC;AALD,sCAKC"}
@@ -14,18 +14,18 @@ const ErrorHandlerMW = async (ctx, next) => {
14
14
  var _a;
15
15
  const inputs = ctx.arguments[ctx.arguments.length - 1];
16
16
  if (inputs === null || inputs === void 0 ? void 0 : inputs.locale)
17
- globalVars_1.setLocale(inputs.locale);
17
+ (0, globalVars_1.setLocale)(inputs.locale);
18
18
  try {
19
19
  await next();
20
20
  }
21
21
  catch (e) {
22
- const fxError = common_1.assembleError(e);
23
- ctx.result = teamsfx_api_1.err(fxError);
22
+ const fxError = (0, common_1.assembleError)(e);
23
+ ctx.result = (0, teamsfx_api_1.err)(fxError);
24
24
  }
25
25
  if ((_a = ctx.result) === null || _a === void 0 ? void 0 : _a.isErr()) {
26
26
  let fxError = ctx.result.error;
27
27
  fxError = convertError(fxError);
28
- ctx.result = teamsfx_api_1.err(fxError);
28
+ ctx.result = (0, teamsfx_api_1.err)(fxError);
29
29
  }
30
30
  };
31
31
  exports.ErrorHandlerMW = ErrorHandlerMW;
@@ -1 +1 @@
1
- {"version":3,"file":"errorHandler.js","sourceRoot":"","sources":["../../../src/core/middleware/errorHandler.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAGb,wDAA6E;AAC7E,wDAAoD;AACpD,+CAAwE;AAExE;;;GAGG;AACI,MAAM,cAAc,GAAe,KAAK,EAAE,GAAgB,EAAE,IAAkB,EAAE,EAAE;;IACvF,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAW,CAAC;IACjE,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM;QAAE,sBAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,IAAI;QACF,MAAM,IAAI,EAAE,CAAC;KACd;IAAC,OAAO,CAAC,EAAE;QACV,MAAM,OAAO,GAAG,sBAAa,CAAC,CAAC,CAAC,CAAC;QACjC,GAAG,CAAC,MAAM,GAAG,iBAAG,CAAC,OAAO,CAAC,CAAC;KAC3B;IACD,IAAI,MAAA,GAAG,CAAC,MAAM,0CAAE,KAAK,EAAE,EAAE;QACvB,IAAI,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;QAC/B,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAA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S,CAC5B,GAAW,CAAC,MAAM,EACnB,GAAG,CAAC,IAAI,EACR,GAAG,CAAC,OAAO,EACV,GAAW,CAAC,cAAc,CAC5B,CAAC;YACF,SAAS,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;YAC5B,OAAO,SAAS,CAAC;SAClB;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AApBD,oCAoBC"}
@@ -68,10 +68,10 @@ exports.errorNames = {
68
68
  manifestTemplateInvalid: "ManifestTemplateInvalid",
69
69
  aadManifestTemplateNotExist: "AadManifestTemplateNotExist",
70
70
  };
71
- const upgradeButton = () => localizeUtils_1.getLocalizedString("core.option.upgrade");
72
- const moreInfoButton = () => localizeUtils_1.getLocalizedString("core.option.moreInfo");
71
+ const upgradeButton = () => (0, localizeUtils_1.getLocalizedString)("core.option.upgrade");
72
+ const moreInfoButton = () => (0, localizeUtils_1.getLocalizedString)("core.option.moreInfo");
73
73
  exports.moreInfoButton = moreInfoButton;
74
- const migrationMessageButtons = () => [upgradeButton(), exports.moreInfoButton()];
74
+ const migrationMessageButtons = () => [upgradeButton(), (0, exports.moreInfoButton)()];
75
75
  const telemetryProperties = {
76
76
  [TelemetryPropertyKey.upgradeVersion]: TelemetryPropertyValue.upgradeVersion,
77
77
  };
@@ -93,33 +93,33 @@ const ProjectMigratorMWV3 = async (ctx, next) => {
93
93
  const versionForMigration = await checkVersionForMigration(ctx);
94
94
  // abandoned v3 project which will not be supported. Show user the message to create new project.
95
95
  if (versionForMigration.source === versionMetadata_1.VersionSource.settings) {
96
- await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("warn", localizeUtils_1.getLocalizedString("core.migrationV3.abandonedProject"), true));
97
- ctx.result = teamsfx_api_1.err(new error_1.AbandonedProjectError());
96
+ await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("warn", (0, localizeUtils_1.getLocalizedString)("core.migrationV3.abandonedProject"), true));
97
+ ctx.result = (0, teamsfx_api_1.err)(new error_1.AbandonedProjectError());
98
98
  return;
99
99
  }
100
- const projectPath = v3MigrationUtils_1.getParameterFromCxt(ctx, "projectPath", "");
100
+ const projectPath = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, "projectPath", "");
101
101
  const isValid = await checkActiveResourcePlugins(projectPath);
102
102
  const isUpgradeable = isValid && versionForMigration.state === versionMetadata_1.VersionState.upgradeable;
103
103
  if (isUpgradeable) {
104
104
  // in cli non interactive scenario, migration will return an error instead of popup dialog.
105
- const nonInteractive = v3MigrationUtils_1.getParameterFromCxt(ctx, "nonInteractive");
105
+ const nonInteractive = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, "nonInteractive");
106
106
  if (nonInteractive) {
107
- ctx.result = teamsfx_api_1.err(new error_1.NotAllowedMigrationError());
107
+ ctx.result = (0, teamsfx_api_1.err)(new error_1.NotAllowedMigrationError());
108
108
  return;
109
109
  }
110
110
  const isRunMigration = await showNotification(ctx, versionForMigration);
111
111
  if (isRunMigration) {
112
- const isNonmodalMessage = v3MigrationUtils_1.getParameterFromCxt(ctx, Parameters.isNonmodalMessage);
112
+ const isNonmodalMessage = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, Parameters.isNonmodalMessage);
113
113
  if (isNonmodalMessage) {
114
114
  const versionForMigration = await checkVersionForMigration(ctx);
115
115
  if (versionForMigration.state !== versionMetadata_1.VersionState.upgradeable) {
116
- ctx.result = teamsfx_api_1.ok(undefined);
116
+ ctx.result = (0, teamsfx_api_1.ok)(undefined);
117
117
  return;
118
118
  }
119
119
  }
120
120
  const migrationContext = await migrationContext_1.MigrationContext.create(ctx);
121
121
  await wrapRunMigration(migrationContext, migrate);
122
- ctx.result = teamsfx_api_1.ok(undefined);
122
+ ctx.result = (0, teamsfx_api_1.ok)(undefined);
123
123
  }
124
124
  return;
125
125
  }
@@ -140,7 +140,7 @@ async function wrapRunMigration(context, exec) {
140
140
  }
141
141
  catch (error) {
142
142
  const errorMessage = buildErrorMessage(error, context.currentStep);
143
- const fxError = error_1.assembleError(error, telemetry_1.Component.core);
143
+ const fxError = (0, error_1.assembleError)(error, telemetry_1.Component.core);
144
144
  fxError.message = errorMessage;
145
145
  sendTelemetryErrorEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorError, fxError, context.telemetryProperties);
146
146
  await rollbackMigration(context);
@@ -170,7 +170,7 @@ exports.rollbackMigration = rollbackMigration;
170
170
  async function showSummaryReport(context) {
171
171
  var _a, _b;
172
172
  const summaryPath = path.join(context.backupPath, Constants.reportName);
173
- const templatePath = path.join(folder_1.getTemplatesFolder(), "core/v3Migration", Constants.reportName);
173
+ const templatePath = path.join((0, folder_1.getTemplatesFolder)(), "core/v3Migration", Constants.reportName);
174
174
  const content = await fs.readFile(templatePath);
175
175
  await fs.writeFile(summaryPath, content);
176
176
  await ((_b = (_a = globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui) === null || _a === void 0 ? void 0 : _a.openFile) === null || _b === void 0 ? void 0 : _b.call(_a, summaryPath));
@@ -187,9 +187,9 @@ async function preMigration(context) {
187
187
  }
188
188
  exports.preMigration = preMigration;
189
189
  async function checkVersionForMigration(ctx) {
190
- const versionInfo = await v3MigrationUtils_1.getProjectVersion(ctx);
191
- const versionState = v3MigrationUtils_1.getVersionState(versionInfo);
192
- const platform = v3MigrationUtils_1.getParameterFromCxt(ctx, "platform", teamsfx_api_1.Platform.VSCode);
190
+ const versionInfo = await (0, v3MigrationUtils_1.getProjectVersion)(ctx);
191
+ const versionState = (0, v3MigrationUtils_1.getVersionState)(versionInfo);
192
+ const platform = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, "platform", teamsfx_api_1.Platform.VSCode);
193
193
  return {
194
194
  currentVersion: versionInfo.version,
195
195
  source: versionInfo.source,
@@ -200,13 +200,13 @@ async function checkVersionForMigration(ctx) {
200
200
  exports.checkVersionForMigration = checkVersionForMigration;
201
201
  async function generateAppYml(context) {
202
202
  var _a;
203
- const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
203
+ const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
204
204
  const oldProjectSettings = await loadProjectSettings(context.projectPath);
205
205
  const appYmlGenerator = new appYmlGenerator_1.AppYmlGenerator(oldProjectSettings, bicepContent, context.projectPath);
206
206
  const appYmlString = await appYmlGenerator.generateAppYml();
207
207
  await context.fsWriteFile(versionMetadata_1.MetadataV3.configFile, appYmlString);
208
208
  if (((_a = oldProjectSettings.programmingLanguage) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === "csharp") {
209
- const placeholderMappings = await debugV3MigrationUtils_1.getPlaceholderMappings(context);
209
+ const placeholderMappings = await (0, debugV3MigrationUtils_1.getPlaceholderMappings)(context);
210
210
  const appLocalYmlString = await appYmlGenerator.generateAppLocalYml(placeholderMappings);
211
211
  await context.fsWriteFile(versionMetadata_1.MetadataV3.localConfigFile, appLocalYmlString);
212
212
  }
@@ -220,17 +220,17 @@ async function updateLaunchJson(context) {
220
220
  const oldProjectSettings = await loadProjectSettings(context.projectPath);
221
221
  if (oldProjectSettings.isM365) {
222
222
  const jsonObject = JSON.parse(launchJsonContent);
223
- jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.teams, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.teamsRemote, 1));
224
- jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.teams, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.teamsRemote, 1));
223
+ jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.teams, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.teamsRemote, 1));
224
+ jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.teams, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.teamsRemote, 1));
225
225
  if (debugV3MigrationUtils_1.OldProjectSettingsHelper.includeTab(oldProjectSettings)) {
226
- jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.outlook, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.outlookRemoteTab, 2));
227
- jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.outlook, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.outlookRemoteTab, 2));
228
- jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.office, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.officeRemoteTab, 3));
229
- jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.office, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.officeRemoteTab, 3));
226
+ jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.outlook, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.outlookRemoteTab, 2));
227
+ jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.outlook, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.outlookRemoteTab, 2));
228
+ jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.office, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.officeRemoteTab, 3));
229
+ jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.office, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.officeRemoteTab, 3));
230
230
  }
231
231
  else if (debugV3MigrationUtils_1.OldProjectSettingsHelper.includeBot(oldProjectSettings)) {
232
- jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.outlook, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.outlookRemoteBot, 2));
233
- jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.outlook, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.outlookRemoteBot, 2));
232
+ jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.outlook, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.outlookRemoteBot, 2));
233
+ jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.outlook, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.outlookRemoteBot, 2));
234
234
  }
235
235
  launchJsonContent = JSON.stringify(jsonObject, null, 4);
236
236
  }
@@ -244,7 +244,7 @@ async function updateLaunchJson(context) {
244
244
  }
245
245
  exports.updateLaunchJson = updateLaunchJson;
246
246
  async function loadProjectSettings(projectPath) {
247
- const oldProjectSettings = await projectSettingsLoader_1.loadProjectSettingsByProjectPathV2(projectPath);
247
+ const oldProjectSettings = await (0, projectSettingsLoader_1.loadProjectSettingsByProjectPathV2)(projectPath);
248
248
  if (oldProjectSettings.isOk()) {
249
249
  return oldProjectSettings.value;
250
250
  }
@@ -263,26 +263,26 @@ function isSPFxProject(projectSettings) {
263
263
  exports.isSPFxProject = isSPFxProject;
264
264
  async function manifestsMigration(context) {
265
265
  // Check manifest existing
266
- const oldAppPackageFolderPath = path.join(v3MigrationUtils_1.getTemplateFolderPath(context), teamsfx_api_1.AppPackageFolderName);
266
+ const oldAppPackageFolderPath = path.join((0, v3MigrationUtils_1.getTemplateFolderPath)(context), teamsfx_api_1.AppPackageFolderName);
267
267
  const oldManifestPath = path.join(oldAppPackageFolderPath, constants_1.MANIFEST_TEMPLATE_CONSOLIDATE);
268
268
  const oldManifestAbsolutePath = path.join(context.projectPath, oldManifestPath);
269
269
  const oldManifestExists = await fs.pathExists(oldManifestAbsolutePath);
270
270
  if (!oldManifestExists) {
271
271
  // templates/appPackage/manifest.template.json does not exist
272
- throw new error_1.MigrationError(new Error(localizeUtils_1.getLocalizedString("core.migrationV3.manifestNotExist")), exports.errorNames.manifestTemplateNotExist, exports.learnMoreLink);
272
+ throw new error_1.MigrationError(new Error((0, localizeUtils_1.getLocalizedString)("core.migrationV3.manifestNotExist")), exports.errorNames.manifestTemplateNotExist, exports.learnMoreLink);
273
273
  }
274
274
  // Validate manifest template
275
275
  {
276
276
  const res = await ManifestUtils_1.manifestUtils._readAppManifest(path.join(context.projectPath, oldManifestPath));
277
277
  if (res.isErr()) {
278
- throw new error_1.MigrationError(new Error(localizeUtils_1.getLocalizedString("core.migrationV3.manifestInvalid")), exports.errorNames.manifestTemplateInvalid);
278
+ throw new error_1.MigrationError(new Error((0, localizeUtils_1.getLocalizedString)("core.migrationV3.manifestInvalid")), exports.errorNames.manifestTemplateInvalid);
279
279
  }
280
280
  }
281
281
  // Backup templates/appPackage
282
282
  await context.backup(oldAppPackageFolderPath);
283
283
  // Read Bicep
284
- const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
285
- if (v3MigrationUtils_1.isValidDomainForBotOutputKey(bicepContent)) {
284
+ const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
285
+ if ((0, v3MigrationUtils_1.isValidDomainForBotOutputKey)(bicepContent)) {
286
286
  context.isBotValidDomain = true;
287
287
  }
288
288
  // Ensure appPackage
@@ -296,19 +296,19 @@ async function manifestsMigration(context) {
296
296
  }
297
297
  // Read capability project settings
298
298
  const projectSettings = await loadProjectSettings(context.projectPath);
299
- const capabilities = v3MigrationUtils_1.getCapabilityStatus(projectSettings);
300
- const appIdUri = v3MigrationUtils_1.generateAppIdUri(capabilities);
299
+ const capabilities = (0, v3MigrationUtils_1.getCapabilityStatus)(projectSettings);
300
+ const appIdUri = (0, v3MigrationUtils_1.generateAppIdUri)(capabilities);
301
301
  const isSpfx = isSPFxProject(projectSettings);
302
302
  if (!isSpfx) {
303
- await v3MigrationUtils_1.addMissingValidDomainForManifest(path.join(context.projectPath, oldManifestPath), capabilities.Tab, capabilities.BotSso, context.isBotValidDomain);
303
+ await (0, v3MigrationUtils_1.addMissingValidDomainForManifest)(path.join(context.projectPath, oldManifestPath), capabilities.Tab, capabilities.BotSso, context.isBotValidDomain);
304
304
  }
305
305
  // Read Teams app manifest and save to templates/appPackage/manifest.json
306
306
  const manifestPath = path.join(teamsfx_api_1.AppPackageFolderName, versionMetadata_1.MetadataV3.teamsManifestFileName);
307
307
  let oldManifest = await fs.readFile(path.join(context.projectPath, oldManifestPath), "utf8");
308
- oldManifest = v3MigrationUtils_1.replaceAppIdUri(oldManifest, appIdUri);
309
- const manifest = MigrationUtils_1.replacePlaceholdersForV3(oldManifest, bicepContent);
308
+ oldManifest = (0, v3MigrationUtils_1.replaceAppIdUri)(oldManifest, appIdUri);
309
+ const manifest = (0, MigrationUtils_1.replacePlaceholdersForV3)(oldManifest, bicepContent);
310
310
  if (isSpfx) {
311
- await v3MigrationUtils_1.updateAndSaveManifestForSpfx(context, manifest);
311
+ await (0, v3MigrationUtils_1.updateAndSaveManifestForSpfx)(context, manifest);
312
312
  }
313
313
  else {
314
314
  await context.fsWriteFile(manifestPath, manifest);
@@ -325,12 +325,12 @@ async function manifestsMigration(context) {
325
325
  }) >= 0);
326
326
  if (oldAadManifestExists && aadRequired) {
327
327
  let oldAadManifest = await fs.readFile(path.join(context.projectPath, oldAadManifestPath), "utf-8");
328
- oldAadManifest = v3MigrationUtils_1.replaceAppIdUri(oldAadManifest, appIdUri);
329
- const aadManifest = MigrationUtils_1.replacePlaceholdersForV3(oldAadManifest, bicepContent);
328
+ oldAadManifest = (0, v3MigrationUtils_1.replaceAppIdUri)(oldAadManifest, appIdUri);
329
+ const aadManifest = (0, MigrationUtils_1.replacePlaceholdersForV3)(oldAadManifest, bicepContent);
330
330
  await context.fsWriteFile(versionMetadata_1.MetadataV3.aadManifestFileName, aadManifest);
331
331
  }
332
332
  else if (aadRequired && !oldAadManifestExists) {
333
- throw new error_1.MigrationError(new Error(localizeUtils_1.getLocalizedString("core.migrationV3.aadManifestNotExist")), exports.errorNames.aadManifestTemplateNotExist, exports.learnMoreLink);
333
+ throw new error_1.MigrationError(new Error((0, localizeUtils_1.getLocalizedString)("core.migrationV3.aadManifestNotExist")), exports.errorNames.aadManifestTemplateNotExist, exports.learnMoreLink);
334
334
  }
335
335
  await context.fsRemove(oldAppPackageFolderPath);
336
336
  }
@@ -344,9 +344,9 @@ async function azureParameterMigration(context) {
344
344
  return;
345
345
  }
346
346
  // Read Bicep
347
- const azureFolderPath = path.join(v3MigrationUtils_1.getTemplateFolderPath(context), "azure");
348
- const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
349
- const fileNames = v3MigrationUtils_1.fsReadDirSync(context, configFolderPath);
347
+ const azureFolderPath = path.join((0, v3MigrationUtils_1.getTemplateFolderPath)(context), "azure");
348
+ const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
349
+ const fileNames = (0, v3MigrationUtils_1.fsReadDirSync)(context, configFolderPath);
350
350
  for (const fileName of fileNames) {
351
351
  if (!fileName.startsWith("azure.parameters.")) {
352
352
  continue;
@@ -357,21 +357,21 @@ async function azureParameterMigration(context) {
357
357
  continue;
358
358
  }
359
359
  const content = await fs.readFile(parameterPath, "utf-8");
360
- const newContent = MigrationUtils_1.replacePlaceholdersForV3(content, bicepContent);
360
+ const newContent = (0, MigrationUtils_1.replacePlaceholdersForV3)(content, bicepContent);
361
361
  await context.fsWriteFile(path.join(azureFolderPath, fileName), newContent);
362
362
  }
363
363
  }
364
364
  exports.azureParameterMigration = azureParameterMigration;
365
365
  async function showNotification(ctx, versionForMigration) {
366
- const isNonmodalMessage = v3MigrationUtils_1.getParameterFromCxt(ctx, Parameters.isNonmodalMessage);
366
+ const isNonmodalMessage = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, Parameters.isNonmodalMessage);
367
367
  if (isNonmodalMessage) {
368
368
  return await showNonmodalNotification(ctx, versionForMigration);
369
369
  }
370
- const confirmOnly = v3MigrationUtils_1.getParameterFromCxt(ctx, Parameters.confirmOnly);
370
+ const confirmOnly = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, Parameters.confirmOnly);
371
371
  if (confirmOnly) {
372
372
  return await showConfirmOnlyNotification(ctx);
373
373
  }
374
- const skipUserConfirm = v3MigrationUtils_1.getParameterFromCxt(ctx, Parameters.skipUserConfirm);
374
+ const skipUserConfirm = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, Parameters.skipUserConfirm);
375
375
  if (skipUserConfirm) {
376
376
  sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
377
377
  [TelemetryPropertyKey.button]: TelemetryPropertyValue.ok,
@@ -387,21 +387,21 @@ async function askUserConfirm(ctx, versionForMigration) {
387
387
  let answer;
388
388
  do {
389
389
  answer = await popupMessageModal(versionForMigration);
390
- if (answer === exports.moreInfoButton()) {
390
+ if (answer === (0, exports.moreInfoButton)()) {
391
391
  globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.openUrl(exports.learnMoreLink);
392
392
  sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
393
393
  [TelemetryPropertyKey.button]: TelemetryPropertyValue.learnMore,
394
394
  [TelemetryPropertyKey.mode]: TelemetryPropertyValue.modal,
395
395
  });
396
396
  }
397
- } while (answer === exports.moreInfoButton());
397
+ } while (answer === (0, exports.moreInfoButton)());
398
398
  if (!answer || !migrationMessageButtons().includes(answer)) {
399
399
  sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
400
400
  [TelemetryPropertyKey.button]: TelemetryPropertyValue.cancel,
401
401
  [TelemetryPropertyKey.mode]: TelemetryPropertyValue.modal,
402
402
  });
403
- ctx.result = teamsfx_api_1.err(new error_1.UpgradeV3CanceledError());
404
- v3MigrationUtils_1.outputCancelMessage(versionForMigration.currentVersion, versionForMigration.platform);
403
+ ctx.result = (0, teamsfx_api_1.err)(new error_1.UpgradeV3CanceledError());
404
+ (0, v3MigrationUtils_1.outputCancelMessage)(versionForMigration.currentVersion, versionForMigration.platform);
405
405
  return false;
406
406
  }
407
407
  sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
@@ -413,7 +413,7 @@ async function askUserConfirm(ctx, versionForMigration) {
413
413
  async function showNonmodalNotification(ctx, versionForMigration) {
414
414
  sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotificationStart);
415
415
  const answer = await popupMessageNonmodal(versionForMigration);
416
- if (answer === exports.moreInfoButton()) {
416
+ if (answer === (0, exports.moreInfoButton)()) {
417
417
  globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.openUrl(exports.learnMoreLink);
418
418
  sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
419
419
  [TelemetryPropertyKey.button]: TelemetryPropertyValue.learnMore,
@@ -432,7 +432,7 @@ async function showNonmodalNotification(ctx, versionForMigration) {
432
432
  }
433
433
  async function showConfirmOnlyNotification(ctx) {
434
434
  sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotificationStart);
435
- const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("info", localizeUtils_1.getLocalizedString("core.migrationV3.confirmOnly.Message"), true, "OK"));
435
+ const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.migrationV3.confirmOnly.Message"), true, "OK"));
436
436
  if ((res === null || res === void 0 ? void 0 : res.isOk()) && res.value === "OK") {
437
437
  sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
438
438
  [TelemetryPropertyKey.button]: TelemetryPropertyValue.ok,
@@ -455,13 +455,13 @@ async function popupMessageNonmodal(versionForMigration) {
455
455
  return await popupMessage(versionForMigration, false);
456
456
  }
457
457
  async function popupMessage(versionForMigration, isModal) {
458
- const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("warn", v3MigrationUtils_1.migrationNotificationMessage(versionForMigration), isModal, ...migrationMessageButtons()));
458
+ const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("warn", (0, v3MigrationUtils_1.migrationNotificationMessage)(versionForMigration), isModal, ...migrationMessageButtons()));
459
459
  return (res === null || res === void 0 ? void 0 : res.isOk()) ? res.value : undefined;
460
460
  }
461
461
  async function setTelemetryProjectId(context) {
462
- const projectPath = v3MigrationUtils_1.getParameterFromCxt(context, "projectPath", "");
462
+ const projectPath = (0, v3MigrationUtils_1.getParameterFromCxt)(context, "projectPath", "");
463
463
  try {
464
- const projectId = await v3MigrationUtils_1.getTrackingIdFromPath(projectPath);
464
+ const projectId = await (0, v3MigrationUtils_1.getTrackingIdFromPath)(projectPath);
465
465
  telemetryProperties[TelemetryPropertyKey.projectId] = projectId;
466
466
  }
467
467
  catch (error) {
@@ -472,7 +472,7 @@ async function configsMigration(context) {
472
472
  // general
473
473
  if (await context.fsPathExists(path.join(".fx", "configs"))) {
474
474
  // if ./fx/states/ exists
475
- const fileNames = v3MigrationUtils_1.fsReadDirSync(context, path.join(".fx", "configs")); // search all files, get file names
475
+ const fileNames = (0, v3MigrationUtils_1.fsReadDirSync)(context, path.join(".fx", "configs")); // search all files, get file names
476
476
  for (const fileName of fileNames)
477
477
  if (fileName.startsWith("config.")) {
478
478
  const fileRegex = new RegExp("(config\\.)([a-zA-Z0-9_-]*)(\\.json)$", "g"); // config.*.json
@@ -488,9 +488,9 @@ async function configsMigration(context) {
488
488
  // add first line of comment
489
489
  await context.fsWriteFile(path.join(versionMetadata_1.MetadataV3.defaultEnvironmentFolder, Constants.envFilePrefix + envName), envName === "local" ? versionMetadata_1.MetadataV3.envFileLocalComment : versionMetadata_1.MetadataV3.envFileDevComment, Constants.envWriteOption);
490
490
  }
491
- const obj = await v3MigrationUtils_1.readJsonFile(context, path.join(".fx", "configs", "config." + envName + ".json"));
491
+ const obj = await (0, v3MigrationUtils_1.readJsonFile)(context, path.join(".fx", "configs", "config." + envName + ".json"));
492
492
  if (obj["manifest"]) {
493
- const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
493
+ const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
494
494
  const teamsfx_env = fs
495
495
  .readFileSync(path.join(context.projectPath, versionMetadata_1.MetadataV3.defaultEnvironmentFolder, Constants.envFilePrefix + envName))
496
496
  .toString()
@@ -499,7 +499,7 @@ async function configsMigration(context) {
499
499
  : "TEAMSFX_ENV=" + envName + os_1.EOL + "APP_NAME_SUFFIX=" + envName + os_1.EOL;
500
500
  // convert every name and add the env name at the first line
501
501
  const envData = teamsfx_env +
502
- v3MigrationUtils_1.jsonObjectNamesConvertV3(obj["manifest"], "manifest.", "", MigrationUtils_1.FileType.CONFIG, bicepContent);
502
+ (0, v3MigrationUtils_1.jsonObjectNamesConvertV3)(obj["manifest"], "manifest.", "", MigrationUtils_1.FileType.CONFIG, bicepContent);
503
503
  await context.fsWriteFile(path.join(versionMetadata_1.MetadataV3.defaultEnvironmentFolder, Constants.envFilePrefix + envName), envData, Constants.envWriteOption);
504
504
  }
505
505
  }
@@ -511,7 +511,7 @@ async function statesMigration(context) {
511
511
  // general
512
512
  if (await context.fsPathExists(path.join(".fx", "states"))) {
513
513
  // if ./fx/states/ exists
514
- const fileNames = v3MigrationUtils_1.fsReadDirSync(context, path.join(".fx", "states")); // search all files, get file names
514
+ const fileNames = (0, v3MigrationUtils_1.fsReadDirSync)(context, path.join(".fx", "states")); // search all files, get file names
515
515
  for (const fileName of fileNames)
516
516
  if (fileName.startsWith("state.")) {
517
517
  const fileRegex = new RegExp("(state\\.)([a-zA-Z0-9_-]*)(\\.json)$", "g"); // state.*.json
@@ -527,11 +527,11 @@ async function statesMigration(context) {
527
527
  // add first line of comment
528
528
  await context.fsWriteFile(path.join(versionMetadata_1.MetadataV3.defaultEnvironmentFolder, Constants.envFilePrefix + envName), envName === "local" ? versionMetadata_1.MetadataV3.envFileLocalComment : versionMetadata_1.MetadataV3.envFileDevComment, Constants.envWriteOption);
529
529
  }
530
- const obj = await v3MigrationUtils_1.readJsonFile(context, path.join(".fx", "states", "state." + envName + ".json"));
530
+ const obj = await (0, v3MigrationUtils_1.readJsonFile)(context, path.join(".fx", "states", "state." + envName + ".json"));
531
531
  if (obj) {
532
- const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
532
+ const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
533
533
  // convert every name
534
- const envData = v3MigrationUtils_1.jsonObjectNamesConvertV3(obj, "state.", "", MigrationUtils_1.FileType.STATE, bicepContent);
534
+ const envData = (0, v3MigrationUtils_1.jsonObjectNamesConvertV3)(obj, "state.", "", MigrationUtils_1.FileType.STATE, bicepContent);
535
535
  await context.fsWriteFile(path.join(versionMetadata_1.MetadataV3.defaultEnvironmentFolder, Constants.envFilePrefix + envName), envData, Constants.envWriteOption);
536
536
  }
537
537
  }
@@ -545,17 +545,17 @@ async function userdataMigration(context) {
545
545
  return;
546
546
  }
547
547
  await context.fsEnsureDir(versionMetadata_1.MetadataV3.defaultEnvironmentFolder);
548
- const stateFiles = v3MigrationUtils_1.fsReadDirSync(context, stateFolder); // search all files, get file names
548
+ const stateFiles = (0, v3MigrationUtils_1.fsReadDirSync)(context, stateFolder); // search all files, get file names
549
549
  for (const stateFile of stateFiles) {
550
- const envName = v3MigrationUtils_1.tryExtractEnvFromUserdata(stateFile);
550
+ const envName = (0, v3MigrationUtils_1.tryExtractEnvFromUserdata)(stateFile);
551
551
  if (envName) {
552
552
  // get envName
553
- const envFileName = v3MigrationUtils_1.buildEnvUserFileName(envName);
554
- const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
553
+ const envFileName = (0, v3MigrationUtils_1.buildEnvUserFileName)(envName);
554
+ const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
555
555
  const envData = versionMetadata_1.MetadataV3.secretFileComment +
556
556
  os_1.EOL +
557
557
  versionMetadata_1.MetadataV3.secretComment +
558
- (await v3MigrationUtils_1.readAndConvertUserdata(context, path.join(stateFolder, stateFile), bicepContent));
558
+ (await (0, v3MigrationUtils_1.readAndConvertUserdata)(context, path.join(stateFolder, stateFile), bicepContent));
559
559
  await context.fsWriteFile(path.join(versionMetadata_1.MetadataV3.defaultEnvironmentFolder, envFileName), envData, Constants.envWriteOption);
560
560
  }
561
561
  }
@@ -565,8 +565,8 @@ async function debugMigration(context) {
565
565
  // Backup vscode/tasks.json
566
566
  await context.backup(Constants.tasksJsonPath);
567
567
  // Read .vscode/tasks.json
568
- const tasksJsonContent = await debugV3MigrationUtils_1.readJsonCommentFile(path.join(context.projectPath, Constants.tasksJsonPath));
569
- if (!debugV3MigrationUtils_1.isCommentObject(tasksJsonContent) || !Array.isArray(tasksJsonContent["tasks"])) {
568
+ const tasksJsonContent = await (0, debugV3MigrationUtils_1.readJsonCommentFile)(path.join(context.projectPath, Constants.tasksJsonPath));
569
+ if (!(0, debugV3MigrationUtils_1.isCommentObject)(tasksJsonContent) || !Array.isArray(tasksJsonContent["tasks"])) {
570
570
  // Invalid tasks.json content
571
571
  return;
572
572
  }
@@ -594,7 +594,7 @@ async function debugMigration(context) {
594
594
  taskMigrator_1.migrateGetFuncPathCommand,
595
595
  ];
596
596
  const oldProjectSettings = await loadProjectSettings(context.projectPath);
597
- const placeholderMappings = await debugV3MigrationUtils_1.getPlaceholderMappings(context);
597
+ const placeholderMappings = await (0, debugV3MigrationUtils_1.getPlaceholderMappings)(context);
598
598
  const debugContext = new debugMigrationContext_1.DebugMigrationContext(context, tasksJsonContent["tasks"], oldProjectSettings, placeholderMappings);
599
599
  for (const func of migrateTaskFuncs) {
600
600
  await func(debugContext);
@@ -625,7 +625,7 @@ async function generateApimPluginEnvContent(context) {
625
625
  const projectSettingsContent = fs.readJsonSync(path.join(context.projectPath, ".fx", "configs", "projectSettings.json"));
626
626
  // judge if apim plugin exists
627
627
  if (checkapimPluginExists(projectSettingsContent)) {
628
- const fileNames = v3MigrationUtils_1.fsReadDirSync(context, path.join(".fx", "configs"));
628
+ const fileNames = (0, v3MigrationUtils_1.fsReadDirSync)(context, path.join(".fx", "configs"));
629
629
  for (const fileName of fileNames)
630
630
  if (fileName.startsWith("config.")) {
631
631
  const fileRegex = new RegExp("(config.)([a-zA-Z0-9_-]*)(.json)$", "g"); // config.*.json
@@ -678,8 +678,8 @@ async function updateGitignore(context) {
678
678
  await context.fsCreateFile(gitignoreFile);
679
679
  }
680
680
  let ignoreFileContent = await fs.readFile(path.join(context.projectPath, gitignoreFile), "utf8");
681
- ignoreFileContent += os_1.EOL + `${versionMetadata_1.MetadataV3.defaultEnvironmentFolder}/${v3MigrationUtils_1.buildEnvUserFileName("*")}`;
682
- ignoreFileContent += os_1.EOL + `${versionMetadata_1.MetadataV3.defaultEnvironmentFolder}/${v3MigrationUtils_1.buildEnvFileName("local")}`;
681
+ ignoreFileContent += os_1.EOL + `${versionMetadata_1.MetadataV3.defaultEnvironmentFolder}/${(0, v3MigrationUtils_1.buildEnvUserFileName)("*")}`;
682
+ ignoreFileContent += os_1.EOL + `${versionMetadata_1.MetadataV3.defaultEnvironmentFolder}/${(0, v3MigrationUtils_1.buildEnvFileName)("local")}`;
683
683
  ignoreFileContent += os_1.EOL + `${migrationContext_1.backupFolder}/*`;
684
684
  ignoreFileContent += os_1.EOL + debugV3MigrationUtils_1.ignoreDevToolsDir;
685
685
  await context.fsWriteFile(gitignoreFile, ignoreFileContent);
@@ -687,10 +687,10 @@ async function updateGitignore(context) {
687
687
  exports.updateGitignore = updateGitignore;
688
688
  function sendTelemetryEventForUpgrade(component, eventName, properties, measurements) {
689
689
  const mergedProperties = Object.assign(Object.assign({}, properties), telemetryProperties);
690
- telemetry_1.sendTelemetryEvent(component, eventName, mergedProperties, measurements);
690
+ (0, telemetry_1.sendTelemetryEvent)(component, eventName, mergedProperties, measurements);
691
691
  }
692
692
  function sendTelemetryErrorEventForUpgrade(component, eventName, fxError, properties) {
693
693
  const mergedProperties = Object.assign(Object.assign({}, properties), telemetryProperties);
694
- telemetry_1.sendTelemetryErrorEvent(component, eventName, fxError, mergedProperties);
694
+ (0, telemetry_1.sendTelemetryErrorEvent)(component, eventName, fxError, mergedProperties);
695
695
  }
696
696
  //# sourceMappingURL=projectMigratorV3.js.map