@microsoft/teamsfx-core 0.7.0 → 0.7.1-alpha.5e8f6dea.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 +5 -0
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +6 -1
- package/build/common/constants.js.map +1 -1
- package/build/common/fileUtils.d.ts.map +1 -1
- package/build/common/fileUtils.js +12 -6
- package/build/common/fileUtils.js.map +1 -1
- package/build/common/localSettingsProvider.d.ts +4 -2
- package/build/common/localSettingsProvider.d.ts.map +1 -1
- package/build/common/localSettingsProvider.js +32 -1
- package/build/common/localSettingsProvider.js.map +1 -1
- package/build/common/templates.d.ts.map +1 -1
- package/build/common/templates.js +9 -9
- package/build/common/templates.js.map +1 -1
- package/build/common/templatesActions.d.ts +39 -0
- package/build/common/templatesActions.d.ts.map +1 -0
- package/build/common/templatesActions.js +120 -0
- package/build/common/templatesActions.js.map +1 -0
- package/build/common/templatesUtils.d.ts +14 -0
- package/build/common/templatesUtils.d.ts.map +1 -0
- package/build/common/templatesUtils.js +94 -0
- package/build/common/templatesUtils.js.map +1 -0
- package/build/common/tools.d.ts +12 -2
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +52 -7
- package/build/common/tools.js.map +1 -1
- package/build/core/SolutionPluginContainer.d.ts +15 -0
- package/build/core/SolutionPluginContainer.d.ts.map +1 -0
- package/build/core/SolutionPluginContainer.js +54 -0
- package/build/core/SolutionPluginContainer.js.map +1 -0
- package/build/core/callback.d.ts +9 -0
- package/build/core/callback.d.ts.map +1 -0
- package/build/core/callback.js +33 -0
- package/build/core/callback.js.map +1 -0
- package/build/core/environment.d.ts +7 -3
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +68 -13
- package/build/core/environment.js.map +1 -1
- package/build/core/error.d.ts +19 -2
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +72 -34
- package/build/core/error.js.map +1 -1
- package/build/core/index.d.ts +24 -12
- package/build/core/index.d.ts.map +1 -1
- package/build/core/index.js +604 -309
- package/build/core/index.js.map +1 -1
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +13 -6
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/contextInjector.d.ts +3 -0
- package/build/core/middleware/contextInjector.d.ts.map +1 -0
- package/build/core/middleware/{contextInjecter.js → contextInjector.js} +4 -4
- package/build/core/middleware/contextInjector.js.map +1 -0
- package/build/core/middleware/envInfoLoader.d.ts +8 -4
- package/build/core/middleware/envInfoLoader.d.ts.map +1 -1
- package/build/core/middleware/envInfoLoader.js +77 -40
- package/build/core/middleware/envInfoLoader.js.map +1 -1
- package/build/core/middleware/envInfoWriter.d.ts +1 -1
- package/build/core/middleware/envInfoWriter.d.ts.map +1 -1
- package/build/core/middleware/envInfoWriter.js +30 -13
- package/build/core/middleware/envInfoWriter.js.map +1 -1
- package/build/core/middleware/localSettingsLoader.d.ts.map +1 -1
- package/build/core/middleware/localSettingsLoader.js +18 -8
- package/build/core/middleware/localSettingsLoader.js.map +1 -1
- package/build/core/middleware/localSettingsWriter.d.ts.map +1 -1
- package/build/core/middleware/localSettingsWriter.js +14 -5
- package/build/core/middleware/localSettingsWriter.js.map +1 -1
- package/build/core/middleware/projectMigrator.d.ts +5 -0
- package/build/core/middleware/projectMigrator.d.ts.map +1 -0
- package/build/core/middleware/projectMigrator.js +382 -0
- package/build/core/middleware/projectMigrator.js.map +1 -0
- package/build/core/middleware/projectSettingsLoader.d.ts +2 -2
- package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
- package/build/core/middleware/projectSettingsLoader.js +13 -9
- 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 +6 -7
- package/build/core/middleware/projectSettingsWriter.js.map +1 -1
- package/build/core/middleware/projectUpgrader.d.ts.map +1 -1
- package/build/core/middleware/projectUpgrader.js +15 -7
- package/build/core/middleware/projectUpgrader.js.map +1 -1
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +25 -17
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/core/middleware/solutionLoader.d.ts +1 -2
- package/build/core/middleware/solutionLoader.d.ts.map +1 -1
- package/build/core/middleware/solutionLoader.js +24 -4
- package/build/core/middleware/solutionLoader.js.map +1 -1
- package/build/core/question.d.ts +2 -0
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +12 -1
- package/build/core/question.js.map +1 -1
- package/build/core/tools.d.ts +2 -2
- package/build/core/tools.d.ts.map +1 -1
- package/build/core/tools.js +15 -5
- package/build/core/tools.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/plugins/resource/aad/appStudio.js +1 -1
- package/build/plugins/resource/aad/appStudio.js.map +1 -1
- package/build/plugins/resource/aad/errors.d.ts.map +1 -1
- package/build/plugins/resource/aad/errors.js +1 -0
- package/build/plugins/resource/aad/errors.js.map +1 -1
- package/build/plugins/resource/aad/index.d.ts +1 -0
- package/build/plugins/resource/aad/index.d.ts.map +1 -1
- package/build/plugins/resource/aad/index.js +2 -1
- package/build/plugins/resource/aad/index.js.map +1 -1
- package/build/plugins/resource/aad/utils/configs.d.ts.map +1 -1
- package/build/plugins/resource/aad/utils/configs.js +9 -10
- package/build/plugins/resource/aad/utils/configs.js.map +1 -1
- package/build/plugins/resource/aad/utils/telemetry.js +1 -1
- package/build/plugins/resource/aad/utils/telemetry.js.map +1 -1
- package/build/plugins/resource/aad/v2/index.d.ts +7 -7
- package/build/plugins/resource/aad/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/aad/v2/index.js +6 -6
- package/build/plugins/resource/aad/v2/index.js.map +1 -1
- package/build/plugins/resource/apim/config.d.ts +1 -0
- package/build/plugins/resource/apim/config.d.ts.map +1 -1
- package/build/plugins/resource/apim/config.js.map +1 -1
- package/build/plugins/resource/apim/constants.d.ts +3 -0
- package/build/plugins/resource/apim/constants.d.ts.map +1 -1
- package/build/plugins/resource/apim/constants.js +5 -1
- package/build/plugins/resource/apim/constants.js.map +1 -1
- package/build/plugins/resource/apim/factory.d.ts +2 -1
- package/build/plugins/resource/apim/factory.d.ts.map +1 -1
- package/build/plugins/resource/apim/factory.js +19 -8
- package/build/plugins/resource/apim/factory.js.map +1 -1
- package/build/plugins/resource/apim/index.d.ts +2 -0
- package/build/plugins/resource/apim/index.d.ts.map +1 -1
- package/build/plugins/resource/apim/index.js +15 -8
- package/build/plugins/resource/apim/index.js.map +1 -1
- package/build/plugins/resource/apim/questions/vscodeQuestion.js +1 -1
- package/build/plugins/resource/apim/questions/vscodeQuestion.js.map +1 -1
- package/build/plugins/resource/apim/v2/index.d.ts +9 -11
- package/build/plugins/resource/apim/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/apim/v2/index.js +25 -29
- package/build/plugins/resource/apim/v2/index.js.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.js +9 -8
- package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
- package/build/plugins/resource/appstudio/constants.d.ts +6 -2
- package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/constants.js +124 -13
- package/build/plugins/resource/appstudio/constants.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 +8 -0
- package/build/plugins/resource/appstudio/errors.js.map +1 -1
- package/build/plugins/resource/appstudio/index.d.ts +1 -0
- package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/index.js +23 -5
- package/build/plugins/resource/appstudio/index.js.map +1 -1
- package/build/plugins/resource/appstudio/interfaces/IAppDefinition.d.ts +1 -0
- package/build/plugins/resource/appstudio/interfaces/IAppDefinition.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts +2 -1
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js +197 -68
- package/build/plugins/resource/appstudio/plugin.js.map +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.d.ts +2 -1
- package/build/plugins/resource/appstudio/utils/telemetry.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/utils/telemetry.js +17 -12
- package/build/plugins/resource/appstudio/utils/telemetry.js.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.d.ts +10 -13
- package/build/plugins/resource/appstudio/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/v2/index.js +25 -20
- package/build/plugins/resource/appstudio/v2/index.js.map +1 -1
- package/build/plugins/resource/bot/appStudio/appStudio.js +2 -2
- package/build/plugins/resource/bot/appStudio/appStudio.js.map +1 -1
- package/build/plugins/resource/bot/configs/localDebugConfig.d.ts +1 -1
- package/build/plugins/resource/bot/configs/localDebugConfig.d.ts.map +1 -1
- package/build/plugins/resource/bot/configs/localDebugConfig.js +3 -3
- package/build/plugins/resource/bot/configs/localDebugConfig.js.map +1 -1
- package/build/plugins/resource/bot/configs/provisionConfig.js +21 -20
- package/build/plugins/resource/bot/configs/provisionConfig.js.map +1 -1
- package/build/plugins/resource/bot/configs/scaffoldConfig.d.ts +1 -3
- package/build/plugins/resource/bot/configs/scaffoldConfig.d.ts.map +1 -1
- package/build/plugins/resource/bot/configs/scaffoldConfig.js +9 -10
- package/build/plugins/resource/bot/configs/scaffoldConfig.js.map +1 -1
- package/build/plugins/resource/bot/configs/teamsBotConfig.d.ts.map +1 -1
- package/build/plugins/resource/bot/configs/teamsBotConfig.js +5 -5
- package/build/plugins/resource/bot/configs/teamsBotConfig.js.map +1 -1
- package/build/plugins/resource/bot/constants.d.ts +0 -2
- package/build/plugins/resource/bot/constants.d.ts.map +1 -1
- package/build/plugins/resource/bot/constants.js +2 -14
- package/build/plugins/resource/bot/constants.js.map +1 -1
- package/build/plugins/resource/bot/index.d.ts +2 -3
- package/build/plugins/resource/bot/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/index.js +1 -7
- package/build/plugins/resource/bot/index.js.map +1 -1
- package/build/plugins/resource/bot/plugin.d.ts +1 -4
- package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/plugin.js +21 -80
- package/build/plugins/resource/bot/plugin.js.map +1 -1
- package/build/plugins/resource/bot/resources/messages.d.ts +0 -1
- package/build/plugins/resource/bot/resources/messages.d.ts.map +1 -1
- package/build/plugins/resource/bot/resources/messages.js +0 -1
- package/build/plugins/resource/bot/resources/messages.js.map +1 -1
- package/build/plugins/resource/bot/resources/strings.d.ts +1 -1
- package/build/plugins/resource/bot/resources/strings.d.ts.map +1 -1
- package/build/plugins/resource/bot/resources/strings.js +1 -1
- package/build/plugins/resource/bot/resources/strings.js.map +1 -1
- package/build/plugins/resource/bot/utils/telemetry-helper.d.ts.map +1 -1
- package/build/plugins/resource/bot/utils/telemetry-helper.js +1 -1
- package/build/plugins/resource/bot/utils/telemetry-helper.js.map +1 -1
- package/build/plugins/resource/bot/v2/index.d.ts +9 -13
- package/build/plugins/resource/bot/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/v2/index.js +7 -7
- package/build/plugins/resource/bot/v2/index.js.map +1 -1
- package/build/plugins/resource/frontend/configs.d.ts +7 -2
- package/build/plugins/resource/frontend/configs.d.ts.map +1 -1
- package/build/plugins/resource/frontend/configs.js +49 -29
- package/build/plugins/resource/frontend/configs.js.map +1 -1
- package/build/plugins/resource/frontend/constants.d.ts +3 -2
- package/build/plugins/resource/frontend/constants.d.ts.map +1 -1
- package/build/plugins/resource/frontend/constants.js +4 -3
- package/build/plugins/resource/frontend/constants.js.map +1 -1
- package/build/plugins/resource/frontend/index.d.ts +1 -1
- package/build/plugins/resource/frontend/index.d.ts.map +1 -1
- package/build/plugins/resource/frontend/index.js +6 -5
- package/build/plugins/resource/frontend/index.js.map +1 -1
- package/build/plugins/resource/frontend/ops/deploy.d.ts.map +1 -1
- package/build/plugins/resource/frontend/ops/deploy.js +1 -0
- package/build/plugins/resource/frontend/ops/deploy.js.map +1 -1
- package/build/plugins/resource/frontend/plugin.d.ts +4 -1
- package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/plugin.js +32 -32
- package/build/plugins/resource/frontend/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/resources/errors.d.ts +1 -1
- package/build/plugins/resource/frontend/resources/errors.d.ts.map +1 -1
- package/build/plugins/resource/frontend/resources/errors.js +5 -2
- package/build/plugins/resource/frontend/resources/errors.js.map +1 -1
- package/build/plugins/resource/frontend/utils/telemetry-helper.js +1 -1
- package/build/plugins/resource/frontend/utils/telemetry-helper.js.map +1 -1
- package/build/plugins/resource/frontend/v2/index.d.ts +6 -9
- package/build/plugins/resource/frontend/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/frontend/v2/index.js +5 -2
- package/build/plugins/resource/frontend/v2/index.js.map +1 -1
- package/build/plugins/resource/function/constants.d.ts +2 -6
- package/build/plugins/resource/function/constants.d.ts.map +1 -1
- package/build/plugins/resource/function/constants.js +3 -8
- package/build/plugins/resource/function/constants.js.map +1 -1
- package/build/plugins/resource/function/enums.d.ts +2 -0
- package/build/plugins/resource/function/enums.d.ts.map +1 -1
- package/build/plugins/resource/function/enums.js +2 -0
- package/build/plugins/resource/function/enums.js.map +1 -1
- package/build/plugins/resource/function/index.d.ts +1 -0
- package/build/plugins/resource/function/index.d.ts.map +1 -1
- package/build/plugins/resource/function/index.js +1 -0
- package/build/plugins/resource/function/index.js.map +1 -1
- package/build/plugins/resource/function/ops/deploy.d.ts +1 -1
- package/build/plugins/resource/function/ops/deploy.d.ts.map +1 -1
- package/build/plugins/resource/function/ops/deploy.js +13 -5
- package/build/plugins/resource/function/ops/deploy.js.map +1 -1
- package/build/plugins/resource/function/ops/scaffold.d.ts +4 -7
- package/build/plugins/resource/function/ops/scaffold.d.ts.map +1 -1
- package/build/plugins/resource/function/ops/scaffold.js +42 -40
- package/build/plugins/resource/function/ops/scaffold.js.map +1 -1
- package/build/plugins/resource/function/plugin.d.ts +4 -0
- package/build/plugins/resource/function/plugin.d.ts.map +1 -1
- package/build/plugins/resource/function/plugin.js +57 -41
- package/build/plugins/resource/function/plugin.js.map +1 -1
- package/build/plugins/resource/function/resources/errors.d.ts +2 -5
- package/build/plugins/resource/function/resources/errors.d.ts.map +1 -1
- package/build/plugins/resource/function/resources/errors.js +5 -13
- package/build/plugins/resource/function/resources/errors.js.map +1 -1
- package/build/plugins/resource/function/resources/message.d.ts +1 -0
- package/build/plugins/resource/function/resources/message.d.ts.map +1 -1
- package/build/plugins/resource/function/resources/message.js +1 -0
- package/build/plugins/resource/function/resources/message.js.map +1 -1
- package/build/plugins/resource/function/utils/telemetry-helper.js +1 -1
- package/build/plugins/resource/function/utils/telemetry-helper.js.map +1 -1
- package/build/plugins/resource/function/v2/index.d.ts +8 -11
- package/build/plugins/resource/function/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/function/v2/index.js +9 -17
- package/build/plugins/resource/function/v2/index.js.map +1 -1
- package/build/plugins/resource/identity/index.d.ts +1 -0
- package/build/plugins/resource/identity/index.d.ts.map +1 -1
- package/build/plugins/resource/identity/index.js +7 -9
- package/build/plugins/resource/identity/index.js.map +1 -1
- package/build/plugins/resource/identity/utils/contextUtils.js +1 -1
- package/build/plugins/resource/identity/utils/contextUtils.js.map +1 -1
- package/build/plugins/resource/identity/utils/telemetryUtil.d.ts.map +1 -1
- package/build/plugins/resource/identity/utils/telemetryUtil.js +1 -1
- package/build/plugins/resource/identity/utils/telemetryUtil.js.map +1 -1
- package/build/plugins/resource/identity/v2/index.d.ts +3 -3
- package/build/plugins/resource/identity/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/identity/v2/index.js +2 -2
- package/build/plugins/resource/identity/v2/index.js.map +1 -1
- package/build/plugins/resource/localdebug/constants.d.ts +4 -0
- package/build/plugins/resource/localdebug/constants.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/constants.js +6 -1
- package/build/plugins/resource/localdebug/constants.js.map +1 -1
- package/build/plugins/resource/localdebug/index.d.ts +1 -0
- package/build/plugins/resource/localdebug/index.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/index.js +12 -6
- package/build/plugins/resource/localdebug/index.js.map +1 -1
- package/build/plugins/resource/localdebug/launch.d.ts +1 -0
- package/build/plugins/resource/localdebug/launch.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/launch.js +66 -1
- package/build/plugins/resource/localdebug/launch.js.map +1 -1
- package/build/plugins/resource/localdebug/legacyPlugin.js +4 -4
- package/build/plugins/resource/localdebug/legacyPlugin.js.map +1 -1
- package/build/plugins/resource/localdebug/tasks.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/tasks.js +12 -2
- package/build/plugins/resource/localdebug/tasks.js.map +1 -1
- package/build/plugins/resource/localdebug/util/telemetry.js +1 -1
- package/build/plugins/resource/localdebug/util/telemetry.js.map +1 -1
- package/build/plugins/resource/localdebug/v2/index.d.ts +6 -8
- package/build/plugins/resource/localdebug/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/v2/index.js +2 -2
- package/build/plugins/resource/localdebug/v2/index.js.map +1 -1
- package/build/plugins/resource/simpleauth/index.d.ts +1 -0
- package/build/plugins/resource/simpleauth/index.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/index.js +1 -0
- package/build/plugins/resource/simpleauth/index.js.map +1 -1
- package/build/plugins/resource/simpleauth/plugin.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/plugin.js +1 -6
- package/build/plugins/resource/simpleauth/plugin.js.map +1 -1
- package/build/plugins/resource/simpleauth/utils/common.js +1 -1
- package/build/plugins/resource/simpleauth/utils/common.js.map +1 -1
- package/build/plugins/resource/simpleauth/utils/telemetry.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/utils/telemetry.js +2 -1
- package/build/plugins/resource/simpleauth/utils/telemetry.js.map +1 -1
- package/build/plugins/resource/simpleauth/v2/index.d.ts +4 -4
- package/build/plugins/resource/simpleauth/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/v2/index.js.map +1 -1
- package/build/plugins/resource/spfx/index.d.ts +1 -0
- package/build/plugins/resource/spfx/index.d.ts.map +1 -1
- package/build/plugins/resource/spfx/index.js +1 -0
- package/build/plugins/resource/spfx/index.js.map +1 -1
- package/build/plugins/resource/spfx/v2/index.d.ts +4 -8
- package/build/plugins/resource/spfx/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/spfx/v2/index.js.map +1 -1
- package/build/plugins/resource/sql/config.d.ts +0 -1
- package/build/plugins/resource/sql/config.d.ts.map +1 -1
- package/build/plugins/resource/sql/config.js +0 -1
- package/build/plugins/resource/sql/config.js.map +1 -1
- package/build/plugins/resource/sql/errors.d.ts +4 -0
- package/build/plugins/resource/sql/errors.d.ts.map +1 -1
- package/build/plugins/resource/sql/errors.js +4 -0
- package/build/plugins/resource/sql/errors.js.map +1 -1
- package/build/plugins/resource/sql/index.d.ts +1 -0
- package/build/plugins/resource/sql/index.d.ts.map +1 -1
- package/build/plugins/resource/sql/index.js +1 -0
- package/build/plugins/resource/sql/index.js.map +1 -1
- package/build/plugins/resource/sql/plugin.d.ts +4 -0
- package/build/plugins/resource/sql/plugin.d.ts.map +1 -1
- package/build/plugins/resource/sql/plugin.js +68 -69
- package/build/plugins/resource/sql/plugin.js.map +1 -1
- package/build/plugins/resource/sql/utils/contextUtils.js +1 -1
- package/build/plugins/resource/sql/utils/contextUtils.js.map +1 -1
- package/build/plugins/resource/sql/utils/telemetryUtils.d.ts.map +1 -1
- package/build/plugins/resource/sql/utils/telemetryUtils.js +2 -1
- package/build/plugins/resource/sql/utils/telemetryUtils.js.map +1 -1
- package/build/plugins/resource/sql/v2/index.d.ts +5 -4
- package/build/plugins/resource/sql/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/sql/v2/index.js +18 -16
- package/build/plugins/resource/sql/v2/index.js.map +1 -1
- package/build/plugins/resource/utils4v2.d.ts +16 -14
- package/build/plugins/resource/utils4v2.d.ts.map +1 -1
- package/build/plugins/resource/utils4v2.js +127 -92
- package/build/plugins/resource/utils4v2.js.map +1 -1
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.js +4 -2
- package/build/plugins/solution/fx-solution/ResourcePluginContainer.js.map +1 -1
- package/build/plugins/solution/fx-solution/arm.d.ts +11 -0
- package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/arm.js +118 -40
- package/build/plugins/solution/fx-solution/arm.js.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.d.ts +2 -2
- package/build/plugins/solution/fx-solution/commonQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.js +120 -47
- package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/constants.d.ts +16 -2
- package/build/plugins/solution/fx-solution/constants.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/constants.js +15 -1
- package/build/plugins/solution/fx-solution/constants.js.map +1 -1
- package/build/plugins/solution/fx-solution/executor.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/executor.js +39 -21
- package/build/plugins/solution/fx-solution/executor.js.map +1 -1
- package/build/plugins/solution/fx-solution/index.d.ts +2 -0
- package/build/plugins/solution/fx-solution/index.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/index.js +2 -0
- package/build/plugins/solution/fx-solution/index.js.map +1 -1
- package/build/plugins/solution/fx-solution/question.d.ts +2 -1
- package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/question.js +18 -1
- package/build/plugins/solution/fx-solution/question.js.map +1 -1
- package/build/plugins/solution/fx-solution/solution.d.ts +3 -6
- package/build/plugins/solution/fx-solution/solution.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/solution.js +406 -379
- package/build/plugins/solution/fx-solution/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/utils/util.js +1 -1
- package/build/plugins/solution/fx-solution/utils/util.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/adaptor.d.ts +3 -0
- package/build/plugins/solution/fx-solution/v2/adaptor.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/adaptor.js +37 -3
- package/build/plugins/solution/fx-solution/v2/adaptor.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/createEnv.d.ts +3 -0
- package/build/plugins/solution/fx-solution/v2/createEnv.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/createEnv.js +28 -0
- package/build/plugins/solution/fx-solution/v2/createEnv.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/deploy.d.ts +2 -4
- package/build/plugins/solution/fx-solution/v2/deploy.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/deploy.js +19 -14
- package/build/plugins/solution/fx-solution/v2/deploy.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts +2 -2
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js +20 -4
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executor.d.ts +2 -2
- package/build/plugins/solution/fx-solution/v2/executor.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executor.js +27 -3
- package/build/plugins/solution/fx-solution/v2/executor.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.d.ts +2 -2
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js +8 -2
- package/build/plugins/solution/fx-solution/v2/generateResourceTemplate.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts +8 -0
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/getQuestions.js +393 -0
- package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/package.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/package.js +12 -2
- package/build/plugins/solution/fx-solution/v2/package.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.d.ts +4 -0
- package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/provision.js +153 -0
- package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts +3 -0
- package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js +73 -0
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/publish.d.ts +2 -2
- package/build/plugins/solution/fx-solution/v2/publish.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/publish.js +11 -11
- package/build/plugins/solution/fx-solution/v2/publish.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts +3 -7
- package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.js +21 -6
- package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/solution.d.ts +18 -0
- package/build/plugins/solution/fx-solution/v2/solution.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/solution.js +38 -0
- package/build/plugins/solution/fx-solution/v2/solution.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/utils.d.ts +11 -9
- package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.js +81 -1
- package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
- package/package.json +8 -5
- package/resource/strings.json +2 -1
- package/templates/plugins/resource/bot/bicep/botConfiguration.template.bicep +0 -4
- package/templates/plugins/resource/bot/bicep/botProvision.template.bicep +0 -6
- package/templates/plugins/resource/bot/bicep/module.template.bicep +0 -4
- package/templates/plugins/resource/bot/bicep/output.template.bicep +0 -2
- package/templates/plugins/resource/bot/bicep/param.template.bicep +0 -2
- package/templates/plugins/resource/bot/bot-msgext.js.default.zip +0 -0
- package/templates/plugins/resource/bot/bot-msgext.ts.default.zip +0 -0
- package/templates/plugins/resource/bot/bot.js.default.zip +0 -0
- package/templates/plugins/resource/bot/bot.ts.default.zip +0 -0
- package/templates/plugins/resource/bot/msgext.js.default.zip +0 -0
- package/templates/plugins/resource/bot/msgext.ts.default.zip +0 -0
- package/templates/plugins/resource/frontend/bicep/frontendHosting.bicep +1 -1
- package/templates/plugins/resource/frontend/bicep/output.template.bicep +1 -1
- package/templates/plugins/resource/frontend/tab.js.default.zip +0 -0
- package/templates/plugins/resource/frontend/tab.ts.default.zip +0 -0
- package/templates/plugins/resource/function/bicep/functionProvision.template.bicep +1 -3
- package/templates/plugins/resource/function/bicep/output.template.bicep +1 -3
- package/templates/plugins/resource/function/function-base.js.default.zip +0 -0
- package/templates/plugins/resource/function/function-base.ts.default.zip +0 -0
- package/templates/plugins/resource/function/function-triggers.js.HTTPTrigger.zip +0 -0
- package/templates/plugins/resource/function/function-triggers.ts.HTTPTrigger.zip +0 -0
- package/templates/plugins/resource/spfx/solution/manifest_multi_env.json +62 -0
- package/build/core/loader.d.ts +0 -11
- package/build/core/loader.d.ts.map +0 -1
- package/build/core/loader.js +0 -17
- package/build/core/loader.js.map +0 -1
- package/build/core/middleware/contextInjecter.d.ts +0 -3
- package/build/core/middleware/contextInjecter.d.ts.map +0 -1
- package/build/core/middleware/contextInjecter.js.map +0 -1
- package/build/plugins/resource/bot/enums/wayToRegisterBot.d.ts +0 -5
- package/build/plugins/resource/bot/enums/wayToRegisterBot.d.ts.map +0 -1
- package/build/plugins/resource/bot/enums/wayToRegisterBot.js +0 -11
- package/build/plugins/resource/bot/enums/wayToRegisterBot.js.map +0 -1
- package/build/plugins/resource/bot/questions.d.ts +0 -4
- package/build/plugins/resource/bot/questions.d.ts.map +0 -1
- package/build/plugins/resource/bot/questions.js +0 -65
- package/build/plugins/resource/bot/questions.js.map +0 -1
- package/build/plugins/resource/function/utils/templates-fetch.d.ts +0 -10
- package/build/plugins/resource/function/utils/templates-fetch.d.ts.map +0 -1
- package/build/plugins/resource/function/utils/templates-fetch.js +0 -107
- package/build/plugins/resource/function/utils/templates-fetch.js.map +0 -1
|
@@ -11,7 +11,6 @@ const constants_1 = require("../../solution/fx-solution/constants");
|
|
|
11
11
|
const errors_1 = require("./errors");
|
|
12
12
|
const results_1 = require("./results");
|
|
13
13
|
const constants_2 = require("./constants");
|
|
14
|
-
const constants_3 = require("../../solution/fx-solution/constants");
|
|
15
14
|
const adm_zip_1 = tslib_1.__importDefault(require("adm-zip"));
|
|
16
15
|
const fs = tslib_1.__importStar(require("fs-extra"));
|
|
17
16
|
const __1 = require("../../..");
|
|
@@ -21,11 +20,12 @@ const common_1 = require("../../../common");
|
|
|
21
20
|
const localSettingsConstants_1 = require("../../../common/localSettingsConstants");
|
|
22
21
|
const uuid_1 = require("uuid");
|
|
23
22
|
const isUUID_1 = tslib_1.__importDefault(require("validator/lib/isUUID"));
|
|
23
|
+
const mustache_1 = tslib_1.__importDefault(require("mustache"));
|
|
24
24
|
class AppStudioPluginImpl {
|
|
25
25
|
async getAppDefinitionAndUpdate(ctx, type, manifest) {
|
|
26
26
|
var _a, _b;
|
|
27
27
|
let appDefinition;
|
|
28
|
-
let
|
|
28
|
+
let teamsAppId;
|
|
29
29
|
const appDirectory = await common_1.getAppDirectory(ctx.root);
|
|
30
30
|
const appStudioToken = await ((_a = ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
|
|
31
31
|
if (type == "localDebug") {
|
|
@@ -48,14 +48,52 @@ class AppStudioPluginImpl {
|
|
|
48
48
|
createIfNotExist = true;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
return
|
|
51
|
+
teamsAppId = await this.updateApp(ctx, appDefinition, appStudioToken, type, createIfNotExist, appDirectory, createIfNotExist ? undefined : localTeamsAppID, ctx.logProvider);
|
|
52
|
+
return teamsAppId;
|
|
53
53
|
}
|
|
54
54
|
else {
|
|
55
55
|
appDefinition = this.convertToAppDefinition(manifest, true);
|
|
56
|
-
|
|
57
|
-
return
|
|
56
|
+
teamsAppId = await this.updateApp(ctx, appDefinition, appStudioToken, type, true, appDirectory, undefined, ctx.logProvider);
|
|
57
|
+
return teamsAppId;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async getSPFxLocalDebugAppDefinitionAndUpdate(ctx, manifest) {
|
|
61
|
+
var _a, _b, _c;
|
|
62
|
+
const appDirectory = await common_1.getAppDirectory(ctx.root);
|
|
63
|
+
const appStudioToken = await ((_a = ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
|
|
64
|
+
const localTeamsAppID = this.getTeamsAppId(ctx, true);
|
|
65
|
+
let createIfNotExist = false;
|
|
66
|
+
if (localTeamsAppID) {
|
|
67
|
+
manifest.id = localTeamsAppID;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
manifest.id = "";
|
|
71
|
+
createIfNotExist = true;
|
|
72
|
+
}
|
|
73
|
+
if (manifest.configurableTabs) {
|
|
74
|
+
for (const tab of manifest.configurableTabs) {
|
|
75
|
+
const reg = /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/;
|
|
76
|
+
const result = tab.configurationUrl.match(reg);
|
|
77
|
+
if (result && result.length > 0) {
|
|
78
|
+
const componentID = result[0];
|
|
79
|
+
tab.configurationUrl = `https://{teamSiteDomain}{teamSitePath}/_layouts/15/TeamsLogon.aspx?SPFX=true&dest={teamSitePath}/_layouts/15/TeamsWorkBench.aspx%3FcomponentId=${componentID}%26openPropertyPane=true%26teams%26forceLocale={locale}%26loadSPFX%3Dtrue%26debugManifestsFile%3Dhttps%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fmanifests.js`;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
const message = "Cannot find componentID in configurableTabs[0].configrationUrl, local debug may fail.";
|
|
83
|
+
(_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.error(message);
|
|
84
|
+
(_c = ctx.ui) === null || _c === void 0 ? void 0 : _c.showMessage("warn", message, false);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
58
87
|
}
|
|
88
|
+
if (manifest.staticTabs) {
|
|
89
|
+
for (const tab of manifest.staticTabs) {
|
|
90
|
+
const componentID = tab.entityId;
|
|
91
|
+
tab.contentUrl = `https://{teamSiteDomain}/_layouts/15/TeamsLogon.aspx?SPFX=true&dest={teamSitePath}/_layouts/15/TeamsWorkBench.aspx%3FcomponentId=${componentID}%26teams%26personal%26forceLocale={locale}%26loadSPFX%3Dtrue%26debugManifestsFile%3Dhttps%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fmanifests.js`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const appDefinition = this.convertToAppDefinition(manifest, false);
|
|
95
|
+
const teamsAppId = await this.updateApp(ctx, appDefinition, appStudioToken, "localDebug", createIfNotExist, appDirectory, createIfNotExist ? undefined : localTeamsAppID, ctx.logProvider);
|
|
96
|
+
return teamsAppId;
|
|
59
97
|
}
|
|
60
98
|
/**
|
|
61
99
|
* ask app common questions to generate app manifest
|
|
@@ -81,14 +119,18 @@ class AppStudioPluginImpl {
|
|
|
81
119
|
manifestString = this.replaceConfigValue(manifestString, "version", "1.0.0");
|
|
82
120
|
const manifest = JSON.parse(manifestString);
|
|
83
121
|
if (solutionSettings.capabilities.includes(question_1.TabOptionItem.id)) {
|
|
84
|
-
manifest.staticTabs = constants_2.STATIC_TABS_TPL;
|
|
85
|
-
manifest.configurableTabs =
|
|
122
|
+
manifest.staticTabs = common_1.isMultiEnvEnabled() ? constants_2.STATIC_TABS_TPL_FOR_MULTI_ENV : constants_2.STATIC_TABS_TPL;
|
|
123
|
+
manifest.configurableTabs = common_1.isMultiEnvEnabled()
|
|
124
|
+
? constants_2.CONFIGURABLE_TABS_TPL_FOR_MULTI_ENV
|
|
125
|
+
: constants_2.CONFIGURABLE_TABS_TPL;
|
|
86
126
|
}
|
|
87
127
|
if (solutionSettings.capabilities.includes(question_1.BotOptionItem.id)) {
|
|
88
|
-
manifest.bots = constants_2.BOTS_TPL;
|
|
128
|
+
manifest.bots = common_1.isMultiEnvEnabled() ? constants_2.BOTS_TPL_FOR_MULTI_ENV : constants_2.BOTS_TPL;
|
|
89
129
|
}
|
|
90
130
|
if (solutionSettings.capabilities.includes(question_1.MessageExtensionItem.id)) {
|
|
91
|
-
manifest.composeExtensions =
|
|
131
|
+
manifest.composeExtensions = common_1.isMultiEnvEnabled()
|
|
132
|
+
? constants_2.COMPOSE_EXTENSIONS_TPL_FOR_MULTI_ENV
|
|
133
|
+
: constants_2.COMPOSE_EXTENSIONS_TPL;
|
|
92
134
|
}
|
|
93
135
|
if ((_a = settings === null || settings === void 0 ? void 0 : settings.solutionSettings) === null || _a === void 0 ? void 0 : _a.migrateFromV1) {
|
|
94
136
|
manifest.webApplicationInfo = undefined;
|
|
@@ -142,7 +184,7 @@ class AppStudioPluginImpl {
|
|
|
142
184
|
});
|
|
143
185
|
}
|
|
144
186
|
async provision(ctx) {
|
|
145
|
-
var _a, _b;
|
|
187
|
+
var _a, _b, _c;
|
|
146
188
|
let remoteTeamsAppId = this.getTeamsAppId(ctx, false);
|
|
147
189
|
let create = false;
|
|
148
190
|
if (!remoteTeamsAppId) {
|
|
@@ -165,6 +207,9 @@ class AppStudioPluginImpl {
|
|
|
165
207
|
remoteTeamsAppId = result.value.teamsAppId;
|
|
166
208
|
(_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.info(`Teams app created ${remoteTeamsAppId}`);
|
|
167
209
|
}
|
|
210
|
+
if (common_1.isMultiEnvEnabled()) {
|
|
211
|
+
(_c = ctx.envInfo.profile.get(constants_1.PluginNames.APPST)) === null || _c === void 0 ? void 0 : _c.set(constants_2.Constants.TEAMS_APP_ID, remoteTeamsAppId);
|
|
212
|
+
}
|
|
168
213
|
return teamsfx_api_1.ok(remoteTeamsAppId);
|
|
169
214
|
}
|
|
170
215
|
async postProvision(ctx) {
|
|
@@ -192,7 +237,7 @@ class AppStudioPluginImpl {
|
|
|
192
237
|
[appDefinition] = remoteManifest.value;
|
|
193
238
|
}
|
|
194
239
|
const appStudioToken = await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
|
|
195
|
-
const result = await this.updateApp(ctx, appDefinition, appStudioToken, "remote", false, remoteTeamsAppId, ctx.logProvider
|
|
240
|
+
const result = await this.updateApp(ctx, appDefinition, appStudioToken, "remote", false, appDirectory, remoteTeamsAppId, ctx.logProvider);
|
|
196
241
|
if (result.isErr()) {
|
|
197
242
|
throw result;
|
|
198
243
|
}
|
|
@@ -205,13 +250,28 @@ class AppStudioPluginImpl {
|
|
|
205
250
|
let manifestString = undefined;
|
|
206
251
|
const appDirectory = await common_1.getAppDirectory(ctx.root);
|
|
207
252
|
if (this.isSPFxProject(ctx)) {
|
|
208
|
-
manifestString = (await fs.readFile(
|
|
253
|
+
manifestString = (await fs.readFile(await this.getManifestTemplatePath(ctx.root))).toString();
|
|
254
|
+
if (common_1.isMultiEnvEnabled()) {
|
|
255
|
+
const teamsAppId = this.getTeamsAppId(ctx, false);
|
|
256
|
+
if (!teamsAppId) {
|
|
257
|
+
return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigError.name, errors_1.AppStudioError.GetRemoteConfigError.message("Manifest validation failed")));
|
|
258
|
+
}
|
|
259
|
+
const view = {
|
|
260
|
+
config: ctx.envInfo.config,
|
|
261
|
+
profile: {
|
|
262
|
+
"fx-resource-appstudio": {
|
|
263
|
+
teamsAppId: teamsAppId,
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
};
|
|
267
|
+
manifestString = mustache_1.default.render(manifestString, view);
|
|
268
|
+
}
|
|
209
269
|
}
|
|
210
270
|
else {
|
|
211
271
|
const appDefinitionAndManifest = await this.getAppDefinitionAndManifest(ctx, false);
|
|
212
272
|
if (appDefinitionAndManifest.isErr()) {
|
|
213
273
|
(_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.error("[Teams Toolkit] Manifest Validation failed!");
|
|
214
|
-
const isProvisionSucceeded = !!((_c = ctx.
|
|
274
|
+
const isProvisionSucceeded = !!((_c = ctx.envInfo.profile
|
|
215
275
|
.get("solution")) === null || _c === void 0 ? void 0 : _c.get(constants_1.SOLUTION_PROVISION_SUCCEEDED));
|
|
216
276
|
if (appDefinitionAndManifest.error.name === errors_1.AppStudioError.GetRemoteConfigError.name &&
|
|
217
277
|
!isProvisionSucceeded) {
|
|
@@ -260,7 +320,9 @@ class AppStudioPluginImpl {
|
|
|
260
320
|
const templatesFolder = __1.getTemplatesFolder();
|
|
261
321
|
if (this.isSPFxProject(ctx)) {
|
|
262
322
|
const templateManifestFolder = path_1.default.join(templatesFolder, "plugins", "resource", "spfx");
|
|
263
|
-
const manifestFile =
|
|
323
|
+
const manifestFile = common_1.isMultiEnvEnabled()
|
|
324
|
+
? path_1.default.resolve(templateManifestFolder, "./solution/manifest_multi_env.json")
|
|
325
|
+
: path_1.default.resolve(templateManifestFolder, "./solution/manifest.json");
|
|
264
326
|
const manifestString = (await fs.readFile(manifestFile)).toString();
|
|
265
327
|
manifest = JSON.parse(manifestString);
|
|
266
328
|
}
|
|
@@ -296,6 +358,17 @@ class AppStudioPluginImpl {
|
|
|
296
358
|
: `${ctx.root}/${teamsfx_api_1.AppPackageFolderName}/appPackage.zip`;
|
|
297
359
|
if (this.isSPFxProject(ctx)) {
|
|
298
360
|
manifestString = (await fs.readFile(await this.getManifestTemplatePath(ctx.root))).toString();
|
|
361
|
+
if (common_1.isMultiEnvEnabled()) {
|
|
362
|
+
const view = {
|
|
363
|
+
config: ctx.envInfo.config,
|
|
364
|
+
profile: {
|
|
365
|
+
"fx-resource-appstudio": {
|
|
366
|
+
teamsAppId: this.getTeamsAppId(ctx, false),
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
};
|
|
370
|
+
manifestString = mustache_1.default.render(manifestString, view);
|
|
371
|
+
}
|
|
299
372
|
}
|
|
300
373
|
else {
|
|
301
374
|
const manifest = await this.getAppDefinitionAndManifest(ctx, false);
|
|
@@ -304,7 +377,7 @@ class AppStudioPluginImpl {
|
|
|
304
377
|
}
|
|
305
378
|
else {
|
|
306
379
|
(_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.error("[Teams Toolkit] Teams Package build failed!");
|
|
307
|
-
const isProvisionSucceeded = !!((_c = ctx.
|
|
380
|
+
const isProvisionSucceeded = !!((_c = ctx.envInfo.profile
|
|
308
381
|
.get("solution")) === null || _c === void 0 ? void 0 : _c.get(constants_1.SOLUTION_PROVISION_SUCCEEDED));
|
|
309
382
|
if (manifest.error.name === errors_1.AppStudioError.GetRemoteConfigFailedError.name &&
|
|
310
383
|
!isProvisionSucceeded) {
|
|
@@ -366,6 +439,9 @@ class AppStudioPluginImpl {
|
|
|
366
439
|
const manifestTpl = await fs.readJSON(await this.getManifestTemplatePath(ctx.root));
|
|
367
440
|
if (this.isSPFxProject(ctx)) {
|
|
368
441
|
manifest = manifestTpl;
|
|
442
|
+
if (common_1.isMultiEnvEnabled()) {
|
|
443
|
+
manifest.id = this.getTeamsAppId(ctx, false);
|
|
444
|
+
}
|
|
369
445
|
}
|
|
370
446
|
else {
|
|
371
447
|
const fillinRes = await this.getAppDefinitionAndManifest(ctx, false);
|
|
@@ -410,24 +486,34 @@ class AppStudioPluginImpl {
|
|
|
410
486
|
const manifestPath = await this.getManifestTemplatePath(ctx.root);
|
|
411
487
|
const manifest = await this.reloadManifestAndCheckRequiredFields(manifestPath);
|
|
412
488
|
if (manifest.isErr()) {
|
|
413
|
-
|
|
489
|
+
return teamsfx_api_1.err(manifest.error);
|
|
490
|
+
}
|
|
491
|
+
let teamsAppId;
|
|
492
|
+
if (this.isSPFxProject(ctx)) {
|
|
493
|
+
teamsAppId = await this.getSPFxLocalDebugAppDefinitionAndUpdate(ctx, manifest.value);
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
teamsAppId = await this.getAppDefinitionAndUpdate(ctx, "localDebug", manifest.value);
|
|
414
497
|
}
|
|
415
|
-
const teamsAppId = await this.getAppDefinitionAndUpdate(ctx, "localDebug", manifest.value);
|
|
416
498
|
if (teamsAppId.isErr()) {
|
|
417
|
-
|
|
499
|
+
return teamsAppId;
|
|
418
500
|
}
|
|
419
|
-
return teamsAppId.value;
|
|
501
|
+
return teamsfx_api_1.ok(teamsAppId.value);
|
|
420
502
|
}
|
|
421
503
|
async checkPermission(ctx) {
|
|
422
|
-
var _a, _b
|
|
504
|
+
var _a, _b;
|
|
423
505
|
let userInfoObject;
|
|
424
506
|
const appStudioToken = await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
|
|
425
|
-
const teamsAppId = (
|
|
426
|
-
.get(constants_2.SOLUTION)) === null || _b === void 0 ? void 0 : _b.get(constants_3.REMOTE_TEAMS_APP_ID)));
|
|
507
|
+
const teamsAppId = this.getTeamsAppId(ctx, false);
|
|
427
508
|
if (!teamsAppId) {
|
|
428
|
-
|
|
509
|
+
if (common_1.isMultiEnvEnabled()) {
|
|
510
|
+
throw new Error(constants_2.ErrorMessages.GetConfigError(constants_2.Constants.TEAMS_APP_ID, constants_1.PluginNames.APPST));
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
throw new Error(constants_2.ErrorMessages.GetConfigError(constants_1.REMOTE_TEAMS_APP_ID, constants_2.SOLUTION));
|
|
514
|
+
}
|
|
429
515
|
}
|
|
430
|
-
const userInfo = (
|
|
516
|
+
const userInfo = (_b = ctx.envInfo.profile.get(constants_2.SOLUTION)) === null || _b === void 0 ? void 0 : _b.get(constants_1.USER_INFO);
|
|
431
517
|
if (!userInfo) {
|
|
432
518
|
throw new Error(constants_2.ErrorMessages.GetConfigError(constants_1.USER_INFO, constants_2.SOLUTION));
|
|
433
519
|
}
|
|
@@ -449,12 +535,16 @@ class AppStudioPluginImpl {
|
|
|
449
535
|
return result;
|
|
450
536
|
}
|
|
451
537
|
async listCollaborator(ctx) {
|
|
452
|
-
var _a
|
|
538
|
+
var _a;
|
|
453
539
|
const appStudioToken = await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
|
|
454
|
-
const teamsAppId = (
|
|
455
|
-
.get(constants_2.SOLUTION)) === null || _b === void 0 ? void 0 : _b.get(constants_3.REMOTE_TEAMS_APP_ID)));
|
|
540
|
+
const teamsAppId = this.getTeamsAppId(ctx, false);
|
|
456
541
|
if (!teamsAppId) {
|
|
457
|
-
|
|
542
|
+
if (common_1.isMultiEnvEnabled()) {
|
|
543
|
+
throw new Error(constants_2.ErrorMessages.GetConfigError(constants_2.Constants.TEAMS_APP_ID, constants_1.PluginNames.APPST));
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
throw new Error(constants_2.ErrorMessages.GetConfigError(constants_1.REMOTE_TEAMS_APP_ID, constants_2.SOLUTION));
|
|
547
|
+
}
|
|
458
548
|
}
|
|
459
549
|
const userLists = await appStudio_1.AppStudioClient.getUserList(teamsAppId, appStudioToken);
|
|
460
550
|
if (!userLists) {
|
|
@@ -475,15 +565,19 @@ class AppStudioPluginImpl {
|
|
|
475
565
|
return teamsAppAdmin;
|
|
476
566
|
}
|
|
477
567
|
async grantPermission(ctx) {
|
|
478
|
-
var _a, _b
|
|
568
|
+
var _a, _b;
|
|
479
569
|
let userInfoObject;
|
|
480
570
|
const appStudioToken = await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
|
|
481
|
-
const teamsAppId = (
|
|
482
|
-
.get(constants_2.SOLUTION)) === null || _b === void 0 ? void 0 : _b.get(constants_3.REMOTE_TEAMS_APP_ID)));
|
|
571
|
+
const teamsAppId = this.getTeamsAppId(ctx, false);
|
|
483
572
|
if (!teamsAppId) {
|
|
484
|
-
|
|
573
|
+
if (common_1.isMultiEnvEnabled()) {
|
|
574
|
+
throw new Error(errors_1.AppStudioError.GrantPermissionFailedError.message(constants_2.ErrorMessages.GetConfigError(constants_2.Constants.TEAMS_APP_ID, constants_1.PluginNames.APPST)));
|
|
575
|
+
}
|
|
576
|
+
else {
|
|
577
|
+
throw new Error(errors_1.AppStudioError.GrantPermissionFailedError.message(constants_2.ErrorMessages.GetConfigError(constants_1.REMOTE_TEAMS_APP_ID, constants_2.SOLUTION)));
|
|
578
|
+
}
|
|
485
579
|
}
|
|
486
|
-
const userInfo = (
|
|
580
|
+
const userInfo = (_b = ctx.envInfo.profile.get(constants_2.SOLUTION)) === null || _b === void 0 ? void 0 : _b.get(constants_1.USER_INFO);
|
|
487
581
|
if (!userInfo) {
|
|
488
582
|
throw new Error(errors_1.AppStudioError.GrantPermissionFailedError.message(constants_2.ErrorMessages.GetConfigError(constants_1.USER_INFO, constants_2.SOLUTION), teamsAppId));
|
|
489
583
|
}
|
|
@@ -687,23 +781,23 @@ class AppStudioPluginImpl {
|
|
|
687
781
|
if (!((_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.projectSettings) === null || _a === void 0 ? void 0 : _a.solutionSettings) === null || _b === void 0 ? void 0 : _b.migrateFromV1) && !webApplicationInfoResource) {
|
|
688
782
|
return teamsfx_api_1.err(localDebug
|
|
689
783
|
? results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.GetLocalDebugConfigFailedError.name, errors_1.AppStudioError.GetLocalDebugConfigFailedError.message("webApplicationInfoResource", true))
|
|
690
|
-
: results_1.AppStudioResultFactory.
|
|
784
|
+
: results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigFailedError.name, errors_1.AppStudioError.GetRemoteConfigFailedError.message("webApplicationInfoResource", true)));
|
|
691
785
|
}
|
|
692
786
|
if (!((_d = (_c = ctx === null || ctx === void 0 ? void 0 : ctx.projectSettings) === null || _c === void 0 ? void 0 : _c.solutionSettings) === null || _d === void 0 ? void 0 : _d.migrateFromV1) && !aadId) {
|
|
693
787
|
return teamsfx_api_1.err(localDebug
|
|
694
788
|
? results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.GetLocalDebugConfigFailedError.name, errors_1.AppStudioError.GetLocalDebugConfigFailedError.message(constants_1.LOCAL_DEBUG_AAD_ID, true))
|
|
695
|
-
: results_1.AppStudioResultFactory.
|
|
789
|
+
: results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigFailedError.name, errors_1.AppStudioError.GetRemoteConfigFailedError.message(constants_1.REMOTE_AAD_ID, true)));
|
|
696
790
|
}
|
|
697
791
|
if (!tabEndpoint && !botId) {
|
|
698
792
|
if (common_1.isArmSupportEnabled()) {
|
|
699
793
|
return teamsfx_api_1.err(localDebug
|
|
700
794
|
? results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.GetLocalDebugConfigFailedError.name, errors_1.AppStudioError.GetLocalDebugConfigFailedError.message(constants_1.LOCAL_DEBUG_TAB_ENDPOINT + ", " + constants_2.LOCAL_BOT_ID, false))
|
|
701
|
-
: results_1.AppStudioResultFactory.
|
|
795
|
+
: results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigFailedError.name, errors_1.AppStudioError.GetRemoteConfigFailedError.message(constants_2.FRONTEND_ENDPOINT_ARM + ", " + constants_2.BOT_ID, false)));
|
|
702
796
|
}
|
|
703
797
|
else {
|
|
704
798
|
return teamsfx_api_1.err(localDebug
|
|
705
799
|
? results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.GetLocalDebugConfigFailedError.name, errors_1.AppStudioError.GetLocalDebugConfigFailedError.message(constants_1.LOCAL_DEBUG_TAB_ENDPOINT + ", " + constants_2.LOCAL_BOT_ID, false))
|
|
706
|
-
: results_1.AppStudioResultFactory.
|
|
800
|
+
: results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigFailedError.name, errors_1.AppStudioError.GetRemoteConfigFailedError.message(constants_2.FRONTEND_ENDPOINT + ", " + constants_2.BOT_ID, false)));
|
|
707
801
|
}
|
|
708
802
|
}
|
|
709
803
|
if ((tabEndpoint && !tabDomain) || (!tabEndpoint && tabDomain)) {
|
|
@@ -722,7 +816,7 @@ class AppStudioPluginImpl {
|
|
|
722
816
|
if (!botDomain) {
|
|
723
817
|
return teamsfx_api_1.err(localDebug
|
|
724
818
|
? results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.GetLocalDebugConfigFailedError.name, errors_1.AppStudioError.GetLocalDebugConfigFailedError.message(constants_1.LOCAL_DEBUG_BOT_DOMAIN, false))
|
|
725
|
-
: results_1.AppStudioResultFactory.
|
|
819
|
+
: results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigFailedError.name, errors_1.AppStudioError.GetRemoteConfigFailedError.message(constants_1.BOT_DOMAIN, false)));
|
|
726
820
|
}
|
|
727
821
|
}
|
|
728
822
|
return teamsfx_api_1.ok({
|
|
@@ -741,13 +835,12 @@ class AppStudioPluginImpl {
|
|
|
741
835
|
if (common_1.isMultiEnvEnabled()) {
|
|
742
836
|
tabEndpoint = isLocalDebug
|
|
743
837
|
? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.frontend) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsFrontendKeys.TabEndpoint)
|
|
744
|
-
: (_c = ctx.
|
|
838
|
+
: (_c = ctx.envInfo.profile.get(constants_1.PluginNames.FE)) === null || _c === void 0 ? void 0 : _c.get(constants_2.FRONTEND_ENDPOINT);
|
|
745
839
|
}
|
|
746
840
|
else {
|
|
747
841
|
tabEndpoint = isLocalDebug
|
|
748
|
-
? (_d = ctx.
|
|
749
|
-
|
|
750
|
-
: (_e = ctx.configOfOtherPlugins.get(constants_1.PluginNames.FE)) === null || _e === void 0 ? void 0 : _e.get(constants_2.FRONTEND_ENDPOINT);
|
|
842
|
+
? (_d = ctx.envInfo.profile.get(constants_1.PluginNames.LDEBUG)) === null || _d === void 0 ? void 0 : _d.get(constants_1.LOCAL_DEBUG_TAB_ENDPOINT)
|
|
843
|
+
: (_e = ctx.envInfo.profile.get(constants_1.PluginNames.FE)) === null || _e === void 0 ? void 0 : _e.get(constants_2.FRONTEND_ENDPOINT);
|
|
751
844
|
}
|
|
752
845
|
return tabEndpoint;
|
|
753
846
|
}
|
|
@@ -757,12 +850,12 @@ class AppStudioPluginImpl {
|
|
|
757
850
|
if (common_1.isMultiEnvEnabled()) {
|
|
758
851
|
tabDomain = isLocalDebug
|
|
759
852
|
? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.frontend) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsFrontendKeys.TabDomain)
|
|
760
|
-
: (_c = ctx.
|
|
853
|
+
: (_c = ctx.envInfo.profile.get(constants_1.PluginNames.FE)) === null || _c === void 0 ? void 0 : _c.get(constants_2.FRONTEND_DOMAIN);
|
|
761
854
|
}
|
|
762
855
|
else {
|
|
763
856
|
tabDomain = isLocalDebug
|
|
764
|
-
? (_d = ctx.
|
|
765
|
-
: (_e = ctx.
|
|
857
|
+
? (_d = ctx.envInfo.profile.get(constants_1.PluginNames.LDEBUG)) === null || _d === void 0 ? void 0 : _d.get(constants_1.LOCAL_DEBUG_TAB_DOMAIN)
|
|
858
|
+
: (_e = ctx.envInfo.profile.get(constants_1.PluginNames.FE)) === null || _e === void 0 ? void 0 : _e.get(constants_2.FRONTEND_DOMAIN);
|
|
766
859
|
}
|
|
767
860
|
return tabDomain;
|
|
768
861
|
}
|
|
@@ -772,10 +865,10 @@ class AppStudioPluginImpl {
|
|
|
772
865
|
if (common_1.isMultiEnvEnabled()) {
|
|
773
866
|
clientId = isLocalDebug
|
|
774
867
|
? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.auth) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsAuthKeys.ClientId)
|
|
775
|
-
: (_c = ctx.
|
|
868
|
+
: (_c = ctx.envInfo.profile.get(constants_1.PluginNames.AAD)) === null || _c === void 0 ? void 0 : _c.get(constants_1.REMOTE_AAD_ID);
|
|
776
869
|
}
|
|
777
870
|
else {
|
|
778
|
-
clientId = (_d = ctx.
|
|
871
|
+
clientId = (_d = ctx.envInfo.profile
|
|
779
872
|
.get(constants_1.PluginNames.AAD)) === null || _d === void 0 ? void 0 : _d.get(isLocalDebug ? constants_1.LOCAL_DEBUG_AAD_ID : constants_1.REMOTE_AAD_ID);
|
|
780
873
|
}
|
|
781
874
|
return clientId;
|
|
@@ -786,10 +879,10 @@ class AppStudioPluginImpl {
|
|
|
786
879
|
if (common_1.isMultiEnvEnabled()) {
|
|
787
880
|
botId = isLocalDebug
|
|
788
881
|
? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.bot) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsBotKeys.BotId)
|
|
789
|
-
: (_c = ctx.
|
|
882
|
+
: (_c = ctx.envInfo.profile.get(constants_1.PluginNames.BOT)) === null || _c === void 0 ? void 0 : _c.get(constants_2.BOT_ID);
|
|
790
883
|
}
|
|
791
884
|
else {
|
|
792
|
-
botId = (_d = ctx.
|
|
885
|
+
botId = (_d = ctx.envInfo.profile
|
|
793
886
|
.get(constants_1.PluginNames.BOT)) === null || _d === void 0 ? void 0 : _d.get(isLocalDebug ? constants_2.LOCAL_BOT_ID : constants_2.BOT_ID);
|
|
794
887
|
}
|
|
795
888
|
return botId;
|
|
@@ -800,12 +893,12 @@ class AppStudioPluginImpl {
|
|
|
800
893
|
if (common_1.isMultiEnvEnabled()) {
|
|
801
894
|
botDomain = isLocalDebug
|
|
802
895
|
? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.bot) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsBotKeys.BotDomain)
|
|
803
|
-
: (_c = ctx.
|
|
896
|
+
: (_c = ctx.envInfo.profile.get(constants_1.PluginNames.BOT)) === null || _c === void 0 ? void 0 : _c.get(constants_1.BOT_DOMAIN);
|
|
804
897
|
}
|
|
805
898
|
else {
|
|
806
899
|
botDomain = isLocalDebug
|
|
807
|
-
? (_d = ctx.
|
|
808
|
-
: (_e = ctx.
|
|
900
|
+
? (_d = ctx.envInfo.profile.get(constants_1.PluginNames.LDEBUG)) === null || _d === void 0 ? void 0 : _d.get(constants_1.LOCAL_DEBUG_BOT_DOMAIN)
|
|
901
|
+
: (_e = ctx.envInfo.profile.get(constants_1.PluginNames.BOT)) === null || _e === void 0 ? void 0 : _e.get(constants_1.BOT_DOMAIN);
|
|
809
902
|
}
|
|
810
903
|
return botDomain;
|
|
811
904
|
}
|
|
@@ -815,25 +908,26 @@ class AppStudioPluginImpl {
|
|
|
815
908
|
if (common_1.isMultiEnvEnabled()) {
|
|
816
909
|
applicationIdUris = isLocalDebug
|
|
817
910
|
? (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.auth) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsAuthKeys.ApplicationIdUris)
|
|
818
|
-
: (_c = ctx.
|
|
819
|
-
.get(constants_1.PluginNames.AAD)) === null || _c === void 0 ? void 0 : _c.get(constants_1.WEB_APPLICATION_INFO_SOURCE);
|
|
911
|
+
: (_c = ctx.envInfo.profile.get(constants_1.PluginNames.AAD)) === null || _c === void 0 ? void 0 : _c.get(constants_1.WEB_APPLICATION_INFO_SOURCE);
|
|
820
912
|
}
|
|
821
913
|
else {
|
|
822
|
-
applicationIdUris = (_d = ctx.
|
|
914
|
+
applicationIdUris = (_d = ctx.envInfo.profile
|
|
823
915
|
.get(constants_1.PluginNames.AAD)) === null || _d === void 0 ? void 0 : _d.get(isLocalDebug ? constants_1.LOCAL_WEB_APPLICATION_INFO_SOURCE : constants_1.WEB_APPLICATION_INFO_SOURCE);
|
|
824
916
|
}
|
|
825
917
|
return applicationIdUris;
|
|
826
918
|
}
|
|
827
919
|
getTeamsAppId(ctx, isLocalDebug) {
|
|
828
|
-
var _a, _b, _c;
|
|
920
|
+
var _a, _b, _c, _d;
|
|
829
921
|
let teamsAppId;
|
|
830
922
|
if (isLocalDebug) {
|
|
831
923
|
teamsAppId = common_1.isMultiEnvEnabled()
|
|
832
924
|
? (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.teamsApp.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId)
|
|
833
|
-
: (_b = ctx.
|
|
925
|
+
: (_b = ctx.envInfo.profile.get("solution")) === null || _b === void 0 ? void 0 : _b.get(constants_1.LOCAL_DEBUG_TEAMS_APP_ID);
|
|
834
926
|
}
|
|
835
927
|
else {
|
|
836
|
-
teamsAppId =
|
|
928
|
+
teamsAppId = common_1.isMultiEnvEnabled()
|
|
929
|
+
? (_c = ctx.envInfo.profile.get(constants_1.PluginNames.APPST)) === null || _c === void 0 ? void 0 : _c.get(constants_2.Constants.TEAMS_APP_ID)
|
|
930
|
+
: (_d = ctx.envInfo.profile.get("solution")) === null || _d === void 0 ? void 0 : _d.get(constants_1.REMOTE_TEAMS_APP_ID);
|
|
837
931
|
}
|
|
838
932
|
return teamsAppId;
|
|
839
933
|
}
|
|
@@ -851,6 +945,8 @@ class AppStudioPluginImpl {
|
|
|
851
945
|
appDefinition.appId = appManifest.id;
|
|
852
946
|
appDefinition.appName = appManifest.name.short;
|
|
853
947
|
appDefinition.shortName = appManifest.name.short;
|
|
948
|
+
appDefinition.longName = appManifest.name.full;
|
|
949
|
+
appDefinition.manifestVersion = appManifest.manifestVersion;
|
|
854
950
|
appDefinition.version = appManifest.version;
|
|
855
951
|
appDefinition.packageName = appManifest.packageName;
|
|
856
952
|
appDefinition.accentColor = appManifest.accentColor;
|
|
@@ -890,7 +986,6 @@ class AppStudioPluginImpl {
|
|
|
890
986
|
const manifest = await fs.readJSON(await this.getManifestTemplatePath(ctx.root));
|
|
891
987
|
manifest.bots = undefined;
|
|
892
988
|
manifest.composeExtensions = undefined;
|
|
893
|
-
// For SPFX remote teams app, manifest.id == componentId
|
|
894
989
|
if (isLocalDebug || !isUUID_1.default(manifest.id)) {
|
|
895
990
|
manifest.id = uuid_1.v4();
|
|
896
991
|
}
|
|
@@ -918,7 +1013,7 @@ class AppStudioPluginImpl {
|
|
|
918
1013
|
: results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.RemoteAppIdCreateFailedError.name, errors_1.AppStudioError.RemoteAppIdCreateFailedError.message(e)));
|
|
919
1014
|
}
|
|
920
1015
|
}
|
|
921
|
-
async updateApp(ctx, appDefinition, appStudioToken, type, createIfNotExist, teamsAppId, logProvider
|
|
1016
|
+
async updateApp(ctx, appDefinition, appStudioToken, type, createIfNotExist, appDirectory, teamsAppId, logProvider) {
|
|
922
1017
|
if (appStudioToken === undefined || appStudioToken.length === 0) {
|
|
923
1018
|
return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.AppStudioTokenGetFailedError.name, errors_1.AppStudioError.AppStudioTokenGetFailedError.message));
|
|
924
1019
|
}
|
|
@@ -957,7 +1052,7 @@ class AppStudioPluginImpl {
|
|
|
957
1052
|
}
|
|
958
1053
|
}
|
|
959
1054
|
async getAppDefinitionAndManifest(ctx, isLocalDebug) {
|
|
960
|
-
var _a, _b
|
|
1055
|
+
var _a, _b;
|
|
961
1056
|
const configs = this.getConfigForCreatingManifest(ctx, isLocalDebug);
|
|
962
1057
|
if (configs.isErr()) {
|
|
963
1058
|
return teamsfx_api_1.err(configs.error);
|
|
@@ -971,14 +1066,31 @@ class AppStudioPluginImpl {
|
|
|
971
1066
|
validDomains.push(botDomain);
|
|
972
1067
|
}
|
|
973
1068
|
let manifest = (await fs.readFile(await this.getManifestTemplatePath(ctx.root))).toString();
|
|
1069
|
+
if (common_1.isMultiEnvEnabled()) {
|
|
1070
|
+
const view = {
|
|
1071
|
+
config: ctx.envInfo.config,
|
|
1072
|
+
profile: {
|
|
1073
|
+
"fx-resource-frontend-hosting": {
|
|
1074
|
+
endpoint: tabEndpoint,
|
|
1075
|
+
},
|
|
1076
|
+
"fx-resource-aad-app-for-teams": {
|
|
1077
|
+
clientId: aadId,
|
|
1078
|
+
applicationIdUris: webApplicationInfoResource,
|
|
1079
|
+
},
|
|
1080
|
+
"fx-resource-appstudio": {
|
|
1081
|
+
teamsAppId: teamsAppId,
|
|
1082
|
+
},
|
|
1083
|
+
"fx-resource-bot": {
|
|
1084
|
+
botId: botId,
|
|
1085
|
+
},
|
|
1086
|
+
},
|
|
1087
|
+
};
|
|
1088
|
+
manifest = mustache_1.default.render(manifest, view);
|
|
1089
|
+
}
|
|
974
1090
|
const appName = (_a = ctx.projectSettings) === null || _a === void 0 ? void 0 : _a.appName;
|
|
975
1091
|
if (appName) {
|
|
976
1092
|
manifest = this.replaceConfigValue(manifest, "appName", appName);
|
|
977
1093
|
}
|
|
978
|
-
const version = (_c = (_b = ctx.projectSettings) === null || _b === void 0 ? void 0 : _b.solutionSettings) === null || _c === void 0 ? void 0 : _c.version;
|
|
979
|
-
if (version) {
|
|
980
|
-
manifest = this.replaceConfigValue(manifest, "version", version);
|
|
981
|
-
}
|
|
982
1094
|
if (botId) {
|
|
983
1095
|
manifest = this.replaceConfigValue(manifest, "botId", botId);
|
|
984
1096
|
}
|
|
@@ -990,9 +1102,26 @@ class AppStudioPluginImpl {
|
|
|
990
1102
|
if (webApplicationInfoResource) {
|
|
991
1103
|
manifest = this.replaceConfigValue(manifest, "webApplicationInfoResource", webApplicationInfoResource);
|
|
992
1104
|
}
|
|
993
|
-
|
|
1105
|
+
let updatedManifest;
|
|
1106
|
+
try {
|
|
1107
|
+
updatedManifest = JSON.parse(manifest);
|
|
1108
|
+
}
|
|
1109
|
+
catch (error) {
|
|
1110
|
+
if (error.stack && error.stack.startsWith("SyntaxError")) {
|
|
1111
|
+
// teams app id in userData may be updated by user, result to invalid manifest
|
|
1112
|
+
const reg = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
|
1113
|
+
const result = teamsAppId.match(reg);
|
|
1114
|
+
if (!result) {
|
|
1115
|
+
return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.InvalidManifestError.name, errors_1.AppStudioError.InvalidManifestError.message(error, "teamsAppId"), undefined, error.stack));
|
|
1116
|
+
}
|
|
1117
|
+
return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.InvalidManifestError.name, errors_1.AppStudioError.InvalidManifestError.message(error), undefined, error.stack));
|
|
1118
|
+
}
|
|
1119
|
+
else {
|
|
1120
|
+
return teamsfx_api_1.err(error);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
994
1123
|
for (const domain of validDomains) {
|
|
995
|
-
(
|
|
1124
|
+
(_b = updatedManifest.validDomains) === null || _b === void 0 ? void 0 : _b.push(domain);
|
|
996
1125
|
}
|
|
997
1126
|
if (!tabEndpoint && updatedManifest.developer) {
|
|
998
1127
|
updatedManifest.developer.websiteUrl = constants_2.DEFAULT_DEVELOPER_WEBSITE_URL;
|