@microsoft/teamsfx-core 1.7.0 → 1.7.1-alpha.42a29d71b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/constants.d.ts +3 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +3 -1
- package/build/common/constants.js.map +1 -1
- package/build/common/featureFlags.d.ts +8 -0
- package/build/common/featureFlags.d.ts.map +1 -0
- package/build/common/featureFlags.js +43 -0
- package/build/common/featureFlags.js.map +1 -0
- package/build/common/index.d.ts +4 -3
- package/build/common/index.d.ts.map +1 -1
- package/build/common/index.js +4 -3
- package/build/common/index.js.map +1 -1
- package/build/common/local/localEnvManager.d.ts +1 -1
- package/build/common/local/localEnvManager.d.ts.map +1 -1
- package/build/common/local/localEnvManager.js +1 -1
- package/build/common/local/localEnvManager.js.map +1 -1
- package/build/common/local/localStateHelper.d.ts.map +1 -1
- package/build/common/local/localStateHelper.js +12 -0
- package/build/common/local/localStateHelper.js.map +1 -1
- package/build/common/local/portChecker.d.ts.map +1 -1
- package/build/common/local/portChecker.js +6 -1
- package/build/common/local/portChecker.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts +1 -1
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +6 -4
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/samples-config.json +29 -15
- package/build/common/samples.d.ts +1 -1
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +3 -2
- package/build/common/samples.js.map +1 -1
- package/build/common/telemetry.d.ts +9 -0
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +9 -0
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/common/tools.d.ts +3 -3
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +28 -28
- package/build/common/tools.js.map +1 -1
- package/build/core/FxCore.d.ts +3 -2
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +76 -19
- package/build/core/FxCore.js.map +1 -1
- package/build/core/environment.d.ts +1 -1
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +6 -1
- package/build/core/environment.js.map +1 -1
- package/build/core/error.d.ts +1 -0
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +5 -1
- package/build/core/error.js.map +1 -1
- package/build/core/globalVars.d.ts +0 -5
- package/build/core/globalVars.d.ts.map +1 -1
- package/build/core/globalVars.js +1 -9
- package/build/core/globalVars.js.map +1 -1
- package/build/core/middleware/aadManifestMigration.d.ts +3 -0
- package/build/core/middleware/aadManifestMigration.d.ts.map +1 -0
- package/build/core/middleware/aadManifestMigration.js +240 -0
- package/build/core/middleware/aadManifestMigration.js.map +1 -0
- package/build/core/middleware/consolidateLocalRemote.d.ts +2 -0
- package/build/core/middleware/consolidateLocalRemote.d.ts.map +1 -1
- package/build/core/middleware/consolidateLocalRemote.js +100 -55
- package/build/core/middleware/consolidateLocalRemote.js.map +1 -1
- package/build/core/middleware/errorHandler.d.ts.map +1 -1
- package/build/core/middleware/errorHandler.js +15 -3
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +11 -55
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/core/question.d.ts +2 -8
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +68 -52
- package/build/core/question.js.map +1 -1
- package/build/core/telemetry.d.ts +23 -0
- package/build/core/telemetry.d.ts.map +1 -0
- package/build/core/telemetry.js +46 -0
- package/build/core/telemetry.js.map +1 -0
- package/build/plugins/resource/aad/constants.d.ts +5 -0
- package/build/plugins/resource/aad/constants.d.ts.map +1 -1
- package/build/plugins/resource/aad/constants.js +5 -0
- package/build/plugins/resource/aad/constants.js.map +1 -1
- package/build/plugins/resource/aad/errors.d.ts +2 -0
- package/build/plugins/resource/aad/errors.d.ts.map +1 -1
- package/build/plugins/resource/aad/errors.js +15 -1
- package/build/plugins/resource/aad/errors.js.map +1 -1
- package/build/plugins/resource/aad/index.d.ts +2 -1
- package/build/plugins/resource/aad/index.d.ts.map +1 -1
- package/build/plugins/resource/aad/index.js +23 -0
- package/build/plugins/resource/aad/index.js.map +1 -1
- package/build/plugins/resource/aad/plugin.d.ts +3 -0
- package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
- package/build/plugins/resource/aad/plugin.js +109 -19
- package/build/plugins/resource/aad/plugin.js.map +1 -1
- package/build/plugins/resource/aad/utils/configs.d.ts +2 -1
- package/build/plugins/resource/aad/utils/configs.d.ts.map +1 -1
- package/build/plugins/resource/aad/utils/configs.js +20 -3
- package/build/plugins/resource/aad/utils/configs.js.map +1 -1
- package/build/plugins/resource/aad/v2/index.d.ts +2 -1
- package/build/plugins/resource/aad/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/aad/v2/index.js +3 -0
- package/build/plugins/resource/aad/v2/index.js.map +1 -1
- package/build/plugins/resource/apiconnector/checker.d.ts +7 -0
- package/build/plugins/resource/apiconnector/checker.d.ts.map +1 -0
- package/build/plugins/resource/apiconnector/checker.js +73 -0
- package/build/plugins/resource/apiconnector/checker.js.map +1 -0
- package/build/plugins/resource/apiconnector/config.d.ts +23 -0
- package/build/plugins/resource/apiconnector/config.d.ts.map +1 -0
- package/build/plugins/resource/apiconnector/config.js +5 -0
- package/build/plugins/resource/apiconnector/config.js.map +1 -0
- package/build/plugins/resource/apiconnector/constants.d.ts +25 -1
- package/build/plugins/resource/apiconnector/constants.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/constants.js +33 -7
- package/build/plugins/resource/apiconnector/constants.js.map +1 -1
- package/build/plugins/resource/apiconnector/depsHandler.d.ts +13 -0
- package/build/plugins/resource/apiconnector/depsHandler.d.ts.map +1 -0
- package/build/plugins/resource/apiconnector/depsHandler.js +93 -0
- package/build/plugins/resource/apiconnector/depsHandler.js.map +1 -0
- package/build/plugins/resource/apiconnector/envHandler.d.ts +6 -4
- package/build/plugins/resource/apiconnector/envHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/envHandler.js +57 -26
- package/build/plugins/resource/apiconnector/envHandler.js.map +1 -1
- package/build/plugins/resource/apiconnector/errors.d.ts +30 -8
- package/build/plugins/resource/apiconnector/errors.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/errors.js +35 -9
- package/build/plugins/resource/apiconnector/errors.js.map +1 -1
- package/build/plugins/resource/apiconnector/index.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/index.js +1 -8
- package/build/plugins/resource/apiconnector/index.js.map +1 -1
- package/build/plugins/resource/apiconnector/plugin.d.ts +16 -2
- package/build/plugins/resource/apiconnector/plugin.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/plugin.js +259 -37
- package/build/plugins/resource/apiconnector/plugin.js.map +1 -1
- package/build/plugins/resource/apiconnector/questions.d.ts +26 -4
- package/build/plugins/resource/apiconnector/questions.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/questions.js +103 -26
- package/build/plugins/resource/apiconnector/questions.js.map +1 -1
- package/build/plugins/resource/apiconnector/result.d.ts +16 -3
- package/build/plugins/resource/apiconnector/result.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/result.js +24 -5
- package/build/plugins/resource/apiconnector/result.js.map +1 -1
- package/build/plugins/resource/apiconnector/sampleHandler.d.ts +3 -3
- package/build/plugins/resource/apiconnector/sampleHandler.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/sampleHandler.js +14 -4
- package/build/plugins/resource/apiconnector/sampleHandler.js.map +1 -1
- package/build/plugins/resource/apiconnector/telemetry.d.ts +41 -0
- package/build/plugins/resource/apiconnector/telemetry.d.ts.map +1 -0
- package/build/plugins/resource/apiconnector/telemetry.js +69 -0
- package/build/plugins/resource/apiconnector/telemetry.js.map +1 -0
- package/build/plugins/resource/apiconnector/utils.d.ts +14 -20
- package/build/plugins/resource/apiconnector/utils.d.ts.map +1 -1
- package/build/plugins/resource/apiconnector/utils.js +63 -16
- package/build/plugins/resource/apiconnector/utils.js.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.js +6 -5
- package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
- package/build/plugins/resource/appstudio/constants.d.ts +2 -0
- package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/constants.js +24 -1
- package/build/plugins/resource/appstudio/constants.js.map +1 -1
- package/build/plugins/resource/appstudio/index.d.ts +1 -0
- package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/index.js +56 -11
- package/build/plugins/resource/appstudio/index.js.map +1 -1
- package/build/plugins/resource/appstudio/manifestTemplate.d.ts +2 -2
- package/build/plugins/resource/appstudio/manifestTemplate.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/manifestTemplate.js +27 -5
- package/build/plugins/resource/appstudio/manifestTemplate.js.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts +1 -0
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js +6 -1
- package/build/plugins/resource/appstudio/plugin.js.map +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.d.ts +1 -0
- package/build/plugins/resource/appstudio/utils/telemetry.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.js +1 -0
- package/build/plugins/resource/appstudio/utils/telemetry.js.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.d.ts +2 -0
- package/build/plugins/resource/appstudio/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.js +5 -0
- package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
- package/build/plugins/resource/appstudio/v3/index.js +1 -1
- package/build/plugins/resource/appstudio/v3/index.js.map +1 -1
- package/build/plugins/resource/appstudio/v3/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/v3/plugin.js +5 -0
- package/build/plugins/resource/appstudio/v3/plugin.js.map +1 -1
- package/build/plugins/resource/bot/azureOps.d.ts +3 -2
- package/build/plugins/resource/bot/azureOps.d.ts.map +1 -1
- package/build/plugins/resource/bot/azureOps.js +29 -30
- package/build/plugins/resource/bot/azureOps.js.map +1 -1
- package/build/plugins/resource/bot/clientFactory.d.ts +0 -5
- package/build/plugins/resource/bot/clientFactory.d.ts.map +1 -1
- package/build/plugins/resource/bot/clientFactory.js +1 -29
- package/build/plugins/resource/bot/clientFactory.js.map +1 -1
- package/build/plugins/resource/bot/configs/teamsBotConfig.d.ts +1 -0
- package/build/plugins/resource/bot/configs/teamsBotConfig.d.ts.map +1 -1
- package/build/plugins/resource/bot/configs/teamsBotConfig.js +15 -13
- package/build/plugins/resource/bot/configs/teamsBotConfig.js.map +1 -1
- package/build/plugins/resource/bot/constants.d.ts +8 -9
- package/build/plugins/resource/bot/constants.d.ts.map +1 -1
- package/build/plugins/resource/bot/constants.js +9 -9
- package/build/plugins/resource/bot/constants.js.map +1 -1
- package/build/plugins/resource/bot/errors.d.ts +6 -18
- package/build/plugins/resource/bot/errors.d.ts.map +1 -1
- package/build/plugins/resource/bot/errors.js +16 -39
- package/build/plugins/resource/bot/errors.js.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/deployMgr.d.ts +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/deployMgr.d.ts.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/deployMgr.js +10 -4
- 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 +4 -7
- package/build/plugins/resource/bot/functionsHostedBot/plugin.js.map +1 -1
- package/build/plugins/resource/bot/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/index.js +4 -2
- 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 +3 -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 +8 -3
- package/build/plugins/resource/bot/plugin.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 +20 -2
- package/build/plugins/resource/bot/question.js.map +1 -1
- package/build/plugins/resource/bot/resources/messages.d.ts +2 -0
- package/build/plugins/resource/bot/resources/messages.d.ts.map +1 -1
- package/build/plugins/resource/bot/resources/messages.js +8 -0
- package/build/plugins/resource/bot/resources/messages.js.map +1 -1
- package/build/plugins/resource/bot/utils/common.d.ts +1 -0
- package/build/plugins/resource/bot/utils/common.d.ts.map +1 -1
- package/build/plugins/resource/bot/utils/common.js +5 -1
- package/build/plugins/resource/bot/utils/common.js.map +1 -1
- package/build/plugins/resource/bot/utils/zipDeploy.js +1 -1
- package/build/plugins/resource/bot/utils/zipDeploy.js.map +1 -1
- package/build/plugins/resource/bot/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/v3/index.js +2 -1
- package/build/plugins/resource/bot/v3/index.js.map +1 -1
- package/build/plugins/resource/frontend/constants.d.ts +4 -0
- package/build/plugins/resource/frontend/constants.d.ts.map +1 -1
- package/build/plugins/resource/frontend/constants.js +6 -2
- package/build/plugins/resource/frontend/constants.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.js +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/env.js +2 -2
- package/build/plugins/resource/frontend/env.js.map +1 -1
- package/build/plugins/resource/frontend/ops/deploy.d.ts +3 -5
- package/build/plugins/resource/frontend/ops/deploy.d.ts.map +1 -1
- package/build/plugins/resource/frontend/ops/deploy.js +41 -7
- package/build/plugins/resource/frontend/ops/deploy.js.map +1 -1
- package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/plugin.js +5 -6
- package/build/plugins/resource/frontend/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/resources/errors.d.ts +1 -1
- package/build/plugins/resource/frontend/resources/errors.d.ts.map +1 -1
- package/build/plugins/resource/frontend/resources/errors.js +4 -4
- package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
- package/build/plugins/resource/frontend/resources/templateInfo.js +1 -1
- package/build/plugins/resource/frontend/resources/templateInfo.js.map +1 -1
- package/build/plugins/resource/frontend/utils/progress-helper.d.ts +2 -2
- package/build/plugins/resource/frontend/utils/progress-helper.d.ts.map +1 -1
- package/build/plugins/resource/frontend/utils/progress-helper.js +4 -4
- package/build/plugins/resource/frontend/utils/progress-helper.js.map +1 -1
- package/build/plugins/resource/frontend/v3/index.d.ts.map +1 -1
- package/build/plugins/resource/frontend/v3/index.js +10 -13
- package/build/plugins/resource/frontend/v3/index.js.map +1 -1
- package/build/plugins/resource/spfx/depsChecker/yoChecker.d.ts.map +1 -1
- package/build/plugins/resource/spfx/depsChecker/yoChecker.js +6 -0
- package/build/plugins/resource/spfx/depsChecker/yoChecker.js.map +1 -1
- package/build/plugins/resource/spfx/index.d.ts.map +1 -1
- package/build/plugins/resource/spfx/index.js +0 -5
- package/build/plugins/resource/spfx/index.js.map +1 -1
- package/build/plugins/resource/spfx/plugin.d.ts.map +1 -1
- package/build/plugins/resource/spfx/plugin.js +59 -133
- package/build/plugins/resource/spfx/plugin.js.map +1 -1
- package/build/plugins/resource/spfx/utils/questions.d.ts.map +1 -1
- package/build/plugins/resource/spfx/utils/questions.js +5 -11
- package/build/plugins/resource/spfx/utils/questions.js.map +1 -1
- package/build/plugins/resource/sql/constants.d.ts +2 -4
- package/build/plugins/resource/sql/constants.d.ts.map +1 -1
- package/build/plugins/resource/sql/constants.js +2 -4
- package/build/plugins/resource/sql/constants.js.map +1 -1
- package/build/plugins/resource/sql/errors.d.ts.map +1 -1
- package/build/plugins/resource/sql/errors.js +29 -29
- package/build/plugins/resource/sql/errors.js.map +1 -1
- package/build/plugins/resource/sql/index.d.ts.map +1 -1
- package/build/plugins/resource/sql/index.js +1 -1
- package/build/plugins/resource/sql/index.js.map +1 -1
- package/build/plugins/resource/sql/plugin.d.ts.map +1 -1
- package/build/plugins/resource/sql/plugin.js +24 -11
- package/build/plugins/resource/sql/plugin.js.map +1 -1
- package/build/plugins/resource/sql/sqlClient.d.ts.map +1 -1
- package/build/plugins/resource/sql/sqlClient.js +7 -10
- package/build/plugins/resource/sql/sqlClient.js.map +1 -1
- package/build/plugins/resource/sql/utils/dialogUtils.d.ts +0 -1
- package/build/plugins/resource/sql/utils/dialogUtils.d.ts.map +1 -1
- package/build/plugins/resource/sql/utils/dialogUtils.js +0 -1
- package/build/plugins/resource/sql/utils/dialogUtils.js.map +1 -1
- package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/arm.js +15 -9
- package/build/plugins/solution/fx-solution/arm.js.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.js +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/constants.d.ts +19 -2
- package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/constants.js +22 -1
- package/build/plugins/solution/fx-solution/constants.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launch.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launch.js +1 -46
- package/build/plugins/solution/fx-solution/debug/util/launch.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchNext.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchNext.js +0 -26
- package/build/plugins/solution/fx-solution/debug/util/launchNext.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.js +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasksNext.js.map +1 -1
- package/build/plugins/solution/fx-solution/index.d.ts +1 -0
- package/build/plugins/solution/fx-solution/index.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/index.js +1 -0
- package/build/plugins/solution/fx-solution/index.js.map +1 -1
- package/build/plugins/solution/fx-solution/question.d.ts +8 -3
- package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/question.js +70 -29
- package/build/plugins/solution/fx-solution/question.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.js +31 -8
- package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts +2 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js +160 -95
- package/build/plugins/solution/fx-solution/v2/executeUserTask.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 +123 -65
- package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.js +22 -9
- package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.js +9 -1
- package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
- package/build/plugins/solution/fx-solution/v3/provision.d.ts +1 -0
- package/build/plugins/solution/fx-solution/v3/provision.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v3/provision.js +18 -1
- package/build/plugins/solution/fx-solution/v3/provision.js.map +1 -1
- package/package.json +5 -4
- package/resource/aad-manifest-change-logs.md +27 -0
- package/resource/package.nls.json +150 -72
- package/resource/unify-config-change-logs.md +26 -0
- package/templates/core/README.md +46 -0
- package/templates/fallback/blazor-base.csharp.default.zip +0 -0
- package/templates/fallback/bot.csharp.default.zip +0 -0
- package/templates/fallback/bot.js.command-and-response.zip +0 -0
- package/templates/fallback/bot.js.default.zip +0 -0
- package/templates/fallback/bot.js.m365.zip +0 -0
- package/templates/fallback/bot.js.notification-function-base.zip +0 -0
- package/templates/fallback/bot.js.notification-restify.zip +0 -0
- package/templates/fallback/bot.js.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.js.notification-trigger-timer.zip +0 -0
- package/templates/fallback/bot.ts.command-and-response.zip +0 -0
- package/templates/fallback/bot.ts.default.zip +0 -0
- package/templates/fallback/bot.ts.m365.zip +0 -0
- package/templates/fallback/bot.ts.notification-function-base.zip +0 -0
- package/templates/fallback/bot.ts.notification-restify.zip +0 -0
- package/templates/fallback/bot.ts.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.ts.notification-trigger-timer.zip +0 -0
- package/templates/fallback/bot.ts.notification.zip +0 -0
- package/templates/fallback/function-base.js.default.zip +0 -0
- package/templates/fallback/function-base.ts.default.zip +0 -0
- package/templates/fallback/function-triggers.js.HTTPTrigger.zip +0 -0
- package/templates/fallback/function-triggers.ts.HTTPTrigger.zip +0 -0
- package/templates/fallback/tab.csharp.default.zip +0 -0
- package/templates/fallback/tab.js.default.zip +0 -0
- package/templates/fallback/tab.js.m365.zip +0 -0
- package/templates/fallback/tab.js.non-sso.zip +0 -0
- package/templates/fallback/tab.ts.default.zip +0 -0
- package/templates/fallback/tab.ts.m365.zip +0 -0
- package/templates/fallback/tab.ts.non-sso.zip +0 -0
- package/templates/plugins/resource/aad/auth/bot/README.md +17 -0
- package/templates/plugins/resource/aad/auth/bot/js/public/auth-end.html +65 -0
- package/templates/plugins/resource/aad/auth/bot/js/public/auth-start.html +177 -0
- package/templates/plugins/resource/aad/auth/bot/js/sso/showUserInfo.js +23 -0
- package/templates/plugins/resource/aad/auth/bot/js/sso/ssoDialog.js +176 -0
- package/templates/plugins/resource/aad/auth/bot/js/sso/teamsSsoBot.js +57 -0
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +65 -0
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-start.html +177 -0
- package/templates/plugins/resource/aad/auth/bot/ts/sso/showUserInfo.ts +24 -0
- package/templates/plugins/resource/aad/auth/bot/ts/sso/ssoDialog.ts +182 -0
- package/templates/plugins/resource/aad/auth/bot/ts/sso/teamsSsoBot.ts +69 -0
- package/templates/plugins/resource/aad/auth/tab/README.md +15 -0
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-end.html +58 -0
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-start.html +57 -0
- package/templates/plugins/resource/aad/auth/tab/js/sso/GetUserProfile.jsx +34 -0
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-end.html +58 -0
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-start.html +57 -0
- package/templates/plugins/resource/aad/auth/tab/ts/sso/GetUserProfile.tsx +34 -0
- package/templates/plugins/resource/aad/manifest/aad.template.json +1 -14
- package/templates/plugins/resource/apiconnector/package.json +5 -0
- package/templates/plugins/resource/apiconnector/sample/footerComment.template +20 -0
- package/templates/plugins/resource/apiconnector/sample/headerComment.template +28 -0
- package/templates/plugins/resource/apiconnector/sample/js/aad.template +26 -0
- package/templates/plugins/resource/apiconnector/sample/js/apikey.template +19 -0
- package/templates/plugins/resource/apiconnector/sample/js/basic.template +14 -0
- package/templates/plugins/resource/apiconnector/sample/js/cert.template +15 -0
- package/templates/plugins/resource/apiconnector/sample/js/custom.template +39 -0
- package/templates/plugins/resource/apiconnector/sample/ts/aad.template +31 -0
- package/templates/plugins/resource/apiconnector/sample/ts/apikey.template +16 -0
- package/templates/plugins/resource/apiconnector/sample/ts/basic.template +14 -0
- package/templates/plugins/resource/apiconnector/sample/ts/cert.template +17 -0
- package/templates/plugins/resource/apiconnector/sample/ts/custom.template +42 -0
- package/templates/plugins/resource/bot/bicep/botProvision.template.bicep +9 -0
- package/templates/plugins/resource/bot/bicep/funcHostedBotProvision.template.bicep +2 -0
- package/templates/plugins/resource/function/bicep/functionProvision.template.bicep +2 -0
- package/templates/plugins/resource/simpleauth/bicep/simpleAuthProvision.template.bicep +4 -0
- package/templates/plugins/resource/spfx/solution/README.md +3 -3
- package/templates/plugins/resource/webapp/bicep/webappProvision.template.bicep +2 -0
- package/templates/plugins/solution/v1/README.md +1 -1
- package/templates/core/README-auto-generated.md +0 -31
- package/templates/fallback/bot-msgext.csharp.default.zip +0 -0
- package/templates/fallback/bot-msgext.js.default.zip +0 -0
- package/templates/fallback/bot-msgext.ts.default.zip +0 -0
- package/templates/fallback/msgext.js.default.zip +0 -0
- package/templates/fallback/msgext.ts.default.zip +0 -0
- package/templates/plugins/resource/apiconnector/sample/js/api-connector.template +0 -30
- package/templates/plugins/resource/apiconnector/sample/ts/api-connector.template +0 -30
- package/templates/plugins/resource/spfx/solution/_gitignore +0 -33
- package/templates/plugins/resource/spfx/solution/config/config.json +0 -19
- package/templates/plugins/resource/spfx/solution/config/copy-assets.json +0 -4
- package/templates/plugins/resource/spfx/solution/config/deploy-azure-storage.json +0 -7
- package/templates/plugins/resource/spfx/solution/config/package-solution.json +0 -21
- package/templates/plugins/resource/spfx/solution/config/serve.json +0 -10
- package/templates/plugins/resource/spfx/solution/config/write-manifests.json +0 -4
- package/templates/plugins/resource/spfx/solution/gulpfile.js +0 -16
- package/templates/plugins/resource/spfx/solution/manifest.json +0 -62
- package/templates/plugins/resource/spfx/solution/src/index.ts +0 -1
- package/templates/plugins/resource/spfx/solution/tsconfig.json +0 -35
- package/templates/plugins/resource/spfx/solution/tslint.json +0 -30
- package/templates/plugins/resource/spfx/webpart/base/images/color.png +0 -0
- package/templates/plugins/resource/spfx/webpart/base/images/outline.png +0 -0
- package/templates/plugins/resource/spfx/webpart/base/loc/en-us.js +0 -7
- package/templates/plugins/resource/spfx/webpart/base/loc/mystrings.d.ts +0 -10
- package/templates/plugins/resource/spfx/webpart/base/{componentClassName}.manifest.json +0 -27
- package/templates/plugins/resource/spfx/webpart/none/package.json +0 -28
- package/templates/plugins/resource/spfx/webpart/none/{componentClassName}.module.scss +0 -74
- package/templates/plugins/resource/spfx/webpart/none/{componentClassName}.ts +0 -61
- package/templates/plugins/resource/spfx/webpart/react/components/I{componentName}Props.ts +0 -3
- package/templates/plugins/resource/spfx/webpart/react/components/{componentName}.module.scss +0 -74
- package/templates/plugins/resource/spfx/webpart/react/components/{componentName}.tsx +0 -25
- package/templates/plugins/resource/spfx/webpart/react/package.json +0 -33
- package/templates/plugins/resource/spfx/webpart/react/{componentClassName}.ts +0 -60
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Button } from "@fluentui/react-northstar";
|
|
2
|
+
import { useGraph, useTeamsFx } from "@microsoft/teamsfx-react";
|
|
3
|
+
|
|
4
|
+
export function GetUserProfile() {
|
|
5
|
+
const { teamsfx } = useTeamsFx();
|
|
6
|
+
const { loading, error, data, reload } = useGraph(
|
|
7
|
+
async (graph, teamsfx, scope) => {
|
|
8
|
+
// Call graph api directly to get user profile information
|
|
9
|
+
const profile = await graph.api("/me").get();
|
|
10
|
+
|
|
11
|
+
let photoUrl = "";
|
|
12
|
+
try {
|
|
13
|
+
const photo = await graph.api("/me/photo/$value").get();
|
|
14
|
+
photoUrl = URL.createObjectURL(photo);
|
|
15
|
+
} catch {
|
|
16
|
+
// Could not fetch photo from user's profile, return empty string as placeholder.
|
|
17
|
+
}
|
|
18
|
+
return { profile, photoUrl };
|
|
19
|
+
},
|
|
20
|
+
{ scope: ["User.Read"], teamsfx: teamsfx }
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div>
|
|
25
|
+
<h2>GetUserProfile</h2>
|
|
26
|
+
<p>Click below to authorize button to grant permission to using Microsoft Graph.</p>
|
|
27
|
+
<Button primary content="Authorize" disabled={loading} onClick={reload} />
|
|
28
|
+
{!loading && error && (
|
|
29
|
+
<div className="error">Failed to read your profile. Please try again later.</div>
|
|
30
|
+
)}
|
|
31
|
+
{!loading && data && <div>Hello {data.profile.displayName}</div>}
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<!--This file is added by us when enable SSO. Developers can use it directly, or reference this sample to create their own auth end page.-->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<!--This file is used during the Teams authentication flow to assist with retrieval of the access token.-->
|
|
5
|
+
<!--If you're not familiar with this, do not alter or remove this file from your project.-->
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>Login End Page</title>
|
|
9
|
+
<meta charset="utf-8" />
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<script
|
|
14
|
+
src="https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js"
|
|
15
|
+
integrity="sha384-mhp2E+BLMiZLe7rDIzj19WjgXJeI32NkPvrvvZBrMi5IvWup/1NUfS5xuYN5S3VT"
|
|
16
|
+
crossorigin="anonymous"
|
|
17
|
+
></script>
|
|
18
|
+
<script
|
|
19
|
+
type="text/javascript"
|
|
20
|
+
src="https://alcdn.msauth.net/browser/2.21.0/js/msal-browser.min.js"
|
|
21
|
+
integrity="sha384-s/NxjjAgw1QgpDhOlVjTceLl4axrp5nqpUbCPOEQy1PqbFit9On6uw2XmEF1eq0s"
|
|
22
|
+
crossorigin="anonymous">
|
|
23
|
+
</script>
|
|
24
|
+
<script type="text/javascript">
|
|
25
|
+
var currentURL = new URL(window.location);
|
|
26
|
+
var clientId = currentURL.searchParams.get("clientId");
|
|
27
|
+
|
|
28
|
+
microsoftTeams.initialize();
|
|
29
|
+
microsoftTeams.getContext(async function (context) {
|
|
30
|
+
const msalConfig = {
|
|
31
|
+
auth: {
|
|
32
|
+
clientId: clientId,
|
|
33
|
+
authority: `https://login.microsoftonline.com/${context.tid}`,
|
|
34
|
+
navigateToLoginRequestUrl: false
|
|
35
|
+
},
|
|
36
|
+
cache: {
|
|
37
|
+
cacheLocation: "sessionStorage",
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const msalInstance = new window.msal.PublicClientApplication(msalConfig);
|
|
42
|
+
msalInstance.handleRedirectPromise()
|
|
43
|
+
.then((tokenResponse) => {
|
|
44
|
+
if (tokenResponse !== null) {
|
|
45
|
+
microsoftTeams.authentication.notifySuccess(JSON.stringify({
|
|
46
|
+
sessionStorage: sessionStorage
|
|
47
|
+
}));
|
|
48
|
+
} else {
|
|
49
|
+
microsoftTeams.authentication.notifyFailure("Get empty response.");
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
.catch((error) => {
|
|
53
|
+
microsoftTeams.authentication.notifyFailure(error);
|
|
54
|
+
});
|
|
55
|
+
})
|
|
56
|
+
</script>
|
|
57
|
+
</body>
|
|
58
|
+
</html>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!--This file is added by us when enable SSO. Developers can use it directly, or reference this sample to create their own auth end page.-->
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<!--This file is used during the Teams authentication flow to assist with retrieval of the access token.-->
|
|
5
|
+
<!--If you're not familiar with this, do not alter or remove this file from your project.-->
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>Login Start Page</title>
|
|
9
|
+
<meta charset="utf-8" />
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<script
|
|
14
|
+
src="https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js"
|
|
15
|
+
integrity="sha384-mhp2E+BLMiZLe7rDIzj19WjgXJeI32NkPvrvvZBrMi5IvWup/1NUfS5xuYN5S3VT"
|
|
16
|
+
crossorigin="anonymous"
|
|
17
|
+
></script>
|
|
18
|
+
<script
|
|
19
|
+
type="text/javascript"
|
|
20
|
+
src="https://alcdn.msauth.net/browser/2.21.0/js/msal-browser.min.js"
|
|
21
|
+
integrity="sha384-s/NxjjAgw1QgpDhOlVjTceLl4axrp5nqpUbCPOEQy1PqbFit9On6uw2XmEF1eq0s"
|
|
22
|
+
crossorigin="anonymous">
|
|
23
|
+
</script>
|
|
24
|
+
<script type="text/javascript">
|
|
25
|
+
microsoftTeams.initialize();
|
|
26
|
+
|
|
27
|
+
// Get the tab context, and use the information to navigate to Azure AD login page
|
|
28
|
+
microsoftTeams.getContext(async function (context) {
|
|
29
|
+
// Generate random state string and store it, so we can verify it in the callback
|
|
30
|
+
var currentURL = new URL(window.location);
|
|
31
|
+
var clientId = currentURL.searchParams.get("clientId");
|
|
32
|
+
var scope = currentURL.searchParams.get("scope");
|
|
33
|
+
var loginHint = currentURL.searchParams.get("loginHint");
|
|
34
|
+
|
|
35
|
+
const msalConfig = {
|
|
36
|
+
auth: {
|
|
37
|
+
clientId: clientId,
|
|
38
|
+
authority: `https://login.microsoftonline.com/${context.tid}`,
|
|
39
|
+
navigateToLoginRequestUrl: false
|
|
40
|
+
},
|
|
41
|
+
cache: {
|
|
42
|
+
cacheLocation: "sessionStorage",
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const msalInstance = new msal.PublicClientApplication(msalConfig);
|
|
47
|
+
const scopesArray = scope.split(" ");
|
|
48
|
+
const scopesRequest = {
|
|
49
|
+
scopes: scopesArray,
|
|
50
|
+
redirectUri: window.location.origin + `/auth-end.html?clientId=${clientId}`,
|
|
51
|
+
loginHint: loginHint
|
|
52
|
+
};
|
|
53
|
+
await msalInstance.loginRedirect(scopesRequest);
|
|
54
|
+
});
|
|
55
|
+
</script>
|
|
56
|
+
</body>
|
|
57
|
+
</html>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Button } from "@fluentui/react-northstar";
|
|
2
|
+
import { useGraph, useTeamsFx } from "@microsoft/teamsfx-react";
|
|
3
|
+
|
|
4
|
+
export function GetUserProfile() {
|
|
5
|
+
const { teamsfx } = useTeamsFx();
|
|
6
|
+
const { loading, error, data, reload } = useGraph(
|
|
7
|
+
async (graph, teamsfx, scope) => {
|
|
8
|
+
// Call graph api directly to get user profile information
|
|
9
|
+
const profile = await graph.api("/me").get();
|
|
10
|
+
|
|
11
|
+
let photoUrl = "";
|
|
12
|
+
try {
|
|
13
|
+
const photo = await graph.api("/me/photo/$value").get();
|
|
14
|
+
photoUrl = URL.createObjectURL(photo);
|
|
15
|
+
} catch {
|
|
16
|
+
// Could not fetch photo from user's profile, return empty string as placeholder.
|
|
17
|
+
}
|
|
18
|
+
return { profile, photoUrl };
|
|
19
|
+
},
|
|
20
|
+
{ scope: ["User.Read"], teamsfx: teamsfx }
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div>
|
|
25
|
+
<h2>GetUserProfile</h2>
|
|
26
|
+
<p>Click below to authorize button to grant permission to using Microsoft Graph.</p>
|
|
27
|
+
<Button primary content="Authorize" disabled={loading} onClick={reload} />
|
|
28
|
+
{!loading && error && (
|
|
29
|
+
<div className="error">Failed to read your profile. Please try again later.</div>
|
|
30
|
+
)}
|
|
31
|
+
{!loading && data && <div>Hello {data.profile.displayName}</div>}
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -92,18 +92,5 @@
|
|
|
92
92
|
"identifierUris": [
|
|
93
93
|
"{{state.fx-resource-aad-app-for-teams.applicationIdUris}}"
|
|
94
94
|
],
|
|
95
|
-
"replyUrlsWithType": [
|
|
96
|
-
{
|
|
97
|
-
"url": "{{state.fx-resource-frontend-hosting.endpoint}}/auth-end.html",
|
|
98
|
-
"type": "Web"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"url": "{{state.fx-resource-frontend-hosting.endpoint}}/auth-end.html?clientId={{state.fx-resource-aad-app-for-teams.clientId}}",
|
|
102
|
-
"type": "Spa"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"url": "{{state.fx-resource-frontend-hosting.endpoint}}/blank-auth-end.html",
|
|
106
|
-
"type": "Spa"
|
|
107
|
-
}
|
|
108
|
-
]
|
|
95
|
+
"replyUrlsWithType": []
|
|
109
96
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Setting API configuration for cloud environment:
|
|
3
|
+
We have already set the configuration to .env.teamsfx.local based on your answers.
|
|
4
|
+
Before you deploy your code to cloud using TeamsFx, please follow https://aka.ms/teamsfx-add-appsettings to add following app settings with appropriate value to your Azure environment:
|
|
5
|
+
TEAMSFX_API_{{capitalName}}_ENDPOINT
|
|
6
|
+
{{#if (equals config.AuthConfig.AuthType "basic")}}
|
|
7
|
+
TEAMSFX_API_{{capitalName}}_USERNAME
|
|
8
|
+
TEAMSFX_API_{{capitalName}}_PASSWORD
|
|
9
|
+
{{else if (equals config.AuthConfig.AuthType "aad")}}
|
|
10
|
+
{{#if (equals config.AuthConfig.ReuseTeamsApp false)}}
|
|
11
|
+
TEAMSFX_API_{{capitalName}}_TENANT_ID
|
|
12
|
+
TEAMSFX_API_{{capitalName}}_CLIENT_ID
|
|
13
|
+
TEAMSFX_API_{{capitalName}}_CLIENT_SECRET
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{else if (equals config.AuthConfig.AuthType "apikey")}}
|
|
16
|
+
TEAMSFX_API_{{capitalName}}_API_KEY
|
|
17
|
+
{{/if}}
|
|
18
|
+
|
|
19
|
+
You can refer https://aka.ms/teamsfx-connect-api to learn more.
|
|
20
|
+
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Your next steps:
|
|
3
|
+
1. Run npm install. If your project did not install @microsoft/teamsfx package before, we have added it to package.json for you.
|
|
4
|
+
You need to run the command under "{{component}}" folder instead of project's root folder.
|
|
5
|
+
{{#if (equals config.AuthConfig.AuthType "basic")}}
|
|
6
|
+
2. Add your user password to TEAMSFX_API_{{capitalName}}_PASSWORD in "{{component}}/.env.teamsfx.local".
|
|
7
|
+
{{else if (equals config.AuthConfig.AuthType "aad")}}
|
|
8
|
+
{{#if (equals config.AuthConfig.ReuseTeamsApp false)}}
|
|
9
|
+
2. Replace "<your-api-scope>" in this file with actual scope required by the API.
|
|
10
|
+
3. Add your client secret to TEAMSFX_API_{{capitalName}}_CLIENT_SECRET in "{{component}}/.env.teamsfx.local".
|
|
11
|
+
{{else}}
|
|
12
|
+
2. Replace "<your-api-scope>" in this file with actual scope required by the API.
|
|
13
|
+
3. Refer https://aka.ms/teamsfx-connect-api-with-aad for configuring AAD app and consent scopes.
|
|
14
|
+
{{/if}}
|
|
15
|
+
{{else if (equals config.AuthConfig.AuthType "apikey")}}
|
|
16
|
+
2. Add your API Key to TEAMSFX_API_{{capitalName}}_API_KEY in "{{component}}/.env.teamsfx.local".
|
|
17
|
+
{{else if (equals config.AuthConfig.AuthType "cert")}}
|
|
18
|
+
2. Add code to read your cert content and replace "<your-cert>" and "<your-private-key>" with actual value.
|
|
19
|
+
{{else if (equals config.AuthConfig.AuthType "custom")}}
|
|
20
|
+
2. Refer sample code and comments in this file to implement your auth provider.
|
|
21
|
+
{{/if}}
|
|
22
|
+
|
|
23
|
+
You can now import the API client (an Axios instance) in another file and call {{config.APIName}} APIs without worrying about authentication.
|
|
24
|
+
Here is an example for a GET request to "relative_path_of_target_api":
|
|
25
|
+
const result = await {{config.APIName}}Client.get("relative_path_of_target_api");
|
|
26
|
+
|
|
27
|
+
You can refer https://aka.ms/teamsfx-connect-api to learn more.
|
|
28
|
+
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const teamsfxSdk = require("@microsoft/teamsfx");
|
|
2
|
+
|
|
3
|
+
// Loads current app's configuration, the sample uses client credential flow to acquire token for your API.
|
|
4
|
+
{{#if (equals config.AuthConfig.ReuseTeamsApp true)}}
|
|
5
|
+
const teamsFx = new teamsfxSdk.TeamsFx(teamsfxSdk.IdentityType.App);
|
|
6
|
+
{{else}}
|
|
7
|
+
const teamsFx = new teamsfxSdk.TeamsFx(teamsfxSdk.IdentityType.App, {
|
|
8
|
+
// You can replace the default authorityHost url with actual value per your requirement.
|
|
9
|
+
authorityHost: "https://login.microsoftonline.com",
|
|
10
|
+
tenantId: process.env.TEAMSFX_API_{{capitalName}}_TENANT_ID,
|
|
11
|
+
clientId: process.env.TEAMSFX_API_{{capitalName}}_CLIENT_ID,
|
|
12
|
+
// Please add your client secret to .env.teamsfx.local before local debugging.
|
|
13
|
+
clientSecret: process.env.TEAMSFX_API_{{capitalName}}_CLIENT_SECRET,
|
|
14
|
+
});
|
|
15
|
+
{{/if}}
|
|
16
|
+
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
17
|
+
const appCredential = teamsFx.getCredential();
|
|
18
|
+
const authProvider = new teamsfxSdk.BearerTokenAuthProvider(
|
|
19
|
+
// Please replace '<your-api-scope>' with actual api scope value.
|
|
20
|
+
async () => (await appCredential.getToken("<your-api-scope>")).token
|
|
21
|
+
);
|
|
22
|
+
const {{config.APIName}}Client = teamsfxSdk.createApiClient(
|
|
23
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
|
|
24
|
+
authProvider
|
|
25
|
+
);
|
|
26
|
+
module.exports.{{config.APIName}}Client = {{config.APIName}}Client;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const teamsfxSdk = require("@microsoft/teamsfx");
|
|
2
|
+
|
|
3
|
+
// Loads current app's configuration.
|
|
4
|
+
const teamsFx = new teamsfxSdk.TeamsFx();
|
|
5
|
+
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
6
|
+
const authProvider = new teamsfxSdk.ApiKeyProvider(
|
|
7
|
+
"{{config.AuthConfig.Name}}",
|
|
8
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_API_KEY"),
|
|
9
|
+
{{#if (equals config.AuthConfig.Location "request header")}}
|
|
10
|
+
teamsfxSdk.ApiKeyLocation.Header
|
|
11
|
+
{{else}}
|
|
12
|
+
teamsfxSdk.ApiKeyLocation.QueryParams
|
|
13
|
+
{{/if}}
|
|
14
|
+
);
|
|
15
|
+
const {{config.APIName}}Client = teamsfxSdk.createApiClient(
|
|
16
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
|
|
17
|
+
authProvider
|
|
18
|
+
);
|
|
19
|
+
module.exports.{{config.APIName}}Client = {{config.APIName}}Client;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const teamsfxSdk = require("@microsoft/teamsfx");
|
|
2
|
+
|
|
3
|
+
// Loads current app's configuration.
|
|
4
|
+
const teamsFx = new teamsfxSdk.TeamsFx();
|
|
5
|
+
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
6
|
+
const authProvider = new teamsfxSdk.BasicAuthProvider(
|
|
7
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_USERNAME"),
|
|
8
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_PASSWORD")
|
|
9
|
+
);
|
|
10
|
+
const {{config.APIName}}Client = teamsfxSdk.createApiClient(
|
|
11
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
|
|
12
|
+
authProvider
|
|
13
|
+
);
|
|
14
|
+
module.exports.{{config.APIName}}Client = {{config.APIName}}Client;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const teamsfxSdk = require("@microsoft/teamsfx");
|
|
2
|
+
|
|
3
|
+
// Loads current app's configuration.
|
|
4
|
+
const teamsFx = new teamsfxSdk.TeamsFx();
|
|
5
|
+
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
6
|
+
const authProvider = new teamsfxSdk.CertificateAuthProvider(
|
|
7
|
+
// Please add code to read your cert and private key, replace "<your-cert>" and "<your-private-key>" with actual value.
|
|
8
|
+
// If you have a .pfx cert, you can use "createPfxCertOption" function to initialize your cert option.
|
|
9
|
+
teamsfxSdk.createPemCertOption("<your-cert>", "<your-private-key>")
|
|
10
|
+
);
|
|
11
|
+
const {{config.APIName}}Client = teamsfxSdk.createApiClient(
|
|
12
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
|
|
13
|
+
authProvider
|
|
14
|
+
);
|
|
15
|
+
module.exports.{{config.APIName}}Client = {{config.APIName}}Client;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const teamsfxSdk = require("@microsoft/teamsfx");
|
|
2
|
+
|
|
3
|
+
// The custom authProvider should implement the AuthProvider interface.
|
|
4
|
+
// Here is a sample authProvider class. It will set custom property in the request header
|
|
5
|
+
class CustomAuthProvider {
|
|
6
|
+
customProperty;
|
|
7
|
+
customValue;
|
|
8
|
+
|
|
9
|
+
constructor(customProperty, customValue) {
|
|
10
|
+
this.customProperty = customProperty;
|
|
11
|
+
this.customValue = customValue;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Replace the sample code with your own logic.
|
|
15
|
+
AddAuthenticationInfo = async (config) => {
|
|
16
|
+
if (!config.headers) {
|
|
17
|
+
config.headers = {};
|
|
18
|
+
}
|
|
19
|
+
config.headers[this.customProperty] = this.customValue;
|
|
20
|
+
return config;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Loads current app's configuration.
|
|
25
|
+
const teamsFx = new teamsfxSdk.TeamsFx();
|
|
26
|
+
|
|
27
|
+
const authProvider = new CustomAuthProvider(
|
|
28
|
+
// You can also add customized settings to .env.teamsfx.local and use TeamsFx.getConfig("{setting_name}") to read the settings. For example:
|
|
29
|
+
// teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_CUSTOM_PROPERTY"),
|
|
30
|
+
// teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_CUSTOM_VALUE")
|
|
31
|
+
"customPropery",
|
|
32
|
+
"customValue"
|
|
33
|
+
);
|
|
34
|
+
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
35
|
+
const {{config.APIName}}Client = teamsfxSdk.createApiClient(
|
|
36
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
|
|
37
|
+
authProvider
|
|
38
|
+
);
|
|
39
|
+
module.exports.{{config.APIName}}Client = {{config.APIName}}Client;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TeamsFx,
|
|
3
|
+
createApiClient,
|
|
4
|
+
BearerTokenAuthProvider,
|
|
5
|
+
IdentityType,
|
|
6
|
+
} from "@microsoft/teamsfx";
|
|
7
|
+
|
|
8
|
+
// Loads current app's configuration, the sample uses client credential flow to acquire token for your API.
|
|
9
|
+
{{#if (equals config.AuthConfig.ReuseTeamsApp true)}}
|
|
10
|
+
const teamsFx = new TeamsFx(IdentityType.App);
|
|
11
|
+
{{else}}
|
|
12
|
+
const teamsFx = new TeamsFx(IdentityType.App, {
|
|
13
|
+
// You can replace the default authorityHost url with actual value per your requirement.
|
|
14
|
+
authorityHost: "https://login.microsoftonline.com",
|
|
15
|
+
tenantId: process.env.TEAMSFX_API_{{capitalName}}_TENANT_ID!,
|
|
16
|
+
clientId: process.env.TEAMSFX_API_{{capitalName}}_CLIENT_ID!,
|
|
17
|
+
// Please add your client secret to .env.teamsfx.local before local debugging.
|
|
18
|
+
clientSecret: process.env.TEAMSFX_API_{{capitalName}}_CLIENT_SECRET!,
|
|
19
|
+
});
|
|
20
|
+
{{/if}}
|
|
21
|
+
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
22
|
+
const appCredential = teamsFx.getCredential();
|
|
23
|
+
const authProvider = new BearerTokenAuthProvider(
|
|
24
|
+
// Please replace '<your-api-scope>' with actual api scope value.
|
|
25
|
+
async () => (await appCredential.getToken("<your-api-scope>"))!.token
|
|
26
|
+
);
|
|
27
|
+
const {{config.APIName}}Client = createApiClient(
|
|
28
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
|
|
29
|
+
authProvider
|
|
30
|
+
);
|
|
31
|
+
export { {{config.APIName}}Client };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TeamsFx, createApiClient, ApiKeyProvider, ApiKeyLocation } from "@microsoft/teamsfx";
|
|
2
|
+
|
|
3
|
+
// Loads current app's configuration.
|
|
4
|
+
const teamsFx = new TeamsFx();
|
|
5
|
+
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
6
|
+
const authProvider = new ApiKeyProvider(
|
|
7
|
+
"{{config.AuthConfig.Name}}",
|
|
8
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_API_KEY"),
|
|
9
|
+
{{#if (equals config.AuthConfig.Location "request header")}}
|
|
10
|
+
ApiKeyLocation.Header
|
|
11
|
+
{{else}}
|
|
12
|
+
ApiKeyLocation.QueryParams
|
|
13
|
+
{{/if}}
|
|
14
|
+
);
|
|
15
|
+
const {{config.APIName}}Client = createApiClient(teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"), authProvider);
|
|
16
|
+
export { {{config.APIName}}Client };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TeamsFx, createApiClient, BasicAuthProvider } from "@microsoft/teamsfx";
|
|
2
|
+
|
|
3
|
+
// Loads current app's configuration.
|
|
4
|
+
const teamsFx = new TeamsFx();
|
|
5
|
+
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
6
|
+
const authProvider = new BasicAuthProvider(
|
|
7
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_USERNAME"),
|
|
8
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_PASSWORD")
|
|
9
|
+
);
|
|
10
|
+
const {{config.APIName}}Client = createApiClient(
|
|
11
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
|
|
12
|
+
authProvider
|
|
13
|
+
);
|
|
14
|
+
export { {{config.APIName}}Client };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TeamsFx,
|
|
3
|
+
createApiClient,
|
|
4
|
+
CertificateAuthProvider,
|
|
5
|
+
createPemCertOption,
|
|
6
|
+
} from "@microsoft/teamsfx";
|
|
7
|
+
|
|
8
|
+
// Loads current app's configuration.
|
|
9
|
+
const teamsFx = new TeamsFx();
|
|
10
|
+
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
11
|
+
const authProvider = new CertificateAuthProvider(
|
|
12
|
+
// Please add code to read your cert and private key, replace "<your-cert>" and "<your-private-key>" with actual value.
|
|
13
|
+
// If you have a .pfx cert, you can use "createPfxCertOption" function to initialize your cert option.
|
|
14
|
+
createPemCertOption("<your-cert>", "<your-private-key>")
|
|
15
|
+
);
|
|
16
|
+
const {{config.APIName}}Client = createApiClient(teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"), authProvider);
|
|
17
|
+
export { {{config.APIName}}Client };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { TeamsFx, createApiClient, AuthProvider } from "@microsoft/teamsfx";
|
|
2
|
+
import { AxiosRequestConfig } from "axios";
|
|
3
|
+
|
|
4
|
+
// The custom authProvider should implement the AuthProvider interface.
|
|
5
|
+
// Here is a sample authProvider class. It will set custom property in the request header
|
|
6
|
+
class CustomAuthProvider implements AuthProvider {
|
|
7
|
+
customProperty: string;
|
|
8
|
+
customValue: string;
|
|
9
|
+
|
|
10
|
+
constructor(customProperty: string, customValue: string) {
|
|
11
|
+
this.customProperty = customProperty;
|
|
12
|
+
this.customValue = customValue;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Replace the sample code with your own logic.
|
|
16
|
+
AddAuthenticationInfo: (config: AxiosRequestConfig) => Promise<AxiosRequestConfig> = async (
|
|
17
|
+
config
|
|
18
|
+
) => {
|
|
19
|
+
if (!config.headers) {
|
|
20
|
+
config.headers = {};
|
|
21
|
+
}
|
|
22
|
+
config.headers[this.customProperty] = this.customValue;
|
|
23
|
+
return config;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Loads current app's configuration.
|
|
28
|
+
const teamsFx = new TeamsFx();
|
|
29
|
+
|
|
30
|
+
const authProvider = new CustomAuthProvider(
|
|
31
|
+
// You can also add customized settings to .env.teamsfx.local and use TeamsFx.getConfig("{setting_name}") to read the settings. For example:
|
|
32
|
+
// teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_CUSTOM_PROPERTY"),
|
|
33
|
+
// teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_CUSTOM_VALUE")
|
|
34
|
+
"customPropery",
|
|
35
|
+
"customValue"
|
|
36
|
+
);
|
|
37
|
+
// Initializes a new axios instance to call {{config.APIName}} API.
|
|
38
|
+
const {{config.APIName}}Client = createApiClient(
|
|
39
|
+
teamsFx.getConfig("TEAMSFX_API_{{capitalName}}_ENDPOINT"),
|
|
40
|
+
authProvider
|
|
41
|
+
);
|
|
42
|
+
export { {{config.APIName}}Client };
|
|
@@ -8,7 +8,11 @@ var botServiceName = contains(provisionParameters, 'botServiceName') ? provision
|
|
|
8
8
|
var botServiceSku = contains(provisionParameters, 'botServiceSku') ? provisionParameters['botServiceSku'] : 'F0' // Try to read SKU for Azure Bot Service from parameters
|
|
9
9
|
var botDisplayName = contains(provisionParameters, 'botDisplayName') ? provisionParameters['botDisplayName'] : '${resourceBaseName}' // Try to read display name for Azure Bot Service from parameters
|
|
10
10
|
var serverfarmsName = contains(provisionParameters, 'botServerfarmsName') ? provisionParameters['botServerfarmsName'] : '${resourceBaseName}bot' // Try to read name for App Service Plan from parameters
|
|
11
|
+
{{#if enableAlwaysOn}}
|
|
12
|
+
var webAppSKU = contains(provisionParameters, 'botWebAppSKU') ? provisionParameters['botWebAppSKU'] : 'B1' // Try to read SKU for Azure Web App from parameters
|
|
13
|
+
{{else}}
|
|
11
14
|
var webAppSKU = contains(provisionParameters, 'botWebAppSKU') ? provisionParameters['botWebAppSKU'] : 'F1' // Try to read SKU for Azure Web App from parameters
|
|
15
|
+
{{/if}}
|
|
12
16
|
var webAppName = contains(provisionParameters, 'botSitesName') ? provisionParameters['botSitesName'] : '${resourceBaseName}bot' // Try to read name for Azure Web App from parameters
|
|
13
17
|
|
|
14
18
|
// Register your web service as a bot with the Bot Framework
|
|
@@ -54,7 +58,11 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
54
58
|
properties: {
|
|
55
59
|
serverFarmId: serverfarm.id
|
|
56
60
|
keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
|
|
61
|
+
httpsOnly: true
|
|
57
62
|
siteConfig: {
|
|
63
|
+
{{#if enableAlwaysOn}}
|
|
64
|
+
alwaysOn: true
|
|
65
|
+
{{/if}}
|
|
58
66
|
appSettings: [
|
|
59
67
|
{
|
|
60
68
|
name: 'SCM_DO_BUILD_DURING_DEPLOYMENT'
|
|
@@ -69,6 +77,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
69
77
|
value: '1'
|
|
70
78
|
}
|
|
71
79
|
]
|
|
80
|
+
ftpsState: 'FtpsOnly'
|
|
72
81
|
}
|
|
73
82
|
}
|
|
74
83
|
identity: {
|
|
@@ -56,6 +56,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
56
56
|
properties: {
|
|
57
57
|
serverFarmId: serverfarm.id
|
|
58
58
|
keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
|
|
59
|
+
httpsOnly: true
|
|
59
60
|
siteConfig: {
|
|
60
61
|
alwaysOn: true
|
|
61
62
|
appSettings: [
|
|
@@ -96,6 +97,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
96
97
|
value: '1' // Zipdeploy files will always be updated. Detail: https://aka.ms/teamsfx-zipdeploy-donot-preserve-filetime
|
|
97
98
|
}
|
|
98
99
|
]
|
|
100
|
+
ftpsState: 'FtpsOnly'
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
identity: {
|
|
@@ -27,6 +27,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
27
27
|
properties: {
|
|
28
28
|
serverFarmId: serverfarms.id
|
|
29
29
|
keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
|
|
30
|
+
httpsOnly: true
|
|
30
31
|
siteConfig: {
|
|
31
32
|
appSettings: [
|
|
32
33
|
{
|
|
@@ -58,6 +59,7 @@ resource functionApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
58
59
|
value: '~14' // Set NodeJS version to 14.x
|
|
59
60
|
}
|
|
60
61
|
]
|
|
62
|
+
ftpsState: 'FtpsOnly'
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
identity: {
|
|
@@ -25,6 +25,10 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
25
25
|
properties: {
|
|
26
26
|
serverFarmId: serverFarms.id
|
|
27
27
|
keyVaultReferenceIdentity: userAssignedIdentityId // Use given user assigned identity to access Key Vault
|
|
28
|
+
httpsOnly: true
|
|
29
|
+
siteConfig:{
|
|
30
|
+
ftpsState: 'FtpsOnly'
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
33
|
identity: {
|
|
30
34
|
type: 'UserAssigned'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# SPFx(SharePoint Framework)
|
|
1
|
+
# SPFx (SharePoint Framework) App
|
|
2
2
|
|
|
3
3
|
## Summary
|
|
4
4
|
|
|
@@ -39,7 +39,7 @@ Version|Date|Comments
|
|
|
39
39
|
|
|
40
40
|
## Minimal Path to Awesome
|
|
41
41
|
|
|
42
|
-
1.
|
|
42
|
+
1. Install the latest version of [Node.js LTS 14.x](https://nodejs.org/en/download/releases/) (Note: SPFx v1.14.0 support Node.js v12/14).
|
|
43
43
|
2. You can either download [Visual Studio Code](https://code.visualstudio.com) and install [Teams Toolkit Visual Studio Code Extension](https://aka.ms/teams-toolkit) or download TeamsFx CLI.
|
|
44
44
|
3. Open the project with VSCode, click `Provision in the cloud` in DEPLOYMENT panel of Teams Toolkit extension.
|
|
45
45
|
|
|
@@ -49,7 +49,7 @@ Version|Date|Comments
|
|
|
49
49
|
It will provision an app in Teams App Studio. You may need to login with your M365 tenant admin account.
|
|
50
50
|
|
|
51
51
|
4. Build and Deploy your SharePoint Package.
|
|
52
|
-
- Click `Deploy to the cloud` in DEPLOYMENT panel of Teams Toolkit extension, or run `Teams: Deploy to the cloud` from command palette. This will generate a SharePoint package(*.sppkg) under sharepoint/solution folder.
|
|
52
|
+
- Click `Deploy to the cloud` in DEPLOYMENT panel of Teams Toolkit extension, or run `Teams: Deploy to the cloud` from command palette. This will generate a SharePoint package (*.sppkg) under sharepoint/solution folder.
|
|
53
53
|
|
|
54
54
|
Or you can use TeamsFx CLI with running this cmd under your project path:
|
|
55
55
|
`teamsfx deploy`
|
|
@@ -23,6 +23,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
23
23
|
properties: {
|
|
24
24
|
serverFarmId: serverFarms.id
|
|
25
25
|
keyVaultReferenceIdentity: userAssignedIdentityId
|
|
26
|
+
httpsOnly: true
|
|
26
27
|
siteConfig: {
|
|
27
28
|
appSettings: [
|
|
28
29
|
{
|
|
@@ -30,6 +31,7 @@ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
|
|
|
30
31
|
value: '1'
|
|
31
32
|
}
|
|
32
33
|
]
|
|
34
|
+
ftpsState: 'FtpsOnly'
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
identity: {
|
|
@@ -16,7 +16,7 @@ There are some configuration changed in your project to make it compatible with
|
|
|
16
16
|
|
|
17
17
|
## Edit the manifest
|
|
18
18
|
|
|
19
|
-
You can find the Teams app manifest template in `./templates/appPackage/manifest.
|
|
19
|
+
You can find the Teams app manifest template in `./templates/appPackage/manifest.template.json`. It contains template arguments with `{...}` statements which will be replaced at build time. You may add any extra properties or permissions you require to this file. See the [schema reference](https://docs.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema) for more.
|
|
20
20
|
|
|
21
21
|
## Learn more
|
|
22
22
|
|