@microsoft/teamsfx-core 1.1.1 → 1.1.2-alpha.30d0724a.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/armInterface.d.ts +1 -1
- package/build/common/armInterface.d.ts.map +1 -1
- package/build/common/constants.d.ts +3 -2
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +3 -2
- package/build/common/constants.js.map +1 -1
- package/build/common/local/localEnvManager.d.ts +17 -0
- package/build/common/local/localEnvManager.d.ts.map +1 -0
- package/build/common/local/localEnvManager.js +72 -0
- package/build/common/local/localEnvManager.js.map +1 -0
- package/build/common/localSettingsProvider.d.ts +3 -3
- package/build/common/localSettingsProvider.d.ts.map +1 -1
- package/build/common/localSettingsProvider.js +11 -6
- package/build/common/localSettingsProvider.js.map +1 -1
- package/build/common/samples-config.json +14 -0
- package/build/common/tools.d.ts +11 -1
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +23 -10
- package/build/common/tools.js.map +1 -1
- package/build/core/SolutionPluginContainer.d.ts +2 -1
- package/build/core/SolutionPluginContainer.d.ts.map +1 -1
- package/build/core/SolutionPluginContainer.js +9 -1
- package/build/core/SolutionPluginContainer.js.map +1 -1
- package/build/core/environment.d.ts +4 -3
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +37 -7
- package/build/core/environment.js.map +1 -1
- package/build/core/error.d.ts +2 -1
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +7 -3
- package/build/core/error.js.map +1 -1
- package/build/core/index.d.ts +52 -14
- package/build/core/index.d.ts.map +1 -1
- package/build/core/index.js +699 -485
- package/build/core/index.js.map +1 -1
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +23 -12
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/envInfoLoader.d.ts +5 -1
- package/build/core/middleware/envInfoLoader.d.ts.map +1 -1
- package/build/core/middleware/envInfoLoader.js +51 -44
- package/build/core/middleware/envInfoLoader.js.map +1 -1
- package/build/core/middleware/envInfoLoaderV3.d.ts +3 -0
- package/build/core/middleware/envInfoLoaderV3.d.ts.map +1 -0
- package/build/core/middleware/envInfoLoaderV3.js +64 -0
- package/build/core/middleware/envInfoLoaderV3.js.map +1 -0
- package/build/core/middleware/envInfoWriter.js +13 -30
- package/build/core/middleware/envInfoWriter.js.map +1 -1
- package/build/core/middleware/envInfoWriterV3.d.ts +6 -0
- package/build/core/middleware/envInfoWriterV3.d.ts.map +1 -0
- package/build/core/middleware/envInfoWriterV3.js +63 -0
- package/build/core/middleware/envInfoWriterV3.js.map +1 -0
- package/build/core/middleware/errorHandler.d.ts.map +1 -1
- package/build/core/middleware/errorHandler.js +3 -5
- package/build/core/middleware/errorHandler.js.map +1 -1
- 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 +6 -16
- package/build/core/middleware/localSettingsWriter.js.map +1 -1
- package/build/core/middleware/projectMigrator.d.ts.map +1 -1
- package/build/core/middleware/projectMigrator.js +22 -54
- package/build/core/middleware/projectMigrator.js.map +1 -1
- package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
- package/build/core/middleware/projectSettingsLoader.js +2 -4
- package/build/core/middleware/projectSettingsLoader.js.map +1 -1
- package/build/core/middleware/projectSettingsLoaderV3.d.ts +4 -0
- package/build/core/middleware/projectSettingsLoaderV3.d.ts.map +1 -0
- package/build/core/middleware/projectSettingsLoaderV3.js +49 -0
- package/build/core/middleware/projectSettingsLoaderV3.js.map +1 -0
- package/build/core/middleware/projectSettingsWriter.d.ts.map +1 -1
- package/build/core/middleware/projectSettingsWriter.js +2 -2
- package/build/core/middleware/projectSettingsWriter.js.map +1 -1
- package/build/core/middleware/questionModel.d.ts +14 -1
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +319 -23
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/core/middleware/solutionLoader.d.ts +3 -2
- package/build/core/middleware/solutionLoader.d.ts.map +1 -1
- package/build/core/middleware/solutionLoader.js +21 -23
- package/build/core/middleware/solutionLoader.js.map +1 -1
- package/build/core/middleware/solutionLoaderV3.d.ts +4 -0
- package/build/core/middleware/solutionLoaderV3.d.ts.map +1 -0
- package/build/core/middleware/solutionLoaderV3.js +19 -0
- package/build/core/middleware/solutionLoaderV3.js.map +1 -0
- package/build/core/question.d.ts +9 -1
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +113 -3
- package/build/core/question.js.map +1 -1
- package/build/core/tools.d.ts +2 -1
- package/build/core/tools.d.ts.map +1 -1
- package/build/core/tools.js +15 -1
- package/build/core/tools.js.map +1 -1
- package/build/plugins/resource/aad/plugin.d.ts.map +1 -1
- package/build/plugins/resource/aad/plugin.js +1 -10
- package/build/plugins/resource/aad/plugin.js.map +1 -1
- package/build/plugins/resource/apim/managers/apimManager.d.ts.map +1 -1
- package/build/plugins/resource/apim/managers/apimManager.js +5 -7
- package/build/plugins/resource/apim/managers/apimManager.js.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.d.ts +1 -1
- package/build/plugins/resource/appstudio/appStudio.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/appStudio.js +106 -85
- package/build/plugins/resource/appstudio/appStudio.js.map +1 -1
- package/build/plugins/resource/appstudio/constants.d.ts +6 -1
- package/build/plugins/resource/appstudio/constants.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/constants.js +6 -1
- package/build/plugins/resource/appstudio/constants.js.map +1 -1
- package/build/plugins/resource/appstudio/errors.d.ts +1 -1
- package/build/plugins/resource/appstudio/errors.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/errors.js +2 -1
- package/build/plugins/resource/appstudio/errors.js.map +1 -1
- package/build/plugins/resource/appstudio/index.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/index.js +10 -2
- package/build/plugins/resource/appstudio/index.js.map +1 -1
- package/build/plugins/resource/appstudio/plugin.d.ts +2 -3
- package/build/plugins/resource/appstudio/plugin.d.ts.map +1 -1
- package/build/plugins/resource/appstudio/plugin.js +93 -119
- package/build/plugins/resource/appstudio/plugin.js.map +1 -1
- package/build/plugins/resource/bot/index.d.ts.map +1 -1
- package/build/plugins/resource/bot/index.js +5 -1
- package/build/plugins/resource/bot/index.js.map +1 -1
- package/build/plugins/resource/bot/plugin.d.ts.map +1 -1
- package/build/plugins/resource/bot/plugin.js +9 -11
- package/build/plugins/resource/bot/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/constants.d.ts +1 -7
- package/build/plugins/resource/frontend/constants.d.ts.map +1 -1
- package/build/plugins/resource/frontend/constants.js +2 -9
- package/build/plugins/resource/frontend/constants.js.map +1 -1
- package/build/plugins/resource/frontend/env.d.ts +21 -0
- package/build/plugins/resource/frontend/env.d.ts.map +1 -0
- package/build/plugins/resource/frontend/env.js +82 -0
- package/build/plugins/resource/frontend/env.js.map +1 -0
- package/build/plugins/resource/frontend/ops/deploy.d.ts +2 -1
- package/build/plugins/resource/frontend/ops/deploy.d.ts.map +1 -1
- package/build/plugins/resource/frontend/ops/deploy.js +2 -2
- package/build/plugins/resource/frontend/ops/deploy.js.map +1 -1
- package/build/plugins/resource/frontend/plugin.d.ts +2 -0
- package/build/plugins/resource/frontend/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/plugin.js +28 -16
- package/build/plugins/resource/frontend/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/utils/environment-utils.d.ts.map +1 -1
- package/build/plugins/resource/frontend/utils/environment-utils.js +4 -2
- package/build/plugins/resource/frontend/utils/environment-utils.js.map +1 -1
- package/build/plugins/resource/frontend/utils.d.ts +6 -1
- package/build/plugins/resource/frontend/utils.d.ts.map +1 -1
- package/build/plugins/resource/frontend/utils.js +17 -6
- package/build/plugins/resource/frontend/utils.js.map +1 -1
- package/build/plugins/resource/function/plugin.d.ts.map +1 -1
- package/build/plugins/resource/function/plugin.js +7 -9
- package/build/plugins/resource/function/plugin.js.map +1 -1
- package/build/plugins/resource/function/utils/depsChecker/checker.d.ts +0 -1
- package/build/plugins/resource/function/utils/depsChecker/checker.d.ts.map +1 -1
- package/build/plugins/resource/function/utils/depsChecker/checker.js +2 -2
- package/build/plugins/resource/function/utils/depsChecker/checker.js.map +1 -1
- package/build/plugins/resource/function/utils/depsChecker/common.d.ts +2 -2
- package/build/plugins/resource/function/utils/depsChecker/common.d.ts.map +1 -1
- package/build/plugins/resource/function/utils/depsChecker/common.js +6 -6
- package/build/plugins/resource/function/utils/depsChecker/common.js.map +1 -1
- package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.d.ts +3 -2
- package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.d.ts.map +1 -1
- package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.js +3 -2
- package/build/plugins/resource/function/utils/depsChecker/dotnetChecker.js.map +1 -1
- package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.d.ts +0 -1
- package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.d.ts.map +1 -1
- package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.js +1 -23
- package/build/plugins/resource/function/utils/depsChecker/funcPluginAdapter.js.map +1 -1
- package/build/plugins/resource/identity/index.d.ts.map +1 -1
- package/build/plugins/resource/identity/index.js +11 -13
- package/build/plugins/resource/identity/index.js.map +1 -1
- package/build/plugins/resource/keyvault/plugin.d.ts.map +1 -1
- package/build/plugins/resource/keyvault/plugin.js +7 -9
- package/build/plugins/resource/keyvault/plugin.js.map +1 -1
- package/build/plugins/resource/localdebug/certificate.js +3 -3
- package/build/plugins/resource/localdebug/certificate.js.map +1 -1
- package/build/plugins/resource/localdebug/index.d.ts +0 -1
- package/build/plugins/resource/localdebug/index.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/index.js +3 -280
- package/build/plugins/resource/localdebug/index.js.map +1 -1
- package/build/plugins/resource/localdebug/util/error.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/util/error.js +1 -1
- package/build/plugins/resource/localdebug/util/error.js.map +1 -1
- package/build/plugins/resource/localdebug/v2/index.d.ts.map +1 -1
- package/build/plugins/resource/localdebug/v2/index.js +34 -1
- package/build/plugins/resource/localdebug/v2/index.js.map +1 -1
- package/build/plugins/resource/simpleauth/plugin.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/plugin.js +7 -9
- package/build/plugins/resource/simpleauth/plugin.js.map +1 -1
- package/build/plugins/resource/simpleauth/utils/common.d.ts.map +1 -1
- package/build/plugins/resource/simpleauth/utils/common.js +3 -1
- package/build/plugins/resource/simpleauth/utils/common.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/constants.d.ts +1 -0
- package/build/plugins/resource/sql/constants.d.ts.map +1 -1
- package/build/plugins/resource/sql/constants.js +1 -0
- package/build/plugins/resource/sql/constants.js.map +1 -1
- package/build/plugins/resource/sql/errors.d.ts +1 -0
- package/build/plugins/resource/sql/errors.d.ts.map +1 -1
- package/build/plugins/resource/sql/errors.js +1 -0
- package/build/plugins/resource/sql/errors.js.map +1 -1
- package/build/plugins/resource/sql/managementClient.d.ts +3 -1
- package/build/plugins/resource/sql/managementClient.d.ts.map +1 -1
- package/build/plugins/resource/sql/managementClient.js +11 -2
- package/build/plugins/resource/sql/managementClient.js.map +1 -1
- package/build/plugins/resource/sql/plugin.d.ts +3 -0
- package/build/plugins/resource/sql/plugin.d.ts.map +1 -1
- package/build/plugins/resource/sql/plugin.js +37 -27
- package/build/plugins/resource/sql/plugin.js.map +1 -1
- package/build/plugins/resource/sql/sqlClient.d.ts +1 -1
- package/build/plugins/resource/sql/sqlClient.d.ts.map +1 -1
- package/build/plugins/resource/sql/sqlClient.js +15 -24
- package/build/plugins/resource/sql/sqlClient.js.map +1 -1
- package/build/plugins/resource/sql/utils/checkInput.js +2 -2
- package/build/plugins/resource/sql/utils/checkInput.js.map +1 -1
- package/build/plugins/resource/sql/utils/message.d.ts +0 -1
- package/build/plugins/resource/sql/utils/message.d.ts.map +1 -1
- package/build/plugins/resource/sql/utils/message.js +0 -1
- package/build/plugins/resource/sql/utils/message.js.map +1 -1
- package/build/plugins/solution/fx-solution/arm.d.ts +18 -11
- package/build/plugins/solution/fx-solution/arm.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/arm.js +387 -120
- package/build/plugins/solution/fx-solution/arm.js.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.d.ts +13 -2
- package/build/plugins/solution/fx-solution/commonQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/commonQuestions.js +24 -26
- package/build/plugins/solution/fx-solution/commonQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/debug/constants.d.ts +9 -0
- package/build/plugins/solution/fx-solution/debug/constants.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/debug/constants.js +16 -0
- package/build/plugins/solution/fx-solution/debug/constants.js.map +1 -0
- package/build/plugins/solution/fx-solution/debug/error.d.ts +7 -0
- package/build/plugins/solution/fx-solution/debug/error.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/debug/error.js +28 -0
- package/build/plugins/solution/fx-solution/debug/error.js.map +1 -0
- package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts +3 -0
- package/build/plugins/solution/fx-solution/debug/provisionLocal.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js +107 -0
- package/build/plugins/solution/fx-solution/debug/provisionLocal.js.map +1 -0
- package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts +3 -0
- package/build/plugins/solution/fx-solution/debug/scaffolding.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/debug/scaffolding.js +153 -0
- package/build/plugins/solution/fx-solution/debug/scaffolding.js.map +1 -0
- package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/codespace.d.ts +0 -0
- package/build/plugins/solution/fx-solution/debug/util/codespace.d.ts.map +1 -0
- package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/codespace.js +0 -0
- package/build/plugins/solution/fx-solution/debug/util/codespace.js.map +1 -0
- package/build/plugins/solution/fx-solution/debug/util/contextHelper.d.ts +10 -0
- package/build/plugins/solution/fx-solution/debug/util/contextHelper.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/debug/util/contextHelper.js +34 -0
- package/build/plugins/solution/fx-solution/debug/util/contextHelper.js.map +1 -0
- package/build/plugins/{resource/localdebug → solution/fx-solution/debug/util}/launch.d.ts +0 -0
- package/build/plugins/solution/fx-solution/debug/util/launch.d.ts.map +1 -0
- package/build/plugins/{resource/localdebug → solution/fx-solution/debug/util}/launch.js +1 -1
- package/build/plugins/solution/fx-solution/debug/util/launch.js.map +1 -0
- package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/ngrok.d.ts +0 -0
- package/build/plugins/solution/fx-solution/debug/util/ngrok.d.ts.map +1 -0
- package/build/plugins/{resource/localdebug → solution/fx-solution/debug}/util/ngrok.js +2 -2
- package/build/plugins/solution/fx-solution/debug/util/ngrok.js.map +1 -0
- package/build/plugins/solution/fx-solution/debug/util/settings.d.ts +2 -0
- package/build/plugins/solution/fx-solution/debug/util/settings.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/debug/util/settings.js +22 -0
- package/build/plugins/solution/fx-solution/debug/util/settings.js.map +1 -0
- package/build/plugins/{resource/localdebug → solution/fx-solution/debug/util}/tasks.d.ts +0 -0
- package/build/plugins/solution/fx-solution/debug/util/tasks.d.ts.map +1 -0
- package/build/plugins/{resource/localdebug → solution/fx-solution/debug/util}/tasks.js +6 -6
- package/build/plugins/solution/fx-solution/debug/util/tasks.js.map +1 -0
- package/build/plugins/solution/fx-solution/debug/util/telemetry.d.ts +27 -0
- package/build/plugins/solution/fx-solution/debug/util/telemetry.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/debug/util/telemetry.js +81 -0
- package/build/plugins/solution/fx-solution/debug/util/telemetry.js.map +1 -0
- package/build/plugins/solution/fx-solution/index.d.ts +1 -0
- package/build/plugins/solution/fx-solution/index.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/index.js +1 -0
- package/build/plugins/solution/fx-solution/index.js.map +1 -1
- package/build/plugins/solution/fx-solution/question.d.ts +2 -2
- package/build/plugins/solution/fx-solution/question.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/question.js +2 -32
- package/build/plugins/solution/fx-solution/question.js.map +1 -1
- package/build/plugins/solution/fx-solution/solution.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/solution.js +9 -5
- package/build/plugins/solution/fx-solution/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/utils/depsChecker/bicepChecker.d.ts +2 -2
- package/build/plugins/solution/fx-solution/utils/depsChecker/bicepChecker.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/utils/depsChecker/bicepChecker.js +13 -14
- package/build/plugins/solution/fx-solution/utils/depsChecker/bicepChecker.js.map +1 -1
- package/build/plugins/solution/fx-solution/utils/progressHelper.d.ts +2 -2
- package/build/plugins/solution/fx-solution/utils/progressHelper.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/utils/progressHelper.js +4 -4
- package/build/plugins/solution/fx-solution/utils/progressHelper.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/constants.d.ts +2 -0
- package/build/plugins/solution/fx-solution/v2/constants.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v2/constants.js +7 -0
- package/build/plugins/solution/fx-solution/v2/constants.js.map +1 -0
- package/build/plugins/solution/fx-solution/v2/createEnv.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/createEnv.js +1 -1
- package/build/plugins/solution/fx-solution/v2/createEnv.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js +7 -4
- package/build/plugins/solution/fx-solution/v2/executeUserTask.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/getQuestions.js +67 -25
- package/build/plugins/solution/fx-solution/v2/getQuestions.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/listAllCollaborators.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provision.js +9 -1
- package/build/plugins/solution/fx-solution/v2/provision.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js +5 -0
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/scaffolding.js +5 -0
- package/build/plugins/solution/fx-solution/v2/scaffolding.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/solution.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/solution.js +2 -1
- package/build/plugins/solution/fx-solution/v2/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/v3/addModule.d.ts +6 -0
- package/build/plugins/solution/fx-solution/v3/addModule.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/addModule.js +35 -0
- package/build/plugins/solution/fx-solution/v3/addModule.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/addResource.d.ts +37 -0
- package/build/plugins/solution/fx-solution/v3/addResource.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/addResource.js +260 -0
- package/build/plugins/solution/fx-solution/v3/addResource.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/constants.d.ts +20 -0
- package/build/plugins/solution/fx-solution/v3/constants.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/constants.js +25 -0
- package/build/plugins/solution/fx-solution/v3/constants.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/deploy.d.ts +6 -0
- package/build/plugins/solution/fx-solution/v3/deploy.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/deploy.js +78 -0
- package/build/plugins/solution/fx-solution/v3/deploy.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/error.d.ts +11 -0
- package/build/plugins/solution/fx-solution/v3/error.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/error.js +23 -0
- package/build/plugins/solution/fx-solution/v3/error.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/init.d.ts +4 -0
- package/build/plugins/solution/fx-solution/v3/init.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/init.js +35 -0
- package/build/plugins/solution/fx-solution/v3/init.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/provision.d.ts +4 -0
- package/build/plugins/solution/fx-solution/v3/provision.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/provision.js +124 -0
- package/build/plugins/solution/fx-solution/v3/provision.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/provisionLocal.d.ts +4 -0
- package/build/plugins/solution/fx-solution/v3/provisionLocal.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/provisionLocal.js +13 -0
- package/build/plugins/solution/fx-solution/v3/provisionLocal.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/publish.d.ts +4 -0
- package/build/plugins/solution/fx-solution/v3/publish.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/publish.js +15 -0
- package/build/plugins/solution/fx-solution/v3/publish.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/questions.d.ts +16 -0
- package/build/plugins/solution/fx-solution/v3/questions.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/questions.js +86 -0
- package/build/plugins/solution/fx-solution/v3/questions.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/scaffold.d.ts +27 -0
- package/build/plugins/solution/fx-solution/v3/scaffold.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/scaffold.js +241 -0
- package/build/plugins/solution/fx-solution/v3/scaffold.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/solution.d.ts +32 -0
- package/build/plugins/solution/fx-solution/v3/solution.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/solution.js +45 -0
- package/build/plugins/solution/fx-solution/v3/solution.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/userTask.d.ts +4 -0
- package/build/plugins/solution/fx-solution/v3/userTask.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/userTask.js +15 -0
- package/build/plugins/solution/fx-solution/v3/userTask.js.map +1 -0
- package/build/plugins/solution/fx-solution/v3/utils.d.ts +3 -0
- package/build/plugins/solution/fx-solution/v3/utils.d.ts.map +1 -0
- package/build/plugins/solution/fx-solution/v3/utils.js +16 -0
- package/build/plugins/solution/fx-solution/v3/utils.js.map +1 -0
- package/build/plugins/solution/index.d.ts +1 -0
- package/build/plugins/solution/index.d.ts.map +1 -1
- package/build/plugins/solution/index.js +1 -0
- package/build/plugins/solution/index.js.map +1 -1
- package/build/plugins/solution/spfx-solution/constants.d.ts +2 -0
- package/build/plugins/solution/spfx-solution/constants.d.ts.map +1 -0
- package/build/plugins/solution/spfx-solution/constants.js +7 -0
- package/build/plugins/solution/spfx-solution/constants.js.map +1 -0
- package/build/plugins/solution/spfx-solution/index.d.ts +2 -0
- package/build/plugins/solution/spfx-solution/index.d.ts.map +1 -0
- package/build/plugins/solution/spfx-solution/index.js +5 -0
- package/build/plugins/solution/spfx-solution/index.js.map +1 -0
- package/build/plugins/solution/spfx-solution/init.d.ts +3 -0
- package/build/plugins/solution/spfx-solution/init.d.ts.map +1 -0
- package/build/plugins/solution/spfx-solution/init.js +20 -0
- package/build/plugins/solution/spfx-solution/init.js.map +1 -0
- package/build/plugins/solution/spfx-solution/questions.d.ts +6 -0
- package/build/plugins/solution/spfx-solution/questions.d.ts.map +1 -0
- package/build/plugins/solution/spfx-solution/questions.js +36 -0
- package/build/plugins/solution/spfx-solution/questions.js.map +1 -0
- package/build/plugins/solution/spfx-solution/scaffolding.d.ts +17 -0
- package/build/plugins/solution/spfx-solution/scaffolding.d.ts.map +1 -0
- package/build/plugins/solution/spfx-solution/scaffolding.js +29 -0
- package/build/plugins/solution/spfx-solution/scaffolding.js.map +1 -0
- package/build/plugins/solution/spfx-solution/solution.d.ts +23 -0
- package/build/plugins/solution/spfx-solution/solution.d.ts.map +1 -0
- package/build/plugins/solution/spfx-solution/solution.js +29 -0
- package/build/plugins/solution/spfx-solution/solution.js.map +1 -0
- package/package.json +9 -4
- package/resource/strings.json +0 -1
- package/templates/plugins/resource/apim/bicep/apimConfiguration.bicep +16 -16
- package/templates/plugins/resource/apim/bicep/config.template.bicep +1 -1
- package/templates/plugins/resource/apim/bicep/provision.template.bicep +1 -1
- package/templates/plugins/resource/bot/bicep/botConfiguration.template.bicep +28 -29
- package/templates/plugins/resource/bot/bicep/config.template.bicep +1 -1
- package/templates/plugins/resource/bot/bicep/provision.template.bicep +2 -2
- package/templates/plugins/resource/frontend/bicep/provision.template.bicep +1 -1
- package/templates/plugins/resource/function/bicep/config.template.bicep +1 -1
- package/templates/plugins/resource/function/bicep/functionConfiguration.template.bicep +33 -31
- package/templates/plugins/resource/function/bicep/provision.template.bicep +2 -2
- package/templates/plugins/resource/identity/bicep/provision.template.bicep +1 -1
- package/templates/plugins/resource/keyvault/bicep/provision.template.bicep +3 -2
- package/templates/plugins/resource/simpleauth/bicep/config.template.bicep +1 -1
- package/templates/plugins/resource/simpleauth/bicep/provision.template.bicep +2 -2
- package/templates/plugins/resource/simpleauth/bicep/simpleAuthConfiguration.template.bicep +20 -24
- package/templates/plugins/resource/simpleauth/version.txt +2 -1
- package/templates/plugins/resource/sql/bicep/provision.template.bicep +1 -1
- package/build/plugins/resource/localdebug/launch.d.ts.map +0 -1
- package/build/plugins/resource/localdebug/launch.js.map +0 -1
- package/build/plugins/resource/localdebug/legacyPlugin.d.ts +0 -6
- package/build/plugins/resource/localdebug/legacyPlugin.d.ts.map +0 -1
- package/build/plugins/resource/localdebug/legacyPlugin.js +0 -208
- package/build/plugins/resource/localdebug/legacyPlugin.js.map +0 -1
- package/build/plugins/resource/localdebug/settings.d.ts +0 -2
- package/build/plugins/resource/localdebug/settings.d.ts.map +0 -1
- package/build/plugins/resource/localdebug/settings.js +0 -18
- package/build/plugins/resource/localdebug/settings.js.map +0 -1
- package/build/plugins/resource/localdebug/tasks.d.ts.map +0 -1
- package/build/plugins/resource/localdebug/tasks.js.map +0 -1
- package/build/plugins/resource/localdebug/util/codespace.d.ts.map +0 -1
- package/build/plugins/resource/localdebug/util/codespace.js.map +0 -1
- package/build/plugins/resource/localdebug/util/ngrok.d.ts.map +0 -1
- package/build/plugins/resource/localdebug/util/ngrok.js.map +0 -1
- package/templates/azure/config.bicep +0 -25
- package/templates/azure/main.bicep +0 -20
- package/templates/azure/provision/azureSql.bicep +0 -39
- package/templates/azure/provision/frontendHosting.bicep +0 -23
- package/templates/azure/provision/function.bicep +0 -79
- package/templates/azure/provision/simpleAuth.bicep +0 -44
- package/templates/azure/provision.bicep +0 -58
- package/templates/azure/teamsFx/bot.bicep +0 -34
- package/templates/azure/teamsFx/function.bicep +0 -71
- package/templates/azure/teamsFx/simpleAuth.bicep +0 -40
- package/templates/plugins/resource/aad/bicep/param.template.bicep +0 -6
- package/templates/plugins/resource/aad/bicep/variables.template.bicep +0 -13
|
@@ -13,10 +13,9 @@ export declare class AppStudioPluginImpl {
|
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
15
|
createV1Manifest(ctx: PluginContext): Promise<TeamsAppManifest>;
|
|
16
|
-
reloadManifestAndCheckRequiredFields(manifestPath: string): Promise<Result<TeamsAppManifest, FxError>>;
|
|
17
16
|
provision(ctx: PluginContext): Promise<Result<string, FxError>>;
|
|
18
17
|
postProvision(ctx: PluginContext): Promise<Result<string, FxError>>;
|
|
19
|
-
validateManifest(ctx: PluginContext): Promise<Result<string[], FxError>>;
|
|
18
|
+
validateManifest(ctx: PluginContext, isLocalDebug: boolean): Promise<Result<string[], FxError>>;
|
|
20
19
|
updateManifest(ctx: PluginContext, isLocalDebug: boolean): Promise<Result<string, FxError>>;
|
|
21
20
|
migrateV1Project(ctx: PluginContext): Promise<{
|
|
22
21
|
enableAuth: boolean;
|
|
@@ -33,7 +32,6 @@ export declare class AppStudioPluginImpl {
|
|
|
33
32
|
listCollaborator(ctx: PluginContext): Promise<TeamsAppAdmin[]>;
|
|
34
33
|
grantPermission(ctx: PluginContext, userInfo: IUserList): Promise<ResourcePermission[]>;
|
|
35
34
|
private beforePublish;
|
|
36
|
-
private checkFileExist;
|
|
37
35
|
private replaceExistingValueToPlaceholder;
|
|
38
36
|
private convertToAppDefinitionMessagingExtensions;
|
|
39
37
|
private convertToAppDefinitionBots;
|
|
@@ -54,6 +52,7 @@ export declare class AppStudioPluginImpl {
|
|
|
54
52
|
private createApp;
|
|
55
53
|
private updateApp;
|
|
56
54
|
private getAppDefinitionAndManifest;
|
|
55
|
+
private getSPFxManifest;
|
|
57
56
|
getManifestTemplatePath(projectRoot: string, isLocalDebug?: boolean): Promise<string>;
|
|
58
57
|
}
|
|
59
58
|
export declare function createLocalManifest(appName: string, hasFrontend: boolean, hasBot: boolean, hasMessageExtension: boolean, isSPFx: boolean, migrateFromV1: boolean): Promise<TeamsAppManifest>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/resource/appstudio/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,OAAO,EACP,MAAM,EACN,aAAa,EACb,gBAAgB,EASjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAOL,SAAS,EAEV,MAAM,6BAA6B,CAAC;AAuErC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAYxF,qBAAa,mBAAmB;IACvB,gBAAgB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAE3C,yBAAyB,CACpC,GAAG,EAAE,aAAa,EAClB,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YA2DrB,uCAAuC;IAuErD;;;;OAIG;IACU,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA6C/D,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/resource/appstudio/plugin.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,OAAO,EACP,MAAM,EACN,aAAa,EACb,gBAAgB,EASjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAOL,SAAS,EAEV,MAAM,6BAA6B,CAAC;AAuErC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAYxF,qBAAa,mBAAmB;IACvB,gBAAgB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;IAE3C,yBAAyB,CACpC,GAAG,EAAE,aAAa,EAClB,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YA2DrB,uCAAuC;IAuErD;;;;OAIG;IACU,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA6C/D,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IA2B/D,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAmDnE,gBAAgB,CAC3B,GAAG,EAAE,aAAa,EAClB,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAyDxB,cAAc,CACzB,GAAG,EAAE,aAAa,EAClB,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAuItB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;IA6DtE,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC;IAyE1C,oBAAoB,CAAC,GAAG,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAgLhF,OAAO,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;IAuDnF,cAAc,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IA0BpE,eAAe,CAC1B,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,SAAS,GAClB,OAAO,CAAC,kBAAkB,EAAE,CAAC;IA8BnB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAwC9D,eAAe,CAC1B,GAAG,EAAE,aAAa,EAClB,QAAQ,EAAE,SAAS,GAClB,OAAO,CAAC,kBAAkB,EAAE,CAAC;YAwClB,aAAa;IAsF3B,OAAO,CAAC,iCAAiC;IAYzC,OAAO,CAAC,yCAAyC;IAqBjD,OAAO,CAAC,0BAA0B;YA2CpB,cAAc;YAmCd,4BAA4B;IAkC1C,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,QAAQ;IAgBhB,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,oBAAoB;YAkBd,aAAa;IA0B3B;;;OAGG;YACW,sBAAsB;YAyFtB,SAAS;YAoET,SAAS;YAsFT,2BAA2B;YAgP3B,eAAe;IAuBhB,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,UAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;CAQjG;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,OAAO,EACf,mBAAmB,EAAE,OAAO,EAC5B,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,OAAO,GACrB,OAAO,CAAC,gBAAgB,CAAC,CAkC3B;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,OAAO,EACf,mBAAmB,EAAE,OAAO,EAC5B,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,OAAO,GACrB,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAkCvC"}
|
|
@@ -129,7 +129,7 @@ class AppStudioPluginImpl {
|
|
|
129
129
|
async createV1Manifest(ctx) {
|
|
130
130
|
var _a, _b;
|
|
131
131
|
const archiveManifestPath = path_1.default.join(ctx.root, teamsfx_api_1.ArchiveFolderName, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.V1ManifestFileName);
|
|
132
|
-
const manifestSourceRes = await this.
|
|
132
|
+
const manifestSourceRes = await this.reloadManifest(archiveManifestPath);
|
|
133
133
|
if (manifestSourceRes.isErr()) {
|
|
134
134
|
throw manifestSourceRes.error;
|
|
135
135
|
}
|
|
@@ -158,17 +158,6 @@ class AppStudioPluginImpl {
|
|
|
158
158
|
}
|
|
159
159
|
return manifest;
|
|
160
160
|
}
|
|
161
|
-
async reloadManifestAndCheckRequiredFields(manifestPath) {
|
|
162
|
-
const result = await this.reloadManifest(manifestPath);
|
|
163
|
-
return result.andThen((manifest) => {
|
|
164
|
-
if (manifest === undefined ||
|
|
165
|
-
manifest.name.short === undefined ||
|
|
166
|
-
manifest.name.short.length === 0) {
|
|
167
|
-
return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.ManifestLoadFailedError.name, errors_1.AppStudioError.ManifestLoadFailedError.message("Name is missing")));
|
|
168
|
-
}
|
|
169
|
-
return teamsfx_api_1.ok(manifest);
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
161
|
async provision(ctx) {
|
|
173
162
|
var _a, _b, _c;
|
|
174
163
|
let remoteTeamsAppId = await this.getTeamsAppId(ctx, false);
|
|
@@ -193,9 +182,7 @@ class AppStudioPluginImpl {
|
|
|
193
182
|
remoteTeamsAppId = result.value.teamsAppId;
|
|
194
183
|
(_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.info(`Teams app created ${remoteTeamsAppId}`);
|
|
195
184
|
}
|
|
196
|
-
|
|
197
|
-
(_c = ctx.envInfo.state.get(constants_1.PluginNames.APPST)) === null || _c === void 0 ? void 0 : _c.set(constants_2.Constants.TEAMS_APP_ID, remoteTeamsAppId);
|
|
198
|
-
}
|
|
185
|
+
(_c = ctx.envInfo.state.get(constants_1.PluginNames.APPST)) === null || _c === void 0 ? void 0 : _c.set(constants_2.Constants.TEAMS_APP_ID, remoteTeamsAppId);
|
|
199
186
|
return teamsfx_api_1.ok(remoteTeamsAppId);
|
|
200
187
|
}
|
|
201
188
|
async postProvision(ctx) {
|
|
@@ -204,7 +191,7 @@ class AppStudioPluginImpl {
|
|
|
204
191
|
let manifestString;
|
|
205
192
|
const appDirectory = await common_1.getAppDirectory(ctx.root);
|
|
206
193
|
const manifestPath = await this.getManifestTemplatePath(ctx.root);
|
|
207
|
-
const manifestResult = await this.
|
|
194
|
+
const manifestResult = await this.reloadManifest(manifestPath);
|
|
208
195
|
if (manifestResult.isErr()) {
|
|
209
196
|
return teamsfx_api_1.err(manifestResult.error);
|
|
210
197
|
}
|
|
@@ -213,17 +200,7 @@ class AppStudioPluginImpl {
|
|
|
213
200
|
}
|
|
214
201
|
let appDefinition;
|
|
215
202
|
if (common_1.isSPFxProject(ctx.projectSettings)) {
|
|
216
|
-
|
|
217
|
-
const view = {
|
|
218
|
-
config: ctx.envInfo.config,
|
|
219
|
-
state: {
|
|
220
|
-
"fx-resource-appstudio": {
|
|
221
|
-
teamsAppId: remoteTeamsAppId,
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
};
|
|
225
|
-
manifestString = mustache_1.default.render(manifestString, view);
|
|
226
|
-
}
|
|
203
|
+
manifestString = await this.getSPFxManifest(ctx, false);
|
|
227
204
|
const appDefinitionRes = await this.convertToAppDefinition(ctx, JSON.parse(manifestString), false);
|
|
228
205
|
if (appDefinitionRes.isErr()) {
|
|
229
206
|
return teamsfx_api_1.err(appDefinitionRes.error);
|
|
@@ -245,22 +222,13 @@ class AppStudioPluginImpl {
|
|
|
245
222
|
(_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.info(`Teams app updated: ${result.value}`);
|
|
246
223
|
return teamsfx_api_1.ok(remoteTeamsAppId);
|
|
247
224
|
}
|
|
248
|
-
async validateManifest(ctx) {
|
|
249
|
-
var _a, _b
|
|
225
|
+
async validateManifest(ctx, isLocalDebug) {
|
|
226
|
+
var _a, _b;
|
|
250
227
|
const appStudioToken = await ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _a === void 0 ? void 0 : _a.getAccessToken());
|
|
251
228
|
let manifestString = undefined;
|
|
252
229
|
if (common_1.isSPFxProject(ctx.projectSettings)) {
|
|
253
|
-
manifestString =
|
|
230
|
+
manifestString = await this.getSPFxManifest(ctx, isLocalDebug);
|
|
254
231
|
if (common_1.isMultiEnvEnabled()) {
|
|
255
|
-
const view = {
|
|
256
|
-
config: ctx.envInfo.config,
|
|
257
|
-
state: {
|
|
258
|
-
"fx-resource-appstudio": {
|
|
259
|
-
teamsAppId: this.getTeamsAppId(ctx, false),
|
|
260
|
-
},
|
|
261
|
-
},
|
|
262
|
-
};
|
|
263
|
-
manifestString = mustache_1.default.render(manifestString, view);
|
|
264
232
|
const manifest = JSON.parse(manifestString);
|
|
265
233
|
if (!isUUID_1.default(manifest.id)) {
|
|
266
234
|
manifest.id = uuid_1.v4();
|
|
@@ -269,18 +237,10 @@ class AppStudioPluginImpl {
|
|
|
269
237
|
}
|
|
270
238
|
}
|
|
271
239
|
else {
|
|
272
|
-
const appDefinitionAndManifest = await this.getAppDefinitionAndManifest(ctx,
|
|
240
|
+
const appDefinitionAndManifest = await this.getAppDefinitionAndManifest(ctx, isLocalDebug);
|
|
273
241
|
if (appDefinitionAndManifest.isErr()) {
|
|
274
242
|
(_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.error("[Teams Toolkit] Manifest Validation failed!");
|
|
275
|
-
|
|
276
|
-
.get("solution")) === null || _c === void 0 ? void 0 : _c.get(constants_1.SOLUTION_PROVISION_SUCCEEDED));
|
|
277
|
-
if (appDefinitionAndManifest.error.name === errors_1.AppStudioError.GetRemoteConfigError.name &&
|
|
278
|
-
!isProvisionSucceeded) {
|
|
279
|
-
return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.GetRemoteConfigError.name, errors_1.AppStudioError.GetRemoteConfigError.message("Manifest validation failed"), constants_3.HelpLinks.WhyNeedProvision));
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
return teamsfx_api_1.err(appDefinitionAndManifest.error);
|
|
283
|
-
}
|
|
243
|
+
return teamsfx_api_1.err(appDefinitionAndManifest.error);
|
|
284
244
|
}
|
|
285
245
|
else {
|
|
286
246
|
manifestString = JSON.stringify(appDefinitionAndManifest.value[1]);
|
|
@@ -316,13 +276,13 @@ class AppStudioPluginImpl {
|
|
|
316
276
|
return teamsfx_api_1.ok(errors);
|
|
317
277
|
}
|
|
318
278
|
async updateManifest(ctx, isLocalDebug) {
|
|
319
|
-
var _a, _b, _c, _d, _e, _f;
|
|
279
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
320
280
|
const teamsAppId = await this.getTeamsAppId(ctx, isLocalDebug);
|
|
321
281
|
let manifest;
|
|
322
282
|
let manifestString;
|
|
323
283
|
const appDirectory = await common_1.getAppDirectory(ctx.root);
|
|
324
284
|
const manifestPath = await this.getManifestTemplatePath(ctx.root, isLocalDebug);
|
|
325
|
-
const manifestResult = await this.
|
|
285
|
+
const manifestResult = await this.reloadManifest(manifestPath);
|
|
326
286
|
if (manifestResult.isErr()) {
|
|
327
287
|
throw manifestResult;
|
|
328
288
|
}
|
|
@@ -331,27 +291,7 @@ class AppStudioPluginImpl {
|
|
|
331
291
|
}
|
|
332
292
|
let appDefinition;
|
|
333
293
|
if (common_1.isSPFxProject(ctx.projectSettings)) {
|
|
334
|
-
|
|
335
|
-
if (isLocalDebug) {
|
|
336
|
-
view = {
|
|
337
|
-
localSettings: {
|
|
338
|
-
teamsApp: {
|
|
339
|
-
teamsAppId: teamsAppId,
|
|
340
|
-
},
|
|
341
|
-
},
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
view = {
|
|
346
|
-
config: ctx.envInfo.config,
|
|
347
|
-
state: {
|
|
348
|
-
"fx-resource-appstudio": {
|
|
349
|
-
teamsAppId: teamsAppId,
|
|
350
|
-
},
|
|
351
|
-
},
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
manifestString = mustache_1.default.render(manifestString, view);
|
|
294
|
+
manifestString = await this.getSPFxManifest(ctx, isLocalDebug);
|
|
355
295
|
manifest = JSON.parse(manifestString);
|
|
356
296
|
const appDefinitionRes = await this.convertToAppDefinition(ctx, manifest, false);
|
|
357
297
|
if (appDefinitionRes.isErr()) {
|
|
@@ -398,12 +338,26 @@ class AppStudioPluginImpl {
|
|
|
398
338
|
}
|
|
399
339
|
const appStudioToken = await ((_d = ctx === null || ctx === void 0 ? void 0 : ctx.appStudioToken) === null || _d === void 0 ? void 0 : _d.getAccessToken());
|
|
400
340
|
try {
|
|
341
|
+
const localUpdateTime = isLocalDebug
|
|
342
|
+
? undefined
|
|
343
|
+
: (_e = ctx.envInfo.state.get(constants_1.PluginNames.APPST)) === null || _e === void 0 ? void 0 : _e.get(constants_2.Constants.TEAMS_APP_UPDATED_AT);
|
|
344
|
+
if (localUpdateTime) {
|
|
345
|
+
const app = await appStudio_1.AppStudioClient.getApp(teamsAppId, appStudioToken, ctx.logProvider);
|
|
346
|
+
const devPortalUpdateTime = (_g = (_f = new Date(app.updatedAt)) === null || _f === void 0 ? void 0 : _f.getTime()) !== null && _g !== void 0 ? _g : -1;
|
|
347
|
+
if (localUpdateTime < devPortalUpdateTime) {
|
|
348
|
+
const res = await ((_h = ctx.ui) === null || _h === void 0 ? void 0 : _h.showMessage("warn", "The manifest file on Teams platform has been changed since your last update. Do you want to continue to update and overwrite the manifest file on Teams platform?", true, "Overwrite and update"));
|
|
349
|
+
if (!((res === null || res === void 0 ? void 0 : res.isOk()) && res.value === "Overwrite and update")) {
|
|
350
|
+
const error = results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.UpdateManifestCancelError.name, errors_1.AppStudioError.UpdateManifestCancelError.message(manifest.name.short));
|
|
351
|
+
return teamsfx_api_1.err(error);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
401
355
|
const result = await this.updateApp(ctx, appDefinition, appStudioToken, isLocalDebug, false, appDirectory, teamsAppId, ctx.logProvider);
|
|
402
356
|
if (result.isErr()) {
|
|
403
357
|
throw result.error;
|
|
404
358
|
}
|
|
405
|
-
(
|
|
406
|
-
(
|
|
359
|
+
(_j = ctx.logProvider) === null || _j === void 0 ? void 0 : _j.info(`Teams app updated: ${result.value}`);
|
|
360
|
+
(_k = ctx.ui) === null || _k === void 0 ? void 0 : _k.showMessage("info", `Successfully updated manifest for [${manifest.name.short}]`, false);
|
|
407
361
|
return teamsfx_api_1.ok(teamsAppId);
|
|
408
362
|
}
|
|
409
363
|
catch (error) {
|
|
@@ -425,7 +379,7 @@ class AppStudioPluginImpl {
|
|
|
425
379
|
? `${ctx.root}/${constants_2.APP_PACKAGE_FOLDER_FOR_MULTI_ENV}`
|
|
426
380
|
: `${ctx.root}/${teamsfx_api_1.AppPackageFolderName}`;
|
|
427
381
|
await fs.ensureDir(newAppPackageFolder);
|
|
428
|
-
if (await
|
|
382
|
+
if (await fs.pathExists(archiveManifestPath)) {
|
|
429
383
|
manifest = await this.createV1Manifest(ctx);
|
|
430
384
|
const resourcesDir = common_1.isMultiEnvEnabled()
|
|
431
385
|
? path_1.default.join(newAppPackageFolder, constants_2.MANIFEST_RESOURCES)
|
|
@@ -433,7 +387,7 @@ class AppStudioPluginImpl {
|
|
|
433
387
|
await fs.ensureDir(resourcesDir);
|
|
434
388
|
if (((_a = manifest === null || manifest === void 0 ? void 0 : manifest.icons) === null || _a === void 0 ? void 0 : _a.color) && !manifest.icons.color.startsWith("https://")) {
|
|
435
389
|
const archiveColorFile = path_1.default.join(archiveAppPackageFolder, manifest.icons.color);
|
|
436
|
-
const existColorFile = await
|
|
390
|
+
const existColorFile = await fs.pathExists(archiveColorFile);
|
|
437
391
|
const newColorFileName = existColorFile
|
|
438
392
|
? path_1.default.basename(manifest.icons.color)
|
|
439
393
|
: constants_2.DEFAULT_COLOR_PNG_FILENAME;
|
|
@@ -444,7 +398,7 @@ class AppStudioPluginImpl {
|
|
|
444
398
|
}
|
|
445
399
|
if (((_b = manifest === null || manifest === void 0 ? void 0 : manifest.icons) === null || _b === void 0 ? void 0 : _b.outline) && !manifest.icons.outline.startsWith("https://")) {
|
|
446
400
|
const archiveOutlineFile = path_1.default.join(archiveAppPackageFolder, manifest.icons.outline);
|
|
447
|
-
const existOutlineFile = await
|
|
401
|
+
const existOutlineFile = await fs.pathExists(archiveOutlineFile);
|
|
448
402
|
const newOutlineFileName = existOutlineFile
|
|
449
403
|
? path_1.default.basename(manifest.icons.outline)
|
|
450
404
|
: constants_2.DEFAULT_OUTLINE_PNG_FILENAME;
|
|
@@ -507,6 +461,13 @@ class AppStudioPluginImpl {
|
|
|
507
461
|
}
|
|
508
462
|
async buildTeamsAppPackage(ctx, isLocalDebug) {
|
|
509
463
|
var _a, _b, _c;
|
|
464
|
+
// Validate manifest
|
|
465
|
+
const validationResult = await this.validateManifest(ctx, isLocalDebug);
|
|
466
|
+
if (validationResult.isOk() && validationResult.value.length > 0) {
|
|
467
|
+
const errMessage = errors_1.AppStudioError.ValidationFailedError.message(validationResult.value);
|
|
468
|
+
const validationFailed = results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.ValidationFailedError.name, errMessage);
|
|
469
|
+
throw validationFailed;
|
|
470
|
+
}
|
|
510
471
|
let manifestString = undefined;
|
|
511
472
|
if (!((_a = ctx.envInfo) === null || _a === void 0 ? void 0 : _a.envName)) {
|
|
512
473
|
throw new Error("Failed to get target environment name from plugin context.");
|
|
@@ -525,17 +486,8 @@ class AppStudioPluginImpl {
|
|
|
525
486
|
zipFileName = `${ctx.root}/${teamsfx_api_1.AppPackageFolderName}/appPackage.zip`;
|
|
526
487
|
}
|
|
527
488
|
if (common_1.isSPFxProject(ctx.projectSettings)) {
|
|
528
|
-
manifestString =
|
|
489
|
+
manifestString = await this.getSPFxManifest(ctx, isLocalDebug);
|
|
529
490
|
if (common_1.isMultiEnvEnabled()) {
|
|
530
|
-
const view = {
|
|
531
|
-
config: ctx.envInfo.config,
|
|
532
|
-
state: {
|
|
533
|
-
"fx-resource-appstudio": {
|
|
534
|
-
teamsAppId: await this.getTeamsAppId(ctx, isLocalDebug),
|
|
535
|
-
},
|
|
536
|
-
},
|
|
537
|
-
};
|
|
538
|
-
manifestString = mustache_1.default.render(manifestString, view);
|
|
539
491
|
const manifest = JSON.parse(manifestString);
|
|
540
492
|
if (!isUUID_1.default(manifest.id)) {
|
|
541
493
|
manifest.id = uuid_1.v4();
|
|
@@ -571,7 +523,7 @@ class AppStudioPluginImpl {
|
|
|
571
523
|
// color icon
|
|
572
524
|
if (manifest.icons.color && !manifest.icons.color.startsWith("https://")) {
|
|
573
525
|
const colorFile = `${appDirectory}/${manifest.icons.color}`;
|
|
574
|
-
const fileExists = await
|
|
526
|
+
const fileExists = await fs.pathExists(colorFile);
|
|
575
527
|
if (!fileExists) {
|
|
576
528
|
throw results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.FileNotFoundError.name, errors_1.AppStudioError.FileNotFoundError.message(colorFile));
|
|
577
529
|
}
|
|
@@ -581,7 +533,7 @@ class AppStudioPluginImpl {
|
|
|
581
533
|
// outline icon
|
|
582
534
|
if (manifest.icons.outline && !manifest.icons.outline.startsWith("https://")) {
|
|
583
535
|
const outlineFile = `${appDirectory}/${manifest.icons.outline}`;
|
|
584
|
-
const fileExists = await
|
|
536
|
+
const fileExists = await fs.pathExists(outlineFile);
|
|
585
537
|
if (!fileExists) {
|
|
586
538
|
throw results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.FileNotFoundError.name, errors_1.AppStudioError.FileNotFoundError.message(outlineFile));
|
|
587
539
|
}
|
|
@@ -593,7 +545,11 @@ class AppStudioPluginImpl {
|
|
|
593
545
|
const manifestFileName = `${ctx.root}/${teamsfx_api_1.BuildFolderName}/${teamsfx_api_1.AppPackageFolderName}/manifest.` +
|
|
594
546
|
(isLocalDebug ? "local" : ctx.envInfo.envName) +
|
|
595
547
|
`.json`;
|
|
548
|
+
if (await fs.pathExists(manifestFileName)) {
|
|
549
|
+
await fs.chmod(manifestFileName, 0o777);
|
|
550
|
+
}
|
|
596
551
|
await fs.writeFile(manifestFileName, manifestString);
|
|
552
|
+
await fs.chmod(manifestFileName, 0o444);
|
|
597
553
|
}
|
|
598
554
|
// localization file
|
|
599
555
|
if (manifest.localizationInfo &&
|
|
@@ -616,7 +572,7 @@ class AppStudioPluginImpl {
|
|
|
616
572
|
if (appDirectory === `${ctx.root}/.${teamsfx_api_1.ConfigFolderName}`) {
|
|
617
573
|
await fs.ensureDir(path_1.default.join(ctx.root, `${teamsfx_api_1.AppPackageFolderName}`));
|
|
618
574
|
const formerZipFileName = `${appDirectory}/appPackage.zip`;
|
|
619
|
-
if (await
|
|
575
|
+
if (await fs.pathExists(formerZipFileName)) {
|
|
620
576
|
await fs.remove(formerZipFileName);
|
|
621
577
|
}
|
|
622
578
|
await fs.move(`${appDirectory}/${manifest.icons.color}`, common_1.isMultiEnvEnabled()
|
|
@@ -637,17 +593,7 @@ class AppStudioPluginImpl {
|
|
|
637
593
|
const appDirectory = await common_1.getAppDirectory(ctx.root);
|
|
638
594
|
let manifestString = JSON.stringify(await fs.readJSON(await this.getManifestTemplatePath(ctx.root)));
|
|
639
595
|
if (common_1.isSPFxProject(ctx.projectSettings)) {
|
|
640
|
-
|
|
641
|
-
const view = {
|
|
642
|
-
config: ctx.envInfo.config,
|
|
643
|
-
state: {
|
|
644
|
-
"fx-resource-appstudio": {
|
|
645
|
-
teamsAppId: await this.getTeamsAppId(ctx, false),
|
|
646
|
-
},
|
|
647
|
-
},
|
|
648
|
-
};
|
|
649
|
-
manifestString = mustache_1.default.render(manifestString, view);
|
|
650
|
-
}
|
|
596
|
+
manifestString = await this.getSPFxManifest(ctx, false);
|
|
651
597
|
manifest = JSON.parse(manifestString);
|
|
652
598
|
}
|
|
653
599
|
else {
|
|
@@ -693,7 +639,7 @@ class AppStudioPluginImpl {
|
|
|
693
639
|
var _a, _b, _c, _d;
|
|
694
640
|
let teamsAppId;
|
|
695
641
|
const manifestPath = await this.getManifestTemplatePath(ctx.root, true);
|
|
696
|
-
const manifest = await this.
|
|
642
|
+
const manifest = await this.reloadManifest(manifestPath);
|
|
697
643
|
if (manifest.isErr()) {
|
|
698
644
|
return teamsfx_api_1.err(manifest.error);
|
|
699
645
|
}
|
|
@@ -805,7 +751,7 @@ class AppStudioPluginImpl {
|
|
|
805
751
|
return result;
|
|
806
752
|
}
|
|
807
753
|
async beforePublish(ctx, appDirectory, manifestString, update) {
|
|
808
|
-
var _a, _b, _c, _d;
|
|
754
|
+
var _a, _b, _c, _d, _e;
|
|
809
755
|
const manifest = JSON.parse(manifestString);
|
|
810
756
|
const publishProgress = (_a = ctx.ui) === null || _a === void 0 ? void 0 : _a.createProgressBar(`Publishing ${manifest.name.short}`, 3);
|
|
811
757
|
try {
|
|
@@ -830,7 +776,11 @@ class AppStudioPluginImpl {
|
|
|
830
776
|
? (await fs.readFile(`${appDirectory}/${manifest.icons.outline}`)).toString("base64")
|
|
831
777
|
: undefined;
|
|
832
778
|
try {
|
|
833
|
-
await appStudio_1.AppStudioClient.updateApp(remoteTeamsAppId, appDefinitionRes.value, appStudioToken, undefined, colorIconContent, outlineIconContent);
|
|
779
|
+
const app = await appStudio_1.AppStudioClient.updateApp(remoteTeamsAppId, appDefinitionRes.value, appStudioToken, undefined, colorIconContent, outlineIconContent);
|
|
780
|
+
if (app.updatedAt) {
|
|
781
|
+
(_d = ctx.envInfo.state
|
|
782
|
+
.get(constants_1.PluginNames.APPST)) === null || _d === void 0 ? void 0 : _d.set(constants_2.Constants.TEAMS_APP_UPDATED_AT, new Date(app.updatedAt).getTime());
|
|
783
|
+
}
|
|
834
784
|
}
|
|
835
785
|
catch (e) {
|
|
836
786
|
if (e.name === 404) {
|
|
@@ -842,7 +792,7 @@ class AppStudioPluginImpl {
|
|
|
842
792
|
await (publishProgress === null || publishProgress === void 0 ? void 0 : publishProgress.next(`Building Teams app package in ${appDirectory}.`));
|
|
843
793
|
const appPackage = await this.buildTeamsAppPackage(ctx, false);
|
|
844
794
|
const appContent = await fs.readFile(appPackage);
|
|
845
|
-
appStudioToken = await ((
|
|
795
|
+
appStudioToken = await ((_e = ctx.appStudioToken) === null || _e === void 0 ? void 0 : _e.getAccessToken());
|
|
846
796
|
await (publishProgress === null || publishProgress === void 0 ? void 0 : publishProgress.next(`Publishing ${manifest.name.short}`));
|
|
847
797
|
if (update) {
|
|
848
798
|
// Update existing app in App Catalog
|
|
@@ -857,15 +807,6 @@ class AppStudioPluginImpl {
|
|
|
857
807
|
await (publishProgress === null || publishProgress === void 0 ? void 0 : publishProgress.end(true));
|
|
858
808
|
}
|
|
859
809
|
}
|
|
860
|
-
async checkFileExist(filePath) {
|
|
861
|
-
try {
|
|
862
|
-
await fs.stat(filePath);
|
|
863
|
-
return true;
|
|
864
|
-
}
|
|
865
|
-
catch (error) {
|
|
866
|
-
return false;
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
810
|
replaceExistingValueToPlaceholder(config, value, placeholderName) {
|
|
870
811
|
if (config && value && placeholderName) {
|
|
871
812
|
config = config.split(value).join(placeholderName);
|
|
@@ -1050,12 +991,15 @@ class AppStudioPluginImpl {
|
|
|
1050
991
|
}
|
|
1051
992
|
async getTeamsAppId(ctx, isLocalDebug) {
|
|
1052
993
|
var _a, _b, _c, _d, _e;
|
|
1053
|
-
let teamsAppId;
|
|
994
|
+
let teamsAppId = "";
|
|
1054
995
|
if (common_1.isMultiEnvEnabled() || !isLocalDebug) {
|
|
1055
996
|
// User may manually update id in manifest template file, rather than configuration file
|
|
1056
997
|
// The id in manifest template file should override configurations
|
|
1057
|
-
const
|
|
1058
|
-
|
|
998
|
+
const manifestFile = await this.getManifestTemplatePath(ctx.root, isLocalDebug);
|
|
999
|
+
if (await fs.pathExists(manifestFile)) {
|
|
1000
|
+
const manifest = await fs.readJSON(manifestFile);
|
|
1001
|
+
teamsAppId = manifest.id;
|
|
1002
|
+
}
|
|
1059
1003
|
if (!isUUID_1.default(teamsAppId)) {
|
|
1060
1004
|
if (common_1.isMultiEnvEnabled()) {
|
|
1061
1005
|
teamsAppId = isLocalDebug
|
|
@@ -1181,6 +1125,7 @@ class AppStudioPluginImpl {
|
|
|
1181
1125
|
}
|
|
1182
1126
|
}
|
|
1183
1127
|
async updateApp(ctx, appDefinition, appStudioToken, isLocalDebug, createIfNotExist, appDirectory, teamsAppId, logProvider) {
|
|
1128
|
+
var _a;
|
|
1184
1129
|
if (appStudioToken === undefined || appStudioToken.length === 0) {
|
|
1185
1130
|
return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.AppStudioTokenGetFailedError.name, errors_1.AppStudioError.AppStudioTokenGetFailedError.message));
|
|
1186
1131
|
}
|
|
@@ -1206,7 +1151,11 @@ class AppStudioPluginImpl {
|
|
|
1206
1151
|
: undefined;
|
|
1207
1152
|
appDefinition.appId = teamsAppId;
|
|
1208
1153
|
try {
|
|
1209
|
-
await appStudio_1.AppStudioClient.updateApp(teamsAppId, appDefinition, appStudioToken, logProvider, colorIconContent, outlineIconContent);
|
|
1154
|
+
const app = await appStudio_1.AppStudioClient.updateApp(teamsAppId, appDefinition, appStudioToken, logProvider, colorIconContent, outlineIconContent);
|
|
1155
|
+
if (app.updatedAt && !isLocalDebug) {
|
|
1156
|
+
const time = new Date(app.updatedAt).getTime();
|
|
1157
|
+
(_a = ctx.envInfo.state.get(constants_1.PluginNames.APPST)) === null || _a === void 0 ? void 0 : _a.set(constants_2.Constants.TEAMS_APP_UPDATED_AT, time);
|
|
1158
|
+
}
|
|
1210
1159
|
return teamsfx_api_1.ok(teamsAppId);
|
|
1211
1160
|
}
|
|
1212
1161
|
catch (e) {
|
|
@@ -1240,7 +1189,11 @@ class AppStudioPluginImpl {
|
|
|
1240
1189
|
validDomains.push(botDomain);
|
|
1241
1190
|
}
|
|
1242
1191
|
}
|
|
1243
|
-
|
|
1192
|
+
const manifestFile = await this.getManifestTemplatePath(ctx.root, isLocalDebug);
|
|
1193
|
+
if (!(await fs.pathExists(manifestFile))) {
|
|
1194
|
+
return teamsfx_api_1.err(results_1.AppStudioResultFactory.SystemError(errors_1.AppStudioError.FileNotFoundError.name, errors_1.AppStudioError.FileNotFoundError.message(manifestFile)));
|
|
1195
|
+
}
|
|
1196
|
+
let manifest = (await fs.readFile(manifestFile)).toString();
|
|
1244
1197
|
// Bot only project, without frontend hosting
|
|
1245
1198
|
let endpoint = tabEndpoint;
|
|
1246
1199
|
const solutionSettings = (_b = ctx.projectSettings) === null || _b === void 0 ? void 0 : _b.solutionSettings;
|
|
@@ -1367,6 +1320,27 @@ class AppStudioPluginImpl {
|
|
|
1367
1320
|
}
|
|
1368
1321
|
return teamsfx_api_1.ok([appDefinition, updatedManifest]);
|
|
1369
1322
|
}
|
|
1323
|
+
async getSPFxManifest(ctx, isLocalDebug) {
|
|
1324
|
+
var _a, _b;
|
|
1325
|
+
let manifestString = JSON.stringify(await fs.readJSON(await this.getManifestTemplatePath(ctx.root, isLocalDebug)));
|
|
1326
|
+
if (common_1.isMultiEnvEnabled()) {
|
|
1327
|
+
const view = {
|
|
1328
|
+
config: ctx.envInfo.config,
|
|
1329
|
+
state: {
|
|
1330
|
+
"fx-resource-appstudio": {
|
|
1331
|
+
teamsAppId: await this.getTeamsAppId(ctx, isLocalDebug),
|
|
1332
|
+
},
|
|
1333
|
+
},
|
|
1334
|
+
localSettings: {
|
|
1335
|
+
teamsApp: {
|
|
1336
|
+
teamsAppId: (_b = (_a = ctx.localSettings) === null || _a === void 0 ? void 0 : _a.teamsApp) === null || _b === void 0 ? void 0 : _b.get(localSettingsConstants_1.LocalSettingsTeamsAppKeys.TeamsAppId),
|
|
1337
|
+
},
|
|
1338
|
+
},
|
|
1339
|
+
};
|
|
1340
|
+
manifestString = mustache_1.default.render(manifestString, view);
|
|
1341
|
+
}
|
|
1342
|
+
return manifestString;
|
|
1343
|
+
}
|
|
1370
1344
|
async getManifestTemplatePath(projectRoot, isLocalDebug = false) {
|
|
1371
1345
|
const appDir = await common_1.getAppDirectory(projectRoot);
|
|
1372
1346
|
if (common_1.isMultiEnvEnabled()) {
|