@microsoft/teamsfx-core 1.16.1 → 1.16.3-alpha.311dfaffe.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/azure-hosting/azureHosting.d.ts.map +1 -1
- package/build/common/azure-hosting/azureHosting.js +3 -3
- package/build/common/azure-hosting/azureHosting.js.map +1 -1
- package/build/common/constants.d.ts +2 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +2 -1
- package/build/common/constants.js.map +1 -1
- package/build/common/featureFlags.d.ts +1 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +5 -1
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/local/localEnvManager.d.ts.map +1 -1
- package/build/common/local/localEnvManager.js +1 -4
- package/build/common/local/localEnvManager.js.map +1 -1
- package/build/common/local/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/local/projectSettingsHelper.js +11 -51
- package/build/common/local/projectSettingsHelper.js.map +1 -1
- package/build/common/localStateProvider.d.ts.map +1 -1
- package/build/common/localStateProvider.js +1 -2
- package/build/common/localStateProvider.js.map +1 -1
- package/build/common/samples-config.json +12 -0
- package/build/common/templates-config.json +2 -2
- package/build/common/tools.d.ts +1 -0
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +9 -6
- package/build/common/tools.js.map +1 -1
- package/build/component/code/appSettingUtils.js +2 -2
- package/build/component/code/appSettingUtils.js.map +1 -1
- package/build/component/code/spfxTabCode.d.ts.map +1 -1
- package/build/component/code/spfxTabCode.js +10 -10
- package/build/component/code/spfxTabCode.js.map +1 -1
- package/build/component/core.js +9 -9
- package/build/component/core.js.map +1 -1
- package/build/component/debug.d.ts.map +1 -1
- package/build/component/debug.js +65 -51
- package/build/component/debug.js.map +1 -1
- package/build/component/debugHandler/appManifest.d.ts +1 -1
- package/build/component/debugHandler/appManifest.d.ts.map +1 -1
- package/build/component/debugHandler/appManifest.js +27 -25
- package/build/component/debugHandler/appManifest.js.map +1 -1
- package/build/component/debugHandler/bot.d.ts +0 -1
- package/build/component/debugHandler/bot.d.ts.map +1 -1
- package/build/component/debugHandler/bot.js +36 -31
- package/build/component/debugHandler/bot.js.map +1 -1
- package/build/component/debugHandler/error.d.ts +3 -3
- package/build/component/debugHandler/error.d.ts.map +1 -1
- package/build/component/debugHandler/error.js +14 -14
- package/build/component/debugHandler/error.js.map +1 -1
- package/build/component/debugHandler/index.d.ts +1 -0
- package/build/component/debugHandler/index.d.ts.map +1 -1
- package/build/component/debugHandler/index.js +1 -0
- package/build/component/debugHandler/index.js.map +1 -1
- package/build/component/debugHandler/localEnvProvider.js +1 -1
- package/build/component/debugHandler/localEnvProvider.js.map +1 -1
- package/build/component/debugHandler/sso.d.ts +0 -1
- package/build/component/debugHandler/sso.d.ts.map +1 -1
- package/build/component/debugHandler/sso.js +80 -69
- package/build/component/debugHandler/sso.js.map +1 -1
- package/build/component/debugHandler/tab.d.ts.map +1 -1
- package/build/component/debugHandler/tab.js +11 -12
- package/build/component/debugHandler/tab.js.map +1 -1
- package/build/component/error.d.ts +3 -0
- package/build/component/error.d.ts.map +1 -1
- package/build/component/error.js +11 -1
- package/build/component/error.js.map +1 -1
- package/build/component/feature/api.js +3 -3
- package/build/component/feature/api.js.map +1 -1
- package/build/component/feature/apiconnector/sampleHandler.d.ts.map +1 -1
- package/build/component/feature/apiconnector/sampleHandler.js +2 -2
- package/build/component/feature/apiconnector/sampleHandler.js.map +1 -1
- package/build/component/feature/apiconnector/telemetry.js +2 -2
- package/build/component/feature/apiconnector/telemetry.js.map +1 -1
- package/build/component/feature/apim.d.ts.map +1 -1
- package/build/component/feature/apim.js +3 -3
- package/build/component/feature/apim.js.map +1 -1
- package/build/component/feature/bot.d.ts.map +1 -1
- package/build/component/feature/bot.js +5 -4
- package/build/component/feature/bot.js.map +1 -1
- package/build/component/feature/keyVault.js +2 -2
- package/build/component/feature/keyVault.js.map +1 -1
- package/build/component/feature/spfx.d.ts.map +1 -1
- package/build/component/feature/spfx.js +5 -12
- package/build/component/feature/spfx.js.map +1 -1
- package/build/component/feature/sql.d.ts.map +1 -1
- package/build/component/feature/sql.js +3 -3
- package/build/component/feature/sql.js.map +1 -1
- package/build/component/feature/sso.d.ts.map +1 -1
- package/build/component/feature/sso.js +45 -44
- package/build/component/feature/sso.js.map +1 -1
- package/build/component/feature/tab.js +2 -2
- package/build/component/feature/tab.js.map +1 -1
- package/build/component/migrate.d.ts.map +1 -1
- package/build/component/migrate.js +41 -47
- package/build/component/migrate.js.map +1 -1
- package/build/component/provisionUtils.js +2 -2
- package/build/component/provisionUtils.js.map +1 -1
- package/build/component/questionV3.d.ts +3 -0
- package/build/component/questionV3.d.ts.map +1 -1
- package/build/component/questionV3.js +27 -4
- package/build/component/questionV3.js.map +1 -1
- package/build/component/resource/aadApp/aadApp.d.ts +5 -0
- package/build/component/resource/aadApp/aadApp.d.ts.map +1 -1
- package/build/component/resource/aadApp/aadApp.js +60 -13
- package/build/component/resource/aadApp/aadApp.js.map +1 -1
- package/build/{plugins/resource/aad → component/resource/aadApp}/aadAppClient.d.ts +0 -0
- package/build/component/resource/aadApp/aadAppClient.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/aadAppClient.js +2 -2
- package/build/component/resource/aadApp/aadAppClient.js.map +1 -0
- package/build/{plugins/resource/aad/plugin.d.ts → component/resource/aadApp/aadAppForTeamsImpl.d.ts} +6 -9
- package/build/component/resource/aadApp/aadAppForTeamsImpl.d.ts.map +1 -0
- package/build/{plugins/resource/aad/plugin.js → component/resource/aadApp/aadAppForTeamsImpl.js} +44 -119
- package/build/component/resource/aadApp/aadAppForTeamsImpl.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/aadAppManifestManager.d.ts +0 -0
- package/build/component/resource/aadApp/aadAppManifestManager.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/aadAppManifestManager.js +0 -0
- package/build/component/resource/aadApp/aadAppManifestManager.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/appStudio.d.ts +0 -0
- package/build/component/resource/aadApp/appStudio.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/appStudio.js +1 -1
- package/build/component/resource/aadApp/appStudio.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/constants.d.ts +0 -0
- package/build/component/resource/aadApp/constants.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/constants.js +0 -0
- package/build/component/resource/aadApp/constants.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/errorCodes.d.ts +0 -0
- package/build/component/resource/aadApp/errorCodes.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/errorCodes.js +0 -0
- package/build/component/resource/aadApp/errorCodes.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/errors.d.ts +0 -0
- package/build/component/resource/aadApp/errors.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/errors.js +0 -0
- package/build/component/resource/aadApp/errors.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/graph.d.ts +0 -0
- package/build/component/resource/aadApp/graph.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/graph.js +0 -0
- package/build/component/resource/aadApp/graph.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/AADApplication.d.ts +0 -0
- package/build/component/resource/aadApp/interfaces/AADApplication.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/AADApplication.js +0 -0
- package/build/component/resource/aadApp/interfaces/AADApplication.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/AADManifest.d.ts +0 -0
- package/build/component/resource/aadApp/interfaces/AADManifest.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/AADManifest.js +0 -0
- package/build/component/resource/aadApp/interfaces/AADManifest.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/IAADApplication.d.ts +0 -0
- package/build/component/resource/aadApp/interfaces/IAADApplication.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/IAADApplication.js +0 -0
- package/build/component/resource/aadApp/interfaces/IAADApplication.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/IAADDefinition.d.ts +0 -0
- package/build/component/resource/aadApp/interfaces/IAADDefinition.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/IAADDefinition.js +0 -0
- package/build/component/resource/aadApp/interfaces/IAADDefinition.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/IPermission.d.ts +0 -0
- package/build/component/resource/aadApp/interfaces/IPermission.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/IPermission.js +0 -0
- package/build/component/resource/aadApp/interfaces/IPermission.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/IPermissionList.d.ts +0 -0
- package/build/component/resource/aadApp/interfaces/IPermissionList.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/IPermissionList.js +0 -0
- package/build/component/resource/aadApp/interfaces/IPermissionList.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/models.d.ts +0 -0
- package/build/component/resource/aadApp/interfaces/models.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/interfaces/models.js +0 -0
- package/build/component/resource/aadApp/interfaces/models.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/permissions/index.d.ts +0 -0
- package/build/component/resource/aadApp/permissions/index.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/permissions/index.js +1 -1
- package/build/component/resource/aadApp/permissions/index.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/permissions/permissions.json +0 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/results.d.ts +0 -0
- package/build/component/resource/aadApp/results.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/results.js +0 -0
- package/build/component/resource/aadApp/results.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/aadManifestHelper.d.ts +0 -0
- package/build/component/resource/aadApp/utils/aadManifestHelper.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/aadManifestHelper.js +0 -0
- package/build/component/resource/aadApp/utils/aadManifestHelper.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/configs.d.ts +0 -0
- package/build/component/resource/aadApp/utils/configs.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/configs.js +9 -11
- package/build/component/resource/aadApp/utils/configs.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/dialog.d.ts +0 -0
- package/build/component/resource/aadApp/utils/dialog.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/dialog.js +0 -0
- package/build/component/resource/aadApp/utils/dialog.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/format.d.ts +0 -0
- package/build/component/resource/aadApp/utils/format.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/format.js +0 -0
- package/build/component/resource/aadApp/utils/format.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/telemetry.d.ts +0 -0
- package/build/component/resource/aadApp/utils/telemetry.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/telemetry.js +1 -1
- package/build/component/resource/aadApp/utils/telemetry.js.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/tokenProvider.d.ts +0 -0
- package/build/component/resource/aadApp/utils/tokenProvider.d.ts.map +1 -0
- package/build/{plugins/resource/aad → component/resource/aadApp}/utils/tokenProvider.js +5 -5
- package/build/component/resource/aadApp/utils/tokenProvider.js.map +1 -0
- package/build/component/resource/aadApp/utils.d.ts +3 -1
- package/build/component/resource/aadApp/utils.d.ts.map +1 -1
- package/build/component/resource/aadApp/utils.js +165 -1
- package/build/component/resource/aadApp/utils.js.map +1 -1
- package/build/component/resource/apim/config.d.ts.map +1 -1
- package/build/component/resource/apim/config.js +5 -6
- package/build/component/resource/apim/config.js.map +1 -1
- package/build/component/resource/apim/factory.js +2 -2
- package/build/component/resource/apim/factory.js.map +1 -1
- package/build/component/resource/appManifest/appManifest.d.ts +1 -1
- package/build/component/resource/appManifest/appManifest.d.ts.map +1 -1
- package/build/component/resource/appManifest/appManifest.js +3 -3
- package/build/component/resource/appManifest/appManifest.js.map +1 -1
- package/build/component/resource/appManifest/constants.d.ts +1 -0
- package/build/component/resource/appManifest/constants.d.ts.map +1 -1
- package/build/component/resource/appManifest/constants.js +28 -8
- package/build/component/resource/appManifest/constants.js.map +1 -1
- package/build/component/resource/appManifest/utils.d.ts +1 -1
- package/build/component/resource/appManifest/utils.d.ts.map +1 -1
- package/build/component/resource/appManifest/utils.js +4 -6
- package/build/component/resource/appManifest/utils.js.map +1 -1
- package/build/component/resource/azureSql/config.js +3 -3
- package/build/component/resource/azureSql/config.js.map +1 -1
- package/build/component/resource/keyVault.d.ts +2 -0
- package/build/component/resource/keyVault.d.ts.map +1 -1
- package/build/component/resource/keyVault.js +18 -0
- package/build/component/resource/keyVault.js.map +1 -1
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/constants.d.ts +0 -0
- package/build/component/resource/simpleAuth/constants.d.ts.map +1 -0
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/constants.js +0 -0
- package/build/component/resource/simpleAuth/constants.js.map +1 -0
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/errors.d.ts +0 -0
- package/build/component/resource/simpleAuth/errors.d.ts.map +1 -0
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/errors.js +0 -0
- package/build/component/resource/simpleAuth/errors.js.map +1 -0
- package/build/component/resource/{simpleAuth.d.ts → simpleAuth/index.d.ts} +1 -1
- package/build/component/resource/simpleAuth/index.d.ts.map +1 -0
- package/build/component/resource/{simpleAuth.js → simpleAuth/index.js} +10 -10
- package/build/component/resource/simpleAuth/index.js.map +1 -0
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/result.d.ts +0 -0
- package/build/component/resource/simpleAuth/result.d.ts.map +1 -0
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/result.js +0 -0
- package/build/component/resource/simpleAuth/result.js.map +1 -0
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/utils/common.d.ts +0 -0
- package/build/component/resource/simpleAuth/utils/common.d.ts.map +1 -0
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/utils/common.js +0 -0
- package/build/component/resource/simpleAuth/utils/common.js.map +1 -0
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/utils/dialog.d.ts +0 -0
- package/build/component/resource/simpleAuth/utils/dialog.d.ts.map +1 -0
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/utils/dialog.js +0 -0
- package/build/component/resource/simpleAuth/utils/dialog.js.map +1 -0
- package/build/{plugins/resource/keyvault → component/resource/simpleAuth}/utils/telemetry.d.ts +0 -0
- package/build/component/resource/simpleAuth/utils/telemetry.d.ts.map +1 -0
- package/build/{plugins/resource/simpleauth → component/resource/simpleAuth}/utils/telemetry.js +0 -0
- package/build/component/resource/simpleAuth/utils/telemetry.js.map +1 -0
- package/build/{plugins → component}/resource/spfx/depsChecker/dependencyChecker.d.ts +0 -0
- package/build/component/resource/spfx/depsChecker/dependencyChecker.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/depsChecker/dependencyChecker.js +0 -0
- package/build/component/resource/spfx/depsChecker/dependencyChecker.js.map +1 -0
- package/build/{plugins → component}/resource/spfx/depsChecker/generatorChecker.d.ts +0 -0
- package/build/component/resource/spfx/depsChecker/generatorChecker.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/depsChecker/generatorChecker.js +16 -7
- package/build/component/resource/spfx/depsChecker/generatorChecker.js.map +1 -0
- package/build/{plugins → component}/resource/spfx/depsChecker/yoChecker.d.ts +0 -0
- package/build/component/resource/spfx/depsChecker/yoChecker.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/depsChecker/yoChecker.js +0 -0
- package/build/component/resource/spfx/depsChecker/yoChecker.js.map +1 -0
- package/build/{plugins → component}/resource/spfx/error.d.ts +0 -0
- package/build/component/resource/spfx/error.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/error.js +5 -4
- package/build/component/resource/spfx/error.js.map +1 -0
- package/build/component/resource/spfx/index.d.ts.map +1 -1
- package/build/component/resource/spfx/index.js +9 -9
- package/build/component/resource/spfx/index.js.map +1 -1
- package/build/{plugins → component}/resource/spfx/spoClient.d.ts +0 -0
- package/build/component/resource/spfx/spoClient.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/spoClient.js +0 -0
- package/build/component/resource/spfx/spoClient.js.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/constants.d.ts +3 -0
- package/build/component/resource/spfx/utils/constants.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/constants.js +3 -0
- package/build/component/resource/spfx/utils/constants.js.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/progress-helper.d.ts +0 -0
- package/build/component/resource/spfx/utils/progress-helper.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/progress-helper.js +0 -0
- package/build/component/resource/spfx/utils/progress-helper.js.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/questions.d.ts +0 -0
- package/build/component/resource/spfx/utils/questions.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/questions.js +8 -2
- package/build/component/resource/spfx/utils/questions.js.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/telemetry-helper.d.ts +0 -0
- package/build/component/resource/spfx/utils/telemetry-helper.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/telemetry-helper.js +0 -0
- package/build/component/resource/spfx/utils/telemetry-helper.js.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/telemetryEvents.d.ts +0 -0
- package/build/component/resource/spfx/utils/telemetryEvents.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/telemetryEvents.js +0 -0
- package/build/component/resource/spfx/utils/telemetryEvents.js.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/utils.d.ts +2 -1
- package/build/component/resource/spfx/utils/utils.d.ts.map +1 -0
- package/build/{plugins → component}/resource/spfx/utils/utils.js +9 -4
- package/build/component/resource/spfx/utils/utils.js.map +1 -0
- package/build/core/FxCore.d.ts +10 -44
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +54 -696
- package/build/core/FxCore.js.map +1 -1
- package/build/core/collaborator.d.ts +6 -1
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/collaborator.js +75 -23
- package/build/core/collaborator.js.map +1 -1
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +2 -7
- package/build/core/environment.js.map +1 -1
- package/build/core/generateAadManifestTemplate.d.ts +1 -1
- package/build/core/generateAadManifestTemplate.d.ts.map +1 -1
- package/build/core/generateAadManifestTemplate.js +11 -14
- package/build/core/generateAadManifestTemplate.js.map +1 -1
- package/build/core/globalVars.d.ts +0 -1
- package/build/core/globalVars.d.ts.map +1 -1
- package/build/core/globalVars.js +1 -5
- package/build/core/globalVars.js.map +1 -1
- package/build/core/index.d.ts +0 -5
- package/build/core/index.d.ts.map +1 -1
- package/build/core/index.js +0 -7
- package/build/core/index.js.map +1 -1
- package/build/core/middleware/MigrationUtils.d.ts +1 -1
- package/build/core/middleware/MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/MigrationUtils.js +2 -2
- package/build/core/middleware/MigrationUtils.js.map +1 -1
- package/build/core/middleware/consolidateLocalRemote.js +1 -1
- package/build/core/middleware/consolidateLocalRemote.js.map +1 -1
- package/build/core/middleware/envInfoLoader.d.ts.map +1 -1
- package/build/core/middleware/envInfoLoader.js +1 -4
- package/build/core/middleware/envInfoLoader.js.map +1 -1
- package/build/core/middleware/envInfoLoaderV3.d.ts.map +1 -1
- package/build/core/middleware/envInfoLoaderV3.js +1 -4
- package/build/core/middleware/envInfoLoaderV3.js.map +1 -1
- package/build/core/middleware/projectMigrator.js +2 -2
- package/build/core/middleware/projectMigrator.js.map +1 -1
- package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
- package/build/core/middleware/projectSettingsLoader.js +1 -10
- package/build/core/middleware/projectSettingsLoader.js.map +1 -1
- package/build/core/middleware/projectSettingsWriter.d.ts.map +1 -1
- package/build/core/middleware/projectSettingsWriter.js +1 -3
- package/build/core/middleware/projectSettingsWriter.js.map +1 -1
- package/build/core/middleware/questionModel.d.ts +1 -10
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +26 -225
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/index.d.ts +2 -8
- package/build/index.d.ts.map +1 -1
- package/build/index.js +4 -8
- package/build/index.js.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.js +8 -1
- package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
- package/build/plugins/resource/appstudio/errors.d.ts +4 -0
- package/build/plugins/resource/appstudio/errors.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/errors.js +7 -0
- package/build/plugins/resource/appstudio/errors.js.map +1 -1
- package/build/plugins/resource/appstudio/index.js +2 -2
- package/build/plugins/resource/appstudio/index.js.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js +21 -21
- package/build/plugins/resource/appstudio/plugin.js.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.js +2 -2
- package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
- package/build/plugins/resource/bot/configs/teamsBotConfig.js +2 -2
- package/build/plugins/resource/bot/configs/teamsBotConfig.js.map +1 -1
- package/build/plugins/resource/bot/errors.d.ts.map +1 -1
- package/build/plugins/resource/bot/errors.js +2 -2
- package/build/plugins/resource/bot/errors.js.map +1 -1
- package/build/plugins/resource/bot/functionsHostedBot/plugin.js +8 -8
- 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 +9 -7
- package/build/plugins/resource/bot/index.js.map +1 -1
- package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/plugin.js +16 -15
- package/build/plugins/resource/bot/plugin.js.map +1 -1
- package/build/plugins/resource/bot/question.d.ts.map +1 -1
- package/build/plugins/resource/bot/question.js +9 -10
- package/build/plugins/resource/bot/question.js.map +1 -1
- package/build/plugins/resource/function/plugin.js +3 -4
- package/build/plugins/resource/function/plugin.js.map +1 -1
- package/build/plugins/resource/function/utils/depsChecker/funcHelper.d.ts +1 -1
- package/build/plugins/resource/function/utils/depsChecker/funcHelper.d.ts.map +1 -1
- package/build/plugins/resource/index.d.ts +0 -5
- package/build/plugins/resource/index.d.ts.map +1 -1
- package/build/plugins/resource/index.js +0 -5
- package/build/plugins/resource/index.js.map +1 -1
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.d.ts +0 -10
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.js +0 -10
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.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 -15
- package/build/plugins/solution/fx-solution/arm.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts +4 -0
- package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/scaffolding.js +47 -1
- package/build/plugins/solution/fx-solution/debug/scaffolding.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launchTransparency.d.ts +7 -0
- package/build/plugins/solution/fx-solution/debug/util/launchTransparency.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/debug/util/launchTransparency.js +52 -0
- package/build/plugins/solution/fx-solution/debug/util/launchTransparency.js.map +1 -0
- package/build/plugins/solution/fx-solution/debug/util/ngrok.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/ngrok.js +2 -4
- package/build/plugins/solution/fx-solution/debug/util/ngrok.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/settings.js +2 -2
- package/build/plugins/solution/fx-solution/debug/util/settings.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/util/tasksTransparency.d.ts +7 -0
- package/build/plugins/solution/fx-solution/debug/util/tasksTransparency.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/debug/util/tasksTransparency.js +553 -0
- package/build/plugins/solution/fx-solution/debug/util/tasksTransparency.js.map +1 -0
- package/build/plugins/solution/fx-solution/utils/backupFiles.js +2 -2
- package/build/plugins/solution/fx-solution/utils/backupFiles.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.map +1 -1
- package/package.json +9 -23
- package/resource/package.nls.json +8 -6
- package/templates/debug/ngrok.yml +4 -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.csharp.workflow.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.js.workflow.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.workflow.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.csharp.non-sso.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 +202 -124
- package/templates/plugins/resource/aad/auth/bot/js/sso/profileSsoCommandHandler.js +30 -0
- package/templates/plugins/resource/aad/auth/bot/ts/sso/profileSsoCommandHandler.ts +38 -0
- package/templates/plugins/resource/spfx/solution/prereleaseREADME.md +82 -0
- package/build/common/index.d.ts +0 -10
- package/build/common/index.d.ts.map +0 -1
- package/build/common/index.js +0 -15
- package/build/common/index.js.map +0 -1
- package/build/component/resource/simpleAuth.d.ts.map +0 -1
- package/build/component/resource/simpleAuth.js.map +0 -1
- package/build/core/middleware/index.d.ts +0 -11
- package/build/core/middleware/index.d.ts.map +0 -1
- package/build/core/middleware/index.js +0 -14
- package/build/core/middleware/index.js.map +0 -1
- package/build/core/middleware/solutionLoader.d.ts +0 -4
- package/build/core/middleware/solutionLoader.d.ts.map +0 -1
- package/build/core/middleware/solutionLoader.js +0 -34
- package/build/core/middleware/solutionLoader.js.map +0 -1
- package/build/plugins/index.d.ts +0 -3
- package/build/plugins/index.d.ts.map +0 -1
- package/build/plugins/index.js +0 -8
- package/build/plugins/index.js.map +0 -1
- package/build/plugins/resource/aad/aadAppClient.d.ts.map +0 -1
- package/build/plugins/resource/aad/aadAppClient.js.map +0 -1
- package/build/plugins/resource/aad/aadAppManifestManager.d.ts.map +0 -1
- package/build/plugins/resource/aad/aadAppManifestManager.js.map +0 -1
- package/build/plugins/resource/aad/appStudio.d.ts.map +0 -1
- package/build/plugins/resource/aad/appStudio.js.map +0 -1
- package/build/plugins/resource/aad/constants.d.ts.map +0 -1
- package/build/plugins/resource/aad/constants.js.map +0 -1
- package/build/plugins/resource/aad/errorCodes.d.ts.map +0 -1
- package/build/plugins/resource/aad/errorCodes.js.map +0 -1
- package/build/plugins/resource/aad/errors.d.ts.map +0 -1
- package/build/plugins/resource/aad/errors.js.map +0 -1
- package/build/plugins/resource/aad/graph.d.ts.map +0 -1
- package/build/plugins/resource/aad/graph.js.map +0 -1
- package/build/plugins/resource/aad/index.d.ts +0 -32
- package/build/plugins/resource/aad/index.d.ts.map +0 -1
- package/build/plugins/resource/aad/index.js +0 -154
- package/build/plugins/resource/aad/index.js.map +0 -1
- package/build/plugins/resource/aad/interfaces/AADApplication.d.ts.map +0 -1
- package/build/plugins/resource/aad/interfaces/AADApplication.js.map +0 -1
- package/build/plugins/resource/aad/interfaces/AADManifest.d.ts.map +0 -1
- package/build/plugins/resource/aad/interfaces/AADManifest.js.map +0 -1
- package/build/plugins/resource/aad/interfaces/IAADApplication.d.ts.map +0 -1
- package/build/plugins/resource/aad/interfaces/IAADApplication.js.map +0 -1
- package/build/plugins/resource/aad/interfaces/IAADDefinition.d.ts.map +0 -1
- package/build/plugins/resource/aad/interfaces/IAADDefinition.js.map +0 -1
- package/build/plugins/resource/aad/interfaces/IPermission.d.ts.map +0 -1
- package/build/plugins/resource/aad/interfaces/IPermission.js.map +0 -1
- package/build/plugins/resource/aad/interfaces/IPermissionList.d.ts.map +0 -1
- package/build/plugins/resource/aad/interfaces/IPermissionList.js.map +0 -1
- package/build/plugins/resource/aad/interfaces/models.d.ts.map +0 -1
- package/build/plugins/resource/aad/interfaces/models.js.map +0 -1
- package/build/plugins/resource/aad/permissions/index.d.ts.map +0 -1
- package/build/plugins/resource/aad/permissions/index.js.map +0 -1
- package/build/plugins/resource/aad/plugin.d.ts.map +0 -1
- package/build/plugins/resource/aad/plugin.js.map +0 -1
- package/build/plugins/resource/aad/results.d.ts.map +0 -1
- package/build/plugins/resource/aad/results.js.map +0 -1
- package/build/plugins/resource/aad/utils/aadManifestHelper.d.ts.map +0 -1
- package/build/plugins/resource/aad/utils/aadManifestHelper.js.map +0 -1
- package/build/plugins/resource/aad/utils/configs.d.ts.map +0 -1
- package/build/plugins/resource/aad/utils/configs.js.map +0 -1
- package/build/plugins/resource/aad/utils/dialog.d.ts.map +0 -1
- package/build/plugins/resource/aad/utils/dialog.js.map +0 -1
- package/build/plugins/resource/aad/utils/format.d.ts.map +0 -1
- package/build/plugins/resource/aad/utils/format.js.map +0 -1
- package/build/plugins/resource/aad/utils/telemetry.d.ts.map +0 -1
- package/build/plugins/resource/aad/utils/telemetry.js.map +0 -1
- package/build/plugins/resource/aad/utils/tokenProvider.d.ts.map +0 -1
- package/build/plugins/resource/aad/utils/tokenProvider.js.map +0 -1
- package/build/plugins/resource/aad/v2/index.d.ts +0 -22
- package/build/plugins/resource/aad/v2/index.d.ts.map +0 -1
- package/build/plugins/resource/aad/v2/index.js +0 -65
- package/build/plugins/resource/aad/v2/index.js.map +0 -1
- package/build/plugins/resource/aad/v3/index.d.ts +0 -22
- package/build/plugins/resource/aad/v3/index.d.ts.map +0 -1
- package/build/plugins/resource/aad/v3/index.js +0 -283
- package/build/plugins/resource/aad/v3/index.js.map +0 -1
- package/build/plugins/resource/keyvault/constants.d.ts +0 -36
- package/build/plugins/resource/keyvault/constants.d.ts.map +0 -1
- package/build/plugins/resource/keyvault/constants.js +0 -43
- package/build/plugins/resource/keyvault/constants.js.map +0 -1
- package/build/plugins/resource/keyvault/index.d.ts +0 -16
- package/build/plugins/resource/keyvault/index.d.ts.map +0 -1
- package/build/plugins/resource/keyvault/index.js +0 -65
- package/build/plugins/resource/keyvault/index.js.map +0 -1
- package/build/plugins/resource/keyvault/plugin.d.ts +0 -7
- package/build/plugins/resource/keyvault/plugin.d.ts.map +0 -1
- package/build/plugins/resource/keyvault/plugin.js +0 -44
- package/build/plugins/resource/keyvault/plugin.js.map +0 -1
- package/build/plugins/resource/keyvault/result.d.ts +0 -9
- package/build/plugins/resource/keyvault/result.d.ts.map +0 -1
- package/build/plugins/resource/keyvault/result.js +0 -35
- package/build/plugins/resource/keyvault/result.js.map +0 -1
- package/build/plugins/resource/keyvault/utils/telemetry.d.ts.map +0 -1
- package/build/plugins/resource/keyvault/utils/telemetry.js +0 -45
- package/build/plugins/resource/keyvault/utils/telemetry.js.map +0 -1
- package/build/plugins/resource/keyvault/v2/index.d.ts +0 -12
- package/build/plugins/resource/keyvault/v2/index.d.ts.map +0 -1
- package/build/plugins/resource/keyvault/v2/index.js +0 -38
- package/build/plugins/resource/keyvault/v2/index.js.map +0 -1
- package/build/plugins/resource/simpleauth/constants.d.ts.map +0 -1
- package/build/plugins/resource/simpleauth/constants.js.map +0 -1
- package/build/plugins/resource/simpleauth/errors.d.ts.map +0 -1
- package/build/plugins/resource/simpleauth/errors.js.map +0 -1
- package/build/plugins/resource/simpleauth/index.d.ts +0 -20
- package/build/plugins/resource/simpleauth/index.d.ts.map +0 -1
- package/build/plugins/resource/simpleauth/index.js +0 -78
- package/build/plugins/resource/simpleauth/index.js.map +0 -1
- package/build/plugins/resource/simpleauth/plugin.d.ts +0 -14
- package/build/plugins/resource/simpleauth/plugin.d.ts.map +0 -1
- package/build/plugins/resource/simpleauth/plugin.js +0 -141
- package/build/plugins/resource/simpleauth/plugin.js.map +0 -1
- package/build/plugins/resource/simpleauth/result.d.ts.map +0 -1
- package/build/plugins/resource/simpleauth/result.js.map +0 -1
- package/build/plugins/resource/simpleauth/utils/common.d.ts.map +0 -1
- package/build/plugins/resource/simpleauth/utils/common.js.map +0 -1
- package/build/plugins/resource/simpleauth/utils/dialog.d.ts.map +0 -1
- package/build/plugins/resource/simpleauth/utils/dialog.js.map +0 -1
- package/build/plugins/resource/simpleauth/utils/telemetry.d.ts +0 -17
- package/build/plugins/resource/simpleauth/utils/telemetry.d.ts.map +0 -1
- package/build/plugins/resource/simpleauth/utils/telemetry.js.map +0 -1
- package/build/plugins/resource/simpleauth/v2/index.d.ts +0 -15
- package/build/plugins/resource/simpleauth/v2/index.d.ts.map +0 -1
- package/build/plugins/resource/simpleauth/v2/index.js +0 -47
- package/build/plugins/resource/simpleauth/v2/index.js.map +0 -1
- package/build/plugins/resource/simpleauth/webAppClient.d.ts +0 -31
- package/build/plugins/resource/simpleauth/webAppClient.d.ts.map +0 -1
- package/build/plugins/resource/simpleauth/webAppClient.js +0 -136
- package/build/plugins/resource/simpleauth/webAppClient.js.map +0 -1
- package/build/plugins/resource/spfx/depsChecker/dependencyChecker.d.ts.map +0 -1
- package/build/plugins/resource/spfx/depsChecker/dependencyChecker.js.map +0 -1
- package/build/plugins/resource/spfx/depsChecker/generatorChecker.d.ts.map +0 -1
- package/build/plugins/resource/spfx/depsChecker/generatorChecker.js.map +0 -1
- package/build/plugins/resource/spfx/depsChecker/yoChecker.d.ts.map +0 -1
- package/build/plugins/resource/spfx/depsChecker/yoChecker.js.map +0 -1
- package/build/plugins/resource/spfx/error.d.ts.map +0 -1
- package/build/plugins/resource/spfx/error.js.map +0 -1
- package/build/plugins/resource/spfx/index.d.ts +0 -18
- package/build/plugins/resource/spfx/index.d.ts.map +0 -1
- package/build/plugins/resource/spfx/index.js +0 -96
- package/build/plugins/resource/spfx/index.js.map +0 -1
- package/build/plugins/resource/spfx/plugin.d.ts +0 -12
- package/build/plugins/resource/spfx/plugin.d.ts.map +0 -1
- package/build/plugins/resource/spfx/plugin.js +0 -216
- package/build/plugins/resource/spfx/plugin.js.map +0 -1
- package/build/plugins/resource/spfx/spoClient.d.ts.map +0 -1
- package/build/plugins/resource/spfx/spoClient.js.map +0 -1
- package/build/plugins/resource/spfx/utils/constants.d.ts.map +0 -1
- package/build/plugins/resource/spfx/utils/constants.js.map +0 -1
- package/build/plugins/resource/spfx/utils/progress-helper.d.ts.map +0 -1
- package/build/plugins/resource/spfx/utils/progress-helper.js.map +0 -1
- package/build/plugins/resource/spfx/utils/questions.d.ts.map +0 -1
- package/build/plugins/resource/spfx/utils/questions.js.map +0 -1
- package/build/plugins/resource/spfx/utils/telemetry-helper.d.ts.map +0 -1
- package/build/plugins/resource/spfx/utils/telemetry-helper.js.map +0 -1
- package/build/plugins/resource/spfx/utils/telemetryEvents.d.ts.map +0 -1
- package/build/plugins/resource/spfx/utils/telemetryEvents.js.map +0 -1
- package/build/plugins/resource/spfx/utils/utils.d.ts.map +0 -1
- package/build/plugins/resource/spfx/utils/utils.js.map +0 -1
- package/build/plugins/resource/spfx/v2/index.d.ts +0 -14
- package/build/plugins/resource/spfx/v2/index.d.ts.map +0 -1
- package/build/plugins/resource/spfx/v2/index.js +0 -41
- package/build/plugins/resource/spfx/v2/index.js.map +0 -1
- package/build/plugins/resource/sql/config.d.ts +0 -22
- package/build/plugins/resource/sql/config.d.ts.map +0 -1
- package/build/plugins/resource/sql/config.js +0 -30
- package/build/plugins/resource/sql/config.js.map +0 -1
- package/build/plugins/resource/sql/constants.d.ts +0 -82
- package/build/plugins/resource/sql/constants.d.ts.map +0 -1
- package/build/plugins/resource/sql/constants.js +0 -92
- package/build/plugins/resource/sql/constants.js.map +0 -1
- package/build/plugins/resource/sql/errors.d.ts +0 -63
- package/build/plugins/resource/sql/errors.d.ts.map +0 -1
- package/build/plugins/resource/sql/errors.js +0 -107
- package/build/plugins/resource/sql/errors.js.map +0 -1
- package/build/plugins/resource/sql/index.d.ts +0 -20
- package/build/plugins/resource/sql/index.d.ts.map +0 -1
- package/build/plugins/resource/sql/index.js +0 -92
- package/build/plugins/resource/sql/index.js.map +0 -1
- package/build/plugins/resource/sql/managementClient.d.ts +0 -18
- package/build/plugins/resource/sql/managementClient.d.ts.map +0 -1
- package/build/plugins/resource/sql/managementClient.js +0 -123
- package/build/plugins/resource/sql/managementClient.js.map +0 -1
- package/build/plugins/resource/sql/plugin.d.ts +0 -30
- package/build/plugins/resource/sql/plugin.d.ts.map +0 -1
- package/build/plugins/resource/sql/plugin.js +0 -340
- package/build/plugins/resource/sql/plugin.js.map +0 -1
- package/build/plugins/resource/sql/questions.d.ts +0 -5
- package/build/plugins/resource/sql/questions.d.ts.map +0 -1
- package/build/plugins/resource/sql/questions.js +0 -46
- package/build/plugins/resource/sql/questions.js.map +0 -1
- package/build/plugins/resource/sql/results.d.ts +0 -10
- package/build/plugins/resource/sql/results.d.ts.map +0 -1
- package/build/plugins/resource/sql/results.js +0 -32
- package/build/plugins/resource/sql/results.js.map +0 -1
- package/build/plugins/resource/sql/sqlClient.d.ts +0 -13
- package/build/plugins/resource/sql/sqlClient.d.ts.map +0 -1
- package/build/plugins/resource/sql/sqlClient.js +0 -153
- package/build/plugins/resource/sql/sqlClient.js.map +0 -1
- package/build/plugins/resource/sql/utils/checkInput.d.ts +0 -10
- package/build/plugins/resource/sql/utils/checkInput.d.ts.map +0 -1
- package/build/plugins/resource/sql/utils/checkInput.js +0 -87
- package/build/plugins/resource/sql/utils/checkInput.js.map +0 -1
- package/build/plugins/resource/sql/utils/commonUtils.d.ts +0 -13
- package/build/plugins/resource/sql/utils/commonUtils.d.ts.map +0 -1
- package/build/plugins/resource/sql/utils/commonUtils.js +0 -51
- package/build/plugins/resource/sql/utils/commonUtils.js.map +0 -1
- package/build/plugins/resource/sql/utils/contextUtils.d.ts +0 -5
- package/build/plugins/resource/sql/utils/contextUtils.d.ts.map +0 -1
- package/build/plugins/resource/sql/utils/contextUtils.js +0 -11
- package/build/plugins/resource/sql/utils/contextUtils.js.map +0 -1
- package/build/plugins/resource/sql/utils/dialogUtils.d.ts +0 -13
- package/build/plugins/resource/sql/utils/dialogUtils.d.ts.map +0 -1
- package/build/plugins/resource/sql/utils/dialogUtils.js +0 -21
- package/build/plugins/resource/sql/utils/dialogUtils.js.map +0 -1
- package/build/plugins/resource/sql/utils/message.d.ts +0 -16
- package/build/plugins/resource/sql/utils/message.d.ts.map +0 -1
- package/build/plugins/resource/sql/utils/message.js +0 -23
- package/build/plugins/resource/sql/utils/message.js.map +0 -1
- package/build/plugins/resource/sql/utils/telemetryUtils.d.ts +0 -17
- package/build/plugins/resource/sql/utils/telemetryUtils.d.ts.map +0 -1
- package/build/plugins/resource/sql/utils/telemetryUtils.js +0 -45
- package/build/plugins/resource/sql/utils/telemetryUtils.js.map +0 -1
- package/build/plugins/resource/sql/v2/index.d.ts +0 -15
- package/build/plugins/resource/sql/v2/index.d.ts.map +0 -1
- package/build/plugins/resource/sql/v2/index.js +0 -44
- package/build/plugins/resource/sql/v2/index.js.map +0 -1
- package/build/plugins/solution/fx-solution/index.d.ts +0 -5
- package/build/plugins/solution/fx-solution/index.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/index.js +0 -8
- package/build/plugins/solution/fx-solution/index.js.map +0 -1
- package/build/plugins/solution/fx-solution/solution.d.ts +0 -94
- package/build/plugins/solution/fx-solution/solution.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/solution.js +0 -1530
- package/build/plugins/solution/fx-solution/solution.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/checkPermission.d.ts +0 -5
- package/build/plugins/solution/fx-solution/v2/checkPermission.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/checkPermission.js +0 -196
- package/build/plugins/solution/fx-solution/v2/checkPermission.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/collaborationUtil.d.ts +0 -28
- package/build/plugins/solution/fx-solution/v2/collaborationUtil.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/collaborationUtil.js +0 -131
- package/build/plugins/solution/fx-solution/v2/collaborationUtil.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/createEnv.d.ts +0 -3
- package/build/plugins/solution/fx-solution/v2/createEnv.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/createEnv.js +0 -37
- package/build/plugins/solution/fx-solution/v2/createEnv.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/deploy.d.ts +0 -3
- package/build/plugins/solution/fx-solution/v2/deploy.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/deploy.js +0 -143
- package/build/plugins/solution/fx-solution/v2/deploy.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts +0 -22
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js +0 -850
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.d.ts +0 -4
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js +0 -31
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts +0 -15
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.js +0 -847
- package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/grantPermission.d.ts +0 -5
- package/build/plugins/solution/fx-solution/v2/grantPermission.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/grantPermission.js +0 -209
- package/build/plugins/solution/fx-solution/v2/grantPermission.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/listCollaborator.d.ts +0 -8
- package/build/plugins/solution/fx-solution/v2/listCollaborator.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/listCollaborator.js +0 -226
- package/build/plugins/solution/fx-solution/v2/listCollaborator.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/provision.d.ts +0 -3
- package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/provision.js +0 -262
- package/build/plugins/solution/fx-solution/v2/provision.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts +0 -3
- package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js +0 -117
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/publish.d.ts +0 -3
- package/build/plugins/solution/fx-solution/v2/publish.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/publish.js +0 -46
- package/build/plugins/solution/fx-solution/v2/publish.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts +0 -5
- package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.js +0 -161
- package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +0 -1
- package/build/plugins/solution/fx-solution/v2/solution.d.ts +0 -22
- package/build/plugins/solution/fx-solution/v2/solution.d.ts.map +0 -1
- package/build/plugins/solution/fx-solution/v2/solution.js +0 -48
- package/build/plugins/solution/fx-solution/v2/solution.js.map +0 -1
- package/build/plugins/solution/index.d.ts +0 -2
- package/build/plugins/solution/index.d.ts.map +0 -1
- package/build/plugins/solution/index.js +0 -7
- package/build/plugins/solution/index.js.map +0 -1
- package/templates/plugins/resource/aad/auth/bot/js/sso/showUserInfo.js +0 -36
- package/templates/plugins/resource/aad/auth/bot/js/sso/ssoDialog.js +0 -201
- package/templates/plugins/resource/aad/auth/bot/js/sso/teamsSsoBot.js +0 -63
- package/templates/plugins/resource/aad/auth/bot/ts/sso/showUserInfo.ts +0 -38
- package/templates/plugins/resource/aad/auth/bot/ts/sso/ssoDialog.ts +0 -213
- package/templates/plugins/resource/aad/auth/bot/ts/sso/teamsSsoBot.ts +0 -75
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scaffoldReadme = exports.scaffoldByPlugins = exports.scaffoldSourceCode = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
6
|
-
const question_1 = require("../question");
|
|
7
|
-
const executor_1 = require("./executor");
|
|
8
|
-
const utils_1 = require("./utils");
|
|
9
|
-
const projectSettingsHelper_1 = require("../../../../common/projectSettingsHelper");
|
|
10
|
-
const path_1 = tslib_1.__importDefault(require("path"));
|
|
11
|
-
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
12
|
-
const constants_1 = require("../constants");
|
|
13
|
-
const ResourcePluginContainer_1 = require("../ResourcePluginContainer");
|
|
14
|
-
const typedi_1 = require("typedi");
|
|
15
|
-
const scaffolding_1 = require("../debug/scaffolding");
|
|
16
|
-
const folder_1 = require("../../../../folder");
|
|
17
|
-
const localizeUtils_1 = require("../../../../common/localizeUtils");
|
|
18
|
-
const tools_1 = require("./../../../../common/tools");
|
|
19
|
-
async function scaffoldSourceCode(ctx, inputs) {
|
|
20
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
21
|
-
(_a = ctx.telemetryReporter) === null || _a === void 0 ? void 0 : _a.sendTelemetryEvent(constants_1.SolutionTelemetryEvent.CreateStart, {
|
|
22
|
-
[constants_1.SolutionTelemetryProperty.Component]: constants_1.SolutionTelemetryComponentName,
|
|
23
|
-
});
|
|
24
|
-
if (inputs.projectPath === undefined) {
|
|
25
|
-
return teamsfx_api_1.err(new teamsfx_api_1.SystemError("Solution", constants_1.SolutionError.InternelError, "projectPath is undefined"));
|
|
26
|
-
}
|
|
27
|
-
const lang = inputs[question_1.AzureSolutionQuestionNames.ProgrammingLanguage];
|
|
28
|
-
if (lang) {
|
|
29
|
-
ctx.projectSetting.programmingLanguage = lang;
|
|
30
|
-
}
|
|
31
|
-
const solutionSettings = utils_1.getAzureSolutionSettings(ctx);
|
|
32
|
-
const fillinRes = utils_1.fillInSolutionSettings(ctx.projectSetting, inputs);
|
|
33
|
-
if (fillinRes.isErr())
|
|
34
|
-
return teamsfx_api_1.err(fillinRes.error);
|
|
35
|
-
const plugins = utils_1.getSelectedPlugins(ctx.projectSetting);
|
|
36
|
-
let thunks = plugins
|
|
37
|
-
.filter((plugin) => !!plugin.scaffoldSourceCode)
|
|
38
|
-
.map((plugin) => {
|
|
39
|
-
return {
|
|
40
|
-
pluginName: `${plugin.name}`,
|
|
41
|
-
taskName: "scaffoldSourceCode",
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
43
|
-
thunk: () => plugin.scaffoldSourceCode(ctx, inputs),
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
///SPFx plugin will be executed last, so remove it from the thunks.
|
|
47
|
-
const SPFxPlugin = typedi_1.Container.get(ResourcePluginContainer_1.ResourcePluginsV2.SpfxPlugin);
|
|
48
|
-
if (thunks.map((p) => p.pluginName === SPFxPlugin.name).length > 0) {
|
|
49
|
-
thunks = thunks.filter((p) => p.pluginName !== SPFxPlugin.name);
|
|
50
|
-
}
|
|
51
|
-
const result = await executor_1.executeConcurrently(thunks, ctx.logProvider);
|
|
52
|
-
if (result.kind === "success") {
|
|
53
|
-
const capabilities = (solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.capabilities) || [];
|
|
54
|
-
const azureResources = (solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.azureResources) || [];
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
56
|
-
const scaffoldLocalDebugSettingsResult = await scaffolding_1.scaffoldLocalDebugSettings(ctx, inputs);
|
|
57
|
-
if (scaffoldLocalDebugSettingsResult.isErr()) {
|
|
58
|
-
return scaffoldLocalDebugSettingsResult;
|
|
59
|
-
}
|
|
60
|
-
if (!projectSettingsHelper_1.isVSProject(ctx.projectSetting)) {
|
|
61
|
-
await scaffoldReadme(capabilities, azureResources, inputs.projectPath);
|
|
62
|
-
}
|
|
63
|
-
if (utils_1.isAzureProject(solutionSettings)) {
|
|
64
|
-
if (!tools_1.isAadManifestEnabled()) {
|
|
65
|
-
await fs_extra_1.default.writeJSON(`${inputs.projectPath}/permissions.json`, constants_1.DEFAULT_PERMISSION_REQUEST, {
|
|
66
|
-
spaces: 4,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
(_b = ctx.telemetryReporter) === null || _b === void 0 ? void 0 : _b.sendTelemetryEvent(constants_1.SolutionTelemetryEvent.Create, {
|
|
70
|
-
[constants_1.SolutionTelemetryProperty.Component]: constants_1.SolutionTelemetryComponentName,
|
|
71
|
-
[constants_1.SolutionTelemetryProperty.Success]: constants_1.SolutionTelemetrySuccess.Yes,
|
|
72
|
-
[constants_1.SolutionTelemetryProperty.Resources]: ((solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.azureResources) || []).join(";"),
|
|
73
|
-
[constants_1.SolutionTelemetryProperty.Capabilities]: ((solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.capabilities) || []).join(";"),
|
|
74
|
-
[constants_1.SolutionTelemetryProperty.ProgrammingLanguage]: (_d = (_c = ctx.projectSetting) === null || _c === void 0 ? void 0 : _c.programmingLanguage) !== null && _d !== void 0 ? _d : "",
|
|
75
|
-
[constants_1.SolutionTelemetryProperty.HostType]: "azure",
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
//For SPFx plugin, execute it alone lastly
|
|
80
|
-
if (SPFxPlugin.scaffoldSourceCode) {
|
|
81
|
-
const spfxRes = await SPFxPlugin.scaffoldSourceCode(ctx, inputs);
|
|
82
|
-
if (spfxRes.isErr()) {
|
|
83
|
-
return teamsfx_api_1.err(spfxRes.error);
|
|
84
|
-
}
|
|
85
|
-
(_e = ctx.telemetryReporter) === null || _e === void 0 ? void 0 : _e.sendTelemetryEvent(constants_1.SolutionTelemetryEvent.Create, {
|
|
86
|
-
[constants_1.SolutionTelemetryProperty.Component]: constants_1.SolutionTelemetryComponentName,
|
|
87
|
-
[constants_1.SolutionTelemetryProperty.Success]: constants_1.SolutionTelemetrySuccess.Yes,
|
|
88
|
-
[constants_1.SolutionTelemetryProperty.Capabilities]: ((solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.capabilities) || []).join(";"),
|
|
89
|
-
[constants_1.SolutionTelemetryProperty.ProgrammingLanguage]: (_g = (_f = ctx.projectSetting) === null || _f === void 0 ? void 0 : _f.programmingLanguage) !== null && _g !== void 0 ? _g : "",
|
|
90
|
-
[constants_1.SolutionTelemetryProperty.HostType]: "spfx",
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
ctx.userInteraction.showMessage("info", `Success: ${localizeUtils_1.getLocalizedString("core.create.successNotice")}`, false);
|
|
95
|
-
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
(_h = ctx.telemetryReporter) === null || _h === void 0 ? void 0 : _h.sendTelemetryErrorEvent(constants_1.SolutionTelemetryEvent.Create, {
|
|
99
|
-
[constants_1.SolutionTelemetryProperty.Component]: constants_1.SolutionTelemetryComponentName,
|
|
100
|
-
[constants_1.SolutionTelemetryProperty.Success]: constants_1.SolutionTelemetrySuccess.No,
|
|
101
|
-
[constants_1.SolutionTelemetryProperty.ErrorCode]: result.error.name,
|
|
102
|
-
[constants_1.SolutionTelemetryProperty.ErrorMessage]: result.error.message,
|
|
103
|
-
[constants_1.SolutionTelemetryProperty.HostType]: utils_1.isAzureProject(solutionSettings) ? "azure" : "spfx",
|
|
104
|
-
});
|
|
105
|
-
return teamsfx_api_1.err(result.error);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
exports.scaffoldSourceCode = scaffoldSourceCode;
|
|
109
|
-
async function scaffoldByPlugins(ctx, inputs, localSettings, plugins, concurrent = true) {
|
|
110
|
-
var _a, _b, _c;
|
|
111
|
-
if (plugins.length === 0)
|
|
112
|
-
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
113
|
-
(_a = ctx.logProvider) === null || _a === void 0 ? void 0 : _a.info(`start scaffolding ${plugins.map((p) => p.name).join(",")}.....`);
|
|
114
|
-
const thunks = plugins
|
|
115
|
-
.filter((plugin) => !!plugin.scaffoldSourceCode)
|
|
116
|
-
.map((plugin) => {
|
|
117
|
-
return {
|
|
118
|
-
pluginName: `${plugin.name}`,
|
|
119
|
-
taskName: "scaffoldSourceCode",
|
|
120
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
121
|
-
thunk: () => plugin.scaffoldSourceCode(ctx, inputs),
|
|
122
|
-
};
|
|
123
|
-
});
|
|
124
|
-
const result = await executor_1.executeConcurrently(thunks, ctx.logProvider, concurrent);
|
|
125
|
-
const solutionSettings = utils_1.getAzureSolutionSettings(ctx);
|
|
126
|
-
if (result.kind === "success") {
|
|
127
|
-
const capabilities = (solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.capabilities) || [];
|
|
128
|
-
const azureResources = (solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.azureResources) || [];
|
|
129
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
130
|
-
await scaffoldReadme(capabilities, azureResources, inputs.projectPath);
|
|
131
|
-
const isVs = projectSettingsHelper_1.isVSProject(ctx.projectSetting);
|
|
132
|
-
if (isVs) {
|
|
133
|
-
ctx.logProvider.info(`Success: ${localizeUtils_1.getLocalizedString("core.create.successNotice")}`);
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
ctx.userInteraction.showMessage("info", `Success: ${localizeUtils_1.getLocalizedString("core.create.successNotice")}`, false);
|
|
137
|
-
}
|
|
138
|
-
(_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.info(`finish scaffolding ${plugins.map((p) => p.name).join(",")}!`);
|
|
139
|
-
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
(_c = ctx.logProvider) === null || _c === void 0 ? void 0 : _c.info(`failed to scaffold ${plugins.map((p) => p.name).join(",")}!`);
|
|
143
|
-
return teamsfx_api_1.err(result.error);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
exports.scaffoldByPlugins = scaffoldByPlugins;
|
|
147
|
-
async function scaffoldReadme(capabilities, azureResources, projectPath) {
|
|
148
|
-
capabilities = capabilities || [];
|
|
149
|
-
azureResources = azureResources || [];
|
|
150
|
-
const hasBot = capabilities.includes(question_1.BotOptionItem.id);
|
|
151
|
-
const hasMsgExt = capabilities.includes(question_1.MessageExtensionItem.id);
|
|
152
|
-
const hasTab = capabilities.includes(question_1.TabOptionItem.id);
|
|
153
|
-
if (hasTab && (hasBot || hasMsgExt)) {
|
|
154
|
-
const readme = path_1.default.join(folder_1.getTemplatesFolder(), "plugins", "solution", "README.md");
|
|
155
|
-
if (await fs_extra_1.default.pathExists(readme)) {
|
|
156
|
-
await fs_extra_1.default.copy(readme, `${projectPath}/${teamsfx_api_1.AutoGeneratedReadme}`);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
exports.scaffoldReadme = scaffoldReadme;
|
|
161
|
-
//# sourceMappingURL=scaffolding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scaffolding.js","sourceRoot":"","sources":["../../../../../src/pl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AAM,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,wBAAa,CAAC,EAAE,CAAC,CAAC;IACvD,IAAI,MAAM,IAAI,CAAC,MAAM,IAAI,SAAS,CAAC,EAAE;QACnC,MAAM,MAAM,GAAG,cAAI,CAAC,IAAI,CAAC,2BAAkB,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QACnF,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC/B,MAAM,kBAAE,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,WAAW,IAAI,iCAAmB,EAAE,CAAC,CAAC;SAChE;KACF;AACH,CAAC;AAhBD,wCAgBC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Func, FxError, Inputs, Json, M365TokenProvider, QTreeNode, Result, TokenProvider, v2, Void } from "@microsoft/teamsfx-api";
|
|
2
|
-
import { DeepReadonly, EnvInfoV2 } from "@microsoft/teamsfx-api/build/v2";
|
|
3
|
-
import { provisionResource } from "./provision";
|
|
4
|
-
export declare class TeamsAppSolutionV2 implements v2.SolutionPlugin {
|
|
5
|
-
name: string;
|
|
6
|
-
displayName: string;
|
|
7
|
-
scaffoldSourceCode: (ctx: v2.Context, inputs: Inputs) => Promise<Result<Void, FxError>>;
|
|
8
|
-
generateResourceTemplate: (ctx: v2.Context, inputs: Inputs) => Promise<Result<Json, FxError>>;
|
|
9
|
-
provisionResources: typeof provisionResource;
|
|
10
|
-
deploy?: (ctx: v2.Context, inputs: Inputs, envInfo: EnvInfoV2, tokenProvider: TokenProvider) => Promise<Result<Void, FxError>>;
|
|
11
|
-
publishApplication: (ctx: v2.Context, inputs: Inputs, envInfo: v2.EnvInfoV2, tokenProvider: M365TokenProvider) => Promise<Result<Void, FxError>>;
|
|
12
|
-
provisionLocalResource?: (ctx: v2.Context, inputs: Inputs, localSettings: Json, tokenProvider: TokenProvider, envInfo?: EnvInfoV2) => Promise<v2.FxResult<Json, FxError>>;
|
|
13
|
-
getQuestionsForScaffolding?: (ctx: v2.Context, inputs: Inputs) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
14
|
-
executeUserTask?: (ctx: v2.Context, inputs: Inputs, func: Func, localSettings: Json, envInfo: EnvInfoV2, tokenProvider: TokenProvider) => Promise<Result<unknown, FxError>>;
|
|
15
|
-
createEnv?: (ctx: v2.Context, inputs: Inputs) => Promise<Result<Void, FxError>>;
|
|
16
|
-
getQuestions?: (ctx: v2.Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
17
|
-
getQuestionsForUserTask?: (ctx: v2.Context, inputs: Inputs, func: Func, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
18
|
-
grantPermission?: (ctx: v2.Context, inputs: v2.InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<Json, FxError>>;
|
|
19
|
-
checkPermission?: (ctx: v2.Context, inputs: v2.InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<Json, FxError>>;
|
|
20
|
-
listCollaborator?: (ctx: v2.Context, inputs: v2.InputsWithProjectPath, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<Json, FxError>>;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=solution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solution.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/solution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,OAAO,EACP,MAAM,EACN,IAAI,EACJ,iBAAiB,EACjB,SAAS,EACT,MAAM,EACN,aAAa,EACb,EAAE,EACF,IAAI,EACL,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE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E,CAChB,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,EAAE,CAAC,qBAAqB,EAChC,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,EAChC,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAK0C;IAE7E,gBAAgB,CAAC,EAAE,CACjB,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,EAAE,CAAC,qBAAqB,EAChC,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,EAChC,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAK2C;CAC/E"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TeamsAppSolutionV2 = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const typedi_1 = require("typedi");
|
|
6
|
-
const common_1 = require("../../../../common");
|
|
7
|
-
const constants_1 = require("../../../../common/constants");
|
|
8
|
-
const SolutionPluginContainer_1 = require("../../../../core/SolutionPluginContainer");
|
|
9
|
-
const checkPermission_1 = require("./checkPermission");
|
|
10
|
-
const constants_2 = require("./constants");
|
|
11
|
-
const createEnv_1 = require("./createEnv");
|
|
12
|
-
const deploy_1 = require("./deploy");
|
|
13
|
-
const executeUserTask_1 = require("./executeUserTask");
|
|
14
|
-
const generateResourceTemplate_1 = require("./generateResourceTemplate");
|
|
15
|
-
const getQuestions_1 = require("./getQuestions");
|
|
16
|
-
const grantPermission_1 = require("./grantPermission");
|
|
17
|
-
const listCollaborator_1 = require("./listCollaborator");
|
|
18
|
-
const provision_1 = require("./provision");
|
|
19
|
-
const provisionLocal_1 = require("./provisionLocal");
|
|
20
|
-
const publish_1 = require("./publish");
|
|
21
|
-
const scaffolding_1 = require("./scaffolding");
|
|
22
|
-
let TeamsAppSolutionV2 = class TeamsAppSolutionV2 {
|
|
23
|
-
constructor() {
|
|
24
|
-
this.name = constants_2.TeamsAppSolutionNameV2;
|
|
25
|
-
this.displayName = constants_1.PluginDisplayName.Solution;
|
|
26
|
-
this.scaffoldSourceCode = scaffolding_1.scaffoldSourceCode;
|
|
27
|
-
this.generateResourceTemplate = generateResourceTemplate_1.generateResourceTemplate;
|
|
28
|
-
this.provisionResources = provision_1.provisionResource;
|
|
29
|
-
this.deploy = deploy_1.deploy;
|
|
30
|
-
this.publishApplication = publish_1.publishApplication;
|
|
31
|
-
this.provisionLocalResource = provisionLocal_1.provisionLocalResource;
|
|
32
|
-
this.getQuestionsForScaffolding = common_1.isPreviewFeaturesEnabled()
|
|
33
|
-
? getQuestions_1.getQuestionsForScaffoldingPreview
|
|
34
|
-
: getQuestions_1.getQuestionsForScaffolding;
|
|
35
|
-
this.executeUserTask = executeUserTask_1.executeUserTask;
|
|
36
|
-
this.createEnv = createEnv_1.createEnv;
|
|
37
|
-
this.getQuestions = getQuestions_1.getQuestions;
|
|
38
|
-
this.getQuestionsForUserTask = getQuestions_1.getQuestionsForUserTask;
|
|
39
|
-
this.grantPermission = (ctx, inputs, envInfo, tokenProvider) => grantPermission_1.grantPermission({ apiVersion: 2, ctx, inputs, envInfo, tokenProvider });
|
|
40
|
-
this.checkPermission = (ctx, inputs, envInfo, tokenProvider) => checkPermission_1.checkPermission({ apiVersion: 2, ctx, inputs, envInfo, tokenProvider });
|
|
41
|
-
this.listCollaborator = (ctx, inputs, envInfo, tokenProvider) => listCollaborator_1.listCollaborator({ apiVersion: 2, ctx, inputs, envInfo, tokenProvider });
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
TeamsAppSolutionV2 = tslib_1.__decorate([
|
|
45
|
-
typedi_1.Service(SolutionPluginContainer_1.SolutionPluginsV2.AzureTeamsSolutionV2)
|
|
46
|
-
], TeamsAppSolutionV2);
|
|
47
|
-
exports.TeamsAppSolutionV2 = TeamsAppSolutionV2;
|
|
48
|
-
//# sourceMappingURL=solution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"solution.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/solution.ts"],"names":[],"mappings":";;;;AAaA,mCAAiC;AACjC,+CAA8D;AAC9D,4DAAiE;AACjE,sFAA6E;AAC7E,uDAAoD;AACpD,2CAAqD;AACrD,2CAAwC;AACxC,qCAAkC;AAClC,uDAAoD;AACpD,yEAAsE;AACtE,iDAKwB;AACxB,uDAAoD;AACpD,yDAAsD;AACtD,2CAAgD;AAChD,qDAA0D;AAC1D,uCAA+C;AAC/C,+CAAmD;AAGnD,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;IAA/B;QACE,SAAI,GAAG,kCAAsB,CAAC;QAC9B,gBAAW,GAAW,6BAAiB,CAAC,QAAQ,CAAC;QAEjD,uBAAkB,GAChB,gCAAkB,CAAC;QACrB,6BAAwB,GACtB,mDAAwB,CAAC;QAE3B,uBAAkB,GAAG,6BAAiB,CAAC;QAEvC,WAAM,GAKgC,eAAM,CAAC;QAE7C,uBAAkB,GAKoB,4BAAkB,CAAC;QACzD,2BAAsB,GAMqB,uCAAsB,CAAC;QAElE,+BAA0B,GAG6B,iCAAwB,EAAE;YAC/E,CAAC,CAAC,gDAAiC;YACnC,CAAC,CAAC,yCAA0B,CAAC;QAE/B,oBAAe,GAO0B,iCAAe,CAAC;QAEzD,cAAS,GAAyE,qBAAS,CAAC;QAE5F,iBAAY,GAK2C,2BAAY,CAAC;QAEpE,4BAAuB,GAMgC,sCAAuB,CAAC;QAE/E,oBAAe,GAKuB,CACpC,GAAe,EACf,MAAgC,EAChC,OAAgC,EAChC,aAA4B,EAC5B,EAAE,CAAC,iCAAe,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;QAE7E,oBAAe,GAKuB,CACpC,GAAe,EACf,MAAgC,EAChC,OAAgC,EAChC,aAA4B,EAC5B,EAAE,CAAC,iCAAe,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;QAE7E,qBAAgB,GAKsB,CACpC,GAAe,EACf,MAAgC,EAChC,OAAgC,EAChC,aAA4B,EAC5B,EAAE,CAAC,mCAAgB,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;IAChF,CAAC;CAAA,CAAA;AApGY,kBAAkB;IAD9B,gBAAO,CAAC,2CAAiB,CAAC,oBAAoB,CAAC;GACnC,kBAAkB,CAoG9B;AApGY,gDAAkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/solution/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
"use strict";
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
tslib_1.__exportStar(require("./fx-solution"), exports);
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/solution/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAEb,wDAA8B"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
-
// This file implements a function to call Graph API with TeamsFx SDK to get user profile with SSO token.
|
|
3
|
-
// You can modify this file to add your business with SSO token.
|
|
4
|
-
// See https://aka.ms/teamsfx-add-sso to learn more about adding new command to your bot.
|
|
5
|
-
|
|
6
|
-
const { createMicrosoftGraphClient, TeamsFx } = require("@microsoft/teamsfx");
|
|
7
|
-
|
|
8
|
-
// If you need extra parameters, you can add param in `addCommand`
|
|
9
|
-
async function showUserInfo(context, ssoToken, param) {
|
|
10
|
-
await context.sendActivity("Retrieving user information from Microsoft Graph ...");
|
|
11
|
-
|
|
12
|
-
// Init TeamsFx instance with SSO token
|
|
13
|
-
const teamsfx = new TeamsFx().setSsoToken(ssoToken);
|
|
14
|
-
|
|
15
|
-
// Add scope for your Azure AD app. For example: Mail.Read, etc.
|
|
16
|
-
const graphClient = createMicrosoftGraphClient(teamsfx, ["User.Read"]);
|
|
17
|
-
|
|
18
|
-
// Call graph api use `graph` instance to get user profile information
|
|
19
|
-
const me = await graphClient.api("/me").get();
|
|
20
|
-
if (me) {
|
|
21
|
-
// Bot will send the user profile info to user
|
|
22
|
-
await context.sendActivity(
|
|
23
|
-
`You're logged in as ${me.displayName} (${me.userPrincipalName})${
|
|
24
|
-
me.jobTitle ? `; your job title is: ${me.jobTitle}` : ""
|
|
25
|
-
}.`
|
|
26
|
-
);
|
|
27
|
-
} else {
|
|
28
|
-
await context.sendActivity("Could not retrieve profile information from Microsoft Graph.");
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
module.exports = {
|
|
35
|
-
showUserInfo,
|
|
36
|
-
};
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
-
// This file implements a `ComponentDialog` class for Single Sign On.
|
|
3
|
-
// See https://docs.microsoft.com/javascript/api/botbuilder-dialogs/componentdialog?view=botbuilder-ts-latest for more about `ComponentDialog`.
|
|
4
|
-
// If you are not familiar with this, do not remove or update this file.
|
|
5
|
-
|
|
6
|
-
const {
|
|
7
|
-
ComponentDialog,
|
|
8
|
-
WaterfallDialog,
|
|
9
|
-
Dialog,
|
|
10
|
-
DialogTurnResult,
|
|
11
|
-
DialogSet,
|
|
12
|
-
DialogTurnStatus,
|
|
13
|
-
} = require("botbuilder-dialogs");
|
|
14
|
-
const { ActivityTypes, tokenExchangeOperationName, TurnContext } = require("botbuilder");
|
|
15
|
-
const { TeamsBotSsoPrompt, TeamsFx } = require("@microsoft/teamsfx");
|
|
16
|
-
require("isomorphic-fetch");
|
|
17
|
-
|
|
18
|
-
const DIALOG_NAME = "SSODialog";
|
|
19
|
-
const TEAMS_SSO_PROMPT_ID = "TeamsFxSsoPrompt";
|
|
20
|
-
const COMMAND_ROUTE_DIALOG = "CommandRouteDialog";
|
|
21
|
-
|
|
22
|
-
class SsoDialog extends ComponentDialog {
|
|
23
|
-
constructor(dedupStorage, requiredScopes) {
|
|
24
|
-
super(DIALOG_NAME);
|
|
25
|
-
|
|
26
|
-
this.initialDialogId = COMMAND_ROUTE_DIALOG;
|
|
27
|
-
|
|
28
|
-
this.dedupStorage = dedupStorage;
|
|
29
|
-
this.dedupStorageKeys = [];
|
|
30
|
-
this.requiredScopes = requiredScopes;
|
|
31
|
-
this.commandMapping = new Map();
|
|
32
|
-
|
|
33
|
-
const teamsFx = new TeamsFx();
|
|
34
|
-
const ssoDialog = new TeamsBotSsoPrompt(teamsFx, TEAMS_SSO_PROMPT_ID, {
|
|
35
|
-
scopes: this.requiredScopes,
|
|
36
|
-
endOnInvalidMessage: true,
|
|
37
|
-
});
|
|
38
|
-
this.addDialog(ssoDialog);
|
|
39
|
-
|
|
40
|
-
const commandRouteDialog = new WaterfallDialog(COMMAND_ROUTE_DIALOG, [
|
|
41
|
-
this.commandRouteStep.bind(this),
|
|
42
|
-
]);
|
|
43
|
-
this.addDialog(commandRouteDialog);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
addCommand(commandId, commandText, operation, ...param) {
|
|
47
|
-
const dialog = new WaterfallDialog(commandId, [
|
|
48
|
-
this.ssoStep.bind(this),
|
|
49
|
-
this.dedupStep.bind(this),
|
|
50
|
-
async (stepContext) => {
|
|
51
|
-
const tokenResponse = stepContext.result;
|
|
52
|
-
const context = stepContext.context;
|
|
53
|
-
try {
|
|
54
|
-
if (tokenResponse) {
|
|
55
|
-
await operation(context, tokenResponse.ssoToken, param);
|
|
56
|
-
} else {
|
|
57
|
-
await context.sendActivity("Failed to retrieve user token from conversation context.");
|
|
58
|
-
}
|
|
59
|
-
return await stepContext.endDialog();
|
|
60
|
-
} catch (error) {
|
|
61
|
-
await context.sendActivity("Failed to retrieve user token from conversation context.");
|
|
62
|
-
await context.sendActivity(error.message);
|
|
63
|
-
return await stepContext.endDialog();
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
]);
|
|
67
|
-
|
|
68
|
-
if (this.commandMapping.has(commandId)) {
|
|
69
|
-
throw new Error(`Cannot add command. There is already a command with same id ${commandId}`);
|
|
70
|
-
}
|
|
71
|
-
this.commandMapping.set(commandId, commandText);
|
|
72
|
-
this.addDialog(dialog);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The run method handles the incoming activity (in the form of a DialogContext) and passes it through the dialog system.
|
|
77
|
-
* If no dialog is active, it will start the default dialog.
|
|
78
|
-
* @param {*} dialogContext
|
|
79
|
-
*/
|
|
80
|
-
async run(context, accessor) {
|
|
81
|
-
const dialogSet = new DialogSet(accessor);
|
|
82
|
-
dialogSet.add(this);
|
|
83
|
-
|
|
84
|
-
const dialogContext = await dialogSet.createContext(context);
|
|
85
|
-
const results = await dialogContext.continueDialog();
|
|
86
|
-
if (results && results.status === DialogTurnStatus.empty) {
|
|
87
|
-
await dialogContext.beginDialog(this.id);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
async commandRouteStep(stepContext) {
|
|
92
|
-
const turnContext = stepContext.context;
|
|
93
|
-
|
|
94
|
-
// remove the mention of this bot
|
|
95
|
-
let text = TurnContext.removeRecipientMention(turnContext.activity);
|
|
96
|
-
if (text) {
|
|
97
|
-
// remove the line break
|
|
98
|
-
text = text.toLowerCase().replace(/\n|\r/g, "").trim();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const commandId = this.matchCommands(text);
|
|
102
|
-
if (commandId) {
|
|
103
|
-
return await stepContext.beginDialog(commandId);
|
|
104
|
-
}
|
|
105
|
-
return await stepContext.endDialog();
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
async ssoStep(stepContext) {
|
|
109
|
-
try {
|
|
110
|
-
return await stepContext.beginDialog(TEAMS_SSO_PROMPT_ID);
|
|
111
|
-
} catch (error) {
|
|
112
|
-
const context = stepContext.context;
|
|
113
|
-
await context.sendActivity("Failed to run SSO step");
|
|
114
|
-
await context.sendActivity(error.message);
|
|
115
|
-
return await stepContext.endDialog();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
async dedupStep(stepContext) {
|
|
120
|
-
try {
|
|
121
|
-
const tokenResponse = stepContext.result;
|
|
122
|
-
// Only dedup after ssoStep to make sure that all Teams client would receive the login request
|
|
123
|
-
if (tokenResponse && (await this.shouldDedup(stepContext.context))) {
|
|
124
|
-
return Dialog.EndOfTurn;
|
|
125
|
-
}
|
|
126
|
-
return await stepContext.next(tokenResponse);
|
|
127
|
-
} catch (error) {
|
|
128
|
-
const context = stepContext.context;
|
|
129
|
-
await context.sendActivity("Failed to run dedup step");
|
|
130
|
-
await context.sendActivity(error.message);
|
|
131
|
-
return await stepContext.endDialog();
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
async onEndDialog(context) {
|
|
136
|
-
const conversationId = context.activity.conversation.id;
|
|
137
|
-
const currentDedupKeys = this.dedupStorageKeys.filter((key) => key.indexOf(conversationId) > 0);
|
|
138
|
-
await this.dedupStorage.delete(currentDedupKeys);
|
|
139
|
-
this.dedupStorageKeys = this.dedupStorageKeys.filter((key) => key.indexOf(conversationId) < 0);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// If a user is signed into multiple Teams clients, the Bot might receive a "signin/tokenExchange" from each client.
|
|
143
|
-
// Each token exchange request for a specific user login will have an identical activity.value.Id.
|
|
144
|
-
// Only one of these token exchange requests should be processed by the bot. For a distributed bot in production,
|
|
145
|
-
// this requires a distributed storage to ensure only one token exchange is processed.
|
|
146
|
-
async shouldDedup(context) {
|
|
147
|
-
const storeItem = {
|
|
148
|
-
eTag: context.activity.value.id,
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
const key = this.getStorageKey(context);
|
|
152
|
-
const storeItems = { [key]: storeItem };
|
|
153
|
-
|
|
154
|
-
try {
|
|
155
|
-
await this.dedupStorage.write(storeItems);
|
|
156
|
-
this.dedupStorageKeys.push(key);
|
|
157
|
-
} catch (err) {
|
|
158
|
-
if (err instanceof Error && err.message.indexOf("eTag conflict")) {
|
|
159
|
-
return true;
|
|
160
|
-
}
|
|
161
|
-
throw err;
|
|
162
|
-
}
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
getStorageKey(context) {
|
|
167
|
-
if (!context || !context.activity || !context.activity.conversation) {
|
|
168
|
-
throw new Error("Invalid context, can not get storage key!");
|
|
169
|
-
}
|
|
170
|
-
const activity = context.activity;
|
|
171
|
-
const channelId = activity.channelId;
|
|
172
|
-
const conversationId = activity.conversation.id;
|
|
173
|
-
if (activity.type !== ActivityTypes.Invoke || activity.name !== tokenExchangeOperationName) {
|
|
174
|
-
throw new Error("TokenExchangeState can only be used with Invokes of signin/tokenExchange.");
|
|
175
|
-
}
|
|
176
|
-
const value = activity.value;
|
|
177
|
-
if (!value || !value.id) {
|
|
178
|
-
throw new Error("Invalid signin/tokenExchange. Missing activity.value.id.");
|
|
179
|
-
}
|
|
180
|
-
return `${channelId}/${conversationId}/${value.id}`;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
matchCommands(text) {
|
|
184
|
-
for (const command of this.commandMapping) {
|
|
185
|
-
const pattern = command[1];
|
|
186
|
-
let matchResult;
|
|
187
|
-
if (typeof pattern == "string") {
|
|
188
|
-
matchResult = text === pattern;
|
|
189
|
-
} else {
|
|
190
|
-
matchResult = pattern.exec(text);
|
|
191
|
-
}
|
|
192
|
-
if (matchResult) {
|
|
193
|
-
return command[0]; // Return the command id
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
return undefined;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
exports.SsoDialog = SsoDialog;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
-
// This file implements a `TeamsActivityHandler` class using `ssoDialog` and add `showUserInfo` as a command.
|
|
3
|
-
// See https://docs.microsoft.com/javascript/api/botbuilder/teamsactivityhandler?view=botbuilder-ts-latest for more about `TeamsActivityHandler`.
|
|
4
|
-
// You can add your own command that requires SSO in this file.
|
|
5
|
-
|
|
6
|
-
const { ConversationState, MemoryStorage, TeamsActivityHandler, UserState } = require("botbuilder");
|
|
7
|
-
const { showUserInfo } = require("./showUserInfo");
|
|
8
|
-
const { SsoDialog } = require("./ssoDialog");
|
|
9
|
-
|
|
10
|
-
class TeamsSsoBot extends TeamsActivityHandler {
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
|
|
14
|
-
// Define the state store for your bot.
|
|
15
|
-
// See https://aka.ms/about-bot-state to learn more about using MemoryStorage.
|
|
16
|
-
// A bot requires a state storage system to persist the dialog and user state between messages.
|
|
17
|
-
const memoryStorage = new MemoryStorage();
|
|
18
|
-
|
|
19
|
-
// Create conversation and user state with in-memory storage provider.
|
|
20
|
-
this.conversationState = new ConversationState(memoryStorage);
|
|
21
|
-
this.userState = new UserState(memoryStorage);
|
|
22
|
-
this.dialog = new SsoDialog(new MemoryStorage(), ["User.Read"]);
|
|
23
|
-
this.dialogState = this.conversationState.createProperty("DialogState");
|
|
24
|
-
|
|
25
|
-
// Add commands that requires user authentication
|
|
26
|
-
this.dialog.addCommand("ShowUserProfile", "show", showUserInfo);
|
|
27
|
-
// Call the `addCommand` function to add more customized commands with your own parameters, e.g.
|
|
28
|
-
// this.dialog.addCommand("ManageToDo", new RegExp("todo\s*.*"), todoCmdHandler, param);
|
|
29
|
-
|
|
30
|
-
this.onMessage(async (context, next) => {
|
|
31
|
-
console.log("Running with Message Activity.");
|
|
32
|
-
|
|
33
|
-
// Run the Dialog with the new message Activity.
|
|
34
|
-
await this.dialog.run(context, this.dialogState);
|
|
35
|
-
|
|
36
|
-
// By calling next() you ensure that the next BotHandler is run.
|
|
37
|
-
await next();
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async run(context) {
|
|
42
|
-
await super.run(context);
|
|
43
|
-
|
|
44
|
-
// Save any state changes. The load happened during the execution of the Dialog.
|
|
45
|
-
await this.conversationState.saveChanges(context, false);
|
|
46
|
-
await this.userState.saveChanges(context, false);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async handleTeamsSigninVerifyState(context, query) {
|
|
50
|
-
console.log("Running dialog with signin/verifystate from an Invoke Activity.");
|
|
51
|
-
await this.dialog.run(context, this.dialogState);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async handleTeamsSigninTokenExchange(context, query) {
|
|
55
|
-
await this.dialog.run(context, this.dialogState);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
async onSignInInvoke(context) {
|
|
59
|
-
await this.dialog.run(context, this.dialogState);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
exports.TeamsSsoBot = TeamsSsoBot;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// This file is auto generated by Teams Toolkit to provide you instructions and reference code to implement single sign on.
|
|
2
|
-
// This file implements a function to call Graph API with TeamsFx SDK to get user profile with SSO token.
|
|
3
|
-
// You can modify this file to add your business with SSO token.
|
|
4
|
-
// See https://aka.ms/teamsfx-add-sso to learn more about adding new command to your bot.
|
|
5
|
-
|
|
6
|
-
import { createMicrosoftGraphClient, TeamsFx } from "@microsoft/teamsfx";
|
|
7
|
-
import { TurnContext } from "botbuilder";
|
|
8
|
-
import { DialogTurnResult } from "botbuilder-dialogs";
|
|
9
|
-
|
|
10
|
-
// If you need extra parameters, you can add param in `addCommand`
|
|
11
|
-
export async function showUserInfo(
|
|
12
|
-
context: TurnContext,
|
|
13
|
-
ssoToken: string,
|
|
14
|
-
param: any[]
|
|
15
|
-
): Promise<DialogTurnResult> {
|
|
16
|
-
await context.sendActivity("Retrieving user information from Microsoft Graph ...");
|
|
17
|
-
|
|
18
|
-
// Init TeamsFx instance with SSO token
|
|
19
|
-
const teamsfx = new TeamsFx().setSsoToken(ssoToken);
|
|
20
|
-
|
|
21
|
-
// Add scope for your Azure AD app. For example: Mail.Read, etc.
|
|
22
|
-
const graphClient = createMicrosoftGraphClient(teamsfx, ["User.Read"]);
|
|
23
|
-
|
|
24
|
-
// Call graph api use `graph` instance to get user profile information
|
|
25
|
-
const me = await graphClient.api("/me").get();
|
|
26
|
-
if (me) {
|
|
27
|
-
// Bot will send the user profile info to user
|
|
28
|
-
await context.sendActivity(
|
|
29
|
-
`You're logged in as ${me.displayName} (${me.userPrincipalName})${
|
|
30
|
-
me.jobTitle ? `; your job title is: ${me.jobTitle}` : ""
|
|
31
|
-
}.`
|
|
32
|
-
);
|
|
33
|
-
} else {
|
|
34
|
-
await context.sendActivity("Could not retrieve profile information from Microsoft Graph.");
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return;
|
|
38
|
-
}
|