@microsoft/teamsfx-core 1.4.0 → 1.4.1-alpha.0535e2d27.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/constants.d.ts +1 -0
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +1 -0
- package/build/common/constants.js.map +1 -1
- package/build/common/local/constants.d.ts +0 -4
- package/build/common/local/constants.d.ts.map +1 -1
- package/build/common/local/constants.js +1 -5
- package/build/common/local/constants.js.map +1 -1
- package/build/common/local/localEnvProvider.d.ts +4 -8
- package/build/common/local/localEnvProvider.d.ts.map +1 -1
- package/build/common/local/localEnvProvider.js +21 -33
- package/build/common/local/localEnvProvider.js.map +1 -1
- package/build/common/local/localSettingsHelper.d.ts.map +1 -1
- package/build/common/local/localSettingsHelper.js +12 -21
- package/build/common/local/localSettingsHelper.js.map +1 -1
- package/build/common/local/portChecker.d.ts.map +1 -1
- package/build/common/local/portChecker.js +1 -8
- package/build/common/local/portChecker.js.map +1 -1
- package/build/common/local/projectSettingsHelper.d.ts +0 -1
- package/build/common/local/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/local/projectSettingsHelper.js +2 -5
- package/build/common/local/projectSettingsHelper.js.map +1 -1
- package/build/common/localSettingsProvider.d.ts +2 -2
- package/build/common/localSettingsProvider.d.ts.map +1 -1
- package/build/common/localSettingsProvider.js +4 -4
- package/build/common/localSettingsProvider.js.map +1 -1
- package/build/common/projectSettingsValidator.d.ts.map +1 -1
- package/build/common/projectSettingsValidator.js +5 -0
- package/build/common/projectSettingsValidator.js.map +1 -1
- package/build/common/samples-config.json +12 -2
- package/build/common/template-utils/templates.d.ts +1 -0
- package/build/common/template-utils/templates.d.ts.map +1 -1
- package/build/common/template-utils/templates.js +5 -1
- package/build/common/template-utils/templates.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/common/tools.d.ts +0 -4
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +1 -20
- package/build/common/tools.js.map +1 -1
- package/build/core/SolutionPluginContainer.js +1 -1
- package/build/core/SolutionPluginContainer.js.map +1 -1
- package/build/core/collaborator.d.ts +10 -0
- package/build/core/collaborator.d.ts.map +1 -0
- package/build/core/collaborator.js +381 -0
- package/build/core/collaborator.js.map +1 -0
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +7 -2
- package/build/core/environment.js.map +1 -1
- package/build/core/error.d.ts +0 -6
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +1 -25
- package/build/core/error.js.map +1 -1
- package/build/core/index.d.ts +11 -9
- package/build/core/index.d.ts.map +1 -1
- package/build/core/index.js +232 -233
- package/build/core/index.js.map +1 -1
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +1 -2
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/envInfoLoaderV3.d.ts.map +1 -1
- package/build/core/middleware/envInfoLoaderV3.js +3 -0
- package/build/core/middleware/envInfoLoaderV3.js.map +1 -1
- package/build/core/middleware/index.d.ts +0 -2
- package/build/core/middleware/index.d.ts.map +1 -1
- package/build/core/middleware/index.js +0 -2
- package/build/core/middleware/index.js.map +1 -1
- package/build/core/middleware/localSettingsLoader.d.ts.map +1 -1
- package/build/core/middleware/localSettingsLoader.js +2 -2
- package/build/core/middleware/localSettingsLoader.js.map +1 -1
- package/build/core/middleware/projectMigrator.d.ts.map +1 -1
- package/build/core/middleware/projectMigrator.js +28 -35
- package/build/core/middleware/projectMigrator.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 +48 -71
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/core/middleware/solutionLoaderV3.d.ts +1 -1
- package/build/core/middleware/solutionLoaderV3.d.ts.map +1 -1
- package/build/core/middleware/solutionLoaderV3.js +1 -8
- package/build/core/middleware/solutionLoaderV3.js.map +1 -1
- package/build/core/question.d.ts +0 -1
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +1 -26
- package/build/core/question.js.map +1 -1
- package/build/core/tools.d.ts +0 -2
- package/build/core/tools.d.ts.map +1 -1
- package/build/core/tools.js +3 -63
- package/build/core/tools.js.map +1 -1
- package/build/core/utils.d.ts +1 -2
- package/build/core/utils.d.ts.map +1 -1
- package/build/core/utils.js +1 -5
- package/build/core/utils.js.map +1 -1
- package/build/plugins/resource/aad/aadAppClient.d.ts +4 -4
- package/build/plugins/resource/aad/aadAppClient.d.ts.map +1 -1
- package/build/plugins/resource/aad/aadAppClient.js +3 -3
- package/build/plugins/resource/aad/aadAppClient.js.map +1 -1
- package/build/plugins/resource/aad/index.d.ts.map +1 -1
- package/build/plugins/resource/aad/index.js +0 -3
- package/build/plugins/resource/aad/index.js.map +1 -1
- package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
- package/build/plugins/resource/aad/plugin.js +13 -8
- package/build/plugins/resource/aad/plugin.js.map +1 -1
- package/build/plugins/resource/aad/v2/index.d.ts +3 -2
- package/build/plugins/resource/aad/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/aad/v2/index.js +4 -4
- package/build/plugins/resource/aad/v2/index.js.map +1 -1
- package/build/plugins/resource/aad/v3/index.d.ts +8 -2
- package/build/plugins/resource/aad/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/aad/v3/index.js +148 -49
- package/build/plugins/resource/aad/v3/index.js.map +1 -1
- package/build/plugins/resource/apim/config.js +2 -1
- package/build/plugins/resource/apim/config.js.map +1 -1
- package/build/plugins/resource/apim/managers/questionManager.d.ts.map +1 -1
- package/build/plugins/resource/apim/managers/questionManager.js +8 -4
- package/build/plugins/resource/apim/managers/questionManager.js.map +1 -1
- package/build/plugins/resource/apim/v3/index.d.ts +7 -7
- package/build/plugins/resource/apim/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/apim/v3/index.js +63 -55
- package/build/plugins/resource/apim/v3/index.js.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.js +1 -1
- package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
- package/build/plugins/resource/appstudio/errors.d.ts +8 -16
- package/build/plugins/resource/appstudio/errors.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/errors.js +8 -16
- package/build/plugins/resource/appstudio/errors.js.map +1 -1
- package/build/plugins/resource/appstudio/index.d.ts +0 -4
- package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/index.js +0 -21
- package/build/plugins/resource/appstudio/index.js.map +1 -1
- package/build/plugins/resource/appstudio/manifestTemplate.d.ts +3 -1
- package/build/plugins/resource/appstudio/manifestTemplate.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/manifestTemplate.js +111 -1
- package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts +2 -13
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js +46 -127
- package/build/plugins/resource/appstudio/plugin.js.map +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.d.ts +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.js +22 -10
- package/build/plugins/resource/appstudio/utils/telemetry.js.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.d.ts +2 -2
- package/build/plugins/resource/appstudio/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.js +2 -2
- package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
- package/build/plugins/resource/appstudio/v3/index.d.ts +24 -4
- package/build/plugins/resource/appstudio/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/v3/index.js +133 -5
- package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
- package/build/plugins/resource/appstudio/v3/plugin.d.ts +17 -4
- package/build/plugins/resource/appstudio/v3/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/v3/plugin.js +117 -25
- package/build/plugins/resource/appstudio/v3/plugin.js.map +1 -1
- package/build/plugins/resource/bot/configs/deployConfig.js.map +1 -1
- package/build/plugins/resource/bot/constants.d.ts +0 -4
- package/build/plugins/resource/bot/constants.d.ts.map +1 -1
- package/build/plugins/resource/bot/constants.js +0 -6
- package/build/plugins/resource/bot/constants.js.map +1 -1
- package/build/plugins/resource/bot/dotnet/plugin.d.ts +0 -3
- package/build/plugins/resource/bot/dotnet/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/dotnet/plugin.js +0 -9
- package/build/plugins/resource/bot/dotnet/plugin.js.map +1 -1
- package/build/plugins/resource/bot/errors.d.ts +0 -3
- package/build/plugins/resource/bot/errors.d.ts.map +1 -1
- package/build/plugins/resource/bot/errors.js +1 -9
- package/build/plugins/resource/bot/errors.js.map +1 -1
- package/build/plugins/resource/bot/index.d.ts +2 -3
- package/build/plugins/resource/bot/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/index.js +5 -16
- package/build/plugins/resource/bot/index.js.map +1 -1
- package/build/plugins/resource/bot/interface.d.ts +0 -1
- package/build/plugins/resource/bot/interface.d.ts.map +1 -1
- package/build/plugins/resource/bot/plugin.d.ts +0 -1
- package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/plugin.js +0 -26
- package/build/plugins/resource/bot/plugin.js.map +1 -1
- package/build/plugins/resource/bot/progressBars.d.ts +2 -2
- package/build/plugins/resource/bot/progressBars.d.ts.map +1 -1
- package/build/plugins/resource/bot/progressBars.js +4 -3
- package/build/plugins/resource/bot/progressBars.js.map +1 -1
- package/build/plugins/resource/bot/resources/messages.d.ts +0 -3
- package/build/plugins/resource/bot/resources/messages.d.ts.map +1 -1
- package/build/plugins/resource/bot/resources/messages.js +0 -5
- package/build/plugins/resource/bot/resources/messages.js.map +1 -1
- package/build/plugins/resource/bot/resources/strings.d.ts +0 -1
- package/build/plugins/resource/bot/resources/strings.d.ts.map +1 -1
- package/build/plugins/resource/bot/resources/strings.js +0 -2
- package/build/plugins/resource/bot/resources/strings.js.map +1 -1
- package/build/plugins/resource/bot/v3/error.d.ts +15 -0
- package/build/plugins/resource/bot/v3/error.d.ts.map +1 -0
- package/build/plugins/resource/bot/v3/error.js +46 -0
- package/build/plugins/resource/bot/v3/error.js.map +1 -0
- package/build/plugins/resource/bot/v3/index.d.ts +19 -0
- package/build/plugins/resource/bot/v3/index.d.ts.map +1 -0
- package/build/plugins/resource/bot/v3/index.js +376 -0
- package/build/plugins/resource/bot/v3/index.js.map +1 -0
- package/build/plugins/resource/frontend/constants.d.ts +1 -0
- package/build/plugins/resource/frontend/constants.d.ts.map +1 -1
- package/build/plugins/resource/frontend/constants.js +1 -0
- package/build/plugins/resource/frontend/constants.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.d.ts +21 -0
- package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.js +23 -1
- package/build/plugins/resource/frontend/dotnet/constants.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.d.ts +1 -0
- package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.js +59 -0
- package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/resources/errors.d.ts +3 -0
- package/build/plugins/resource/frontend/dotnet/resources/errors.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/resources/errors.js +10 -1
- package/build/plugins/resource/frontend/dotnet/resources/errors.js.map +1 -1
- package/build/plugins/resource/frontend/index.d.ts +2 -3
- package/build/plugins/resource/frontend/index.d.ts.map +1 -1
- package/build/plugins/resource/frontend/index.js +5 -9
- package/build/plugins/resource/frontend/index.js.map +1 -1
- package/build/plugins/resource/frontend/interface.d.ts +2 -2
- package/build/plugins/resource/frontend/interface.d.ts.map +1 -1
- package/build/plugins/resource/frontend/plugin.d.ts +2 -2
- package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/plugin.js +12 -25
- package/build/plugins/resource/frontend/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/resources/errors.d.ts +0 -7
- package/build/plugins/resource/frontend/resources/errors.d.ts.map +1 -1
- package/build/plugins/resource/frontend/resources/errors.js +1 -14
- package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
- package/build/plugins/resource/frontend/resources/messages.d.ts +0 -2
- package/build/plugins/resource/frontend/resources/messages.d.ts.map +1 -1
- package/build/plugins/resource/frontend/resources/messages.js +0 -2
- package/build/plugins/resource/frontend/resources/messages.js.map +1 -1
- package/build/plugins/resource/frontend/resources/steps.d.ts +0 -1
- package/build/plugins/resource/frontend/resources/steps.d.ts.map +1 -1
- package/build/plugins/resource/frontend/resources/steps.js +1 -7
- package/build/plugins/resource/frontend/resources/steps.js.map +1 -1
- package/build/plugins/resource/frontend/v2/index.d.ts +3 -2
- package/build/plugins/resource/frontend/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/frontend/v2/index.js +5 -2
- package/build/plugins/resource/frontend/v2/index.js.map +1 -1
- package/build/plugins/resource/frontend/v3/index.d.ts +7 -7
- package/build/plugins/resource/frontend/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/frontend/v3/index.js +21 -28
- package/build/plugins/resource/frontend/v3/index.js.map +1 -1
- package/build/plugins/resource/function/v3/index.d.ts +8 -9
- package/build/plugins/resource/function/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/function/v3/index.js +20 -26
- package/build/plugins/resource/function/v3/index.js.map +1 -1
- package/build/plugins/resource/identity/index.d.ts.map +1 -1
- package/build/plugins/resource/identity/index.js +0 -3
- package/build/plugins/resource/identity/index.js.map +1 -1
- package/build/plugins/resource/identity/v3/index.d.ts +4 -4
- package/build/plugins/resource/identity/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/identity/v3/index.js +10 -14
- package/build/plugins/resource/identity/v3/index.js.map +1 -1
- package/build/plugins/resource/keyvault/v3/index.d.ts +5 -6
- package/build/plugins/resource/keyvault/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/keyvault/v3/index.js +10 -17
- package/build/plugins/resource/keyvault/v3/index.js.map +1 -1
- package/build/plugins/resource/localdebug/constants.d.ts +0 -4
- package/build/plugins/resource/localdebug/constants.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/constants.js +1 -5
- package/build/plugins/resource/localdebug/constants.js.map +1 -1
- package/build/plugins/resource/localdebug/localEnv.d.ts +2 -2
- package/build/plugins/resource/localdebug/localEnv.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/localEnv.js +4 -6
- package/build/plugins/resource/localdebug/localEnv.js.map +1 -1
- package/build/plugins/resource/localdebug/projectSettingLoader.d.ts +0 -1
- package/build/plugins/resource/localdebug/projectSettingLoader.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/projectSettingLoader.js +0 -1
- package/build/plugins/resource/localdebug/projectSettingLoader.js.map +1 -1
- package/build/plugins/resource/spfx/index.d.ts +1 -5
- package/build/plugins/resource/spfx/index.d.ts.map +1 -1
- package/build/plugins/resource/spfx/index.js +6 -10
- package/build/plugins/resource/spfx/index.js.map +1 -1
- package/build/plugins/resource/spfx/plugin.js +6 -6
- package/build/plugins/resource/spfx/plugin.js.map +1 -1
- package/build/plugins/resource/spfx/utils/constants.d.ts +9 -0
- package/build/plugins/resource/spfx/utils/constants.d.ts.map +1 -1
- package/build/plugins/resource/spfx/utils/constants.js +11 -1
- package/build/plugins/resource/spfx/utils/constants.js.map +1 -1
- package/build/plugins/resource/spfx/utils/progress-helper.d.ts +3 -3
- package/build/plugins/resource/spfx/utils/progress-helper.d.ts.map +1 -1
- package/build/plugins/resource/spfx/utils/progress-helper.js +8 -8
- package/build/plugins/resource/spfx/utils/progress-helper.js.map +1 -1
- package/build/plugins/resource/spfx/utils/questions.d.ts +10 -0
- package/build/plugins/resource/spfx/utils/questions.d.ts.map +1 -0
- package/build/plugins/resource/spfx/utils/questions.js +39 -0
- package/build/plugins/resource/spfx/utils/questions.js.map +1 -0
- package/build/plugins/resource/spfx/v3/error.d.ts +5 -0
- package/build/plugins/resource/spfx/v3/error.d.ts.map +1 -0
- package/build/plugins/resource/spfx/v3/error.js +20 -0
- package/build/plugins/resource/spfx/v3/error.js.map +1 -0
- package/build/plugins/resource/spfx/v3/index.d.ts +13 -0
- package/build/plugins/resource/spfx/v3/index.d.ts.map +1 -0
- package/build/plugins/resource/spfx/v3/index.js +122 -0
- package/build/plugins/resource/spfx/v3/index.js.map +1 -0
- package/build/plugins/resource/spfx/v3/plugin.d.ts +11 -0
- package/build/plugins/resource/spfx/v3/plugin.d.ts.map +1 -0
- package/build/plugins/resource/spfx/v3/plugin.js +290 -0
- package/build/plugins/resource/spfx/v3/plugin.js.map +1 -0
- package/build/plugins/resource/sql/v3/index.d.ts +9 -6
- package/build/plugins/resource/sql/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/sql/v3/index.js +82 -20
- package/build/plugins/resource/sql/v3/index.js.map +1 -1
- package/build/plugins/resource/utils4v2.d.ts +3 -2
- package/build/plugins/resource/utils4v2.d.ts.map +1 -1
- package/build/plugins/resource/utils4v2.js +24 -7
- package/build/plugins/resource/utils4v2.js.map +1 -1
- package/build/plugins/solution/fx-solution/arm.d.ts +2 -2
- package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/arm.js +52 -59
- package/build/plugins/solution/fx-solution/arm.js.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.d.ts +15 -3
- package/build/plugins/solution/fx-solution/commonQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.js +14 -8
- package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/constants.d.ts +0 -2
- package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/constants.js +0 -2
- package/build/plugins/solution/fx-solution/constants.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/error.d.ts +0 -1
- package/build/plugins/solution/fx-solution/debug/error.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/error.js +1 -5
- package/build/plugins/solution/fx-solution/debug/error.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts +3 -0
- package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js +254 -28
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts +3 -4
- package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/scaffolding.js +18 -19
- package/build/plugins/solution/fx-solution/debug/scaffolding.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launch.d.ts +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launch.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launch.js +109 -290
- package/build/plugins/solution/fx-solution/debug/util/launch.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchNext.js +102 -236
- package/build/plugins/solution/fx-solution/debug/util/launchNext.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasks.d.ts +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasks.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasks.js +12 -18
- package/build/plugins/solution/fx-solution/debug/util/tasks.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.js +5 -5
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.js.map +1 -1
- package/build/plugins/solution/fx-solution/question.d.ts +0 -2
- package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/question.js +1 -14
- package/build/plugins/solution/fx-solution/question.js.map +1 -1
- package/build/plugins/solution/fx-solution/solution.d.ts +0 -2
- package/build/plugins/solution/fx-solution/solution.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/solution.js +4 -84
- package/build/plugins/solution/fx-solution/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.js +17 -0
- package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.js +1 -6
- package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.js +4 -0
- package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts +2 -0
- package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js +52 -11
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts +1 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.js +5 -8
- package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.js +0 -3
- package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
- package/build/plugins/solution/fx-solution/v3/addFeature.d.ts +4 -3
- package/build/plugins/solution/fx-solution/v3/addFeature.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v3/addFeature.js +124 -45
- package/build/plugins/solution/fx-solution/v3/addFeature.js.map +1 -1
- package/build/plugins/solution/fx-solution/v3/constants.d.ts +0 -1
- package/build/plugins/solution/fx-solution/v3/constants.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v3/constants.js +2 -3
- package/build/plugins/solution/fx-solution/v3/constants.js.map +1 -1
- package/build/plugins/solution/fx-solution/v3/deploy.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v3/deploy.js +21 -11
- package/build/plugins/solution/fx-solution/v3/deploy.js.map +1 -1
- package/build/plugins/solution/fx-solution/v3/provision.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v3/provision.js +37 -24
- package/build/plugins/solution/fx-solution/v3/provision.js.map +1 -1
- package/build/plugins/solution/fx-solution/v3/solution.js +2 -2
- package/build/plugins/solution/fx-solution/v3/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/v3/userTask.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v3/userTask.js +58 -58
- package/build/plugins/solution/fx-solution/v3/userTask.js.map +1 -1
- package/build/plugins/solution/spfx-solution/addFeature.d.ts.map +1 -1
- package/build/plugins/solution/spfx-solution/addFeature.js +0 -8
- package/build/plugins/solution/spfx-solution/addFeature.js.map +1 -1
- package/build/plugins/solution/utils/questions.d.ts +3 -3
- package/build/plugins/solution/utils/questions.d.ts.map +1 -1
- package/build/plugins/solution/utils/questions.js +6 -6
- package/build/plugins/solution/utils/questions.js.map +1 -1
- package/package.json +4 -3
- package/resource/strings.json +1 -0
- package/templates/plugins/resource/bot/bot-msgext.csharp.default.zip +0 -0
- package/templates/plugins/resource/bot/bot-msgext.js.default.zip +0 -0
- package/templates/plugins/resource/bot/bot-msgext.ts.default.zip +0 -0
- package/templates/plugins/resource/bot/bot.csharp.default.zip +0 -0
- package/templates/plugins/resource/bot/bot.js.default.zip +0 -0
- package/templates/plugins/resource/bot/bot.ts.default.zip +0 -0
- package/templates/plugins/resource/bot/msgext.js.default.zip +0 -0
- package/templates/plugins/resource/bot/msgext.ts.default.zip +0 -0
- package/templates/plugins/resource/dotnet/blazor-base.csharp.default.zip +0 -0
- package/templates/plugins/resource/frontend/tab.csharp.default.zip +0 -0
- package/templates/plugins/resource/frontend/tab.js.default.zip +0 -0
- package/templates/plugins/resource/frontend/tab.ts.default.zip +0 -0
- package/templates/plugins/resource/function/function-base.js.default.zip +0 -0
- package/templates/plugins/resource/function/function-base.ts.default.zip +0 -0
- package/templates/plugins/resource/function/function-triggers.js.HTTPTrigger.zip +0 -0
- package/templates/plugins/resource/function/function-triggers.ts.HTTPTrigger.zip +0 -0
- package/build/core/middleware/migrateConditionHandler.d.ts +0 -3
- package/build/core/middleware/migrateConditionHandler.d.ts.map +0 -1
- package/build/core/middleware/migrateConditionHandler.js +0 -23
- package/build/core/middleware/migrateConditionHandler.js.map +0 -1
- package/build/core/middleware/supportV1ConditionHandler.d.ts +0 -3
- package/build/core/middleware/supportV1ConditionHandler.d.ts.map +0 -1
- package/build/core/middleware/supportV1ConditionHandler.js +0 -23
- package/build/core/middleware/supportV1ConditionHandler.js.map +0 -1
- package/build/core/middleware/telemetrySender.d.ts +0 -6
- package/build/core/middleware/telemetrySender.d.ts.map +0 -1
- package/build/core/middleware/telemetrySender.js +0 -43
- package/build/core/middleware/telemetrySender.js.map +0 -1
- package/templates/plugins/resource/storage/bicep/azureStorageProvision.bicep +0 -25
- package/templates/plugins/resource/storage/bicep/provision.template.bicep +0 -15
|
@@ -5,15 +5,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.ProgressBarFactory = void 0;
|
|
6
6
|
class ProgressBarFactory {
|
|
7
7
|
static async newProgressBar(name, steps_num, context) {
|
|
8
|
-
var _a, _b;
|
|
8
|
+
var _a, _b, _c;
|
|
9
9
|
if (ProgressBarFactory.progressBars.has(name)) {
|
|
10
10
|
const handler = ProgressBarFactory.progressBars.get(name);
|
|
11
11
|
await (handler === null || handler === void 0 ? void 0 : handler.end(true));
|
|
12
12
|
return handler;
|
|
13
13
|
}
|
|
14
|
-
const handler = (_a = context.ui) === null || _a === void 0 ? void 0 : _a.createProgressBar(name, steps_num)
|
|
14
|
+
const handler = ((_a = context.ui) === null || _a === void 0 ? void 0 : _a.createProgressBar(name, steps_num)) ||
|
|
15
|
+
((_b = context.userInteraction) === null || _b === void 0 ? void 0 : _b.createProgressBar(name, steps_num));
|
|
15
16
|
if (!handler) {
|
|
16
|
-
(
|
|
17
|
+
(_c = context.logProvider) === null || _c === void 0 ? void 0 : _c.warning(`Fail to create progress bar for ${name}.`);
|
|
17
18
|
}
|
|
18
19
|
ProgressBarFactory.progressBars.set(name, handler);
|
|
19
20
|
return handler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressBars.js","sourceRoot":"","sources":["../../../../src/plugins/resource/bot/progressBars.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAIlC,MAAa,kBAAkB;IAItB,MAAM,CAAC,KAAK,CAAC,cAAc,CAChC,IAAY,EACZ,SAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"progressBars.js","sourceRoot":"","sources":["../../../../src/plugins/resource/bot/progressBars.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAIlC,MAAa,kBAAkB;IAItB,MAAM,CAAC,KAAK,CAAC,cAAc,CAChC,IAAY,EACZ,SAAiB,EACjB,OAAmC;;QAEnC,IAAI,kBAAkB,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC7C,MAAM,OAAO,GAAG,kBAAkB,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAE1D,MAAM,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,IAAI,CAAC,CAAA,CAAC;YAEzB,OAAO,OAAO,CAAC;SAChB;QAED,MAAM,OAAO,GACX,CAAA,MAAC,OAAyB,CAAC,EAAE,0CAAE,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC;aACjE,MAAC,OAAsB,CAAC,eAAe,0CAAE,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA,CAAC;QAC9E,IAAI,CAAC,OAAO,EAAE;YACZ,MAAA,OAAO,CAAC,WAAW,0CAAE,OAAO,CAAC,mCAAmC,IAAI,GAAG,CAAC,CAAC;SAC1E;QAED,kBAAkB,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEnD,OAAO,OAAO,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,OAAgB,EAAE,IAAa;;QAClE,IAAI,IAAI,EAAE;YACR,MAAM,CAAA,MAAA,kBAAkB,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,GAAG,CAAC,OAAO,CAAC,CAAA,CAAC;SAC/D;aAAM;YACL,KAAK,MAAM,GAAG,IAAI,kBAAkB,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE;gBACxD,MAAM,CAAA,MAAA,kBAAkB,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,0CAAE,GAAG,CAAC,OAAO,CAAC,CAAA,CAAC;aAC9D;SACF;IACH,CAAC;;AArCH,gDAsCC;AArCC,kCAAkC;AACnB,+BAAY,GAA8C,IAAI,GAAG,EAAE,CAAC"}
|
|
@@ -72,8 +72,5 @@ export declare class Messages {
|
|
|
72
72
|
static readonly ReopenWorkingDir: (path?: string) => string;
|
|
73
73
|
static readonly PostProvisioningStart = "Start to Post Provision.";
|
|
74
74
|
static readonly SuccessfullyPostProvisionedBot = "Successfully post-provisioned bot.";
|
|
75
|
-
static readonly StartMigrateV1Project: (name: string) => string;
|
|
76
|
-
static readonly EndMigrateV1Project: (name: string) => string;
|
|
77
|
-
static readonly RollbackToV1Project: string;
|
|
78
75
|
}
|
|
79
76
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/resources/messages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/resources/messages.ts"],"names":[],"mappings":"AAGA,qBAAa,QAAQ;IACnB,gBAAuB,2BAA2B,cAAe,MAAM,SAAS,MAAM,KAAG,MAAM,CACzC;IACtD,gBAAuB,2BAA2B,cAAe,MAAM,KAAG,MAAM,CAC7B;IACnD,gBAAuB,kBAAkB,cAAe,MAAM,KAAG,MAAM,CACxC;IAC/B,gBAAuB,mBAAmB,cAAe,MAAM,KAAG,MAAM,CACvC;IACjC,gBAAuB,sBAAsB,cAAe,MAAM,KAAG,MAAM,CACvC;IACpC,gBAAuB,wBAAwB,cAAe,MAAM,KAAG,MAAM,CACtC;IACvC,gBAAuB,sBAAsB,eAAgB,MAAM,KAAG,MAAM,CACtC;IACtC,gBAAuB,2BAA2B,aAAc,MAAM,KAAG,MAAM,CACxC;IACvC,gBAAuB,mBAAmB,cAAe,MAAM,KAAG,MAAM,CACvB;IACjD,gBAAuB,+BAA+B,4CAA4C;IAClG,gBAAuB,iBAAiB,gCAAgC;IACxE,gBAAuB,2BAA2B,aAAc,MAAM,KAAG,MAAM,CACrB;IAC1D,gBAAuB,kBAAkB,QAAS,MAAM,KAAG,MAAM,CAC3B;IACtC,gBAAuB,sBAAsB,cAAe,MAAM,UAAU,MAAM,KAAG,MAAM,CACpC;IACvD,gBAAuB,yBAAyB,sDACK;IACrD,gBAAuB,6BAA6B,6DACQ;IAC5D,gBAAuB,sBAAsB,YAAa,MAAM,KAAG,MAAM,CACzC;IAChC,gBAAuB,cAAc,QAAS,MAAM,aAAa,MAAM,KAAG,MAAM,CAC5B;IACpD,gBAAuB,oCAAoC,2EACe;IAC1E,gBAAuB,gCAAgC,WAAY,MAAM,KAAG,MAAM,CAC3B;IACvD,gBAAuB,gCAAgC,6CACX;IAC5C,gBAAuB,qBAAqB,OAAQ,MAAM,KAAG,MAAM,CACE;IACrE,gBAAuB,gBAAgB,UAAW,MAAM,KAAG,M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B,mCAAmC,+FACoC;IAC9F,gBAAuB,aAAa,sCAAsC;IAC1E,gBAAuB,kBAAkB,kCAAkC;IAC3E,gBAAuB,+BAA+B,wDACC;IACvD,gBAAuB,oCAAoC,6DACC;IAC5D,gBAAuB,mCAAmC,qHAC0D;IACpH,gBAAuB,yBAAyB,mEACkB;IAClE,gBAAuB,kBAAkB,sBAAuB,MAAM,EAAE,KAAG,MAAM,CACa;IAC9F,gBAAuB,gBAAgB,qBAAgB,MAAM,CACqE;IAClI,gBAAuB,qBAAqB,8BAA8B;IAC1E,gBAAuB,8BAA8B,wCAAwC;CAC9F"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.Messages = void 0;
|
|
6
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
7
6
|
class Messages {
|
|
8
7
|
}
|
|
9
8
|
exports.Messages = Messages;
|
|
@@ -81,8 +80,4 @@ Messages.RegisterRequiredRP = (resourceProviders) => `Register ${resourceProvide
|
|
|
81
80
|
Messages.ReopenWorkingDir = (path = "") => `Please check whether the path ${path} exists and you have write access to it, if no, please move the project to a valid path.`;
|
|
82
81
|
Messages.PostProvisioningStart = "Start to Post Provision.";
|
|
83
82
|
Messages.SuccessfullyPostProvisionedBot = "Successfully post-provisioned bot.";
|
|
84
|
-
// for the use of migrating v1 project
|
|
85
|
-
Messages.StartMigrateV1Project = (name) => `Migrating '${name}'.`;
|
|
86
|
-
Messages.EndMigrateV1Project = (name) => `Successfully migrated '${name}'.`;
|
|
87
|
-
Messages.RollbackToV1Project = `Rollback your project from '${teamsfx_api_1.ArchiveFolderName}' folder.`;
|
|
88
83
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/resources/messages.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/resources/messages.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,MAAa,QAAQ;;AAArB,4BAqIC;AApIwB,oCAA2B,GAAG,CAAC,SAAiB,EAAE,KAAa,EAAU,EAAE,CAChG,IAAI,SAAS,6BAA6B,KAAK,IAAI,CAAC;AAC/B,oCAA2B,GAAG,CAAC,SAAiB,EAAU,EAAE,CACjF,mCAAmC,SAAS,IAAI,CAAC;AAC5B,2BAAkB,GAAG,CAAC,SAAiB,EAAU,EAAE,CACxE,IAAI,SAAS,eAAe,CAAC;AACR,4BAAmB,GAAG,CAAC,SAAiB,EAAU,EAAE,CACzE,IAAI,SAAS,iBAAiB,CAAC;AACV,+BAAsB,GAAG,CAAC,SAAiB,EAAU,EAAE,CAC5E,IAAI,SAAS,oBAAoB,CAAC;AACb,iCAAwB,GAAG,CAAC,SAAiB,EAAU,EAAE,CAC9E,IAAI,SAAS,uBAAuB,CAAC;AAChB,+BAAsB,GAAG,CAAC,UAAkB,EAAU,EAAE,CAC7E,qBAAqB,UAAU,IAAI,CAAC;AACf,oCAA2B,GAAG,CAAC,QAAgB,EAAU,EAAE,CAChF,wBAAwB,QAAQ,IAAI,CAAC;AAChB,4BAAmB,GAAG,CAAC,SAAiB,EAAU,EAAE,CACzE,iCAAiC,SAAS,IAAI,CAAC;AAC1B,wCAA+B,GAAG,wCAAwC,CAAC;AAC3E,0BAAiB,GAAG,4BAA4B,CAAC;AACjD,oCAA2B,GAAG,CAAC,QAAgB,EAAU,EAAE,CAChF,2CAA2C,QAAQ,IAAI,CAAC;AACnC,2BAAkB,GAAG,CAAC,GAAW,EAAU,EAAE,CAClE,4BAA4B,GAAG,IAAI,CAAC;AACf,+BAAsB,GAAG,CAAC,SAAiB,EAAE,MAAc,EAAU,EAAE,CAC5F,uBAAuB,SAAS,UAAU,MAAM,IAA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uCAA8B,GAAG,oCAAoC,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export declare class CommonStrings {
|
|
2
2
|
static readonly BOT_WORKING_DIR_NAME = "bot";
|
|
3
3
|
static readonly DEFAULT_FILE_ENCODING = "utf-8";
|
|
4
|
-
static readonly NODE_PACKAGE_FOLDER_NAME = "node_modules";
|
|
5
4
|
static readonly APP_SERVICE_PLAN = "App Service plan";
|
|
6
5
|
static readonly AZURE_WEB_APP = "Azure Web App";
|
|
7
6
|
static readonly BOT_CHANNEL_REGISTRATION = "Azure Bot Service channel registration";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/resources/strings.ts"],"names":[],"mappings":"AAEA,qBAAa,aAAa;IACxB,gBAAuB,oBAAoB,SAAS;IACpD,gBAAuB,qBAAqB,WAAW;
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/resources/strings.ts"],"names":[],"mappings":"AAEA,qBAAa,aAAa;IACxB,gBAAuB,oBAAoB,SAAS;IACpD,gBAAuB,qBAAqB,WAAW;IAEvD,gBAAuB,gBAAgB,sBAAsB;IAC7D,gBAAuB,aAAa,mBAAmB;IACvD,gBAAuB,wBAAwB,4CAA4C;IAC3F,gBAAuB,gBAAgB,mBAAmB;IAC1D,gBAAuB,OAAO,aAAa;IAC3C,gBAAuB,iBAAiB,uBAAuB;IAC/D,gBAAuB,0BAA0B,iCAAiC;IAClF,gBAAuB,sBAAsB,iCAAiC;IAC9E,gBAAuB,WAAW,iBAAiB;IACnD,gBAAuB,cAAc,oBAAoB;IACzD,gBAAuB,wBAAwB,aAAa;IAC5D,gBAAuB,qBAAqB,sBAAsB;IAClE,gBAAuB,YAAY,cAAc;IACjD,gBAAuB,uBAAuB,mBAAmB;CAClE;AAED,qBAAa,SAAS;IACpB,gBAAuB,WAAW,mCAAmC;IACrE,gBAAuB,SA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ommonStrings;
|
|
9
9
|
CommonStrings.BOT_WORKING_DIR_NAME = "bot";
|
|
10
10
|
CommonStrings.DEFAULT_FILE_ENCODING = "utf-8";
|
|
11
|
-
// for the use of migrating v1 project
|
|
12
|
-
CommonStrings.NODE_PACKAGE_FOLDER_NAME = "node_modules";
|
|
13
11
|
CommonStrings.APP_SERVICE_PLAN = "App Service plan";
|
|
14
12
|
CommonStrings.AZURE_WEB_APP = "Azure Web App";
|
|
15
13
|
CommonStrings.BOT_CHANNEL_REGISTRATION = "Azure Bot Service channel registration";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/resources/strings.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,MAAa,aAAa;;AAA1B,
|
|
1
|
+
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/resources/strings.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,MAAa,aAAa;;AAA1B,sCAkBC;AAjBwB,kCAAoB,GAAG,KAAK,CAAC;AAC7B,mCAAqB,GAAG,OAAO,CAAC;AAEhC,8BAAgB,GAAG,kBAAkB,CAAC;AACtC,2BAAa,GAAG,eAAe,CAAC;AAChC,sCAAwB,GAAG,wCAAwC,CAAC;AACpE,8BAAgB,GAAG,eAAe,CAAC;AACnC,qBAAO,GAAG,SAAS,CAAC;AACpB,+BAAiB,GAAG,mBAAmB,CAAC;AACxC,wCAA0B,GAAG,6BAA6B,CAAC;AAC3D,oCAAsB,GAAG,6BAA6B,CAAC;AACvD,yBAAW,GAAG,aAAa,CAAC;AAC5B,4BAAc,GAAG,gBAAgB,CAAC;AAClC,sCAAwB,GAAG,SAAS,CAAC;AACrC,mCAAqB,GAAG,kBAAkB,CAAC;AAC3C,0BAAY,GAAG,UAAU,CAAC;AAC1B,qCAAuB,GAAG,eAAe,CAAC;AAGnE,MAAa,SAAS;;A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BAAY,GAAG,cAAc,CAAC;AAC9B,8BAAkB,GAAG,oBAAoB,CAAC;AAE1C,2BAAe,GAAG,kBAAkB,CAAC;AAErC,sCAA0B,GAAG,8BAA8B,CAAC;AAC5D,4BAAgB,GAAG,kBAAkB,CAAC;AAG/D,MAAa,QAAQ;;AAArB,4BAGC;AAFwB,oBAAW,GAAG,aAAa,CAAC;AAC5B,kBAAS,GAAG,eAAe,CAAC;AAGrD,MAAa,WAAW;;AAAxB,kCAGC;AAFwB,gCAAoB,GAAG,mBAAmB,CAAC;AAC3C,8BAAkB,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UserError } from "@microsoft/teamsfx-api";
|
|
2
|
+
export declare class PreconditionError extends UserError {
|
|
3
|
+
constructor(message: string, suggestions: string[]);
|
|
4
|
+
}
|
|
5
|
+
export declare class TemplateZipFallbackError extends UserError {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
export declare class UnzipError extends UserError {
|
|
9
|
+
constructor(path?: string);
|
|
10
|
+
}
|
|
11
|
+
export declare function CheckThrowSomethingMissing(name: string, value: any): void;
|
|
12
|
+
export declare class PackDirectoryExistenceError extends UserError {
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/v3/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAInD,qBAAa,iBAAkB,SAAQ,SAAS;gBAClC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE;CAOnD;AAED,qBAAa,wBAAyB,SAAQ,SAAS;;CAWtD;AAED,qBAAa,UAAW,SAAQ,SAAS;gBAC3B,IAAI,CAAC,EAAE,MAAM;CAW1B;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAIzE;AAED,qBAAa,2BAA4B,SAAQ,SAAS;;CAUzD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PackDirectoryExistenceError = exports.CheckThrowSomethingMissing = exports.UnzipError = exports.TemplateZipFallbackError = exports.PreconditionError = void 0;
|
|
4
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
5
|
+
const messages_1 = require("../resources/messages");
|
|
6
|
+
const result_1 = require("../result");
|
|
7
|
+
class PreconditionError extends teamsfx_api_1.UserError {
|
|
8
|
+
constructor(message, suggestions) {
|
|
9
|
+
super(new.target.name, `${message}. Suggestions: ${suggestions.join(" ")}`, result_1.FxBotPluginResultFactory.source);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.PreconditionError = PreconditionError;
|
|
13
|
+
class TemplateZipFallbackError extends teamsfx_api_1.UserError {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(new.target.name, `Failed to download zip package and open local zip package. Suggestions: ${[
|
|
16
|
+
messages_1.Messages.CheckOutputLogAndTryToFix,
|
|
17
|
+
messages_1.Messages.RetryTheCurrentStep,
|
|
18
|
+
].join(" ")}`, result_1.FxBotPluginResultFactory.source);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.TemplateZipFallbackError = TemplateZipFallbackError;
|
|
22
|
+
class UnzipError extends teamsfx_api_1.UserError {
|
|
23
|
+
constructor(path) {
|
|
24
|
+
super(new.target.name, `Failed to unzip templates and write to disk. Suggestions: ${[
|
|
25
|
+
messages_1.Messages.CheckOutputLogAndTryToFix,
|
|
26
|
+
messages_1.Messages.ReopenWorkingDir(path),
|
|
27
|
+
messages_1.Messages.RetryTheCurrentStep,
|
|
28
|
+
].join(" ")}`, result_1.FxBotPluginResultFactory.source);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.UnzipError = UnzipError;
|
|
32
|
+
function CheckThrowSomethingMissing(name, value) {
|
|
33
|
+
if (!value) {
|
|
34
|
+
throw new PreconditionError(messages_1.Messages.SomethingIsMissing(name), [messages_1.Messages.RetryTheCurrentStep]);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.CheckThrowSomethingMissing = CheckThrowSomethingMissing;
|
|
38
|
+
class PackDirectoryExistenceError extends teamsfx_api_1.UserError {
|
|
39
|
+
constructor() {
|
|
40
|
+
super(new.target.name, `${messages_1.Messages.SomethingIsNotExisting("pack directory")} Suggestions: ${[
|
|
41
|
+
messages_1.Messages.RecreateTheProject,
|
|
42
|
+
].join(" ")}`, result_1.FxBotPluginResultFactory.source);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.PackDirectoryExistenceError = PackDirectoryExistenceError;
|
|
46
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/v3/error.ts"],"names":[],"mappings":";;;AAAA,wDAAmD;AACnD,oDAAiD;AACjD,sCAAqD;AAErD,MAAa,iBAAkB,SAAQ,uBAAS;IAC9C,YAAY,OAAe,EAAE,WAAqB;QAChD,KAAK,CACH,GAAG,CAAC,MAAM,CAAC,IAAI,EACf,GAAG,OAAO,kBAAkB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACnD,iCAAwB,CAAC,MAAM,CAChC,CAAC;IACJ,CAAC;CACF;AARD,8CAQC;AAED,MAAa,wBAAyB,SAAQ,uBAAS;IACrD;QACE,KAAK,CACH,GAAG,CAAC,MAAM,CAAC,IAAI,EACf,2EAA2E;YACzE,mBAAQ,CAAC,yBAAyB;YAClC,mBAAQ,CAAC,mBAAmB;SAC7B,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACb,iCAAwB,CAAC,MAAM,CAChC,CAAC;IACJ,CAAC;CACF;AAXD,4DAWC;AAED,MAAa,UAAW,SAAQ,uBAAS;IACvC,YAAY,IAAa;QACvB,KAAK,CACH,GAAG,CAAC,MAAM,CAAC,IAAI,EACf,6DAA6D;YAC3D,mBAAQ,CAAC,yBAAyB;YAClC,mBAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC;YAC/B,mBAAQ,CAAC,mBAAmB;SAC7B,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACb,iCAAwB,CAAC,MAAM,CAChC,CAAC;IACJ,CAAC;CACF;AAZD,gCAYC;AAED,SAAgB,0BAA0B,CAAC,IAAY,EAAE,KAAU;IACjE,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,iBAAiB,CAAC,mBAAQ,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,mBAAQ,CAAC,mBAAmB,CAAC,CAAC,CAAC;KAChG;AACH,CAAC;AAJD,gEAIC;AAED,MAAa,2BAA4B,SAAQ,uBAAS;IACxD;QACE,KAAK,CACH,GAAG,CAAC,MAAM,CAAC,IAAI,EACf,GAAG,mBAAQ,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,iBAAiB;YACnE,mBAAQ,CAAC,kBAAkB;SAC5B,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACb,iCAAwB,CAAC,MAAM,CAChC,CAAC;IACJ,CAAC;CACF;AAVD,kEAUC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FxError, Result, TokenProvider, v2, v3, Void } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { ProgrammingLanguage } from "../enums/programmingLanguage";
|
|
3
|
+
export declare class NodeJSBotPluginV3 implements v3.PluginV3 {
|
|
4
|
+
name: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
getProgrammingLanguage(ctx: v2.Context): ProgrammingLanguage;
|
|
7
|
+
getLangKey(ctx: v2.Context): string;
|
|
8
|
+
generateCode(ctx: v3.ContextWithManifestProvider, inputs: v2.InputsWithProjectPath): Promise<Result<Void, FxError>>;
|
|
9
|
+
generateBicep(ctx: v3.ContextWithManifestProvider, inputs: v3.AddFeatureInputs): Promise<Result<v3.BicepTemplate[], FxError>>;
|
|
10
|
+
addInstance(ctx: v3.ContextWithManifestProvider, inputs: v2.InputsWithProjectPath): Promise<Result<string[], FxError>>;
|
|
11
|
+
updateBicep(ctx: v3.ContextWithManifestProvider, inputs: v3.UpdateInputs): Promise<Result<v3.BicepTemplate[], FxError>>;
|
|
12
|
+
private getAzureAccountCredential;
|
|
13
|
+
private createOrGetBotAppRegistration;
|
|
14
|
+
provisionResource(ctx: v2.Context, inputs: v2.InputsWithProjectPath, envInfo: v3.EnvInfoV3, tokenProvider: TokenProvider): Promise<Result<Void, FxError>>;
|
|
15
|
+
private updateMessageEndpointOnAppStudio;
|
|
16
|
+
configureResource(ctx: v2.Context, inputs: v2.InputsWithProjectPath, envInfo: v3.EnvInfoV3, tokenProvider: TokenProvider): Promise<Result<Void, FxError>>;
|
|
17
|
+
deploy(ctx: v2.Context, inputs: v2.InputsWithProjectPath, envInfo: v2.DeepReadonly<v3.EnvInfoV3>, tokenProvider: TokenProvider): Promise<Result<Void, FxError>>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/resource/bot/v3/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,OAAO,EAEP,MAAM,EACN,aAAa,EACb,EAAE,EACF,EAAE,EACF,IAAI,EACL,MAAM,wBAAwB,CAAC;AAkDhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAUnE,qBACa,iBAAkB,YAAW,EAAE,CAAC,QAAQ;IACnD,IAAI,SAAiC;IACrC,WAAW,SAAgB;IAC3B,sBAAsB,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,GAAG,mBAAmB;IAU5D,UAAU,CAAC,GAAG,E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BAAqB,EAChC,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,EACtC,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;CAgGlC"}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.NodeJSBotPluginV3 = void 0;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const hooks_1 = require("@feathersjs/hooks");
|
|
8
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
9
|
+
const path = tslib_1.__importStar(require("path"));
|
|
10
|
+
const typedi_1 = require("typedi");
|
|
11
|
+
const constants_1 = require("../../../../common/constants");
|
|
12
|
+
const tools_1 = require("../../../../common/tools");
|
|
13
|
+
const CommonErrorHandlerMW_1 = require("../../../../core/middleware/CommonErrorHandlerMW");
|
|
14
|
+
const folder_1 = require("../../../../folder");
|
|
15
|
+
const question_1 = require("../../../solution/fx-solution/question");
|
|
16
|
+
const constants_2 = require("../../../solution/fx-solution/v3/constants");
|
|
17
|
+
const constants_3 = require("../constants");
|
|
18
|
+
const languageStrategy_1 = require("../languageStrategy");
|
|
19
|
+
const progressBars_1 = require("../progressBars");
|
|
20
|
+
const messages_1 = require("../resources/messages");
|
|
21
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
22
|
+
const strings_1 = require("../resources/strings");
|
|
23
|
+
const factory = tslib_1.__importStar(require("../clientFactory"));
|
|
24
|
+
const resourceNameFactory_1 = require("../utils/resourceNameFactory");
|
|
25
|
+
const aadRegistration_1 = require("../aadRegistration");
|
|
26
|
+
const appStudio_1 = require("../appStudio/appStudio");
|
|
27
|
+
const deployMgr_1 = require("../deployMgr");
|
|
28
|
+
const utils = tslib_1.__importStar(require("../utils/common"));
|
|
29
|
+
const appService = tslib_1.__importStar(require("@azure/arm-appservice"));
|
|
30
|
+
const azureOps_1 = require("../azureOps");
|
|
31
|
+
const zipDeploy_1 = require("../utils/zipDeploy");
|
|
32
|
+
const templatesActions_1 = require("../../../../common/template-utils/templatesActions");
|
|
33
|
+
const programmingLanguage_1 = require("../enums/programmingLanguage");
|
|
34
|
+
const error_1 = require("./error");
|
|
35
|
+
const solutionSettingsHelper_1 = require("../../../solution/fx-solution/utils/solutionSettingsHelper");
|
|
36
|
+
let NodeJSBotPluginV3 = class NodeJSBotPluginV3 {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.name = constants_2.BuiltInFeaturePluginNames.bot;
|
|
39
|
+
this.displayName = "NodeJS Bot";
|
|
40
|
+
}
|
|
41
|
+
getProgrammingLanguage(ctx) {
|
|
42
|
+
const rawProgrammingLanguage = ctx.projectSetting.programmingLanguage;
|
|
43
|
+
if (rawProgrammingLanguage &&
|
|
44
|
+
utils.existsInEnumValues(rawProgrammingLanguage, programmingLanguage_1.ProgrammingLanguage)) {
|
|
45
|
+
return rawProgrammingLanguage;
|
|
46
|
+
}
|
|
47
|
+
return programmingLanguage_1.ProgrammingLanguage.JavaScript;
|
|
48
|
+
}
|
|
49
|
+
getLangKey(ctx) {
|
|
50
|
+
const rawProgrammingLanguage = ctx.projectSetting.programmingLanguage;
|
|
51
|
+
if (rawProgrammingLanguage &&
|
|
52
|
+
utils.existsInEnumValues(rawProgrammingLanguage, programmingLanguage_1.ProgrammingLanguage)) {
|
|
53
|
+
const programmingLanguage = rawProgrammingLanguage;
|
|
54
|
+
return utils.convertToLangKey(programmingLanguage);
|
|
55
|
+
}
|
|
56
|
+
return "js";
|
|
57
|
+
}
|
|
58
|
+
async generateCode(ctx, inputs) {
|
|
59
|
+
ctx.logProvider.info(messages_1.Messages.ScaffoldingBot);
|
|
60
|
+
const solutionSettings = ctx.projectSetting.solutionSettings;
|
|
61
|
+
if (solutionSettings.activeResourcePlugins.includes(this.name))
|
|
62
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
63
|
+
const handler = await progressBars_1.ProgressBarFactory.newProgressBar(constants_3.ProgressBarConstants.SCAFFOLD_TITLE, constants_3.ProgressBarConstants.SCAFFOLD_STEPS_NUM, ctx);
|
|
64
|
+
await (handler === null || handler === void 0 ? void 0 : handler.start(constants_3.ProgressBarConstants.SCAFFOLD_STEP_START));
|
|
65
|
+
const group_name = constants_3.TemplateProjectsConstants.GROUP_NAME_BOT_MSGEXT;
|
|
66
|
+
const lang = this.getLangKey(ctx);
|
|
67
|
+
const workingDir = path.join(inputs.projectPath, strings_1.CommonStrings.BOT_WORKING_DIR_NAME);
|
|
68
|
+
await (handler === null || handler === void 0 ? void 0 : handler.next(constants_3.ProgressBarConstants.SCAFFOLD_STEP_FETCH_ZIP));
|
|
69
|
+
await templatesActions_1.scaffoldFromTemplates({
|
|
70
|
+
group: group_name,
|
|
71
|
+
lang: lang,
|
|
72
|
+
scenario: constants_3.TemplateProjectsConstants.DEFAULT_SCENARIO_NAME,
|
|
73
|
+
templatesFolderName: constants_3.TemplateProjectsConstants.TEMPLATE_FOLDER_NAME,
|
|
74
|
+
dst: workingDir,
|
|
75
|
+
onActionEnd: async (action, context) => {
|
|
76
|
+
var _a;
|
|
77
|
+
if (action.name === templatesActions_1.ScaffoldActionName.FetchTemplatesUrlWithTag) {
|
|
78
|
+
ctx.logProvider.info(messages_1.Messages.SuccessfullyRetrievedTemplateZip((_a = context.zipUrl) !== null && _a !== void 0 ? _a : ""));
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
onActionError: async (action, context, error) => {
|
|
82
|
+
ctx.logProvider.info(error.toString());
|
|
83
|
+
switch (action.name) {
|
|
84
|
+
case templatesActions_1.ScaffoldActionName.FetchTemplatesUrlWithTag:
|
|
85
|
+
case templatesActions_1.ScaffoldActionName.FetchTemplatesZipFromUrl:
|
|
86
|
+
ctx.logProvider.info(messages_1.Messages.FallingBackToUseLocalTemplateZip);
|
|
87
|
+
break;
|
|
88
|
+
case templatesActions_1.ScaffoldActionName.FetchTemplateZipFromLocal:
|
|
89
|
+
throw new error_1.TemplateZipFallbackError();
|
|
90
|
+
case templatesActions_1.ScaffoldActionName.Unzip:
|
|
91
|
+
throw new error_1.UnzipError(context.dst);
|
|
92
|
+
default:
|
|
93
|
+
throw new Error(error.message);
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
ctx.logProvider.info(messages_1.Messages.SuccessfullyScaffoldedBot);
|
|
98
|
+
handler === null || handler === void 0 ? void 0 : handler.end(true);
|
|
99
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
100
|
+
}
|
|
101
|
+
async generateBicep(ctx, inputs) {
|
|
102
|
+
const solutionSettings = ctx.projectSetting.solutionSettings;
|
|
103
|
+
if (solutionSettings.activeResourcePlugins.includes(this.name))
|
|
104
|
+
return teamsfx_api_1.ok([]);
|
|
105
|
+
const pluginCtx = { plugins: inputs.allPluginsAfterAdd };
|
|
106
|
+
const bicepTemplateDir = path.join(folder_1.getTemplatesFolder(), constants_3.PathInfo.BicepTemplateRelativeDir);
|
|
107
|
+
const provisionOrchestration = await tools_1.generateBicepFromFile(path.join(bicepTemplateDir, constants_1.Bicep.ProvisionFileName), pluginCtx);
|
|
108
|
+
const provisionModules = await tools_1.generateBicepFromFile(path.join(bicepTemplateDir, constants_3.PathInfo.ProvisionModuleTemplateFileName), pluginCtx);
|
|
109
|
+
const configOrchestration = await tools_1.generateBicepFromFile(path.join(bicepTemplateDir, constants_1.Bicep.ConfigFileName), pluginCtx);
|
|
110
|
+
const configModule = await tools_1.generateBicepFromFile(path.join(bicepTemplateDir, constants_3.PathInfo.ConfigurationModuleTemplateFileName), pluginCtx);
|
|
111
|
+
const result = {
|
|
112
|
+
Provision: {
|
|
113
|
+
Orchestration: provisionOrchestration,
|
|
114
|
+
Modules: { bot: provisionModules },
|
|
115
|
+
},
|
|
116
|
+
Configuration: {
|
|
117
|
+
Orchestration: configOrchestration,
|
|
118
|
+
Modules: { bot: configModule },
|
|
119
|
+
},
|
|
120
|
+
Reference: {
|
|
121
|
+
resourceId: constants_3.BotBicep.resourceId,
|
|
122
|
+
hostName: constants_3.BotBicep.hostName,
|
|
123
|
+
webAppEndpoint: constants_3.BotBicep.webAppEndpoint,
|
|
124
|
+
},
|
|
125
|
+
Parameters: JSON.parse(await fs_extra_1.default.readFile(path.join(bicepTemplateDir, constants_1.Bicep.ParameterFileName), constants_1.ConstantString.UTF8Encoding)),
|
|
126
|
+
};
|
|
127
|
+
return teamsfx_api_1.ok([result]);
|
|
128
|
+
}
|
|
129
|
+
async addInstance(ctx, inputs) {
|
|
130
|
+
solutionSettingsHelper_1.ensureSolutionSettings(ctx.projectSetting);
|
|
131
|
+
const solutionSettings = ctx.projectSetting.solutionSettings;
|
|
132
|
+
const capabilities = solutionSettings.capabilities;
|
|
133
|
+
const newCapabilitySet = new Set();
|
|
134
|
+
capabilities.forEach((c) => newCapabilitySet.add(c));
|
|
135
|
+
const activeResourcePlugins = solutionSettings.activeResourcePlugins;
|
|
136
|
+
const capabilitiesToAddManifest = [];
|
|
137
|
+
const capabilitiesAnswer = inputs[question_1.AzureSolutionQuestionNames.Capabilities];
|
|
138
|
+
if (capabilitiesAnswer.includes(question_1.BotOptionItem.id)) {
|
|
139
|
+
capabilitiesToAddManifest.push({ name: "Bot" });
|
|
140
|
+
newCapabilitySet.add(question_1.BotOptionItem.id);
|
|
141
|
+
}
|
|
142
|
+
if (capabilitiesAnswer.includes(question_1.MessageExtensionItem.id)) {
|
|
143
|
+
capabilitiesToAddManifest.push({ name: "MessageExtension" });
|
|
144
|
+
newCapabilitySet.add(question_1.MessageExtensionItem.id);
|
|
145
|
+
}
|
|
146
|
+
const update = await ctx.appManifestProvider.addCapabilities(ctx, inputs, capabilitiesToAddManifest);
|
|
147
|
+
if (update.isErr())
|
|
148
|
+
return teamsfx_api_1.err(update.error);
|
|
149
|
+
solutionSettings.capabilities = Array.from(newCapabilitySet);
|
|
150
|
+
if (!activeResourcePlugins.includes(this.name))
|
|
151
|
+
activeResourcePlugins.push(this.name);
|
|
152
|
+
return teamsfx_api_1.ok([constants_2.BuiltInFeaturePluginNames.identity]);
|
|
153
|
+
}
|
|
154
|
+
async updateBicep(ctx, inputs) {
|
|
155
|
+
const pluginCtx = { plugins: inputs.allPluginsAfterAdd };
|
|
156
|
+
const bicepTemplateDir = path.join(folder_1.getTemplatesFolder(), constants_3.PathInfo.BicepTemplateRelativeDir);
|
|
157
|
+
const configModule = await tools_1.generateBicepFromFile(path.join(bicepTemplateDir, constants_3.PathInfo.ConfigurationModuleTemplateFileName), pluginCtx);
|
|
158
|
+
const result = {
|
|
159
|
+
Reference: {
|
|
160
|
+
resourceId: constants_3.BotBicep.resourceId,
|
|
161
|
+
hostName: constants_3.BotBicep.hostName,
|
|
162
|
+
webAppEndpoint: constants_3.BotBicep.webAppEndpoint,
|
|
163
|
+
},
|
|
164
|
+
Configuration: {
|
|
165
|
+
Modules: { bot: configModule },
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
return teamsfx_api_1.ok([result]);
|
|
169
|
+
}
|
|
170
|
+
async getAzureAccountCredential(tokenProvider) {
|
|
171
|
+
const serviceClientCredentials = await tokenProvider.getAccountCredentialAsync();
|
|
172
|
+
if (!serviceClientCredentials) {
|
|
173
|
+
throw new error_1.PreconditionError(messages_1.Messages.FailToGetAzureCreds, [messages_1.Messages.TryLoginAzure]);
|
|
174
|
+
}
|
|
175
|
+
return serviceClientCredentials;
|
|
176
|
+
}
|
|
177
|
+
async createOrGetBotAppRegistration(ctx, envInfo, tokenProvider) {
|
|
178
|
+
const token = await tokenProvider.graphTokenProvider.getAccessToken();
|
|
179
|
+
error_1.CheckThrowSomethingMissing(strings_1.ConfigNames.GRAPH_TOKEN, token);
|
|
180
|
+
error_1.CheckThrowSomethingMissing(strings_1.CommonStrings.SHORT_APP_NAME, ctx.projectSetting.appName);
|
|
181
|
+
let botConfig = envInfo.state[this.name];
|
|
182
|
+
if (!botConfig)
|
|
183
|
+
botConfig = {};
|
|
184
|
+
botConfig = botConfig;
|
|
185
|
+
const botAADCreated = (botConfig === null || botConfig === void 0 ? void 0 : botConfig.botId) !== undefined && (botConfig === null || botConfig === void 0 ? void 0 : botConfig.botPassword) !== undefined;
|
|
186
|
+
if (!botAADCreated) {
|
|
187
|
+
const solutionConfig = envInfo === null || envInfo === void 0 ? void 0 : envInfo.state.solution;
|
|
188
|
+
const resourceNameSuffix = solutionConfig.resourceNameSuffix
|
|
189
|
+
? solutionConfig.resourceNameSuffix
|
|
190
|
+
: utils.genUUID();
|
|
191
|
+
const aadDisplayName = resourceNameFactory_1.ResourceNameFactory.createCommonName(resourceNameSuffix, ctx.projectSetting.appName, constants_3.MaxLengths.AAD_DISPLAY_NAME);
|
|
192
|
+
const botAuthCreds = await aadRegistration_1.AADRegistration.registerAADAppAndGetSecretByGraph(token, aadDisplayName, botConfig.objectId, botConfig.botId);
|
|
193
|
+
botConfig.botId = botAuthCreds.clientId;
|
|
194
|
+
botConfig.botPassword = botAuthCreds.clientSecret;
|
|
195
|
+
botConfig.objectId = botAuthCreds.objectId;
|
|
196
|
+
ctx.logProvider.info(messages_1.Messages.SuccessfullyCreatedBotAadApp);
|
|
197
|
+
}
|
|
198
|
+
if (envInfo.envName === "local") {
|
|
199
|
+
// 2. Register bot by app studio.
|
|
200
|
+
const botReg = {
|
|
201
|
+
botId: botConfig.botId,
|
|
202
|
+
name: ctx.projectSetting.appName + strings_1.PluginLocalDebug.LOCAL_DEBUG_SUFFIX,
|
|
203
|
+
description: "",
|
|
204
|
+
iconUrl: "",
|
|
205
|
+
messagingEndpoint: "",
|
|
206
|
+
callingEndpoint: "",
|
|
207
|
+
};
|
|
208
|
+
ctx.logProvider.info(messages_1.Messages.ProvisioningBotRegistration);
|
|
209
|
+
const appStudioToken = await tokenProvider.appStudioToken.getAccessToken();
|
|
210
|
+
error_1.CheckThrowSomethingMissing(strings_1.ConfigNames.APPSTUDIO_TOKEN, appStudioToken);
|
|
211
|
+
await appStudio_1.AppStudio.createBotRegistration(appStudioToken, botReg);
|
|
212
|
+
ctx.logProvider.info(messages_1.Messages.SuccessfullyProvisionedBotRegistration);
|
|
213
|
+
}
|
|
214
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
215
|
+
}
|
|
216
|
+
async provisionResource(ctx, inputs, envInfo, tokenProvider) {
|
|
217
|
+
const botState = envInfo.state[this.name];
|
|
218
|
+
if (!botState.secretFields)
|
|
219
|
+
botState.secretFields = ["botPassword"];
|
|
220
|
+
if (envInfo.envName === "local") {
|
|
221
|
+
const handler = await progressBars_1.ProgressBarFactory.newProgressBar(constants_3.ProgressBarConstants.LOCAL_DEBUG_TITLE, constants_3.ProgressBarConstants.LOCAL_DEBUG_STEPS_NUM, ctx);
|
|
222
|
+
await (handler === null || handler === void 0 ? void 0 : handler.start(constants_3.ProgressBarConstants.LOCAL_DEBUG_STEP_START));
|
|
223
|
+
await (handler === null || handler === void 0 ? void 0 : handler.next(constants_3.ProgressBarConstants.LOCAL_DEBUG_STEP_BOT_REG));
|
|
224
|
+
await this.createOrGetBotAppRegistration(ctx, envInfo, tokenProvider);
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
ctx.logProvider.info(messages_1.Messages.ProvisioningBot);
|
|
228
|
+
// Create and register progress bar for cleanup.
|
|
229
|
+
const handler = await progressBars_1.ProgressBarFactory.newProgressBar(constants_3.ProgressBarConstants.PROVISION_TITLE, 1, ctx);
|
|
230
|
+
await (handler === null || handler === void 0 ? void 0 : handler.start(constants_3.ProgressBarConstants.PROVISION_STEP_START));
|
|
231
|
+
// 0. Check Resource Provider
|
|
232
|
+
const azureCredential = await this.getAzureAccountCredential(tokenProvider.azureAccountProvider);
|
|
233
|
+
const solutionConfig = envInfo.state.solution;
|
|
234
|
+
const rpClient = factory.createResourceProviderClient(azureCredential, solutionConfig.subscriptionId);
|
|
235
|
+
await factory.ensureResourceProvider(rpClient, constants_3.AzureConstants.requiredResourceProviders);
|
|
236
|
+
// 1. Do bot registration.
|
|
237
|
+
await (handler === null || handler === void 0 ? void 0 : handler.next(constants_3.ProgressBarConstants.PROVISION_STEP_BOT_REG));
|
|
238
|
+
await this.createOrGetBotAppRegistration(ctx, envInfo, tokenProvider);
|
|
239
|
+
await (handler === null || handler === void 0 ? void 0 : handler.end(true));
|
|
240
|
+
}
|
|
241
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
242
|
+
}
|
|
243
|
+
async updateMessageEndpointOnAppStudio(appName, tokenProvider, botId, endpoint) {
|
|
244
|
+
const appStudioToken = await tokenProvider.appStudioToken.getAccessToken();
|
|
245
|
+
error_1.CheckThrowSomethingMissing(strings_1.ConfigNames.APPSTUDIO_TOKEN, appStudioToken);
|
|
246
|
+
error_1.CheckThrowSomethingMissing(strings_1.ConfigNames.LOCAL_BOT_ID, botId);
|
|
247
|
+
const botReg = {
|
|
248
|
+
botId: botId,
|
|
249
|
+
name: appName + strings_1.PluginLocalDebug.LOCAL_DEBUG_SUFFIX,
|
|
250
|
+
description: "",
|
|
251
|
+
iconUrl: "",
|
|
252
|
+
messagingEndpoint: endpoint,
|
|
253
|
+
callingEndpoint: "",
|
|
254
|
+
};
|
|
255
|
+
await appStudio_1.AppStudio.updateMessageEndpoint(appStudioToken, botReg.botId, botReg);
|
|
256
|
+
}
|
|
257
|
+
async configureResource(ctx, inputs, envInfo, tokenProvider) {
|
|
258
|
+
if (envInfo.envName === "local") {
|
|
259
|
+
const botConfig = envInfo.state[this.name];
|
|
260
|
+
error_1.CheckThrowSomethingMissing(strings_1.ConfigNames.LOCAL_ENDPOINT, botConfig.siteEndpoint);
|
|
261
|
+
await this.updateMessageEndpointOnAppStudio(ctx.projectSetting.appName, tokenProvider, botConfig.botId, `${botConfig.siteEndpoint}${strings_1.CommonStrings.MESSAGE_ENDPOINT_SUFFIX}`);
|
|
262
|
+
}
|
|
263
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
264
|
+
}
|
|
265
|
+
async deploy(ctx, inputs, envInfo, tokenProvider) {
|
|
266
|
+
var _a;
|
|
267
|
+
ctx.logProvider.info(messages_1.Messages.PreDeployingBot);
|
|
268
|
+
// Preconditions checking.
|
|
269
|
+
const workingDir = path.join(inputs.projectPath, strings_1.CommonStrings.BOT_WORKING_DIR_NAME);
|
|
270
|
+
if (!workingDir) {
|
|
271
|
+
throw new error_1.PreconditionError(messages_1.Messages.WorkingDirIsMissing, []);
|
|
272
|
+
}
|
|
273
|
+
const packDirExisted = await fs_extra_1.default.pathExists(workingDir);
|
|
274
|
+
if (!packDirExisted) {
|
|
275
|
+
throw new error_1.PackDirectoryExistenceError();
|
|
276
|
+
}
|
|
277
|
+
const botConfig = envInfo.state[this.name];
|
|
278
|
+
const programmingLanguage = this.getProgrammingLanguage(ctx);
|
|
279
|
+
error_1.CheckThrowSomethingMissing(strings_1.ConfigNames.SITE_ENDPOINT, botConfig.siteEndpoint);
|
|
280
|
+
error_1.CheckThrowSomethingMissing(strings_1.ConfigNames.PROGRAMMING_LANGUAGE, programmingLanguage);
|
|
281
|
+
error_1.CheckThrowSomethingMissing(strings_1.ConfigNames.BOT_SERVICE_RESOURCE_ID, botConfig.botWebAppResourceId);
|
|
282
|
+
const subscriptionId = tools_1.getSubscriptionIdFromResourceId(botConfig.botWebAppResourceId);
|
|
283
|
+
const resourceGroup = tools_1.getResourceGroupNameFromResourceId(botConfig.botWebAppResourceId);
|
|
284
|
+
const siteName = tools_1.getSiteNameFromResourceId(botConfig.botWebAppResourceId);
|
|
285
|
+
error_1.CheckThrowSomethingMissing(strings_1.ConfigNames.SUBSCRIPTION_ID, subscriptionId);
|
|
286
|
+
error_1.CheckThrowSomethingMissing(strings_1.ConfigNames.RESOURCE_GROUP, resourceGroup);
|
|
287
|
+
ctx.logProvider.info(messages_1.Messages.DeployingBot);
|
|
288
|
+
const deployTimeCandidate = Date.now();
|
|
289
|
+
const deployMgr = new deployMgr_1.DeployMgr(workingDir, envInfo.envName);
|
|
290
|
+
await deployMgr.init();
|
|
291
|
+
if (!(await deployMgr.needsToRedeploy())) {
|
|
292
|
+
ctx.logProvider.debug(messages_1.Messages.SkipDeployNoUpdates);
|
|
293
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
294
|
+
}
|
|
295
|
+
const handler = await progressBars_1.ProgressBarFactory.newProgressBar(constants_3.ProgressBarConstants.DEPLOY_TITLE, constants_3.ProgressBarConstants.DEPLOY_STEPS_NUM, ctx);
|
|
296
|
+
await (handler === null || handler === void 0 ? void 0 : handler.start(constants_3.ProgressBarConstants.DEPLOY_STEP_START));
|
|
297
|
+
await (handler === null || handler === void 0 ? void 0 : handler.next(constants_3.ProgressBarConstants.DEPLOY_STEP_NPM_INSTALL));
|
|
298
|
+
const unPackFlag = (_a = envInfo.config.bot) === null || _a === void 0 ? void 0 : _a.unPackFlag;
|
|
299
|
+
await languageStrategy_1.LanguageStrategy.localBuild(programmingLanguage, workingDir, unPackFlag === "false" ? false : true);
|
|
300
|
+
await (handler === null || handler === void 0 ? void 0 : handler.next(constants_3.ProgressBarConstants.DEPLOY_STEP_ZIP_FOLDER));
|
|
301
|
+
const zipBuffer = utils.zipAFolder(workingDir, constants_3.DeployConfigs.UN_PACK_DIRS, [
|
|
302
|
+
`${constants_3.FolderNames.NODE_MODULES}/${constants_3.FolderNames.KEYTAR}`,
|
|
303
|
+
]);
|
|
304
|
+
// 2.2 Retrieve publishing credentials.
|
|
305
|
+
const webSiteMgmtClient = new appService.WebSiteManagementClient(await this.getAzureAccountCredential(tokenProvider.azureAccountProvider), subscriptionId);
|
|
306
|
+
const listResponse = await azureOps_1.AzureOperations.ListPublishingCredentials(webSiteMgmtClient, resourceGroup, siteName);
|
|
307
|
+
const publishingUserName = listResponse.publishingUserName
|
|
308
|
+
? listResponse.publishingUserName
|
|
309
|
+
: "";
|
|
310
|
+
const publishingPassword = listResponse.publishingPassword
|
|
311
|
+
? listResponse.publishingPassword
|
|
312
|
+
: "";
|
|
313
|
+
const encryptedCreds = utils.toBase64(`${publishingUserName}:${publishingPassword}`);
|
|
314
|
+
const config = {
|
|
315
|
+
headers: {
|
|
316
|
+
Authorization: `Basic ${encryptedCreds}`,
|
|
317
|
+
},
|
|
318
|
+
maxContentLength: Infinity,
|
|
319
|
+
maxBodyLength: Infinity,
|
|
320
|
+
};
|
|
321
|
+
const zipDeployEndpoint = zipDeploy_1.getZipDeployEndpoint(botConfig.siteName);
|
|
322
|
+
await (handler === null || handler === void 0 ? void 0 : handler.next(constants_3.ProgressBarConstants.DEPLOY_STEP_ZIP_DEPLOY));
|
|
323
|
+
await azureOps_1.AzureOperations.ZipDeployPackage(zipDeployEndpoint, zipBuffer, config);
|
|
324
|
+
await deployMgr.updateLastDeployTime(deployTimeCandidate);
|
|
325
|
+
await (handler === null || handler === void 0 ? void 0 : handler.end(true));
|
|
326
|
+
ctx.logProvider.info(messages_1.Messages.SuccessfullyDeployedBot);
|
|
327
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
tslib_1.__decorate([
|
|
331
|
+
hooks_1.hooks([CommonErrorHandlerMW_1.CommonErrorHandlerMW({ telemetry: { component: constants_2.BuiltInFeaturePluginNames.bot } })]),
|
|
332
|
+
tslib_1.__metadata("design:type", Function),
|
|
333
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
334
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
335
|
+
], NodeJSBotPluginV3.prototype, "generateCode", null);
|
|
336
|
+
tslib_1.__decorate([
|
|
337
|
+
hooks_1.hooks([CommonErrorHandlerMW_1.CommonErrorHandlerMW({ telemetry: { component: constants_2.BuiltInFeaturePluginNames.bot } })]),
|
|
338
|
+
tslib_1.__metadata("design:type", Function),
|
|
339
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
340
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
341
|
+
], NodeJSBotPluginV3.prototype, "generateBicep", null);
|
|
342
|
+
tslib_1.__decorate([
|
|
343
|
+
hooks_1.hooks([CommonErrorHandlerMW_1.CommonErrorHandlerMW({ telemetry: { component: constants_2.BuiltInFeaturePluginNames.bot } })]),
|
|
344
|
+
tslib_1.__metadata("design:type", Function),
|
|
345
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
346
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
347
|
+
], NodeJSBotPluginV3.prototype, "addInstance", null);
|
|
348
|
+
tslib_1.__decorate([
|
|
349
|
+
hooks_1.hooks([CommonErrorHandlerMW_1.CommonErrorHandlerMW({ telemetry: { component: constants_2.BuiltInFeaturePluginNames.bot } })]),
|
|
350
|
+
tslib_1.__metadata("design:type", Function),
|
|
351
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
352
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
353
|
+
], NodeJSBotPluginV3.prototype, "updateBicep", null);
|
|
354
|
+
tslib_1.__decorate([
|
|
355
|
+
hooks_1.hooks([CommonErrorHandlerMW_1.CommonErrorHandlerMW({ telemetry: { component: constants_2.BuiltInFeaturePluginNames.bot } })]),
|
|
356
|
+
tslib_1.__metadata("design:type", Function),
|
|
357
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object]),
|
|
358
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
359
|
+
], NodeJSBotPluginV3.prototype, "provisionResource", null);
|
|
360
|
+
tslib_1.__decorate([
|
|
361
|
+
hooks_1.hooks([CommonErrorHandlerMW_1.CommonErrorHandlerMW({ telemetry: { component: constants_2.BuiltInFeaturePluginNames.bot } })]),
|
|
362
|
+
tslib_1.__metadata("design:type", Function),
|
|
363
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object]),
|
|
364
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
365
|
+
], NodeJSBotPluginV3.prototype, "configureResource", null);
|
|
366
|
+
tslib_1.__decorate([
|
|
367
|
+
hooks_1.hooks([CommonErrorHandlerMW_1.CommonErrorHandlerMW({ telemetry: { component: constants_2.BuiltInFeaturePluginNames.bot } })]),
|
|
368
|
+
tslib_1.__metadata("design:type", Function),
|
|
369
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object]),
|
|
370
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
371
|
+
], NodeJSBotPluginV3.prototype, "deploy", null);
|
|
372
|
+
NodeJSBotPluginV3 = tslib_1.__decorate([
|
|
373
|
+
typedi_1.Service(constants_2.BuiltInFeaturePluginNames.bot)
|
|
374
|
+
], NodeJSBotPluginV3);
|
|
375
|
+
exports.NodeJSBotPluginV3 = NodeJSBotPluginV3;
|
|
376
|
+
//# sourceMappingURL=index.js.map
|