@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
package/build/component/core.js
DELETED
|
@@ -1,653 +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.getBotTroubleShootMessage = exports.preCheck = exports.TeamsfxCore = void 0;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
9
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
10
|
-
require("reflect-metadata");
|
|
11
|
-
const typedi_1 = require("typedi");
|
|
12
|
-
const question_1 = require("../core/question");
|
|
13
|
-
const projectSettingsHelper_1 = require("./../common/projectSettingsHelper");
|
|
14
|
-
require("./bicep");
|
|
15
|
-
require("./code/api/apiCode");
|
|
16
|
-
require("./code/botCode");
|
|
17
|
-
require("./code/spfxTabCode");
|
|
18
|
-
require("./code/tab/tabCode");
|
|
19
|
-
require("./connection/apimConfig");
|
|
20
|
-
require("./connection/azureFunctionConfig");
|
|
21
|
-
require("./connection/azureWebAppConfig");
|
|
22
|
-
const debug_1 = require("./debug");
|
|
23
|
-
const envManager_1 = require("./envManager");
|
|
24
|
-
require("./feature/api/api");
|
|
25
|
-
require("./feature/apiconnector/apiConnector");
|
|
26
|
-
require("./feature/apim");
|
|
27
|
-
require("./feature/bot/bot");
|
|
28
|
-
require("./feature/cicd/cicd");
|
|
29
|
-
require("./feature/keyVault");
|
|
30
|
-
require("./feature/spfx");
|
|
31
|
-
require("./feature/sql");
|
|
32
|
-
require("./feature/sso");
|
|
33
|
-
require("./feature/tab");
|
|
34
|
-
require("./resource/apim/apim");
|
|
35
|
-
require("./resource/azureAppService/azureFunction");
|
|
36
|
-
require("./resource/azureAppService/azureWebApp");
|
|
37
|
-
require("./resource/azureSql");
|
|
38
|
-
require("./resource/azureStorage/azureStorage");
|
|
39
|
-
require("./resource/botService/botService");
|
|
40
|
-
require("./resource/keyVault");
|
|
41
|
-
require("./resource/spfx");
|
|
42
|
-
require("./resource/aadApp/aadApp");
|
|
43
|
-
require("./resource/simpleAuth");
|
|
44
|
-
const jsonschema = tslib_1.__importStar(require("jsonschema"));
|
|
45
|
-
const lodash_1 = require("lodash");
|
|
46
|
-
const constants_1 = require("../common/constants");
|
|
47
|
-
const globalState_1 = require("../common/globalState");
|
|
48
|
-
const localizeUtils_1 = require("../common/localizeUtils");
|
|
49
|
-
const projectSettingsHelperV3_1 = require("../common/projectSettingsHelperV3");
|
|
50
|
-
const tools_1 = require("../common/tools");
|
|
51
|
-
const downloadSample_1 = require("../core/downloadSample");
|
|
52
|
-
const error_1 = require("../core/error");
|
|
53
|
-
const globalVars_1 = require("../core/globalVars");
|
|
54
|
-
const arm_1 = tslib_1.__importDefault(require("./arm"));
|
|
55
|
-
const constants_2 = require("./constants");
|
|
56
|
-
const constants_3 = require("./constants");
|
|
57
|
-
const migrate_1 = require("./migrate");
|
|
58
|
-
const question_2 = require("./question");
|
|
59
|
-
const lib_1 = require("@feathersjs/hooks/lib");
|
|
60
|
-
const actionExecutionMW_1 = require("./middleware/actionExecutionMW");
|
|
61
|
-
const telemetry_1 = require("../common/telemetry");
|
|
62
|
-
const workflow_1 = require("./workflow");
|
|
63
|
-
const environment_1 = require("../core/environment");
|
|
64
|
-
const deployUtils_1 = require("./deployUtils");
|
|
65
|
-
const provisionUtils_1 = require("./provisionUtils");
|
|
66
|
-
const folder_1 = require("../folder");
|
|
67
|
-
const FxCore_1 = require("../core/FxCore");
|
|
68
|
-
const constants_4 = require("./constants");
|
|
69
|
-
const questionModel_1 = require("../core/middleware/questionModel");
|
|
70
|
-
const constants_5 = require("./resource/aadApp/constants");
|
|
71
|
-
const executor_1 = require("./utils/executor");
|
|
72
|
-
const projectSettingsLoader_1 = require("../core/middleware/projectSettingsLoader");
|
|
73
|
-
let TeamsfxCore = class TeamsfxCore {
|
|
74
|
-
constructor() {
|
|
75
|
-
this.name = "fx";
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* create project
|
|
79
|
-
*/
|
|
80
|
-
async create(context, inputs, actionContext) {
|
|
81
|
-
const folder = inputs["folder"];
|
|
82
|
-
if (!folder) {
|
|
83
|
-
return teamsfx_api_1.err(error_1.InvalidInputError("folder is undefined"));
|
|
84
|
-
}
|
|
85
|
-
inputs.folder = folder;
|
|
86
|
-
const scratch = inputs[question_1.CoreQuestionNames.CreateFromScratch];
|
|
87
|
-
let projectPath;
|
|
88
|
-
const automaticNpmInstall = "automaticNpmInstall";
|
|
89
|
-
if (scratch === question_1.ScratchOptionNo().id) {
|
|
90
|
-
// create from sample
|
|
91
|
-
const downloadRes = await downloadSample_1.downloadSample(inputs, undefined, context);
|
|
92
|
-
if (downloadRes.isErr()) {
|
|
93
|
-
return teamsfx_api_1.err(downloadRes.error);
|
|
94
|
-
}
|
|
95
|
-
projectPath = downloadRes.value;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
// create from new
|
|
99
|
-
const appName = inputs[question_1.CoreQuestionNames.AppName];
|
|
100
|
-
if (undefined === appName)
|
|
101
|
-
return teamsfx_api_1.err(error_1.InvalidInputError(`App Name is empty`, inputs));
|
|
102
|
-
const validateResult = jsonschema.validate(appName, {
|
|
103
|
-
pattern: question_1.ProjectNamePattern,
|
|
104
|
-
});
|
|
105
|
-
if (validateResult.errors && validateResult.errors.length > 0) {
|
|
106
|
-
return teamsfx_api_1.err(error_1.InvalidInputError(`${validateResult.errors[0].message}`, inputs));
|
|
107
|
-
}
|
|
108
|
-
projectPath = path_1.default.join(folder, appName);
|
|
109
|
-
inputs.projectPath = projectPath;
|
|
110
|
-
// set isVS global var when creating project
|
|
111
|
-
globalVars_1.globalVars.isVS = inputs[question_1.CoreQuestionNames.ProgrammingLanguage] === "csharp";
|
|
112
|
-
const features = inputs.capabilities;
|
|
113
|
-
const isInitExistingApp = features === constants_2.ExistingTabOptionItem().id;
|
|
114
|
-
if (isInitExistingApp) {
|
|
115
|
-
const folderExist = await fs_extra_1.default.pathExists(projectPath);
|
|
116
|
-
if (folderExist) {
|
|
117
|
-
return teamsfx_api_1.err(new error_1.ProjectFolderExistError(projectPath));
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
const isValid = projectSettingsHelper_1.isValidProject(projectPath);
|
|
122
|
-
if (isValid) {
|
|
123
|
-
return teamsfx_api_1.err(new error_1.OperationNotPermittedError("initialize a project in existing teamsfx project"));
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
const initRes = await this.init(context, inputs, isInitExistingApp);
|
|
127
|
-
if (initRes.isErr())
|
|
128
|
-
return teamsfx_api_1.err(initRes.error);
|
|
129
|
-
delete inputs.folder;
|
|
130
|
-
if (isInitExistingApp) {
|
|
131
|
-
lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
|
|
132
|
-
[telemetry_1.TelemetryProperty.Capabilities]: features,
|
|
133
|
-
});
|
|
134
|
-
const appManifest = typedi_1.Container.get(constants_3.ComponentNames.AppManifest);
|
|
135
|
-
const addCapRes = await appManifest.addCapability(inputs, [
|
|
136
|
-
{ name: "staticTab", existingApp: true },
|
|
137
|
-
]);
|
|
138
|
-
if (addCapRes.isErr())
|
|
139
|
-
return teamsfx_api_1.err(addCapRes.error);
|
|
140
|
-
const sourceReadmePath = path_1.default.join(folder_1.getTemplatesFolder(), "core", teamsfx_api_1.DefaultReadme);
|
|
141
|
-
if (await fs_extra_1.default.pathExists(sourceReadmePath)) {
|
|
142
|
-
const targetReadmePath = path_1.default.join(inputs.projectPath, teamsfx_api_1.DefaultReadme);
|
|
143
|
-
await fs_extra_1.default.copy(sourceReadmePath, targetReadmePath);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
if (features === constants_2.M365SsoLaunchPageOptionItem().id ||
|
|
148
|
-
features === constants_2.M365SearchAppOptionItem().id) {
|
|
149
|
-
context.projectSetting.isM365 = true;
|
|
150
|
-
inputs.isM365 = true;
|
|
151
|
-
}
|
|
152
|
-
if (constants_2.BotFeatureIds().includes(features)) {
|
|
153
|
-
inputs[constants_2.AzureSolutionQuestionNames.Features] = features;
|
|
154
|
-
const component = typedi_1.Container.get(constants_3.ComponentNames.TeamsBot);
|
|
155
|
-
const res = await component.add(context, inputs);
|
|
156
|
-
if (res.isErr())
|
|
157
|
-
return teamsfx_api_1.err(res.error);
|
|
158
|
-
}
|
|
159
|
-
if (constants_2.TabFeatureIds().includes(features)) {
|
|
160
|
-
inputs[constants_2.AzureSolutionQuestionNames.Features] = features;
|
|
161
|
-
const component = typedi_1.Container.get(constants_3.ComponentNames.TeamsTab);
|
|
162
|
-
const res = await component.add(context, inputs);
|
|
163
|
-
if (res.isErr())
|
|
164
|
-
return teamsfx_api_1.err(res.error);
|
|
165
|
-
}
|
|
166
|
-
if (features === constants_2.TabSPFxItem().id) {
|
|
167
|
-
inputs[constants_2.AzureSolutionQuestionNames.Features] = features;
|
|
168
|
-
const component = typedi_1.Container.get("spfx-tab");
|
|
169
|
-
const res = await component.add(context, inputs);
|
|
170
|
-
if (res.isErr())
|
|
171
|
-
return teamsfx_api_1.err(res.error);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
|
|
175
|
-
[telemetry_1.TelemetryProperty.Feature]: features,
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
|
|
179
|
-
await globalState_1.globalStateUpdate(automaticNpmInstall, true);
|
|
180
|
-
}
|
|
181
|
-
context.projectPath = projectPath;
|
|
182
|
-
return teamsfx_api_1.ok(projectPath);
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* add feature
|
|
186
|
-
*/
|
|
187
|
-
async addFeature(context, inputs, actionContext) {
|
|
188
|
-
var _a, _b, _c, _d, _e, _f;
|
|
189
|
-
const features = inputs[constants_2.AzureSolutionQuestionNames.Features];
|
|
190
|
-
let component;
|
|
191
|
-
if (constants_2.BotFeatureIds().includes(features)) {
|
|
192
|
-
component = typedi_1.Container.get(constants_3.ComponentNames.TeamsBot);
|
|
193
|
-
}
|
|
194
|
-
else if (constants_2.TabFeatureIds().includes(features)) {
|
|
195
|
-
component = typedi_1.Container.get(constants_3.ComponentNames.TeamsTab);
|
|
196
|
-
}
|
|
197
|
-
else if (features === constants_2.AzureResourceSQLNewUI.id) {
|
|
198
|
-
component = typedi_1.Container.get("sql");
|
|
199
|
-
}
|
|
200
|
-
else if (features === constants_2.AzureResourceFunctionNewUI.id) {
|
|
201
|
-
component = typedi_1.Container.get(constants_3.ComponentNames.TeamsApi);
|
|
202
|
-
}
|
|
203
|
-
else if (features === constants_2.AzureResourceApim.id) {
|
|
204
|
-
component = typedi_1.Container.get(constants_3.ComponentNames.APIMFeature);
|
|
205
|
-
}
|
|
206
|
-
else if (features === constants_2.AzureResourceKeyVaultNewUI.id) {
|
|
207
|
-
component = typedi_1.Container.get("key-vault-feature");
|
|
208
|
-
}
|
|
209
|
-
else if (features === constants_2.CicdOptionItem.id) {
|
|
210
|
-
component = typedi_1.Container.get("cicd");
|
|
211
|
-
}
|
|
212
|
-
else if (features === constants_2.ApiConnectionOptionItem.id) {
|
|
213
|
-
component = typedi_1.Container.get("api-connector");
|
|
214
|
-
}
|
|
215
|
-
else if (features === constants_2.SingleSignOnOptionItem.id) {
|
|
216
|
-
component = typedi_1.Container.get("sso");
|
|
217
|
-
}
|
|
218
|
-
else if (features === constants_2.TabSPFxNewUIItem().id) {
|
|
219
|
-
component = typedi_1.Container.get(constants_3.ComponentNames.SPFxTab);
|
|
220
|
-
}
|
|
221
|
-
if (component) {
|
|
222
|
-
const res = await component.add(context, inputs);
|
|
223
|
-
lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
|
|
224
|
-
[telemetry_1.TelemetryProperty.Feature]: features,
|
|
225
|
-
});
|
|
226
|
-
if (res.isErr())
|
|
227
|
-
return teamsfx_api_1.err(res.error);
|
|
228
|
-
if (features !== constants_2.ApiConnectionOptionItem.id && features !== constants_2.CicdOptionItem.id) {
|
|
229
|
-
if (((_c = (_b = (_a = context.envInfo) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.solution) === null || _c === void 0 ? void 0 : _c.provisionSucceeded) === true ||
|
|
230
|
-
((_f = (_e = (_d = context.envInfo) === null || _d === void 0 ? void 0 : _d.state) === null || _e === void 0 ? void 0 : _e.solution) === null || _f === void 0 ? void 0 : _f.provisionSucceeded) === "true") {
|
|
231
|
-
context.envInfo.state.solution.provisionSucceeded = false;
|
|
232
|
-
}
|
|
233
|
-
await environment_1.environmentManager.resetProvisionState(inputs, context);
|
|
234
|
-
}
|
|
235
|
-
return teamsfx_api_1.ok(res.value);
|
|
236
|
-
}
|
|
237
|
-
return teamsfx_api_1.ok(undefined);
|
|
238
|
-
}
|
|
239
|
-
async init(context, inputs, isInitExistingApp = false) {
|
|
240
|
-
const projectSettings = projectSettingsHelper_1.newProjectSettings();
|
|
241
|
-
projectSettings.appName = inputs["app-name"];
|
|
242
|
-
projectSettings.components = [];
|
|
243
|
-
if (inputs.projectId) {
|
|
244
|
-
projectSettings.projectId = inputs.projectId;
|
|
245
|
-
}
|
|
246
|
-
context.projectSetting = projectSettings;
|
|
247
|
-
await fs_extra_1.default.ensureDir(inputs.projectPath);
|
|
248
|
-
await fs_extra_1.default.ensureDir(path_1.default.join(inputs.projectPath, `.${teamsfx_api_1.ConfigFolderName}`));
|
|
249
|
-
await fs_extra_1.default.ensureDir(path_1.default.join(inputs.projectPath, `.${teamsfx_api_1.ConfigFolderName}`, "configs"));
|
|
250
|
-
const basicFolderRes = await FxCore_1.ensureBasicFolderStructure(inputs);
|
|
251
|
-
if (basicFolderRes.isErr()) {
|
|
252
|
-
return teamsfx_api_1.err(basicFolderRes.error);
|
|
253
|
-
}
|
|
254
|
-
if (isInitExistingApp) {
|
|
255
|
-
// const folderExist = await fs.pathExists(inputs.projectPath);
|
|
256
|
-
// if (folderExist) {
|
|
257
|
-
// return err(new ProjectFolderExistError(inputs.projectPath));
|
|
258
|
-
// }
|
|
259
|
-
// const isValid = isValidProject(inputs.projectPath);
|
|
260
|
-
// if (isValid) {
|
|
261
|
-
// return err(
|
|
262
|
-
// new OperationNotPermittedError("initialize a project in existing teamsfx project")
|
|
263
|
-
// );
|
|
264
|
-
// }
|
|
265
|
-
// pre-check before initialize
|
|
266
|
-
const preCheckResult = await preCheck(inputs.projectPath);
|
|
267
|
-
if (preCheckResult.isErr()) {
|
|
268
|
-
return teamsfx_api_1.err(preCheckResult.error);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
{
|
|
272
|
-
const appManifest = typedi_1.Container.get(constants_3.ComponentNames.AppManifest);
|
|
273
|
-
const res = await appManifest.init(context, inputs, isInitExistingApp);
|
|
274
|
-
if (res.isErr())
|
|
275
|
-
return res;
|
|
276
|
-
}
|
|
277
|
-
{
|
|
278
|
-
const endpoint = inputs[question_1.CoreQuestionNames.ExistingTabEndpoint];
|
|
279
|
-
const createEnvResult = await envManager_1.createEnvWithName(environment_1.environmentManager.getDefaultEnvName(), projectSettings.appName, inputs, isInitExistingApp ? endpoint : undefined);
|
|
280
|
-
if (createEnvResult.isErr()) {
|
|
281
|
-
return teamsfx_api_1.err(createEnvResult.error);
|
|
282
|
-
}
|
|
283
|
-
const createLocalEnvResult = await envManager_1.createEnvWithName(environment_1.environmentManager.getLocalEnvName(), projectSettings.appName, inputs, isInitExistingApp ? endpoint : undefined);
|
|
284
|
-
if (createLocalEnvResult.isErr()) {
|
|
285
|
-
return teamsfx_api_1.err(createLocalEnvResult.error);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
return teamsfx_api_1.ok(undefined);
|
|
289
|
-
}
|
|
290
|
-
async provision(ctx, inputs, actionContext) {
|
|
291
|
-
ctx.envInfo.state.solution = ctx.envInfo.state.solution || {};
|
|
292
|
-
ctx.envInfo.state.solution.provisionSucceeded = false;
|
|
293
|
-
// 1. pre provision
|
|
294
|
-
{
|
|
295
|
-
const res = await provisionUtils_1.provisionUtils.preProvision(ctx, inputs);
|
|
296
|
-
if (res.isErr())
|
|
297
|
-
return teamsfx_api_1.err(res.error);
|
|
298
|
-
}
|
|
299
|
-
// 2. create a teams app
|
|
300
|
-
const appManifest = typedi_1.Container.get(constants_3.ComponentNames.AppManifest);
|
|
301
|
-
{
|
|
302
|
-
const res = await appManifest.provision(ctx, inputs);
|
|
303
|
-
if (res.isErr())
|
|
304
|
-
return teamsfx_api_1.err(res.error);
|
|
305
|
-
}
|
|
306
|
-
// 3. call resources provision api
|
|
307
|
-
const componentsToProvision = ctx.projectSetting.components.filter((r) => r.provision);
|
|
308
|
-
{
|
|
309
|
-
const thunks = [];
|
|
310
|
-
for (const componentConfig of componentsToProvision) {
|
|
311
|
-
const componentInstance = typedi_1.Container.get(componentConfig.name);
|
|
312
|
-
if (componentInstance.provision) {
|
|
313
|
-
thunks.push({
|
|
314
|
-
pluginName: `${componentConfig.name}`,
|
|
315
|
-
taskName: "provision",
|
|
316
|
-
thunk: () => {
|
|
317
|
-
ctx.envInfo.state[componentConfig.name] =
|
|
318
|
-
ctx.envInfo.state[componentConfig.name] || {};
|
|
319
|
-
return componentInstance.provision(ctx, inputs);
|
|
320
|
-
},
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
const provisionResult = await executor_1.executeConcurrently(thunks, ctx.logProvider);
|
|
325
|
-
if (provisionResult.kind !== "success") {
|
|
326
|
-
return teamsfx_api_1.err(provisionResult.error);
|
|
327
|
-
}
|
|
328
|
-
ctx.logProvider.info(localizeUtils_1.getLocalizedString("core.provision.ProvisionFinishNotice", constants_1.PluginDisplayName.Solution));
|
|
329
|
-
}
|
|
330
|
-
// 4
|
|
331
|
-
if (ctx.envInfo.envName === "local") {
|
|
332
|
-
//4.1 setup local env
|
|
333
|
-
const localEnvSetupResult = await debug_1.setupLocalEnvironment(ctx, inputs);
|
|
334
|
-
if (localEnvSetupResult.isErr()) {
|
|
335
|
-
return teamsfx_api_1.err(localEnvSetupResult.error);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
else if (projectSettingsHelperV3_1.hasAzureResourceV3(ctx.projectSetting, true)) {
|
|
339
|
-
//4.2 deploy arm templates for remote
|
|
340
|
-
ctx.logProvider.info(localizeUtils_1.getLocalizedString("core.deployArmTemplates.StartNotice", constants_1.PluginDisplayName.Solution));
|
|
341
|
-
const armRes = await arm_1.default.deployArmTemplates(ctx, inputs, ctx.envInfo, ctx.tokenProvider.azureAccountProvider);
|
|
342
|
-
if (armRes.isErr()) {
|
|
343
|
-
return teamsfx_api_1.err(armRes.error);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
// 5.0 "aad-app.setApplicationInContext"
|
|
347
|
-
const aadApp = typedi_1.Container.get(constants_3.ComponentNames.AadApp);
|
|
348
|
-
if (projectSettingsHelperV3_1.hasAAD(ctx.projectSetting)) {
|
|
349
|
-
const res = await aadApp.setApplicationInContext(ctx, inputs);
|
|
350
|
-
if (res.isErr())
|
|
351
|
-
return teamsfx_api_1.err(res.error);
|
|
352
|
-
}
|
|
353
|
-
// 5. call resources configure api
|
|
354
|
-
{
|
|
355
|
-
const thunks = [];
|
|
356
|
-
for (const componentConfig of componentsToProvision) {
|
|
357
|
-
const componentInstance = typedi_1.Container.get(componentConfig.name);
|
|
358
|
-
if (componentInstance.configure) {
|
|
359
|
-
thunks.push({
|
|
360
|
-
pluginName: `${componentConfig.name}`,
|
|
361
|
-
taskName: "configure",
|
|
362
|
-
thunk: () => {
|
|
363
|
-
ctx.envInfo.state[componentConfig.name] =
|
|
364
|
-
ctx.envInfo.state[componentConfig.name] || {};
|
|
365
|
-
return componentInstance.configure(ctx, inputs);
|
|
366
|
-
},
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
const configResult = await executor_1.executeConcurrently(thunks, ctx.logProvider);
|
|
371
|
-
if (configResult.kind !== "success") {
|
|
372
|
-
return teamsfx_api_1.err(configResult.error);
|
|
373
|
-
}
|
|
374
|
-
ctx.logProvider.info(localizeUtils_1.getLocalizedString("core.provision.configurationFinishNotice", constants_1.PluginDisplayName.Solution));
|
|
375
|
-
}
|
|
376
|
-
// 6.
|
|
377
|
-
if (ctx.envInfo.envName === "local") {
|
|
378
|
-
const localConfigResult = await debug_1.configLocalEnvironment(ctx, inputs);
|
|
379
|
-
if (localConfigResult.isErr()) {
|
|
380
|
-
return teamsfx_api_1.err(localConfigResult.error);
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
// 7. update teams app
|
|
384
|
-
{
|
|
385
|
-
const res = await appManifest.configure(ctx, inputs);
|
|
386
|
-
if (res.isErr())
|
|
387
|
-
return teamsfx_api_1.err(res.error);
|
|
388
|
-
}
|
|
389
|
-
// 8. show message and set state
|
|
390
|
-
if (ctx.envInfo.envName !== "local") {
|
|
391
|
-
const url = tools_1.getResourceGroupInPortal(ctx.envInfo.state.solution.subscriptionId, ctx.envInfo.state.solution.tenantId, ctx.envInfo.state.solution.resourceGroupName);
|
|
392
|
-
const msg = localizeUtils_1.getLocalizedString("core.provision.successNotice", ctx.projectSetting.appName);
|
|
393
|
-
if (url) {
|
|
394
|
-
const title = localizeUtils_1.getLocalizedString("core.provision.viewResources");
|
|
395
|
-
ctx.userInteraction.showMessage("info", msg, false, title).then((result) => {
|
|
396
|
-
const userSelected = result.isOk() ? result.value : undefined;
|
|
397
|
-
if (userSelected === title) {
|
|
398
|
-
ctx.userInteraction.openUrl(url);
|
|
399
|
-
}
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
else {
|
|
403
|
-
ctx.userInteraction.showMessage("info", msg, false);
|
|
404
|
-
}
|
|
405
|
-
ctx.logProvider.info(msg);
|
|
406
|
-
}
|
|
407
|
-
lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
|
|
408
|
-
[telemetry_1.TelemetryProperty.Components]: JSON.stringify(componentsToProvision.map((component) => component.name)),
|
|
409
|
-
});
|
|
410
|
-
ctx.envInfo.state.solution.provisionSucceeded = true;
|
|
411
|
-
return teamsfx_api_1.ok(undefined);
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* About AAD deploy:
|
|
415
|
-
* 1. For VS platform, there is no "AAD" option in the deploy plugins selection question.
|
|
416
|
-
* "Deploy" command does not include "AAD" resource.
|
|
417
|
-
* 2. For VS Code platform, there is no "AAD" option in the deploy plugins selection question.
|
|
418
|
-
* "Deploy" command does not include "AAD" resource. But there is another command "Deploy aad manifest" in aad manifest's context menu that will trigger the "deploy" lifecycle command in fxcore (with inputs["include-aad-manifest"] === "yes") will trigger "AAD" only deployment.
|
|
419
|
-
* 3. For CLI platform, there is "AAD" option in the deploy plugins selection question.
|
|
420
|
-
* "Deploy" command includes "AAD" resource if the following conditions meet:
|
|
421
|
-
* 1). inputs["include-aad-manifest"] === "yes" AND
|
|
422
|
-
* 2). deploy options includes "AAD".
|
|
423
|
-
* In such a case "AAD" will be included in the deployment resources and will be deployed together with other resources.
|
|
424
|
-
*/
|
|
425
|
-
async deploy(context, inputs, actionContext) {
|
|
426
|
-
var _a;
|
|
427
|
-
lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
|
|
428
|
-
[constants_4.SolutionTelemetryProperty.IncludeAadManifest]: (_a = inputs[constants_5.Constants.INCLUDE_AAD_MANIFEST]) !== null && _a !== void 0 ? _a : "no",
|
|
429
|
-
});
|
|
430
|
-
// deploy AAD only from VS Code
|
|
431
|
-
const isDeployAADManifestFromVSCode = inputs[constants_5.Constants.INCLUDE_AAD_MANIFEST] === "yes" && inputs.platform === teamsfx_api_1.Platform.VSCode;
|
|
432
|
-
if (isDeployAADManifestFromVSCode) {
|
|
433
|
-
return deployUtils_1.deployUtils.deployAadFromVscode(context, inputs);
|
|
434
|
-
}
|
|
435
|
-
context.logProvider.info(`inputs(${constants_2.AzureSolutionQuestionNames.PluginSelectionDeploy}) = ${inputs[constants_2.AzureSolutionQuestionNames.PluginSelectionDeploy]}`);
|
|
436
|
-
const projectSettings = context.projectSetting;
|
|
437
|
-
const inputPlugins = inputs[constants_2.AzureSolutionQuestionNames.PluginSelectionDeploy] || [];
|
|
438
|
-
let inputComponentNames = inputPlugins.map(migrate_1.pluginName2ComponentName);
|
|
439
|
-
if (inputComponentNames.includes(constants_3.ComponentNames.AadApp)) {
|
|
440
|
-
if (inputs[constants_5.Constants.INCLUDE_AAD_MANIFEST] != "yes" || inputs.platform !== teamsfx_api_1.Platform.CLI) {
|
|
441
|
-
inputComponentNames = inputComponentNames.filter((c) => c !== constants_3.ComponentNames.AadApp);
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
const thunks = [];
|
|
445
|
-
let hasAzureResource = false;
|
|
446
|
-
// 1. collect resources to deploy
|
|
447
|
-
const isVS = projectSettingsHelper_1.isVSProject(projectSettings);
|
|
448
|
-
for (const component of projectSettings.components) {
|
|
449
|
-
if (component.deploy && (isVS || inputComponentNames.includes(component.name))) {
|
|
450
|
-
const deployComponentName = component.hosting || component.name;
|
|
451
|
-
const featureComponent = typedi_1.Container.get(component.name);
|
|
452
|
-
const deployComponent = typedi_1.Container.get(deployComponentName);
|
|
453
|
-
thunks.push({
|
|
454
|
-
pluginName: `${component.name}`,
|
|
455
|
-
taskName: `${featureComponent.build ? "build & " : ""}deploy`,
|
|
456
|
-
thunk: async () => {
|
|
457
|
-
const clonedInputs = lodash_1.cloneDeep(inputs);
|
|
458
|
-
clonedInputs.folder = component.folder;
|
|
459
|
-
clonedInputs.artifactFolder = component.artifactFolder || clonedInputs.folder;
|
|
460
|
-
clonedInputs.componentId = component.name;
|
|
461
|
-
if (featureComponent.build) {
|
|
462
|
-
const buildRes = await featureComponent.build(context, clonedInputs);
|
|
463
|
-
if (buildRes.isErr())
|
|
464
|
-
return teamsfx_api_1.err(buildRes.error);
|
|
465
|
-
}
|
|
466
|
-
// build process may change the artifact folder, so we need reassign the value
|
|
467
|
-
clonedInputs.artifactFolder = component.artifactFolder;
|
|
468
|
-
return await deployComponent.deploy(context, clonedInputs);
|
|
469
|
-
},
|
|
470
|
-
});
|
|
471
|
-
if (constants_3.AzureResources.includes(deployComponentName)) {
|
|
472
|
-
hasAzureResource = true;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
if (!(inputs["include-app-manifest"] && inputs["include-app-manifest"] === "no") &&
|
|
477
|
-
inputComponentNames.includes(constants_3.ComponentNames.AppManifest)) {
|
|
478
|
-
const appManifest = typedi_1.Container.get(constants_3.ComponentNames.AppManifest);
|
|
479
|
-
thunks.push({
|
|
480
|
-
pluginName: constants_3.ComponentNames.AppManifest,
|
|
481
|
-
taskName: "deploy",
|
|
482
|
-
thunk: async () => {
|
|
483
|
-
return await appManifest.configure(context, inputs);
|
|
484
|
-
},
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
if (thunks.length === 0) {
|
|
488
|
-
return teamsfx_api_1.err(new teamsfx_api_1.UserError("fx", "NoResourcePluginSelected", localizeUtils_1.getDefaultString("core.NoPluginSelected"), localizeUtils_1.getLocalizedString("core.NoPluginSelected")));
|
|
489
|
-
}
|
|
490
|
-
context.logProvider.info(localizeUtils_1.getLocalizedString("core.deploy.selectedPluginsToDeployNotice", constants_1.PluginDisplayName.Solution, JSON.stringify(thunks.map((p) => p.pluginName))));
|
|
491
|
-
// 2. check azure account
|
|
492
|
-
if (hasAzureResource) {
|
|
493
|
-
const subscriptionResult = await deployUtils_1.deployUtils.checkDeployAzureSubscription(context, context.envInfo, context.tokenProvider.azureAccountProvider);
|
|
494
|
-
if (subscriptionResult.isErr()) {
|
|
495
|
-
return teamsfx_api_1.err(subscriptionResult.error);
|
|
496
|
-
}
|
|
497
|
-
const consent = await deployUtils_1.deployUtils.askForDeployConsent(context, context.tokenProvider.azureAccountProvider, context.envInfo);
|
|
498
|
-
if (consent.isErr()) {
|
|
499
|
-
return teamsfx_api_1.err(consent.error);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
// // 3. build
|
|
503
|
-
// {
|
|
504
|
-
// const res = await this.build(context, inputs);
|
|
505
|
-
// if (res.isErr()) return err(res.error);
|
|
506
|
-
// }
|
|
507
|
-
// 4. start deploy
|
|
508
|
-
context.logProvider.info(localizeUtils_1.getLocalizedString("core.deploy.startNotice", constants_1.PluginDisplayName.Solution));
|
|
509
|
-
const result = await executor_1.executeConcurrently(thunks, context.logProvider);
|
|
510
|
-
if (result.kind === "success") {
|
|
511
|
-
if (hasAzureResource) {
|
|
512
|
-
const botTroubleShootMsg = getBotTroubleShootMessage(projectSettingsHelperV3_1.hasBot(context.projectSetting));
|
|
513
|
-
const msg = localizeUtils_1.getLocalizedString("core.deploy.successNotice", context.projectSetting.appName) +
|
|
514
|
-
botTroubleShootMsg.textForLogging;
|
|
515
|
-
context.logProvider.info(msg);
|
|
516
|
-
if (botTroubleShootMsg.textForLogging) {
|
|
517
|
-
// Show a `Learn more` action button for bot trouble shooting.
|
|
518
|
-
context.userInteraction
|
|
519
|
-
.showMessage("info", `${localizeUtils_1.getLocalizedString("core.deploy.successNotice", context.projectSetting.appName)} ${botTroubleShootMsg.textForMsgBox}`, false, botTroubleShootMsg.textForActionButton)
|
|
520
|
-
.then((result) => {
|
|
521
|
-
const userSelected = result.isOk() ? result.value : undefined;
|
|
522
|
-
if (userSelected === botTroubleShootMsg.textForActionButton) {
|
|
523
|
-
context.userInteraction.openUrl(botTroubleShootMsg.troubleShootLink);
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
else {
|
|
528
|
-
context.userInteraction.showMessage("info", msg, false);
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
|
|
532
|
-
[telemetry_1.TelemetryProperty.Components]: JSON.stringify(thunks.map((p) => p.pluginName)),
|
|
533
|
-
[telemetry_1.TelemetryProperty.Hosting]: JSON.stringify(thunks.map((p) => { var _a; return (_a = workflow_1.getComponent(projectSettings, p.pluginName)) === null || _a === void 0 ? void 0 : _a.hosting; })),
|
|
534
|
-
});
|
|
535
|
-
return teamsfx_api_1.ok(undefined);
|
|
536
|
-
}
|
|
537
|
-
else {
|
|
538
|
-
const msg = localizeUtils_1.getLocalizedString("core.deploy.failNotice", context.projectSetting.appName);
|
|
539
|
-
context.logProvider.info(msg);
|
|
540
|
-
return teamsfx_api_1.err(result.error);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
};
|
|
544
|
-
tslib_1.__decorate([
|
|
545
|
-
lib_1.hooks([
|
|
546
|
-
actionExecutionMW_1.ActionExecutionMW({
|
|
547
|
-
question: (context, inputs) => {
|
|
548
|
-
return questionModel_1.getQuestionsForCreateProjectV2(inputs);
|
|
549
|
-
},
|
|
550
|
-
enableTelemetry: true,
|
|
551
|
-
telemetryEventName: telemetry_1.TelemetryEvent.CreateProject,
|
|
552
|
-
telemetryComponentName: "core",
|
|
553
|
-
}),
|
|
554
|
-
]),
|
|
555
|
-
tslib_1.__metadata("design:type", Function),
|
|
556
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object, Object]),
|
|
557
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
558
|
-
], TeamsfxCore.prototype, "create", null);
|
|
559
|
-
tslib_1.__decorate([
|
|
560
|
-
lib_1.hooks([
|
|
561
|
-
actionExecutionMW_1.ActionExecutionMW({
|
|
562
|
-
question: (context, inputs) => {
|
|
563
|
-
return question_2.getQuestionsForAddFeatureV3(context, inputs);
|
|
564
|
-
},
|
|
565
|
-
enableTelemetry: true,
|
|
566
|
-
telemetryEventName: telemetry_1.TelemetryEvent.AddFeature,
|
|
567
|
-
telemetryComponentName: "core",
|
|
568
|
-
}),
|
|
569
|
-
]),
|
|
570
|
-
tslib_1.__metadata("design:type", Function),
|
|
571
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object, Object]),
|
|
572
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
573
|
-
], TeamsfxCore.prototype, "addFeature", null);
|
|
574
|
-
tslib_1.__decorate([
|
|
575
|
-
lib_1.hooks([
|
|
576
|
-
actionExecutionMW_1.ActionExecutionMW({
|
|
577
|
-
question: async (context, inputs) => {
|
|
578
|
-
return await question_2.getQuestionsForProvisionV3(inputs);
|
|
579
|
-
},
|
|
580
|
-
enableTelemetry: true,
|
|
581
|
-
telemetryEventName: telemetry_1.TelemetryEvent.Provision,
|
|
582
|
-
telemetryComponentName: "core",
|
|
583
|
-
}),
|
|
584
|
-
]),
|
|
585
|
-
tslib_1.__metadata("design:type", Function),
|
|
586
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object, Object]),
|
|
587
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
588
|
-
], TeamsfxCore.prototype, "provision", null);
|
|
589
|
-
tslib_1.__decorate([
|
|
590
|
-
lib_1.hooks([
|
|
591
|
-
actionExecutionMW_1.ActionExecutionMW({
|
|
592
|
-
question: async (context, inputs) => {
|
|
593
|
-
return await question_2.getQuestionsForDeployV3(context, inputs, context.envInfo);
|
|
594
|
-
},
|
|
595
|
-
enableTelemetry: true,
|
|
596
|
-
telemetryEventName: telemetry_1.TelemetryEvent.Deploy,
|
|
597
|
-
telemetryComponentName: "core",
|
|
598
|
-
}),
|
|
599
|
-
]),
|
|
600
|
-
tslib_1.__metadata("design:type", Function),
|
|
601
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object, Object]),
|
|
602
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
603
|
-
], TeamsfxCore.prototype, "deploy", null);
|
|
604
|
-
TeamsfxCore = tslib_1.__decorate([
|
|
605
|
-
typedi_1.Service("fx")
|
|
606
|
-
], TeamsfxCore);
|
|
607
|
-
exports.TeamsfxCore = TeamsfxCore;
|
|
608
|
-
// pre-check before initialize
|
|
609
|
-
async function preCheck(projectPath) {
|
|
610
|
-
const existFiles = new Array();
|
|
611
|
-
// 0. check if projectSettings.json exists
|
|
612
|
-
const settingsFile = projectSettingsLoader_1.getProjectSettingsPath(projectPath);
|
|
613
|
-
if (await fs_extra_1.default.pathExists(settingsFile)) {
|
|
614
|
-
existFiles.push(settingsFile);
|
|
615
|
-
}
|
|
616
|
-
const appManifest = typedi_1.Container.get(constants_3.ComponentNames.AppManifest);
|
|
617
|
-
// 1. check if manifest templates exist
|
|
618
|
-
const manifestPreCheckResult = await appManifest.preCheck(projectPath);
|
|
619
|
-
existFiles.push(...manifestPreCheckResult);
|
|
620
|
-
// 2. check if env config file exists
|
|
621
|
-
const defaultEnvPath = environment_1.environmentManager.getEnvConfigPath(environment_1.environmentManager.getDefaultEnvName(), projectPath);
|
|
622
|
-
if (await fs_extra_1.default.pathExists(defaultEnvPath)) {
|
|
623
|
-
existFiles.push(defaultEnvPath);
|
|
624
|
-
}
|
|
625
|
-
const localEnvPath = environment_1.environmentManager.getEnvConfigPath(environment_1.environmentManager.getLocalEnvName(), projectPath);
|
|
626
|
-
if (await fs_extra_1.default.pathExists(localEnvPath)) {
|
|
627
|
-
existFiles.push(localEnvPath);
|
|
628
|
-
}
|
|
629
|
-
// 3. check if README.md exists
|
|
630
|
-
const readmePath = path_1.default.join(projectPath, teamsfx_api_1.AutoGeneratedReadme);
|
|
631
|
-
if (await fs_extra_1.default.pathExists(readmePath)) {
|
|
632
|
-
existFiles.push(readmePath);
|
|
633
|
-
}
|
|
634
|
-
if (existFiles.length > 0) {
|
|
635
|
-
return teamsfx_api_1.err(new error_1.InitializedFileAlreadyExistError(existFiles.join(", ")));
|
|
636
|
-
}
|
|
637
|
-
return teamsfx_api_1.ok(undefined);
|
|
638
|
-
}
|
|
639
|
-
exports.preCheck = preCheck;
|
|
640
|
-
function getBotTroubleShootMessage(isBot) {
|
|
641
|
-
const botTroubleShootLink = "https://aka.ms/teamsfx-bot-help#how-can-i-troubleshoot-issues-when-teams-bot-isnt-responding-on-azure";
|
|
642
|
-
const botTroubleShootDesc = localizeUtils_1.getLocalizedString("core.deploy.botTroubleShoot");
|
|
643
|
-
const botTroubleShootLearnMore = localizeUtils_1.getLocalizedString("core.deploy.botTroubleShoot.learnMore");
|
|
644
|
-
const botTroubleShootMsg = `${botTroubleShootDesc} ${botTroubleShootLearnMore}: ${botTroubleShootLink}.`;
|
|
645
|
-
return {
|
|
646
|
-
troubleShootLink: botTroubleShootLink,
|
|
647
|
-
textForLogging: isBot ? botTroubleShootMsg : "",
|
|
648
|
-
textForMsgBox: botTroubleShootDesc,
|
|
649
|
-
textForActionButton: botTroubleShootLearnMore,
|
|
650
|
-
};
|
|
651
|
-
}
|
|
652
|
-
exports.getBotTroubleShootMessage = getBotTroubleShootMessage;
|
|
653
|
-
//# sourceMappingURL=core.js.map
|