@microsoft/teamsfx-core 1.12.1 → 1.12.2-alpha.c4859dbd2.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/templates-config.json +2 -2
- package/build/component/code/apiCode.d.ts +10 -0
- package/build/component/code/apiCode.d.ts.map +1 -1
- package/build/component/code/apiCode.js +91 -0
- package/build/component/code/apiCode.js.map +1 -1
- package/build/component/code/spfxTabCode.d.ts +11 -0
- package/build/component/code/spfxTabCode.d.ts.map +1 -0
- package/build/component/code/spfxTabCode.js +216 -0
- package/build/component/code/spfxTabCode.js.map +1 -0
- package/build/component/code/tabCode.d.ts.map +1 -1
- package/build/component/code/tabCode.js +10 -1
- package/build/component/code/tabCode.js.map +1 -1
- package/build/component/connection/apimConfig.d.ts +11 -0
- package/build/component/connection/apimConfig.d.ts.map +1 -0
- package/build/component/connection/apimConfig.js +38 -0
- package/build/component/connection/apimConfig.js.map +1 -0
- package/build/component/connection/azureFunctionConfig.d.ts.map +1 -1
- package/build/component/connection/azureFunctionConfig.js +2 -1
- package/build/component/connection/azureFunctionConfig.js.map +1 -1
- package/build/component/connection/azureResourceConfig.js +3 -3
- package/build/component/connection/azureResourceConfig.js.map +1 -1
- package/build/component/connection/azureWebAppConfig.d.ts.map +1 -1
- package/build/component/connection/azureWebAppConfig.js +2 -1
- package/build/component/connection/azureWebAppConfig.js.map +1 -1
- package/build/component/constants.d.ts +28 -0
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +34 -6
- package/build/component/constants.js.map +1 -1
- package/build/component/core.d.ts +8 -1
- package/build/component/core.d.ts.map +1 -1
- package/build/component/core.js +8 -5
- package/build/component/core.js.map +1 -1
- package/build/component/error.d.ts +8 -0
- package/build/component/error.d.ts.map +1 -0
- package/build/component/error.js +26 -0
- package/build/component/error.js.map +1 -0
- package/build/component/feature/api.d.ts +8 -0
- package/build/component/feature/api.d.ts.map +1 -0
- package/build/component/feature/api.js +140 -0
- package/build/component/feature/api.js.map +1 -0
- package/build/component/feature/apim.d.ts +8 -0
- package/build/component/feature/apim.d.ts.map +1 -0
- package/build/component/feature/apim.js +127 -0
- package/build/component/feature/apim.js.map +1 -0
- package/build/component/feature/bot.d.ts.map +1 -1
- package/build/component/feature/bot.js +27 -13
- package/build/component/feature/bot.js.map +1 -1
- package/build/component/feature/spfx.d.ts +7 -0
- package/build/component/feature/spfx.d.ts.map +1 -0
- package/build/component/feature/spfx.js +80 -0
- package/build/component/feature/spfx.js.map +1 -0
- package/build/component/feature/sql.d.ts.map +1 -1
- package/build/component/feature/sql.js +0 -1
- package/build/component/feature/sql.js.map +1 -1
- package/build/component/feature/sso.d.ts +17 -0
- package/build/component/feature/sso.d.ts.map +1 -0
- package/build/component/feature/sso.js +178 -0
- package/build/component/feature/sso.js.map +1 -0
- package/build/component/feature/tab.d.ts +10 -3
- package/build/component/feature/tab.d.ts.map +1 -1
- package/build/component/feature/tab.js +174 -98
- package/build/component/feature/tab.js.map +1 -1
- package/build/component/migrate.d.ts +5 -1
- package/build/component/migrate.d.ts.map +1 -1
- package/build/component/migrate.js +178 -2
- package/build/component/migrate.js.map +1 -1
- package/build/component/resource/aadApp/aadApp.d.ts +56 -0
- package/build/component/resource/aadApp/aadApp.d.ts.map +1 -0
- package/build/component/resource/aadApp/aadApp.js +102 -0
- package/build/component/resource/aadApp/aadApp.js.map +1 -0
- package/build/component/resource/aadApp/actions/configure.d.ts +3 -0
- package/build/component/resource/aadApp/actions/configure.d.ts.map +1 -0
- package/build/component/resource/aadApp/actions/configure.js +43 -0
- package/build/component/resource/aadApp/actions/configure.js.map +1 -0
- package/build/component/resource/aadApp/actions/generateAuthFiles.d.ts +3 -0
- package/build/component/resource/aadApp/actions/generateAuthFiles.d.ts.map +1 -0
- package/build/component/resource/aadApp/actions/generateAuthFiles.js +37 -0
- package/build/component/resource/aadApp/actions/generateAuthFiles.js.map +1 -0
- package/build/component/resource/aadApp/actions/generateBicep.d.ts +3 -0
- package/build/component/resource/aadApp/actions/generateBicep.d.ts.map +1 -0
- package/build/component/resource/aadApp/actions/generateBicep.js +33 -0
- package/build/component/resource/aadApp/actions/generateBicep.js.map +1 -0
- package/build/component/resource/aadApp/actions/generateManifest.d.ts +3 -0
- package/build/component/resource/aadApp/actions/generateManifest.d.ts.map +1 -0
- package/build/component/resource/aadApp/actions/generateManifest.js +41 -0
- package/build/component/resource/aadApp/actions/generateManifest.js.map +1 -0
- package/build/component/resource/aadApp/actions/provision.d.ts +4 -0
- package/build/component/resource/aadApp/actions/provision.d.ts.map +1 -0
- package/build/component/resource/aadApp/actions/provision.js +92 -0
- package/build/component/resource/aadApp/actions/provision.js.map +1 -0
- package/build/component/resource/aadApp/actions/setApplication.d.ts +3 -0
- package/build/component/resource/aadApp/actions/setApplication.d.ts.map +1 -0
- package/build/component/resource/aadApp/actions/setApplication.js +43 -0
- package/build/component/resource/aadApp/actions/setApplication.js.map +1 -0
- package/build/component/resource/apim.d.ts +36 -0
- package/build/component/resource/apim.d.ts.map +1 -0
- package/build/component/resource/apim.js +88 -0
- package/build/component/resource/apim.js.map +1 -0
- package/build/component/resource/appManifest/appStudio.d.ts +0 -7
- package/build/component/resource/appManifest/appStudio.d.ts.map +1 -1
- package/build/component/resource/appManifest/appStudio.js +14 -112
- package/build/component/resource/appManifest/appStudio.js.map +1 -1
- package/build/component/resource/appManifest/utils.d.ts +1 -0
- package/build/component/resource/appManifest/utils.d.ts.map +1 -1
- package/build/component/resource/appManifest/utils.js +18 -4
- package/build/component/resource/appManifest/utils.js.map +1 -1
- package/build/component/resource/azureAppService/azureAppService.d.ts.map +1 -1
- package/build/component/resource/azureAppService/azureAppService.js.map +1 -1
- package/build/component/resource/azureAppService/azureFunction.d.ts +4 -0
- package/build/component/resource/azureAppService/azureFunction.d.ts.map +1 -1
- package/build/component/resource/azureAppService/azureFunction.js +6 -2
- package/build/component/resource/azureAppService/azureFunction.js.map +1 -1
- package/build/component/resource/azureAppService/azureWebApp.d.ts +5 -1
- package/build/component/resource/azureAppService/azureWebApp.d.ts.map +1 -1
- package/build/component/resource/azureAppService/azureWebApp.js +7 -3
- package/build/component/resource/azureAppService/azureWebApp.js.map +1 -1
- package/build/component/resource/azureResource.js +4 -5
- package/build/component/resource/azureResource.js.map +1 -1
- package/build/component/resource/azureStorage.d.ts +1 -1
- package/build/component/resource/azureStorage.js +5 -5
- package/build/component/resource/azureStorage.js.map +1 -1
- package/build/component/resource/botService.d.ts.map +1 -1
- package/build/component/resource/botService.js +2 -10
- package/build/component/resource/botService.js.map +1 -1
- package/build/component/resource/spfx.d.ts +3 -1
- package/build/component/resource/spfx.d.ts.map +1 -1
- package/build/component/resource/spfx.js +15 -4
- package/build/component/resource/spfx.js.map +1 -1
- package/build/component/utils.d.ts +3 -1
- package/build/component/utils.d.ts.map +1 -1
- package/build/component/utils.js +17 -1
- package/build/component/utils.js.map +1 -1
- package/build/component/workflow.d.ts +2 -5
- package/build/component/workflow.d.ts.map +1 -1
- package/build/component/workflow.js +71 -58
- package/build/component/workflow.js.map +1 -1
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +37 -4
- package/build/core/FxCore.js.map +1 -1
- package/build/core/environment.js +2 -3
- package/build/core/environment.js.map +1 -1
- package/build/core/generateAadManifestTemplate.d.ts.map +1 -1
- package/build/core/generateAadManifestTemplate.js +68 -24
- package/build/core/generateAadManifestTemplate.js.map +1 -1
- package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
- package/build/core/middleware/projectSettingsLoader.js +4 -1
- package/build/core/middleware/projectSettingsLoader.js.map +1 -1
- package/build/core/middleware/questionModelV3.js +5 -0
- package/build/core/middleware/questionModelV3.js.map +1 -1
- package/build/core/question.d.ts +2 -0
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +20 -7
- package/build/core/question.js.map +1 -1
- package/build/plugins/resource/apiconnector/depsHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/depsHandler.js +4 -3
- package/build/plugins/resource/apiconnector/depsHandler.js.map +1 -1
- package/build/plugins/resource/apim/config.d.ts.map +1 -1
- package/build/plugins/resource/apim/config.js +7 -5
- package/build/plugins/resource/apim/config.js.map +1 -1
- package/build/plugins/resource/apim/constants.d.ts +8 -2
- package/build/plugins/resource/apim/constants.d.ts.map +1 -1
- package/build/plugins/resource/apim/constants.js +35 -1
- package/build/plugins/resource/apim/constants.js.map +1 -1
- package/build/plugins/resource/apim/error.d.ts +2 -2
- package/build/plugins/resource/apim/error.d.ts.map +1 -1
- package/build/plugins/resource/apim/error.js.map +1 -1
- package/build/plugins/resource/apim/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/apim/v3/index.js +6 -7
- package/build/plugins/resource/apim/v3/index.js.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.d.ts +3 -13
- package/build/plugins/resource/appstudio/appStudio.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.js +8 -71
- package/build/plugins/resource/appstudio/appStudio.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 +1 -7
- package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/index.js +0 -20
- package/build/plugins/resource/appstudio/index.js.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts +0 -3
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js +22 -176
- package/build/plugins/resource/appstudio/plugin.js.map +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.js +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.js.map +1 -1
- package/build/plugins/resource/bot/appStudio/appStudio.d.ts +2 -5
- package/build/plugins/resource/bot/appStudio/appStudio.d.ts.map +1 -1
- package/build/plugins/resource/bot/appStudio/appStudio.js +36 -32
- package/build/plugins/resource/bot/appStudio/appStudio.js.map +1 -1
- package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/plugin.js +2 -13
- package/build/plugins/resource/bot/plugin.js.map +1 -1
- package/build/plugins/resource/bot/utils/telemetry-helper.d.ts +1 -1
- package/build/plugins/resource/bot/utils/telemetry-helper.d.ts.map +1 -1
- package/build/plugins/resource/bot/utils/telemetry-helper.js +13 -8
- package/build/plugins/resource/bot/utils/telemetry-helper.js.map +1 -1
- package/build/plugins/resource/bot/v2/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/v2/plugin.js +2 -3
- package/build/plugins/resource/bot/v2/plugin.js.map +1 -1
- package/build/plugins/resource/bot/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/v3/index.js +3 -11
- package/build/plugins/resource/bot/v3/index.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.d.ts +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/constants.js +2 -2
- package/build/plugins/resource/frontend/dotnet/constants.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.js +1 -2
- package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
- package/build/plugins/resource/spfx/depsChecker/generatorChecker.d.ts +2 -2
- package/build/plugins/resource/spfx/depsChecker/generatorChecker.d.ts.map +1 -1
- package/build/plugins/resource/spfx/depsChecker/generatorChecker.js.map +1 -1
- package/build/plugins/resource/spfx/depsChecker/yoChecker.d.ts +2 -2
- package/build/plugins/resource/spfx/depsChecker/yoChecker.d.ts.map +1 -1
- package/build/plugins/resource/spfx/depsChecker/yoChecker.js.map +1 -1
- package/build/plugins/resource/spfx/plugin.d.ts +1 -1
- package/build/plugins/resource/spfx/plugin.d.ts.map +1 -1
- package/build/plugins/resource/spfx/plugin.js +10 -139
- package/build/plugins/resource/spfx/plugin.js.map +1 -1
- package/build/plugins/resource/spfx/utils/telemetry-helper.d.ts +3 -3
- package/build/plugins/resource/spfx/utils/telemetry-helper.d.ts.map +1 -1
- package/build/plugins/resource/spfx/utils/telemetry-helper.js.map +1 -1
- package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/arm.js +6 -1
- package/build/plugins/solution/fx-solution/arm.js.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.js +3 -3
- package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/solution.js +1 -1
- package/build/plugins/solution/fx-solution/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.d.ts +1 -1
- package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.js +3 -3
- package/build/plugins/solution/fx-solution/utils/ResourceGroupHelper.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.js +33 -19
- package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
- package/package.json +3 -3
- package/resource/package.nls.json +2 -1
- package/templates/bicep/aadApp.parameters.json +6 -0
- package/templates/bicep/apim.config.module.bicep +65 -0
- package/templates/bicep/apim.config.orchestration.bicep +13 -0
- package/templates/bicep/apim.parameters.json +6 -0
- package/templates/bicep/apim.provision.module.bicep +38 -0
- package/templates/bicep/apim.provision.orchestration.bicep +13 -0
- package/templates/bicep/azureFunction.config.module.bicep +6 -4
- package/templates/bicep/azureFunction.config.orchestration.bicep +4 -2
- package/templates/bicep/azureFunction.provision.module.bicep +2 -2
- package/templates/bicep/azureFunction.provision.orchestration.bicep +2 -2
- package/templates/bicep/azureSql.provisionServer.module.bicep +1 -1
- package/templates/bicep/azureSql.provisionServer.orchestration.bicep +1 -1
- package/templates/bicep/azureStorage.provision.module.bicep +1 -1
- package/templates/bicep/azureStorage.provision.orchestration.bicep +1 -1
- package/templates/bicep/azureWebApp.config.module.bicep +5 -5
- package/templates/bicep/azureWebApp.provision.module.bicep +4 -4
- package/templates/bicep/azureWebApp.provision.orchestration.bicep +4 -4
- package/templates/components/aadApp/manifest/aadApp.template.json +96 -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-function-base.zip +0 -0
- package/templates/fallback/bot.csharp.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.csharp.notification-trigger-timer.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/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/build/component/projectSettingsManager.d.ts +0 -10
- package/build/component/projectSettingsManager.d.ts.map +0 -1
- package/build/component/projectSettingsManager.js +0 -76
- package/build/component/projectSettingsManager.js.map +0 -1
- package/build/component/resource/aad.d.ts +0 -11
- package/build/component/resource/aad.d.ts.map +0 -1
- package/build/component/resource/aad.js +0 -82
- package/build/component/resource/aad.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/teamsfx-core",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2-alpha.c4859dbd2.0",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@azure/storage-blob": "^12.7.0",
|
|
69
69
|
"@dbpiper/timer": "1.0.0-beta.2",
|
|
70
70
|
"@feathersjs/hooks": "^0.6.5",
|
|
71
|
-
"@microsoft/teamsfx-api": "
|
|
71
|
+
"@microsoft/teamsfx-api": "0.20.3-alpha.c4859dbd2.0",
|
|
72
72
|
"@npmcli/arborist": "^4.2.0",
|
|
73
73
|
"@types/jwt-decode": "3.1.0",
|
|
74
74
|
"@types/proper-lockfile": "^4.1.1",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"resource/**/*",
|
|
190
190
|
"templates/**/*"
|
|
191
191
|
],
|
|
192
|
-
"gitHead": "
|
|
192
|
+
"gitHead": "671f3d6840c4ba589813a6781aaf041c00fc02fb",
|
|
193
193
|
"publishConfig": {
|
|
194
194
|
"access": "public"
|
|
195
195
|
},
|
|
@@ -883,5 +883,6 @@
|
|
|
883
883
|
"depChecker.depsNotFound": "Cannot find @SupportedPackages.\n\nTeams Toolkit requires these dependencies.\n\nClick \"Install\" to install @InstallPackages.",
|
|
884
884
|
"depChecker.linuxDepsNotFound": "Cannot find @SupportedPackages. Install @SupportedPackages manually and restart Visual Studio Code.",
|
|
885
885
|
"depChecker.linuxDepsNotFoundHelpLinkMessage": "Cannot find @SupportedPackages.\n\nTeams Toolkit requires these dependencies.",
|
|
886
|
-
"error.ActionNotExist": "Action not
|
|
886
|
+
"error.ActionNotExist": "Action not found: %s",
|
|
887
|
+
"error.ComponentNotExist": "Component not found: %s"
|
|
887
888
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Auto generated content, please customize files under provision folder
|
|
2
|
+
|
|
3
|
+
@secure()
|
|
4
|
+
param provisionParameters object
|
|
5
|
+
param provisionOutputs object
|
|
6
|
+
|
|
7
|
+
var apimServiceName = split(provisionOutputs.apimOutput.value.serviceResourceId, '/')[8]
|
|
8
|
+
|
|
9
|
+
var resourceBaseName = provisionParameters['resourceBaseName']
|
|
10
|
+
var m365TenantId = provisionParameters['m365TenantId']
|
|
11
|
+
var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
|
|
12
|
+
var oauthServerName = contains(provisionParameters, 'apimOauthServerName') ? provisionParameters['apimOauthServerName'] : '${resourceBaseName}'
|
|
13
|
+
var clientId = provisionParameters['apimClientId']
|
|
14
|
+
var clientSecret = provisionParameters['apimClientSecret']
|
|
15
|
+
|
|
16
|
+
{{#if (contains "teams-bot" connections) }}
|
|
17
|
+
var botId = provisionParameters['botAadAppClientId']
|
|
18
|
+
{{/if}}
|
|
19
|
+
|
|
20
|
+
{{#if (contains "teams-tab" connections) }}
|
|
21
|
+
{{#if (contains "teams-bot" connections)}}
|
|
22
|
+
var m365ApplicationIdUri = 'api://${ {{tabDomainVarName}} }/botid-${botId}'
|
|
23
|
+
{{else}}
|
|
24
|
+
var m365ClientId = provisionParameters['m365ClientId']
|
|
25
|
+
var m365ApplicationIdUri = 'api://${ {{tabDomainVarName}} }/${m365ClientId}'
|
|
26
|
+
{{/if}}
|
|
27
|
+
{{else}}
|
|
28
|
+
{{#if (contains "teams-bot" connections) }}
|
|
29
|
+
var m365ApplicationIdUri = 'api://botid-${botId}'
|
|
30
|
+
{{/if}}
|
|
31
|
+
{{/if}}
|
|
32
|
+
|
|
33
|
+
var scope = '${m365ApplicationIdUri}/.default'
|
|
34
|
+
var authorizationEndpoint = uri(m365OauthAuthorityHost, '${m365TenantId}/oauth2/v2.0/authorize')
|
|
35
|
+
var tokenEndpoint = uri(m365OauthAuthorityHost, '${m365TenantId}/oauth2/v2.0/token')
|
|
36
|
+
|
|
37
|
+
//Enables Microsoft Power Platform to access your APIs hosted in Function App
|
|
38
|
+
resource apimServiceAuthServer 'Microsoft.ApiManagement/service/authorizationServers@2020-12-01' = {
|
|
39
|
+
name: '${apimServiceName}/${oauthServerName}'
|
|
40
|
+
properties: {
|
|
41
|
+
displayName: oauthServerName
|
|
42
|
+
description: 'Created by TeamsFx.'
|
|
43
|
+
clientRegistrationEndpoint: 'http://localhost'
|
|
44
|
+
authorizationEndpoint: authorizationEndpoint
|
|
45
|
+
authorizationMethods: [
|
|
46
|
+
'GET'
|
|
47
|
+
'POST'
|
|
48
|
+
]
|
|
49
|
+
clientAuthenticationMethod: [
|
|
50
|
+
'Body'
|
|
51
|
+
]
|
|
52
|
+
tokenEndpoint: tokenEndpoint
|
|
53
|
+
defaultScope: scope
|
|
54
|
+
grantTypes: [
|
|
55
|
+
'authorizationCode'
|
|
56
|
+
]
|
|
57
|
+
bearerTokenSendingMethods: [
|
|
58
|
+
'authorizationHeader'
|
|
59
|
+
]
|
|
60
|
+
clientId: clientId
|
|
61
|
+
clientSecret: clientSecret
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
output authServerResourceId string = apimServiceAuthServer.id
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Add TeamsFx configurations to APIM resources
|
|
2
|
+
module teamsFxApimConfig './teamsFx/apimConfig.bicep' = {
|
|
3
|
+
name: 'teamsFxApimConfig'
|
|
4
|
+
params: {
|
|
5
|
+
provisionParameters: provisionParameters
|
|
6
|
+
provisionOutputs: provisionOutputs
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
output apimConfigOutput object = {
|
|
11
|
+
teamsFxPluginId: 'apim'
|
|
12
|
+
authServerResourceId: teamsFxApimConfig.outputs.authServerResourceId
|
|
13
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@secure()
|
|
2
|
+
param provisionParameters object
|
|
3
|
+
|
|
4
|
+
var resourceBaseName = provisionParameters['resourceBaseName']
|
|
5
|
+
var apimServiceName = contains(provisionParameters, 'apimServiceName') ? provisionParameters['apimServiceName'] : '${resourceBaseName}' // Try to read name for APIM Service from parameters
|
|
6
|
+
var apimServiceSku = contains(provisionParameters, 'apimServiceSku') ? provisionParameters['apimServiceSku'] : 'Consumption' // Try to read SKU for APIM Service from parameters
|
|
7
|
+
var productName = contains(provisionParameters, 'apimProductName') ? provisionParameters['apimProductName'] : '${resourceBaseName}' // Try to read name for APIM Product from parameters
|
|
8
|
+
var publisherEmail = provisionParameters['apimPublisherEmail'] // Read publisher email for APIM Service from parameters, this parameter is required
|
|
9
|
+
var publisherName = provisionParameters['apimPublisherName'] // Read publisher name for APIM Service from parameters, this parameter is required
|
|
10
|
+
|
|
11
|
+
// APIM Service that helps manage your APIs
|
|
12
|
+
resource apimService 'Microsoft.ApiManagement/service@2020-12-01' = {
|
|
13
|
+
name: apimServiceName
|
|
14
|
+
location: resourceGroup().location
|
|
15
|
+
sku: {
|
|
16
|
+
name: apimServiceSku // You can follow https://aka.ms/teamsfx-bicep-add-param-tutorial to add apimServiceSku property to provisionParameters to override the default value "Consumption".
|
|
17
|
+
capacity: 0
|
|
18
|
+
}
|
|
19
|
+
properties: {
|
|
20
|
+
publisherEmail: publisherEmail
|
|
21
|
+
publisherName: publisherName
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Group your APIs, define terms of use and runtime policies
|
|
26
|
+
resource apimServiceProduct 'Microsoft.ApiManagement/service/products@2020-12-01' = {
|
|
27
|
+
parent: apimService
|
|
28
|
+
name: productName
|
|
29
|
+
properties: {
|
|
30
|
+
displayName: productName
|
|
31
|
+
description: 'Created by TeamsFx.'
|
|
32
|
+
subscriptionRequired: false
|
|
33
|
+
state: 'published'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
output serviceResourceId string = apimService.id
|
|
38
|
+
output productResourceId string = apimServiceProduct.id
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Resources for APIM
|
|
2
|
+
module apimProvision './provision/apim.bicep' = {
|
|
3
|
+
name: 'apimProvision'
|
|
4
|
+
params: {
|
|
5
|
+
provisionParameters: provisionParameters
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
output apimOutput object = {
|
|
10
|
+
teamsFxPluginId: 'apim'
|
|
11
|
+
serviceResourceId: apimProvision.outputs.serviceResourceId
|
|
12
|
+
productResourceId: apimProvision.outputs.productResourceId
|
|
13
|
+
}
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
param provisionParameters object
|
|
5
5
|
param provisionOutputs object
|
|
6
6
|
@secure()
|
|
7
|
+
param currentConfigs object
|
|
8
|
+
@secure()
|
|
7
9
|
param currentAppSettings object
|
|
8
10
|
|
|
9
|
-
var functionAppName = split({{azure-function.outputs.
|
|
10
|
-
{{#if (contains "aad" connections)}}
|
|
11
|
+
var functionAppName = split({{azure-function.outputs.functionAppResourceId}}, '/')[8]
|
|
12
|
+
{{#if (contains "aad-app" connections)}}
|
|
11
13
|
var m365ClientId = provisionParameters['m365ClientId']
|
|
12
14
|
{{#if (contains "key-vault" connections) }}
|
|
13
15
|
var m365ClientSecret = {{key-vault.outputs.m365ClientSecretReference}}
|
|
@@ -16,7 +18,7 @@ var m365ClientSecret = provisionParameters['m365ClientSecret']
|
|
|
16
18
|
{{/if}}
|
|
17
19
|
var m365TenantId = provisionParameters['m365TenantId']
|
|
18
20
|
var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
|
|
19
|
-
{{#if (contains "bot
|
|
21
|
+
{{#if (contains "teams-bot" connections) }}
|
|
20
22
|
var botId = provisionParameters['botAadAppClientId']
|
|
21
23
|
{{#if (contains "teams-tab" connections)}}
|
|
22
24
|
var m365ApplicationIdUri = 'api://${ {{tabDomainVarName}} }/botid-${botId}'
|
|
@@ -39,7 +41,7 @@ var botAadAppClientSecret = provisionParameters['botAadAppClientSecret']
|
|
|
39
41
|
resource functionAppSettings 'Microsoft.Web/sites/config@2021-02-01' = {
|
|
40
42
|
name: '${functionAppName}/appsettings'
|
|
41
43
|
properties: union({
|
|
42
|
-
{{#if (contains "aad" connections)}}
|
|
44
|
+
{{#if (contains "aad-app" connections)}}
|
|
43
45
|
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
|
|
44
46
|
M365_AUTHORITY_HOST: m365OauthAuthorityHost // AAD authority host
|
|
45
47
|
M365_CLIENT_ID: m365ClientId // Client id of AAD application
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Get existing app settings for merge
|
|
2
|
-
var
|
|
2
|
+
var functionCurrentConfigs = reference('${ {{azure-function.outputs.functionAppResourceId}} }/config/web', '2021-02-01')
|
|
3
|
+
var functionCurrentAppSettings = list('${ {{azure-function.outputs.functionAppResourceId}} }/config/appsettings', '2021-02-01').properties
|
|
3
4
|
|
|
4
5
|
// Merge TeamsFx configurations to Azure Function App
|
|
5
6
|
module teamsFxAzureFunction{{componentName}}Config './teamsFx/azureFunction{{componentName}}Config.bicep' = {
|
|
@@ -7,6 +8,7 @@ module teamsFxAzureFunction{{componentName}}Config './teamsFx/azureFunction{{com
|
|
|
7
8
|
params: {
|
|
8
9
|
provisionParameters: provisionParameters
|
|
9
10
|
provisionOutputs: provisionOutputs
|
|
10
|
-
|
|
11
|
+
currentConfigs: functionCurrentConfigs
|
|
12
|
+
currentAppSettings: functionCurrentAppSettings
|
|
11
13
|
}
|
|
12
14
|
}
|
|
@@ -93,5 +93,5 @@ output sku string = functionAppSKU
|
|
|
93
93
|
output appName string = functionAppName
|
|
94
94
|
output domain string = functionApp.properties.defaultHostName
|
|
95
95
|
output appServicePlanName string = serverfarmsName
|
|
96
|
-
output
|
|
97
|
-
output
|
|
96
|
+
output functionAppResourceId string = functionApp.id
|
|
97
|
+
output functionEndpoint string = 'https://${functionApp.properties.defaultHostName}'
|
|
@@ -12,6 +12,6 @@ output azureFunction{{componentName}}Output object = {
|
|
|
12
12
|
appName: azureFunction{{componentName}}Provision.outputs.appName
|
|
13
13
|
domain: azureFunction{{componentName}}Provision.outputs.domain
|
|
14
14
|
appServicePlanName: azureFunction{{componentName}}Provision.outputs.appServicePlanName
|
|
15
|
-
functionAppResourceId: azureFunction{{componentName}}Provision.outputs.
|
|
16
|
-
functionEndpoint: azureFunction{{componentName}}Provision.outputs.
|
|
15
|
+
functionAppResourceId: azureFunction{{componentName}}Provision.outputs.functionAppResourceId
|
|
16
|
+
functionEndpoint: azureFunction{{componentName}}Provision.outputs.functionEndpoint
|
|
17
17
|
}
|
|
@@ -39,6 +39,6 @@ resource sqlFirewallRules 'Microsoft.Sql/servers/firewallRules@2021-05-01-previe
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
output
|
|
42
|
+
output sqlResourceId string = sqlServer.id
|
|
43
43
|
output sqlEndpoint string = sqlServer.properties.fullyQualifiedDomainName
|
|
44
44
|
output sqlDatabaseName string = sqlDatabaseName
|
|
@@ -8,7 +8,7 @@ module azureSqlProvision './provision/azureSql.bicep' = {
|
|
|
8
8
|
|
|
9
9
|
output azureSqlOutput object = {
|
|
10
10
|
teamsFxPluginId: 'azure-sql'
|
|
11
|
-
sqlResourceId: azureSqlProvision.outputs.
|
|
11
|
+
sqlResourceId: azureSqlProvision.outputs.sqlResourceId
|
|
12
12
|
sqlEndpoint: azureSqlProvision.outputs.sqlEndpoint
|
|
13
13
|
sqlDatabaseName: azureSqlProvision.outputs.sqlDatabaseName
|
|
14
14
|
}
|
|
@@ -19,7 +19,7 @@ resource storage 'Microsoft.Storage/storageAccounts@2021-06-01' = {
|
|
|
19
19
|
|
|
20
20
|
var siteDomain = replace(replace(storage.properties.primaryEndpoints.web, 'https://', ''), '/', '')
|
|
21
21
|
|
|
22
|
-
output
|
|
22
|
+
output storageResourceId string = storage.id
|
|
23
23
|
output endpoint string = 'https://${siteDomain}'
|
|
24
24
|
output domain string = siteDomain
|
|
25
25
|
output indexPath string = '/index.html#'
|
|
@@ -11,5 +11,5 @@ output azureStorage{{componentName}}Output object = {
|
|
|
11
11
|
domain: azureStorage{{componentName}}Provision.outputs.domain
|
|
12
12
|
endpoint: azureStorage{{componentName}}Provision.outputs.endpoint
|
|
13
13
|
indexPath: azureStorage{{componentName}}Provision.outputs.indexPath
|
|
14
|
-
|
|
14
|
+
storageResourceId: azureStorage{{componentName}}Provision.outputs.resourceId
|
|
15
15
|
}
|
|
@@ -7,10 +7,10 @@ param provisionOutputs object
|
|
|
7
7
|
param currentAppSettings object
|
|
8
8
|
|
|
9
9
|
var webAppName = split({{azure-web-app.outputs.resourceId}} , '/')[8]
|
|
10
|
-
{{#if (contains "aad" connections)}}
|
|
10
|
+
{{#if (contains "aad-app" connections)}}
|
|
11
11
|
var m365ClientId = provisionParameters['m365ClientId']
|
|
12
12
|
{{#if (contains "key-vault" connections) }}
|
|
13
|
-
var m365ClientSecret = {{key-vault.outputs.m365ClientSecretReference}}
|
|
13
|
+
var m365ClientSecret = {{key-vault.outputs.m365ClientSecretReference}}
|
|
14
14
|
{{else}}
|
|
15
15
|
var m365ClientSecret = provisionParameters['m365ClientSecret']
|
|
16
16
|
{{/if}}
|
|
@@ -18,7 +18,7 @@ var m365TenantId = provisionParameters['m365TenantId']
|
|
|
18
18
|
var m365OauthAuthorityHost = provisionParameters['m365OauthAuthorityHost']
|
|
19
19
|
var botId = provisionParameters['botAadAppClientId']
|
|
20
20
|
{{#if (contains "teams-tab" connections)}}
|
|
21
|
-
{{#if (contains "bot
|
|
21
|
+
{{#if (contains "teams-bot" connections) }}
|
|
22
22
|
var m365ApplicationIdUri = 'api://${ {{tabDomainVarName}} }/botid-${botId}'
|
|
23
23
|
{{/if}}
|
|
24
24
|
{{else}}
|
|
@@ -37,8 +37,8 @@ var botAadAppClientSecret = provisionParameters['botAadAppClientSecret']
|
|
|
37
37
|
resource webAppSettings 'Microsoft.Web/sites/config@2021-02-01' = {
|
|
38
38
|
name: '${webAppName}/appsettings'
|
|
39
39
|
properties: union({
|
|
40
|
-
{{#if (contains "aad" connections)}}
|
|
41
|
-
INITIATE_LOGIN_ENDPOINT: uri({{azure-web-app.outputs.
|
|
40
|
+
{{#if (contains "aad-app" connections)}}
|
|
41
|
+
INITIATE_LOGIN_ENDPOINT: uri({{azure-web-app.outputs.siteEndpoint}}, 'auth-start.html') // The page is used to let users consent required OAuth permissions during bot SSO process
|
|
42
42
|
M365_AUTHORITY_HOST: m365OauthAuthorityHost // AAD authority host
|
|
43
43
|
M365_CLIENT_ID: m365ClientId // Client id of AAD application
|
|
44
44
|
M365_CLIENT_SECRET: m365ClientSecret // Client secret of AAD application
|
|
@@ -49,9 +49,9 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
output
|
|
53
|
-
output
|
|
54
|
-
output
|
|
52
|
+
output skuName string = webAppSKU
|
|
53
|
+
output siteName string = webAppName
|
|
54
|
+
output validDomain string = webApp.properties.defaultHostName
|
|
55
55
|
output appServicePlanName string = serverfarmsName
|
|
56
56
|
output resourceId string = webApp.id
|
|
57
|
-
output
|
|
57
|
+
output siteEndpoint string = 'https://${webApp.properties.defaultHostName}'
|
|
@@ -9,10 +9,10 @@ module azureWebApp{{componentName}}Provision './provision/azureWebApp{{component
|
|
|
9
9
|
|
|
10
10
|
output azureWebApp{{componentName}}Output object = {
|
|
11
11
|
teamsFxPluginId: '{{componentId}}'
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
skuName: azureWebApp{{componentName}}Provision.outputs.skuName
|
|
13
|
+
siteName: azureWebApp{{componentName}}Provision.outputs.siteName
|
|
14
|
+
validDomain: azureWebApp{{componentName}}Provision.outputs.validDomain
|
|
15
15
|
appServicePlanName: azureWebApp{{componentName}}Provision.outputs.appServicePlanName
|
|
16
16
|
resourceId: azureWebApp{{componentName}}Provision.outputs.resourceId
|
|
17
|
-
|
|
17
|
+
siteEndpoint: azureWebApp{{componentName}}Provision.outputs.siteEndpoint
|
|
18
18
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "{{state.aad-app.objectId}}",
|
|
3
|
+
"appId": "{{state.aad-app.clientId}}",
|
|
4
|
+
"name": "{{config.manifest.appName.short}}-aad",
|
|
5
|
+
"accessTokenAcceptedVersion": 2,
|
|
6
|
+
"signInAudience": "AzureADMyOrg",
|
|
7
|
+
"optionalClaims": {
|
|
8
|
+
"idToken": [],
|
|
9
|
+
"accessToken": [
|
|
10
|
+
{
|
|
11
|
+
"name": "idtyp",
|
|
12
|
+
"source": null,
|
|
13
|
+
"essential": false,
|
|
14
|
+
"additionalProperties": []
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"saml2Token": []
|
|
18
|
+
},
|
|
19
|
+
"requiredResourceAccess": [
|
|
20
|
+
{
|
|
21
|
+
"resourceAppId": "Microsoft Graph",
|
|
22
|
+
"resourceAccess": [
|
|
23
|
+
{
|
|
24
|
+
"id": "User.Read",
|
|
25
|
+
"type": "Scope"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"oauth2Permissions": [
|
|
31
|
+
{
|
|
32
|
+
"adminConsentDescription": "Allows Teams to call the app's web APIs as the current user.",
|
|
33
|
+
"adminConsentDisplayName": "Teams can access app's web APIs",
|
|
34
|
+
"id": "{{state.fx-resource-aad-app-for-teams.oauth2PermissionScopeId}}",
|
|
35
|
+
"isEnabled": true,
|
|
36
|
+
"type": "User",
|
|
37
|
+
"userConsentDescription": "Enable Teams to call this app's web APIs with the same rights that you have",
|
|
38
|
+
"userConsentDisplayName": "Teams can access app's web APIs and make requests on your behalf",
|
|
39
|
+
"value": "access_as_user"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"preAuthorizedApplications": [
|
|
43
|
+
{
|
|
44
|
+
"appId": "1fec8e78-bce4-4aaf-ab1b-5451cc387264",
|
|
45
|
+
"permissionIds": [
|
|
46
|
+
"{{state.aad-app.oauth2PermissionScopeId}}"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"appId": "5e3ce6c0-2b1f-4285-8d4b-75ee78787346",
|
|
51
|
+
"permissionIds": [
|
|
52
|
+
"{{state.aad-app.oauth2PermissionScopeId}}"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"appId": "d3590ed6-52b3-4102-aeff-aad2292ab01c",
|
|
57
|
+
"permissionIds": [
|
|
58
|
+
"{{state.aad-app.oauth2PermissionScopeId}}"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"appId": "00000002-0000-0ff1-ce00-000000000000",
|
|
63
|
+
"permissionIds": [
|
|
64
|
+
"{{state.aad-app.oauth2PermissionScopeId}}"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"appId": "bc59ab01-8403-45c6-8796-ac3ef710b3e3",
|
|
69
|
+
"permissionIds": [
|
|
70
|
+
"{{state.aad-app.oauth2PermissionScopeId}}"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"appId": "0ec893e0-5785-4de6-99da-4ed124e5296c",
|
|
75
|
+
"permissionIds": [
|
|
76
|
+
"{{state.aad-app.oauth2PermissionScopeId}}"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"appId": "4765445b-32c6-49b0-83e6-1d93765276ca",
|
|
81
|
+
"permissionIds": [
|
|
82
|
+
"{{state.aad-app.oauth2PermissionScopeId}}"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"appId": "4345a7b9-9a63-4910-a426-35363201d503",
|
|
87
|
+
"permissionIds": [
|
|
88
|
+
"{{state.aad-app.oauth2PermissionScopeId}}"
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"identifierUris": [
|
|
93
|
+
"{{state.aad-app.applicationIdUris}}"
|
|
94
|
+
],
|
|
95
|
+
"replyUrlsWithType": []
|
|
96
|
+
}
|
|
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
|
|
Binary file
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "reflect-metadata";
|
|
2
|
-
import { Action, CallAction, ContextV3, FxError, InputsWithProjectPath, MaybePromise, Result } from "@microsoft/teamsfx-api";
|
|
3
|
-
export declare class ProjectSettingsManager {
|
|
4
|
-
name: string;
|
|
5
|
-
load(context: ContextV3, inputs: InputsWithProjectPath): MaybePromise<Result<Action | undefined, FxError>>;
|
|
6
|
-
write(context: ContextV3, inputs: InputsWithProjectPath): MaybePromise<Result<Action | undefined, FxError>>;
|
|
7
|
-
}
|
|
8
|
-
export declare const LoadProjectSettingsAction: CallAction;
|
|
9
|
-
export declare const WriteProjectSettingsAction: CallAction;
|
|
10
|
-
//# sourceMappingURL=projectSettingsManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projectSettingsManager.d.ts","sourceRoot":"","sources":["../../src/component/projectSettingsManager.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,CAAC;AAM1B,OAAO,EACL,MAAM,EACN,UAAU,EACV,SAAS,EACT,OAAO,EACP,qBAAqB,EACrB,YAAY,EAGZ,MAAM,EACP,MAAM,wBAAwB,CAAC;AAYhC,qBACa,sBAAsB;IACjC,IAAI,SAAsB;IAC1B,IAAI,CACF,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,YAAY,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC;IAuBpD,KAAK,CACH,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,YAAY,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC;CAgBrD;AAED,eAAO,MAAM,yBAAyB,EAAE,UAKvC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,UAKxC,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Microsoft Corporation.
|
|
3
|
-
// Licensed under the MIT license.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.WriteProjectSettingsAction = exports.LoadProjectSettingsAction = exports.ProjectSettingsManager = void 0;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
require("reflect-metadata");
|
|
8
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
9
|
-
const typedi_1 = require("typedi");
|
|
10
|
-
const uuid = tslib_1.__importStar(require("uuid"));
|
|
11
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
12
|
-
const telemetry_1 = require("../common/telemetry");
|
|
13
|
-
const crypto_1 = require("../core/crypto");
|
|
14
|
-
const projectSettingsLoader_1 = require("../core/middleware/projectSettingsLoader");
|
|
15
|
-
const utils_1 = require("./utils");
|
|
16
|
-
let ProjectSettingsManager = class ProjectSettingsManager {
|
|
17
|
-
constructor() {
|
|
18
|
-
this.name = "project-settings";
|
|
19
|
-
}
|
|
20
|
-
load(context, inputs) {
|
|
21
|
-
const action = {
|
|
22
|
-
type: "function",
|
|
23
|
-
name: "project-settings.load",
|
|
24
|
-
plan: (context, inputs) => {
|
|
25
|
-
return teamsfx_api_1.ok([]);
|
|
26
|
-
},
|
|
27
|
-
execute: async (context, inputs) => {
|
|
28
|
-
const filePath = projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath);
|
|
29
|
-
const projectSettings = (await fs_extra_1.default.readJson(filePath));
|
|
30
|
-
if (!projectSettings.projectId) {
|
|
31
|
-
projectSettings.projectId = uuid.v4();
|
|
32
|
-
telemetry_1.sendTelemetryEvent(telemetry_1.Component.core, telemetry_1.TelemetryEvent.FillProjectId, {
|
|
33
|
-
[telemetry_1.TelemetryProperty.ProjectId]: projectSettings.projectId,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
context.projectSetting = projectSettings;
|
|
37
|
-
context.cryptoProvider = new crypto_1.LocalCrypto(projectSettings.projectId);
|
|
38
|
-
return teamsfx_api_1.ok([]);
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
return teamsfx_api_1.ok(action);
|
|
42
|
-
}
|
|
43
|
-
write(context, inputs) {
|
|
44
|
-
const action = {
|
|
45
|
-
type: "function",
|
|
46
|
-
name: "project-settings.write",
|
|
47
|
-
plan: (context, inputs) => {
|
|
48
|
-
return teamsfx_api_1.ok([utils_1.createFileEffect(projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath), "replace")]);
|
|
49
|
-
},
|
|
50
|
-
execute: async (context, inputs) => {
|
|
51
|
-
const filePath = projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath);
|
|
52
|
-
const effect = utils_1.createFileEffect(projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath), "replace");
|
|
53
|
-
await fs_extra_1.default.writeFile(filePath, JSON.stringify(context.projectSetting, null, 4));
|
|
54
|
-
return teamsfx_api_1.ok([effect]);
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
return teamsfx_api_1.ok(action);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
ProjectSettingsManager = tslib_1.__decorate([
|
|
61
|
-
typedi_1.Service("project-settings")
|
|
62
|
-
], ProjectSettingsManager);
|
|
63
|
-
exports.ProjectSettingsManager = ProjectSettingsManager;
|
|
64
|
-
exports.LoadProjectSettingsAction = {
|
|
65
|
-
type: "call",
|
|
66
|
-
name: "call project-settings.load",
|
|
67
|
-
targetAction: "project-settings.load",
|
|
68
|
-
required: true,
|
|
69
|
-
};
|
|
70
|
-
exports.WriteProjectSettingsAction = {
|
|
71
|
-
type: "call",
|
|
72
|
-
name: "call project-settings.write",
|
|
73
|
-
targetAction: "project-settings.write",
|
|
74
|
-
required: true,
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=projectSettingsManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projectSettingsManager.js","sourceRoot":"","sources":["../../src/component/projectSettingsManager.ts"],"names":[],"mappings":"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"}
|