@microsoft/teamsfx-core 2.0.6 → 2.0.7-alpha.07c4fbf2b.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 +1 -0
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +1 -0
- package/build/common/constants.js.map +1 -1
- package/build/common/deps-checker/checkerFactory.d.ts.map +1 -1
- package/build/common/deps-checker/checkerFactory.js +3 -0
- package/build/common/deps-checker/checkerFactory.js.map +1 -1
- package/build/common/deps-checker/constant/telemetry.d.ts +1 -0
- package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -1
- package/build/common/deps-checker/constant/telemetry.js +1 -0
- package/build/common/deps-checker/constant/telemetry.js.map +1 -1
- package/build/common/deps-checker/coreDepsLoggerAdapter.d.ts +17 -0
- package/build/common/deps-checker/coreDepsLoggerAdapter.d.ts.map +1 -0
- package/build/common/deps-checker/coreDepsLoggerAdapter.js +47 -0
- package/build/common/deps-checker/coreDepsLoggerAdapter.js.map +1 -0
- package/build/common/deps-checker/coreDepsTelemetryAdapter.d.ts +16 -0
- package/build/common/deps-checker/coreDepsTelemetryAdapter.d.ts.map +1 -0
- package/build/common/deps-checker/coreDepsTelemetryAdapter.js +53 -0
- package/build/common/deps-checker/coreDepsTelemetryAdapter.js.map +1 -0
- package/build/common/deps-checker/depsChecker.d.ts +6 -1
- package/build/common/deps-checker/depsChecker.d.ts.map +1 -1
- package/build/common/deps-checker/depsChecker.js +6 -1
- package/build/common/deps-checker/depsChecker.js.map +1 -1
- package/build/common/deps-checker/index.d.ts +2 -0
- package/build/common/deps-checker/index.d.ts.map +1 -1
- package/build/common/deps-checker/index.js +2 -0
- package/build/common/deps-checker/index.js.map +1 -1
- package/build/common/deps-checker/internal/testToolChecker.d.ts +14 -3
- package/build/common/deps-checker/internal/testToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/testToolChecker.js +178 -75
- package/build/common/deps-checker/internal/testToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/vxTestAppChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/vxTestAppChecker.js +3 -45
- package/build/common/deps-checker/internal/vxTestAppChecker.js.map +1 -1
- package/build/common/deps-checker/util/downloadHelper.d.ts +15 -0
- package/build/common/deps-checker/util/downloadHelper.d.ts.map +1 -0
- package/build/common/deps-checker/util/downloadHelper.js +59 -0
- package/build/common/deps-checker/util/downloadHelper.js.map +1 -0
- package/build/common/featureFlags.d.ts +1 -2
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +5 -9
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/local/packageJsonHelper.d.ts +0 -1
- package/build/common/local/packageJsonHelper.d.ts.map +1 -1
- package/build/common/local/packageJsonHelper.js +1 -29
- package/build/common/local/packageJsonHelper.js.map +1 -1
- package/build/common/m365/packageService.d.ts +2 -2
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +43 -19
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/projectTypeChecker.d.ts +38 -0
- package/build/common/projectTypeChecker.d.ts.map +1 -0
- package/build/common/projectTypeChecker.js +217 -0
- package/build/common/projectTypeChecker.js.map +1 -0
- package/build/common/samples.d.ts +6 -4
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +64 -29
- package/build/common/samples.js.map +1 -1
- package/build/common/spec-parser/interfaces.d.ts +14 -1
- package/build/common/spec-parser/interfaces.d.ts.map +1 -1
- package/build/common/spec-parser/manifestUpdater.d.ts +2 -2
- package/build/common/spec-parser/manifestUpdater.d.ts.map +1 -1
- package/build/common/spec-parser/manifestUpdater.js +33 -19
- package/build/common/spec-parser/manifestUpdater.js.map +1 -1
- package/build/common/spec-parser/specFilter.d.ts +1 -1
- package/build/common/spec-parser/specFilter.d.ts.map +1 -1
- package/build/common/spec-parser/specFilter.js +2 -2
- package/build/common/spec-parser/specFilter.js.map +1 -1
- package/build/common/spec-parser/specParser.browser.d.ts.map +1 -1
- package/build/common/spec-parser/specParser.browser.js +5 -3
- package/build/common/spec-parser/specParser.browser.js.map +1 -1
- package/build/common/spec-parser/specParser.d.ts.map +1 -1
- package/build/common/spec-parser/specParser.js +36 -37
- package/build/common/spec-parser/specParser.js.map +1 -1
- package/build/common/spec-parser/utils.d.ts +12 -8
- package/build/common/spec-parser/utils.d.ts.map +1 -1
- package/build/common/spec-parser/utils.js +97 -34
- package/build/common/spec-parser/utils.js.map +1 -1
- package/build/common/telemetry.d.ts +17 -1
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +35 -1
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +1 -1
- package/build/common/tools.d.ts +1 -1
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +2 -2
- package/build/common/tools.js.map +1 -1
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +1 -1
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/constant/commonConstant.d.ts +1 -0
- package/build/component/constant/commonConstant.d.ts.map +1 -1
- package/build/component/constant/commonConstant.js +2 -0
- package/build/component/constant/commonConstant.js.map +1 -1
- package/build/component/coordinator/index.d.ts +2 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +12 -2
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.d.ts +9 -0
- package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.js +37 -1
- package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.js +9 -6
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js +6 -0
- package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
- package/build/component/driver/aad/utility/constants.d.ts +1 -0
- package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
- package/build/component/driver/aad/utility/constants.js +1 -0
- package/build/component/driver/aad/utility/constants.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts.map +1 -1
- package/build/component/driver/apiKey/create.js +7 -3
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts +12 -0
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts.map +1 -0
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js +71 -0
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js.map +1 -0
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts +3 -2
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +5 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts +5 -0
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +21 -0
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
- package/build/component/driver/devTool/installDriver.d.ts +2 -1
- package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
- package/build/component/driver/devTool/installDriver.js +5 -2
- package/build/component/driver/devTool/installDriver.js.map +1 -1
- package/build/component/driver/index.d.ts +1 -0
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +1 -0
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/interface/provisionArgs.d.ts +3 -0
- package/build/component/driver/interface/provisionArgs.d.ts.map +1 -1
- package/build/component/driver/interface/stepDriver.d.ts +2 -1
- package/build/component/driver/interface/stepDriver.d.ts.map +1 -1
- package/build/component/driver/middleware/addSWADeployTelemetry.d.ts +7 -0
- package/build/component/driver/middleware/addSWADeployTelemetry.d.ts.map +1 -0
- package/build/component/driver/middleware/addSWADeployTelemetry.js +52 -0
- package/build/component/driver/middleware/addSWADeployTelemetry.js.map +1 -0
- package/build/component/driver/middleware/addStartAndEndTelemetry.d.ts +3 -0
- package/build/component/driver/middleware/addStartAndEndTelemetry.d.ts.map +1 -1
- package/build/component/driver/middleware/addStartAndEndTelemetry.js +2 -1
- package/build/component/driver/middleware/addStartAndEndTelemetry.js.map +1 -1
- package/build/component/driver/script/npxBuildDriver.d.ts.map +1 -1
- package/build/component/driver/script/npxBuildDriver.js +5 -1
- package/build/component/driver/script/npxBuildDriver.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts +12 -8
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +54 -36
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +52 -33
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.d.ts +7 -0
- package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.js +3 -2
- package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +14 -8
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/generator.js +5 -4
- package/build/component/generator/copilotPlugin/generator.js.map +1 -1
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/helper.js +6 -2
- package/build/component/generator/copilotPlugin/helper.js.map +1 -1
- package/build/component/generator/error.d.ts +5 -8
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +16 -16
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generator.d.ts +1 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +16 -25
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +4 -1
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +24 -6
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +21 -20
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/dependencyChecker.d.ts +1 -1
- package/build/component/generator/spfx/depsChecker/dependencyChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts +4 -3
- package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.js +30 -20
- package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.d.ts +3 -2
- package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.js +27 -18
- package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
- package/build/component/generator/spfx/error.d.ts +2 -0
- package/build/component/generator/spfx/error.d.ts.map +1 -1
- package/build/component/generator/spfx/error.js +16 -1
- package/build/component/generator/spfx/error.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts +3 -0
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +149 -20
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +3 -0
- package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/constants.js +3 -0
- package/build/component/generator/spfx/utils/constants.js.map +1 -1
- package/build/component/generator/spfx/utils/telemetryEvents.d.ts +7 -8
- package/build/component/generator/spfx/utils/telemetryEvents.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/telemetryEvents.js +5 -6
- package/build/component/generator/spfx/utils/telemetryEvents.js.map +1 -1
- package/build/component/generator/spfx/utils/utils.js +1 -1
- package/build/component/generator/utils.d.ts +5 -2
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +32 -12
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/utils/common.d.ts +4 -1
- package/build/component/utils/common.d.ts.map +1 -1
- package/build/component/utils/common.js +21 -17
- package/build/component/utils/common.js.map +1 -1
- package/build/component/utils/envUtil.d.ts +1 -0
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +14 -2
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/fileOperation.d.ts +1 -1
- package/build/component/utils/fileOperation.d.ts.map +1 -1
- package/build/component/utils/fileOperation.js +34 -48
- package/build/component/utils/fileOperation.js.map +1 -1
- package/build/core/FxCore.d.ts +5 -0
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +48 -24
- package/build/core/FxCore.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +10 -9
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.js +4 -4
- package/build/core/middleware/projectVersionChecker.js.map +1 -1
- package/build/error/deploy.d.ts +6 -0
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +25 -1
- package/build/error/deploy.js.map +1 -1
- package/build/error/teamsApp.js +1 -1
- package/build/error/teamsApp.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +14 -5
- package/build/question/create.js.map +1 -1
- package/build/question/generator.js +1 -3
- package/build/question/generator.js.map +1 -1
- package/build/question/options/CreateProjectOptions.js +1 -1
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/options/CreateSampleProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateSampleProjectOptions.js +5 -1
- package/build/question/options/CreateSampleProjectOptions.js.map +1 -1
- package/build/question/options/DeployAadManifestOptions.js +1 -1
- package/build/question/options/DeployAadManifestOptions.js.map +1 -1
- package/build/question/options/PermissionGrantOptions.js +1 -1
- package/build/question/options/PermissionGrantOptions.js.map +1 -1
- package/build/question/options/PermissionListOptions.js +1 -1
- package/build/question/options/PermissionListOptions.js.map +1 -1
- package/build/question/other.d.ts +2 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +22 -8
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +1 -0
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +1 -0
- package/build/question/questionNames.js.map +1 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +11 -2
- package/build/ui/visitor.js.map +1 -1
- package/package.json +14 -22
- package/resource/package.nls.json +27 -7
- package/resource/yaml-schema/v1.3/yaml.schema.json +42 -5
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/plugins/resource/aad/auth/V3/Bot/Pages/BotAuthorizeEndPage.cshtml +55 -51
- package/templates/plugins/resource/aad/auth/bot/csharp/Pages/BotAuthorizeEndPage.cshtml +55 -51
- package/templates/plugins/resource/aad/auth/bot/js/public/auth-end.html +6 -2
- package/templates/plugins/resource/aad/auth/bot/ts/public/auth-end.html +5 -1
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-end.html +16 -9
- package/templates/plugins/resource/aad/auth/tab/js/public/auth-start.html +11 -7
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-end.html +16 -9
- package/templates/plugins/resource/aad/auth/tab/ts/public/auth-start.html +11 -7
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"core.migrationV3.manifestNotExist": "templates/appPackage/manifest.template.json does not exist. You may be trying to upgrade a project created by Teams Toolkit for Visual Studio Code v3.x / Teams Toolkit CLI v0.x / Teams Toolkit for Visual Studio v17.3. Please install Teams Toolkit for Visual Studio Code v4.x / Teams Toolkit CLI v1.x / Teams Toolkit for Visual Studio v17.4 and run upgrade first.",
|
|
34
34
|
"core.migrationV3.manifestInvalid": "templates/appPackage/manifest.template.json is invalid.",
|
|
35
35
|
"core.migrationV3.abandonedProject": "This project is only for previewing and will not be supported by Teams Toolkit. Please try Teams Toolkit by creating a new project",
|
|
36
|
-
"core.migrationV3.notAllowedMigration": "Teams Toolkit's Pre-Release version supports new project configuration and is incompatible with previous versions. Try it by creating a new project or run \"
|
|
37
|
-
"core.projectVersionChecker.cliUseNewVersion": "Your TeamFx CLI version is old and it doesn't support current project, please upgrade to the latest version using command below:\nnpm install -g @microsoft/
|
|
36
|
+
"core.migrationV3.notAllowedMigration": "Teams Toolkit's Pre-Release version supports new project configuration and is incompatible with previous versions. Try it by creating a new project or run \"teamsapp upgrade\" to upgrade your project first.",
|
|
37
|
+
"core.projectVersionChecker.cliUseNewVersion": "Your TeamFx CLI version is old and it doesn't support current project, please upgrade to the latest version using command below:\nnpm install -g @microsoft/teamsapp-cli@latest",
|
|
38
38
|
"core.projectVersionChecker.incompatibleProject": "The current project is incompatible with the installed version of Teams Toolkit.",
|
|
39
39
|
"core.projectVersionChecker.vs.incompatibleProject": "The project in the solution is created with Teams Toolkit preview feature - Teams App Configuration Improvements. You can turn on the preview feature to continue.",
|
|
40
40
|
"core.deployArmTemplates.ActionSuccess": "Successfully deployed ARM templates. Resource group name: %s. Deployment name: %s",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"plugins.spfx.scaffold.scaffoldProject": "Generate SPFx project using Yeoman CLI",
|
|
98
98
|
"plugins.spfx.scaffold.updateManifest": "Update webpart manifest",
|
|
99
99
|
"plugins.spfx.GetTenantFailedError": "Cannot get tenant %s %s",
|
|
100
|
-
"plugins.spfx.error.installLatestDependencyError": "Encountered unknown issues when setting up SPFx environment in %s folder.
|
|
100
|
+
"plugins.spfx.error.installLatestDependencyError": "Encountered unknown issues when setting up SPFx environment in %s folder. Follow [Set up your SharePoint Framework development environment | Microsoft Learn](%s) to set up global SPFx environment.",
|
|
101
101
|
"_plugins.spfx.error.installLatestDependencyError.comment": "'Microsoft Learn' and 'SharePoint' are the product brand names which should not be localized.",
|
|
102
102
|
"plugins.spfx.error.scaffoldError": "Project creation failed. A possible reason could be from Yeoman SharePoint Generator. Check [Output panel](%s) for details.",
|
|
103
103
|
"plugins.spfx.error.import.retrieveSolutionInfo": "Failed to retrieve existing SPFx solution information. Please make sure your SPFx solution is valid.",
|
|
@@ -111,6 +111,17 @@
|
|
|
111
111
|
"plugins.spfx.import.success": "Your SPFx solution has been successfully imported to %s.",
|
|
112
112
|
"plugins.spfx.import.log.success": "Teams Toolkit has imported your SPFx solution successfully. A complete log of import details can be found in %s.",
|
|
113
113
|
"plugins.spfx.import.log.fail": "Teams Toolkit failed to import your SPFx solution. A complete log of import details can be found in %s.",
|
|
114
|
+
"plugins.spfx.addWebPart.confirmInstall": "SPFx version in your solution is %s, not yet installed on your machine. Do you want to install SPFx %s in Teams Toolkit directory to continue adding web part?",
|
|
115
|
+
"plugins.spfx.addWebPart.install": "Install",
|
|
116
|
+
"plugins.spfx.addWebPart.confirmUpgrade": "Teams Toolkit is using SPFx version %s, but SPFx version in your solution is %s. Do you want to upgrade SPFx version in Teams Toolkit directory to %s and add web part?",
|
|
117
|
+
"plugins.spfx.addWebPart.upgrade": "Upgrade",
|
|
118
|
+
"plugins.spfx.addWebPart.versionMismatch.continueConfirm": "SPFx version in your solution is %s, not yet installed on this machine. Teams Toolkit uses SPFx installed in Teams Toolkit directory by default (%s). The version mismatch may cause unexpected error. Do you want to continue?",
|
|
119
|
+
"plugins.spfx.addWebPart.versionMismatch.help": "Help",
|
|
120
|
+
"plugins.spfx.addWebPart.versionMismatch.continue": "Continue",
|
|
121
|
+
"plugins.spfx.addWebPart.versionMismatch.output": "SPFx version in your solution is %s. You have %s installed globally and %s installed in Teams Toolkit directory. Teams Toolkit uses SPFx installed in Teams Toolkit directory by default (%s). The version mismatch may cause unexpected error. Find possible solutions in %s.",
|
|
122
|
+
"plugins.spfx.addWebPart.versionMismatch.localOnly.output": "SPFx version in your solution is %s. You have %s installed in Teams Toolkit directory. Teams Toolkit uses SPFx installed in Teams Toolkit directory by default (%s). The version mismatch may cause unexpected error. Find possible solutions in %s.",
|
|
123
|
+
"plugins.spfx.addWebPart.cannotFindSolutionVersion": "Unable to find SPFx version in your solution in %s",
|
|
124
|
+
"plugins.spfx.error.installDependencyError": "Encountered unknown issues when setting up SPFx environment in %s folder. Follow %s to install %s to set up global SPFx environment.",
|
|
114
125
|
"plugins.frontend.checkNetworkTip": "Check your network connection.",
|
|
115
126
|
"plugins.frontend.checkFsPermissionsTip": "Check if you have Read/Write permissions to your file system.",
|
|
116
127
|
"plugins.frontend.checkStoragePermissionsTip": "Check if you have permissions to your Azure Storage Account.",
|
|
@@ -199,18 +210,18 @@
|
|
|
199
210
|
"error.generator.TemplateZipFallbackError": "Unable to download zip package and open local zip package.",
|
|
200
211
|
"error.generator.TemplateNotFoundError": "Unable to find template: %s.",
|
|
201
212
|
"error.generator.SampleNotFoundError": "Unable to find sample: %s.",
|
|
202
|
-
"error.generator.FetchZipFromUrlError": "Unable to download zip package from %s.",
|
|
203
213
|
"error.generator.UnzipError": "Unable to unzip templates and write to disk.",
|
|
204
214
|
"error.generator.MissKeyError": "Unable to find key %s",
|
|
215
|
+
"error.generator.FetchSampleInfoError": "Unable to fetch sample info",
|
|
205
216
|
"error.generator.DownloadSampleApiLimitError": "Unable to download sample due to throttling. Retry later after rate limit reset (This may take up to 1 hour). Alternatively, you can go to %s to git clone the repo manually",
|
|
206
217
|
"error.generator.DownloadSampleNetworkError": "Unable to download sample due to network error. Check your network connection and retry. Alternatively, you can go to %s to git clone the repo manually",
|
|
207
|
-
"error.generator.ParseUrlError": "Unable to parse url %s",
|
|
208
218
|
"error.copilotPlugin.openAiPluginManifest.CannotGetManifest": "Unable to get OpenAI plugin manifest from '%s'.",
|
|
209
219
|
"error.copilotPlugin.noExtraAPICanBeAdded": "No API can be added. Only GET and POST methods with at most one required parameter and no auth are supported. Methods defined in manifest.json are not listed.",
|
|
210
220
|
"error.m365.NotExtendedToM365Error": "Unable to extend Teams app to Microsoft 365. Use 'teamsApp/extendToM365' action to extend your Teams app to Microsoft 365.",
|
|
211
221
|
"core.QuestionAppName.validation.pattern": "Application name must start with letters and contain at least two letters or digits. It can not contain some special characters.",
|
|
212
222
|
"core.QuestionAppName.validation.maxlength": "Application name is longer than the maximum length of 30.",
|
|
213
223
|
"core.QuestionAppName.validation.pathExist": "Path exists: %s. Select a different application name.",
|
|
224
|
+
"core.QuestionAppName.validation.lengthWarning": "Your application name may exceed the maximum length of 30 characters because Teams Toolkit will automatically append a \"local\" suffix for the Teams application registered for local debugging purposes. You may continue, but make sure to update your application name in the \"manifest.json\" file.",
|
|
214
225
|
"core.ProgrammingLanguageQuestion.placeholder": "Select a programming language.",
|
|
215
226
|
"core.ProgrammingLanguageQuestion.placeholder.spfx": "SPFx is currently supporting TypeScript only.",
|
|
216
227
|
"core.option.tutorial": "Open tutorial",
|
|
@@ -293,7 +304,8 @@
|
|
|
293
304
|
"core.createProjectQuestion.apiSpecInputUrl.label": "Enter OpenAPI Description Document Location",
|
|
294
305
|
"core.createProjectQuestion.OpenAIPluginDomain": "OpenAI Plugin Manifest",
|
|
295
306
|
"core.createProjectQuestion.OpenAIPluginDomain.placeholder": "Enter your website domain or manifest URL",
|
|
296
|
-
"core.
|
|
307
|
+
"core.createProjectQuestion.ApiKey": "Enter API Key in OpenAPI Description Document",
|
|
308
|
+
"core.createProjectQuestion.ApiKeyConfirm": "Teams Toolkit will upload the API key to Teams Developer Portal. The API key will be used by Teams client to securely access your API in runtime when API-Based Message Extension is triggered. Teams Toolkit will not store your API key.",
|
|
297
309
|
"core.createProjectQuestion.invalidApiKey.message": "Client secret is invalid. The length of secret should be >= 10 and <= 128",
|
|
298
310
|
"core.createProjectQuestion.invalidUrl.message": "Enter a valid HTTP URL without authentication to access your OpenAPI description document.",
|
|
299
311
|
"core.createProjectQuestion.apiSpec.operation.title": "Select Operation(s) Teams Can Interact with",
|
|
@@ -405,7 +417,7 @@
|
|
|
405
417
|
"core.common.NoServerInformation": "No server information is found in the OpenAPI description document.",
|
|
406
418
|
"core.common.RemoteRefNotSupported": "Remote reference is not supported: %s.",
|
|
407
419
|
"core.common.MissingOperationId": "Missing operationIds: %s.",
|
|
408
|
-
"core.common.NoSupportedApi": "No supported API is found in the OpenAPI description document: only GET and POST methods are supported, additionally, there can be at most one required parameter, and no auth is allowed.",
|
|
420
|
+
"core.common.NoSupportedApi": "No supported API is found in the OpenAPI description document: only GET and POST methods are supported, additionally, there can be at most one required parameter, and no auth is allowed. \nFor more information visit: \"https://aka.ms/build-api-based-message-extension\".",
|
|
409
421
|
"core.common.UrlProtocolNotSupported": "Server url is not correct: protocol %s is not supported, you should use https protocol instead.",
|
|
410
422
|
"core.common.RelativeServerUrlNotSupported": "Server url is not correct: relative server url is not supported.",
|
|
411
423
|
"core.common.ErrorFetchApiSpec": "Your OpenAPI description document should be accessible without authentication, otherwise download and start from a local copy.",
|
|
@@ -433,11 +445,14 @@
|
|
|
433
445
|
"error.aad.manifest.RequiredResourceAccessIsMissing": "requiredResourceAccess is missing\n",
|
|
434
446
|
"error.aad.manifest.Oauth2PermissionsIsMissing": "oauth2Permissions is missing\n",
|
|
435
447
|
"error.aad.manifest.PreAuthorizedApplicationsIsMissing": "preAuthorizedApplications is missing\n",
|
|
448
|
+
"error.aad.manifest.ResourceAppIdIsMissing": "Some item(s) in requiredResourceAccess misses resourceAppId property.",
|
|
449
|
+
"error.aad.manifest.ResourceAccessIdIsMissing": "Some item(s) in resourceAccess misses id property.",
|
|
436
450
|
"error.aad.manifest.AccessTokenAcceptedVersionIs1": "accessTokenAcceptedVersion is 1\n",
|
|
437
451
|
"error.aad.manifest.OptionalClaimsIsMissing": "optionalClaims is missing\n",
|
|
438
452
|
"error.aad.manifest.OptionalClaimsMissingIdtypClaim": "optionalClaims access token doesn't contain idtyp claim\n",
|
|
439
453
|
"error.aad.manifest.AADManifestIssues": "Microsoft Entra manifest has following issues that may potentially break the Teams App:\n",
|
|
440
454
|
"error.aad.manifest.DeleteOrUpdatePermissionFailed": "Unable to update or delete an existing permission when it's enabled. One possible reason is that the ACCESS_AS_USER_PERMISSION_ID environment variable is changed for selected environment. Ensure your permission id(s) are identical with the actual Microsoft Entra application and try again.\n",
|
|
455
|
+
"error.aad.manifest.HostNameNotOnVerifiedDomain": "Unable to set identifierUri because the value is not on verified domain: %s",
|
|
441
456
|
"error.aad.manifest.UnknownResourceAppId": "Unknown resourceAppId %s",
|
|
442
457
|
"error.aad.manifest.UnknownResourceAccessType": "Unknown resourceAccess: %s",
|
|
443
458
|
"error.aad.manifest.UnknownResourceAccessId": "Unknown resourceAccess id: %s, if you're using permission as resourceAccess id, please try to use permission id instead.",
|
|
@@ -562,9 +577,11 @@
|
|
|
562
577
|
"driver.deploy.azureFunctionsDeployDetailSummary": "Successfully deployed `%s` to Azure Functions.",
|
|
563
578
|
"driver.deploy.azureStorageDeployDetailSummary": "Successfully deployed `%s` to Azure Storage.",
|
|
564
579
|
"driver.deploy.enableStaticWebsiteSummary": "Azure Storage enable static website successfully.",
|
|
580
|
+
"driver.deploy.getSWADeploymentTokenSummary": "Successfully get the deployment token for Azure Static Web Apps.",
|
|
565
581
|
"driver.deploy.deployToAzureAppServiceDescription": "deploy the project to the Azure App Service.",
|
|
566
582
|
"driver.deploy.deployToAzureFunctionsDescription": "deploy the project to the Azure Functions.",
|
|
567
583
|
"driver.deploy.deployToAzureStorageDescription": "deploy the project to the Azure Storage.",
|
|
584
|
+
"driver.deploy.getSWADeploymentToken": "Get the deployment token from Azure Static Web Apps.",
|
|
568
585
|
"driver.deploy.enableStaticWebsiteInAzureStorageDescription": "enable static website setting in Azure Storage.",
|
|
569
586
|
"driver.common.suggestion.retryLater": "Please try again.",
|
|
570
587
|
"driver.common.FailRetrieveAzureCredentialsRemoteError": "Unable to retrieve Azure credentials due to remote service error.",
|
|
@@ -623,6 +640,7 @@
|
|
|
623
640
|
"error.yaml.LifeCycleUndefinedError": "Lifecycle '%s' is undefined, yaml file: %s",
|
|
624
641
|
"error.yaml.InvalidActionInputError": "The '%s' action cannot be completed as the following parameter(s): %s, are either missing or have an invalid value in the provided yaml file: %s. Ensure that the required parameters are provided and have valid values and try again.",
|
|
625
642
|
"error.common.InstallSoftwareError": "Unable to install %s. You can install it manually and restart Visual Studio Code if you are using the Toolkit in Visual Studio Code.",
|
|
643
|
+
"error.common.VersionError": "Unable to find a version satisfying the version range %s.",
|
|
626
644
|
"error.common.MissingEnvironmentVariablesError": "The program cannot proceed as the following environment variables are missing: '%s', which are required for file: %s. Make sure the required variables are set either by editing the .env file '%s' with the correct names and values , or by setting the system environment variables with the correct names and values. If you are developing with a new project created with Teams Toolkit, running provision or debug will register correct values for these environment variables.",
|
|
627
645
|
"error.common.InvalidProjectError": "This command only works for project created by Teams Toolkit.",
|
|
628
646
|
"error.common.FileNotFoundError": "The file or directory is not found: '%s'. Check if it exists and you have permission to access it.",
|
|
@@ -663,6 +681,8 @@
|
|
|
663
681
|
"error.arm.ConvertArmOutputError": "Unable to convert ARM deployment result to action output, there is a duplicated key '%s' in ARM deployment result.",
|
|
664
682
|
"error.deploy.DeployEmptyFolderError": "Unable to locate any files in the distribution folder: '%s'. Please ensure that the folder is not empty and that all necessary files have been included.",
|
|
665
683
|
"error.deploy.CheckDeploymentStatusTimeoutError": "Unable to check deployment status because the process timed out. Check your internet connection and try again. If the issue persists, please review the deployment logs (Deployment -> Deployment center -> Logs) in Azure portal to identify any issues that may have occurred.",
|
|
684
|
+
"error.deploy.ZipFileError": "Failed to zip the artifact folder. The folder size exceeds the maximum limit of 2GB. Please reduce the size of the folder and try again.",
|
|
685
|
+
"error.deploy.ZipFileTargetInUse": "Failed to clear the distribution zip file in %s. The file may be currently in use. Please close any applications using the file and try again.",
|
|
666
686
|
"error.deploy.GetPublishingCredentialsError.Notification": "Unable to obtain publishing credentials of app '%s' in resource group '%s'. Refer to the [Output panel](command:fx-extension.showOutputChannel) for more details.",
|
|
667
687
|
"error.deploy.GetPublishingCredentialsError": "Unable to obtain publishing credentials of app '%s' in resource group '%s' for reason:\n %s.\n Suggestions:\n 1. Verify that the app name and resource group name are spelled correctly and are valid. \n 2. Verify that your Azure account has the necessary permissions to access the API. You may need to elevate your role or request additional permissions from an administrator. \n 3. If the error message includes a specific reason, such as an authentication failure or a network issue, investigate that issue specifically to resolve the error and try again. \n 4. You can test the API in this page: '%s'",
|
|
668
688
|
"error.deploy.DeployZipPackageError.Notification": "Unable to deploy zip package to endpoint: '%s'. Refer to the [Output panel](command:fx-extension.showOutputChannel) for more details and try again.",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"environmentFolderPath": {
|
|
11
11
|
"type": "string",
|
|
12
12
|
"description": "The folder path of .env files used for variables and different envrironments."
|
|
13
|
-
|
|
13
|
+
},
|
|
14
14
|
"version": {
|
|
15
15
|
"type": "string",
|
|
16
16
|
"description": "The version of the yaml file schema",
|
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
{ "$ref": "#/definitions/spfxDeploy" },
|
|
72
72
|
{ "$ref": "#/definitions/teamsAppCopyAppPackageToSPFx" },
|
|
73
73
|
{ "$ref": "#/definitions/script" },
|
|
74
|
-
{ "$ref": "#/definitions/apiKeyRegister"}
|
|
74
|
+
{ "$ref": "#/definitions/apiKeyRegister"},
|
|
75
|
+
{ "$ref": "#/definitions/azureStaticWebAppGetDeploymentKey"}
|
|
75
76
|
]
|
|
76
77
|
}
|
|
77
78
|
},
|
|
@@ -1434,12 +1435,11 @@
|
|
|
1434
1435
|
},
|
|
1435
1436
|
"workingDirectory": {
|
|
1436
1437
|
"type": "string",
|
|
1437
|
-
"description": "
|
|
1438
|
+
"description": "Current working directory. Defaults to the directory of this file."
|
|
1438
1439
|
},
|
|
1439
1440
|
"shell": {
|
|
1440
1441
|
"type": "string",
|
|
1441
|
-
"
|
|
1442
|
-
"description": "The shell type. Can be omitted. If omitted, it defaults to bash on Linux/MacOS, defaults to pwsh on windows."
|
|
1442
|
+
"description": "Shell command. If not specified, use default shell for current platform. The rule is: 1) use the value of the 'SHELL' environment variable if it is set. Otherwise the shell depends on operation system: 2) on macOS, use '/bin/zsh' if it exists, otherwise use '/bin/bash'; 3) On Windows, use the value of the 'ComSpec' environment variable if it exists, otherwise use 'cmd.exe'; 4) On Linux or other OS, use '/bin/sh' if it extis."
|
|
1443
1443
|
},
|
|
1444
1444
|
"timeout": {
|
|
1445
1445
|
"type": "number",
|
|
@@ -1542,6 +1542,43 @@
|
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
|
+
},
|
|
1546
|
+
"azureStaticWebAppGetDeploymentKey": {
|
|
1547
|
+
"type": "object",
|
|
1548
|
+
"additionalProperties": false,
|
|
1549
|
+
"description": "Get deployment key from Azure Static Web App.",
|
|
1550
|
+
"required": ["uses", "with", "writeToEnvironmentFile"],
|
|
1551
|
+
"properties": {
|
|
1552
|
+
"uses": {
|
|
1553
|
+
"type": "string",
|
|
1554
|
+
"description": "Get deployment key. Refer to https://aka.ms/teamsfx-actions/swa-get-deployment-key for more details.",
|
|
1555
|
+
"const": "azureStaticWebApps/getDeploymentToken"
|
|
1556
|
+
},
|
|
1557
|
+
"with": {
|
|
1558
|
+
"type": "object",
|
|
1559
|
+
"additionalProperties": false,
|
|
1560
|
+
"description": "Parameters for this action",
|
|
1561
|
+
"required": ["resourceId"],
|
|
1562
|
+
"properties": {
|
|
1563
|
+
"resourceId": {
|
|
1564
|
+
"type": "string",
|
|
1565
|
+
"description": "The resource ID of Azure Static Web App."
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
"writeToEnvironmentFile": {
|
|
1570
|
+
"type": "object",
|
|
1571
|
+
"additionalProperties": false,
|
|
1572
|
+
"description": "Write environment variables to environment file",
|
|
1573
|
+
"required": ["deploymentToken"],
|
|
1574
|
+
"properties": {
|
|
1575
|
+
"deploymentToken": {
|
|
1576
|
+
"description": "Required. The deployment token of Azure Static Web App.",
|
|
1577
|
+
"$ref": "#/definitions/envVarName"
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1545
1582
|
}
|
|
1546
1583
|
}
|
|
1547
1584
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,61 +1,65 @@
|
|
|
1
1
|
@page "/bot-auth-end.html"
|
|
2
2
|
|
|
3
3
|
<html>
|
|
4
|
+
|
|
4
5
|
<head>
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
<title>Login End Page</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
7
8
|
</head>
|
|
8
9
|
|
|
9
10
|
<body>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// Unexpected condition: hash does not contain error or access_token parameter
|
|
29
|
-
handleAuthError("UnexpectedFailure", hashParams);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// Parse hash parameters into key-value pairs
|
|
34
|
-
function getHashParameters() {
|
|
35
|
-
let hashParams = {};
|
|
36
|
-
location.hash
|
|
37
|
-
.substr(1)
|
|
38
|
-
.split("&")
|
|
39
|
-
.forEach(function (item) {
|
|
40
|
-
let s = item.split("="),
|
|
41
|
-
k = s[0],
|
|
42
|
-
v = s[1] && decodeURIComponent(s[1]);
|
|
43
|
-
hashParams[k] = v;
|
|
44
|
-
});
|
|
45
|
-
return hashParams;
|
|
46
|
-
}
|
|
47
|
-
// Show error information
|
|
48
|
-
function handleAuthError(errorType, errorMessage) {
|
|
49
|
-
const err = JSON.stringify({
|
|
50
|
-
error: errorType,
|
|
51
|
-
message: JSON.stringify(errorMessage),
|
|
52
|
-
});
|
|
53
|
-
let para = document.createElement("p");
|
|
54
|
-
let node = document.createTextNode(err);
|
|
55
|
-
para.appendChild(node);
|
|
56
|
-
let element = document.getElementById("divError");
|
|
57
|
-
element.appendChild(para);
|
|
11
|
+
<script src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
|
|
12
|
+
integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
|
|
13
|
+
crossorigin="anonymous"></script>
|
|
14
|
+
<div id="divError"></div>
|
|
15
|
+
<script type="text/javascript">
|
|
16
|
+
microsoftTeams.app.initialize().then(() => {
|
|
17
|
+
let hashParams = getHashParameters();
|
|
18
|
+
if (hashParams["error"]) {
|
|
19
|
+
// Authentication failed
|
|
20
|
+
handleAuthError(hashParams["error"], hashParams);
|
|
21
|
+
} else if (hashParams["code"]) {
|
|
22
|
+
// Get the stored state parameter and compare with incoming state
|
|
23
|
+
let expectedState = localStorage.getItem("state");
|
|
24
|
+
if (expectedState !== hashParams["state"]) {
|
|
25
|
+
// State does not match, report error
|
|
26
|
+
handleAuthError("StateDoesNotMatch", hashParams);
|
|
27
|
+
} else {
|
|
28
|
+
microsoftTeams.authentication.notifySuccess();
|
|
58
29
|
}
|
|
59
|
-
|
|
30
|
+
} else {
|
|
31
|
+
// Unexpected condition: hash does not contain error or access_token parameter
|
|
32
|
+
handleAuthError("UnexpectedFailure", hashParams);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Parse hash parameters into key-value pairs
|
|
37
|
+
function getHashParameters() {
|
|
38
|
+
let hashParams = {};
|
|
39
|
+
location.hash
|
|
40
|
+
.substr(1)
|
|
41
|
+
.split("&")
|
|
42
|
+
.forEach(function (item) {
|
|
43
|
+
let s = item.split("="),
|
|
44
|
+
k = s[0],
|
|
45
|
+
v = s[1] && decodeURIComponent(s[1]);
|
|
46
|
+
hashParams[k] = v;
|
|
47
|
+
});
|
|
48
|
+
return hashParams;
|
|
49
|
+
}
|
|
50
|
+
// Show error information
|
|
51
|
+
function handleAuthError(errorType, errorMessage) {
|
|
52
|
+
const err = JSON.stringify({
|
|
53
|
+
error: errorType,
|
|
54
|
+
message: JSON.stringify(errorMessage),
|
|
55
|
+
});
|
|
56
|
+
let para = document.createElement("p");
|
|
57
|
+
let node = document.createTextNode(err);
|
|
58
|
+
para.appendChild(node);
|
|
59
|
+
let element = document.getElementById("divError");
|
|
60
|
+
element.appendChild(para);
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
60
63
|
</body>
|
|
64
|
+
|
|
61
65
|
</html>
|
|
@@ -1,61 +1,65 @@
|
|
|
1
1
|
@page "/bot-auth-end.html"
|
|
2
2
|
|
|
3
3
|
<html>
|
|
4
|
+
|
|
4
5
|
<head>
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
<title>Login End Page</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
7
8
|
</head>
|
|
8
9
|
|
|
9
10
|
<body>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
// Unexpected condition: hash does not contain error or access_token parameter
|
|
29
|
-
handleAuthError("UnexpectedFailure", hashParams);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// Parse hash parameters into key-value pairs
|
|
34
|
-
function getHashParameters() {
|
|
35
|
-
let hashParams = {};
|
|
36
|
-
location.hash
|
|
37
|
-
.substr(1)
|
|
38
|
-
.split("&")
|
|
39
|
-
.forEach(function (item) {
|
|
40
|
-
let s = item.split("="),
|
|
41
|
-
k = s[0],
|
|
42
|
-
v = s[1] && decodeURIComponent(s[1]);
|
|
43
|
-
hashParams[k] = v;
|
|
44
|
-
});
|
|
45
|
-
return hashParams;
|
|
46
|
-
}
|
|
47
|
-
// Show error information
|
|
48
|
-
function handleAuthError(errorType, errorMessage) {
|
|
49
|
-
const err = JSON.stringify({
|
|
50
|
-
error: errorType,
|
|
51
|
-
message: JSON.stringify(errorMessage),
|
|
52
|
-
});
|
|
53
|
-
let para = document.createElement("p");
|
|
54
|
-
let node = document.createTextNode(err);
|
|
55
|
-
para.appendChild(node);
|
|
56
|
-
let element = document.getElementById("divError");
|
|
57
|
-
element.appendChild(para);
|
|
11
|
+
<script src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
|
|
12
|
+
integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
|
|
13
|
+
crossorigin="anonymous"></script>
|
|
14
|
+
<div id="divError"></div>
|
|
15
|
+
<script type="text/javascript">
|
|
16
|
+
microsoftTeams.app.initialize().then(() => {
|
|
17
|
+
let hashParams = getHashParameters();
|
|
18
|
+
if (hashParams["error"]) {
|
|
19
|
+
// Authentication failed
|
|
20
|
+
handleAuthError(hashParams["error"], hashParams);
|
|
21
|
+
} else if (hashParams["code"]) {
|
|
22
|
+
// Get the stored state parameter and compare with incoming state
|
|
23
|
+
let expectedState = localStorage.getItem("state");
|
|
24
|
+
if (expectedState !== hashParams["state"]) {
|
|
25
|
+
// State does not match, report error
|
|
26
|
+
handleAuthError("StateDoesNotMatch", hashParams);
|
|
27
|
+
} else {
|
|
28
|
+
microsoftTeams.authentication.notifySuccess();
|
|
58
29
|
}
|
|
59
|
-
|
|
30
|
+
} else {
|
|
31
|
+
// Unexpected condition: hash does not contain error or access_token parameter
|
|
32
|
+
handleAuthError("UnexpectedFailure", hashParams);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Parse hash parameters into key-value pairs
|
|
37
|
+
function getHashParameters() {
|
|
38
|
+
let hashParams = {};
|
|
39
|
+
location.hash
|
|
40
|
+
.substr(1)
|
|
41
|
+
.split("&")
|
|
42
|
+
.forEach(function (item) {
|
|
43
|
+
let s = item.split("="),
|
|
44
|
+
k = s[0],
|
|
45
|
+
v = s[1] && decodeURIComponent(s[1]);
|
|
46
|
+
hashParams[k] = v;
|
|
47
|
+
});
|
|
48
|
+
return hashParams;
|
|
49
|
+
}
|
|
50
|
+
// Show error information
|
|
51
|
+
function handleAuthError(errorType, errorMessage) {
|
|
52
|
+
const err = JSON.stringify({
|
|
53
|
+
error: errorType,
|
|
54
|
+
message: JSON.stringify(errorMessage),
|
|
55
|
+
});
|
|
56
|
+
let para = document.createElement("p");
|
|
57
|
+
let node = document.createTextNode(err);
|
|
58
|
+
para.appendChild(node);
|
|
59
|
+
let element = document.getElementById("divError");
|
|
60
|
+
element.appendChild(para);
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
60
63
|
</body>
|
|
64
|
+
|
|
61
65
|
</html>
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
</head>
|
|
9
9
|
|
|
10
10
|
<body>
|
|
11
|
-
<script
|
|
11
|
+
<script
|
|
12
|
+
src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
|
|
13
|
+
integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
|
|
14
|
+
crossorigin="anonymous"
|
|
15
|
+
></script>
|
|
12
16
|
<div id="divError"></div>
|
|
13
17
|
<script type="text/javascript">
|
|
14
18
|
microsoftTeams.app.initialize().then(() => {
|
|
@@ -31,7 +35,7 @@
|
|
|
31
35
|
handleAuthError("UnexpectedFailure", hashParams);
|
|
32
36
|
}
|
|
33
37
|
});
|
|
34
|
-
|
|
38
|
+
|
|
35
39
|
// Parse hash parameters into key-value pairs
|
|
36
40
|
function getHashParameters() {
|
|
37
41
|
let hashParams = new Map();
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
</head>
|
|
9
9
|
|
|
10
10
|
<body>
|
|
11
|
-
<script
|
|
11
|
+
<script
|
|
12
|
+
src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
|
|
13
|
+
integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
|
|
14
|
+
crossorigin="anonymous"
|
|
15
|
+
></script>
|
|
12
16
|
<div id="divError"></div>
|
|
13
17
|
<script type="text/javascript">
|
|
14
18
|
microsoftTeams.app.initialize().then(() => {
|
|
@@ -7,13 +7,17 @@
|
|
|
7
7
|
</head>
|
|
8
8
|
|
|
9
9
|
<body>
|
|
10
|
-
|
|
10
|
+
<script
|
|
11
|
+
src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
|
|
12
|
+
integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
|
|
13
|
+
crossorigin="anonymous"
|
|
14
|
+
></script>
|
|
11
15
|
<script
|
|
12
16
|
type="text/javascript"
|
|
13
17
|
src="https://alcdn.msauth.net/browser/2.21.0/js/msal-browser.min.js"
|
|
14
18
|
integrity="sha384-s/NxjjAgw1QgpDhOlVjTceLl4axrp5nqpUbCPOEQy1PqbFit9On6uw2XmEF1eq0s"
|
|
15
|
-
crossorigin="anonymous"
|
|
16
|
-
|
|
19
|
+
crossorigin="anonymous"
|
|
20
|
+
></script>
|
|
17
21
|
<script type="text/javascript">
|
|
18
22
|
var currentURL = new URL(window.location);
|
|
19
23
|
var clientId = currentURL.searchParams.get("clientId");
|
|
@@ -24,20 +28,23 @@
|
|
|
24
28
|
auth: {
|
|
25
29
|
clientId: clientId,
|
|
26
30
|
authority: `https://login.microsoftonline.com/${context.user.tenant.id}`,
|
|
27
|
-
navigateToLoginRequestUrl: false
|
|
31
|
+
navigateToLoginRequestUrl: false,
|
|
28
32
|
},
|
|
29
33
|
cache: {
|
|
30
34
|
cacheLocation: "sessionStorage",
|
|
31
35
|
},
|
|
32
|
-
}
|
|
36
|
+
};
|
|
33
37
|
|
|
34
38
|
const msalInstance = new window.msal.PublicClientApplication(msalConfig);
|
|
35
|
-
msalInstance
|
|
39
|
+
msalInstance
|
|
40
|
+
.handleRedirectPromise()
|
|
36
41
|
.then((tokenResponse) => {
|
|
37
42
|
if (tokenResponse !== null) {
|
|
38
|
-
microsoftTeams.authentication.notifySuccess(
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
microsoftTeams.authentication.notifySuccess(
|
|
44
|
+
JSON.stringify({
|
|
45
|
+
sessionStorage: sessionStorage,
|
|
46
|
+
})
|
|
47
|
+
);
|
|
41
48
|
} else {
|
|
42
49
|
microsoftTeams.authentication.notifyFailure("Get empty response.");
|
|
43
50
|
}
|
|
@@ -7,13 +7,17 @@
|
|
|
7
7
|
</head>
|
|
8
8
|
|
|
9
9
|
<body>
|
|
10
|
-
|
|
10
|
+
<script
|
|
11
|
+
src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
|
|
12
|
+
integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
|
|
13
|
+
crossorigin="anonymous"
|
|
14
|
+
></script>
|
|
11
15
|
<script
|
|
12
16
|
type="text/javascript"
|
|
13
17
|
src="https://alcdn.msauth.net/browser/2.21.0/js/msal-browser.min.js"
|
|
14
18
|
integrity="sha384-s/NxjjAgw1QgpDhOlVjTceLl4axrp5nqpUbCPOEQy1PqbFit9On6uw2XmEF1eq0s"
|
|
15
|
-
crossorigin="anonymous"
|
|
16
|
-
|
|
19
|
+
crossorigin="anonymous"
|
|
20
|
+
></script>
|
|
17
21
|
<script type="text/javascript">
|
|
18
22
|
microsoftTeams.app.initialize().then(() => {
|
|
19
23
|
microsoftTeams.app.getContext().then(async (context) => {
|
|
@@ -27,23 +31,23 @@
|
|
|
27
31
|
auth: {
|
|
28
32
|
clientId: clientId,
|
|
29
33
|
authority: `https://login.microsoftonline.com/${context.user.tenant.id}`,
|
|
30
|
-
navigateToLoginRequestUrl: false
|
|
34
|
+
navigateToLoginRequestUrl: false,
|
|
31
35
|
},
|
|
32
36
|
cache: {
|
|
33
37
|
cacheLocation: "sessionStorage",
|
|
34
38
|
},
|
|
35
|
-
}
|
|
39
|
+
};
|
|
36
40
|
|
|
37
41
|
const msalInstance = new msal.PublicClientApplication(msalConfig);
|
|
38
42
|
const scopesArray = scope.split(" ");
|
|
39
43
|
const scopesRequest = {
|
|
40
44
|
scopes: scopesArray,
|
|
41
45
|
redirectUri: window.location.origin + `/auth-end.html?clientId=${clientId}`,
|
|
42
|
-
loginHint: loginHint
|
|
46
|
+
loginHint: loginHint,
|
|
43
47
|
};
|
|
44
48
|
await msalInstance.loginRedirect(scopesRequest);
|
|
45
49
|
});
|
|
46
50
|
});
|
|
47
|
-
|
|
51
|
+
</script>
|
|
48
52
|
</body>
|
|
49
53
|
</html>
|