@microsoft/teamsfx-core 2.0.0 → 2.0.1-alpha.6f92bb6f7.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.
- package/build/common/armInterface.d.ts +0 -5
- package/build/common/armInterface.d.ts.map +1 -1
- package/build/common/deps-checker/checkerFactory.d.ts.map +1 -1
- package/build/common/deps-checker/checkerFactory.js +0 -7
- package/build/common/deps-checker/checkerFactory.js.map +1 -1
- package/build/common/deps-checker/constant/helpLink.d.ts +0 -4
- package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -1
- package/build/common/deps-checker/constant/helpLink.js +1 -9
- package/build/common/deps-checker/constant/helpLink.js.map +1 -1
- package/build/common/deps-checker/constant/message.d.ts +0 -5
- package/build/common/deps-checker/constant/message.d.ts.map +1 -1
- package/build/common/deps-checker/constant/message.js +0 -6
- package/build/common/deps-checker/constant/message.js.map +1 -1
- package/build/common/deps-checker/constant/telemetry.d.ts +2 -33
- package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -1
- package/build/common/deps-checker/constant/telemetry.js +0 -31
- package/build/common/deps-checker/constant/telemetry.js.map +1 -1
- package/build/common/deps-checker/depsChecker.d.ts +0 -3
- package/build/common/deps-checker/depsChecker.d.ts.map +1 -1
- package/build/common/deps-checker/depsChecker.js +0 -3
- package/build/common/deps-checker/depsChecker.js.map +1 -1
- package/build/common/deps-checker/depsError.d.ts +0 -9
- package/build/common/deps-checker/depsError.d.ts.map +1 -1
- package/build/common/deps-checker/depsError.js +1 -22
- package/build/common/deps-checker/depsError.js.map +1 -1
- package/build/common/deps-checker/depsManager.d.ts.map +1 -1
- package/build/common/deps-checker/depsManager.js +0 -3
- package/build/common/deps-checker/depsManager.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts +2 -2
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js +4 -2
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.d.ts +0 -20
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +1 -51
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/common/local/localEnvManager.d.ts +0 -9
- package/build/common/local/localEnvManager.d.ts.map +1 -1
- package/build/common/local/localEnvManager.js +0 -59
- package/build/common/local/localEnvManager.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts +1 -7
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +5 -81
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/projectSettingsHelperV3.d.ts +0 -1
- package/build/common/projectSettingsHelperV3.d.ts.map +1 -1
- package/build/common/projectSettingsHelperV3.js +1 -10
- package/build/common/projectSettingsHelperV3.js.map +1 -1
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +18 -40
- package/build/common/samples.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/common/tools.d.ts +1 -2
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +5 -70
- package/build/common/tools.js.map +1 -1
- package/build/component/code/utils.d.ts +1 -8
- package/build/component/code/utils.d.ts.map +1 -1
- package/build/component/code/utils.js +5 -144
- package/build/component/code/utils.js.map +1 -1
- package/build/component/constants.d.ts +3 -0
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +13 -2
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts +7 -7
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +15 -179
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/debug/error.d.ts +0 -1
- package/build/component/debug/error.d.ts.map +1 -1
- package/build/component/debug/error.js +1 -11
- package/build/component/debug/error.js.map +1 -1
- package/build/component/debug/index.d.ts.map +1 -1
- package/build/component/debug/index.js +1 -25
- package/build/component/debug/index.js.map +1 -1
- package/build/component/driver/aad/create.d.ts.map +1 -1
- package/build/component/driver/aad/create.js +2 -2
- package/build/component/driver/aad/create.js.map +1 -1
- package/build/component/driver/aad/update.d.ts.map +1 -1
- package/build/component/driver/aad/update.js +6 -20
- package/build/component/driver/aad/update.js.map +1 -1
- package/build/component/driver/botAadApp/create.d.ts.map +1 -1
- package/build/component/driver/botAadApp/create.js +2 -2
- package/build/component/driver/botAadApp/create.js.map +1 -1
- package/build/component/driver/devTool/error/dotnetInstallationUserError.d.ts +1 -1
- package/build/component/driver/devTool/error/dotnetInstallationUserError.d.ts.map +1 -1
- package/build/component/driver/devTool/error/dotnetInstallationUserError.js +4 -2
- package/build/component/driver/devTool/error/dotnetInstallationUserError.js.map +1 -1
- package/build/component/driver/devTool/error/funcInstallationUserError.d.ts +1 -1
- package/build/component/driver/devTool/error/funcInstallationUserError.d.ts.map +1 -1
- package/build/component/driver/devTool/error/funcInstallationUserError.js +4 -2
- package/build/component/driver/devTool/error/funcInstallationUserError.js.map +1 -1
- package/build/component/driver/devTool/installDriver.d.ts +1 -0
- package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
- package/build/component/driver/devTool/installDriver.js +17 -24
- package/build/component/driver/devTool/installDriver.js.map +1 -1
- package/build/component/driver/script/baseBuildDriver.d.ts.map +1 -1
- package/build/component/driver/script/baseBuildDriver.js +2 -2
- package/build/component/driver/script/baseBuildDriver.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts +11 -1
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +121 -4
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +0 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +1 -11
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts +0 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +34 -18
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/feature/bot/question.d.ts.map +1 -1
- package/build/component/feature/bot/question.js +7 -16
- package/build/component/feature/bot/question.js.map +1 -1
- package/build/component/feature/sso.d.ts +0 -4
- package/build/component/feature/sso.d.ts.map +1 -1
- package/build/component/feature/sso.js +10 -144
- package/build/component/feature/sso.js.map +1 -1
- package/build/component/question.d.ts +3 -64
- package/build/component/question.d.ts.map +1 -1
- package/build/component/question.js +61 -663
- package/build/component/question.js.map +1 -1
- package/build/component/registerService.d.ts +0 -14
- package/build/component/registerService.d.ts.map +1 -1
- package/build/component/registerService.js +0 -14
- package/build/component/registerService.js.map +1 -1
- package/build/component/resource/aadApp/aadApp.d.ts.map +1 -1
- package/build/component/resource/aadApp/aadApp.js +6 -24
- package/build/component/resource/aadApp/aadApp.js.map +1 -1
- package/build/component/resource/appManifest/appStudio.js +1 -1
- package/build/component/resource/appManifest/appStudio.js.map +1 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.d.ts +1 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.js +1 -9
- package/build/component/resource/appManifest/utils/ManifestUtils.js.map +1 -1
- package/build/component/resource/spfx/utils/questions.d.ts.map +1 -1
- package/build/component/resource/spfx/utils/questions.js +1 -4
- package/build/component/resource/spfx/utils/questions.js.map +1 -1
- package/build/component/utils/backupFiles.d.ts +2 -1
- package/build/component/utils/backupFiles.d.ts.map +1 -1
- package/build/component/utils/backupFiles.js +23 -3
- package/build/component/utils/backupFiles.js.map +1 -1
- package/build/component/utils/charsetUtils.d.ts +3 -0
- package/build/component/utils/charsetUtils.d.ts.map +1 -0
- package/build/component/utils/charsetUtils.js +241 -0
- package/build/component/utils/charsetUtils.js.map +1 -0
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +4 -1
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/metadataUtil.d.ts.map +1 -1
- package/build/component/utils/metadataUtil.js +9 -7
- package/build/component/utils/metadataUtil.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts.map +1 -1
- package/build/component/utils/pathUtils.js +8 -7
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/component/utils/settingsUtil.js +3 -3
- package/build/component/utils/settingsUtil.js.map +1 -1
- package/build/component/utils.d.ts +1 -12
- package/build/component/utils.d.ts.map +1 -1
- package/build/component/utils.js +2 -225
- package/build/component/utils.js.map +1 -1
- package/build/component/workflow.d.ts +0 -1
- package/build/component/workflow.d.ts.map +1 -1
- package/build/component/workflow.js +1 -687
- package/build/component/workflow.js.map +1 -1
- package/build/core/FxCore.d.ts +26 -34
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +86 -654
- package/build/core/FxCore.js.map +1 -1
- package/build/core/FxCoreImplementV3.d.ts +15 -9
- package/build/core/FxCoreImplementV3.d.ts.map +1 -1
- package/build/core/FxCoreImplementV3.js +105 -105
- package/build/core/FxCoreImplementV3.js.map +1 -1
- package/build/core/middleware/envInfoLoaderV3.d.ts +1 -10
- package/build/core/middleware/envInfoLoaderV3.d.ts.map +1 -1
- package/build/core/middleware/envInfoLoaderV3.js +1 -207
- package/build/core/middleware/envInfoLoaderV3.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts +1 -0
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +7 -7
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/projectSettingsLoader.d.ts +1 -4
- package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
- package/build/core/middleware/projectSettingsLoader.js +4 -58
- package/build/core/middleware/projectSettingsLoader.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.d.ts.map +1 -1
- package/build/core/middleware/projectVersionChecker.js +4 -5
- package/build/core/middleware/projectVersionChecker.js.map +1 -1
- package/build/core/middleware/questionModel.d.ts +0 -1
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +8 -54
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/core/middleware/utils/MigrationUtils.d.ts +0 -5
- package/build/core/middleware/utils/MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/MigrationUtils.js +1 -77
- package/build/core/middleware/utils/MigrationUtils.js.map +1 -1
- package/build/core/question.d.ts +2 -12
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +14 -236
- package/build/core/question.js.map +1 -1
- package/build/core/types.d.ts +3 -3
- package/build/core/types.d.ts.map +1 -1
- package/build/error/common.d.ts +9 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +39 -1
- package/build/error/common.js.map +1 -1
- package/build/error/script.d.ts +1 -1
- package/build/error/script.d.ts.map +1 -1
- package/build/error/script.js +3 -3
- package/build/error/script.js.map +1 -1
- package/build/index.d.ts +0 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -4
- package/build/index.js.map +1 -1
- package/package.json +12 -28
- package/resource/package.nls.json +10 -97
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/build/common/deps-checker/internal/ngrokChecker.d.ts +0 -27
- package/build/common/deps-checker/internal/ngrokChecker.d.ts.map +0 -1
- package/build/common/deps-checker/internal/ngrokChecker.js +0 -222
- package/build/common/deps-checker/internal/ngrokChecker.js.map +0 -1
- package/build/component/connection/apimConfig.d.ts +0 -11
- package/build/component/connection/apimConfig.d.ts.map +0 -1
- package/build/component/connection/apimConfig.js +0 -44
- package/build/component/connection/apimConfig.js.map +0 -1
- package/build/component/connection/azureFunctionConfig.d.ts +0 -9
- package/build/component/connection/azureFunctionConfig.d.ts.map +0 -1
- package/build/component/connection/azureFunctionConfig.js +0 -25
- package/build/component/connection/azureFunctionConfig.js.map +0 -1
- package/build/component/connection/azureResourceConfig.d.ts +0 -11
- package/build/component/connection/azureResourceConfig.d.ts.map +0 -1
- package/build/component/connection/azureResourceConfig.js +0 -72
- package/build/component/connection/azureResourceConfig.js.map +0 -1
- package/build/component/connection/azureWebAppConfig.d.ts +0 -9
- package/build/component/connection/azureWebAppConfig.d.ts.map +0 -1
- package/build/component/connection/azureWebAppConfig.js +0 -25
- package/build/component/connection/azureWebAppConfig.js.map +0 -1
- package/build/component/coordinator/lifecycleStage.d.ts +0 -2
- package/build/component/coordinator/lifecycleStage.d.ts.map +0 -1
- package/build/component/coordinator/lifecycleStage.js +0 -23
- package/build/component/coordinator/lifecycleStage.js.map +0 -1
- package/build/component/core.d.ts +0 -65
- package/build/component/core.d.ts.map +0 -1
- package/build/component/core.js +0 -653
- package/build/component/core.js.map +0 -1
- package/build/component/debug/util/ngrok.d.ts +0 -6
- package/build/component/debug/util/ngrok.d.ts.map +0 -1
- package/build/component/debug/util/ngrok.js +0 -65
- package/build/component/debug/util/ngrok.js.map +0 -1
- package/build/component/feature/api/api.d.ts +0 -8
- package/build/component/feature/api/api.d.ts.map +0 -1
- package/build/component/feature/api/api.js +0 -188
- package/build/component/feature/api/api.js.map +0 -1
- package/build/component/feature/apiconnector/apiConnector.d.ts +0 -11
- package/build/component/feature/apiconnector/apiConnector.d.ts.map +0 -1
- package/build/component/feature/apiconnector/apiConnector.js +0 -43
- package/build/component/feature/apiconnector/apiConnector.js.map +0 -1
- package/build/component/feature/apim.d.ts +0 -8
- package/build/component/feature/apim.d.ts.map +0 -1
- package/build/component/feature/apim.js +0 -123
- package/build/component/feature/apim.js.map +0 -1
- package/build/component/feature/bot/bot.d.ts +0 -12
- package/build/component/feature/bot/bot.d.ts.map +0 -1
- package/build/component/feature/bot/bot.js +0 -309
- package/build/component/feature/bot/bot.js.map +0 -1
- package/build/component/feature/keyVault.d.ts +0 -16
- package/build/component/feature/keyVault.d.ts.map +0 -1
- package/build/component/feature/keyVault.js +0 -90
- package/build/component/feature/keyVault.js.map +0 -1
- package/build/component/feature/spfx.d.ts +0 -9
- package/build/component/feature/spfx.d.ts.map +0 -1
- package/build/component/feature/spfx.js +0 -121
- package/build/component/feature/spfx.js.map +0 -1
- package/build/component/feature/sql.d.ts +0 -10
- package/build/component/feature/sql.d.ts.map +0 -1
- package/build/component/feature/sql.js +0 -80
- package/build/component/feature/sql.js.map +0 -1
- package/build/component/feature/tab.d.ts +0 -10
- package/build/component/feature/tab.d.ts.map +0 -1
- package/build/component/feature/tab.js +0 -238
- package/build/component/feature/tab.js.map +0 -1
- package/build/component/resource/azureSql/actions/configure.d.ts +0 -15
- package/build/component/resource/azureSql/actions/configure.d.ts.map +0 -1
- package/build/component/resource/azureSql/actions/configure.js +0 -92
- package/build/component/resource/azureSql/actions/configure.js.map +0 -1
- package/build/component/resource/azureSql/actions/provision.d.ts +0 -10
- package/build/component/resource/azureSql/actions/provision.d.ts.map +0 -1
- package/build/component/resource/azureSql/actions/provision.js +0 -63
- package/build/component/resource/azureSql/actions/provision.js.map +0 -1
- package/build/component/resource/azureSql/actions/utils.d.ts +0 -12
- package/build/component/resource/azureSql/actions/utils.d.ts.map +0 -1
- package/build/component/resource/azureSql/actions/utils.js +0 -82
- package/build/component/resource/azureSql/actions/utils.js.map +0 -1
- package/build/component/resource/azureSql/azureSql.d.ts +0 -24
- package/build/component/resource/azureSql/azureSql.d.ts.map +0 -1
- package/build/component/resource/azureSql/azureSql.js +0 -75
- package/build/component/resource/azureSql/azureSql.js.map +0 -1
- package/build/component/resource/azureSql/clients/management.d.ts +0 -18
- package/build/component/resource/azureSql/clients/management.d.ts.map +0 -1
- package/build/component/resource/azureSql/clients/management.js +0 -124
- package/build/component/resource/azureSql/clients/management.js.map +0 -1
- package/build/component/resource/azureSql/clients/sql.d.ts +0 -13
- package/build/component/resource/azureSql/clients/sql.d.ts.map +0 -1
- package/build/component/resource/azureSql/clients/sql.js +0 -153
- package/build/component/resource/azureSql/clients/sql.js.map +0 -1
- package/build/component/resource/azureSql/config.d.ts +0 -7
- package/build/component/resource/azureSql/config.d.ts.map +0 -1
- package/build/component/resource/azureSql/config.js +0 -77
- package/build/component/resource/azureSql/config.js.map +0 -1
- package/build/component/resource/azureSql/constants.d.ts +0 -85
- package/build/component/resource/azureSql/constants.d.ts.map +0 -1
- package/build/component/resource/azureSql/constants.js +0 -95
- package/build/component/resource/azureSql/constants.js.map +0 -1
- package/build/component/resource/azureSql/errors.d.ts +0 -63
- package/build/component/resource/azureSql/errors.d.ts.map +0 -1
- package/build/component/resource/azureSql/errors.js +0 -107
- package/build/component/resource/azureSql/errors.js.map +0 -1
- package/build/component/resource/azureSql/index.d.ts +0 -2
- package/build/component/resource/azureSql/index.d.ts.map +0 -1
- package/build/component/resource/azureSql/index.js +0 -7
- package/build/component/resource/azureSql/index.js.map +0 -1
- package/build/component/resource/azureSql/questions.d.ts +0 -6
- package/build/component/resource/azureSql/questions.d.ts.map +0 -1
- package/build/component/resource/azureSql/questions.js +0 -59
- package/build/component/resource/azureSql/questions.js.map +0 -1
- package/build/component/resource/azureSql/results.d.ts +0 -10
- package/build/component/resource/azureSql/results.d.ts.map +0 -1
- package/build/component/resource/azureSql/results.js +0 -34
- package/build/component/resource/azureSql/results.js.map +0 -1
- package/build/component/resource/azureSql/types.d.ts +0 -12
- package/build/component/resource/azureSql/types.d.ts.map +0 -1
- package/build/component/resource/azureSql/types.js +0 -5
- package/build/component/resource/azureSql/types.js.map +0 -1
- package/build/component/resource/azureSql/utils/checkInput.d.ts +0 -10
- package/build/component/resource/azureSql/utils/checkInput.d.ts.map +0 -1
- package/build/component/resource/azureSql/utils/checkInput.js +0 -89
- package/build/component/resource/azureSql/utils/checkInput.js.map +0 -1
- package/build/component/resource/azureSql/utils/common.d.ts +0 -12
- package/build/component/resource/azureSql/utils/common.d.ts.map +0 -1
- package/build/component/resource/azureSql/utils/common.js +0 -51
- package/build/component/resource/azureSql/utils/common.js.map +0 -1
- package/build/component/resource/identity.d.ts +0 -28
- package/build/component/resource/identity.d.ts.map +0 -1
- package/build/component/resource/identity.js +0 -42
- package/build/component/resource/identity.js.map +0 -1
- package/build/component/resource/keyVault.d.ts +0 -29
- package/build/component/resource/keyVault.d.ts.map +0 -1
- package/build/component/resource/keyVault.js +0 -47
- package/build/component/resource/keyVault.js.map +0 -1
- package/build/component/resource/simpleAuth/constants.d.ts +0 -122
- package/build/component/resource/simpleAuth/constants.d.ts.map +0 -1
- package/build/component/resource/simpleAuth/constants.js +0 -163
- package/build/component/resource/simpleAuth/constants.js.map +0 -1
- package/build/component/resource/simpleAuth/errors.d.ts +0 -17
- package/build/component/resource/simpleAuth/errors.d.ts.map +0 -1
- package/build/component/resource/simpleAuth/errors.js +0 -91
- package/build/component/resource/simpleAuth/errors.js.map +0 -1
- package/build/component/resource/simpleAuth/index.d.ts +0 -12
- package/build/component/resource/simpleAuth/index.d.ts.map +0 -1
- package/build/component/resource/simpleAuth/index.js +0 -115
- package/build/component/resource/simpleAuth/index.js.map +0 -1
- package/build/component/resource/simpleAuth/result.d.ts +0 -9
- package/build/component/resource/simpleAuth/result.d.ts.map +0 -1
- package/build/component/resource/simpleAuth/result.js +0 -35
- package/build/component/resource/simpleAuth/result.js.map +0 -1
- package/build/component/resource/simpleAuth/utils/common.d.ts +0 -23
- package/build/component/resource/simpleAuth/utils/common.d.ts.map +0 -1
- package/build/component/resource/simpleAuth/utils/common.js +0 -150
- package/build/component/resource/simpleAuth/utils/common.js.map +0 -1
- package/build/component/resource/simpleAuth/utils/dialog.d.ts +0 -5
- package/build/component/resource/simpleAuth/utils/dialog.d.ts.map +0 -1
- package/build/component/resource/simpleAuth/utils/dialog.js +0 -7
- package/build/component/resource/simpleAuth/utils/dialog.js.map +0 -1
- package/build/component/resource/simpleAuth/utils/telemetry.d.ts +0 -17
- package/build/component/resource/simpleAuth/utils/telemetry.d.ts.map +0 -1
- package/build/component/resource/simpleAuth/utils/telemetry.js +0 -45
- package/build/component/resource/simpleAuth/utils/telemetry.js.map +0 -1
- package/build/core/dependencyChecker.d.ts +0 -1
- package/build/core/dependencyChecker.d.ts.map +0 -1
- package/build/core/dependencyChecker.js +0 -2
- package/build/core/dependencyChecker.js.map +0 -1
- package/build/core/middleware/CommonErrorHandlerMW.d.ts +0 -14
- package/build/core/middleware/CommonErrorHandlerMW.d.ts.map +0 -1
- package/build/core/middleware/CommonErrorHandlerMW.js +0 -63
- package/build/core/middleware/CommonErrorHandlerMW.js.map +0 -1
- package/build/core/middleware/aadManifestMigration.d.ts +0 -3
- package/build/core/middleware/aadManifestMigration.d.ts.map +0 -1
- package/build/core/middleware/aadManifestMigration.js +0 -119
- package/build/core/middleware/aadManifestMigration.js.map +0 -1
- package/build/core/middleware/consolidateLocalRemote.d.ts +0 -5
- package/build/core/middleware/consolidateLocalRemote.d.ts.map +0 -1
- package/build/core/middleware/consolidateLocalRemote.js +0 -378
- package/build/core/middleware/consolidateLocalRemote.js.map +0 -1
- package/build/core/middleware/envInfoWriter.d.ts +0 -8
- package/build/core/middleware/envInfoWriter.d.ts.map +0 -1
- package/build/core/middleware/envInfoWriter.js +0 -76
- package/build/core/middleware/envInfoWriter.js.map +0 -1
- package/build/core/middleware/envInfoWriterV3.d.ts +0 -6
- package/build/core/middleware/envInfoWriterV3.d.ts.map +0 -1
- package/build/core/middleware/envInfoWriterV3.js +0 -67
- package/build/core/middleware/envInfoWriterV3.js.map +0 -1
- package/build/core/middleware/projectMigrator.d.ts +0 -40
- package/build/core/middleware/projectMigrator.d.ts.map +0 -1
- package/build/core/middleware/projectMigrator.js +0 -1014
- package/build/core/middleware/projectMigrator.js.map +0 -1
- package/build/core/middleware/projectSettingsWriter.d.ts +0 -6
- package/build/core/middleware/projectSettingsWriter.d.ts.map +0 -1
- package/build/core/middleware/projectSettingsWriter.js +0 -52
- package/build/core/middleware/projectSettingsWriter.js.map +0 -1
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
"use strict";
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.CommonErrorHandlerMW = void 0;
|
|
6
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
7
|
-
const lodash_1 = require("lodash");
|
|
8
|
-
const telemetry_1 = require("../../common/telemetry");
|
|
9
|
-
const globalVars_1 = require("../globalVars");
|
|
10
|
-
function CommonErrorHandlerMW(option) {
|
|
11
|
-
return async (ctx, next) => {
|
|
12
|
-
try {
|
|
13
|
-
if (option === null || option === void 0 ? void 0 : option.startFn) {
|
|
14
|
-
await (option === null || option === void 0 ? void 0 : option.startFn(ctx));
|
|
15
|
-
}
|
|
16
|
-
if (option === null || option === void 0 ? void 0 : option.telemetry) {
|
|
17
|
-
const event = option.telemetry.eventName
|
|
18
|
-
? option.telemetry.eventName + "-start"
|
|
19
|
-
: lodash_1.kebabCase(ctx.method) + "-start";
|
|
20
|
-
if (!option.telemetry.properties) {
|
|
21
|
-
option.telemetry.properties = {};
|
|
22
|
-
ctx.arguments.push(option.telemetry.properties);
|
|
23
|
-
}
|
|
24
|
-
telemetry_1.sendTelemetryEvent(option.telemetry.component, event, option.telemetry.properties);
|
|
25
|
-
}
|
|
26
|
-
await next();
|
|
27
|
-
if (option === null || option === void 0 ? void 0 : option.endFn) {
|
|
28
|
-
await (option === null || option === void 0 ? void 0 : option.endFn(ctx));
|
|
29
|
-
}
|
|
30
|
-
if (option === null || option === void 0 ? void 0 : option.telemetry) {
|
|
31
|
-
const event = option.telemetry.eventName
|
|
32
|
-
? option.telemetry.eventName
|
|
33
|
-
: lodash_1.kebabCase(ctx.method);
|
|
34
|
-
const result = ctx.result;
|
|
35
|
-
option.telemetry.properties[telemetry_1.TelemetryProperty.Success] = result.isOk()
|
|
36
|
-
? telemetry_1.TelemetrySuccess.Yes
|
|
37
|
-
: telemetry_1.TelemetrySuccess.No;
|
|
38
|
-
option.telemetry.properties[telemetry_1.TelemetryProperty.AppId] = globalVars_1.globalVars.teamsAppId || "";
|
|
39
|
-
result.isOk()
|
|
40
|
-
? telemetry_1.sendTelemetryEvent(option.telemetry.component, event, option.telemetry.properties)
|
|
41
|
-
: telemetry_1.sendTelemetryErrorEvent(option.telemetry.component, event, result.error, option.telemetry.properties);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
catch (e) {
|
|
45
|
-
const error = (option === null || option === void 0 ? void 0 : option.error) ? option.error : teamsfx_api_1.assembleError(e);
|
|
46
|
-
ctx.error = error;
|
|
47
|
-
if (option === null || option === void 0 ? void 0 : option.endFn) {
|
|
48
|
-
await (option === null || option === void 0 ? void 0 : option.endFn(ctx));
|
|
49
|
-
}
|
|
50
|
-
ctx.result = teamsfx_api_1.err(error);
|
|
51
|
-
if (option === null || option === void 0 ? void 0 : option.telemetry) {
|
|
52
|
-
const event = option.telemetry.eventName
|
|
53
|
-
? option.telemetry.eventName
|
|
54
|
-
: lodash_1.kebabCase(ctx.method);
|
|
55
|
-
option.telemetry.properties[telemetry_1.TelemetryProperty.Success] = telemetry_1.TelemetrySuccess.No;
|
|
56
|
-
option.telemetry.properties[telemetry_1.TelemetryProperty.AppId] = globalVars_1.globalVars.teamsAppId || "";
|
|
57
|
-
telemetry_1.sendTelemetryErrorEvent(option.telemetry.component, event, error, option.telemetry.properties);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
exports.CommonErrorHandlerMW = CommonErrorHandlerMW;
|
|
63
|
-
//# sourceMappingURL=CommonErrorHandlerMW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommonErrorHandlerMW.js","sourceRoot":"","sources":["../../../src/core/middleware/CommonErrorHandlerMW.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAGb,wDAA6E;AAC7E,mCAAmC;AACnC,sDAKgC;AAChC,8CAA2C;AAa3C,SAAgB,oBAAoB,CAAC,MAA0B;IAC7D,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,SAAS,CAAC,SAAS;oBAC5B,CAAC,CAAC,kBAAS,CAAC,GAAG,CAAC,MAAO,CAAC,CAAC;gBAC3B,MAAM,CAAC,SAAS,CAAC,UAAW,CAAC,6BAAiB,CAAC,OAAO,CAAC,GAAG,4BAAgB,CAAC,EAAE,CAAC;gBAC9E,MAAM,CAAC,SAAS,CAAC,UAAW,CAAC,6BAAiB,CAAC,KAAK,CAAC,GAAG,uBAAU,CAAC,UAAU,IAAI,EAAE,CAAC;gBACpF,mCAAuB,CACrB,MAAM,CAAC,SAAS,CAAC,SAAS,EAC1B,KAAK,EACL,KAAK,EACL,MAAM,CAAC,SAAS,CAAC,UAAU,CAC5B,CAAC;aACH;SACF;IACH,CAAC,CAAC;AACJ,CAAC;AA5DD,oDA4DC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aadManifestMigration.d.ts","sourceRoot":"","sources":["../../../src/core/middleware/aadManifestMigration.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAgB,MAAM,uBAAuB,CAAC;AA0BjE,eAAO,MAAM,sBAAsB,EAAE,UAapC,CAAC"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation.
|
|
3
|
-
// Licensed under the MIT license.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.AadManifestMigrationMW = void 0;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
-
const error_1 = require("../error");
|
|
9
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
10
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
11
|
-
const telemetry_1 = require("../../common/telemetry");
|
|
12
|
-
const globalVars_1 = require("../globalVars");
|
|
13
|
-
const localizeUtils_1 = require("../../common/localizeUtils");
|
|
14
|
-
const folder_1 = require("../../folder");
|
|
15
|
-
const projectSettingsLoader_1 = require("./projectSettingsLoader");
|
|
16
|
-
const projectMigrator_1 = require("./projectMigrator");
|
|
17
|
-
const consolidateLocalRemote_1 = require("./consolidateLocalRemote");
|
|
18
|
-
const os = tslib_1.__importStar(require("os"));
|
|
19
|
-
const MigrationUtils_1 = require("./utils/MigrationUtils");
|
|
20
|
-
const LearnMore = localizeUtils_1.getLocalizedString("core.option.learnMore");
|
|
21
|
-
const LearnMoreLink = "https://aka.ms/teamsfx-aad-manifest";
|
|
22
|
-
let userCancelFlag = false;
|
|
23
|
-
const backupFolder = ".backup";
|
|
24
|
-
const methods = new Set(["getProjectConfig", "checkPermission"]);
|
|
25
|
-
const upgradeReportName = "aad-manifest-change-logs.md";
|
|
26
|
-
const AadManifestMigrationMW = async (ctx, next) => {
|
|
27
|
-
if (await projectMigrator_1.needMigrateToArmAndMultiEnv(ctx)) {
|
|
28
|
-
await next();
|
|
29
|
-
}
|
|
30
|
-
else if (await consolidateLocalRemote_1.needConsolidateLocalRemote(ctx)) {
|
|
31
|
-
await next();
|
|
32
|
-
}
|
|
33
|
-
else if ((await MigrationUtils_1.needMigrateToAadManifest(ctx)) && checkMethod(ctx)) {
|
|
34
|
-
await upgrade(ctx, next);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
await next();
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
exports.AadManifestMigrationMW = AadManifestMigrationMW;
|
|
41
|
-
async function upgrade(ctx, next) {
|
|
42
|
-
try {
|
|
43
|
-
await migrate(ctx);
|
|
44
|
-
await next();
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
telemetry_1.sendTelemetryErrorEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectAadManifestMigrationError, teamsfx_api_1.assembleError(error, error_1.CoreSource));
|
|
48
|
-
throw error;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
async function migrate(ctx) {
|
|
52
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectAadManifestMigrationStart);
|
|
53
|
-
const inputs = ctx.arguments[ctx.arguments.length - 1];
|
|
54
|
-
const fileList = [];
|
|
55
|
-
const loadRes = await projectSettingsLoader_1.loadProjectSettings(inputs, true);
|
|
56
|
-
if (loadRes.isErr()) {
|
|
57
|
-
ctx.result = teamsfx_api_1.err(loadRes.error);
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
const projectSettings = loadRes.value;
|
|
61
|
-
const projectSettingsPath = path_1.default.join(inputs.projectPath, ".fx", "configs", "projectSettings.json");
|
|
62
|
-
try {
|
|
63
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectAadManifestMigrationAddAADTemplateStart);
|
|
64
|
-
const projectSettingsJsonOld = await fs_extra_1.default.readJson(projectSettingsPath);
|
|
65
|
-
// make sure this function use upgraded version of projectsettings for V3
|
|
66
|
-
await MigrationUtils_1.generateAadManifest(inputs.projectPath, projectSettings);
|
|
67
|
-
const aadManifestPath = path_1.default.join(inputs.projectPath, "templates", "appPackage", "aad.template.json");
|
|
68
|
-
fileList.push(aadManifestPath);
|
|
69
|
-
await fs_extra_1.default.writeJSON(projectSettingsPath, projectSettings, { spaces: 4, EOL: os.EOL });
|
|
70
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectAadManifestMigrationAddAADTemplate);
|
|
71
|
-
// backup
|
|
72
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectAadManifestMigrationBackupStart);
|
|
73
|
-
const backupPath = path_1.default.join(inputs.projectPath, backupFolder);
|
|
74
|
-
await fs_extra_1.default.ensureDir(path_1.default.join(backupPath, ".fx", "configs"));
|
|
75
|
-
await fs_extra_1.default.writeJSON(path_1.default.join(backupPath, ".fx", "configs", "projectSettings.json"), projectSettingsJsonOld, { spaces: 4, EOL: os.EOL });
|
|
76
|
-
fileList.push(path_1.default.join(backupPath, ".fx", "configs", "projectSettings.json"));
|
|
77
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectAadManifestMigrationBackup);
|
|
78
|
-
}
|
|
79
|
-
catch (e) {
|
|
80
|
-
for (const item of fileList) {
|
|
81
|
-
await fs_extra_1.default.remove(item);
|
|
82
|
-
}
|
|
83
|
-
await fs_extra_1.default.writeJSON(projectSettingsPath, projectSettings, { spaces: 4, EOL: os.EOL });
|
|
84
|
-
throw e;
|
|
85
|
-
}
|
|
86
|
-
postMigration(inputs);
|
|
87
|
-
generateUpgradeReport(path_1.default.join(inputs.projectPath, backupFolder));
|
|
88
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectAadManifestMigration);
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
function checkMethod(ctx) {
|
|
92
|
-
if (ctx.method && methods.has(ctx.method) && userCancelFlag)
|
|
93
|
-
return false;
|
|
94
|
-
userCancelFlag = ctx.method != undefined && methods.has(ctx.method);
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
async function postMigration(inputs) {
|
|
98
|
-
if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
|
|
99
|
-
const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("info", localizeUtils_1.getLocalizedString("core.aadManifestMigration.outputMsg"), false, "OK", LearnMore));
|
|
100
|
-
const answer = (res === null || res === void 0 ? void 0 : res.isOk()) ? res.value : undefined;
|
|
101
|
-
if (answer === LearnMore) {
|
|
102
|
-
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.openUrl(LearnMoreLink);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.logProvider.info(localizeUtils_1.getLocalizedString("core.aadManifestMigration.SuccessMessage", LearnMoreLink));
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
async function generateUpgradeReport(backupFolder) {
|
|
110
|
-
try {
|
|
111
|
-
const target = path_1.default.join(backupFolder, upgradeReportName);
|
|
112
|
-
const source = path_1.default.resolve(path_1.default.join(folder_1.getResourceFolder(), upgradeReportName));
|
|
113
|
-
await fs_extra_1.default.copyFile(source, target);
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
116
|
-
// do nothing
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
//# sourceMappingURL=aadManifestMigration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aadManifestMigration.js","sourceRoot":"","sources":["../../../src/core/middleware/aadManifestMigration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAA8E;AAC9E,oCAAsC;AAEtC,gEAA0B;AAC1B,wDAAwB;AACxB,sDAKgC;AAEhC,8CAAsC;AACtC,8DAAgE;AAChE,yCAAiD;AACjD,mEAA8D;AAC9D,uDAAgE;AAChE,qEAAsE;AACtE,+CAAyB;AACzB,2DAAuF;AAEvF,MAAM,SAAS,GAAG,kCAAkB,CAAC,uBAAuB,CAAC,CAAC;AAC9D,MAAM,aAAa,GAAG,qCAAqC,CAAC;AAC5D,IAAI,cAAc,GAAG,KAAK,CAAC;AAC3B,MAAM,YAAY,GAAG,SAAS,CAAC;AAC/B,MAAM,OAAO,GAAgB,IAAI,GAAG,CAAC,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAC9E,MAAM,iBAAiB,GAAG,6BAA6B,CAAC;AAEjD,MAAM,sBAAsB,GAAe,KAAK,EACrD,GAAoB,EACpB,IAAkB,EAClB,EAAE;IACF,IAAI,MAAM,6CAA2B,CAAC,GAAG,CAAC,EAAE;QAC1C,MAAM,IAAI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CACrC,MAAM,EACN,kCAAkB,CAAC,qCAAqC,CAAC,EACzD,KAAK,EACL,IAAI,EACJ,SAAS,CACV,CAAA,CAAC;QACF,MAAM,MAAM,GAAG,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,EAAE,EAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QACnD,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,kBAAK,aAAL,kBAAK,uBAAL,kBAAK,CAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;SAClC;KACF;SAAM;QACL,kBAAK,aAAL,kBAAK,uBAAL,kBAAK,CAAE,WAAW,CAAC,IAAI,CACrB,kCAAkB,CAAC,0CAA0C,EAAE,aAAa,CAAC,CAC9E,CAAC;KACH;AACH,CAAC;AAED,KAAK,UAAU,qBAAqB,CAAC,YAAoB;IACvD,IAAI;QACF,MAAM,MAAM,GAAG,cAAI,CAAC,IAAI,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;QAC1D,MAAM,MAAM,GAAG,cAAI,CAAC,OAAO,CAAC,cAAI,CAAC,IAAI,CAAC,0BAAiB,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC;QAC/E,MAAM,kBAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACnC;IAAC,OAAO,KAAK,EAAE;QACd,aAAa;KACd;AACH,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Middleware } from "@feathersjs/hooks/lib";
|
|
2
|
-
import { CoreHookContext } from "../types";
|
|
3
|
-
export declare const ProjectConsolidateMW: Middleware;
|
|
4
|
-
export declare function needConsolidateLocalRemote(ctx: CoreHookContext): Promise<boolean>;
|
|
5
|
-
//# sourceMappingURL=consolidateLocalRemote.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consolidateLocalRemote.d.ts","sourceRoot":"","sources":["../../../src/core/middleware/consolidateLocalRemote.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,UAAU,EAAgB,MAAM,uBAAuB,CAAC;AAajE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA+B3C,eAAO,MAAM,oBAAoB,EAAE,UAwBlC,CAAC;AAoDF,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAiBvF"}
|
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation.
|
|
3
|
-
// Licensed under the MIT license.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.needConsolidateLocalRemote = exports.ProjectConsolidateMW = void 0;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
-
const tools_1 = require("../../common/tools");
|
|
9
|
-
const environment_1 = require("../environment");
|
|
10
|
-
const error_1 = require("../error");
|
|
11
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
12
|
-
const os = tslib_1.__importStar(require("os"));
|
|
13
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
14
|
-
const utils_1 = require("../../component/resource/appManifest/utils/utils");
|
|
15
|
-
const telemetry_1 = require("../../common/telemetry");
|
|
16
|
-
const globalVars_1 = require("../globalVars");
|
|
17
|
-
const localizeUtils_1 = require("../../common/localizeUtils");
|
|
18
|
-
const folder_1 = require("../../folder");
|
|
19
|
-
const projectSettingsLoader_1 = require("./projectSettingsLoader");
|
|
20
|
-
const projectMigrator_1 = require("./projectMigrator");
|
|
21
|
-
const util = tslib_1.__importStar(require("util"));
|
|
22
|
-
const constants_1 = require("../../component/resource/spfx/utils/constants");
|
|
23
|
-
const MigrationUtils_1 = require("./utils/MigrationUtils");
|
|
24
|
-
const ManifestUtils_1 = require("../../component/resource/appManifest/utils/ManifestUtils");
|
|
25
|
-
const upgradeButton = localizeUtils_1.getLocalizedString("core.option.upgrade");
|
|
26
|
-
const LearnMore = localizeUtils_1.getLocalizedString("core.option.learnMore");
|
|
27
|
-
const LearnMoreLinkWithAADManifest = "https://aka.ms/teamsfx-unify-config-and-aad-manifest-guide";
|
|
28
|
-
const UnifyManifestLearMoreLink = "https://aka.ms/teamsfx-unify-local-remote-manifest-guide";
|
|
29
|
-
let userCancelFlag = false;
|
|
30
|
-
const backupFolder = ".backup";
|
|
31
|
-
const methods = new Set(["getProjectConfig", "checkPermission"]);
|
|
32
|
-
const upgradeWithAadManifestReportName = "unify-config-and-aad-manifest-change-logs.md";
|
|
33
|
-
const componentIdRegex = /(?<=componentId=)([a-z0-9-]*)(?=%26)/;
|
|
34
|
-
const manifestRegex = /{{{.*}}}|{{.*}}|{.*}/g;
|
|
35
|
-
const ignoreKeys = new Set([
|
|
36
|
-
"name",
|
|
37
|
-
"contentUrl",
|
|
38
|
-
"configurationUrl",
|
|
39
|
-
"manifestVersion",
|
|
40
|
-
"$schema",
|
|
41
|
-
"description",
|
|
42
|
-
]);
|
|
43
|
-
let needMigrateAadManifest = false;
|
|
44
|
-
const ProjectConsolidateMW = async (ctx, next) => {
|
|
45
|
-
if (await projectMigrator_1.needMigrateToArmAndMultiEnv(ctx)) {
|
|
46
|
-
next();
|
|
47
|
-
}
|
|
48
|
-
else if ((await needConsolidateLocalRemote(ctx)) && checkMethod(ctx)) {
|
|
49
|
-
needMigrateAadManifest = await MigrationUtils_1.needMigrateToAadManifest(ctx);
|
|
50
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateNotificationStart, {
|
|
51
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
52
|
-
});
|
|
53
|
-
let showModal = true;
|
|
54
|
-
if (ctx.method && methods.has(ctx.method)) {
|
|
55
|
-
showModal = false;
|
|
56
|
-
}
|
|
57
|
-
if (showModal) {
|
|
58
|
-
await upgrade(ctx, next, true);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
upgrade(ctx, next, false);
|
|
62
|
-
await next();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
await next();
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
exports.ProjectConsolidateMW = ProjectConsolidateMW;
|
|
70
|
-
async function upgrade(ctx, next, showModal) {
|
|
71
|
-
let answer = undefined;
|
|
72
|
-
do {
|
|
73
|
-
const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("warn", needMigrateAadManifest
|
|
74
|
-
? localizeUtils_1.getLocalizedString("core.consolidateLocalRemoteWithAadManifest.Message")
|
|
75
|
-
: localizeUtils_1.getLocalizedString("core.consolidateLocalRemote.Message"), showModal, upgradeButton, LearnMore));
|
|
76
|
-
answer = (res === null || res === void 0 ? void 0 : res.isOk()) ? res.value : undefined;
|
|
77
|
-
if (answer === LearnMore) {
|
|
78
|
-
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.openUrl(LearnMoreLinkWithAADManifest);
|
|
79
|
-
}
|
|
80
|
-
} while (answer === LearnMore);
|
|
81
|
-
if (!answer || answer != upgradeButton) {
|
|
82
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateNotification, {
|
|
83
|
-
[telemetry_1.TelemetryProperty.Status]: telemetry_1.ProjectMigratorStatus.Cancel,
|
|
84
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
85
|
-
});
|
|
86
|
-
ctx.result = teamsfx_api_1.err(error_1.ConsolidateCanceledError());
|
|
87
|
-
outputCancelMessage(ctx);
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateNotification, {
|
|
91
|
-
[telemetry_1.TelemetryProperty.Status]: telemetry_1.ProjectMigratorStatus.OK,
|
|
92
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
93
|
-
});
|
|
94
|
-
try {
|
|
95
|
-
await consolidateLocalRemote(ctx);
|
|
96
|
-
if (showModal) {
|
|
97
|
-
await next();
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
telemetry_1.sendTelemetryErrorEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateError, teamsfx_api_1.assembleError(error, error_1.CoreSource), {
|
|
102
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
103
|
-
});
|
|
104
|
-
throw error;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
// check if manifest.template.json exist
|
|
108
|
-
async function needConsolidateLocalRemote(ctx) {
|
|
109
|
-
const lastArg = ctx.arguments[ctx.arguments.length - 1];
|
|
110
|
-
const inputs = lastArg === ctx ? ctx.arguments[ctx.arguments.length - 2] : lastArg;
|
|
111
|
-
if (!inputs.projectPath) {
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
const fxExist = await fs_extra_1.default.pathExists(path_1.default.join(inputs.projectPath, ".fx"));
|
|
115
|
-
if (!fxExist) {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
const appDir = await tools_1.getAppDirectory(inputs.projectPath);
|
|
119
|
-
const consolidateManifestExist = await fs_extra_1.default.pathExists(path_1.default.join(appDir, "manifest.template.json"));
|
|
120
|
-
if (!consolidateManifestExist) {
|
|
121
|
-
return true;
|
|
122
|
-
}
|
|
123
|
-
return false;
|
|
124
|
-
}
|
|
125
|
-
exports.needConsolidateLocalRemote = needConsolidateLocalRemote;
|
|
126
|
-
function outputCancelMessage(ctx) {
|
|
127
|
-
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.logProvider.warning(`[core] Upgrade cancelled.`);
|
|
128
|
-
const lastArg = ctx.arguments[ctx.arguments.length - 1];
|
|
129
|
-
const inputs = lastArg === ctx ? ctx.arguments[ctx.arguments.length - 2] : lastArg;
|
|
130
|
-
if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
|
|
131
|
-
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.logProvider.warning(`[core] Notice upgrade to new configuration files is a must-have to continue to use current version Teams Toolkit. If you are not ready to upgrade and want to continue to use the old version Teams Toolkit, please find Teams Toolkit in Extension and install the version <= 3.7.0`);
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.logProvider.warning(`[core] Notice upgrade to new configuration files is a must-have to continue to use current version Teams Toolkit CLI. If you want to upgrade, please trigger this command again.`);
|
|
135
|
-
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.logProvider.warning(`[core] If you are not ready to upgrade and want to continue to use the old version Teams Toolkit CLI, please install the version <= 3.7.0`);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
async function consolidateLocalRemote(ctx) {
|
|
139
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateUpgradeStart, {
|
|
140
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
141
|
-
});
|
|
142
|
-
const lastArg = ctx.arguments[ctx.arguments.length - 1];
|
|
143
|
-
const inputs = lastArg === ctx ? ctx.arguments[ctx.arguments.length - 2] : lastArg;
|
|
144
|
-
const fileList = [];
|
|
145
|
-
const removeMap = new Map();
|
|
146
|
-
const loadRes = await projectSettingsLoader_1.loadProjectSettings(inputs, true);
|
|
147
|
-
if (loadRes.isErr()) {
|
|
148
|
-
ctx.result = teamsfx_api_1.err(loadRes.error);
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
151
|
-
const projectSettings = loadRes.value;
|
|
152
|
-
const projectSettingsPath = path_1.default.join(inputs.projectPath, ".fx", "configs", "projectSettings.json");
|
|
153
|
-
try {
|
|
154
|
-
// add local environment
|
|
155
|
-
const appName = utils_1.getLocalAppName(projectSettings.appName);
|
|
156
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateAddLocalEnvStart, {
|
|
157
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
158
|
-
});
|
|
159
|
-
const newEnvConfig = environment_1.environmentManager.newEnvConfigData(appName);
|
|
160
|
-
const writeEnvResult = await environment_1.environmentManager.writeEnvConfig(inputs.projectPath, newEnvConfig, environment_1.environmentManager.getLocalEnvName());
|
|
161
|
-
if (writeEnvResult.isErr()) {
|
|
162
|
-
throw teamsfx_api_1.err(writeEnvResult.error);
|
|
163
|
-
}
|
|
164
|
-
fileList.push(path_1.default.join(inputs.projectPath, ".fx", "configs", "env.local.json"));
|
|
165
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateAddLocalEnv, {
|
|
166
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
167
|
-
});
|
|
168
|
-
// add consolidate manifest
|
|
169
|
-
let manifest;
|
|
170
|
-
const remoteManifestFile = path_1.default.join(inputs.projectPath, "templates", "appPackage", "manifest.remote.template.json");
|
|
171
|
-
const remoteManifestExist = await fs_extra_1.default.pathExists(remoteManifestFile);
|
|
172
|
-
if (remoteManifestExist) {
|
|
173
|
-
if (tools_1.isSPFxProject(projectSettings)) {
|
|
174
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateAddSPFXManifestStart);
|
|
175
|
-
const manifestTemplatePath = await ManifestUtils_1.getManifestTemplatePath(inputs.projectPath);
|
|
176
|
-
const manifestString = (await fs_extra_1.default.readFile(remoteManifestFile)).toString();
|
|
177
|
-
manifest = JSON.parse(manifestString);
|
|
178
|
-
let componentId = "";
|
|
179
|
-
if ((manifest === null || manifest === void 0 ? void 0 : manifest.staticTabs) && manifest.staticTabs.length > 0) {
|
|
180
|
-
manifest.staticTabs.forEach((item) => {
|
|
181
|
-
componentId = item.entityId;
|
|
182
|
-
if ((item.contentUrl && componentId === undefined) || componentId === "") {
|
|
183
|
-
componentId = replaceSPFxComponentId(item.contentUrl);
|
|
184
|
-
}
|
|
185
|
-
const contentUrl = util.format(constants_1.ManifestTemplate.REMOTE_CONTENT_URL, componentId, componentId);
|
|
186
|
-
item.contentUrl = contentUrl;
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
if ((manifest === null || manifest === void 0 ? void 0 : manifest.configurableTabs) && manifest.configurableTabs.length > 0) {
|
|
190
|
-
manifest.configurableTabs.forEach((item) => {
|
|
191
|
-
if ((item.configurationUrl && componentId === undefined) || componentId === "") {
|
|
192
|
-
componentId = replaceSPFxComponentId(item.configurationUrl);
|
|
193
|
-
}
|
|
194
|
-
const configurationUrl = util.format(constants_1.ManifestTemplate.REMOTE_CONFIGURATION_URL, componentId, componentId);
|
|
195
|
-
item.configurationUrl = configurationUrl;
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
await fs_extra_1.default.writeFile(manifestTemplatePath, JSON.stringify(manifest, null, 4));
|
|
199
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateAddSPFXManifest);
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateCopyAzureManifestStart, {
|
|
203
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
204
|
-
});
|
|
205
|
-
const manifestTemplatePath = await ManifestUtils_1.getManifestTemplatePath(inputs.projectPath);
|
|
206
|
-
await fs_extra_1.default.copyFile(remoteManifestFile, manifestTemplatePath);
|
|
207
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateCopyAzureManifest, {
|
|
208
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
fileList.push(path_1.default.join(inputs.projectPath, "templates", "appPackage", "template.manifest.json"));
|
|
213
|
-
// copy and remove old configs
|
|
214
|
-
const backupPath = path_1.default.join(inputs.projectPath, backupFolder);
|
|
215
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateBackupConfigStart, {
|
|
216
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
217
|
-
});
|
|
218
|
-
const localSettingsFile = path_1.default.join(inputs.projectPath, ".fx", "configs", "localSettings.json");
|
|
219
|
-
let moveFiles = "";
|
|
220
|
-
if (await fs_extra_1.default.pathExists(localSettingsFile)) {
|
|
221
|
-
await fs_extra_1.default.copy(localSettingsFile, path_1.default.join(backupPath, ".fx", "configs", "localSettings.json"), { overwrite: true });
|
|
222
|
-
await fs_extra_1.default.remove(localSettingsFile);
|
|
223
|
-
moveFiles += "localSettings.json,";
|
|
224
|
-
removeMap.set(path_1.default.join(backupPath, ".fx", "configs", "localSettings.json"), localSettingsFile);
|
|
225
|
-
}
|
|
226
|
-
const localManifestFile = path_1.default.join(inputs.projectPath, "templates", "appPackage", "manifest.local.template.json");
|
|
227
|
-
if ((await fs_extra_1.default.pathExists(localManifestFile)) && (await fs_extra_1.default.pathExists(remoteManifestFile))) {
|
|
228
|
-
await compareLocalAndRemoteManifest(localManifestFile, remoteManifestFile);
|
|
229
|
-
}
|
|
230
|
-
if (await fs_extra_1.default.pathExists(localManifestFile)) {
|
|
231
|
-
await fs_extra_1.default.copy(localManifestFile, path_1.default.join(backupPath, "templates", "appPackage", "manifest.local.template.json"), { overwrite: true });
|
|
232
|
-
await fs_extra_1.default.remove(localManifestFile);
|
|
233
|
-
moveFiles += "manifest.local.template.json,";
|
|
234
|
-
removeMap.set(path_1.default.join(backupPath, "templates", "appPackage", "manifest.local.template.json"), localManifestFile);
|
|
235
|
-
}
|
|
236
|
-
if (await fs_extra_1.default.pathExists(remoteManifestFile)) {
|
|
237
|
-
await fs_extra_1.default.copy(remoteManifestFile, path_1.default.join(backupPath, "templates", "appPackage", "manifest.remote.template.json"), { overwrite: true });
|
|
238
|
-
await fs_extra_1.default.remove(remoteManifestFile);
|
|
239
|
-
moveFiles += "manifest.remote.template.json,";
|
|
240
|
-
removeMap.set(path_1.default.join(backupPath, "templates", "appPackage", "manifest.remote.template.json"), remoteManifestFile);
|
|
241
|
-
}
|
|
242
|
-
if (needMigrateAadManifest) {
|
|
243
|
-
await MigrationUtils_1.generateAadManifest(inputs.projectPath, projectSettings);
|
|
244
|
-
const aadManifestPath = path_1.default.join(inputs.projectPath, "templates", "appPackage", "aad.template.json");
|
|
245
|
-
fileList.push(aadManifestPath);
|
|
246
|
-
await fs_extra_1.default.writeJSON(projectSettingsPath, projectSettings, { spaces: 4, EOL: os.EOL });
|
|
247
|
-
moveFiles += "projectSettings.json,";
|
|
248
|
-
await fs_extra_1.default.ensureDir(path_1.default.join(backupPath, ".fx", "configs"));
|
|
249
|
-
await fs_extra_1.default.writeJSON(path_1.default.join(backupPath, ".fx", "configs", "projectSettings.json"), projectSettings, { spaces: 4, EOL: os.EOL });
|
|
250
|
-
removeMap.set(path_1.default.join(backupPath, ".fx", "configs", "projectSettings.json"), projectSettingsPath);
|
|
251
|
-
}
|
|
252
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateBackupConfig, {
|
|
253
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
254
|
-
});
|
|
255
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateUpgrade, {
|
|
256
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
257
|
-
});
|
|
258
|
-
postConsolidate(inputs.projectPath, ctx, inputs, backupFolder, moveFiles);
|
|
259
|
-
}
|
|
260
|
-
catch (e) {
|
|
261
|
-
for (const item of removeMap.entries()) {
|
|
262
|
-
await fs_extra_1.default.copy(item[0], item[1]);
|
|
263
|
-
}
|
|
264
|
-
for (const item of fileList) {
|
|
265
|
-
await fs_extra_1.default.remove(item);
|
|
266
|
-
}
|
|
267
|
-
await fs_extra_1.default.remove(path_1.default.join(inputs.projectPath, backupFolder));
|
|
268
|
-
throw e;
|
|
269
|
-
}
|
|
270
|
-
generateUpgradeReport(path_1.default.join(inputs.projectPath, backupFolder));
|
|
271
|
-
return true;
|
|
272
|
-
}
|
|
273
|
-
function checkMethod(ctx) {
|
|
274
|
-
if (ctx.method && methods.has(ctx.method) && userCancelFlag)
|
|
275
|
-
return false;
|
|
276
|
-
userCancelFlag = ctx.method != undefined && methods.has(ctx.method);
|
|
277
|
-
return true;
|
|
278
|
-
}
|
|
279
|
-
async function postConsolidate(projectPath, ctx, inputs, backupFolder, moveFiles) {
|
|
280
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateGuideStart, {
|
|
281
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
282
|
-
});
|
|
283
|
-
await updateGitIgnore(projectPath, globalVars_1.TOOLS.logProvider, backupFolder);
|
|
284
|
-
if (moveFiles.length > 0) {
|
|
285
|
-
moveFiles = moveFiles.substring(0, moveFiles.length - 1);
|
|
286
|
-
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.logProvider.warning(`[core] Upgrade success! Old ${moveFiles} have been backed up to the .backup folder and you can delete it.`);
|
|
287
|
-
}
|
|
288
|
-
if (inputs.platform !== teamsfx_api_1.Platform.VSCode) {
|
|
289
|
-
const msg = needMigrateAadManifest
|
|
290
|
-
? localizeUtils_1.getLocalizedString("core.consolidateLocalRemoteWithAadManifest.SuccessMessage")
|
|
291
|
-
: localizeUtils_1.getLocalizedString("core.consolidateLocalRemote.SuccessMessage");
|
|
292
|
-
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.logProvider.info(msg);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
async function updateGitIgnore(projectPath, log, backupFolder) {
|
|
296
|
-
// add config.local.json to .gitignore
|
|
297
|
-
await projectMigrator_1.addPathToGitignore(projectPath, `${projectPath}/.${teamsfx_api_1.ConfigFolderName}/${teamsfx_api_1.InputConfigsFolderName}/config.local.json`, log);
|
|
298
|
-
// add state.local.json to .gitignore
|
|
299
|
-
await projectMigrator_1.addPathToGitignore(projectPath, `${projectPath}/.${teamsfx_api_1.ConfigFolderName}/${teamsfx_api_1.StatesFolderName}/state.local.json`, log);
|
|
300
|
-
if (backupFolder) {
|
|
301
|
-
await projectMigrator_1.addPathToGitignore(projectPath, `${projectPath}/${backupFolder}`, log);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
async function generateUpgradeReport(backupFolder) {
|
|
305
|
-
try {
|
|
306
|
-
const reportName = upgradeWithAadManifestReportName;
|
|
307
|
-
const target = path_1.default.join(backupFolder, reportName);
|
|
308
|
-
const source = path_1.default.resolve(path_1.default.join(folder_1.getResourceFolder(), reportName));
|
|
309
|
-
await fs_extra_1.default.copyFile(source, target);
|
|
310
|
-
}
|
|
311
|
-
catch (error) {
|
|
312
|
-
// do nothing
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
function replaceSPFxComponentId(content) {
|
|
316
|
-
const match = componentIdRegex.exec(content);
|
|
317
|
-
if (match) {
|
|
318
|
-
return match[0];
|
|
319
|
-
}
|
|
320
|
-
return "";
|
|
321
|
-
}
|
|
322
|
-
async function compareLocalAndRemoteManifest(localManifestFile, remoteManifestFile) {
|
|
323
|
-
try {
|
|
324
|
-
const localManifestString = (await fs_extra_1.default.readFile(localManifestFile))
|
|
325
|
-
.toString()
|
|
326
|
-
.replace(manifestRegex, "");
|
|
327
|
-
const remoteManifestString = (await fs_extra_1.default.readFile(remoteManifestFile))
|
|
328
|
-
.toString()
|
|
329
|
-
.replace(manifestRegex, "");
|
|
330
|
-
const localManifestJson = JSON.parse(localManifestString);
|
|
331
|
-
const remoteManifestJson = JSON.parse(remoteManifestString);
|
|
332
|
-
if (!diff(localManifestJson, remoteManifestJson)) {
|
|
333
|
-
notifyToUpdateManifest();
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
catch (error) {
|
|
337
|
-
telemetry_1.sendTelemetryErrorEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectConsolidateCheckManifestError, teamsfx_api_1.assembleError(error, error_1.CoreSource), {
|
|
338
|
-
[telemetry_1.TelemetryProperty.NeedMigrateAadManifest]: needMigrateAadManifest ? "true" : "false",
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
async function notifyToUpdateManifest() {
|
|
343
|
-
const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("warn", localizeUtils_1.getLocalizedString("core.consolidateLocalRemote.DifferentManifest"), false, "OK", LearnMore));
|
|
344
|
-
const answer = (res === null || res === void 0 ? void 0 : res.isOk()) ? res.value : undefined;
|
|
345
|
-
if (answer === LearnMore) {
|
|
346
|
-
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.openUrl(UnifyManifestLearMoreLink);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
function diff(a, b) {
|
|
350
|
-
const keys = Object.keys(a);
|
|
351
|
-
const bKeys = Object.keys(b);
|
|
352
|
-
if (keys.length != bKeys.length) {
|
|
353
|
-
return false;
|
|
354
|
-
}
|
|
355
|
-
let aValue, bValue, key;
|
|
356
|
-
for (key of keys) {
|
|
357
|
-
if (ignoreKeys.has(key)) {
|
|
358
|
-
continue;
|
|
359
|
-
}
|
|
360
|
-
aValue = a[key];
|
|
361
|
-
bValue = b[key];
|
|
362
|
-
if (isObject(aValue) && isObject(bValue)) {
|
|
363
|
-
if (!diff(aValue, bValue)) {
|
|
364
|
-
return false;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
if (aValue !== bValue) {
|
|
369
|
-
return false;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
return true;
|
|
374
|
-
}
|
|
375
|
-
function isObject(o) {
|
|
376
|
-
return typeof o === "object" && !!o;
|
|
377
|
-
}
|
|
378
|
-
//# sourceMappingURL=consolidateLocalRemote.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consolidateLocalRemote.js","sourceRoot":"","sources":["../../../src/core/middleware/consolidateLocalRemote.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAUgC;AAChC,8CAAoE;AACpE,gDAAoD;AACpD,oCAAgE;AAEhE,gEAA0B;AAC1B,+CAAyB;AACzB,wDAAwB;AACxB,4EAAmF;AACnF,sDAOgC;AAEhC,8CAAsC;AACtC,8DAAgE;AAChE,yCAAiD;AACjD,mEAA8D;AAC9D,uDAAoF;AACpF,mDAA6B;AAC7B,6EAAiF;AACjF,2DAAuF;AACvF,4FAAmG;AAEnG,M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