@microsoft/teamsfx-core 1.9.0 → 1.9.1-alpha.300caa689.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 +91 -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/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 +0 -2
- package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/constants.js +0 -2
- 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 +2 -2
- 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 +1 -16
- package/build/plugins/resource/bot/errors.d.ts.map +1 -1
- package/build/plugins/resource/bot/errors.js +8 -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 -0
- package/build/plugins/resource/bot/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/index.js +19 -12
- 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 +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 +19 -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 +7 -0
- package/build/plugins/resource/bot/v2/mapping.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/mapping.js +79 -0
- package/build/plugins/resource/bot/v2/mapping.js.map +1 -0
- package/build/plugins/resource/bot/v2/plugin.d.ts +47 -0
- package/build/plugins/resource/bot/v2/plugin.d.ts.map +1 -0
- package/build/plugins/resource/bot/v2/plugin.js +308 -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.json +27 -18
- 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 +99 -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
|
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
|
+
}
|
package/templates/plugins/resource/hosting/bicep/botFunction/botFunctionProvision.template.bicep
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
param userAssignedIdentityId string
|
|
4
|
+
|
|
5
|
+
var resourceBaseName = provisionParameters.resourceBaseName
|
|
6
|
+
var serverfarmsName = contains(provisionParameters, 'botServerfarmsName') ? provisionParameters['botServerfarmsName'] : '${resourceBaseName}bot' // Try to read name for App Service Plan from parameters
|
|
7
|
+
var functionSKU = contains(provisionParameters, 'botFunctionAppSKU') ? provisionParameters['botFunctionAppSKU'] : 'B1' // Try to read SKU for Azure Web App from parameters
|
|
8
|
+
var functionAppName = contains(provisionParameters, 'botSitesName') ? provisionParameters['botSitesName'] : '${resourceBaseName}bot' // Try to read name for Azure Web App from parameters
|
|
9
|
+
var storageName = contains(provisionParameters, 'botStorageName') ? provisionParameters['botStorageName'] : '${resourceBaseName}bot' // Try to read name for Azure Storage from parameters
|
|
10
|
+
var storageSku = contains(provisionParameters, 'botStorageSku') ? provisionParameters['botStorageSku'] : 'Standard_LRS' // Try to read SKU for Azure Storage from parameters
|
|
11
|
+
|
|
12
|
+
// Compute resources for your Function App
|
|
13
|
+
resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = {
|
|
14
|
+
kind: 'functionapp'
|
|
15
|
+
location: resourceGroup().location
|
|
16
|
+
name: serverfarmsName
|
|
17
|
+
sku: {
|
|
18
|
+
name: functionSKU
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Azure Storage is required when creating Azure Functions instance
|
|
23
|
+
resource storage 'Microsoft.Storage/storageAccounts@2021-06-01' = {
|
|
24
|
+
name: storageName
|
|
25
|
+
kind: 'StorageV2'
|
|
26
|
+
location: resourceGroup().location
|
|
27
|
+
sku: {
|
|
28
|
+
name: storageSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add functionStorageSku property to provisionParameters to override the default value "Standard_LRS".
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Function App that hosts your bot
|
|
33
|
+
resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
34
|
+
kind: 'functionapp'
|
|
35
|
+
location: resourceGroup().location
|
|
36
|
+
name: functionAppName
|
|
37
|
+
properties: {
|
|
38
|
+
serverFarmId: serverfarm.id
|
|
39
|
+
keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
|
|
40
|
+
httpsOnly: true
|
|
41
|
+
siteConfig: {
|
|
42
|
+
alwaysOn: true
|
|
43
|
+
appSettings: [
|
|
44
|
+
{
|
|
45
|
+
name: 'AzureWebJobsDashboard'
|
|
46
|
+
value: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${listKeys(storage.id, storage.apiVersion).keys[0].value};EndpointSuffix=${environment().suffixes.storage}' // Azure Functions internal setting
|
|
47
|
+
}
|
|
48
|
+
{
|
|
49
|
+
name: 'AzureWebJobsStorage'
|
|
50
|
+
value: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${listKeys(storage.id, storage.apiVersion).keys[0].value};EndpointSuffix=${environment().suffixes.storage}' // Azure Functions internal setting
|
|
51
|
+
}
|
|
52
|
+
{
|
|
53
|
+
name: 'FUNCTIONS_EXTENSION_VERSION'
|
|
54
|
+
value: '~4' // Use Azure Functions runtime v4
|
|
55
|
+
}
|
|
56
|
+
{
|
|
57
|
+
name: 'FUNCTIONS_WORKER_RUNTIME'
|
|
58
|
+
value: 'node' // Set runtime to NodeJS
|
|
59
|
+
}
|
|
60
|
+
{
|
|
61
|
+
name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'
|
|
62
|
+
value: 'DefaultEndpointsProtocol=https;AccountName=${storage.name};AccountKey=${listKeys(storage.id, storage.apiVersion).keys[0].value};EndpointSuffix=${environment().suffixes.storage}' // Azure Functions internal setting
|
|
63
|
+
}
|
|
64
|
+
{
|
|
65
|
+
name: 'WEBSITE_RUN_FROM_PACKAGE'
|
|
66
|
+
value: '1' // Run Azure Functions from a package file
|
|
67
|
+
}
|
|
68
|
+
{
|
|
69
|
+
name: 'WEBSITE_NODE_DEFAULT_VERSION'
|
|
70
|
+
value: '~16' // Set NodeJS version to 16.x
|
|
71
|
+
}
|
|
72
|
+
{{#if (contains "running-on-azure" configs)}}
|
|
73
|
+
{
|
|
74
|
+
name: 'RUNNING_ON_AZURE'
|
|
75
|
+
value: '1'
|
|
76
|
+
}
|
|
77
|
+
{
|
|
78
|
+
name: 'SCM_ZIPDEPLOY_DONOT_PRESERVE_FILETIME'
|
|
79
|
+
value: '1' // Zipdeploy files will always be updated. Detail: https://aka.ms/teamsfx-zipdeploy-donot-preserve-filetime
|
|
80
|
+
}
|
|
81
|
+
{{/if}}
|
|
82
|
+
]
|
|
83
|
+
ftpsState: 'FtpsOnly'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
identity: {
|
|
87
|
+
type: 'UserAssigned'
|
|
88
|
+
userAssignedIdentities: {
|
|
89
|
+
'${userAssignedIdentityId}': {} // The identity is used to access other Azure resources
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
output functionSKU string = functionSKU
|
|
95
|
+
output functionName string = functionAppName
|
|
96
|
+
output domain string = functionApp.properties.defaultHostName
|
|
97
|
+
output appServicePlanName string = serverfarmsName
|
|
98
|
+
output functionResourceId string = functionApp.id
|
|
99
|
+
output functionEndpoint string = 'https://${functionApp.properties.defaultHostName}'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Get existing app settings for merge
|
|
2
|
+
var botFunctionCurrentAppSettings = list('${provisionOutputs.botFunctionOutput.value.botWebAppResourceId}/config/appsettings', '2021-02-01').properties
|
|
3
|
+
|
|
4
|
+
// Merge TeamsFx configurations to Function resources
|
|
5
|
+
module teamsFxBotFunctionConfig '\{{PluginIdPlaceholder.Configuration.botFunction.path}}' = {
|
|
6
|
+
name: 'addTeamsFxBotFunctionConfiguration'
|
|
7
|
+
params: {
|
|
8
|
+
provisionParameters: provisionParameters
|
|
9
|
+
provisionOutputs: provisionOutputs
|
|
10
|
+
currentAppSettings: botFunctionCurrentAppSettings
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Resources for bot
|
|
2
|
+
module botFunctionProvision '\{{PluginIdPlaceholder.Provision.botFunction.path}}' = {
|
|
3
|
+
name: 'botFunctionProvision'
|
|
4
|
+
params: {
|
|
5
|
+
provisionParameters: provisionParameters
|
|
6
|
+
{{#if (contains "fx-resource-identity" plugins)}}
|
|
7
|
+
userAssignedIdentityId: \{{fx-resource-identity.References.identityResourceId}}
|
|
8
|
+
{{/if}}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
output botFunctionOutput object = {
|
|
13
|
+
teamsFxPluginId: 'PluginIdPlaceholder'
|
|
14
|
+
skuName: botFunctionProvision.outputs.functionSKU
|
|
15
|
+
siteName: botFunctionProvision.outputs.functionName
|
|
16
|
+
validDomain: botFunctionProvision.outputs.domain
|
|
17
|
+
appServicePlanName: botFunctionProvision.outputs.appServicePlanName
|
|
18
|
+
botWebAppResourceId: botFunctionProvision.outputs.functionResourceId
|
|
19
|
+
siteEndpoint: botFunctionProvision.outputs.functionEndpoint
|
|
20
|
+
}
|
package/templates/plugins/resource/hosting/bicep/botservice/botserviceProvision.template.bicep
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
param botEndpoint string
|
|
4
|
+
|
|
5
|
+
var resourceBaseName = provisionParameters.resourceBaseName
|
|
6
|
+
var botAadAppClientId = provisionParameters['botAadAppClientId'] // Read AAD app client id for Azure Bot Service from parameters
|
|
7
|
+
var botServiceName = contains(provisionParameters, 'botServiceName') ? provisionParameters['botServiceName'] : '${resourceBaseName}' // Try to read name for Azure Bot Service from parameters
|
|
8
|
+
var botServiceSku = contains(provisionParameters, 'botServiceSku') ? provisionParameters['botServiceSku'] : 'F0' // Try to read SKU for Azure Bot Service from parameters
|
|
9
|
+
var botDisplayName = contains(provisionParameters, 'botDisplayName') ? provisionParameters['botDisplayName'] : '${resourceBaseName}' // Try to read display name for Azure Bot Service from parameters
|
|
10
|
+
|
|
11
|
+
// Register your web service as a bot with the Bot Framework
|
|
12
|
+
resource botService 'Microsoft.BotService/botServices@2021-03-01' = {
|
|
13
|
+
kind: 'azurebot'
|
|
14
|
+
location: 'global'
|
|
15
|
+
name: botServiceName
|
|
16
|
+
properties: {
|
|
17
|
+
displayName: botDisplayName
|
|
18
|
+
endpoint: uri(botEndpoint, '/api/messages')
|
|
19
|
+
msaAppId: botAadAppClientId
|
|
20
|
+
}
|
|
21
|
+
sku: {
|
|
22
|
+
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".
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Connect the bot service to Microsoft Teams
|
|
27
|
+
resource botServiceMsTeamsChannel 'Microsoft.BotService/botServices/channels@2021-03-01' = {
|
|
28
|
+
parent: botService
|
|
29
|
+
location: 'global'
|
|
30
|
+
name: 'MsTeamsChannel'
|
|
31
|
+
properties: {
|
|
32
|
+
channelName: 'MsTeamsChannel'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Get existing app settings for merge
|
|
2
|
+
var botCurrentAppSettings = list('${provisionOutputs.webAppOutput.value.botWebAppResourceId}/config/appsettings', '2021-02-01').properties
|
|
3
|
+
|
|
4
|
+
// Merge TeamsFx configurations to Bot resources
|
|
5
|
+
module teamsFxBotConfig '\{{PluginIdPlaceholder.Configuration.webapp.path}}' = {
|
|
6
|
+
name: 'addTeamsFxBotConfiguration'
|
|
7
|
+
params: {
|
|
8
|
+
provisionParameters: provisionParameters
|
|
9
|
+
provisionOutputs: provisionOutputs
|
|
10
|
+
currentAppSettings: botCurrentAppSettings
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Resources for bot
|
|
2
|
+
module webAppProvision '\{{PluginIdPlaceholder.Provision.webapp.path}}' = {
|
|
3
|
+
name: 'webAppProvision'
|
|
4
|
+
params: {
|
|
5
|
+
provisionParameters: provisionParameters
|
|
6
|
+
{{#if (contains "fx-resource-identity" plugins)}}
|
|
7
|
+
userAssignedIdentityId: \{{fx-resource-identity.References.identityResourceId}}
|
|
8
|
+
{{/if}}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
output webAppOutput object = {
|
|
13
|
+
teamsFxPluginId: 'PluginIdPlaceholder'
|
|
14
|
+
skuName: webAppProvision.outputs.webAppSKU
|
|
15
|
+
siteName: webAppProvision.outputs.webAppName
|
|
16
|
+
validDomain: webAppProvision.outputs.webAppDomain
|
|
17
|
+
appServicePlanName: webAppProvision.outputs.appServicePlanName
|
|
18
|
+
botWebAppResourceId: webAppProvision.outputs.webAppResourceId
|
|
19
|
+
siteEndpoint: webAppProvision.outputs.webAppEndpoint
|
|
20
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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 botWebAppName = split(provisionOutputs.webAppOutput.value.botWebAppResourceId, '/')[8]
|
|
10
|
+
|
|
11
|
+
{{#if (contains "fx-resource-aad-app-for-teams" plugins)}}
|
|
12
|
+
var m365ClientId = provisionParameters['m365ClientId']
|
|
13
|
+
|
|
14
|
+
{{#if (contains "fx-resource-key-vault" plugins) }}
|
|
15
|
+
var m365ClientSecret = \{{fx-resource-key-vault.References.m365ClientSecretReference}}
|
|
16
|
+
{{else}}
|
|
17
|
+
var m365ClientSecret = provisionParameters['m365ClientSecret']
|
|
18
|
+
{{/if}}
|
|
19
|
+
|
|
20
|
+
var m365TenantId = provisionParameters['m365TenantId']
|
|
21
|
+
var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
|
|
22
|
+
|
|
23
|
+
{{#if (contains "fx-resource-frontend-hosting" plugins)}}
|
|
24
|
+
{{#if (contains "fx-resource-bot" plugins) }}
|
|
25
|
+
var m365ApplicationIdUri = 'api://${ \{{fx-resource-frontend-hosting.References.domain}} }/botid-${botId}'
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{else}}
|
|
28
|
+
var m365ApplicationIdUri = 'api://botid-${botId}'
|
|
29
|
+
{{/if}}
|
|
30
|
+
{{/if}}
|
|
31
|
+
|
|
32
|
+
var botAadAppClientId = provisionParameters['botAadAppClientId']
|
|
33
|
+
|
|
34
|
+
{{#if (contains "fx-resource-key-vault" plugins) }}
|
|
35
|
+
var botAadAppClientSecret = \{{fx-resource-key-vault.References.botClientSecretReference}}
|
|
36
|
+
{{else}}
|
|
37
|
+
var botAadAppClientSecret = provisionParameters['botAadAppClientSecret']
|
|
38
|
+
{{/if}}
|
|
39
|
+
|
|
40
|
+
var botId = provisionParameters['botAadAppClientId']
|
|
41
|
+
|
|
42
|
+
resource botWebAppSettings 'Microsoft.Web/sites/config@2021-02-01' = {
|
|
43
|
+
name: '${botWebAppName}/appsettings'
|
|
44
|
+
properties: union({
|
|
45
|
+
{{#if (contains "fx-resource-aad-app-for-teams" plugins)}}
|
|
46
|
+
INITIATE_LOGIN_ENDPOINT: uri(provisionOutputs.webAppOutput.value.siteEndpoint, 'auth-start.html') // The page is used to let users consent required OAuth permissions during bot SSO process
|
|
47
|
+
M365_AUTHORITY_HOST: m365OauthAuthorityHost // AAD authority host
|
|
48
|
+
M365_CLIENT_ID: m365ClientId // Client id of AAD application
|
|
49
|
+
M365_CLIENT_SECRET: m365ClientSecret // Client secret of AAD application
|
|
50
|
+
M365_TENANT_ID: m365TenantId // Tenant id of AAD application
|
|
51
|
+
M365_APPLICATION_ID_URI: m365ApplicationIdUri // Application ID URI of AAD application
|
|
52
|
+
{{/if}}
|
|
53
|
+
BOT_ID: botAadAppClientId // ID of your bot
|
|
54
|
+
BOT_PASSWORD: botAadAppClientSecret // Secret of your bot
|
|
55
|
+
{{#if (contains "fx-resource-function" plugins) }}
|
|
56
|
+
API_ENDPOINT: provisionOutputs.functionOutput.value.functionEndpoint // Azure Function endpoint
|
|
57
|
+
{{/if}}
|
|
58
|
+
{{#if (contains "fx-resource-azure-sql" plugins)}}
|
|
59
|
+
SQL_DATABASE_NAME: \{{fx-resource-azure-sql.References.databaseName}} // SQL database name
|
|
60
|
+
SQL_ENDPOINT: \{{fx-resource-azure-sql.References.sqlEndpoint}} // SQL server endpoint
|
|
61
|
+
{{/if}}
|
|
62
|
+
{{#if (contains "fx-resource-identity" plugins)}}
|
|
63
|
+
IDENTITY_ID: \{{fx-resource-identity.References.identityClientId}} // User assigned identity id, the identity is used to access other Azure resources
|
|
64
|
+
{{/if}}
|
|
65
|
+
}, currentAppSettings)
|
|
66
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
param userAssignedIdentityId string
|
|
4
|
+
|
|
5
|
+
var resourceBaseName = provisionParameters.resourceBaseName
|
|
6
|
+
var serverfarmsName = contains(provisionParameters, 'botServerfarmsName') ? provisionParameters['botServerfarmsName'] : '${resourceBaseName}bot' // Try to read name for App Service Plan from parameters
|
|
7
|
+
var webAppSKU = contains(provisionParameters, 'botWebAppSKU') ? provisionParameters['botWebAppSKU'] : 'B1' // Try to read SKU for Azure Web App from parameters
|
|
8
|
+
var webAppName = contains(provisionParameters, 'botSitesName') ? provisionParameters['botSitesName'] : '${resourceBaseName}bot' // Try to read name for Azure Web App from parameters
|
|
9
|
+
|
|
10
|
+
// Compute resources for your Web App
|
|
11
|
+
resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = {
|
|
12
|
+
kind: 'app'
|
|
13
|
+
location: resourceGroup().location
|
|
14
|
+
name: serverfarmsName
|
|
15
|
+
sku: {
|
|
16
|
+
name: webAppSKU
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Web App that hosts your bot
|
|
21
|
+
resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
22
|
+
kind: 'app'
|
|
23
|
+
location: resourceGroup().location
|
|
24
|
+
name: webAppName
|
|
25
|
+
properties: {
|
|
26
|
+
serverFarmId: serverfarm.id
|
|
27
|
+
keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
|
|
28
|
+
httpsOnly: true
|
|
29
|
+
siteConfig: {
|
|
30
|
+
alwaysOn: true
|
|
31
|
+
appSettings: [
|
|
32
|
+
{
|
|
33
|
+
name: 'SCM_DO_BUILD_DURING_DEPLOYMENT'
|
|
34
|
+
value: 'true' // Execute build steps on your site during deployment
|
|
35
|
+
}
|
|
36
|
+
{{#if (contains "node" configs)}}
|
|
37
|
+
{
|
|
38
|
+
name: 'WEBSITE_NODE_DEFAULT_VERSION'
|
|
39
|
+
value: '~14' // Set NodeJS version to 14.x for your site
|
|
40
|
+
}
|
|
41
|
+
{{/if}}
|
|
42
|
+
{
|
|
43
|
+
name: 'RUNNING_ON_AZURE'
|
|
44
|
+
value: '1'
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
ftpsState: 'FtpsOnly'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
identity: {
|
|
51
|
+
type: 'UserAssigned'
|
|
52
|
+
userAssignedIdentities: {
|
|
53
|
+
'${userAssignedIdentityId}': {} // The identity is used to access other Azure resources
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
output webAppSKU string = webAppSKU
|
|
59
|
+
output webAppName string = webAppName
|
|
60
|
+
output webAppDomain string = webApp.properties.defaultHostName
|
|
61
|
+
output appServicePlanName string = serverfarmsName
|
|
62
|
+
output webAppResourceId string = webApp.id
|
|
63
|
+
output webAppEndpoint string = 'https://${webApp.properties.defaultHostName}'
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { AzureBotService } from "@azure/arm-botservice";
|
|
3
|
-
import * as appService from "@azure/arm-appservice";
|
|
4
|
-
export declare class AzureOperations {
|
|
5
|
-
private static readonly axiosInstance;
|
|
6
|
-
static UpdateBotChannelRegistration(botClient: AzureBotService, resourceGroup: string, botChannelRegistrationName: string, msaAppId: string, endpoint: string, displayName?: string): Promise<void>;
|
|
7
|
-
static LinkTeamsChannel(botClient: AzureBotService, resourceGroup: string, botChannelRegistrationName: string): Promise<void>;
|
|
8
|
-
static CreateOrUpdateAzureWebApp(webSiteMgmtClient: appService.WebSiteManagementClient, resourceGroup: string, siteName: string, siteEnvelope: appService.WebSiteManagementModels.Site, update?: boolean): Promise<any>;
|
|
9
|
-
static ListPublishingCredentials(webSiteMgmtClient: appService.WebSiteManagementClient, resourceGroup: string, siteName: string): Promise<any>;
|
|
10
|
-
static ZipDeployPackage(zipDeployEndpoint: string, zipBuffer: Buffer, config: any): Promise<string>;
|
|
11
|
-
static CheckDeployStatus(location: string, config: any): Promise<void>;
|
|
12
|
-
static RestartWebApp(webSiteMgmtClient: appService.WebSiteManagementClient, resourceGroup: string, siteName: string): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=azureOps.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"azureOps.d.ts","sourceRoot":"","sources":["../../../../src/plugins/resource/bot/azureOps.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AAiBpD,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAkB;WAEnC,4BAA4B,CAC9C,SAAS,EAAE,eAAe,EAC1B,aAAa,EAAE,MAAM,EACrB,0BAA0B,EAAE,MAAM,EAClC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC;WAmBI,gBAAgB,CAClC,SAAS,EAAE,eAAe,EAC1B,aAAa,EAAE,MAAM,EACrB,0BAA0B,EAAE,MAAM,GACjC,OAAO,CAAC,IAAI,CAAC;WA2BI,yBAAyB,CAC3C,iBAAiB,EAAE,UAAU,CAAC,uBAAuB,EACrD,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,UAAU,CAAC,uBAAuB,CAAC,IAAI,EACrD,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,GAAG,CAAC;WA2BK,yBAAyB,CAC3C,iBAAiB,EAAE,UAAU,CAAC,uBAAuB,EACrD,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,GAAG,CAAC;WAkBK,gBAAgB,CAClC,iBAAiB,EAAE,MAAM,EACzB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,GAAG,GACV,OAAO,CAAC,MAAM,CAAC;WAeE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;WAuB/D,aAAa,CAC/B,iBAAiB,EAAE,UAAU,CAAC,uBAAuB,EACrD,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;CAYjB"}
|