@microsoft/teamsfx-core 1.8.0 → 1.8.1-alpha.324752dff.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/azure-hosting/azureFunctionHosting.d.ts +13 -0
- package/build/common/azure-hosting/azureFunctionHosting.d.ts.map +1 -0
- package/build/common/azure-hosting/azureFunctionHosting.js +26 -0
- package/build/common/azure-hosting/azureFunctionHosting.js.map +1 -0
- package/build/common/azure-hosting/azureHosting.d.ts +14 -0
- package/build/common/azure-hosting/azureHosting.d.ts.map +1 -0
- package/build/common/azure-hosting/azureHosting.js +66 -0
- package/build/common/azure-hosting/azureHosting.js.map +1 -0
- package/build/common/azure-hosting/botServiceHosting.d.ts +7 -0
- package/build/common/azure-hosting/botServiceHosting.d.ts.map +1 -0
- package/build/common/azure-hosting/botServiceHosting.js +16 -0
- package/build/common/azure-hosting/botServiceHosting.js.map +1 -0
- package/build/common/azure-hosting/hostingFactory.d.ts +6 -0
- package/build/common/azure-hosting/hostingFactory.d.ts.map +1 -0
- package/build/common/azure-hosting/hostingFactory.js +22 -0
- package/build/common/azure-hosting/hostingFactory.js.map +1 -0
- package/build/common/azure-hosting/interfaces.d.ts +11 -0
- package/build/common/azure-hosting/interfaces.d.ts.map +1 -0
- package/build/common/azure-hosting/interfaces.js +12 -0
- package/build/common/azure-hosting/interfaces.js.map +1 -0
- package/build/common/azure-hosting/utils.d.ts +3 -0
- package/build/common/azure-hosting/utils.d.ts.map +1 -0
- package/build/common/azure-hosting/utils.js +26 -0
- package/build/common/azure-hosting/utils.js.map +1 -0
- package/build/common/constants.d.ts +1 -2
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +1 -2
- package/build/common/constants.js.map +1 -1
- package/build/common/deps-checker/constant/helpLink.d.ts +1 -0
- package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -1
- package/build/common/deps-checker/constant/helpLink.js +6 -5
- package/build/common/deps-checker/constant/helpLink.js.map +1 -1
- package/build/common/deps-checker/constant/telemetry.d.ts +2 -0
- package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -1
- package/build/common/deps-checker/constant/telemetry.js +2 -0
- package/build/common/deps-checker/constant/telemetry.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts +2 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js +7 -4
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +8 -4
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/common/featureFlags.d.ts +1 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +7 -6
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/local/constants.d.ts +1 -0
- package/build/common/local/constants.d.ts.map +1 -1
- package/build/common/local/constants.js +2 -1
- package/build/common/local/constants.js.map +1 -1
- package/build/common/local/projectSettingsHelper.d.ts +1 -0
- package/build/common/local/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/local/projectSettingsHelper.js +5 -0
- package/build/common/local/projectSettingsHelper.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts +3 -2
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +32 -4
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/samples-config.json +40 -6
- package/build/common/telemetry.d.ts +2 -3
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +1 -2
- package/build/common/telemetry.js.map +1 -1
- 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 +4 -2
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +101 -11
- package/build/common/tools.js.map +1 -1
- package/build/component/bicep.d.ts +8 -0
- package/build/component/bicep.d.ts.map +1 -0
- package/build/component/bicep.js +111 -0
- package/build/component/bicep.js.map +1 -0
- package/build/component/botCode.d.ts +13 -0
- package/build/component/botCode.d.ts.map +1 -0
- package/build/component/botCode.js +138 -0
- package/build/component/botCode.js.map +1 -0
- package/build/component/connection.d.ts +8 -0
- package/build/component/connection.d.ts.map +1 -0
- package/build/component/connection.js +84 -0
- package/build/component/connection.js.map +1 -0
- package/build/component/core.d.ts +43 -0
- package/build/component/core.d.ts.map +1 -0
- package/build/component/core.js +714 -0
- package/build/component/core.js.map +1 -0
- package/build/component/debugManager.d.ts +8 -0
- package/build/component/debugManager.d.ts.map +1 -0
- package/build/component/debugManager.js +57 -0
- package/build/component/debugManager.js.map +1 -0
- package/build/component/envManager.d.ts +7 -0
- package/build/component/envManager.d.ts.map +1 -0
- package/build/component/envManager.js +140 -0
- package/build/component/envManager.js.map +1 -0
- package/build/component/projectSettingsManager.d.ts +10 -0
- package/build/component/projectSettingsManager.d.ts.map +1 -0
- package/build/component/projectSettingsManager.js +72 -0
- package/build/component/projectSettingsManager.js.map +1 -0
- package/build/component/resource/aad.d.ts +11 -0
- package/build/component/resource/aad.d.ts.map +1 -0
- package/build/component/resource/aad.js +82 -0
- package/build/component/resource/aad.js.map +1 -0
- package/build/component/resource/azureFunction.d.ts +19 -0
- package/build/component/resource/azureFunction.d.ts.map +1 -0
- package/build/component/resource/azureFunction.js +81 -0
- package/build/component/resource/azureFunction.js.map +1 -0
- package/build/component/resource/azureSql.d.ts +24 -0
- package/build/component/resource/azureSql.d.ts.map +1 -0
- package/build/component/resource/azureSql.js +101 -0
- package/build/component/resource/azureSql.js.map +1 -0
- package/build/component/resource/azureStorage.d.ts +16 -0
- package/build/component/resource/azureStorage.d.ts.map +1 -0
- package/build/component/resource/azureStorage.js +102 -0
- package/build/component/resource/azureStorage.js.map +1 -0
- package/build/component/resource/azureWebApp.d.ts +23 -0
- package/build/component/resource/azureWebApp.d.ts.map +1 -0
- package/build/component/resource/azureWebApp.js +95 -0
- package/build/component/resource/azureWebApp.js.map +1 -0
- package/build/component/resource/botService.d.ts +22 -0
- package/build/component/resource/botService.d.ts.map +1 -0
- package/build/component/resource/botService.js +208 -0
- package/build/component/resource/botService.js.map +1 -0
- package/build/component/resource/index.d.ts +17 -0
- package/build/component/resource/index.d.ts.map +1 -0
- package/build/component/resource/index.js +25 -0
- package/build/component/resource/index.js.map +1 -0
- package/build/component/resource/spfx.d.ts +9 -0
- package/build/component/resource/spfx.d.ts.map +1 -0
- package/build/component/resource/spfx.js +46 -0
- package/build/component/resource/spfx.js.map +1 -0
- package/build/component/resource/teamsManifest.d.ts +19 -0
- package/build/component/resource/teamsManifest.d.ts.map +1 -0
- package/build/component/resource/teamsManifest.js +135 -0
- package/build/component/resource/teamsManifest.js.map +1 -0
- package/build/component/utils.d.ts +18 -0
- package/build/component/utils.d.ts.map +1 -0
- package/build/component/utils.js +354 -0
- package/build/component/utils.js.map +1 -0
- package/build/component/workflow.d.ts +21 -0
- package/build/component/workflow.d.ts.map +1 -0
- package/build/component/workflow.js +445 -0
- package/build/component/workflow.js.map +1 -0
- package/build/core/FxCore.d.ts +2 -2
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +66 -117
- package/build/core/FxCore.js.map +1 -1
- package/build/core/downloadSample.d.ts.map +1 -1
- package/build/core/downloadSample.js +1 -6
- package/build/core/downloadSample.js.map +1 -1
- package/build/core/environment.d.ts +2 -1
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +20 -10
- package/build/core/environment.js.map +1 -1
- package/build/core/error.d.ts +0 -1
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +3 -7
- package/build/core/error.js.map +1 -1
- package/build/core/generateAadManifestTemplate.d.ts +10 -0
- package/build/core/generateAadManifestTemplate.d.ts.map +1 -0
- package/build/core/generateAadManifestTemplate.js +100 -0
- package/build/core/generateAadManifestTemplate.js.map +1 -0
- package/build/core/middleware/MigrationUtils.d.ts +10 -0
- package/build/core/middleware/MigrationUtils.d.ts.map +1 -0
- package/build/core/middleware/MigrationUtils.js +63 -0
- package/build/core/middleware/MigrationUtils.js.map +1 -0
- package/build/core/middleware/aadManifestMigration.d.ts.map +1 -1
- package/build/core/middleware/aadManifestMigration.js +33 -117
- package/build/core/middleware/aadManifestMigration.js.map +1 -1
- package/build/core/middleware/consolidateLocalRemote.d.ts.map +1 -1
- package/build/core/middleware/consolidateLocalRemote.js +75 -20
- package/build/core/middleware/consolidateLocalRemote.js.map +1 -1
- package/build/core/middleware/envInfoLoader.d.ts.map +1 -1
- package/build/core/middleware/envInfoLoader.js +13 -3
- package/build/core/middleware/envInfoLoader.js.map +1 -1
- package/build/core/middleware/errorHandler.js +1 -1
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.d.ts +3 -0
- package/build/core/middleware/projectVersionChecker.d.ts.map +1 -0
- package/build/core/middleware/projectVersionChecker.js +55 -0
- package/build/core/middleware/projectVersionChecker.js.map +1 -0
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +85 -28
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/core/middleware/questionModelV3.d.ts +6 -0
- package/build/core/middleware/questionModelV3.d.ts.map +1 -0
- package/build/core/middleware/questionModelV3.js +66 -0
- package/build/core/middleware/questionModelV3.js.map +1 -0
- package/build/core/question.d.ts +8 -0
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +105 -11
- package/build/core/question.js.map +1 -1
- package/build/plugins/resource/aad/aadAppClient.d.ts +1 -1
- package/build/plugins/resource/aad/aadAppClient.d.ts.map +1 -1
- package/build/plugins/resource/aad/aadAppClient.js +20 -11
- package/build/plugins/resource/aad/aadAppClient.js.map +1 -1
- package/build/plugins/resource/aad/errors.d.ts +1 -0
- package/build/plugins/resource/aad/errors.d.ts.map +1 -1
- package/build/plugins/resource/aad/errors.js +8 -1
- package/build/plugins/resource/aad/errors.js.map +1 -1
- package/build/plugins/resource/aad/plugin.d.ts +1 -1
- package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
- package/build/plugins/resource/aad/plugin.js +22 -62
- package/build/plugins/resource/aad/plugin.js.map +1 -1
- package/build/plugins/resource/aad/utils/configs.d.ts +1 -1
- package/build/plugins/resource/aad/utils/configs.d.ts.map +1 -1
- package/build/plugins/resource/aad/utils/configs.js +13 -7
- package/build/plugins/resource/aad/utils/configs.js.map +1 -1
- package/build/plugins/resource/apiconnector/checker.d.ts +1 -0
- package/build/plugins/resource/apiconnector/checker.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/checker.js +22 -3
- package/build/plugins/resource/apiconnector/checker.js.map +1 -1
- package/build/plugins/resource/apiconnector/depsHandler.d.ts +1 -0
- package/build/plugins/resource/apiconnector/depsHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/depsHandler.js +22 -2
- package/build/plugins/resource/apiconnector/depsHandler.js.map +1 -1
- package/build/plugins/resource/apiconnector/envHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/envHandler.js +10 -1
- package/build/plugins/resource/apiconnector/envHandler.js.map +1 -1
- package/build/plugins/resource/apiconnector/errors.d.ts +4 -0
- package/build/plugins/resource/apiconnector/errors.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/errors.js +5 -1
- package/build/plugins/resource/apiconnector/errors.js.map +1 -1
- package/build/plugins/resource/apiconnector/index.d.ts +3 -3
- package/build/plugins/resource/apiconnector/index.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/index.js +7 -4
- package/build/plugins/resource/apiconnector/index.js.map +1 -1
- package/build/plugins/resource/apiconnector/plugin.d.ts +2 -2
- package/build/plugins/resource/apiconnector/plugin.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/plugin.js +21 -14
- package/build/plugins/resource/apiconnector/plugin.js.map +1 -1
- package/build/plugins/resource/apiconnector/questions.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/questions.js +6 -2
- package/build/plugins/resource/apiconnector/questions.js.map +1 -1
- package/build/plugins/resource/apiconnector/result.d.ts +4 -3
- package/build/plugins/resource/apiconnector/result.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/result.js.map +1 -1
- package/build/plugins/resource/apiconnector/sampleHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/sampleHandler.js +1 -0
- package/build/plugins/resource/apiconnector/sampleHandler.js.map +1 -1
- package/build/plugins/resource/apiconnector/telemetry.js +1 -1
- package/build/plugins/resource/apim/constants.d.ts +1 -0
- package/build/plugins/resource/apim/constants.d.ts.map +1 -1
- package/build/plugins/resource/apim/constants.js +1 -0
- package/build/plugins/resource/apim/constants.js.map +1 -1
- package/build/plugins/resource/apim/index.d.ts.map +1 -1
- package/build/plugins/resource/apim/index.js +2 -1
- package/build/plugins/resource/apim/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/constants.d.ts +2 -0
- package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/constants.js +2 -0
- package/build/plugins/resource/appstudio/constants.js.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js +9 -3
- package/build/plugins/resource/appstudio/plugin.js.map +1 -1
- package/build/plugins/resource/appstudio/v3/index.js +1 -1
- package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
- package/build/plugins/resource/bot/appStudio/appStudio.d.ts +4 -0
- package/build/plugins/resource/bot/appStudio/appStudio.d.ts.map +1 -1
- package/build/plugins/resource/bot/appStudio/appStudio.js +14 -3
- package/build/plugins/resource/bot/appStudio/appStudio.js.map +1 -1
- package/build/plugins/resource/bot/azureOps.d.ts +1 -0
- package/build/plugins/resource/bot/azureOps.d.ts.map +1 -1
- package/build/plugins/resource/bot/azureOps.js +3 -2
- package/build/plugins/resource/bot/azureOps.js.map +1 -1
- package/build/plugins/resource/bot/configs/teamsBotConfig.js +1 -1
- package/build/plugins/resource/bot/configs/teamsBotConfig.js.map +1 -1
- package/build/plugins/resource/bot/constants.d.ts +2 -1
- package/build/plugins/resource/bot/constants.d.ts.map +1 -1
- package/build/plugins/resource/bot/constants.js +2 -1
- package/build/plugins/resource/bot/constants.js.map +1 -1
- package/build/plugins/resource/bot/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/index.js +3 -1
- package/build/plugins/resource/bot/index.js.map +1 -1
- package/build/plugins/resource/bot/question.d.ts +1 -2
- package/build/plugins/resource/bot/question.d.ts.map +1 -1
- package/build/plugins/resource/bot/question.js +17 -3
- package/build/plugins/resource/bot/question.js.map +1 -1
- package/build/plugins/resource/bot/resources/strings.d.ts +1 -0
- package/build/plugins/resource/bot/resources/strings.d.ts.map +1 -1
- package/build/plugins/resource/bot/utils/common.d.ts +2 -0
- package/build/plugins/resource/bot/utils/common.d.ts.map +1 -1
- package/build/plugins/resource/bot/utils/common.js +14 -1
- package/build/plugins/resource/bot/utils/common.js.map +1 -1
- package/build/plugins/resource/bot/v2/common.d.ts +10 -0
- package/build/plugins/resource/bot/v2/common.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/common.js +70 -0
- package/build/plugins/resource/bot/v2/common.js.map +1 -0
- package/build/plugins/resource/bot/v2/enum.d.ts +6 -0
- package/build/plugins/resource/bot/v2/enum.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/enum.js +12 -0
- package/build/plugins/resource/bot/v2/enum.js.map +1 -0
- package/build/plugins/resource/bot/v2/index.d.ts +2 -0
- package/build/plugins/resource/bot/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/v2/index.js +14 -0
- package/build/plugins/resource/bot/v2/index.js.map +1 -1
- package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.d.ts +10 -0
- package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.js +5 -0
- package/build/plugins/resource/bot/v2/interface/codeTemplateInfo.js.map +1 -0
- package/build/plugins/resource/bot/v2/mapping.d.ts +7 -0
- package/build/plugins/resource/bot/v2/mapping.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/mapping.js +74 -0
- package/build/plugins/resource/bot/v2/mapping.js.map +1 -0
- package/build/plugins/resource/bot/v2/plugin.d.ts +16 -0
- package/build/plugins/resource/bot/v2/plugin.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/plugin.js +129 -0
- package/build/plugins/resource/bot/v2/plugin.js.map +1 -0
- package/build/plugins/resource/bot/v2/scaffold.d.ts +3 -0
- package/build/plugins/resource/bot/v2/scaffold.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/scaffold.js +40 -0
- package/build/plugins/resource/bot/v2/scaffold.js.map +1 -0
- package/build/plugins/resource/cicd/index.d.ts.map +1 -1
- package/build/plugins/resource/cicd/index.js +29 -9
- package/build/plugins/resource/cicd/index.js.map +1 -1
- package/build/plugins/resource/cicd/questions.d.ts +2 -0
- package/build/plugins/resource/cicd/questions.d.ts.map +1 -1
- package/build/plugins/resource/cicd/questions.js +3 -1
- package/build/plugins/resource/cicd/questions.js.map +1 -1
- package/build/plugins/resource/cicd/utils/existingTemplatesStat.d.ts +16 -0
- package/build/plugins/resource/cicd/utils/existingTemplatesStat.d.ts.map +1 -0
- package/build/plugins/resource/cicd/utils/existingTemplatesStat.js +75 -0
- package/build/plugins/resource/cicd/utils/existingTemplatesStat.js.map +1 -0
- package/build/plugins/resource/frontend/dotnet/constants.d.ts +0 -10
- package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.js +1 -12
- package/build/plugins/resource/frontend/dotnet/constants.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/enum.d.ts +0 -10
- package/build/plugins/resource/frontend/dotnet/enum.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/enum.js +1 -12
- package/build/plugins/resource/frontend/dotnet/enum.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/ops/scaffold.js +2 -2
- package/build/plugins/resource/frontend/dotnet/ops/scaffold.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.js +9 -24
- package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.d.ts +2 -7
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.js +5 -31
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.js.map +1 -1
- package/build/plugins/resource/frontend/resources/errors.js +2 -2
- package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
- package/build/plugins/resource/function/constants.d.ts +1 -2
- package/build/plugins/resource/function/constants.d.ts.map +1 -1
- package/build/plugins/resource/function/constants.js +0 -1
- package/build/plugins/resource/function/constants.js.map +1 -1
- package/build/plugins/resource/function/enums.d.ts +2 -6
- package/build/plugins/resource/function/enums.d.ts.map +1 -1
- package/build/plugins/resource/function/enums.js +2 -7
- package/build/plugins/resource/function/enums.js.map +1 -1
- package/build/plugins/resource/function/language-strategy.d.ts +0 -3
- package/build/plugins/resource/function/language-strategy.d.ts.map +1 -1
- package/build/plugins/resource/function/language-strategy.js +0 -11
- package/build/plugins/resource/function/language-strategy.js.map +1 -1
- package/build/plugins/resource/function/ops/provision.d.ts +1 -5
- package/build/plugins/resource/function/ops/provision.d.ts.map +1 -1
- package/build/plugins/resource/function/ops/provision.js +0 -29
- package/build/plugins/resource/function/ops/provision.js.map +1 -1
- package/build/plugins/resource/function/plugin.d.ts +1 -3
- package/build/plugins/resource/function/plugin.d.ts.map +1 -1
- package/build/plugins/resource/function/plugin.js +8 -33
- package/build/plugins/resource/function/plugin.js.map +1 -1
- package/build/plugins/resource/function/resources/errors.js +2 -2
- package/build/plugins/resource/function/resources/errors.js.map +1 -1
- package/build/plugins/resource/function/v3/index.d.ts +1 -1
- package/build/plugins/resource/function/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/function/v3/index.js +9 -12
- package/build/plugins/resource/function/v3/index.js.map +1 -1
- package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/arm.js +5 -7
- package/build/plugins/solution/fx-solution/arm.js.map +1 -1
- package/build/plugins/solution/fx-solution/constants.d.ts +13 -2
- package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/constants.js +13 -1
- package/build/plugins/solution/fx-solution/constants.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/error.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/error.js +7 -1
- package/build/plugins/solution/fx-solution/debug/error.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js +17 -0
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/scaffolding.js +32 -29
- package/build/plugins/solution/fx-solution/debug/scaffolding.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts +1 -0
- package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchNext.js +49 -9
- package/build/plugins/solution/fx-solution/debug/util/launchNext.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/settings.d.ts +2 -1
- package/build/plugins/solution/fx-solution/debug/util/settings.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/settings.js +22 -2
- package/build/plugins/solution/fx-solution/debug/util/settings.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.d.ts +1 -0
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.js +40 -2
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.js.map +1 -1
- package/build/plugins/solution/fx-solution/question.d.ts +12 -1
- package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/question.js +130 -22
- package/build/plugins/solution/fx-solution/question.js.map +1 -1
- package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.js +1 -1
- package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.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 +37 -4
- package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js +113 -65
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts +6 -0
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.js +277 -2
- 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 +48 -20
- package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js +8 -5
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/publish.js +1 -1
- package/build/plugins/solution/fx-solution/v2/publish.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/solution.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/solution.js +4 -1
- package/build/plugins/solution/fx-solution/v2/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.d.ts +7 -0
- package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.js +23 -1
- package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
- package/package.json +8 -3
- package/resource/aad-manifest-change-logs.md +27 -0
- package/resource/package.nls.json +93 -54
- package/resource/{unify-config-change-logs.md → unify-config-and-aad-manifest-change-logs.md} +10 -3
- package/templates/bicep/azureSql.parameters.json +4 -0
- package/templates/bicep/azureSql.provisionDatabase.module.bicep +15 -0
- package/templates/bicep/azureSql.provisionDatabase.orchestration.bicep +5 -0
- package/templates/bicep/azureSql.provisionServer.module.bicep +44 -0
- package/templates/bicep/azureSql.provisionServer.orchestration.bicep +14 -0
- package/templates/bicep/azureWebApp.config.module.bicep +63 -0
- package/templates/bicep/azureWebApp.config.orchestration.bicep +12 -0
- package/templates/bicep/azureWebApp.parameters.json +4 -0
- package/templates/bicep/azureWebApp.provision.module.bicep +50 -0
- package/templates/bicep/azureWebApp.provision.orchestration.bicep +18 -0
- package/templates/bicep/botService.config.module.bicep +33 -0
- package/templates/bicep/botService.config.orchestration.bicep +8 -0
- package/templates/bicep/config.bicep +3 -0
- package/templates/bicep/main.bicep +18 -0
- package/templates/bicep/provision.bicep +2 -0
- package/templates/core/README.md +4 -4
- package/templates/fallback/blazor-base.csharp.default.zip +0 -0
- package/templates/fallback/bot.csharp.default.zip +0 -0
- package/templates/fallback/bot.csharp.notification-webapi.zip +0 -0
- package/templates/fallback/bot.js.command-and-response.zip +0 -0
- package/templates/fallback/bot.js.default.zip +0 -0
- package/templates/fallback/bot.js.m365.zip +0 -0
- package/templates/fallback/bot.js.notification-function-base.zip +0 -0
- package/templates/fallback/bot.js.notification-restify.zip +0 -0
- package/templates/fallback/bot.js.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.js.notification-trigger-timer.zip +0 -0
- package/templates/fallback/bot.ts.command-and-response.zip +0 -0
- package/templates/fallback/bot.ts.default.zip +0 -0
- package/templates/fallback/bot.ts.m365.zip +0 -0
- package/templates/fallback/bot.ts.notification-function-base.zip +0 -0
- package/templates/fallback/bot.ts.notification-restify.zip +0 -0
- package/templates/fallback/bot.ts.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.ts.notification-trigger-timer.zip +0 -0
- package/templates/fallback/bot.ts.notification.zip +0 -0
- package/templates/fallback/function-base.js.default.zip +0 -0
- package/templates/fallback/function-base.ts.default.zip +0 -0
- package/templates/fallback/function-triggers.js.HTTPTrigger.zip +0 -0
- package/templates/fallback/function-triggers.ts.HTTPTrigger.zip +0 -0
- package/templates/fallback/tab.csharp.default.zip +0 -0
- package/templates/fallback/tab.js.default.zip +0 -0
- package/templates/fallback/tab.js.m365.zip +0 -0
- package/templates/fallback/tab.js.non-sso.zip +0 -0
- package/templates/fallback/tab.ts.default.zip +0 -0
- package/templates/fallback/tab.ts.m365.zip +0 -0
- package/templates/fallback/tab.ts.non-sso.zip +0 -0
- package/templates/plugins/resource/aad/auth/bot/README.md +212 -9
- package/templates/plugins/resource/aad/auth/bot/js/public/auth-end.html +4 -1
- package/templates/plugins/resource/aad/auth/bot/js/public/auth-start.html +1 -0
- package/templates/plugins/resource/aad/auth/bot/js/sso/showUserInfo.js +19 -2
- package/templates/plugins/resource/aad/auth/bot/js/sso/ssoDialog.js +46 -18
- package/templates/plugins/resource/aad/auth/bot/js/sso/teamsSsoBot.js +13 -5
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +4 -1
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-start.html +1 -0
- package/templates/plugins/resource/aad/auth/bot/ts/sso/showUserInfo.ts +15 -1
- package/templates/plugins/resource/aad/auth/bot/ts/sso/ssoDialog.ts +42 -11
- package/templates/plugins/resource/aad/auth/bot/ts/sso/teamsSsoBot.ts +7 -1
- package/templates/plugins/resource/aad/auth/tab/README.md +44 -8
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-end.html +1 -3
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-start.html +1 -3
- package/templates/plugins/resource/aad/auth/tab/js/sso/GetUserProfile.jsx +23 -11
- package/templates/plugins/resource/aad/auth/tab/js/sso/InitTeamsFx.jsx +20 -0
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-end.html +1 -3
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-start.html +1 -3
- package/templates/plugins/resource/aad/auth/tab/ts/sso/GetUserProfile.tsx +25 -12
- package/templates/plugins/resource/aad/auth/tab/ts/sso/InitTeamsFx.tsx +20 -0
- package/templates/plugins/resource/apiconnector/package.json +1 -1
- package/templates/plugins/resource/apiconnector/sample/headerComment.template +20 -6
- package/templates/plugins/resource/apiconnector/sample/js/aad.template +1 -1
- package/templates/plugins/resource/apiconnector/sample/js/apikey.template +2 -2
- package/templates/plugins/resource/apiconnector/sample/js/basic.template +1 -1
- package/templates/plugins/resource/apiconnector/sample/js/cert.template +1 -1
- package/templates/plugins/resource/apiconnector/sample/js/custom.template +1 -1
- package/templates/plugins/resource/apiconnector/sample/ts/aad.template +1 -1
- package/templates/plugins/resource/apiconnector/sample/ts/apikey.template +1 -1
- package/templates/plugins/resource/bot/bicep/funcHostedBotProvision.template.bicep +2 -2
- package/templates/plugins/resource/cicd/azdo/cd.yml +2 -1
- package/templates/plugins/resource/cicd/jenkins/Jenkinsfile.cd +2 -3
- package/templates/plugins/resource/function/bicep/functionProvision.template.bicep +2 -2
- package/templates/plugins/resource/hosting/bicep/botservice/botserviceProvision.template.bicep +34 -0
- package/templates/plugins/resource/hosting/bicep/botservice/parameters.json +4 -0
- package/templates/plugins/resource/hosting/bicep/botservice/provision.template.bicep +8 -0
- package/templates/plugins/resource/hosting/bicep/function/config.template.bicep +12 -0
- package/templates/plugins/resource/hosting/bicep/function/functionConfiguration.template.bicep +71 -0
- package/templates/plugins/resource/hosting/bicep/function/functionProvision.template.bicep +99 -0
- package/templates/plugins/resource/hosting/bicep/function/provision.template.bicep +20 -0
- package/templates/plugins/resource/keyvault/bicep/keyVaultProvision.template.bicep +1 -1
- package/templates/plugins/resource/spfx/solution/README.md +3 -3
- package/build/plugins/resource/function/utils/node-version.d.ts +0 -2
- package/build/plugins/resource/function/utils/node-version.d.ts.map +0 -1
- package/build/plugins/resource/function/utils/node-version.js +0 -21
- package/build/plugins/resource/function/utils/node-version.js.map +0 -1
|
@@ -0,0 +1,714 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.TeamsfxCore = void 0;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
9
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
10
|
+
require("reflect-metadata");
|
|
11
|
+
const typedi_1 = require("typedi");
|
|
12
|
+
const projectSettingsHelper_1 = require("./../common/projectSettingsHelper");
|
|
13
|
+
const projectSettingsLoader_1 = require("../core/middleware/projectSettingsLoader");
|
|
14
|
+
const question_1 = require("../core/question");
|
|
15
|
+
const workflow_1 = require("./workflow");
|
|
16
|
+
require("./resource");
|
|
17
|
+
require("./bicep");
|
|
18
|
+
require("./botCode");
|
|
19
|
+
require("./connection");
|
|
20
|
+
require("./envManager");
|
|
21
|
+
require("./debugManager");
|
|
22
|
+
const plugins_1 = require("../plugins");
|
|
23
|
+
const projectSettingsManager_1 = require("./projectSettingsManager");
|
|
24
|
+
const constants_1 = require("../plugins/resource/bot/constants");
|
|
25
|
+
const question_2 = require("../plugins/resource/bot/question");
|
|
26
|
+
let TeamsfxCore = class TeamsfxCore {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.name = "fx";
|
|
29
|
+
// addTab(
|
|
30
|
+
// context: ContextV3,
|
|
31
|
+
// inputs: InputsWithProjectPath
|
|
32
|
+
// ): MaybePromise<Result<Action | undefined, FxError>> {
|
|
33
|
+
// const actions: Action[] = [
|
|
34
|
+
// {
|
|
35
|
+
// name: "fx.configTab",
|
|
36
|
+
// type: "function",
|
|
37
|
+
// plan: (context: ContextV3, inputs: InputsWithProjectPath) => {
|
|
38
|
+
// return ok([`add component 'teams-tab' in projectSettings: ${JSON.stringify(inputs)}`]);
|
|
39
|
+
// },
|
|
40
|
+
// execute: async (
|
|
41
|
+
// context: ContextV3,
|
|
42
|
+
// inputs: InputsWithProjectPath
|
|
43
|
+
// ): Promise<Result<undefined, FxError>> => {
|
|
44
|
+
// const projectSettings = context.projectSetting as ProjectSettingsV3;
|
|
45
|
+
// const teamsTabResource: Component = {
|
|
46
|
+
// name: "teams-tab",
|
|
47
|
+
// ...inputs,
|
|
48
|
+
// };
|
|
49
|
+
// projectSettings.components.push(teamsTabResource);
|
|
50
|
+
// console.log(
|
|
51
|
+
// `add component 'teams-tab' in projectSettings: ${JSON.stringify(teamsTabResource)}`
|
|
52
|
+
// );
|
|
53
|
+
// return ok(undefined);
|
|
54
|
+
// },
|
|
55
|
+
// },
|
|
56
|
+
// {
|
|
57
|
+
// name: "call:tab-code.generate",
|
|
58
|
+
// type: "call",
|
|
59
|
+
// required: true,
|
|
60
|
+
// targetAction: "tab-code.generate",
|
|
61
|
+
// },
|
|
62
|
+
// {
|
|
63
|
+
// name: "call:azure-bicep.generate",
|
|
64
|
+
// type: "call",
|
|
65
|
+
// required: false,
|
|
66
|
+
// targetAction: "azure-bicep.generate",
|
|
67
|
+
// inputs: {
|
|
68
|
+
// "azure-bicep": {
|
|
69
|
+
// resources: [inputs.hosting],
|
|
70
|
+
// },
|
|
71
|
+
// },
|
|
72
|
+
// },
|
|
73
|
+
// {
|
|
74
|
+
// name: "call:teams-manifest.addCapability",
|
|
75
|
+
// type: "call",
|
|
76
|
+
// required: true,
|
|
77
|
+
// targetAction: "teams-manifest.addCapability",
|
|
78
|
+
// inputs: {
|
|
79
|
+
// "teams-manifest": {
|
|
80
|
+
// capabilities: [{ name: "staticTab" }],
|
|
81
|
+
// },
|
|
82
|
+
// },
|
|
83
|
+
// },
|
|
84
|
+
// ];
|
|
85
|
+
// const group: GroupAction = {
|
|
86
|
+
// type: "group",
|
|
87
|
+
// name: "fx.addTab",
|
|
88
|
+
// mode: "parallel",
|
|
89
|
+
// actions: actions,
|
|
90
|
+
// };
|
|
91
|
+
// return ok(group);
|
|
92
|
+
// }
|
|
93
|
+
// preProvision(
|
|
94
|
+
// context: ContextV3,
|
|
95
|
+
// inputs: InputsWithProjectPath
|
|
96
|
+
// ): MaybePromise<Result<Action | undefined, FxError>> {
|
|
97
|
+
// const action: Action = {
|
|
98
|
+
// type: "function",
|
|
99
|
+
// name: "fx.preProvision",
|
|
100
|
+
// plan: (context: ContextV3, inputs: InputsWithProjectPath) => {
|
|
101
|
+
// return ok(["pre step before provision (tenant, subscription, resource group)"]);
|
|
102
|
+
// },
|
|
103
|
+
// execute: async (context: ContextV3, inputs: InputsWithProjectPath) => {
|
|
104
|
+
// const ctx = context as ProvisionContextV3;
|
|
105
|
+
// const envInfo = ctx.envInfo;
|
|
106
|
+
// const solutionSetting = ctx.projectSetting.solutionSettings as
|
|
107
|
+
// | AzureSolutionSettings
|
|
108
|
+
// | undefined;
|
|
109
|
+
// // 1. check M365 tenant
|
|
110
|
+
// if (!envInfo.state["teams-manifest"]) envInfo.state["teams-manifest"] = {};
|
|
111
|
+
// const teamsAppResource = envInfo.state["teams-manifest"] as v3.TeamsAppResource;
|
|
112
|
+
// if (!envInfo.state.solution) envInfo.state.solution = {};
|
|
113
|
+
// const solutionConfig = envInfo.state.solution as v3.AzureSolutionConfig;
|
|
114
|
+
// solutionConfig.provisionSucceeded = false;
|
|
115
|
+
// const tenantIdInConfig = teamsAppResource.tenantId;
|
|
116
|
+
// const tenantIdInTokenRes = await getM365TenantId(ctx.tokenProvider.appStudioToken);
|
|
117
|
+
// if (tenantIdInTokenRes.isErr()) {
|
|
118
|
+
// return err(tenantIdInTokenRes.error);
|
|
119
|
+
// }
|
|
120
|
+
// const tenantIdInToken = tenantIdInTokenRes.value;
|
|
121
|
+
// if (tenantIdInConfig && tenantIdInToken && tenantIdInToken !== tenantIdInConfig) {
|
|
122
|
+
// return err(
|
|
123
|
+
// new UserError(
|
|
124
|
+
// "Solution",
|
|
125
|
+
// SolutionError.TeamsAppTenantIdNotRight,
|
|
126
|
+
// `The signed in M365 account does not match the M365 tenant in config file for '${envInfo.envName}' environment. Please sign out and sign in with the correct M365 account.`
|
|
127
|
+
// )
|
|
128
|
+
// );
|
|
129
|
+
// }
|
|
130
|
+
// if (!tenantIdInConfig) {
|
|
131
|
+
// teamsAppResource.tenantId = tenantIdInToken;
|
|
132
|
+
// solutionConfig.teamsAppTenantId = tenantIdInToken;
|
|
133
|
+
// }
|
|
134
|
+
// // 3. check Azure configs
|
|
135
|
+
// if (hasAzureResourceV3(ctx.projectSetting) && envInfo.envName !== "local") {
|
|
136
|
+
// // ask common question and fill in solution config
|
|
137
|
+
// const solutionConfigRes = await fillInAzureConfigs(
|
|
138
|
+
// ctx,
|
|
139
|
+
// inputs,
|
|
140
|
+
// envInfo as v3.EnvInfoV3,
|
|
141
|
+
// ctx.tokenProvider
|
|
142
|
+
// );
|
|
143
|
+
// if (solutionConfigRes.isErr()) {
|
|
144
|
+
// return err(solutionConfigRes.error);
|
|
145
|
+
// }
|
|
146
|
+
// // ask for provision consent
|
|
147
|
+
// const consentResult = await askForProvisionConsent(
|
|
148
|
+
// ctx,
|
|
149
|
+
// ctx.tokenProvider.azureAccountProvider,
|
|
150
|
+
// envInfo as v3.EnvInfoV3
|
|
151
|
+
// );
|
|
152
|
+
// if (consentResult.isErr()) {
|
|
153
|
+
// return err(consentResult.error);
|
|
154
|
+
// }
|
|
155
|
+
// // create resource group if needed
|
|
156
|
+
// if (solutionConfig.needCreateResourceGroup) {
|
|
157
|
+
// const createRgRes = await resourceGroupHelper.createNewResourceGroup(
|
|
158
|
+
// solutionConfig.resourceGroupName,
|
|
159
|
+
// ctx.tokenProvider.azureAccountProvider,
|
|
160
|
+
// solutionConfig.subscriptionId,
|
|
161
|
+
// solutionConfig.location
|
|
162
|
+
// );
|
|
163
|
+
// if (createRgRes.isErr()) {
|
|
164
|
+
// return err(createRgRes.error);
|
|
165
|
+
// }
|
|
166
|
+
// }
|
|
167
|
+
// }
|
|
168
|
+
// // ctx.envInfo.state.solution = {
|
|
169
|
+
// // tenantId: "MockTenantId",
|
|
170
|
+
// // subscriptionId: "MockSubscriptionId",
|
|
171
|
+
// // resourceGroup: "MockResourceGroup",
|
|
172
|
+
// // };
|
|
173
|
+
// // ctx.envInfo.state["teams-manifest"] = {
|
|
174
|
+
// // tenantId: "MockTenantId",
|
|
175
|
+
// // };
|
|
176
|
+
// return ok(["pre step before provision (tenant, subscription, resource group)"]);
|
|
177
|
+
// },
|
|
178
|
+
// };
|
|
179
|
+
// return ok(action);
|
|
180
|
+
// }
|
|
181
|
+
// provision(
|
|
182
|
+
// context: ContextV3,
|
|
183
|
+
// inputs: InputsWithProjectPath
|
|
184
|
+
// ): MaybePromise<Result<Action | undefined, FxError>> {
|
|
185
|
+
// const ctx = context as ProvisionContextV3;
|
|
186
|
+
// const projectSettings = context.projectSetting as ProjectSettingsV3;
|
|
187
|
+
// const resourcesToProvision = projectSettings.components.filter((r) => r.provision);
|
|
188
|
+
// const provisionActions: Action[] = resourcesToProvision.map((r) => {
|
|
189
|
+
// return {
|
|
190
|
+
// type: "call",
|
|
191
|
+
// name: `call:${r.name}.provision`,
|
|
192
|
+
// required: false,
|
|
193
|
+
// targetAction: `${r.name}.provision`,
|
|
194
|
+
// };
|
|
195
|
+
// });
|
|
196
|
+
// const loadEnvStep: Action = {
|
|
197
|
+
// type: "call",
|
|
198
|
+
// targetAction: "env-manager.read",
|
|
199
|
+
// required: true,
|
|
200
|
+
// };
|
|
201
|
+
// const writeEnvStep: Action = {
|
|
202
|
+
// type: "call",
|
|
203
|
+
// targetAction: "env-manager.write",
|
|
204
|
+
// required: true,
|
|
205
|
+
// };
|
|
206
|
+
// const configureActions: Action[] = resourcesToProvision.map((r) => {
|
|
207
|
+
// return {
|
|
208
|
+
// type: "call",
|
|
209
|
+
// name: `call:${r.name}.configure`,
|
|
210
|
+
// required: false,
|
|
211
|
+
// targetAction: `${r.name}.configure`,
|
|
212
|
+
// };
|
|
213
|
+
// });
|
|
214
|
+
// const setupLocalEnvironmentStep: Action = {
|
|
215
|
+
// type: "call",
|
|
216
|
+
// name: "call debug-manager.setupLocalEnvironment",
|
|
217
|
+
// targetAction: "debug-manager.setupLocalEnvironment",
|
|
218
|
+
// required: false,
|
|
219
|
+
// };
|
|
220
|
+
// const configLocalEnvironmentStep: Action = {
|
|
221
|
+
// type: "call",
|
|
222
|
+
// name: "call debug-manager.configLocalEnvironmentStep",
|
|
223
|
+
// targetAction: "debug-manager.configLocalEnvironmentStep",
|
|
224
|
+
// required: false,
|
|
225
|
+
// };
|
|
226
|
+
// const preProvisionStep: Action = {
|
|
227
|
+
// type: "call",
|
|
228
|
+
// name: "call fx.preProvision",
|
|
229
|
+
// targetAction: "fx.preProvision",
|
|
230
|
+
// required: true,
|
|
231
|
+
// };
|
|
232
|
+
// const createTeamsAppStep: Action = {
|
|
233
|
+
// type: "call",
|
|
234
|
+
// name: "call teams-manifest.provision",
|
|
235
|
+
// targetAction: "teams-manifest.provision",
|
|
236
|
+
// required: true,
|
|
237
|
+
// };
|
|
238
|
+
// const updateTeamsAppStep: Action = {
|
|
239
|
+
// type: "call",
|
|
240
|
+
// name: "call teams-manifest.configure",
|
|
241
|
+
// targetAction: "teams-manifest.configure",
|
|
242
|
+
// required: true,
|
|
243
|
+
// };
|
|
244
|
+
// const provisionResourcesStep: Action = {
|
|
245
|
+
// type: "group",
|
|
246
|
+
// name: "resources.provision",
|
|
247
|
+
// mode: "parallel",
|
|
248
|
+
// actions: provisionActions,
|
|
249
|
+
// };
|
|
250
|
+
// const configureResourcesStep: Action = {
|
|
251
|
+
// type: "group",
|
|
252
|
+
// name: "resources.configure",
|
|
253
|
+
// mode: "parallel",
|
|
254
|
+
// actions: configureActions,
|
|
255
|
+
// };
|
|
256
|
+
// const deployBicepStep: Action = {
|
|
257
|
+
// type: "call",
|
|
258
|
+
// name: "call:bicep.deploy",
|
|
259
|
+
// required: true,
|
|
260
|
+
// targetAction: "bicep.deploy",
|
|
261
|
+
// };
|
|
262
|
+
// const postProvisionStep: Action = {
|
|
263
|
+
// type: "function",
|
|
264
|
+
// name: "fx.postProvision",
|
|
265
|
+
// plan: (context: ContextV3, inputs: InputsWithProjectPath) => {
|
|
266
|
+
// return ok([]);
|
|
267
|
+
// },
|
|
268
|
+
// execute: (context: ContextV3, inputs: InputsWithProjectPath) => {
|
|
269
|
+
// const ctx = context as ProvisionContextV3;
|
|
270
|
+
// const url = getResourceGroupInPortal(
|
|
271
|
+
// ctx.envInfo.state.solution.subscriptionId,
|
|
272
|
+
// ctx.envInfo.state.solution.tenantId,
|
|
273
|
+
// ctx.envInfo.state.solution.resourceGroupName
|
|
274
|
+
// );
|
|
275
|
+
// const msg = getLocalizedString("core.provision.successAzure");
|
|
276
|
+
// if (url) {
|
|
277
|
+
// const title = "View Provisioned Resources";
|
|
278
|
+
// ctx.userInteraction.showMessage("info", msg, false, title).then((result: any) => {
|
|
279
|
+
// const userSelected = result.isOk() ? result.value : undefined;
|
|
280
|
+
// if (userSelected === title) {
|
|
281
|
+
// ctx.userInteraction.openUrl(url);
|
|
282
|
+
// }
|
|
283
|
+
// });
|
|
284
|
+
// } else {
|
|
285
|
+
// ctx.userInteraction.showMessage("info", msg, false);
|
|
286
|
+
// }
|
|
287
|
+
// return ok([]);
|
|
288
|
+
// },
|
|
289
|
+
// };
|
|
290
|
+
// const preConfigureStep: Action = {
|
|
291
|
+
// type: "function",
|
|
292
|
+
// name: "fx.preConfigure",
|
|
293
|
+
// plan: (context: ContextV3, inputs: InputsWithProjectPath) => {
|
|
294
|
+
// return ok([]);
|
|
295
|
+
// },
|
|
296
|
+
// execute: (context: ContextV3, inputs: InputsWithProjectPath) => {
|
|
297
|
+
// const projectSettings = context.projectSetting as ProjectSettingsV3;
|
|
298
|
+
// const teamsTab = getComponent(projectSettings, "teams-tab") as Component;
|
|
299
|
+
// const aad = getComponent(projectSettings, "aad");
|
|
300
|
+
// if (aad) {
|
|
301
|
+
// if (teamsTab) {
|
|
302
|
+
// const tabEndpoint = context.envInfo?.state[teamsTab.hosting!].endpoint;
|
|
303
|
+
// inputs.m365ApplicationIdUri = `api://${tabEndpoint}`;
|
|
304
|
+
// }
|
|
305
|
+
// }
|
|
306
|
+
// return ok([]);
|
|
307
|
+
// },
|
|
308
|
+
// };
|
|
309
|
+
// const provisionSequences: Action[] = [
|
|
310
|
+
// LoadProjectSettingsAction,
|
|
311
|
+
// loadEnvStep,
|
|
312
|
+
// preProvisionStep,
|
|
313
|
+
// createTeamsAppStep,
|
|
314
|
+
// provisionResourcesStep,
|
|
315
|
+
// ctx.envInfo.envName !== "local" ? deployBicepStep : setupLocalEnvironmentStep,
|
|
316
|
+
// preConfigureStep,
|
|
317
|
+
// configureResourcesStep,
|
|
318
|
+
// ctx.envInfo.envName === "local" ? configLocalEnvironmentStep : postProvisionStep,
|
|
319
|
+
// updateTeamsAppStep,
|
|
320
|
+
// writeEnvStep,
|
|
321
|
+
// WriteProjectSettingsAction,
|
|
322
|
+
// ];
|
|
323
|
+
// const result: Action = {
|
|
324
|
+
// name: "fx.provision",
|
|
325
|
+
// type: "group",
|
|
326
|
+
// actions: provisionSequences,
|
|
327
|
+
// };
|
|
328
|
+
// return ok(result);
|
|
329
|
+
// }
|
|
330
|
+
// build(context: ContextV3, inputs: InputsWithProjectPath): Result<Action | undefined, FxError> {
|
|
331
|
+
// const projectSettings = context.projectSetting as ProjectSettingsV3;
|
|
332
|
+
// const actions: Action[] = projectSettings.components
|
|
333
|
+
// .filter((resource) => resource.build)
|
|
334
|
+
// .map((resource) => {
|
|
335
|
+
// return {
|
|
336
|
+
// name: `call:${resource.name}.build`,
|
|
337
|
+
// type: "call",
|
|
338
|
+
// targetAction: `${resource.name}.build`,
|
|
339
|
+
// required: false,
|
|
340
|
+
// };
|
|
341
|
+
// });
|
|
342
|
+
// const group: Action = {
|
|
343
|
+
// type: "group",
|
|
344
|
+
// mode: "parallel",
|
|
345
|
+
// actions: actions,
|
|
346
|
+
// };
|
|
347
|
+
// return ok(group);
|
|
348
|
+
// }
|
|
349
|
+
// deploy(
|
|
350
|
+
// context: ContextV3,
|
|
351
|
+
// inputs: InputsWithProjectPath
|
|
352
|
+
// ): MaybePromise<Result<Action | undefined, FxError>> {
|
|
353
|
+
// const projectSettings = context.projectSetting as ProjectSettingsV3;
|
|
354
|
+
// const actions: Action[] = [
|
|
355
|
+
// {
|
|
356
|
+
// name: "call:fx.build",
|
|
357
|
+
// type: "call",
|
|
358
|
+
// targetAction: "fx.build",
|
|
359
|
+
// required: false,
|
|
360
|
+
// },
|
|
361
|
+
// ];
|
|
362
|
+
// projectSettings.components
|
|
363
|
+
// .filter((resource) => resource.build && resource.hosting)
|
|
364
|
+
// .forEach((resource) => {
|
|
365
|
+
// actions.push({
|
|
366
|
+
// type: "call",
|
|
367
|
+
// targetAction: `${resource.hosting}.deploy`,
|
|
368
|
+
// required: false,
|
|
369
|
+
// inputs: {
|
|
370
|
+
// [resource.hosting!]: {
|
|
371
|
+
// folder: resource.folder,
|
|
372
|
+
// },
|
|
373
|
+
// },
|
|
374
|
+
// });
|
|
375
|
+
// });
|
|
376
|
+
// const action: GroupAction = {
|
|
377
|
+
// type: "group",
|
|
378
|
+
// name: "fx.deploy",
|
|
379
|
+
// actions: actions,
|
|
380
|
+
// };
|
|
381
|
+
// return ok(action);
|
|
382
|
+
// }
|
|
383
|
+
}
|
|
384
|
+
init(context, inputs) {
|
|
385
|
+
const initProjectSettings = {
|
|
386
|
+
type: "function",
|
|
387
|
+
name: "fx.initConfig",
|
|
388
|
+
plan: (context, inputs) => {
|
|
389
|
+
return teamsfx_api_1.ok([
|
|
390
|
+
{
|
|
391
|
+
type: "file",
|
|
392
|
+
operate: "create",
|
|
393
|
+
filePath: projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath),
|
|
394
|
+
},
|
|
395
|
+
]);
|
|
396
|
+
},
|
|
397
|
+
question: (context, inputs) => {
|
|
398
|
+
const question = {
|
|
399
|
+
type: "text",
|
|
400
|
+
name: "app-name",
|
|
401
|
+
title: "Application name",
|
|
402
|
+
validation: {
|
|
403
|
+
pattern: question_1.ProjectNamePattern,
|
|
404
|
+
maxLength: 30,
|
|
405
|
+
},
|
|
406
|
+
placeholder: "Application name",
|
|
407
|
+
};
|
|
408
|
+
return teamsfx_api_1.ok(new teamsfx_api_1.QTreeNode(question));
|
|
409
|
+
},
|
|
410
|
+
execute: async (context, inputs) => {
|
|
411
|
+
const projectSettings = projectSettingsHelper_1.newProjectSettings();
|
|
412
|
+
projectSettings.appName = workflow_1.getEmbeddedValueByPath(inputs, "app-name");
|
|
413
|
+
projectSettings.components = [];
|
|
414
|
+
context.projectSetting = projectSettings;
|
|
415
|
+
await fs_extra_1.default.ensureDir(inputs.projectPath);
|
|
416
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(inputs.projectPath, `.${teamsfx_api_1.ConfigFolderName}`));
|
|
417
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(inputs.projectPath, `.${teamsfx_api_1.ConfigFolderName}`, "configs"));
|
|
418
|
+
return teamsfx_api_1.ok([
|
|
419
|
+
{
|
|
420
|
+
type: "file",
|
|
421
|
+
operate: "create",
|
|
422
|
+
filePath: projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath),
|
|
423
|
+
},
|
|
424
|
+
]);
|
|
425
|
+
},
|
|
426
|
+
};
|
|
427
|
+
const action = {
|
|
428
|
+
type: "group",
|
|
429
|
+
name: "fx.init",
|
|
430
|
+
actions: [
|
|
431
|
+
initProjectSettings,
|
|
432
|
+
{
|
|
433
|
+
type: "call",
|
|
434
|
+
targetAction: "teams-manifest.init",
|
|
435
|
+
required: true,
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
type: "call",
|
|
439
|
+
targetAction: "env-manager.create",
|
|
440
|
+
required: true,
|
|
441
|
+
},
|
|
442
|
+
projectSettingsManager_1.WriteProjectSettingsAction,
|
|
443
|
+
],
|
|
444
|
+
};
|
|
445
|
+
return teamsfx_api_1.ok(action);
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
*
|
|
449
|
+
* capability = Notification
|
|
450
|
+
* bot-host-type-trigger = http-restify
|
|
451
|
+
* group=bot, scenario=notification-restify, host=app-service
|
|
452
|
+
* bot-host-type-trigger = [http-functions, timer-functions]
|
|
453
|
+
* group=bot, host=function, scenario=notification-function-base + [notification-trigger-http, notification-trigger-timer]
|
|
454
|
+
* capability = command-bot:
|
|
455
|
+
* group=bot, host=app-service, scenario=command-and-response
|
|
456
|
+
* capability = Bot
|
|
457
|
+
* group=bot, host=app-service, scenario=default
|
|
458
|
+
* capability = MessagingExtension
|
|
459
|
+
* group=bot, host=app-service, scenario=default
|
|
460
|
+
*/
|
|
461
|
+
/**
|
|
462
|
+
* 1. config bot in project settings
|
|
463
|
+
* 2. generate bot source code
|
|
464
|
+
* 3. generate bot-service and hosting bicep
|
|
465
|
+
* 3. overwrite hosting config bicep
|
|
466
|
+
* 4. persist bicep
|
|
467
|
+
* 5. add capability in teams manifest
|
|
468
|
+
*/
|
|
469
|
+
addBot(context, inputs) {
|
|
470
|
+
const feature = inputs.feature;
|
|
471
|
+
const triggers = inputs[constants_1.QuestionNames.BOT_HOST_TYPE_TRIGGER];
|
|
472
|
+
inputs.hosting = "azure-web-app";
|
|
473
|
+
const scenarios = [];
|
|
474
|
+
if (feature === plugins_1.NotificationOptionItem.id) {
|
|
475
|
+
if (triggers.includes(question_2.AppServiceOptionItem.id)) {
|
|
476
|
+
scenarios.push(constants_1.TemplateProjectsScenarios.NOTIFICATION_RESTIFY_SCENARIO_NAME);
|
|
477
|
+
}
|
|
478
|
+
else {
|
|
479
|
+
inputs.hosting = "azure-function";
|
|
480
|
+
if (triggers.includes(question_2.FunctionsHttpTriggerOptionItem.id)) {
|
|
481
|
+
scenarios.push(constants_1.TemplateProjectsScenarios.NOTIFICATION_FUNCTION_TRIGGER_HTTP_SCENARIO_NAME);
|
|
482
|
+
}
|
|
483
|
+
if (triggers.includes(question_2.FunctionsTimerTriggerOptionItem.id)) {
|
|
484
|
+
scenarios.push(constants_1.TemplateProjectsScenarios.NOTIFICATION_FUNCTION_TRIGGER_TIMER_SCENARIO_NAME);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
else if (feature === plugins_1.CommandAndResponseOptionItem.id) {
|
|
489
|
+
scenarios.push(constants_1.TemplateProjectsScenarios.COMMAND_AND_RESPONSE_SCENARIO_NAME);
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
scenarios.push(constants_1.TemplateProjectsScenarios.DEFAULT_SCENARIO_NAME);
|
|
493
|
+
}
|
|
494
|
+
const actions = [
|
|
495
|
+
projectSettingsManager_1.LoadProjectSettingsAction,
|
|
496
|
+
{
|
|
497
|
+
name: "fx.configBot",
|
|
498
|
+
type: "function",
|
|
499
|
+
plan: (context, inputs) => {
|
|
500
|
+
const remarks = [
|
|
501
|
+
`add components 'teams-bot', '${inputs.hosting}', 'bot-service' in projectSettings`,
|
|
502
|
+
];
|
|
503
|
+
// connect to azure-sql
|
|
504
|
+
if (workflow_1.getComponent(context.projectSetting, "azure-sql")) {
|
|
505
|
+
remarks.push(`connect 'azure-sql' to hosting component '${inputs.hosting}' in projectSettings`);
|
|
506
|
+
}
|
|
507
|
+
return teamsfx_api_1.ok(remarks);
|
|
508
|
+
},
|
|
509
|
+
execute: async (context, inputs) => {
|
|
510
|
+
const projectSettings = context.projectSetting;
|
|
511
|
+
// add teams-bot
|
|
512
|
+
projectSettings.components.push({
|
|
513
|
+
name: "teams-bot",
|
|
514
|
+
hosting: inputs.hosting,
|
|
515
|
+
});
|
|
516
|
+
// add hosting component
|
|
517
|
+
const hostingComponent = {
|
|
518
|
+
name: inputs.hosting,
|
|
519
|
+
connections: ["teams-bot"],
|
|
520
|
+
};
|
|
521
|
+
projectSettings.components.push(hostingComponent);
|
|
522
|
+
//add bot-service
|
|
523
|
+
projectSettings.components.push({
|
|
524
|
+
name: "bot-service",
|
|
525
|
+
provision: true,
|
|
526
|
+
});
|
|
527
|
+
const remarks = [
|
|
528
|
+
`add components 'teams-bot', '${inputs.hosting}', 'bot-service' in projectSettings`,
|
|
529
|
+
];
|
|
530
|
+
// connect azure-sql to hosting component
|
|
531
|
+
if (workflow_1.getComponent(context.projectSetting, "azure-sql")) {
|
|
532
|
+
hostingComponent.connections.push("azure-sql");
|
|
533
|
+
remarks.push(`connect 'azure-sql' to hosting component '${inputs.hosting}' in projectSettings`);
|
|
534
|
+
}
|
|
535
|
+
return teamsfx_api_1.ok([
|
|
536
|
+
{
|
|
537
|
+
type: "file",
|
|
538
|
+
operate: "replace",
|
|
539
|
+
filePath: projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath),
|
|
540
|
+
remarks: remarks.join(";"),
|
|
541
|
+
},
|
|
542
|
+
]);
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
name: "call:bot-code.generate",
|
|
547
|
+
type: "call",
|
|
548
|
+
required: true,
|
|
549
|
+
targetAction: "bot-code.generate",
|
|
550
|
+
inputs: {
|
|
551
|
+
scenarios: scenarios,
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
type: "call",
|
|
556
|
+
targetAction: "bicep.init",
|
|
557
|
+
required: true,
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
name: `call:${inputs.hosting}.generateBicep`,
|
|
561
|
+
type: "call",
|
|
562
|
+
required: true,
|
|
563
|
+
targetAction: `${inputs.hosting}.generateBicep`,
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
name: "call:bot-service.generateBicep",
|
|
567
|
+
type: "call",
|
|
568
|
+
required: true,
|
|
569
|
+
targetAction: "bot-service.generateBicep",
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
name: `call:${inputs.hosting}-config.generateBicep`,
|
|
573
|
+
type: "call",
|
|
574
|
+
required: true,
|
|
575
|
+
targetAction: `${inputs.hosting}-config.generateBicep`,
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
name: "call:teams-manifest.addCapability",
|
|
579
|
+
type: "call",
|
|
580
|
+
required: true,
|
|
581
|
+
targetAction: "teams-manifest.addCapability",
|
|
582
|
+
inputs: {
|
|
583
|
+
capabilities: [{ name: "Bot" }],
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
];
|
|
587
|
+
actions.push(projectSettingsManager_1.WriteProjectSettingsAction);
|
|
588
|
+
const group = {
|
|
589
|
+
type: "group",
|
|
590
|
+
name: "fx.addBot",
|
|
591
|
+
mode: "sequential",
|
|
592
|
+
actions: actions,
|
|
593
|
+
};
|
|
594
|
+
return teamsfx_api_1.ok(group);
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* 1. config sql
|
|
598
|
+
* 2. add sql provision bicep
|
|
599
|
+
* 3. re-generate resources that connect to sql
|
|
600
|
+
* 4. persist bicep
|
|
601
|
+
*/
|
|
602
|
+
addSql(context, inputs) {
|
|
603
|
+
const sqlComponent = workflow_1.getComponent(context.projectSetting, "azure-sql");
|
|
604
|
+
const provisionType = sqlComponent ? "database" : "server";
|
|
605
|
+
const actions = [
|
|
606
|
+
projectSettingsManager_1.LoadProjectSettingsAction,
|
|
607
|
+
{
|
|
608
|
+
name: "fx.configSql",
|
|
609
|
+
type: "function",
|
|
610
|
+
plan: (context, inputs) => {
|
|
611
|
+
const sqlComponent = workflow_1.getComponent(context.projectSetting, "azure-sql");
|
|
612
|
+
if (sqlComponent) {
|
|
613
|
+
return teamsfx_api_1.ok([]);
|
|
614
|
+
}
|
|
615
|
+
const remarks = ["add component 'azure-sql' in projectSettings"];
|
|
616
|
+
const webAppComponent = workflow_1.getComponent(context.projectSetting, "azure-web-app");
|
|
617
|
+
if (webAppComponent) {
|
|
618
|
+
remarks.push("connect 'azure-sql' to component 'azure-web-app' in projectSettings");
|
|
619
|
+
}
|
|
620
|
+
const functionComponent = workflow_1.getComponent(context.projectSetting, "azure-function");
|
|
621
|
+
if (functionComponent) {
|
|
622
|
+
remarks.push("connect 'azure-sql' to component 'azure-function' in projectSettings");
|
|
623
|
+
}
|
|
624
|
+
return teamsfx_api_1.ok([
|
|
625
|
+
{
|
|
626
|
+
type: "file",
|
|
627
|
+
operate: "replace",
|
|
628
|
+
filePath: projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath),
|
|
629
|
+
remarks: remarks.join(";"),
|
|
630
|
+
},
|
|
631
|
+
]);
|
|
632
|
+
},
|
|
633
|
+
execute: async (context, inputs) => {
|
|
634
|
+
const sqlComponent = workflow_1.getComponent(context.projectSetting, "azure-sql");
|
|
635
|
+
if (sqlComponent)
|
|
636
|
+
return teamsfx_api_1.ok([]);
|
|
637
|
+
const projectSettings = context.projectSetting;
|
|
638
|
+
const remarks = ["add component 'azure-sql' in projectSettings"];
|
|
639
|
+
projectSettings.components.push({
|
|
640
|
+
name: "azure-sql",
|
|
641
|
+
provision: true,
|
|
642
|
+
});
|
|
643
|
+
const webAppComponent = workflow_1.getComponent(context.projectSetting, "azure-web-app");
|
|
644
|
+
if (webAppComponent) {
|
|
645
|
+
if (!webAppComponent.connections)
|
|
646
|
+
webAppComponent.connections = [];
|
|
647
|
+
webAppComponent.connections.push("azure-sql");
|
|
648
|
+
remarks.push("connect 'azure-sql' to component 'azure-web-app' in projectSettings");
|
|
649
|
+
}
|
|
650
|
+
const functionComponent = workflow_1.getComponent(context.projectSetting, "azure-function");
|
|
651
|
+
if (functionComponent) {
|
|
652
|
+
if (!functionComponent.connections)
|
|
653
|
+
functionComponent.connections = [];
|
|
654
|
+
functionComponent.connections.push("azure-sql");
|
|
655
|
+
remarks.push("connect 'azure-sql' to component 'azure-function' in projectSettings");
|
|
656
|
+
}
|
|
657
|
+
return teamsfx_api_1.ok([
|
|
658
|
+
{
|
|
659
|
+
type: "file",
|
|
660
|
+
operate: "replace",
|
|
661
|
+
filePath: projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath),
|
|
662
|
+
remarks: remarks.join(";"),
|
|
663
|
+
},
|
|
664
|
+
]);
|
|
665
|
+
},
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
type: "call",
|
|
669
|
+
targetAction: "bicep.init",
|
|
670
|
+
required: true,
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
name: "call:azure-sql.generateBicep",
|
|
674
|
+
type: "call",
|
|
675
|
+
required: true,
|
|
676
|
+
targetAction: "azure-sql.generateBicep",
|
|
677
|
+
inputs: {
|
|
678
|
+
provisionType: provisionType,
|
|
679
|
+
},
|
|
680
|
+
},
|
|
681
|
+
];
|
|
682
|
+
const webAppComponent = workflow_1.getComponent(context.projectSetting, "azure-web-app");
|
|
683
|
+
if (webAppComponent) {
|
|
684
|
+
actions.push({
|
|
685
|
+
name: "call:azure-web-app-config.generateBicep",
|
|
686
|
+
type: "call",
|
|
687
|
+
required: true,
|
|
688
|
+
targetAction: "azure-web-app-config.generateBicep",
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
const functionComponent = workflow_1.getComponent(context.projectSetting, "azure-function");
|
|
692
|
+
if (functionComponent) {
|
|
693
|
+
actions.push({
|
|
694
|
+
name: "call:azure-function-config.generateBicep",
|
|
695
|
+
type: "call",
|
|
696
|
+
required: true,
|
|
697
|
+
targetAction: "azure-function-config.generateBicep",
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
actions.push(projectSettingsManager_1.WriteProjectSettingsAction);
|
|
701
|
+
const group = {
|
|
702
|
+
type: "group",
|
|
703
|
+
name: "fx.addSql",
|
|
704
|
+
mode: "sequential",
|
|
705
|
+
actions: actions,
|
|
706
|
+
};
|
|
707
|
+
return teamsfx_api_1.ok(group);
|
|
708
|
+
}
|
|
709
|
+
};
|
|
710
|
+
TeamsfxCore = tslib_1.__decorate([
|
|
711
|
+
typedi_1.Service("fx")
|
|
712
|
+
], TeamsfxCore);
|
|
713
|
+
exports.TeamsfxCore = TeamsfxCore;
|
|
714
|
+
//# sourceMappingURL=core.js.map
|