@microsoft/teamsfx-core 1.9.0 → 1.9.1-alpha.2cc91ae90.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/azureAppServiceHosting.d.ts +16 -0
- package/build/common/azure-hosting/azureAppServiceHosting.d.ts.map +1 -0
- package/build/common/azure-hosting/azureAppServiceHosting.js +33 -0
- package/build/common/azure-hosting/azureAppServiceHosting.js.map +1 -0
- package/build/common/azure-hosting/azureFunctionHosting.d.ts +17 -0
- package/build/common/azure-hosting/azureFunctionHosting.d.ts.map +1 -0
- package/build/common/azure-hosting/azureFunctionHosting.js +36 -0
- package/build/common/azure-hosting/azureFunctionHosting.js.map +1 -0
- package/build/common/azure-hosting/azureHosting.d.ts +22 -0
- package/build/common/azure-hosting/azureHosting.d.ts.map +1 -0
- package/build/common/azure-hosting/azureHosting.js +89 -0
- package/build/common/azure-hosting/azureHosting.js.map +1 -0
- package/build/common/azure-hosting/azureOps.d.ts +16 -0
- package/build/common/azure-hosting/azureOps.d.ts.map +1 -0
- package/build/common/azure-hosting/azureOps.js +87 -0
- package/build/common/azure-hosting/azureOps.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/hostingConstant.d.ts +45 -0
- package/build/common/azure-hosting/hostingConstant.d.ts.map +1 -0
- package/build/common/azure-hosting/hostingConstant.js +85 -0
- package/build/common/azure-hosting/hostingConstant.js.map +1 -0
- package/build/common/azure-hosting/hostingError.d.ts +47 -0
- package/build/common/azure-hosting/hostingError.d.ts.map +1 -0
- package/build/common/azure-hosting/hostingError.js +83 -0
- package/build/common/azure-hosting/hostingError.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 +24 -0
- package/build/common/azure-hosting/hostingFactory.js.map +1 -0
- package/build/common/azure-hosting/interfaces.d.ts +39 -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 +7 -0
- package/build/common/azure-hosting/utils.d.ts.map +1 -0
- package/build/common/azure-hosting/utils.js +86 -0
- package/build/common/azure-hosting/utils.js.map +1 -0
- package/build/common/constants.d.ts +6 -0
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +8 -1
- 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 +2 -1
- package/build/common/deps-checker/constant/helpLink.js.map +1 -1
- package/build/common/deps-checker/constant/message.d.ts +1 -0
- package/build/common/deps-checker/constant/message.d.ts.map +1 -1
- package/build/common/deps-checker/constant/message.js +1 -0
- package/build/common/deps-checker/constant/message.js.map +1 -1
- package/build/common/deps-checker/depsError.d.ts +3 -0
- package/build/common/deps-checker/depsError.d.ts.map +1 -1
- package/build/common/deps-checker/depsError.js +8 -1
- package/build/common/deps-checker/depsError.js.map +1 -1
- package/build/common/deps-checker/depsManager.js +1 -1
- package/build/common/deps-checker/depsManager.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts +1 -0
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js +36 -0
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.d.ts +7 -0
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +2 -1
- 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 +5 -1
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts +2 -1
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +19 -2
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/template-utils/templatesUtils.d.ts +1 -1
- package/build/common/template-utils/templatesUtils.d.ts.map +1 -1
- package/build/common/template-utils/templatesUtils.js +9 -2
- package/build/common/template-utils/templatesUtils.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/common/tools.d.ts +5 -0
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +17 -1
- 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 +107 -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 +440 -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 +36 -91
- package/build/core/FxCore.js.map +1 -1
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/collaborator.js +2 -1
- package/build/core/collaborator.js.map +1 -1
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +65 -20
- 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 +83 -0
- package/build/core/middleware/questionModelV3.js.map +1 -0
- package/build/core/question.d.ts +6 -0
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +42 -1
- package/build/core/question.js.map +1 -1
- package/build/plugins/resource/apiconnector/index.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/index.js +3 -1
- package/build/plugins/resource/apiconnector/index.js.map +1 -1
- package/build/plugins/resource/appstudio/constants.d.ts +2 -4
- package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/constants.js +3 -5
- package/build/plugins/resource/appstudio/constants.js.map +1 -1
- package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/index.js +27 -18
- package/build/plugins/resource/appstudio/index.js.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js +6 -6
- package/build/plugins/resource/appstudio/plugin.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/constants.d.ts +2 -70
- package/build/plugins/resource/bot/constants.d.ts.map +1 -1
- package/build/plugins/resource/bot/constants.js +9 -85
- package/build/plugins/resource/bot/constants.js.map +1 -1
- package/build/plugins/resource/bot/dotnet/constants.d.ts +5 -0
- package/build/plugins/resource/bot/dotnet/constants.d.ts.map +1 -1
- package/build/plugins/resource/bot/dotnet/constants.js +7 -1
- package/build/plugins/resource/bot/dotnet/constants.js.map +1 -1
- package/build/plugins/resource/bot/dotnet/errors.d.ts +5 -0
- package/build/plugins/resource/bot/dotnet/errors.d.ts.map +1 -0
- package/build/plugins/resource/bot/dotnet/errors.js +21 -0
- package/build/plugins/resource/bot/dotnet/errors.js.map +1 -0
- package/build/plugins/resource/bot/dotnet/plugin.d.ts +1 -0
- package/build/plugins/resource/bot/dotnet/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/dotnet/plugin.js +28 -0
- package/build/plugins/resource/bot/dotnet/plugin.js.map +1 -1
- package/build/plugins/resource/bot/errors.d.ts +5 -16
- package/build/plugins/resource/bot/errors.d.ts.map +1 -1
- package/build/plugins/resource/bot/errors.js +68 -38
- package/build/plugins/resource/bot/errors.js.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/deployMgr.d.ts.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js +7 -7
- package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/plugin.js +16 -16
- package/build/plugins/resource/bot/functionsHostedBot/plugin.js.map +1 -1
- package/build/plugins/resource/bot/index.d.ts +1 -2
- package/build/plugins/resource/bot/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/index.js +27 -76
- package/build/plugins/resource/bot/index.js.map +1 -1
- package/build/plugins/resource/bot/languageStrategy.d.ts.map +1 -1
- package/build/plugins/resource/bot/languageStrategy.js.map +1 -1
- package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/plugin.js +19 -24
- package/build/plugins/resource/bot/plugin.js.map +1 -1
- package/build/plugins/resource/bot/progressBars.d.ts +1 -1
- package/build/plugins/resource/bot/progressBars.d.ts.map +1 -1
- package/build/plugins/resource/bot/progressBars.js +6 -6
- package/build/plugins/resource/bot/progressBars.js.map +1 -1
- package/build/plugins/resource/bot/question.d.ts +5 -3
- package/build/plugins/resource/bot/question.d.ts.map +1 -1
- package/build/plugins/resource/bot/question.js +33 -1
- package/build/plugins/resource/bot/question.js.map +1 -1
- package/build/plugins/resource/bot/resources/messages.d.ts +0 -14
- package/build/plugins/resource/bot/resources/messages.d.ts.map +1 -1
- package/build/plugins/resource/bot/resources/messages.js +0 -41
- package/build/plugins/resource/bot/resources/messages.js.map +1 -1
- package/build/plugins/resource/bot/resources/strings.d.ts +2 -11
- package/build/plugins/resource/bot/resources/strings.d.ts.map +1 -1
- package/build/plugins/resource/bot/resources/strings.js +2 -15
- package/build/plugins/resource/bot/resources/strings.js.map +1 -1
- package/build/plugins/resource/bot/utils/common.d.ts +10 -0
- package/build/plugins/resource/bot/utils/common.d.ts.map +1 -1
- package/build/plugins/resource/bot/utils/common.js +92 -3
- 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 +73 -0
- package/build/plugins/resource/bot/v2/common.js.map +1 -0
- package/build/plugins/resource/bot/v2/enum.d.ts +10 -0
- package/build/plugins/resource/bot/v2/enum.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/enum.js +17 -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 +22 -5
- 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 +8 -0
- package/build/plugins/resource/bot/v2/mapping.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/mapping.js +91 -0
- package/build/plugins/resource/bot/v2/mapping.js.map +1 -0
- package/build/plugins/resource/bot/v2/plugin.d.ts +48 -0
- package/build/plugins/resource/bot/v2/plugin.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/plugin.js +303 -0
- package/build/plugins/resource/bot/v2/plugin.js.map +1 -0
- package/build/plugins/resource/bot/v2/scaffold.d.ts +5 -0
- package/build/plugins/resource/bot/v2/scaffold.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/scaffold.js +48 -0
- package/build/plugins/resource/bot/v2/scaffold.js.map +1 -0
- package/build/plugins/resource/bot/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/v3/index.js +7 -11
- package/build/plugins/resource/bot/v3/index.js.map +1 -1
- package/build/plugins/resource/cicd/plugin.d.ts.map +1 -1
- package/build/plugins/resource/cicd/plugin.js +7 -1
- package/build/plugins/resource/cicd/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.d.ts +1 -13
- package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.js +4 -16
- 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 +12 -48
- 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/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/frontend/v2/index.js +1 -3
- package/build/plugins/resource/frontend/v2/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 +5 -2
- package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/constants.js +3 -0
- package/build/plugins/solution/fx-solution/constants.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js +2 -2
- package/build/plugins/solution/fx-solution/question.d.ts +1 -0
- package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/question.js +7 -1
- package/build/plugins/solution/fx-solution/question.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/listCollaborator.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/listCollaborator.js +2 -1
- package/build/plugins/solution/fx-solution/v2/listCollaborator.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 +29 -1
- package/build/plugins/solution/fx-solution/v2/provision.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 +0 -1
- package/build/plugins/solution/fx-solution/v3/constants.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 +5 -12
- package/build/plugins/solution/fx-solution/v3/userTask.js.map +1 -1
- package/package.json +8 -3
- package/resource/package.nls.cs.json +642 -0
- package/resource/package.nls.de.json +642 -0
- package/resource/package.nls.es.json +642 -0
- package/resource/package.nls.fr.json +642 -0
- package/resource/package.nls.it.json +642 -0
- package/resource/package.nls.ja.json +642 -0
- package/resource/package.nls.json +29 -19
- package/resource/package.nls.ko.json +642 -0
- package/resource/package.nls.pl.json +642 -0
- package/resource/package.nls.pt-BR.json +642 -0
- package/resource/package.nls.ru.json +642 -0
- package/resource/package.nls.tr.json +642 -0
- package/resource/package.nls.zh-Hans.json +642 -0
- package/resource/package.nls.zh-Hant.json +642 -0
- 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/fallback/blazor-base.csharp.default.zip +0 -0
- package/templates/fallback/bot.csharp.command-and-response.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/js/public/auth-end.html +8 -8
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +8 -8
- package/templates/plugins/resource/hosting/bicep/botFunction/botFunctionConfiguration.template.bicep +71 -0
- package/templates/plugins/resource/hosting/bicep/botFunction/botFunctionProvision.template.bicep +101 -0
- package/templates/plugins/resource/hosting/bicep/botFunction/config.template.bicep +12 -0
- package/templates/plugins/resource/hosting/bicep/botFunction/provision.template.bicep +20 -0
- 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/webapp/config.template.bicep +12 -0
- package/templates/plugins/resource/hosting/bicep/webapp/provision.template.bicep +20 -0
- package/templates/plugins/resource/hosting/bicep/webapp/webappConfiguration.template.bicep +66 -0
- package/templates/plugins/resource/hosting/bicep/webapp/webappProvision.template.bicep +63 -0
- package/build/plugins/resource/bot/azureOps.d.ts +0 -14
- package/build/plugins/resource/bot/azureOps.d.ts.map +0 -1
- package/build/plugins/resource/bot/azureOps.js +0 -140
- package/build/plugins/resource/bot/azureOps.js.map +0 -1
- package/build/plugins/resource/bot/functionsHostedBot/constants.d.ts +0 -13
- package/build/plugins/resource/bot/functionsHostedBot/constants.d.ts.map +0 -1
- package/build/plugins/resource/bot/functionsHostedBot/constants.js +0 -20
- package/build/plugins/resource/bot/functionsHostedBot/constants.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// database added with name suffix [{{suffix}}]
|
|
2
|
+
var sqlDatabaseName_{{suffix}} = contains(provisionParameters, 'sqlDatabaseName_{{suffix}}') ? provisionParameters['sqlDatabaseName_{{suffix}}'] : '${resourceBaseName}_{{suffix}}'
|
|
3
|
+
var sqlDatabaseSku_{{suffix}} = contains(provisionParameters, 'sqlDatabaseSku_{{suffix}}') ? provisionParameters['sqlDatabaseSku_{{suffix}}'] : 'Basic'
|
|
4
|
+
|
|
5
|
+
resource sqlDatabase_{{suffix}} 'Microsoft.Sql/servers/databases@2021-05-01-preview' = {
|
|
6
|
+
// parent should refer to resource symbolic name of SQL server
|
|
7
|
+
parent: sqlServer
|
|
8
|
+
location: resourceGroup().location
|
|
9
|
+
name: sqlDatabaseName_{{suffix}}
|
|
10
|
+
sku: {
|
|
11
|
+
name: sqlDatabaseSku_{{suffix}}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
output databaseName_{{suffix}} string = sqlDatabaseName_{{suffix}}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
var resourceBaseName = provisionParameters.resourceBaseName
|
|
4
|
+
var sqlServerName = contains(provisionParameters, 'sqlServerName') ? provisionParameters['sqlServerName'] : '${resourceBaseName}' // Try to read name for SQL Server from parameters
|
|
5
|
+
var sqlDatabaseName = contains(provisionParameters, 'sqlDatabaseName') ? provisionParameters['sqlDatabaseName'] : '${resourceBaseName}' // Try to read name for SQL Database from parameters
|
|
6
|
+
var sqlDatabaseSku = contains(provisionParameters, 'sqlDatabaseSku') ? provisionParameters['sqlDatabaseSku'] : 'Basic' // Try to read SKU for SQL Database from parameters
|
|
7
|
+
var administratorLogin = contains(provisionParameters, 'azureSqlAdmin') ? provisionParameters['azureSqlAdmin'] : '' // Try to read admin name for SQL Server from parameters, the value must be empty or same with the admin name used to create SQL Server
|
|
8
|
+
var administratorLoginPassword = contains(provisionParameters, 'azureSqlAdminPassword') ? provisionParameters['azureSqlAdminPassword'] : '' // Try to read admin password for SQL Server from parameters, empty means do not update admin password
|
|
9
|
+
|
|
10
|
+
// SQL Server that hosts the databases
|
|
11
|
+
// The symbolic name of SQL Server will be referenced as parent when adding nmultiple databases
|
|
12
|
+
resource sqlServer 'Microsoft.Sql/servers@2021-05-01-preview' = {
|
|
13
|
+
location: resourceGroup().location
|
|
14
|
+
name: sqlServerName
|
|
15
|
+
properties: {
|
|
16
|
+
minimalTlsVersion:'1.2'
|
|
17
|
+
administratorLogin: empty(administratorLogin) ? null : administratorLogin
|
|
18
|
+
administratorLoginPassword: administratorLoginPassword
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// SQL Database
|
|
23
|
+
resource sqlDatabase 'Microsoft.Sql/servers/databases@2021-05-01-preview' = {
|
|
24
|
+
parent: sqlServer
|
|
25
|
+
location: resourceGroup().location
|
|
26
|
+
name: sqlDatabaseName
|
|
27
|
+
sku: {
|
|
28
|
+
name: sqlDatabaseSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add sqlDatabaseSku property to provisionParameters to override the default value "Basic".
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Allow Azure services connect to the SQL Server
|
|
33
|
+
resource sqlFirewallRules 'Microsoft.Sql/servers/firewallRules@2021-05-01-preview' = {
|
|
34
|
+
parent: sqlServer
|
|
35
|
+
name: 'AllowAzure'
|
|
36
|
+
properties: {
|
|
37
|
+
endIpAddress: '0.0.0.0'
|
|
38
|
+
startIpAddress: '0.0.0.0'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
output resourceId string = sqlServer.id
|
|
43
|
+
output sqlEndpoint string = sqlServer.properties.fullyQualifiedDomainName
|
|
44
|
+
output sqlDatabaseName string = sqlDatabaseName
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Resources for Azure SQL
|
|
2
|
+
module azureSqlProvision './provision/azureSql.bicep' = {
|
|
3
|
+
name: 'azureSqlProvision'
|
|
4
|
+
params: {
|
|
5
|
+
provisionParameters: provisionParameters
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
output azureSqlOutput object = {
|
|
10
|
+
teamsFxPluginId: 'azure-sql'
|
|
11
|
+
sqlResourceId: azureSqlProvision.outputs.resourceId
|
|
12
|
+
sqlEndpoint: azureSqlProvision.outputs.sqlEndpoint
|
|
13
|
+
sqlDatabaseName: azureSqlProvision.outputs.sqlDatabaseName
|
|
14
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Auto generated content, please customize files under provision folder
|
|
2
|
+
|
|
3
|
+
@secure()
|
|
4
|
+
param provisionParameters object
|
|
5
|
+
param provisionOutputs object
|
|
6
|
+
@secure()
|
|
7
|
+
param currentAppSettings object
|
|
8
|
+
|
|
9
|
+
var webAppName = split({{azure-web-app.outputs.resourceId}} , '/')[8]
|
|
10
|
+
{{#if (contains "aad" connections)}}
|
|
11
|
+
var m365ClientId = provisionParameters['m365ClientId']
|
|
12
|
+
{{#if (contains "key-vault" connections) }}
|
|
13
|
+
var m365ClientSecret = {{key-vault.outputs.m365ClientSecretReference}}
|
|
14
|
+
{{else}}
|
|
15
|
+
var m365ClientSecret = provisionParameters['m365ClientSecret']
|
|
16
|
+
{{/if}}
|
|
17
|
+
var m365TenantId = provisionParameters['m365TenantId']
|
|
18
|
+
var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
|
|
19
|
+
var botId = provisionParameters['botAadAppClientId']
|
|
20
|
+
{{#if (contains "teams-tab" connections)}}
|
|
21
|
+
{{#if (contains "bot-service" connections) }}
|
|
22
|
+
var m365ApplicationIdUri = 'api://${ {{tabDomainVarName}} }/botid-${botId}'
|
|
23
|
+
{{/if}}
|
|
24
|
+
{{else}}
|
|
25
|
+
var m365ApplicationIdUri = 'api://botid-${botId}'
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{/if}}
|
|
28
|
+
{{#if (contains "teams-bot" connections)}}
|
|
29
|
+
var botAadAppClientId = provisionParameters['botAadAppClientId']
|
|
30
|
+
{{#if (contains "key-vault" connections) }}
|
|
31
|
+
var botAadAppClientSecret = {{key-vault.outputs.botClientSecretReference}}
|
|
32
|
+
{{else}}
|
|
33
|
+
var botAadAppClientSecret = provisionParameters['botAadAppClientSecret']
|
|
34
|
+
{{/if}}
|
|
35
|
+
{{/if}}
|
|
36
|
+
|
|
37
|
+
resource webAppSettings 'Microsoft.Web/sites/config@2021-02-01' = {
|
|
38
|
+
name: '${webAppName}/appsettings'
|
|
39
|
+
properties: union({
|
|
40
|
+
{{#if (contains "aad" connections)}}
|
|
41
|
+
INITIATE_LOGIN_ENDPOINT: uri({{azure-web-app.outputs.endpoint}}, 'auth-start.html') // The page is used to let users consent required OAuth permissions during bot SSO process
|
|
42
|
+
M365_AUTHORITY_HOST: m365OauthAuthorityHost // AAD authority host
|
|
43
|
+
M365_CLIENT_ID: m365ClientId // Client id of AAD application
|
|
44
|
+
M365_CLIENT_SECRET: m365ClientSecret // Client secret of AAD application
|
|
45
|
+
M365_TENANT_ID: m365TenantId // Tenant id of AAD application
|
|
46
|
+
M365_APPLICATION_ID_URI: m365ApplicationIdUri // Application ID URI of AAD application
|
|
47
|
+
{{/if}}
|
|
48
|
+
{{#if (contains "teams-bot" connections)}}
|
|
49
|
+
BOT_ID: botAadAppClientId // ID of your bot
|
|
50
|
+
BOT_PASSWORD: botAadAppClientSecret // Secret of your bot
|
|
51
|
+
{{/if}}
|
|
52
|
+
{{#if (contains "azure-function" connections) }}
|
|
53
|
+
API_ENDPOINT: {{azure-function.outputs.functionEndpoint}} // Azure Function endpoint
|
|
54
|
+
{{/if}}
|
|
55
|
+
{{#if (contains "azure-sql" connections)}}
|
|
56
|
+
SQL_DATABASE_NAME: {{azure-sql.outputs.sqlDatabaseName}} // SQL database name
|
|
57
|
+
SQL_ENDPOINT: {{azure-sql.outputs.sqlEndpoint}} // SQL server endpoint
|
|
58
|
+
{{/if}}
|
|
59
|
+
{{#if (contains "identity" connections)}}
|
|
60
|
+
IDENTITY_ID: {{identity.outputs.identityClientId}} // User assigned identity id, the identity is used to access other Azure resources
|
|
61
|
+
{{/if}}
|
|
62
|
+
}, currentAppSettings)
|
|
63
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Get existing app settings for merge
|
|
2
|
+
var currentAppSettings = list('${provisionOutputs.azureWebAppOutput.value.resourceId}/config/appsettings', '2021-02-01').properties
|
|
3
|
+
|
|
4
|
+
// Merge TeamsFx configurations to Bot resources
|
|
5
|
+
module teamsFxAzureWebAppConfig './teamsFx/azureWebAppConfig.bicep' = {
|
|
6
|
+
name: 'teamsFxAzureWebAppConfig'
|
|
7
|
+
params: {
|
|
8
|
+
provisionParameters: provisionParameters
|
|
9
|
+
provisionOutputs: provisionOutputs
|
|
10
|
+
currentAppSettings: currentAppSettings
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
|
|
4
|
+
var resourceBaseName = provisionParameters.resourceBaseName
|
|
5
|
+
var serverfarmsName = contains(provisionParameters, 'webAppServerfarmsName') ? provisionParameters['webAppServerfarmsName'] : '${resourceBaseName}webApp' // Try to read name for App Service Plan from parameters
|
|
6
|
+
var webAppSKU = contains(provisionParameters, 'webAppSKU') ? provisionParameters['webAppSKU'] : 'F1' // Try to read SKU for Azure Web App from parameters
|
|
7
|
+
var webAppName = contains(provisionParameters, 'webAppSitesName') ? provisionParameters['webAppSitesName'] : '${resourceBaseName}webApp' // Try to read name for Azure Web App from parameters
|
|
8
|
+
|
|
9
|
+
// Compute resources for your Web App
|
|
10
|
+
resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = {
|
|
11
|
+
kind: 'app'
|
|
12
|
+
location: resourceGroup().location
|
|
13
|
+
name: serverfarmsName
|
|
14
|
+
sku: {
|
|
15
|
+
name: webAppSKU
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Web App that hosts your bot
|
|
20
|
+
resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
21
|
+
kind: 'app'
|
|
22
|
+
location: resourceGroup().location
|
|
23
|
+
name: webAppName
|
|
24
|
+
properties: {
|
|
25
|
+
serverFarmId: serverfarm.id
|
|
26
|
+
siteConfig: {
|
|
27
|
+
appSettings: [
|
|
28
|
+
{
|
|
29
|
+
name: 'SCM_DO_BUILD_DURING_DEPLOYMENT'
|
|
30
|
+
value: 'true' // Execute build steps on your site during deployment
|
|
31
|
+
}
|
|
32
|
+
{
|
|
33
|
+
name: 'WEBSITE_NODE_DEFAULT_VERSION'
|
|
34
|
+
value: '~14' // Set NodeJS version to 14.x for your site
|
|
35
|
+
}
|
|
36
|
+
{
|
|
37
|
+
name: 'RUNNING_ON_AZURE'
|
|
38
|
+
value: '1'
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
output sku string = webAppSKU
|
|
46
|
+
output appName string = webAppName
|
|
47
|
+
output domain string = webApp.properties.defaultHostName
|
|
48
|
+
output appServicePlanName string = serverfarmsName
|
|
49
|
+
output resourceId string = webApp.id
|
|
50
|
+
output endpoint string = 'https://${webApp.properties.defaultHostName}'
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Resources web app
|
|
2
|
+
module azureWebAppProvision './provision/azureWebApp.bicep' = {
|
|
3
|
+
name: 'azureWebAppProvision'
|
|
4
|
+
params: {
|
|
5
|
+
provisionParameters: provisionParameters
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
output azureWebAppOutput object = {
|
|
11
|
+
teamsFxPluginId: 'azure-web-app'
|
|
12
|
+
sku: azureWebAppProvision.outputs.sku
|
|
13
|
+
appName: azureWebAppProvision.outputs.appName
|
|
14
|
+
domain: azureWebAppProvision.outputs.domain
|
|
15
|
+
appServicePlanName: azureWebAppProvision.outputs.appServicePlanName
|
|
16
|
+
resourceId: azureWebAppProvision.outputs.resourceId
|
|
17
|
+
endpoint: azureWebAppProvision.outputs.endpoint
|
|
18
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
param provisionOutputs object
|
|
4
|
+
var resourceBaseName = provisionParameters.resourceBaseName
|
|
5
|
+
var botAadAppClientId = provisionParameters['botAadAppClientId'] // Read AAD app client id for Azure Bot Service from parameters
|
|
6
|
+
var botServiceName = contains(provisionParameters, 'botServiceName') ? provisionParameters['botServiceName'] : '${resourceBaseName}' // Try to read name for Azure Bot Service from parameters
|
|
7
|
+
var botServiceSku = contains(provisionParameters, 'botServiceSku') ? provisionParameters['botServiceSku'] : 'F0' // Try to read SKU for Azure Bot Service from parameters
|
|
8
|
+
var botDisplayName = contains(provisionParameters, 'botDisplayName') ? provisionParameters['botDisplayName'] : '${resourceBaseName}' // Try to read display name for Azure Bot Service from parameters
|
|
9
|
+
|
|
10
|
+
// Register your web service as a bot with the Bot Framework
|
|
11
|
+
resource azureBot 'Microsoft.BotService/botServices@2021-03-01' = {
|
|
12
|
+
kind: 'azurebot'
|
|
13
|
+
location: 'global'
|
|
14
|
+
name: botServiceName
|
|
15
|
+
properties: {
|
|
16
|
+
displayName: botDisplayName
|
|
17
|
+
endpoint: uri({{endpointVarName}} , '/api/messages')
|
|
18
|
+
msaAppId: botAadAppClientId
|
|
19
|
+
}
|
|
20
|
+
sku: {
|
|
21
|
+
name: botServiceSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add botServiceSku property to provisionParameters to override the default value "F0".
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Connect the bot service to Microsoft Teams
|
|
26
|
+
resource botServiceMsTeamsChannel 'Microsoft.BotService/botServices/channels@2021-03-01' = {
|
|
27
|
+
parent: azureBot
|
|
28
|
+
location: 'global'
|
|
29
|
+
name: 'MsTeamsChannel'
|
|
30
|
+
properties: {
|
|
31
|
+
channelName: 'MsTeamsChannel'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
|
|
4
|
+
module provision './provision.bicep' = {
|
|
5
|
+
name: 'provisionResources'
|
|
6
|
+
params: {
|
|
7
|
+
provisionParameters: provisionParameters
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
output provisionOutput object = provision
|
|
11
|
+
module config './config.bicep' = {
|
|
12
|
+
name: 'config'
|
|
13
|
+
params: {
|
|
14
|
+
provisionParameters: provisionParameters
|
|
15
|
+
provisionOutputs: provision
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
output configOutput object = contains(reference(resourceId('Microsoft.Resources/deployments', config.name), '2020-06-01'), 'outputs') ? config : {}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
microsoftTeams.initialize();
|
|
19
19
|
let hashParams = getHashParameters();
|
|
20
20
|
|
|
21
|
-
if (hashParams
|
|
21
|
+
if (hashParams.get("error")) {
|
|
22
22
|
// Authentication failed
|
|
23
|
-
handleAuthError(hashParams
|
|
24
|
-
} else if (hashParams
|
|
23
|
+
handleAuthError(hashParams.get("error"), hashParams);
|
|
24
|
+
} else if (hashParams.get("code")) {
|
|
25
25
|
// Get the stored state parameter and compare with incoming state
|
|
26
26
|
let expectedState = localStorage.getItem("state");
|
|
27
|
-
if (expectedState !== hashParams
|
|
27
|
+
if (expectedState !== hashParams.get("state")) {
|
|
28
28
|
// State does not match, report error
|
|
29
29
|
handleAuthError("StateDoesNotMatch", hashParams);
|
|
30
30
|
} else {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
// Parse hash parameters into key-value pairs
|
|
39
39
|
function getHashParameters() {
|
|
40
|
-
let hashParams =
|
|
40
|
+
let hashParams = new Map();
|
|
41
41
|
location.hash
|
|
42
42
|
.substr(1)
|
|
43
43
|
.split("&")
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
let s = item.split("="),
|
|
46
46
|
k = s[0],
|
|
47
47
|
v = s[1] && decodeURIComponent(s[1]);
|
|
48
|
-
hashParams
|
|
48
|
+
hashParams.set(k, v);
|
|
49
49
|
});
|
|
50
50
|
return hashParams;
|
|
51
51
|
}
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
// Show error information
|
|
54
54
|
function handleAuthError(errorType, errorMessage) {
|
|
55
55
|
const err = JSON.stringify({
|
|
56
|
-
error: errorType,
|
|
57
|
-
message: JSON.stringify(errorMessage),
|
|
56
|
+
error: encodeURIComponent(errorType),
|
|
57
|
+
message: encodeURIComponent(JSON.stringify(errorMessage)),
|
|
58
58
|
});
|
|
59
59
|
let para = document.createElement("p");
|
|
60
60
|
let node = document.createTextNode(err);
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
microsoftTeams.initialize();
|
|
19
19
|
let hashParams = getHashParameters();
|
|
20
20
|
|
|
21
|
-
if (hashParams
|
|
21
|
+
if (hashParams.get("error")) {
|
|
22
22
|
// Authentication failed
|
|
23
|
-
handleAuthError(hashParams
|
|
24
|
-
} else if (hashParams
|
|
23
|
+
handleAuthError(hashParams.get("error"), hashParams);
|
|
24
|
+
} else if (hashParams.get("code")) {
|
|
25
25
|
// Get the stored state parameter and compare with incoming state
|
|
26
26
|
let expectedState = localStorage.getItem("state");
|
|
27
|
-
if (expectedState !== hashParams
|
|
27
|
+
if (expectedState !== hashParams.get("state")) {
|
|
28
28
|
// State does not match, report error
|
|
29
29
|
handleAuthError("StateDoesNotMatch", hashParams);
|
|
30
30
|
} else {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
// Parse hash parameters into key-value pairs
|
|
39
39
|
function getHashParameters() {
|
|
40
|
-
let hashParams =
|
|
40
|
+
let hashParams = new Map();
|
|
41
41
|
location.hash
|
|
42
42
|
.substr(1)
|
|
43
43
|
.split("&")
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
let s = item.split("="),
|
|
46
46
|
k = s[0],
|
|
47
47
|
v = s[1] && decodeURIComponent(s[1]);
|
|
48
|
-
hashParams
|
|
48
|
+
hashParams.set(k, v);
|
|
49
49
|
});
|
|
50
50
|
return hashParams;
|
|
51
51
|
}
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
// Show error information
|
|
54
54
|
function handleAuthError(errorType, errorMessage) {
|
|
55
55
|
const err = JSON.stringify({
|
|
56
|
-
error: errorType,
|
|
57
|
-
message: JSON.stringify(errorMessage),
|
|
56
|
+
error: encodeURIComponent(errorType),
|
|
57
|
+
message: encodeURIComponent(JSON.stringify(errorMessage)),
|
|
58
58
|
});
|
|
59
59
|
let para = document.createElement("p");
|
|
60
60
|
let node = document.createTextNode(err);
|
package/templates/plugins/resource/hosting/bicep/botFunction/botFunctionConfiguration.template.bicep
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Auto generated content, please customize files under provision folder
|
|
2
|
+
|
|
3
|
+
@secure()
|
|
4
|
+
param provisionParameters object
|
|
5
|
+
param provisionOutputs object
|
|
6
|
+
@secure()
|
|
7
|
+
param currentAppSettings object
|
|
8
|
+
|
|
9
|
+
var functionName = split(provisionOutputs.botFunctionOutput.value.botWebAppResourceId, '/')[8]
|
|
10
|
+
|
|
11
|
+
{{#if (contains "fx-resource-aad-app-for-teams" plugins)}}
|
|
12
|
+
var m365ClientId = provisionParameters['m365ClientId']
|
|
13
|
+
{{#if (contains "fx-resource-key-vault" plugins) }}
|
|
14
|
+
var m365ClientSecret = \{{fx-resource-key-vault.References.m365ClientSecretReference}}
|
|
15
|
+
{{else}}
|
|
16
|
+
var m365ClientSecret = provisionParameters['m365ClientSecret']
|
|
17
|
+
{{/if}}
|
|
18
|
+
var m365TenantId = provisionParameters['m365TenantId']
|
|
19
|
+
var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
|
|
20
|
+
{{#if (contains "fx-resource-frontend-hosting" plugins)}}
|
|
21
|
+
{{#if (contains "fx-resource-bot" plugins) }}
|
|
22
|
+
var m365ApplicationIdUri = 'api://${ \{{fx-resource-frontend-hosting.References.domain}} }/botid-${botAadAppClientId}'
|
|
23
|
+
{{/if}}
|
|
24
|
+
{{else}}
|
|
25
|
+
var m365ApplicationIdUri = 'api://botid-${botAadAppClientId}'
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{/if}}
|
|
28
|
+
|
|
29
|
+
{{#if (contains "fx-resource-bot" plugins) }}
|
|
30
|
+
var botAadAppClientId = provisionParameters['botAadAppClientId']
|
|
31
|
+
{{#if (contains "fx-resource-key-vault" plugins) }}
|
|
32
|
+
var botAadAppClientSecret = \{{fx-resource-key-vault.References.botClientSecretReference}}
|
|
33
|
+
{{else}}
|
|
34
|
+
var botAadAppClientSecret = provisionParameters['botAadAppClientSecret']
|
|
35
|
+
{{/if}}
|
|
36
|
+
{{/if}}
|
|
37
|
+
|
|
38
|
+
resource botFunctionSettings 'Microsoft.Web/sites/config@2021-02-01' = {
|
|
39
|
+
name: '${functionName}/appsettings'
|
|
40
|
+
properties: union({
|
|
41
|
+
{{#if (contains "fx-resource-aad-app-for-teams" plugins)}}
|
|
42
|
+
{{#if (contains "dotnet" configs)}}
|
|
43
|
+
TeamsFx__Authentication__ClientId: m365ClientId
|
|
44
|
+
TeamsFx__Authentication__ClientSecret: m365ClientSecret
|
|
45
|
+
TeamsFx__Authentication__OAuthAuthority: m365OauthAuthorityHost
|
|
46
|
+
{{/if}}
|
|
47
|
+
{{#if (contains "node" configs)}}
|
|
48
|
+
INITIATE_LOGIN_ENDPOINT: uri(provisionOutputs.botFunctionOutput.value.siteEndpoint, 'auth-start.html') // The page is used to let users consent required OAuth permissions during bot SSO process
|
|
49
|
+
M365_AUTHORITY_HOST: m365OauthAuthorityHost // AAD authority host
|
|
50
|
+
M365_CLIENT_ID: m365ClientId // Client id of AAD application
|
|
51
|
+
M365_CLIENT_SECRET: m365ClientSecret // Client secret of AAD application
|
|
52
|
+
M365_TENANT_ID: m365TenantId // Tenant id of AAD application
|
|
53
|
+
M365_APPLICATION_ID_URI: m365ApplicationIdUri // Application ID URI of AAD application
|
|
54
|
+
{{/if}}
|
|
55
|
+
{{/if}}
|
|
56
|
+
{{#if (contains "fx-resource-bot" plugins) }}
|
|
57
|
+
BOT_ID: botAadAppClientId // ID of your bot
|
|
58
|
+
BOT_PASSWORD: botAadAppClientSecret // Secret of your bot
|
|
59
|
+
{{/if}}
|
|
60
|
+
{{#if (contains "fx-resource-function" plugins) }}
|
|
61
|
+
API_ENDPOINT: provisionOutputs.functionOutput.value.functionEndpoint // Azure Function endpoint
|
|
62
|
+
{{/if}}
|
|
63
|
+
{{#if (contains "fx-resource-azure-sql" plugins)}}
|
|
64
|
+
SQL_DATABASE_NAME: \{{fx-resource-azure-sql.References.databaseName}} // SQL database name
|
|
65
|
+
SQL_ENDPOINT: \{{fx-resource-azure-sql.References.sqlEndpoint}} // SQL server endpoint
|
|
66
|
+
{{/if}}
|
|
67
|
+
{{#if (contains "fx-resource-identity" plugins)}}
|
|
68
|
+
IDENTITY_ID: \{{fx-resource-identity.References.identityClientId}} // User assigned identity id, the identity is used to access other Azure resources
|
|
69
|
+
{{/if}}
|
|
70
|
+
}, currentAppSettings)
|
|
71
|
+
}
|