@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
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getQuestionsForAddResource = exports.getQuestionsForAddCapability = exports.getQuestionsForUserTask = exports.getQuestions = exports.getTabScaffoldQuestionsV2 = exports.getQuestionsForScaffolding = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
6
|
+
const typedi_1 = tslib_1.__importDefault(require("typedi"));
|
|
7
|
+
const common_1 = require("../../../../common");
|
|
8
|
+
const commonQuestions_1 = require("../commonQuestions");
|
|
9
|
+
const constants_1 = require("../constants");
|
|
10
|
+
const question_1 = require("../question");
|
|
11
|
+
const ResourcePluginContainer_1 = require("../ResourcePluginContainer");
|
|
12
|
+
const utils_1 = require("./utils");
|
|
13
|
+
async function getQuestionsForScaffolding(ctx, inputs) {
|
|
14
|
+
const node = new teamsfx_api_1.QTreeNode({ type: "group" });
|
|
15
|
+
// 1. capabilities
|
|
16
|
+
const capQuestion = question_1.createCapabilityQuestion();
|
|
17
|
+
const capNode = new teamsfx_api_1.QTreeNode(capQuestion);
|
|
18
|
+
node.addChild(capNode);
|
|
19
|
+
// 1.1 hostType
|
|
20
|
+
const hostTypeNode = new teamsfx_api_1.QTreeNode(question_1.FrontendHostTypeQuestion);
|
|
21
|
+
hostTypeNode.condition = { contains: question_1.TabOptionItem.id };
|
|
22
|
+
capNode.addChild(hostTypeNode);
|
|
23
|
+
// 1.1.1 SPFX Tab
|
|
24
|
+
const spfxPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.SpfxPlugin);
|
|
25
|
+
if (spfxPlugin.getQuestionsForScaffolding) {
|
|
26
|
+
const res = await spfxPlugin.getQuestionsForScaffolding(ctx, inputs);
|
|
27
|
+
if (res.isErr())
|
|
28
|
+
return res;
|
|
29
|
+
if (res.value) {
|
|
30
|
+
const spfxNode = res.value;
|
|
31
|
+
spfxNode.condition = { equals: question_1.HostTypeOptionSPFx.id };
|
|
32
|
+
if (spfxNode.data)
|
|
33
|
+
hostTypeNode.addChild(spfxNode);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// 1.1.2 Azure Tab
|
|
37
|
+
const tabRes = await getTabScaffoldQuestionsV2(ctx, inputs, true);
|
|
38
|
+
if (tabRes.isErr())
|
|
39
|
+
return tabRes;
|
|
40
|
+
if (tabRes.value) {
|
|
41
|
+
const tabNode = tabRes.value;
|
|
42
|
+
tabNode.condition = { equals: question_1.HostTypeOptionAzure.id };
|
|
43
|
+
hostTypeNode.addChild(tabNode);
|
|
44
|
+
}
|
|
45
|
+
// 1.2 Bot
|
|
46
|
+
const botPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.BotPlugin);
|
|
47
|
+
if (botPlugin.getQuestionsForScaffolding) {
|
|
48
|
+
const res = await botPlugin.getQuestionsForScaffolding(ctx, inputs);
|
|
49
|
+
if (res.isErr())
|
|
50
|
+
return res;
|
|
51
|
+
if (res.value) {
|
|
52
|
+
const botGroup = res.value;
|
|
53
|
+
botGroup.condition = { containsAny: [question_1.BotOptionItem.id, question_1.MessageExtensionItem.id] };
|
|
54
|
+
capNode.addChild(botGroup);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// 1.3 Language
|
|
58
|
+
const programmingLanguage = new teamsfx_api_1.QTreeNode(question_1.ProgrammingLanguageQuestion);
|
|
59
|
+
programmingLanguage.condition = { minItems: 1 };
|
|
60
|
+
capNode.addChild(programmingLanguage);
|
|
61
|
+
return teamsfx_api_1.ok(node);
|
|
62
|
+
}
|
|
63
|
+
exports.getQuestionsForScaffolding = getQuestionsForScaffolding;
|
|
64
|
+
async function getTabScaffoldQuestionsV2(ctx, inputs, addAzureResource) {
|
|
65
|
+
const tabNode = new teamsfx_api_1.QTreeNode({ type: "group" });
|
|
66
|
+
//Frontend plugin
|
|
67
|
+
const fehostPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.FrontendPlugin);
|
|
68
|
+
if (fehostPlugin.getQuestionsForScaffolding) {
|
|
69
|
+
const res = await fehostPlugin.getQuestionsForScaffolding(ctx, inputs);
|
|
70
|
+
if (res.isErr())
|
|
71
|
+
return res;
|
|
72
|
+
if (res.value) {
|
|
73
|
+
const frontendNode = res.value;
|
|
74
|
+
if (frontendNode.data)
|
|
75
|
+
tabNode.addChild(frontendNode);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (addAzureResource) {
|
|
79
|
+
const azureResourceNode = new teamsfx_api_1.QTreeNode(question_1.AzureResourcesQuestion);
|
|
80
|
+
tabNode.addChild(azureResourceNode);
|
|
81
|
+
const functionPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.FunctionPlugin);
|
|
82
|
+
//Azure Function
|
|
83
|
+
if (functionPlugin.getQuestionsForScaffolding) {
|
|
84
|
+
const res = await functionPlugin.getQuestionsForScaffolding(ctx, inputs);
|
|
85
|
+
if (res.isErr())
|
|
86
|
+
return res;
|
|
87
|
+
if (res.value) {
|
|
88
|
+
const azure_function = res.value;
|
|
89
|
+
azure_function.condition = { minItems: 1 };
|
|
90
|
+
if (azure_function.data)
|
|
91
|
+
azureResourceNode.addChild(azure_function);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const sqlPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.SqlPlugin);
|
|
95
|
+
//Azure SQL
|
|
96
|
+
if (sqlPlugin.getQuestionsForScaffolding) {
|
|
97
|
+
const res = await sqlPlugin.getQuestionsForScaffolding(ctx, inputs);
|
|
98
|
+
if (res.isErr())
|
|
99
|
+
return res;
|
|
100
|
+
if (res.value) {
|
|
101
|
+
const azure_sql = res.value;
|
|
102
|
+
azure_sql.condition = { contains: question_1.AzureResourceSQL.id };
|
|
103
|
+
if (azure_sql.data)
|
|
104
|
+
azureResourceNode.addChild(azure_sql);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return teamsfx_api_1.ok(tabNode);
|
|
109
|
+
}
|
|
110
|
+
exports.getTabScaffoldQuestionsV2 = getTabScaffoldQuestionsV2;
|
|
111
|
+
async function getQuestions(ctx, inputs, envInfo, tokenProvider) {
|
|
112
|
+
const stage = inputs.stage;
|
|
113
|
+
if (!stage) {
|
|
114
|
+
return teamsfx_api_1.err(new teamsfx_api_1.InvalidInputError("Solution", "inputs.stage", "undefined"));
|
|
115
|
+
}
|
|
116
|
+
const isDynamicQuestion = teamsfx_api_1.DynamicPlatforms.includes(inputs.platform);
|
|
117
|
+
const node = new teamsfx_api_1.QTreeNode({ type: "group" });
|
|
118
|
+
const solutionSettings = ctx.projectSetting.solutionSettings;
|
|
119
|
+
if (stage == teamsfx_api_1.Stage.migrateV1) {
|
|
120
|
+
const capQuestion = question_1.createV1CapabilityQuestion();
|
|
121
|
+
const capNode = new teamsfx_api_1.QTreeNode(capQuestion);
|
|
122
|
+
node.addChild(capNode);
|
|
123
|
+
}
|
|
124
|
+
else if (stage === teamsfx_api_1.Stage.provision) {
|
|
125
|
+
if (isDynamicQuestion) {
|
|
126
|
+
const v1Blocked = utils_1.blockV1Project(solutionSettings);
|
|
127
|
+
if (v1Blocked.isErr()) {
|
|
128
|
+
return teamsfx_api_1.err(v1Blocked.error);
|
|
129
|
+
}
|
|
130
|
+
const provisioned = utils_1.checkWetherProvisionSucceeded(envInfo.profile);
|
|
131
|
+
if (provisioned)
|
|
132
|
+
return teamsfx_api_1.ok(undefined);
|
|
133
|
+
}
|
|
134
|
+
let plugins = [];
|
|
135
|
+
if (isDynamicQuestion) {
|
|
136
|
+
plugins = utils_1.getSelectedPlugins(solutionSettings);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
plugins = ResourcePluginContainer_1.getAllV2ResourcePlugins();
|
|
140
|
+
node.addChild(new teamsfx_api_1.QTreeNode(question_1.AskSubscriptionQuestion));
|
|
141
|
+
}
|
|
142
|
+
for (const plugin of plugins) {
|
|
143
|
+
if (plugin.getQuestions) {
|
|
144
|
+
const getQuestionRes = await plugin.getQuestions(ctx, inputs, envInfo, tokenProvider);
|
|
145
|
+
if (getQuestionRes.isErr())
|
|
146
|
+
return getQuestionRes;
|
|
147
|
+
if (getQuestionRes.value) {
|
|
148
|
+
const subnode = getQuestionRes.value;
|
|
149
|
+
node.addChild(subnode);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
else if (stage === teamsfx_api_1.Stage.deploy) {
|
|
155
|
+
if (isDynamicQuestion) {
|
|
156
|
+
const v1Blocked = utils_1.blockV1Project(solutionSettings);
|
|
157
|
+
if (v1Blocked.isErr()) {
|
|
158
|
+
return teamsfx_api_1.err(v1Blocked.error);
|
|
159
|
+
}
|
|
160
|
+
const isAzure = utils_1.isAzureProject(solutionSettings);
|
|
161
|
+
const provisioned = utils_1.checkWetherProvisionSucceeded(envInfo.profile);
|
|
162
|
+
if (isAzure && !provisioned) {
|
|
163
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error(common_1.getStrings().solution.FailedToDeployBeforeProvision), "Solution", constants_1.SolutionError.CannotDeployBeforeProvision));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
let plugins = [];
|
|
167
|
+
if (isDynamicQuestion) {
|
|
168
|
+
plugins = utils_1.getSelectedPlugins(solutionSettings);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
plugins = ResourcePluginContainer_1.getAllV2ResourcePlugins();
|
|
172
|
+
}
|
|
173
|
+
plugins = plugins.filter((plugin) => !!plugin.deploy);
|
|
174
|
+
if (plugins.length === 0) {
|
|
175
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error("No resource to deploy"), "Solution", constants_1.SolutionError.NoResourceToDeploy));
|
|
176
|
+
}
|
|
177
|
+
const pluginPrefix = "fx-resource-";
|
|
178
|
+
const options = plugins.map((plugin) => {
|
|
179
|
+
const item = {
|
|
180
|
+
id: plugin.name,
|
|
181
|
+
label: plugin.displayName,
|
|
182
|
+
cliName: plugin.name.replace(pluginPrefix, ""),
|
|
183
|
+
};
|
|
184
|
+
return item;
|
|
185
|
+
});
|
|
186
|
+
const selectQuestion = question_1.DeployPluginSelectQuestion;
|
|
187
|
+
selectQuestion.staticOptions = options;
|
|
188
|
+
selectQuestion.default = options.map((i) => i.id);
|
|
189
|
+
const pluginSelection = new teamsfx_api_1.QTreeNode(selectQuestion);
|
|
190
|
+
node.addChild(pluginSelection);
|
|
191
|
+
for (const plugin of plugins) {
|
|
192
|
+
if (plugin.getQuestions) {
|
|
193
|
+
const getQuestionRes = await plugin.getQuestions(ctx, inputs, envInfo, tokenProvider);
|
|
194
|
+
if (getQuestionRes.isErr())
|
|
195
|
+
return getQuestionRes;
|
|
196
|
+
if (getQuestionRes.value) {
|
|
197
|
+
const subnode = getQuestionRes.value;
|
|
198
|
+
subnode.condition = { contains: plugin.name };
|
|
199
|
+
if (subnode.data)
|
|
200
|
+
pluginSelection.addChild(subnode);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
else if (stage === teamsfx_api_1.Stage.publish) {
|
|
206
|
+
if (isDynamicQuestion) {
|
|
207
|
+
const v1Blocked = utils_1.blockV1Project(solutionSettings);
|
|
208
|
+
if (v1Blocked.isErr()) {
|
|
209
|
+
return teamsfx_api_1.err(v1Blocked.error);
|
|
210
|
+
}
|
|
211
|
+
const isAzure = utils_1.isAzureProject(solutionSettings);
|
|
212
|
+
const provisioned = utils_1.checkWetherProvisionSucceeded(envInfo.profile);
|
|
213
|
+
if (isAzure && !provisioned) {
|
|
214
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error(common_1.getStrings().solution.FailedToPublishBeforeProvision), "Solution", constants_1.SolutionError.CannotPublishBeforeProvision));
|
|
215
|
+
}
|
|
216
|
+
if (!provisioned && !isAzure) {
|
|
217
|
+
if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
|
|
218
|
+
ctx.userInteraction.showMessage("error", common_1.getStrings().solution.SPFxAskProvisionBeforePublish, false);
|
|
219
|
+
return teamsfx_api_1.err(constants_1.CancelError);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error(common_1.getStrings().solution.SPFxAskProvisionBeforePublish), "Solution", constants_1.SolutionError.CannotPublishBeforeProvision));
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
let plugins = [];
|
|
227
|
+
if (isDynamicQuestion) {
|
|
228
|
+
plugins = utils_1.getSelectedPlugins(solutionSettings);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
plugins = ResourcePluginContainer_1.getAllV2ResourcePlugins();
|
|
232
|
+
}
|
|
233
|
+
plugins = plugins.filter((plugin) => !!plugin.publishApplication);
|
|
234
|
+
for (const plugin of plugins) {
|
|
235
|
+
if (plugin.getQuestions) {
|
|
236
|
+
const getQuestionRes = await plugin.getQuestions(ctx, inputs, envInfo, tokenProvider);
|
|
237
|
+
if (getQuestionRes.isErr())
|
|
238
|
+
return getQuestionRes;
|
|
239
|
+
if (getQuestionRes.value) {
|
|
240
|
+
const subnode = getQuestionRes.value;
|
|
241
|
+
node.addChild(subnode);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
else if (stage === teamsfx_api_1.Stage.grantPermission) {
|
|
247
|
+
node.addChild(new teamsfx_api_1.QTreeNode(question_1.GetUserEmailQuestion));
|
|
248
|
+
}
|
|
249
|
+
return teamsfx_api_1.ok(node);
|
|
250
|
+
}
|
|
251
|
+
exports.getQuestions = getQuestions;
|
|
252
|
+
async function getQuestionsForUserTask(ctx, inputs, func, envInfo, tokenProvider) {
|
|
253
|
+
const namespace = func.namespace;
|
|
254
|
+
const array = namespace.split("/");
|
|
255
|
+
if (func.method === "addCapability") {
|
|
256
|
+
return await getQuestionsForAddCapability(ctx, inputs);
|
|
257
|
+
}
|
|
258
|
+
if (func.method === "addResource") {
|
|
259
|
+
return await getQuestionsForAddResource(ctx, inputs, func, envInfo, tokenProvider);
|
|
260
|
+
}
|
|
261
|
+
if (array.length == 2) {
|
|
262
|
+
const pluginName = array[1];
|
|
263
|
+
const pluginMap = ResourcePluginContainer_1.getAllV2ResourcePluginMap();
|
|
264
|
+
const plugin = pluginMap.get(pluginName);
|
|
265
|
+
if (plugin && plugin.getQuestionsForUserTask) {
|
|
266
|
+
return await plugin.getQuestionsForUserTask(ctx, inputs, func, envInfo, tokenProvider);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return teamsfx_api_1.ok(undefined);
|
|
270
|
+
}
|
|
271
|
+
exports.getQuestionsForUserTask = getQuestionsForUserTask;
|
|
272
|
+
async function getQuestionsForAddCapability(ctx, inputs) {
|
|
273
|
+
var _a;
|
|
274
|
+
const settings = ctx.projectSetting.solutionSettings;
|
|
275
|
+
const v1Blocked = utils_1.blockV1Project(settings);
|
|
276
|
+
if (v1Blocked.isErr()) {
|
|
277
|
+
return teamsfx_api_1.err(v1Blocked.error);
|
|
278
|
+
}
|
|
279
|
+
const isDynamicQuestion = teamsfx_api_1.DynamicPlatforms.includes(inputs.platform);
|
|
280
|
+
if (!(settings.hostType === question_1.HostTypeOptionAzure.id) && isDynamicQuestion) {
|
|
281
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error("Add capability is not supported for SPFx project"), "Solution", constants_1.SolutionError.AddResourceNotSupport));
|
|
282
|
+
}
|
|
283
|
+
const capabilities = settings.capabilities || [];
|
|
284
|
+
const alreadyHaveTab = capabilities.includes(question_1.TabOptionItem.id);
|
|
285
|
+
const alreadyHaveBotOrMe = capabilities.includes(question_1.BotOptionItem.id) || capabilities.includes(question_1.MessageExtensionItem.id);
|
|
286
|
+
if (alreadyHaveBotOrMe && alreadyHaveTab) {
|
|
287
|
+
const cannotAddCapWarnMsg = "Your App already has both Tab and Bot/Me, can not Add Capability.";
|
|
288
|
+
(_a = ctx.userInteraction) === null || _a === void 0 ? void 0 : _a.showMessage("error", cannotAddCapWarnMsg, false);
|
|
289
|
+
return teamsfx_api_1.ok(undefined);
|
|
290
|
+
}
|
|
291
|
+
const addCapQuestion = question_1.addCapabilityQuestion(alreadyHaveTab, alreadyHaveBotOrMe);
|
|
292
|
+
const addCapNode = new teamsfx_api_1.QTreeNode(addCapQuestion);
|
|
293
|
+
//Tab sub tree
|
|
294
|
+
if (!alreadyHaveTab || !isDynamicQuestion) {
|
|
295
|
+
const tabRes = await getTabScaffoldQuestionsV2(ctx, inputs, false);
|
|
296
|
+
if (tabRes.isErr())
|
|
297
|
+
return tabRes;
|
|
298
|
+
if (tabRes.value) {
|
|
299
|
+
const tabNode = tabRes.value;
|
|
300
|
+
tabNode.condition = { contains: question_1.TabOptionItem.id };
|
|
301
|
+
addCapNode.addChild(tabNode);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
// Bot has no question at all
|
|
305
|
+
return teamsfx_api_1.ok(addCapNode);
|
|
306
|
+
}
|
|
307
|
+
exports.getQuestionsForAddCapability = getQuestionsForAddCapability;
|
|
308
|
+
async function getQuestionsForAddResource(ctx, inputs, func, envInfo, tokenProvider) {
|
|
309
|
+
const settings = ctx.projectSetting.solutionSettings;
|
|
310
|
+
const v1Blocked = utils_1.blockV1Project(settings);
|
|
311
|
+
if (v1Blocked.isErr()) {
|
|
312
|
+
return teamsfx_api_1.err(v1Blocked.error);
|
|
313
|
+
}
|
|
314
|
+
const isDynamicQuestion = teamsfx_api_1.DynamicPlatforms.includes(inputs.platform);
|
|
315
|
+
if (isDynamicQuestion &&
|
|
316
|
+
!(settings.hostType === question_1.HostTypeOptionAzure.id &&
|
|
317
|
+
settings.capabilities &&
|
|
318
|
+
settings.capabilities.includes(question_1.TabOptionItem.id))) {
|
|
319
|
+
return teamsfx_api_1.err(new teamsfx_api_1.UserError(constants_1.SolutionError.AddResourceNotSupport, "Add resource is only supported for Tab app hosted in Azure.", "Solution"));
|
|
320
|
+
}
|
|
321
|
+
const selectedPlugins = settings.activeResourcePlugins || [];
|
|
322
|
+
if (!selectedPlugins) {
|
|
323
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error("selectedPlugins is empty"), "Solution", constants_1.SolutionError.InternelError));
|
|
324
|
+
}
|
|
325
|
+
const functionPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.FunctionPlugin);
|
|
326
|
+
const sqlPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.SqlPlugin);
|
|
327
|
+
const apimPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.ApimPlugin);
|
|
328
|
+
const alreadyHaveFunction = selectedPlugins.includes(functionPlugin.name);
|
|
329
|
+
const alreadyHaveSQL = selectedPlugins.includes(sqlPlugin.name);
|
|
330
|
+
const alreadyHaveAPIM = selectedPlugins.includes(apimPlugin.name);
|
|
331
|
+
const addQuestion = question_1.createAddAzureResourceQuestion(alreadyHaveFunction, alreadyHaveSQL, alreadyHaveAPIM);
|
|
332
|
+
const addAzureResourceNode = new teamsfx_api_1.QTreeNode(addQuestion);
|
|
333
|
+
// there two cases to add function re-scaffold: 1. select add function 2. select add sql and function is not selected when creating
|
|
334
|
+
if (functionPlugin.getQuestionsForUserTask) {
|
|
335
|
+
const res = await functionPlugin.getQuestionsForUserTask(ctx, inputs, func, envInfo, tokenProvider);
|
|
336
|
+
if (res.isErr())
|
|
337
|
+
return res;
|
|
338
|
+
if (res.value) {
|
|
339
|
+
const azure_function = res.value;
|
|
340
|
+
if (alreadyHaveFunction) {
|
|
341
|
+
// if already has function, the question will appear depends on whether user select function, otherwise, the question will always show
|
|
342
|
+
azure_function.condition = { contains: question_1.AzureResourceFunction.id };
|
|
343
|
+
}
|
|
344
|
+
else {
|
|
345
|
+
// if not function activated, select any option will trigger function question
|
|
346
|
+
azure_function.condition = { minItems: 1 };
|
|
347
|
+
}
|
|
348
|
+
if (azure_function.data)
|
|
349
|
+
addAzureResourceNode.addChild(azure_function);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
//Azure SQL
|
|
353
|
+
if (sqlPlugin.getQuestionsForUserTask && !alreadyHaveSQL) {
|
|
354
|
+
const res = await sqlPlugin.getQuestionsForUserTask(ctx, inputs, func, envInfo, tokenProvider);
|
|
355
|
+
if (res.isErr())
|
|
356
|
+
return res;
|
|
357
|
+
if (res.value) {
|
|
358
|
+
const azure_sql = res.value;
|
|
359
|
+
azure_sql.condition = { contains: question_1.AzureResourceSQL.id };
|
|
360
|
+
if (azure_sql.data)
|
|
361
|
+
addAzureResourceNode.addChild(azure_sql);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
//APIM
|
|
365
|
+
if (apimPlugin.getQuestionsForUserTask && (!alreadyHaveAPIM || !isDynamicQuestion)) {
|
|
366
|
+
const res = await apimPlugin.getQuestionsForUserTask(ctx, inputs, func, envInfo, tokenProvider);
|
|
367
|
+
if (res.isErr())
|
|
368
|
+
return res;
|
|
369
|
+
if (res.value) {
|
|
370
|
+
const groupNode = new teamsfx_api_1.QTreeNode({ type: "group" });
|
|
371
|
+
groupNode.condition = { contains: question_1.AzureResourceApim.id };
|
|
372
|
+
addAzureResourceNode.addChild(groupNode);
|
|
373
|
+
const apim = res.value;
|
|
374
|
+
if (apim.data) {
|
|
375
|
+
const funcNode = new teamsfx_api_1.QTreeNode(question_1.AskSubscriptionQuestion);
|
|
376
|
+
question_1.AskSubscriptionQuestion.func = async (inputs) => {
|
|
377
|
+
const res = await commonQuestions_1.checkSubscription(ctx, envInfo, tokenProvider);
|
|
378
|
+
if (res.isOk()) {
|
|
379
|
+
const sub = res.value;
|
|
380
|
+
inputs.subscriptionId = sub.subscriptionId;
|
|
381
|
+
inputs.tenantId = sub.tenantId;
|
|
382
|
+
}
|
|
383
|
+
return res;
|
|
384
|
+
};
|
|
385
|
+
groupNode.addChild(funcNode);
|
|
386
|
+
groupNode.addChild(apim);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return teamsfx_api_1.ok(addAzureResourceNode);
|
|
391
|
+
}
|
|
392
|
+
exports.getQuestionsForAddResource = getQuestionsForAddResource;
|
|
393
|
+
//# sourceMappingURL=getQuestions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getQuestions.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/getQuestions.ts"],"names":[],"mappings":";;;;AAAA,wDAmBgC;AAChC,4DAA+B;AAC/B,+CAAgD;AAChD,wDAAuD;AACvD,4CAA0D;AAC1D,0CAmBqB;AACrB,wEAIoC;AACpC,mCAKiB;AAEV,KAAK,UAAU,0BAA0B,CAC9C,GAAe,EACf,MAAc;IAEd,MAAM,IAAI,GAAG,IAAI,uBAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAE9C,kBAAkB;IAClB,MAAM,WAAW,GAAG,mCAAwB,EAAE,CAAC;IAC/C,MAAM,OAAO,GAAG,IAAI,uBAAS,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAA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E,EAAE;wBACd,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC;wBACtB,MAAM,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;wBAC3C,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;qBAChC;oBACD,OAAO,GAAG,CAAC;gBACb,CAAC,CAAC;gBACF,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBAC7B,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aAC1B;SACF;KACF;IACD,OAAO,gBAAE,CAAC,oBAAoB,CAAC,CAAC;AAClC,CAAC;AA9HD,gEA8HC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/package.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,MAAM,EACN,OAAO,EACP,MAAM,EAEN,IAAI,
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/package.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,MAAM,EACN,OAAO,EACP,MAAM,EAEN,IAAI,EAIL,MAAM,wBAAwB,CAAC;AAMhC,wBAAsB,aAAa,CACjC,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAsBhC"}
|
|
@@ -6,12 +6,22 @@ const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
|
6
6
|
const constants_1 = require("../constants");
|
|
7
7
|
const typedi_1 = tslib_1.__importDefault(require("typedi"));
|
|
8
8
|
const ResourcePluginContainer_1 = require("../ResourcePluginContainer");
|
|
9
|
+
const utils_1 = require("./utils");
|
|
9
10
|
async function createPackage(ctx, inputs) {
|
|
11
|
+
const blockResult = utils_1.blockV1Project(ctx.projectSetting.solutionSettings);
|
|
12
|
+
if (blockResult.isErr()) {
|
|
13
|
+
return teamsfx_api_1.err(blockResult.error);
|
|
14
|
+
}
|
|
10
15
|
const appStudioPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.AppStudioPlugin);
|
|
11
|
-
if (!(appStudioPlugin === null || appStudioPlugin === void 0 ? void 0 : appStudioPlugin.
|
|
16
|
+
if (!(appStudioPlugin === null || appStudioPlugin === void 0 ? void 0 : appStudioPlugin.executeUserTask)) {
|
|
12
17
|
return teamsfx_api_1.err(teamsfx_api_1.returnSystemError(new Error("package() not implemented"), "Solution", constants_1.SolutionError.InternelError));
|
|
13
18
|
}
|
|
14
|
-
|
|
19
|
+
const func = {
|
|
20
|
+
namespace: `${constants_1.PluginNames.SOLUTION}/${constants_1.PluginNames.APPST}`,
|
|
21
|
+
method: "buildPackage",
|
|
22
|
+
};
|
|
23
|
+
// return (await appStudioPlugin.executeUserTask(ctx, inputs, func)).map((_) => Void);
|
|
24
|
+
throw new teamsfx_api_1.NotImplementedError("Solution", "createPackage");
|
|
15
25
|
}
|
|
16
26
|
exports.createPackage = createPackage;
|
|
17
27
|
//# sourceMappingURL=package.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/package.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/package.ts"],"names":[],"mappings":";;;;AAAA,wDAUgC;AAChC,4CAA0D;AAC1D,4DAA+B;AAC/B,wEAA+D;AAC/D,mCAAyC;AAElC,KAAK,UAAU,aAAa,CACjC,GAAe,EACf,MAAc;IAEd,MAAM,WAAW,GAAG,sBAAc,CAAC,GAAG,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;IACxE,IAAI,WAAW,CAAC,KAAK,EAAE,EAAE;QACvB,OAAO,iBAAG,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;KAC/B;IACD,MAAM,eAAe,GAAG,gBAAS,CAAC,GAAG,CAAoB,2CAAiB,CAAC,eAAe,CAAC,CAAC;IAC5F,IAAI,CAAC,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,eAAe,CAAA,EAAE;QACrC,OAAO,iBAAG,CACR,+BAAiB,CACf,IAAI,KAAK,CAAC,2BAA2B,CAAC,EACtC,UAAU,EACV,yBAAa,CAAC,aAAa,CAC5B,CACF,CAAC;KACH;IACD,MAAM,IAAI,GAAG;QACX,SAAS,EAAE,GAAG,uBAAW,CAAC,QAAQ,IAAI,uBAAW,CAAC,KAAK,EAAE;QACzD,MAAM,EAAE,cAAc;KACvB,CAAC;IAEF,sFAAsF;IACtF,MAAM,IAAI,iCAAmB,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;AAC7D,CAAC;AAzBD,sCAyBC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { v2, Inputs, FxError, Result, TokenProvider, Void, SolutionContext } from "@microsoft/teamsfx-api";
|
|
2
|
+
export declare function provisionResource(ctx: v2.Context, inputs: Inputs, envInfo: v2.DeepReadonly<v2.EnvInfoV2>, tokenProvider: TokenProvider): Promise<v2.FxResult<v2.SolutionProvisionOutput, FxError>>;
|
|
3
|
+
export declare function askForProvisionConsent(ctx: SolutionContext): Promise<Result<Void, FxError>>;
|
|
4
|
+
//# sourceMappingURL=provision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provision.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/provision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,MAAM,EACN,OAAO,EACP,MAAM,EAKN,aAAa,EAMb,IAAI,EACJ,eAAe,EAEhB,MAAM,wBAAwB,CAAC;AAgChC,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,EACtC,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC,CAgK3D;AAED,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAyCjG"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askForProvisionConsent = exports.provisionResource = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
6
|
+
const tools_1 = require("../../../../common/tools");
|
|
7
|
+
const executor_1 = require("./executor");
|
|
8
|
+
const utils_1 = require("./utils");
|
|
9
|
+
const constants_1 = require("../constants");
|
|
10
|
+
const util = tslib_1.__importStar(require("util"));
|
|
11
|
+
const lodash_1 = require("lodash");
|
|
12
|
+
const constants_2 = require("../../../../common/constants");
|
|
13
|
+
const adaptor_1 = require("./adaptor");
|
|
14
|
+
const commonQuestions_1 = require("../commonQuestions");
|
|
15
|
+
const arm_1 = require("../arm");
|
|
16
|
+
const typedi_1 = tslib_1.__importDefault(require("typedi"));
|
|
17
|
+
const ResourcePluginContainer_1 = require("../ResourcePluginContainer");
|
|
18
|
+
const lodash_2 = tslib_1.__importDefault(require("lodash"));
|
|
19
|
+
async function provisionResource(ctx, inputs, envInfo, tokenProvider) {
|
|
20
|
+
var _a, _b, _c;
|
|
21
|
+
if (inputs.projectPath === undefined) {
|
|
22
|
+
return new teamsfx_api_1.v2.FxFailure(teamsfx_api_1.returnSystemError(new Error("projectPath is undefined"), "Solution", constants_1.SolutionError.InternelError));
|
|
23
|
+
}
|
|
24
|
+
const projectPath = inputs.projectPath;
|
|
25
|
+
const blockResult = utils_1.blockV1Project(ctx.projectSetting.solutionSettings);
|
|
26
|
+
if (blockResult.isErr()) {
|
|
27
|
+
return new teamsfx_api_1.v2.FxFailure(blockResult.error);
|
|
28
|
+
}
|
|
29
|
+
const azureSolutionSettings = utils_1.getAzureSolutionSettings(ctx);
|
|
30
|
+
// Just to trigger M365 login before the concurrent execution of provision.
|
|
31
|
+
// Because concurrent exectution of provision may getAccessToken() concurrently, which
|
|
32
|
+
// causes 2 M365 logins before the token caching in common lib takes effect.
|
|
33
|
+
await tokenProvider.appStudioToken.getAccessToken();
|
|
34
|
+
if (utils_1.isAzureProject(azureSolutionSettings)) {
|
|
35
|
+
const result = await utils_1.ensurePermissionRequest(azureSolutionSettings, ctx.permissionRequestProvider);
|
|
36
|
+
if (result.isErr()) {
|
|
37
|
+
return new teamsfx_api_1.v2.FxFailure(result.error);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const newEnvInfo = lodash_2.default.cloneDeep(envInfo);
|
|
41
|
+
if (utils_1.isAzureProject(azureSolutionSettings)) {
|
|
42
|
+
const appName = ctx.projectSetting.appName;
|
|
43
|
+
const contextAdaptor = new adaptor_1.ProvisionContextAdapter([ctx, inputs, newEnvInfo, tokenProvider]);
|
|
44
|
+
const res = await commonQuestions_1.fillInCommonQuestions(contextAdaptor, appName, contextAdaptor.envInfo.profile, tokenProvider.azureAccountProvider, await tokenProvider.appStudioToken.getJsonObject());
|
|
45
|
+
if (res.isErr()) {
|
|
46
|
+
return new teamsfx_api_1.v2.FxFailure(res.error);
|
|
47
|
+
}
|
|
48
|
+
// contextAdaptor deep-copies original JSON into a map. We need to convert it back.
|
|
49
|
+
newEnvInfo.profile = contextAdaptor.envInfo.profile.toJSON();
|
|
50
|
+
const consentResult = await askForProvisionConsent(contextAdaptor);
|
|
51
|
+
if (consentResult.isErr()) {
|
|
52
|
+
return new teamsfx_api_1.v2.FxFailure(consentResult.error);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const plugins = utils_1.getSelectedPlugins(azureSolutionSettings);
|
|
56
|
+
const provisionThunks = plugins
|
|
57
|
+
.filter((plugin) => !lodash_1.isUndefined(plugin.provisionResource))
|
|
58
|
+
.map((plugin) => {
|
|
59
|
+
return {
|
|
60
|
+
pluginName: `${plugin.name}`,
|
|
61
|
+
taskName: "provisionResource",
|
|
62
|
+
thunk: () =>
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
64
|
+
plugin.provisionResource(ctx, Object.assign(Object.assign(Object.assign({}, inputs), utils_1.extractSolutionInputs(newEnvInfo.profile)), { projectPath: projectPath }), Object.assign(Object.assign({}, newEnvInfo), { profile: newEnvInfo.profile[plugin.name] }), tokenProvider),
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
(_a = ctx.logProvider) === null || _a === void 0 ? void 0 : _a.info(util.format(tools_1.getStrings().solution.ProvisionStartNotice, constants_2.PluginDisplayName.Solution));
|
|
68
|
+
const provisionResult = await executor_1.executeConcurrently(provisionThunks, ctx.logProvider);
|
|
69
|
+
if (provisionResult.kind === "failure") {
|
|
70
|
+
return provisionResult;
|
|
71
|
+
}
|
|
72
|
+
else if (provisionResult.kind === "partialSuccess") {
|
|
73
|
+
return new teamsfx_api_1.v2.FxPartialSuccess(utils_1.combineRecords(provisionResult.output), provisionResult.error);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
newEnvInfo.profile = utils_1.combineRecords(provisionResult.output);
|
|
77
|
+
}
|
|
78
|
+
(_b = ctx.logProvider) === null || _b === void 0 ? void 0 : _b.info(util.format(tools_1.getStrings().solution.ProvisionFinishNotice, constants_2.PluginDisplayName.Solution));
|
|
79
|
+
if (tools_1.isArmSupportEnabled() && utils_1.isAzureProject(azureSolutionSettings)) {
|
|
80
|
+
const contextAdaptor = new adaptor_1.ProvisionContextAdapter([ctx, inputs, newEnvInfo, tokenProvider]);
|
|
81
|
+
const armDeploymentResult = await arm_1.deployArmTemplates(contextAdaptor);
|
|
82
|
+
if (armDeploymentResult.isErr()) {
|
|
83
|
+
return new teamsfx_api_1.v2.FxPartialSuccess(utils_1.combineRecords(provisionResult.output), armDeploymentResult.error);
|
|
84
|
+
}
|
|
85
|
+
// contextAdaptor deep-copies original JSON into a map. We need to convert it back.
|
|
86
|
+
newEnvInfo.profile = contextAdaptor.envInfo.profile.toJSON();
|
|
87
|
+
}
|
|
88
|
+
const aadPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.AadPlugin);
|
|
89
|
+
if (plugins.some((plugin) => plugin.name === aadPlugin.name) && aadPlugin.executeUserTask) {
|
|
90
|
+
const result = await aadPlugin.executeUserTask(ctx, inputs, {
|
|
91
|
+
namespace: `${constants_1.PluginNames.SOLUTION}/${constants_1.PluginNames.AAD}`,
|
|
92
|
+
method: "setApplicationInContext",
|
|
93
|
+
params: { isLocal: false },
|
|
94
|
+
}, envInfo, tokenProvider);
|
|
95
|
+
if (result.isErr()) {
|
|
96
|
+
return new teamsfx_api_1.v2.FxPartialSuccess(utils_1.combineRecords(provisionResult.output), result.error);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const configureResourceThunks = plugins
|
|
100
|
+
.filter((plugin) => !lodash_1.isUndefined(plugin.configureResource))
|
|
101
|
+
.map((plugin) => {
|
|
102
|
+
return {
|
|
103
|
+
pluginName: `${plugin.name}`,
|
|
104
|
+
taskName: "configureLocalResource",
|
|
105
|
+
thunk: () =>
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
107
|
+
plugin.configureResource(ctx, Object.assign(Object.assign(Object.assign({}, inputs), utils_1.extractSolutionInputs(newEnvInfo.profile)), { projectPath: projectPath }), Object.assign(Object.assign({}, newEnvInfo), { profile: newEnvInfo.profile[plugin.name] }), tokenProvider),
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
const configureResourceResult = await executor_1.executeConcurrently(configureResourceThunks, ctx.logProvider);
|
|
111
|
+
if (configureResourceResult.kind === "failure") {
|
|
112
|
+
return configureResourceResult;
|
|
113
|
+
}
|
|
114
|
+
else if (configureResourceResult.kind === "partialSuccess") {
|
|
115
|
+
return new teamsfx_api_1.v2.FxPartialSuccess(utils_1.combineRecords(configureResourceResult.output), configureResourceResult.error);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
if (newEnvInfo.profile[constants_1.GLOBAL_CONFIG] &&
|
|
119
|
+
newEnvInfo.profile[constants_1.GLOBAL_CONFIG][constants_1.ARM_TEMPLATE_OUTPUT]) {
|
|
120
|
+
delete newEnvInfo.profile[constants_1.GLOBAL_CONFIG][constants_1.ARM_TEMPLATE_OUTPUT];
|
|
121
|
+
}
|
|
122
|
+
(_c = ctx.logProvider) === null || _c === void 0 ? void 0 : _c.info(util.format(tools_1.getStrings().solution.ConfigurationFinishNotice, constants_2.PluginDisplayName.Solution));
|
|
123
|
+
return new teamsfx_api_1.v2.FxSuccess(utils_1.combineRecords(configureResourceResult.output));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.provisionResource = provisionResource;
|
|
127
|
+
async function askForProvisionConsent(ctx) {
|
|
128
|
+
var _a, _b, _c, _d, _e, _f;
|
|
129
|
+
const azureToken = await ((_a = ctx.azureAccountProvider) === null || _a === void 0 ? void 0 : _a.getAccountCredentialAsync());
|
|
130
|
+
// Only Azure project requires this confirm dialog
|
|
131
|
+
const username = azureToken.username ? azureToken.username : "";
|
|
132
|
+
const subscriptionId = (_b = ctx.envInfo.profile.get(constants_1.GLOBAL_CONFIG)) === null || _b === void 0 ? void 0 : _b.get(constants_1.SUBSCRIPTION_ID);
|
|
133
|
+
const subscriptionName = (_c = ctx.envInfo.profile.get(constants_1.GLOBAL_CONFIG)) === null || _c === void 0 ? void 0 : _c.get(constants_1.SUBSCRIPTION_NAME);
|
|
134
|
+
const msg = util.format(tools_1.getStrings().solution.ProvisionConfirmNotice, username, subscriptionName ? subscriptionName : subscriptionId);
|
|
135
|
+
let confirmRes = undefined;
|
|
136
|
+
if (tools_1.isMultiEnvEnabled()) {
|
|
137
|
+
const msgNew = util.format(tools_1.getStrings().solution.ProvisionConfirmEnvNotice, ctx.envInfo.envName, username, subscriptionName ? subscriptionName : subscriptionId);
|
|
138
|
+
confirmRes = await ((_d = ctx.ui) === null || _d === void 0 ? void 0 : _d.showMessage("warn", msgNew, true, "Provision", "Pricing calculator"));
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
confirmRes = await ((_e = ctx.ui) === null || _e === void 0 ? void 0 : _e.showMessage("warn", msg, true, "Provision", "Pricing calculator"));
|
|
142
|
+
}
|
|
143
|
+
const confirm = (confirmRes === null || confirmRes === void 0 ? void 0 : confirmRes.isOk()) ? confirmRes.value : undefined;
|
|
144
|
+
if (confirm !== "Provision") {
|
|
145
|
+
if (confirm === "Pricing calculator") {
|
|
146
|
+
(_f = ctx.ui) === null || _f === void 0 ? void 0 : _f.openUrl("https://azure.microsoft.com/en-us/pricing/calculator/");
|
|
147
|
+
}
|
|
148
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error(tools_1.getStrings().solution.CancelProvision), "Solution", tools_1.getStrings().solution.CancelProvision));
|
|
149
|
+
}
|
|
150
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
151
|
+
}
|
|
152
|
+
exports.askForProvisionConsent = askForProvisionConsent;
|
|
153
|
+
//# sourceMappingURL=provision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provision.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/provision.ts"],"names":[],"mappings":";;;;AAAA,wDAkBgC;AAChC,oDAA8F;AAC9F,yCAAiD;AACjD,mCAQiB;AACjB,4CAOsB;AACtB,mDAA6B;AAC7B,mCAAqC;AACrC,4DAAiE;AACjE,uCAAoD;AACpD,wDAA2D;AAE3D,gCAA4C;AAC5C,4DAA+B;AAC/B,wEAA+D;AAC/D,4DAAuB;AAGhB,KAAK,UAAU,iB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6BAAe,CACb,IAAI,KAAK,CAAC,kBAAU,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,EAChD,UAAU,EACV,kBAAU,EAAE,CAAC,QAAQ,CAAC,eAAe,CACtC,CACF,CAAC;KACH;IACD,OAAO,gBAAE,CAAC,kBAAI,CAAC,CAAC;AAClB,CAAC;AAzCD,wDAyCC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { v2, Inputs, FxError, TokenProvider, Json } from "@microsoft/teamsfx-api";
|
|
2
|
+
export declare function provisionLocalResource(ctx: v2.Context, inputs: Inputs, localSettings: Json, tokenProvider: TokenProvider): Promise<v2.FxResult<Json, FxError>>;
|
|
3
|
+
//# sourceMappingURL=provisionLocal.d.ts.map
|