@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 @@
|
|
|
1
|
+
{"version":3,"file":"provisionLocal.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/provisionLocal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,MAAM,EACN,OAAO,EAIP,aAAa,EAGb,IAAI,EACL,MAAM,wBAAwB,CAAC;AAchC,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,IAAI,EACnB,aAAa,EAAE,aAAa,GAC3B,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAsFrC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.provisionLocalResource = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
6
|
+
const executor_1 = require("./executor");
|
|
7
|
+
const utils_1 = require("./utils");
|
|
8
|
+
const constants_1 = require("../constants");
|
|
9
|
+
const lodash_1 = require("lodash");
|
|
10
|
+
const typedi_1 = tslib_1.__importDefault(require("typedi"));
|
|
11
|
+
const ResourcePluginContainer_1 = require("../ResourcePluginContainer");
|
|
12
|
+
const environment_1 = require("../../../../core/environment");
|
|
13
|
+
async function provisionLocalResource(ctx, inputs, localSettings, tokenProvider) {
|
|
14
|
+
const azureSolutionSettings = utils_1.getAzureSolutionSettings(ctx);
|
|
15
|
+
const result = await utils_1.ensurePermissionRequest(azureSolutionSettings, ctx.permissionRequestProvider);
|
|
16
|
+
if (result.isErr()) {
|
|
17
|
+
return new teamsfx_api_1.v2.FxFailure(result.error);
|
|
18
|
+
}
|
|
19
|
+
// Just to trigger M365 login before the concurrent execution of localDebug.
|
|
20
|
+
// Because concurrent execution of localDebug may getAccessToken() concurrently, which
|
|
21
|
+
// causes 2 M365 logins before the token caching in common lib takes effect.
|
|
22
|
+
await tokenProvider.appStudioToken.getAccessToken();
|
|
23
|
+
const plugins = utils_1.getSelectedPlugins(azureSolutionSettings);
|
|
24
|
+
const provisionLocalResourceThunks = plugins
|
|
25
|
+
.filter((plugin) => !lodash_1.isUndefined(plugin.provisionLocalResource))
|
|
26
|
+
.map((plugin) => {
|
|
27
|
+
return {
|
|
28
|
+
pluginName: `${plugin.name}`,
|
|
29
|
+
taskName: "provisionLocalResource",
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
31
|
+
thunk: () => plugin.provisionLocalResource(ctx, inputs, localSettings, tokenProvider),
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
const provisionResult = await executor_1.executeConcurrently(provisionLocalResourceThunks, ctx.logProvider);
|
|
35
|
+
if (provisionResult.kind !== "success") {
|
|
36
|
+
return provisionResult;
|
|
37
|
+
}
|
|
38
|
+
const aadPlugin = typedi_1.default.get(ResourcePluginContainer_1.ResourcePluginsV2.AadPlugin);
|
|
39
|
+
if (plugins.some((plugin) => plugin.name === aadPlugin.name) && aadPlugin.executeUserTask) {
|
|
40
|
+
const result = await aadPlugin.executeUserTask(ctx, inputs, {
|
|
41
|
+
namespace: `${constants_1.PluginNames.SOLUTION}/${constants_1.PluginNames.AAD}`,
|
|
42
|
+
method: "setApplicationInContext",
|
|
43
|
+
params: { isLocal: true },
|
|
44
|
+
}, { envName: environment_1.environmentManager.getDefaultEnvName(), config: {}, profile: {} }, tokenProvider);
|
|
45
|
+
if (result.isErr()) {
|
|
46
|
+
return new teamsfx_api_1.v2.FxPartialSuccess(localSettings, result.error);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return new teamsfx_api_1.v2.FxFailure(teamsfx_api_1.returnSystemError(new Error("AAD plugin not selected or executeUserTask is undefined"), "Solution", constants_1.SolutionError.InternelError));
|
|
51
|
+
}
|
|
52
|
+
const parseTenantIdresult = utils_1.loadTeamsAppTenantIdForLocal(localSettings, await tokenProvider.appStudioToken.getJsonObject());
|
|
53
|
+
if (parseTenantIdresult.isErr()) {
|
|
54
|
+
return new teamsfx_api_1.v2.FxFailure(parseTenantIdresult.error);
|
|
55
|
+
}
|
|
56
|
+
const configureLocalResourceThunks = plugins
|
|
57
|
+
.filter((plugin) => !lodash_1.isUndefined(plugin.configureLocalResource))
|
|
58
|
+
.map((plugin) => {
|
|
59
|
+
return {
|
|
60
|
+
pluginName: `${plugin.name}`,
|
|
61
|
+
taskName: "configureLocalResource",
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
63
|
+
thunk: () => plugin.configureLocalResource(ctx, inputs, localSettings, tokenProvider),
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
const configureResourceResult = await executor_1.executeConcurrently(configureLocalResourceThunks, ctx.logProvider);
|
|
67
|
+
if (configureResourceResult.kind !== "success") {
|
|
68
|
+
return configureResourceResult;
|
|
69
|
+
}
|
|
70
|
+
return new teamsfx_api_1.v2.FxSuccess(localSettings);
|
|
71
|
+
}
|
|
72
|
+
exports.provisionLocalResource = provisionLocalResource;
|
|
73
|
+
//# sourceMappingURL=provisionLocal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provisionLocal.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/provisionLocal.ts"],"names":[],"mappings":";;;;AAAA,wDAWgC;AAChC,yCAAiD;AACjD,mCAKiB;AACjB,4CAA0D;AAC1D,mCAAqC;AACrC,4DAA+B;AAC/B,wEAA+D;AAC/D,8DAAkE;AAE3D,KAAK,UAAU,sBAAsB,CAC1C,GAAe,EACf,MAAc,EACd,aAAmB,EACnB,aAA4B;IAE5B,MAAM,qBAAqB,GAAG,gCAAwB,CAAC,GAAG,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,MAAM,+BAAuB,CAC1C,qBAAqB,EACrB,GAAG,CAAC,yBAA0B,CAC/B,CAAC;IACF,IAAI,MAAM,CAAC,KAAK,EAAE,EAAE;QAClB,OAAO,IAAI,gBAAE,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KACvC;IAED,4EAA4E;IAC5E,sFAAsF;IACtF,4EAA4E;IAC5E,MAAM,aAAa,CAAC,cAAc,CAAC,cAAc,EAAE,CAAC;IAEpD,MAAM,OAAO,GAAwB,0BAAkB,CAAC,qBAAqB,CAAC,CAAC;IAC/E,MAAM,4BAA4B,GAAG,OAAO;SACzC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,oBAAW,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;SAC/D,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACd,OAAO;YACL,UAAU,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE;YAC5B,QAAQ,EAAE,wBAAwB;YAClC,oEAAoE;YACpE,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC;SACvF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEL,MAAM,eAAe,GAAG,MAAM,8BAAmB,CAAC,4BAA4B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IAED,MAAM,4BAA4B,GAAG,OAAO;SACzC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,oBAAW,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;SAC/D,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACd,OAAO;YACL,UAAU,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE;YAC5B,QAAQ,EAAE,wBAAwB;YAClC,oEAAoE;YACpE,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,CAAC;SACvF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEL,MAAM,uBAAuB,GAAG,MAAM,8BAAmB,CACvD,4BAA4B,EAC5B,GAAG,CAAC,WAAW,CAChB,CAAC;IACF,IAAI,uBAAuB,CAAC,IAAI,KAAK,SAAS,EAAE;QAC9C,OAAO,uBAAuB,CAAC;KAChC;IAED,OAAO,IAAI,gBAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACzC,CAAC;AA3FD,wDA2FC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function publishApplication(ctx: v2.Context, inputs: Inputs,
|
|
1
|
+
import { AppStudioTokenProvider, FxError, Inputs, Result, v2, Void } from "@microsoft/teamsfx-api";
|
|
2
|
+
export declare function publishApplication(ctx: v2.Context, inputs: Inputs, envInfo: v2.EnvInfoV2, tokenProvider: AppStudioTokenProvider): Promise<Result<Void, FxError>>;
|
|
3
3
|
//# sourceMappingURL=publish.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAEtB,OAAO,EACP,MAAM,EAEN,MAAM,EAEN,EAAE,EACF,IAAI,EACL,MAAM,wBAAwB,CAAC;AAShC,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,EAAE,CAAC,SAAS,EACrB,aAAa,EAAE,sBAAsB,GACpC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAwChC"}
|
|
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.publishApplication = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
7
|
+
const util = tslib_1.__importStar(require("util"));
|
|
8
|
+
const constants_1 = require("../../../../common/constants");
|
|
6
9
|
const tools_1 = require("../../../../common/tools");
|
|
10
|
+
const constants_2 = require("../constants");
|
|
7
11
|
const executor_1 = require("./executor");
|
|
8
12
|
const utils_1 = require("./utils");
|
|
9
|
-
|
|
10
|
-
const util = tslib_1.__importStar(require("util"));
|
|
11
|
-
const lodash_1 = require("lodash");
|
|
12
|
-
const constants_2 = require("../../../../common/constants");
|
|
13
|
-
async function publishApplication(ctx, inputs, provisionOutput, tokenProvider) {
|
|
13
|
+
async function publishApplication(ctx, inputs, envInfo, tokenProvider) {
|
|
14
14
|
var _a;
|
|
15
15
|
const inAzureProject = utils_1.isAzureProject(utils_1.getAzureSolutionSettings(ctx));
|
|
16
|
-
const provisioned =
|
|
16
|
+
const provisioned = envInfo.profile[constants_2.GLOBAL_CONFIG][constants_2.SOLUTION_PROVISION_SUCCEEDED];
|
|
17
17
|
if (inAzureProject && !provisioned) {
|
|
18
|
-
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error(util.format(tools_1.getStrings().solution.NotProvisionedNotice, ctx.projectSetting.appName)), "Solution",
|
|
18
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error(util.format(tools_1.getStrings().solution.NotProvisionedNotice, ctx.projectSetting.appName)), "Solution", constants_2.SolutionError.CannotDeployBeforeProvision));
|
|
19
19
|
}
|
|
20
20
|
const plugins = utils_1.getSelectedPlugins(utils_1.getAzureSolutionSettings(ctx));
|
|
21
21
|
const thunks = plugins
|
|
@@ -25,15 +25,15 @@ async function publishApplication(ctx, inputs, provisionOutput, tokenProvider) {
|
|
|
25
25
|
pluginName: `${plugin.name}`,
|
|
26
26
|
taskName: "publishApplication",
|
|
27
27
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
28
|
-
thunk: () => plugin.publishApplication(ctx, inputs,
|
|
28
|
+
thunk: () => plugin.publishApplication(ctx, inputs, envInfo, tokenProvider),
|
|
29
29
|
};
|
|
30
30
|
});
|
|
31
|
-
ctx.logProvider.info(util.format(tools_1.getStrings().solution.PublishStartNotice,
|
|
31
|
+
ctx.logProvider.info(util.format(tools_1.getStrings().solution.PublishStartNotice, constants_1.PluginDisplayName.Solution));
|
|
32
32
|
const result = await executor_1.executeConcurrently(thunks, ctx.logProvider);
|
|
33
|
-
if (result.
|
|
33
|
+
if (result.kind !== "success") {
|
|
34
34
|
const msg = util.format(tools_1.getStrings().solution.PublishFailNotice, ctx.projectSetting.appName);
|
|
35
35
|
(_a = ctx.logProvider) === null || _a === void 0 ? void 0 : _a.info(msg);
|
|
36
|
-
return result;
|
|
36
|
+
return teamsfx_api_1.err(result.error);
|
|
37
37
|
}
|
|
38
38
|
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/publish.ts"],"names":[],"mappings":";;;;AAAA,wDAUgC;AAChC,
|
|
1
|
+
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../../src/pl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AAC,kBAAU,EAAE,CAAC,QAAQ,CAAC,kBAAkB,EAAE,6BAAiB,CAAC,QAAQ,CAAC,CAClF,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,8BAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IAElE,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE;QAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAU,EAAE,CAAC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC7F,MAAA,GAAG,CAAC,WAAW,0CAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3B,OAAO,iBAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KAC1B;IACD,OAAO,gBAAE,CAAC,kBAAI,CAAC,CAAC;AAClB,CAAC;AA7CD,gDA6CC"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { v2, Inputs, FxError, Result } from "@microsoft/teamsfx-api";
|
|
2
|
-
export declare function scaffoldSourceCode(ctx: v2.Context, inputs: Inputs): Promise<Result<
|
|
3
|
-
|
|
4
|
-
}>, FxError>>;
|
|
5
|
-
export declare function scaffoldByPlugins(ctx: v2.Context, inputs: Inputs, plugins: v2.ResourcePlugin[]): Promise<Result<Record<v2.PluginName, {
|
|
6
|
-
output: Record<string, string>;
|
|
7
|
-
}>, FxError>>;
|
|
1
|
+
import { v2, Inputs, FxError, Result, Void } from "@microsoft/teamsfx-api";
|
|
2
|
+
export declare function scaffoldSourceCode(ctx: v2.Context, inputs: Inputs): Promise<Result<Void, FxError>>;
|
|
3
|
+
export declare function scaffoldByPlugins(ctx: v2.Context, inputs: Inputs, plugins: v2.ResourcePlugin[]): Promise<Result<Void, FxError>>;
|
|
8
4
|
export declare function scaffoldReadmeAndLocalSettings(capabilities: string[], azureResources: string[], projectPath: string, migrateFromV1?: boolean): Promise<void>;
|
|
9
5
|
//# sourceMappingURL=scaffolding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffolding.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/scaffolding.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"scaffolding.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/scaffolding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,MAAM,EACN,OAAO,EACP,MAAM,EAGN,IAAI,EAEL,MAAM,wBAAwB,CAAC;AAsBhC,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CA0ChC;AAED,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,EAAE,CAAC,cAAc,EAAE,GAC3B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAkChC;AAED,wBAAsB,8BAA8B,CAClD,YAAY,EAAE,MAAM,EAAE,EACtB,cAAc,EAAE,MAAM,EAAE,EACxB,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,OAAO,GACtB,OAAO,CAAC,IAAI,CAAC,CAmCf"}
|
|
@@ -12,7 +12,19 @@ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
|
12
12
|
const __1 = require("../../../..");
|
|
13
13
|
const localSettingsProvider_1 = require("../../../../common/localSettingsProvider");
|
|
14
14
|
async function scaffoldSourceCode(ctx, inputs) {
|
|
15
|
-
const
|
|
15
|
+
const blockResult = utils_1.blockV1Project(ctx.projectSetting.solutionSettings);
|
|
16
|
+
if (blockResult.isErr()) {
|
|
17
|
+
return teamsfx_api_1.err(blockResult.error);
|
|
18
|
+
}
|
|
19
|
+
const lang = inputs[question_1.AzureSolutionQuestionNames.ProgrammingLanguage];
|
|
20
|
+
if (lang) {
|
|
21
|
+
ctx.projectSetting.programmingLanguage = lang;
|
|
22
|
+
}
|
|
23
|
+
const solutionSettings = utils_1.getAzureSolutionSettings(ctx);
|
|
24
|
+
const fillinRes = utils_1.fillInSolutionSettings(solutionSettings, inputs);
|
|
25
|
+
if (fillinRes.isErr())
|
|
26
|
+
return teamsfx_api_1.err(fillinRes.error);
|
|
27
|
+
const plugins = utils_1.getSelectedPlugins(solutionSettings);
|
|
16
28
|
const thunks = plugins
|
|
17
29
|
.filter((plugin) => !!plugin.scaffoldSourceCode)
|
|
18
30
|
.map((plugin) => {
|
|
@@ -24,14 +36,13 @@ async function scaffoldSourceCode(ctx, inputs) {
|
|
|
24
36
|
};
|
|
25
37
|
});
|
|
26
38
|
const result = await executor_1.executeConcurrently(thunks, ctx.logProvider);
|
|
27
|
-
|
|
28
|
-
if (result.isOk()) {
|
|
39
|
+
if (result.kind === "success") {
|
|
29
40
|
const capabilities = solutionSettings.capabilities;
|
|
30
41
|
const azureResources = solutionSettings.azureResources;
|
|
31
42
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
32
43
|
await scaffoldReadmeAndLocalSettings(capabilities, azureResources, inputs.projectPath);
|
|
33
44
|
ctx.userInteraction.showMessage("info", `Success: ${tools_1.getStrings().solution.ScaffoldSuccessNotice}`, false);
|
|
34
|
-
return teamsfx_api_1.ok(
|
|
45
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
35
46
|
}
|
|
36
47
|
else {
|
|
37
48
|
return teamsfx_api_1.err(result.error);
|
|
@@ -39,6 +50,10 @@ async function scaffoldSourceCode(ctx, inputs) {
|
|
|
39
50
|
}
|
|
40
51
|
exports.scaffoldSourceCode = scaffoldSourceCode;
|
|
41
52
|
async function scaffoldByPlugins(ctx, inputs, plugins) {
|
|
53
|
+
const blockResult = utils_1.blockV1Project(ctx.projectSetting.solutionSettings);
|
|
54
|
+
if (blockResult.isErr()) {
|
|
55
|
+
return teamsfx_api_1.err(blockResult.error);
|
|
56
|
+
}
|
|
42
57
|
const thunks = plugins
|
|
43
58
|
.filter((plugin) => !!plugin.scaffoldSourceCode)
|
|
44
59
|
.map((plugin) => {
|
|
@@ -51,13 +66,13 @@ async function scaffoldByPlugins(ctx, inputs, plugins) {
|
|
|
51
66
|
});
|
|
52
67
|
const result = await executor_1.executeConcurrently(thunks, ctx.logProvider);
|
|
53
68
|
const solutionSettings = utils_1.getAzureSolutionSettings(ctx);
|
|
54
|
-
if (result.
|
|
69
|
+
if (result.kind === "success") {
|
|
55
70
|
const capabilities = solutionSettings.capabilities;
|
|
56
71
|
const azureResources = solutionSettings.azureResources;
|
|
57
72
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
58
73
|
await scaffoldReadmeAndLocalSettings(capabilities, azureResources, inputs.projectPath);
|
|
59
74
|
ctx.userInteraction.showMessage("info", `Success: ${tools_1.getStrings().solution.ScaffoldSuccessNotice}`, false);
|
|
60
|
-
return teamsfx_api_1.ok(
|
|
75
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
61
76
|
}
|
|
62
77
|
else {
|
|
63
78
|
return teamsfx_api_1.err(result.error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffolding.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/scaffolding.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"scaffolding.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/scaffolding.ts"],"names":[],"mappings":";;;;AAAA,wDASgC;AAChC,oDAAyE;AACzE,0CAMqB;AACrB,yCAA6D;AAC7D,mCAMiB;AACjB,wDAAwB;AACxB,gEAA0B;AAC1B,mCAAiD;AACjD,oFAAiF;AAE1E,KAAK,UAAU,kBAAkB,CACtC,GAAe,EACf,MAAc;IAEd,MAAM,WAAW,GAAG,sBAAc,CAAC,GAA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AAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC/B,MAAM,kBAAE,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,WAAW,YAAY,CAAC,CAAC;SACnD;KACF;IAED,MAAM,UAAU,GAAG,cAAc,CAAC,QAAQ,CAAC,gCAAqB,CAAC,EAAE,CAAC,CAAC;IAErE,IAAI,yBAAiB,EAAE,EAAE;QACvB,MAAM,qBAAqB,GAAG,IAAI,6CAAqB,CAAC,WAAW,CAAC,CAAC;QACrE,MAAM,aAAa,GAAG,MAAM,qBAAqB,CAAC,IAAI,EAAE,CAAC;QAEzD,IAAI,aAAa,KAAK,SAAS,EAAE;YAC/B,2DAA2D;YAC3D,MAAM,qBAAqB,CAAC,IAAI;YAC9B,oEAAoE;YACpE,qBAAqB,CAAC,eAAe,CAAC,aAAc,EAAE,UAAU,EAAE,MAAM,CAAC,CAC1E,CAAC;SACH;aAAM;YACL,6CAA6C;YAC7C,MAAM,qBAAqB,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;SAC1F;KACF;AACH,CAAC;AAxCD,wEAwCC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AppStudioTokenProvider, AzureAccountProvider, Func, FxError, Inputs, Json, QTreeNode, Result, TokenProvider, v2, Void } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { DeepReadonly, EnvInfoV2 } from "@microsoft/teamsfx-api/build/v2";
|
|
3
|
+
export declare class TeamsAppSolutionV2 implements v2.SolutionPlugin {
|
|
4
|
+
name: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
scaffoldSourceCode: (ctx: v2.Context, inputs: Inputs) => Promise<Result<Void, FxError>>;
|
|
7
|
+
generateResourceTemplate: (ctx: v2.Context, inputs: Inputs) => Promise<Result<Json, FxError>>;
|
|
8
|
+
provisionResources: (ctx: v2.Context, inputs: Inputs, envInfo: EnvInfoV2, tokenProvider: TokenProvider) => Promise<v2.FxResult<v2.SolutionProvisionOutput, FxError>>;
|
|
9
|
+
deploy?: (ctx: v2.Context, inputs: Inputs, provisionOutputs: Json, tokenProvider: AzureAccountProvider) => Promise<Result<Void, FxError>>;
|
|
10
|
+
publishApplication: (ctx: v2.Context, inputs: Inputs, envInfo: v2.EnvInfoV2, tokenProvider: AppStudioTokenProvider) => Promise<Result<Void, FxError>>;
|
|
11
|
+
provisionLocalResource?: (ctx: v2.Context, inputs: Inputs, localSettings: Json, tokenProvider: TokenProvider) => Promise<v2.FxResult<Json, FxError>>;
|
|
12
|
+
getQuestionsForScaffolding?: (ctx: v2.Context, inputs: Inputs) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
13
|
+
executeUserTask?: (ctx: v2.Context, inputs: Inputs, func: Func, envInfo: EnvInfoV2, tokenProvider: TokenProvider) => Promise<Result<unknown, FxError>>;
|
|
14
|
+
createEnv?: (ctx: v2.Context, inputs: Inputs) => Promise<Result<Void, FxError>>;
|
|
15
|
+
getQuestions?: (ctx: v2.Context, inputs: Inputs, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
16
|
+
getQuestionsForUserTask?: (ctx: v2.Context, inputs: Inputs, func: Func, envInfo: DeepReadonly<EnvInfoV2>, tokenProvider: TokenProvider) => Promise<Result<QTreeNode | undefined, FxError>>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=solution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solution.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/solution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,IAAI,EACJ,OAAO,EACP,MAAM,EACN,IAAI,EACJ,SAAS,EACT,MAAM,EACN,aAAa,EACb,EAAE,EACF,IAAI,EACL,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE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AC,IAAI,EAAE,OAAO,CAAC,CAAC,CAA0B;IAElE,0BAA0B,CAAC,EAAE,CAC3B,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,KACX,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAA8B;IAElF,eAAe,CAAC,EAAE,CAChB,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,SAAS,EAClB,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAmB;IAEzD,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAa;IAE5F,YAAY,CAAC,EAAE,CACb,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,EAChC,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAAgB;IAEpE,uBAAuB,CAAC,EAAE,CACxB,GAAG,EAAE,EAAE,CAAC,OAAO,EACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,EAChC,aAAa,EAAE,aAAa,KACzB,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC,CAA2B;CAChF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TeamsAppSolutionV2 = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typedi_1 = require("typedi");
|
|
6
|
+
const constants_1 = require("../../../../common/constants");
|
|
7
|
+
const SolutionPluginContainer_1 = require("../../../../core/SolutionPluginContainer");
|
|
8
|
+
const createEnv_1 = require("./createEnv");
|
|
9
|
+
const deploy_1 = require("./deploy");
|
|
10
|
+
const executeUserTask_1 = require("./executeUserTask");
|
|
11
|
+
const generateResourceTemplate_1 = require("./generateResourceTemplate");
|
|
12
|
+
const getQuestions_1 = require("./getQuestions");
|
|
13
|
+
const provision_1 = require("./provision");
|
|
14
|
+
const provisionLocal_1 = require("./provisionLocal");
|
|
15
|
+
const publish_1 = require("./publish");
|
|
16
|
+
const scaffolding_1 = require("./scaffolding");
|
|
17
|
+
let TeamsAppSolutionV2 = class TeamsAppSolutionV2 {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.name = "fx-solution-azure";
|
|
20
|
+
this.displayName = constants_1.PluginDisplayName.Solution;
|
|
21
|
+
this.scaffoldSourceCode = scaffolding_1.scaffoldSourceCode;
|
|
22
|
+
this.generateResourceTemplate = generateResourceTemplate_1.generateResourceTemplate;
|
|
23
|
+
this.provisionResources = provision_1.provisionResource;
|
|
24
|
+
this.deploy = deploy_1.deploy;
|
|
25
|
+
this.publishApplication = publish_1.publishApplication;
|
|
26
|
+
this.provisionLocalResource = provisionLocal_1.provisionLocalResource;
|
|
27
|
+
this.getQuestionsForScaffolding = getQuestions_1.getQuestionsForScaffolding;
|
|
28
|
+
this.executeUserTask = executeUserTask_1.executeUserTask;
|
|
29
|
+
this.createEnv = createEnv_1.createEnv;
|
|
30
|
+
this.getQuestions = getQuestions_1.getQuestions;
|
|
31
|
+
this.getQuestionsForUserTask = getQuestions_1.getQuestionsForUserTask;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
TeamsAppSolutionV2 = tslib_1.__decorate([
|
|
35
|
+
typedi_1.Service(SolutionPluginContainer_1.SolutionPluginsV2.AzureTeamsSolutionV2)
|
|
36
|
+
], TeamsAppSolutionV2);
|
|
37
|
+
exports.TeamsAppSolutionV2 = TeamsAppSolutionV2;
|
|
38
|
+
//# sourceMappingURL=solution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solution.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/solution.ts"],"names":[],"mappings":";;;;AAcA,mCAAiC;AACjC,4DAAiE;AACjE,sFAA6E;AAC7E,2CAAwC;AACxC,qCAAkC;AAClC,uDAAoD;AACpD,yEAAsE;AACtE,iDAAmG;AACnG,2CAAgD;AAChD,qDAA0D;AAC1D,uCAA+C;AAC/C,+CAAmD;AAGnD,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;IAA/B;QACE,SAAI,GAAG,mBAAmB,CAAC;QAC3B,gBAAW,GAAW,6BAAiB,CAAC,QAAQ,CAAC;QAEjD,uBAAkB,GAChB,gCAAkB,CAAC;QACrB,6BAAwB,GACtB,mDAAwB,CAAC;QAE3B,uBAAkB,GAK+C,6BAAiB,CAAC;QAEnF,WAAM,GAKgC,eAAM,CAAC;QAE7C,uBAAkB,GAKoB,4BAAkB,CAAC;QACzD,2BAAsB,GAKqB,uCAAsB,CAAC;QAElE,+BAA0B,GAG6B,yCAA0B,CAAC;QAElF,oBAAe,GAM0B,iCAAe,CAAC;QAEzD,cAAS,GAAyE,qBAAS,CAAC;QAE5F,iBAAY,GAK2C,2BAAY,CAAC;QAEpE,4BAAuB,GAMgC,sCAAuB,CAAC;IACjF,CAAC;CAAA,CAAA;AAjEY,kBAAkB;IAD9B,gBAAO,CAAC,2CAAiB,CAAC,oBAAoB,CAAC;GACnC,kBAAkB,CAiE9B;AAjEY,gDAAkB"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { v2, AzureSolutionSettings } from "@microsoft/teamsfx-api";
|
|
1
|
+
import { v2, Inputs, FxError, Result, AzureSolutionSettings, Void, PermissionRequestProvider, SolutionSettings, Json } from "@microsoft/teamsfx-api";
|
|
2
2
|
export declare function getSelectedPlugins(azureSettings: AzureSolutionSettings): v2.ResourcePlugin[];
|
|
3
3
|
export declare function getAzureSolutionSettings(ctx: v2.Context): AzureSolutionSettings;
|
|
4
4
|
export declare function isAzureProject(azureSettings: AzureSolutionSettings): boolean;
|
|
5
|
-
export declare function combineRecords(records: {
|
|
5
|
+
export declare function combineRecords<T>(records: {
|
|
6
6
|
name: string;
|
|
7
|
-
result:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}[]): Record<string, {
|
|
11
|
-
output: Record<string, string>;
|
|
12
|
-
}>;
|
|
13
|
-
export declare function extractSolutionInputs(record: Record<string, string>): v2.SolutionInputs;
|
|
7
|
+
result: T;
|
|
8
|
+
}[]): Record<string, T>;
|
|
9
|
+
export declare function extractSolutionInputs(record: Json): v2.SolutionInputs;
|
|
14
10
|
export declare function reloadV2Plugins(solutionSettings: AzureSolutionSettings): v2.ResourcePlugin[];
|
|
11
|
+
export declare function ensurePermissionRequest(solutionSettings: AzureSolutionSettings, permissionRequestProvider?: PermissionRequestProvider): Promise<Result<Void, FxError>>;
|
|
12
|
+
export declare function parseTeamsAppTenantId(appStudioToken?: Record<string, unknown>): Result<string, FxError>;
|
|
13
|
+
export declare function loadTeamsAppTenantIdForLocal(localSettings: v2.LocalSettings, appStudioToken?: Record<string, unknown>): Result<Void, FxError>;
|
|
14
|
+
export declare function blockV1Project(solutionSettings?: SolutionSettings): Result<Void, FxError>;
|
|
15
|
+
export declare function fillInSolutionSettings(solutionSettings: AzureSolutionSettings, answers: Inputs): Result<Void, FxError>;
|
|
16
|
+
export declare function checkWetherProvisionSucceeded(config: Json): boolean;
|
|
15
17
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/pl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,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAWzF;AAED,wBAAgB,sBAAsB,CACpC,gBAAgB,EAAE,qBAAqB,EACvC,OAAO,EAAE,MAAM,GACd,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAgCvB;AAED,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,CAEnE"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reloadV2Plugins = exports.extractSolutionInputs = exports.combineRecords = exports.isAzureProject = exports.getAzureSolutionSettings = exports.getSelectedPlugins = void 0;
|
|
3
|
+
exports.checkWetherProvisionSucceeded = exports.fillInSolutionSettings = exports.blockV1Project = exports.loadTeamsAppTenantIdForLocal = exports.parseTeamsAppTenantId = exports.ensurePermissionRequest = exports.reloadV2Plugins = exports.extractSolutionInputs = exports.combineRecords = exports.isAzureProject = exports.getAzureSolutionSettings = exports.getSelectedPlugins = void 0;
|
|
4
|
+
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
5
|
+
const localSettingsConstants_1 = require("../../../../common/localSettingsConstants");
|
|
6
|
+
const constants_1 = require("../constants");
|
|
4
7
|
const question_1 = require("../question");
|
|
5
8
|
const ResourcePluginContainer_1 = require("../ResourcePluginContainer");
|
|
6
9
|
function getSelectedPlugins(azureSettings) {
|
|
@@ -41,4 +44,81 @@ function reloadV2Plugins(solutionSettings) {
|
|
|
41
44
|
return res;
|
|
42
45
|
}
|
|
43
46
|
exports.reloadV2Plugins = reloadV2Plugins;
|
|
47
|
+
async function ensurePermissionRequest(solutionSettings, permissionRequestProvider) {
|
|
48
|
+
if (solutionSettings.migrateFromV1) {
|
|
49
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
50
|
+
}
|
|
51
|
+
if (!isAzureProject(solutionSettings)) {
|
|
52
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error("Cannot update permission for SPFx project"), "Solution", constants_1.SolutionError.CannotUpdatePermissionForSPFx));
|
|
53
|
+
}
|
|
54
|
+
const result = await (permissionRequestProvider === null || permissionRequestProvider === void 0 ? void 0 : permissionRequestProvider.checkPermissionRequest());
|
|
55
|
+
if (result && result.isErr()) {
|
|
56
|
+
return result.map(teamsfx_api_1.err);
|
|
57
|
+
}
|
|
58
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
59
|
+
}
|
|
60
|
+
exports.ensurePermissionRequest = ensurePermissionRequest;
|
|
61
|
+
function parseTeamsAppTenantId(appStudioToken) {
|
|
62
|
+
if (appStudioToken === undefined) {
|
|
63
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnSystemError(new Error("Graph token json is undefined"), "Solution", constants_1.SolutionError.NoAppStudioToken));
|
|
64
|
+
}
|
|
65
|
+
const teamsAppTenantId = appStudioToken["tid"];
|
|
66
|
+
if (teamsAppTenantId === undefined ||
|
|
67
|
+
!(typeof teamsAppTenantId === "string") ||
|
|
68
|
+
teamsAppTenantId.length === 0) {
|
|
69
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnSystemError(new Error("Cannot find teams app tenant id"), "Solution", constants_1.SolutionError.NoTeamsAppTenantId));
|
|
70
|
+
}
|
|
71
|
+
return teamsfx_api_1.ok(teamsAppTenantId);
|
|
72
|
+
}
|
|
73
|
+
exports.parseTeamsAppTenantId = parseTeamsAppTenantId;
|
|
74
|
+
// Loads teams app tenant id into local settings.
|
|
75
|
+
function loadTeamsAppTenantIdForLocal(localSettings, appStudioToken) {
|
|
76
|
+
return parseTeamsAppTenantId(appStudioToken).andThen((teamsAppTenantId) => {
|
|
77
|
+
localSettings.teamsApp[localSettingsConstants_1.LocalSettingsTeamsAppKeys.TenantId] = teamsAppTenantId;
|
|
78
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
exports.loadTeamsAppTenantIdForLocal = loadTeamsAppTenantIdForLocal;
|
|
82
|
+
// Returns error if current project is generated by Toolkit V1 extension.
|
|
83
|
+
function blockV1Project(solutionSettings) {
|
|
84
|
+
if (solutionSettings === null || solutionSettings === void 0 ? void 0 : solutionSettings.migrateFromV1) {
|
|
85
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnUserError(new Error("Command is not supported in Teams Toolkit V1 Project"), "Solution", constants_1.SolutionError.V1ProjectNotSupported));
|
|
86
|
+
}
|
|
87
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
88
|
+
}
|
|
89
|
+
exports.blockV1Project = blockV1Project;
|
|
90
|
+
function fillInSolutionSettings(solutionSettings, answers) {
|
|
91
|
+
const capabilities = answers[question_1.AzureSolutionQuestionNames.Capabilities] || [];
|
|
92
|
+
if (!capabilities || capabilities.length === 0) {
|
|
93
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnSystemError(new Error("capabilities is empty"), "Solution", constants_1.SolutionError.InternelError));
|
|
94
|
+
}
|
|
95
|
+
let hostType = answers[question_1.AzureSolutionQuestionNames.HostType];
|
|
96
|
+
if (capabilities.includes(question_1.BotOptionItem.id) || capabilities.includes(question_1.MessageExtensionItem.id))
|
|
97
|
+
hostType = question_1.HostTypeOptionAzure.id;
|
|
98
|
+
if (!hostType) {
|
|
99
|
+
return teamsfx_api_1.err(teamsfx_api_1.returnSystemError(new Error("hostType is undefined"), "Solution", constants_1.SolutionError.InternelError));
|
|
100
|
+
}
|
|
101
|
+
solutionSettings.hostType = hostType;
|
|
102
|
+
let azureResources;
|
|
103
|
+
if (hostType === question_1.HostTypeOptionAzure.id && capabilities.includes(question_1.TabOptionItem.id)) {
|
|
104
|
+
azureResources = answers[question_1.AzureSolutionQuestionNames.AzureResources];
|
|
105
|
+
if (azureResources) {
|
|
106
|
+
if ((azureResources.includes(question_1.AzureResourceSQL.id) ||
|
|
107
|
+
azureResources.includes(question_1.AzureResourceApim.id)) &&
|
|
108
|
+
!azureResources.includes(question_1.AzureResourceFunction.id)) {
|
|
109
|
+
azureResources.push(question_1.AzureResourceFunction.id);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else
|
|
113
|
+
azureResources = [];
|
|
114
|
+
}
|
|
115
|
+
solutionSettings.azureResources = azureResources || [];
|
|
116
|
+
solutionSettings.capabilities = capabilities || [];
|
|
117
|
+
return teamsfx_api_1.ok(teamsfx_api_1.Void);
|
|
118
|
+
}
|
|
119
|
+
exports.fillInSolutionSettings = fillInSolutionSettings;
|
|
120
|
+
function checkWetherProvisionSucceeded(config) {
|
|
121
|
+
return config[constants_1.GLOBAL_CONFIG] && config[constants_1.GLOBAL_CONFIG][constants_1.SOLUTION_PROVISION_SUCCEEDED];
|
|
122
|
+
}
|
|
123
|
+
exports.checkWetherProvisionSucceeded = checkWetherProvisionSucceeded;
|
|
44
124
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/utils.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/plugins/solution/fx-solution/v2/utils.ts"],"names":[],"mappings":";;;AAAA,wDAcgC;AAChC,sFAAsF;AACtF,4CAA0F;AAC1F,0CASqB;AACrB,wEAA2E;AAE3E,SAAgB,kBAAkB,CAAC,aAAoC;IACrE,MAAM,OAAO,GAAG,uDAA6B,CAAC,aAAa,CAAC,CAAC;IAC7D,aAAa,CAAC,qBAAqB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACjE,OAAO,OAAO,CAAC;AACjB,CAAC;AAJD,gDAIC;AAED,SAAgB,wBAAwB,CAAC,GAAe;IACtD,OAAO,GAAG,CAAC,cAAc,CAAC,gBAAyC,CAAC;AACtE,CAAC;AAFD,4D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O,CAAC,qCAA0B,CAAC,cAAc,CAAa,CAAC;QAChF,IAAI,cAAc,EAAE;YAClB,IACE,CAAC,cAAc,CAAC,QAAQ,CAAC,2BAAgB,CAAC,EAAE,CAAC;gBAC3C,cAAc,CAAC,QAAQ,CAAC,4BAAiB,CAAC,EAAE,CAAC,CAAC;gBAChD,CAAC,cAAc,CAAC,QAAQ,CAAC,gCAAqB,CAAC,EAAE,CAAC,EAClD;gBACA,cAAc,CAAC,IAAI,CAAC,gCAAqB,CAAC,EAAE,CAAC,CAAC;aAC/C;SACF;;YAAM,cAAc,GAAG,EAAE,CAAC;KAC5B;IACD,gBAAgB,CAAC,cAAc,GAAG,cAAc,IAAI,EAAE,CAAC;IACvD,gBAAgB,CAAC,YAAY,GAAG,YAAY,IAAI,EAAE,CAAC;IACnD,OAAO,gBAAE,CAAC,kBAAI,CAAC,CAAC;AAClB,CAAC;AAnCD,wDAmCC;AAED,SAAgB,6BAA6B,CAAC,MAAY;IACxD,OAAO,MAAM,CAAC,yBAAa,CAAC,IAAI,MAAM,CAAC,yBAAa,CAAC,CAAC,wCAA4B,CAAC,CAAC;AACtF,CAAC;AAFD,sEAEC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/teamsfx-core",
|
|
3
|
-
"version": "0.7.0",
|
|
3
|
+
"version": "0.7.1-alpha.5e8f6dea.0",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
"test:unit": "nyc mocha \"tests/**/*.test.ts\"",
|
|
22
22
|
"test:solution": "nyc mocha \"tests/plugins/solution/*.test.ts\"",
|
|
23
23
|
"test:core": "nyc mocha \"tests/core/*.test.ts\"",
|
|
24
|
+
"test:apiv2": "nyc mocha \"tests/plugins/resource/apiv2/*.test.ts\"",
|
|
24
25
|
"clean": "rm -rf build",
|
|
25
26
|
"build": "rimraf build && npx tsc -p ./",
|
|
26
|
-
"
|
|
27
|
+
"lint:fix": "eslint --fix \"src/**/*.ts\" \"tests/**/*.ts\"",
|
|
27
28
|
"prepare": "npm run build && node ./scripts/download-templates-zip.js",
|
|
28
29
|
"prepublishOnly": "npm run test:unit && npm run build",
|
|
29
30
|
"package": "rimraf build && webpack --mode production --config ./webpack.config.js",
|
|
@@ -43,12 +44,12 @@
|
|
|
43
44
|
"@azure/storage-blob": "^12.7.0",
|
|
44
45
|
"@dbpiper/timer": "1.0.0-beta.2",
|
|
45
46
|
"@feathersjs/hooks": "^0.6.5",
|
|
46
|
-
"@microsoft/teamsfx-api": "
|
|
47
|
+
"@microsoft/teamsfx-api": "0.7.1-alpha.5e8f6dea.0",
|
|
47
48
|
"@types/jwt-decode": "3.1.0",
|
|
48
49
|
"@types/proper-lockfile": "^4.1.1",
|
|
49
50
|
"adm-zip": "^0.5.5",
|
|
50
51
|
"ajv": "^7.2.4",
|
|
51
|
-
"axios": "^0.21.
|
|
52
|
+
"axios": "^0.21.2",
|
|
52
53
|
"cryptr": "^6.0.2",
|
|
53
54
|
"dateformat": "^4.5.1",
|
|
54
55
|
"dotenv": "^8.2.0",
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
"js-base64": "^3.6.0",
|
|
63
64
|
"js-yaml": "^4.0.0",
|
|
64
65
|
"jsonschema": "^1.4.0",
|
|
66
|
+
"jsum": "^2.0.0-alpha.3",
|
|
65
67
|
"jwt-decode": "3.1.2",
|
|
66
68
|
"klaw": "^3.0.0",
|
|
67
69
|
"md5": "^2.3.0",
|
|
@@ -98,6 +100,7 @@
|
|
|
98
100
|
"@types/fs-extra": "^9.0.9",
|
|
99
101
|
"@types/glob": "^7.1.3",
|
|
100
102
|
"@types/js-yaml": "^4.0.0",
|
|
103
|
+
"@types/jsum": "^0.1.0",
|
|
101
104
|
"@types/jwt-decode": "^3.1.0",
|
|
102
105
|
"@types/klaw": "^3.0.1",
|
|
103
106
|
"@types/lodash": "4.14.117",
|
|
@@ -144,7 +147,7 @@
|
|
|
144
147
|
"resource/**/*",
|
|
145
148
|
"templates/**/*"
|
|
146
149
|
],
|
|
147
|
-
"gitHead": "
|
|
150
|
+
"gitHead": "ff74c110f816c220376069d00c49ac0540373e9c",
|
|
148
151
|
"publishConfig": {
|
|
149
152
|
"access": "public"
|
|
150
153
|
},
|
package/resource/strings.json
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"GenerateArmTemplateFailNotice": "'%s' Failed to create ARM template for required Azure services.",
|
|
24
24
|
"RegenerateArmTemplateConfirmNotice": "We will update your Azure resource template based on your resource and capability selection. The existing template file will be moved to backup folder under Azure resource template folder for your reference. We recommend to initialize your project workspace with git init to track all changes.",
|
|
25
25
|
"MigrateSuccessNotice": "Your project is now initialized with Teams Toolkit! You can debug your application by pressing F5. If you wish to host your application in Azure, we recommend you to re-create your project directly using the latest Teams Toolkit.",
|
|
26
|
-
|
|
26
|
+
"MigrationToArmAndMultiEnvMessage": "We will update your project in order to continue using the latest Teams Toolkit. We recommend to initialize your workspace with git for better tracking file changes.",
|
|
27
|
+
"MigrationToArmAndMultiEnvSuccessMessage": "Migration Success! please run provision command before executing other commands, otherwise the commands may fail. Provision may create new resource, click the link for more information",
|
|
27
28
|
"DeployArmTemplates": {
|
|
28
29
|
"StartNotice": "[%s] Start deploying ARM templates.",
|
|
29
30
|
"CompileBicepSuccessNotice": "[%s] Successfully compile bicep files to JSON.",
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
{{#if createNewBotService}}
|
|
2
1
|
param botServiceName string
|
|
3
|
-
{{/if}}
|
|
4
2
|
param botWebAppName string
|
|
5
3
|
param botAadClientId string
|
|
6
4
|
@secure()
|
|
@@ -26,7 +24,6 @@ param identityId string
|
|
|
26
24
|
|
|
27
25
|
var initiateLoginEndpoint = uri(botEndpoint, authLoginUriSuffix)
|
|
28
26
|
|
|
29
|
-
{{#if createNewBotService}}
|
|
30
27
|
resource botServicesMsTeamsChannel 'Microsoft.BotService/botServices/channels@2021-03-01' = {
|
|
31
28
|
location: 'global'
|
|
32
29
|
name: '${botServiceName}/MsTeamsChannel'
|
|
@@ -35,7 +32,6 @@ resource botServicesMsTeamsChannel 'Microsoft.BotService/botServices/channels@20
|
|
|
35
32
|
}
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
{{/if}}
|
|
39
35
|
resource botWebAppSettings 'Microsoft.Web/sites/config@2021-01-01' = {
|
|
40
36
|
name: '${botWebAppName}/appsettings'
|
|
41
37
|
properties: {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
{{#if createNewBotService}}
|
|
2
1
|
param botServiceName string
|
|
3
2
|
param botAadClientId string
|
|
4
3
|
param botDisplayName string
|
|
5
|
-
{{/if}}
|
|
6
4
|
param botServerfarmsName string
|
|
7
5
|
param botWebAppSKU string = 'F1'
|
|
8
6
|
param botServiceSKU string = 'F1'
|
|
@@ -14,7 +12,6 @@ param identityName string
|
|
|
14
12
|
var botWebAppHostname = botWebApp.properties.hostNames[0]
|
|
15
13
|
var botEndpoint = 'https://${botWebAppHostname}'
|
|
16
14
|
|
|
17
|
-
{{#if createNewBotService}}
|
|
18
15
|
resource botServices 'Microsoft.BotService/botServices@2021-03-01' = {
|
|
19
16
|
kind: 'azurebot'
|
|
20
17
|
location: 'global'
|
|
@@ -29,7 +26,6 @@ resource botServices 'Microsoft.BotService/botServices@2021-03-01' = {
|
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
28
|
|
|
32
|
-
{{/if}}
|
|
33
29
|
resource botServerfarm 'Microsoft.Web/serverfarms@2021-01-01' = {
|
|
34
30
|
kind: 'app'
|
|
35
31
|
location: resourceGroup().location
|
|
@@ -70,7 +66,5 @@ output botServiceSKU string = botServiceSKU
|
|
|
70
66
|
output botWebAppName string = botWebAppName
|
|
71
67
|
output botDomain string = botWebAppHostname
|
|
72
68
|
output appServicePlanName string = botServerfarmsName
|
|
73
|
-
{{#if createNewBotService}}
|
|
74
69
|
output botServiceName string = botServiceName
|
|
75
|
-
{{/if}}
|
|
76
70
|
output botWebAppEndpoint string = botEndpoint
|