@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,80 +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.Sql = void 0;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
-
require("reflect-metadata");
|
|
9
|
-
const typedi_1 = require("typedi");
|
|
10
|
-
const workflow_1 = require("../workflow");
|
|
11
|
-
require("../connection/azureWebAppConfig");
|
|
12
|
-
require("../resource/azureSql");
|
|
13
|
-
require("../resource/identity");
|
|
14
|
-
const constants_1 = require("../constants");
|
|
15
|
-
const projectSettingsHelperV3_1 = require("../../common/projectSettingsHelperV3");
|
|
16
|
-
const utils_1 = require("../../common/utils");
|
|
17
|
-
const utils_2 = require("../utils");
|
|
18
|
-
const lodash_1 = require("lodash");
|
|
19
|
-
const constants_2 = require("../constants");
|
|
20
|
-
let Sql = class Sql {
|
|
21
|
-
constructor() {
|
|
22
|
-
this.name = "sql";
|
|
23
|
-
}
|
|
24
|
-
async add(context, inputs) {
|
|
25
|
-
const addedResources = [];
|
|
26
|
-
const sqlComponent = workflow_1.getComponent(context.projectSetting, constants_1.ComponentNames.AzureSQL);
|
|
27
|
-
if (projectSettingsHelperV3_1.hasTab(context.projectSetting) && !projectSettingsHelperV3_1.hasApi(context.projectSetting)) {
|
|
28
|
-
const teamsApi = typedi_1.Container.get(constants_1.ComponentNames.TeamsApi);
|
|
29
|
-
const res = await teamsApi.add(context, inputs);
|
|
30
|
-
if (res.isErr())
|
|
31
|
-
return teamsfx_api_1.err(res.error);
|
|
32
|
-
}
|
|
33
|
-
const projectSettings = context.projectSetting;
|
|
34
|
-
const remarks = [];
|
|
35
|
-
if (!sqlComponent) {
|
|
36
|
-
remarks.push("config 'azure-sql' in projectSettings");
|
|
37
|
-
projectSettings.components.push({
|
|
38
|
-
name: "azure-sql",
|
|
39
|
-
provision: true,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
// generate bicep
|
|
43
|
-
// bicep.init
|
|
44
|
-
{
|
|
45
|
-
const bicepComponent = typedi_1.Container.get("bicep");
|
|
46
|
-
const res = await bicepComponent.init(inputs.projectPath);
|
|
47
|
-
if (res.isErr())
|
|
48
|
-
return teamsfx_api_1.err(res.error);
|
|
49
|
-
}
|
|
50
|
-
// sql bicep
|
|
51
|
-
{
|
|
52
|
-
const provisionType = sqlComponent ? "database" : "server";
|
|
53
|
-
const clonedInputs = lodash_1.cloneDeep(inputs);
|
|
54
|
-
clonedInputs.provisionType = provisionType;
|
|
55
|
-
const sqlResource = typedi_1.Container.get(constants_1.ComponentNames.AzureSQL);
|
|
56
|
-
const res = await sqlResource.generateBicep(context, clonedInputs);
|
|
57
|
-
if (res.isErr())
|
|
58
|
-
return teamsfx_api_1.err(res.error);
|
|
59
|
-
const bicepRes = await utils_2.bicepUtils.persistBiceps(inputs.projectPath, utils_1.convertToAlphanumericOnly(context.projectSetting.appName), res.value);
|
|
60
|
-
if (bicepRes.isErr())
|
|
61
|
-
return bicepRes;
|
|
62
|
-
remarks.push("generate sql bicep");
|
|
63
|
-
}
|
|
64
|
-
// generate config bicep
|
|
65
|
-
{
|
|
66
|
-
const res = await utils_2.generateConfigBiceps(context, inputs);
|
|
67
|
-
if (res.isErr())
|
|
68
|
-
return teamsfx_api_1.err(res.error);
|
|
69
|
-
remarks.push("generate config biceps");
|
|
70
|
-
}
|
|
71
|
-
addedResources.push(constants_2.AzureResourceSQL.id);
|
|
72
|
-
utils_2.addFeatureNotify(inputs, context.userInteraction, "Resource", addedResources);
|
|
73
|
-
return teamsfx_api_1.ok(undefined);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
Sql = tslib_1.__decorate([
|
|
77
|
-
typedi_1.Service("sql")
|
|
78
|
-
], Sql);
|
|
79
|
-
exports.Sql = Sql;
|
|
80
|
-
//# sourceMappingURL=sql.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sql.js","sourceRoot":"","sources":["../../../src/component/feature/sql.ts"],"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AI,CAAC,4BAAgB,CAAC,EAAE,CAAC,CAAC;QACzC,wBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9E,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC;CACF,CAAA;AA3DY,GAAG;IADf,gBAAO,CAAC,KAAK,CAAC;GACF,GAAG,CA2Df;AA3DY,kBAAG"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ActionContext, ContextV3, FxError, InputsWithProjectPath, ResourceContextV3, Result } from "@microsoft/teamsfx-api";
|
|
2
|
-
import "reflect-metadata";
|
|
3
|
-
export declare class TeamsTab {
|
|
4
|
-
name: string;
|
|
5
|
-
add(context: ContextV3, inputs: InputsWithProjectPath, actionContext?: ActionContext): Promise<Result<undefined, FxError>>;
|
|
6
|
-
provision(context: ResourceContextV3): Promise<Result<undefined, FxError>>;
|
|
7
|
-
configure(context: ResourceContextV3, inputs: InputsWithProjectPath): Promise<Result<undefined, FxError>>;
|
|
8
|
-
build(context: ResourceContextV3, inputs: InputsWithProjectPath): Promise<Result<undefined, FxError>>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=tab.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../../src/component/feature/tab.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAGb,SAAS,EAET,OAAO,EACP,qBAAqB,EAErB,iBAAiB,EACjB,MAAM,EAEP,MAAM,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AA4B1B,qBACa,QAAQ;IACnB,IAAI,SAAe;IAeb,GAAG,CACP,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,EAC7B,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAgKhC,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAY1E,SAAS,CACb,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAMhC,KAAK,CACT,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;CAMvC"}
|
|
@@ -1,238 +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.TeamsTab = void 0;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
-
require("reflect-metadata");
|
|
9
|
-
const typedi_1 = require("typedi");
|
|
10
|
-
const globalVars_1 = require("../../core/globalVars");
|
|
11
|
-
const question_1 = require("../../core/question");
|
|
12
|
-
const constants_1 = require("../constants");
|
|
13
|
-
const constants_2 = require("../constants");
|
|
14
|
-
const messages_1 = require("../messages");
|
|
15
|
-
const workflow_1 = require("../workflow");
|
|
16
|
-
const lodash_1 = require("lodash");
|
|
17
|
-
const utils_1 = require("../utils");
|
|
18
|
-
const tabCode_1 = require("../code/tab/tabCode");
|
|
19
|
-
const utils_2 = require("../../common/utils");
|
|
20
|
-
const debug_1 = require("../debug");
|
|
21
|
-
const actionExecutionMW_1 = require("../middleware/actionExecutionMW");
|
|
22
|
-
const lib_1 = require("@feathersjs/hooks/lib");
|
|
23
|
-
const telemetry_1 = require("../../common/telemetry");
|
|
24
|
-
const projectSettingsHelper_1 = require("../../common/projectSettingsHelper");
|
|
25
|
-
const constants_3 = require("../code/tab/constants");
|
|
26
|
-
let TeamsTab = class TeamsTab {
|
|
27
|
-
constructor() {
|
|
28
|
-
this.name = "teams-tab";
|
|
29
|
-
}
|
|
30
|
-
async add(context, inputs, actionContext) {
|
|
31
|
-
const projectSettings = context.projectSetting;
|
|
32
|
-
const effects = [];
|
|
33
|
-
inputs[question_1.CoreQuestionNames.ProgrammingLanguage] =
|
|
34
|
-
context.projectSetting.programmingLanguage ||
|
|
35
|
-
inputs[question_1.CoreQuestionNames.ProgrammingLanguage] ||
|
|
36
|
-
"javascript";
|
|
37
|
-
inputs.hosting || (inputs.hosting = inputs[question_1.CoreQuestionNames.ProgrammingLanguage] === "csharp"
|
|
38
|
-
? constants_2.ComponentNames.AzureWebApp
|
|
39
|
-
: constants_2.ComponentNames.AzureStorage);
|
|
40
|
-
globalVars_1.globalVars.isVS = inputs[question_1.CoreQuestionNames.ProgrammingLanguage] === "csharp";
|
|
41
|
-
projectSettings.programmingLanguage || (projectSettings.programmingLanguage = inputs[question_1.CoreQuestionNames.ProgrammingLanguage]);
|
|
42
|
-
const addedComponents = [];
|
|
43
|
-
// Add static tab to app-manifest if teams-tab already exists
|
|
44
|
-
let tabConfig = workflow_1.getComponent(projectSettings, constants_2.ComponentNames.TeamsTab);
|
|
45
|
-
if (tabConfig) {
|
|
46
|
-
// app-manifest.addCapability
|
|
47
|
-
{
|
|
48
|
-
const capabilities = [{ name: "staticTab" }];
|
|
49
|
-
const clonedInputs = lodash_1.cloneDeep(inputs);
|
|
50
|
-
const manifestComponent = typedi_1.Container.get(constants_2.ComponentNames.AppManifest);
|
|
51
|
-
const res = await manifestComponent.addCapability(clonedInputs, capabilities);
|
|
52
|
-
if (res.isErr())
|
|
53
|
-
return teamsfx_api_1.err(res.error);
|
|
54
|
-
effects.push("add tab capability in app manifest");
|
|
55
|
-
utils_1.addFeatureNotify(inputs, context.userInteraction, "Capability", [inputs.features]);
|
|
56
|
-
return teamsfx_api_1.ok(undefined);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
// 1. scaffold and config tab
|
|
60
|
-
const clonedInputs = lodash_1.cloneDeep(inputs);
|
|
61
|
-
clonedInputs.folder || (clonedInputs.folder = inputs[question_1.CoreQuestionNames.ProgrammingLanguage] === constants_2.ProgrammingLanguage.CSharp
|
|
62
|
-
? constants_2.PathConstants.dotnetWorkingDir
|
|
63
|
-
: constants_2.PathConstants.tabWorkingDir);
|
|
64
|
-
clonedInputs.language = inputs[question_1.CoreQuestionNames.ProgrammingLanguage];
|
|
65
|
-
const tabCode = typedi_1.Container.get(constants_2.ComponentNames.TabCode);
|
|
66
|
-
const res = await tabCode.generate(context, clonedInputs);
|
|
67
|
-
if (res.isErr())
|
|
68
|
-
return teamsfx_api_1.err(res.error);
|
|
69
|
-
effects.push("generate tab code");
|
|
70
|
-
tabConfig = {
|
|
71
|
-
name: constants_2.ComponentNames.TeamsTab,
|
|
72
|
-
hosting: inputs.hosting,
|
|
73
|
-
deploy: true,
|
|
74
|
-
provision: true,
|
|
75
|
-
build: true,
|
|
76
|
-
folder: clonedInputs.folder,
|
|
77
|
-
};
|
|
78
|
-
projectSettings.components.push(tabConfig);
|
|
79
|
-
addedComponents.push(tabConfig.name);
|
|
80
|
-
effects.push(messages_1.Plans.generateSourceCodeAndConfig(constants_2.ComponentNames.TeamsTab));
|
|
81
|
-
// 2. generate provision bicep
|
|
82
|
-
// 2.0 bicep.init
|
|
83
|
-
{
|
|
84
|
-
const bicepComponent = typedi_1.Container.get("bicep");
|
|
85
|
-
const res = await bicepComponent.init(inputs.projectPath);
|
|
86
|
-
if (res.isErr())
|
|
87
|
-
return teamsfx_api_1.err(res.error);
|
|
88
|
-
}
|
|
89
|
-
const biceps = [];
|
|
90
|
-
// 2.1 hosting bicep
|
|
91
|
-
const hostingConfig = workflow_1.getComponentByScenario(projectSettings, inputs.hosting, constants_2.Scenarios.Tab);
|
|
92
|
-
if (!hostingConfig) {
|
|
93
|
-
const clonedInputs = lodash_1.cloneDeep(inputs);
|
|
94
|
-
lodash_1.assign(clonedInputs, {
|
|
95
|
-
componentId: constants_2.ComponentNames.TeamsTab,
|
|
96
|
-
scenario: constants_2.Scenarios.Tab,
|
|
97
|
-
});
|
|
98
|
-
const hostingComponent = typedi_1.Container.get(inputs.hosting);
|
|
99
|
-
const res = await hostingComponent.generateBicep(context, clonedInputs);
|
|
100
|
-
if (res.isErr())
|
|
101
|
-
return teamsfx_api_1.err(res.error);
|
|
102
|
-
res.value.forEach((b) => biceps.push(b));
|
|
103
|
-
projectSettings.components.push({
|
|
104
|
-
name: inputs.hosting,
|
|
105
|
-
scenario: constants_2.Scenarios.Tab,
|
|
106
|
-
provision: true,
|
|
107
|
-
});
|
|
108
|
-
addedComponents.push(inputs.hosting);
|
|
109
|
-
effects.push(messages_1.Plans.generateBicepAndConfig(inputs.hosting));
|
|
110
|
-
}
|
|
111
|
-
// 2.2 identity bicep
|
|
112
|
-
if (!workflow_1.getComponent(projectSettings, constants_2.ComponentNames.Identity)) {
|
|
113
|
-
const clonedInputs = lodash_1.cloneDeep(inputs);
|
|
114
|
-
lodash_1.assign(clonedInputs, {
|
|
115
|
-
componentId: "",
|
|
116
|
-
scenario: "",
|
|
117
|
-
});
|
|
118
|
-
const identityComponent = typedi_1.Container.get(constants_2.ComponentNames.Identity);
|
|
119
|
-
const res = await identityComponent.generateBicep(context, clonedInputs);
|
|
120
|
-
if (res.isErr())
|
|
121
|
-
return teamsfx_api_1.err(res.error);
|
|
122
|
-
res.value.forEach((b) => biceps.push(b));
|
|
123
|
-
projectSettings.components.push({
|
|
124
|
-
name: constants_2.ComponentNames.Identity,
|
|
125
|
-
provision: true,
|
|
126
|
-
});
|
|
127
|
-
addedComponents.push(constants_2.ComponentNames.Identity);
|
|
128
|
-
effects.push(messages_1.Plans.generateBicepAndConfig(constants_2.ComponentNames.Identity));
|
|
129
|
-
}
|
|
130
|
-
//persist bicep
|
|
131
|
-
const bicepRes = await utils_1.bicepUtils.persistBiceps(inputs.projectPath, utils_2.convertToAlphanumericOnly(context.projectSetting.appName), biceps);
|
|
132
|
-
if (bicepRes.isErr())
|
|
133
|
-
return bicepRes;
|
|
134
|
-
// 2.3 add sso
|
|
135
|
-
const nonSsoIds = [constants_1.TabNonSsoItem().id, constants_1.DashboardOptionItem().id];
|
|
136
|
-
if (!nonSsoIds.includes(inputs[constants_1.AzureSolutionQuestionNames.Features])) {
|
|
137
|
-
const ssoComponent = typedi_1.Container.get("sso");
|
|
138
|
-
const res = await ssoComponent.add(context, inputs);
|
|
139
|
-
if (res.isErr())
|
|
140
|
-
return teamsfx_api_1.err(res.error);
|
|
141
|
-
}
|
|
142
|
-
// 3. generate config bicep
|
|
143
|
-
{
|
|
144
|
-
const res = await utils_1.generateConfigBiceps(context, inputs);
|
|
145
|
-
if (res.isErr())
|
|
146
|
-
return teamsfx_api_1.err(res.error);
|
|
147
|
-
effects.push("generate config biceps");
|
|
148
|
-
}
|
|
149
|
-
// 4. local debug settings
|
|
150
|
-
{
|
|
151
|
-
const res = await debug_1.generateLocalDebugSettings(context, inputs);
|
|
152
|
-
if (res.isErr())
|
|
153
|
-
return teamsfx_api_1.err(res.error);
|
|
154
|
-
effects.push("generate debug configs");
|
|
155
|
-
}
|
|
156
|
-
// 5. app-manifest.addCapability
|
|
157
|
-
{
|
|
158
|
-
const capabilities = [{ name: "staticTab" }];
|
|
159
|
-
// M365 app does not support configurationTab
|
|
160
|
-
if (!context.projectSetting.isM365) {
|
|
161
|
-
capabilities.push({ name: "configurableTab" });
|
|
162
|
-
}
|
|
163
|
-
const clonedInputs = Object.assign(Object.assign({}, lodash_1.cloneDeep(inputs)), { validDomain: `{{state.${constants_2.ComponentNames.TeamsTab}.domain}}` });
|
|
164
|
-
const manifestComponent = typedi_1.Container.get(constants_2.ComponentNames.AppManifest);
|
|
165
|
-
const res = await manifestComponent.addCapability(clonedInputs, capabilities);
|
|
166
|
-
if (res.isErr())
|
|
167
|
-
return teamsfx_api_1.err(res.error);
|
|
168
|
-
effects.push("add tab capability in app manifest");
|
|
169
|
-
}
|
|
170
|
-
lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
|
|
171
|
-
[telemetry_1.TelemetryProperty.Components]: JSON.stringify(addedComponents),
|
|
172
|
-
});
|
|
173
|
-
await utils_1.scaffoldRootReadme(context.projectSetting, inputs.projectPath);
|
|
174
|
-
utils_1.addFeatureNotify(inputs, context.userInteraction, "Capability", [inputs.features]);
|
|
175
|
-
return teamsfx_api_1.ok(undefined);
|
|
176
|
-
}
|
|
177
|
-
async provision(context) {
|
|
178
|
-
context.envInfo.state[constants_2.ComponentNames.TeamsTab] =
|
|
179
|
-
context.envInfo.state[constants_2.ComponentNames.TeamsTab] || {};
|
|
180
|
-
if (projectSettingsHelper_1.isVSProject(context.projectSetting)) {
|
|
181
|
-
context.envInfo.state[constants_2.ComponentNames.TeamsTab][constants_2.StorageOutputs.indexPath.key] =
|
|
182
|
-
constants_2.PathConstants.blazorTabIndexPath;
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
context.envInfo.state[constants_2.ComponentNames.TeamsTab][constants_2.StorageOutputs.indexPath.key] =
|
|
186
|
-
constants_2.PathConstants.reactTabIndexPath;
|
|
187
|
-
}
|
|
188
|
-
return teamsfx_api_1.ok(undefined);
|
|
189
|
-
}
|
|
190
|
-
async configure(context, inputs) {
|
|
191
|
-
const tabCode = new tabCode_1.TabCodeProvider();
|
|
192
|
-
const res = await tabCode.configure(context, inputs);
|
|
193
|
-
if (res.isErr())
|
|
194
|
-
return teamsfx_api_1.err(res.error);
|
|
195
|
-
return teamsfx_api_1.ok(undefined);
|
|
196
|
-
}
|
|
197
|
-
async build(context, inputs) {
|
|
198
|
-
const tabCode = new tabCode_1.TabCodeProvider();
|
|
199
|
-
const res = await tabCode.build(context, inputs);
|
|
200
|
-
if (res.isErr())
|
|
201
|
-
return teamsfx_api_1.err(res.error);
|
|
202
|
-
return teamsfx_api_1.ok(undefined);
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
tslib_1.__decorate([
|
|
206
|
-
lib_1.hooks([
|
|
207
|
-
actionExecutionMW_1.ActionExecutionMW({
|
|
208
|
-
enableTelemetry: true,
|
|
209
|
-
telemetryEventName: telemetry_1.TelemetryEvent.AddFeature,
|
|
210
|
-
telemetryComponentName: constants_2.ComponentNames.TeamsTab,
|
|
211
|
-
errorSource: constants_3.errorSource,
|
|
212
|
-
errorHandler: (error) => {
|
|
213
|
-
if (error && !(error === null || error === void 0 ? void 0 : error.name)) {
|
|
214
|
-
error.name = "addTabError";
|
|
215
|
-
}
|
|
216
|
-
return error;
|
|
217
|
-
},
|
|
218
|
-
}),
|
|
219
|
-
]),
|
|
220
|
-
tslib_1.__metadata("design:type", Function),
|
|
221
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object, Object]),
|
|
222
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
223
|
-
], TeamsTab.prototype, "add", null);
|
|
224
|
-
tslib_1.__decorate([
|
|
225
|
-
lib_1.hooks([
|
|
226
|
-
actionExecutionMW_1.ActionExecutionMW({
|
|
227
|
-
errorSource: constants_3.errorSource,
|
|
228
|
-
}),
|
|
229
|
-
]),
|
|
230
|
-
tslib_1.__metadata("design:type", Function),
|
|
231
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
232
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
233
|
-
], TeamsTab.prototype, "provision", null);
|
|
234
|
-
TeamsTab = tslib_1.__decorate([
|
|
235
|
-
typedi_1.Service("teams-tab")
|
|
236
|
-
], TeamsTab);
|
|
237
|
-
exports.TeamsTab = TeamsTab;
|
|
238
|
-
//# sourceMappingURL=tab.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tab.js","sourceRoot":"","sources":["../../../src/component/feature/tab.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAYgC;AAChC,4BAA0B;AAC1B,mCAA4C;AAC5C,sDAAmD;AACnD,kDAAwD;AACxD,4CAA8F;AAC9F,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CAAC;QACvC,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC;CACF,CAAA;AAlMC;IAdC,WAAK,CAAC;QACL,qCAAiB,CAAC;YAChB,eAAe,EAAE,IAAI;YACrB,kBAAkB,EAAE,0BAAc,CAAC,UAAU;YAC7C,sBAAsB,EAAE,0BAAc,CAAC,QAAQ;YAC/C,WAAW,EAAE,uBAAW;YACxB,YAAY,EAAE,CAAC,KAAK,EAAE,EAAE;gBACtB,IAAI,KAAK,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,EAAE;oBACzB,KAAK,CAAC,IAAI,GAAG,aAAa,CAAC;iBAC5B;gBACD,OAAO,KAAgB,CAAC;YAC1B,CAAC;SACF,CAAC;KACH,CAAC;;;;mCA8JD;AAOD;IALC,WAAK,CAAC;QACL,qCAAiB,CAAC;YAChB,WAAW,EAAE,uBAAW;SACzB,CAAC;KACH,CAAC;;;;yCAYD;AA/LU,QAAQ;IADpB,gBAAO,CAAC,WAAW,CAAC;GACR,QAAQ,CAkNpB;AAlNY,4BAAQ"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ContextV3, InputsWithProjectPath, Result, FxError, Effect } from "@microsoft/teamsfx-api";
|
|
2
|
-
export declare class ConfigureActionImplement {
|
|
3
|
-
static readonly source = "SQL";
|
|
4
|
-
static readonly stage = "post-provision";
|
|
5
|
-
static readonly telemetryComponentName = "fx-resource-azure-sql";
|
|
6
|
-
static readonly progressTitle = "Configuring SQL";
|
|
7
|
-
static readonly progressMessage: {
|
|
8
|
-
addAadmin: string;
|
|
9
|
-
addUser: string;
|
|
10
|
-
};
|
|
11
|
-
static readonly loggerPrefix = "[SQL Component]";
|
|
12
|
-
static readonly logFormatter: (message: string) => string;
|
|
13
|
-
static execute(context: ContextV3, inputs: InputsWithProjectPath): Promise<Result<Effect[], FxError>>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=configure.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../../src/component/resource/azureSql/actions/configure.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,SAAS,EACT,qBAAqB,EAIrB,MAAM,EACN,OAAO,EACP,MAAM,EACP,MAAM,wBAAwB,CAAC;AAehC,qBAAa,wBAAwB;IACnC,MAAM,CAAC,QAAQ,CAAC,MAAM,SAAS;IAC/B,MAAM,CAAC,QAAQ,CAAC,KAAK,oBAAoB;IACzC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,2BAA2B;IACjE,MAAM,CAAC,QAAQ,CAAC,aAAa,qBAAqB;IAClD,MAAM,CAAC,QAAQ,CAAC,eAAe;;;MAG7B;IACF,MAAM,CAAC,QAAQ,CAAC,YAAY,qBAAqB;IACjD,MAAM,CAAC,QAAQ,CAAC,YAAY,YAAa,MAAM,YACS;WAiB3C,OAAO,CAClB,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;CAuEtC"}
|
|
@@ -1,92 +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.ConfigureActionImplement = void 0;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
const lib_1 = require("@feathersjs/hooks/lib");
|
|
8
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
9
|
-
const typedi_1 = tslib_1.__importDefault(require("typedi"));
|
|
10
|
-
const constants_1 = require("../../../constants");
|
|
11
|
-
const logger_1 = require("../../../middleware/logger");
|
|
12
|
-
const progressbar_1 = require("../../../middleware/progressbar");
|
|
13
|
-
const runWithCatchError_1 = require("../../../middleware/runWithCatchError");
|
|
14
|
-
const telemetry_1 = require("../../../middleware/telemetry");
|
|
15
|
-
const management_1 = require("../clients/management");
|
|
16
|
-
const sql_1 = require("../clients/sql");
|
|
17
|
-
const config_1 = require("../config");
|
|
18
|
-
const constants_2 = require("../constants");
|
|
19
|
-
const errors_1 = require("../errors");
|
|
20
|
-
const common_1 = require("../utils/common");
|
|
21
|
-
const utils_1 = require("./utils");
|
|
22
|
-
class ConfigureActionImplement {
|
|
23
|
-
static async execute(context, inputs) {
|
|
24
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
25
|
-
const ctx = context;
|
|
26
|
-
const actionContext = context;
|
|
27
|
-
const solutionConfig = ctx.envInfo.state.solution;
|
|
28
|
-
const state = ctx.envInfo.state[constants_1.ComponentNames.AzureSQL];
|
|
29
|
-
const sqlMgrConfig = config_1.LoadManagementConfig(state);
|
|
30
|
-
const sqlMgrClient = await management_1.ManagementClient.create(ctx.tokenProvider.azureAccountProvider, sqlMgrConfig);
|
|
31
|
-
(_a = actionContext.logger) === null || _a === void 0 ? void 0 : _a.info(constants_2.Message.addFirewall);
|
|
32
|
-
await sqlMgrClient.addLocalFirewallRule();
|
|
33
|
-
const adminInfo = await utils_1.UtilFunctions.parseLoginToken(ctx.tokenProvider.azureAccountProvider);
|
|
34
|
-
await ((_b = actionContext.progressBar) === null || _b === void 0 ? void 0 : _b.next(ConfigureActionImplement.progressMessage.addAadmin));
|
|
35
|
-
const existAdmin = await utils_1.UtilFunctions.CheckAndSetAadAdmin(sqlMgrClient, adminInfo.name, adminInfo.objectId, solutionConfig.tenantId);
|
|
36
|
-
if (existAdmin) {
|
|
37
|
-
(_c = actionContext.logger) === null || _c === void 0 ? void 0 : _c.info(constants_2.Message.skipAddAadAdmin);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
(_d = actionContext.logger) === null || _d === void 0 ? void 0 : _d.info(constants_2.Message.addSqlAadAdmin);
|
|
41
|
-
}
|
|
42
|
-
// update outputKeys
|
|
43
|
-
const databases = config_1.loadDatabases(state);
|
|
44
|
-
const resource = typedi_1.default.get(constants_1.ComponentNames.AzureSQL);
|
|
45
|
-
resource.finalOutputKeys.push(...Object.keys(databases));
|
|
46
|
-
const identity = utils_1.UtilFunctions.getIdentity(ctx);
|
|
47
|
-
const sqlConfig = config_1.LoadSqlConfig(state, identity);
|
|
48
|
-
const skipAddingUser = await utils_1.UtilFunctions.getSkipAddingUser(ctx.envInfo.config, ctx.tokenProvider.azureAccountProvider);
|
|
49
|
-
(_e = actionContext.telemetry) === null || _e === void 0 ? void 0 : _e.addProperty(constants_2.Telemetry.properties.skipAddingUser, skipAddingUser ? constants_1.TelemetryConstants.values.yes : constants_1.TelemetryConstants.values.no);
|
|
50
|
-
(_f = actionContext.telemetry) === null || _f === void 0 ? void 0 : _f.addProperty(constants_2.Telemetry.properties.dbCount, sqlConfig.databases.length.toString());
|
|
51
|
-
if (!skipAddingUser) {
|
|
52
|
-
if (adminInfo.userType === common_1.UserType.User) {
|
|
53
|
-
await ((_g = actionContext.progressBar) === null || _g === void 0 ? void 0 : _g.next(ConfigureActionImplement.progressMessage.addUser));
|
|
54
|
-
const sqlClient = await sql_1.SqlClient.create(ctx.tokenProvider.azureAccountProvider, sqlConfig);
|
|
55
|
-
(_h = actionContext.logger) === null || _h === void 0 ? void 0 : _h.info(constants_2.Message.addDatabaseUser(identity));
|
|
56
|
-
await utils_1.UtilFunctions.addDatabaseUser(ctx.logProvider, sqlClient, sqlMgrClient);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
const message = errors_1.ErrorMessage.ServicePrincipalWarning(identity, sqlConfig.databases.join(","));
|
|
60
|
-
(_j = actionContext.logger) === null || _j === void 0 ? void 0 : _j.warning(`${message}. You can follow ${constants_2.HelpLinks.default} to add database user ${identity}`);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
(_k = actionContext.logger) === null || _k === void 0 ? void 0 : _k.warning(`Skip adding database user. You can follow ${constants_2.HelpLinks.default} to add database user ${identity}`);
|
|
65
|
-
}
|
|
66
|
-
await sqlMgrClient.deleteLocalFirewallRule();
|
|
67
|
-
return teamsfx_api_1.ok([{ type: "service", name: "azure", remarks: "configure azure-sql" }]);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
ConfigureActionImplement.source = "SQL";
|
|
71
|
-
ConfigureActionImplement.stage = "post-provision";
|
|
72
|
-
ConfigureActionImplement.telemetryComponentName = "fx-resource-azure-sql";
|
|
73
|
-
ConfigureActionImplement.progressTitle = "Configuring SQL";
|
|
74
|
-
ConfigureActionImplement.progressMessage = {
|
|
75
|
-
addAadmin: "Configure aad admin for SQL",
|
|
76
|
-
addUser: "Configure database user",
|
|
77
|
-
};
|
|
78
|
-
ConfigureActionImplement.loggerPrefix = "[SQL Component]";
|
|
79
|
-
ConfigureActionImplement.logFormatter = (message) => `${ConfigureActionImplement.loggerPrefix} ${message}`;
|
|
80
|
-
tslib_1.__decorate([
|
|
81
|
-
lib_1.hooks([
|
|
82
|
-
telemetry_1.TelemetryMW(telemetry_1.ActionTelemetryImplement.bind(null, ConfigureActionImplement.stage, ConfigureActionImplement.telemetryComponentName)),
|
|
83
|
-
runWithCatchError_1.RunWithCatchErrorMW(ConfigureActionImplement.source, runWithCatchError_1.ActionErrorHandler),
|
|
84
|
-
progressbar_1.ProgressBarMW(ConfigureActionImplement.progressTitle, Object.keys(ConfigureActionImplement.progressMessage).length),
|
|
85
|
-
logger_1.LoggerMW(logger_1.ActionLogger.bind(null, ConfigureActionImplement.logFormatter)),
|
|
86
|
-
]),
|
|
87
|
-
tslib_1.__metadata("design:type", Function),
|
|
88
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
89
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
90
|
-
], ConfigureActionImplement, "execute", null);
|
|
91
|
-
exports.ConfigureActionImplement = ConfigureActionImplement;
|
|
92
|
-
//# sourceMappingURL=configure.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../../../../src/component/resource/azureSql/actions/configure.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,+CAA8C;AAC9C,wDASgC;AAChC,4DAA+B;AAC/B,kDAAwE;AACxE,uDAAoE;AACpE,iEAAgE;AAChE,6EAAgG;AAChG,6DAAsF;AAEtF,sDAAyD;AACzD,wCAA2C;AAC3C,sCAA+E;AAC/E,4CAA6D;AAC7D,sCAAyC;AACzC,4CAA2C;AAC3C,mCAAwC;AACxC,MAAa,wBAAwB;IA4BnC,MAAM,CAAC,KAAK,CAAC,OAAO,CAClB,OAAkB,EAClB,MAA6B;;QAE7B,MAAM,GAAG,GAAG,OAA4B,CAAC;QACzC,MAAM,aAAa,GAAG,OAAwB,CAAC;QAC/C,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,QAAkC,CAAC;QAC5E,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,0BAAc,CAAC,QAAQ,CAAC,CAAC;QACzD,MAAM,YAAY,GAAG,6BAAoB,CAAC,KAAK,CAAC,CAAC;QACjD,MAAM,YAAY,GAAG,MAAM,6BAAgB,CAAC,MAAM,CAChD,GAAG,CAAC,aAAa,CAAC,oBAAoB,EACtC,YAAY,CACb,CAAC;QAEF,MAAA,aAAa,CAAC,MAAM,0CAAE,IAAI,CAAC,mBAAO,CAAC,WAAW,CAAC,CAAC;QAChD,MAAM,YAAY,CAAC,oBAAoB,EAAE,CAAC;QAE1C,MAAM,SAAS,GAAG,MAAM,qBAAa,CAAC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;QAC9F,MAAM,CAAA,MAAA,aAAa,CAAC,WAAW,0CAAE,IAAI,CAAC,wBAAwB,CAAC,eAAe,CAAC,SAAS,CAAC,CAAA,CAAC;QAC1F,MAAM,UAAU,GAAG,MAAM,qBAAa,CAAC,mBAAmB,CACxD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AAE,yBAAyB;CACnC,CAAC;AACc,qCAAY,GAAG,iBAAiB,CAAC;AACjC,qCAAY,GAAG,CAAC,OAAe,EAAE,EAAE,CACjD,GAAG,wBAAwB,CAAC,YAAY,IAAI,OAAO,EAAE,CAAC;AAiBxD;IAfC,WAAK,CAAC;QACL,uBAAW,CACT,oCAAwB,CAAC,IAAI,CAC3B,IAAI,EACJ,wBAAwB,CAAC,KAAK,EAC9B,wBAAwB,CAAC,sBAAsB,CAChD,CACF;QACD,uCAAmB,CAAC,wBAAwB,CAAC,MAAM,EAAE,sCAAkB,CAAC;QACxE,2BAAa,CACX,wBAAwB,CAAC,aAAa,EACtC,MAAM,CAAC,IAAI,CAAC,wBAAwB,CAAC,eAAe,CAAC,CAAC,MAAM,CAC7D;QACD,iBAAQ,CAAC,qBAAY,CAAC,IAAI,CAAC,IAAI,EAAE,wBAAwB,CAAC,YAAY,CAAC,CAAC;KACzE,CAAC;;;;6CA0ED;AArGH,4DAsGC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ContextV3, InputsWithProjectPath, Effect, FxError, Result } from "@microsoft/teamsfx-api";
|
|
2
|
-
export declare class ProvisionActionImplement {
|
|
3
|
-
static readonly source = "SQL";
|
|
4
|
-
static readonly stage = "pre-provision";
|
|
5
|
-
static readonly telemetryComponentName = "fx-resource-azure-sql";
|
|
6
|
-
static readonly loggerPrefix = "[SQL Component]";
|
|
7
|
-
static readonly logFormatter: (message: string) => string;
|
|
8
|
-
static execute(context: ContextV3, inputs: InputsWithProjectPath): Promise<Result<Effect[], FxError>>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=provision.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provision.d.ts","sourceRoot":"","sources":["../../../../../src/component/resource/azureSql/actions/provision.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,SAAS,EACT,qBAAqB,EAGrB,MAAM,EACN,OAAO,EACP,MAAM,EAEP,MAAM,wBAAwB,CAAC;AAYhC,qBAAa,wBAAwB;IACnC,MAAM,CAAC,QAAQ,CAAC,MAAM,SAAS;IAC/B,MAAM,CAAC,QAAQ,CAAC,KAAK,mBAAmB;IACxC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,2BAA2B;IACjE,MAAM,CAAC,QAAQ,CAAC,YAAY,qBAAqB;IACjD,MAAM,CAAC,QAAQ,CAAC,YAAY,YAAa,MAAM,YACS;WAa3C,OAAO,CAClB,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;CA+BtC"}
|
|
@@ -1,63 +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.ProvisionActionImplement = void 0;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
const lib_1 = require("@feathersjs/hooks/lib");
|
|
8
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
9
|
-
const constants_1 = require("../../../constants");
|
|
10
|
-
const logger_1 = require("../../../middleware/logger");
|
|
11
|
-
const runWithCatchError_1 = require("../../../middleware/runWithCatchError");
|
|
12
|
-
const telemetry_1 = require("../../../middleware/telemetry");
|
|
13
|
-
const management_1 = require("../clients/management");
|
|
14
|
-
const config_1 = require("../config");
|
|
15
|
-
const constants_2 = require("../constants");
|
|
16
|
-
const errors_1 = require("../errors");
|
|
17
|
-
const questions_1 = require("../questions");
|
|
18
|
-
const results_1 = require("../results");
|
|
19
|
-
class ProvisionActionImplement {
|
|
20
|
-
static async execute(context, inputs) {
|
|
21
|
-
var _a;
|
|
22
|
-
var _b, _c;
|
|
23
|
-
const ctx = context;
|
|
24
|
-
const state = ((_a = (_b = ctx.envInfo.state)[_c = constants_1.ComponentNames.AzureSQL]) !== null && _a !== void 0 ? _a : (_b[_c] = {}));
|
|
25
|
-
config_1.removeDatabases(state);
|
|
26
|
-
let shouldAsk;
|
|
27
|
-
if (state.sqlResourceId) {
|
|
28
|
-
const sqlMgrConfig = config_1.LoadManagementConfig(state);
|
|
29
|
-
const sqlMgrClient = await management_1.ManagementClient.create(ctx.tokenProvider.azureAccountProvider, sqlMgrConfig);
|
|
30
|
-
shouldAsk = !(await sqlMgrClient.existAzureSQL());
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
shouldAsk = true;
|
|
34
|
-
}
|
|
35
|
-
if (shouldAsk) {
|
|
36
|
-
const node = questions_1.buildQuestionNode();
|
|
37
|
-
const res = await teamsfx_api_1.traverse(node, inputs, ctx.userInteraction);
|
|
38
|
-
if (res.isErr()) {
|
|
39
|
-
throw results_1.SqlResultFactory.UserError(errors_1.ErrorMessage.SqlAskInputError.name, errors_1.ErrorMessage.SqlAskInputError.message(), res.error);
|
|
40
|
-
}
|
|
41
|
-
state.admin = inputs[constants_2.Constants.questionKey.adminName];
|
|
42
|
-
state.adminPassword = inputs[constants_2.Constants.questionKey.adminPassword];
|
|
43
|
-
}
|
|
44
|
-
return teamsfx_api_1.ok([{ type: "service", name: "azure", remarks: "configure azure-sql" }]);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
ProvisionActionImplement.source = "SQL";
|
|
48
|
-
ProvisionActionImplement.stage = "pre-provision";
|
|
49
|
-
ProvisionActionImplement.telemetryComponentName = "fx-resource-azure-sql";
|
|
50
|
-
ProvisionActionImplement.loggerPrefix = "[SQL Component]";
|
|
51
|
-
ProvisionActionImplement.logFormatter = (message) => `${ProvisionActionImplement.loggerPrefix} ${message}`;
|
|
52
|
-
tslib_1.__decorate([
|
|
53
|
-
lib_1.hooks([
|
|
54
|
-
telemetry_1.TelemetryMW(telemetry_1.ActionTelemetryImplement.bind(null, ProvisionActionImplement.stage, ProvisionActionImplement.telemetryComponentName)),
|
|
55
|
-
runWithCatchError_1.RunWithCatchErrorMW(ProvisionActionImplement.source, runWithCatchError_1.ActionErrorHandler),
|
|
56
|
-
logger_1.LoggerMW(logger_1.ActionLogger.bind(null, ProvisionActionImplement.logFormatter)),
|
|
57
|
-
]),
|
|
58
|
-
tslib_1.__metadata("design:type", Function),
|
|
59
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
60
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
61
|
-
], ProvisionActionImplement, "execute", null);
|
|
62
|
-
exports.ProvisionActionImplement = ProvisionActionImplement;
|
|
63
|
-
//# sourceMappingURL=provision.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"provision.js","sourceRoot":"","sources":["../../../../../src/component/resource/azureSql/actions/provision.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,+CAA8C;AAC9C,wDASgC;AAChC,kDAAoD;AACpD,uDAAoE;AACpE,6EAAgG;AAChG,6DAAsF;AACtF,sDAAyD;AACzD,sCAAkE;AAClE,4CAAyC;AACzC,sCAAyC;AACzC,4CAAiD;AACjD,wCAA8C;AAE9C,MAAa,wBAAwB;IAmBnC,MAAM,CAAC,KAAK,CAAC,OAAO,CAClB,OAAkB,EAClB,MAA6B;;;QAE7B,MAAM,GAAG,GAAG,OAA4B,CAAC;QACzC,MAAM,KAAK,GAAG,aAAC,GAAG,CAAC,OAAO,CAAC,KAAK,OAAC,0BAAc,CAAC,QAAQ,8CAAM,EAAE,EAAC,CAAC;QAClE,wBAAe,CAAC,KAAK,CAAC,CAAC;QACvB,IAAI,SAAS,CAAC;QACd,IAAI,KAAK,CAAC,aAAa,EAAE;YACvB,MAAM,YAAY,GAAG,6BAAoB,CAAC,KAAK,CAAC,CAAC;YACjD,MAAM,YAAY,GAAG,MAAM,6BAAgB,CAAC,MAAM,CAChD,GAAG,CAAC,aAAa,CAAC,oBAAoB,EACtC,YAAY,CACb,CAAC;YACF,SAAS,GAAG,CAAC,CAAC,MAAM,YA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,IAAI,CAAC,IAAI,EAAE,wBAAwB,CAAC,YAAY,CAAC,CAAC;KACzE,CAAC;;;;6CAkCD;AApDH,4DAqDC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ResourceContextV3, AzureAccountProvider, LogProvider, Json } from "@microsoft/teamsfx-api";
|
|
2
|
-
import { ManagementClient } from "../clients/management";
|
|
3
|
-
import { SqlClient } from "../clients/sql";
|
|
4
|
-
import { TokenInfo } from "../utils/common";
|
|
5
|
-
export declare class UtilFunctions {
|
|
6
|
-
static CheckAndSetAadAdmin(client: ManagementClient, aadAdmin: string, objectId: string, tenantId: string): Promise<boolean>;
|
|
7
|
-
static parseLoginToken(azureAccountProvider: AzureAccountProvider): Promise<TokenInfo>;
|
|
8
|
-
static getSkipAddingUser(config: Json, azureAccountProvider: AzureAccountProvider): Promise<boolean>;
|
|
9
|
-
static getIdentity(ctx: ResourceContextV3): string;
|
|
10
|
-
static addDatabaseUser(logProvider: LogProvider, sqlClient: SqlClient, managementClient: ManagementClient): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/component/resource/azureSql/actions/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAGpG,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI3C,OAAO,EAAc,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExD,qBAAa,aAAa;WACX,mBAAmB,CAC9B,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC;WAQN,eAAe,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC;WAgB/E,iBAAiB,CAC5B,MAAM,EAAE,IAAI,EACZ,oBAAoB,EAAE,oBAAoB,GACzC,OAAO,CAAC,OAAO,CAAC;IASnB,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM;WAarC,eAAe,CAC1B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC,IAAI,CAAC;CA+BjB"}
|