@microsoft/teamsfx-core 2.0.4-alpha.dea6b9e8a.0 → 2.0.4-alpha.e432bab97.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/deps-checker/checkerFactory.d.ts +1 -2
- package/build/common/deps-checker/checkerFactory.d.ts.map +1 -1
- package/build/common/deps-checker/checkerFactory.js +2 -2
- package/build/common/deps-checker/checkerFactory.js.map +1 -1
- package/build/common/deps-checker/depsLogger.d.ts +14 -14
- package/build/common/deps-checker/depsLogger.d.ts.map +1 -1
- package/build/common/deps-checker/depsLogger.js +7 -21
- package/build/common/deps-checker/depsLogger.js.map +1 -1
- package/build/common/deps-checker/internal/dotnetChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/dotnetChecker.js +40 -35
- package/build/common/deps-checker/internal/dotnetChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +3 -3
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/common/deps-checker/util/cpUtils.d.ts +1 -1
- package/build/common/deps-checker/util/cpUtils.d.ts.map +1 -1
- package/build/common/deps-checker/util/cpUtils.js +4 -4
- package/build/common/deps-checker/util/cpUtils.js.map +1 -1
- package/build/common/deps-checker/util/progressIndicator.js +2 -2
- package/build/common/deps-checker/util/progressIndicator.js.map +1 -1
- package/build/common/featureFlags.d.ts +1 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +5 -1
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/local/localCertificateManager.d.ts.map +1 -1
- package/build/common/local/localCertificateManager.js +3 -0
- package/build/common/local/localCertificateManager.js.map +1 -1
- package/build/common/local/packageJsonHelper.d.ts.map +1 -1
- package/build/common/local/packageJsonHelper.js +1 -0
- package/build/common/local/packageJsonHelper.js.map +1 -1
- package/build/common/local/portChecker.js.map +1 -1
- package/build/common/m365/launchHelper.d.ts +2 -2
- package/build/common/m365/launchHelper.d.ts.map +1 -1
- package/build/common/m365/launchHelper.js +13 -4
- package/build/common/m365/launchHelper.js.map +1 -1
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +38 -0
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -0
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/samples-config-v3.json +234 -21
- package/build/common/samples.d.ts +8 -3
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +17 -14
- package/build/common/samples.js.map +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.js +38 -32
- package/build/common/spec-parser/adaptiveCardGenerator.js.map +1 -1
- package/build/common/spec-parser/constants.d.ts +10 -10
- package/build/common/spec-parser/constants.d.ts.map +1 -1
- package/build/common/spec-parser/constants.js +11 -10
- package/build/common/spec-parser/constants.js.map +1 -1
- package/build/common/spec-parser/interfaces.d.ts +28 -18
- package/build/common/spec-parser/interfaces.d.ts.map +1 -1
- package/build/common/spec-parser/interfaces.js +19 -13
- package/build/common/spec-parser/interfaces.js.map +1 -1
- package/build/common/spec-parser/manifestUpdater.d.ts.map +1 -1
- package/build/common/spec-parser/manifestUpdater.js +25 -21
- package/build/common/spec-parser/manifestUpdater.js.map +1 -1
- package/build/common/spec-parser/specFilter.d.ts.map +1 -1
- package/build/common/spec-parser/specFilter.js +26 -33
- package/build/common/spec-parser/specFilter.js.map +1 -1
- package/build/common/spec-parser/specParser.d.ts +5 -0
- package/build/common/spec-parser/specParser.d.ts.map +1 -1
- package/build/common/spec-parser/specParser.js +147 -96
- package/build/common/spec-parser/specParser.js.map +1 -1
- package/build/common/spec-parser/utils.d.ts +1 -0
- package/build/common/spec-parser/utils.d.ts.map +1 -1
- package/build/common/spec-parser/utils.js +13 -1
- package/build/common/spec-parser/utils.js.map +1 -1
- package/build/common/telemetry.d.ts +7 -4
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +42 -8
- package/build/common/telemetry.js.map +1 -1
- package/build/component/configManager/interface.d.ts +5 -2
- package/build/component/configManager/interface.d.ts.map +1 -1
- package/build/component/configManager/interface.js.map +1 -1
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +15 -9
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/configManager/parser.d.ts.map +1 -1
- package/build/component/configManager/parser.js +6 -7
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/configManager/validator.d.ts.map +1 -1
- package/build/component/configManager/validator.js +2 -3
- package/build/component/configManager/validator.js.map +1 -1
- package/build/component/constants.d.ts +5 -0
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +6 -1
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts +11 -8
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +68 -63
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/coordinator/summary.d.ts.map +1 -1
- package/build/component/coordinator/summary.js +2 -1
- package/build/component/coordinator/summary.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +7 -7
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/create.d.ts +1 -0
- package/build/component/driver/aad/create.d.ts.map +1 -1
- package/build/component/driver/aad/create.js +2 -5
- package/build/component/driver/aad/create.js.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.d.ts +3 -0
- package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.js +13 -1
- package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
- package/build/component/driver/aad/update.d.ts +1 -0
- package/build/component/driver/aad/update.d.ts.map +1 -1
- package/build/component/driver/aad/update.js +2 -5
- package/build/component/driver/aad/update.js.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.js +58 -13
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/aad/utility/constants.d.ts +3 -0
- package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
- package/build/component/driver/aad/utility/constants.js +4 -1
- package/build/component/driver/aad/utility/constants.js.map +1 -1
- package/build/component/driver/add/addWebPart.js +1 -1
- package/build/component/driver/add/addWebPart.js.map +1 -1
- package/build/component/driver/arm/deploy.d.ts +1 -0
- package/build/component/driver/arm/deploy.d.ts.map +1 -1
- package/build/component/driver/arm/deploy.js +1 -8
- package/build/component/driver/arm/deploy.js.map +1 -1
- package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
- package/build/component/driver/arm/deployImpl.js +8 -0
- package/build/component/driver/arm/deployImpl.js.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.js +7 -6
- package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
- package/build/component/driver/arm/util/handleError.js.map +1 -1
- package/build/component/driver/botAadApp/create.d.ts +1 -0
- package/build/component/driver/botAadApp/create.d.ts.map +1 -1
- package/build/component/driver/botAadApp/create.js +4 -7
- package/build/component/driver/botAadApp/create.js.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts +1 -0
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.js +5 -11
- package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +12 -5
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js +11 -4
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +22 -14
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +8 -8
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.js +4 -4
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/spfx/deployDriver.d.ts +1 -0
- package/build/component/driver/deploy/spfx/deployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/spfx/deployDriver.js +9 -3
- package/build/component/driver/deploy/spfx/deployDriver.js.map +1 -1
- package/build/component/driver/devTool/installDriver.d.ts +1 -0
- package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
- package/build/component/driver/devTool/installDriver.js +10 -6
- package/build/component/driver/devTool/installDriver.js.map +1 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts +1 -0
- package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts.map +1 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js +5 -11
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
- package/build/component/driver/file/createOrUpdateJsonFile.d.ts +1 -0
- package/build/component/driver/file/createOrUpdateJsonFile.d.ts.map +1 -1
- package/build/component/driver/file/createOrUpdateJsonFile.js +5 -11
- package/build/component/driver/file/createOrUpdateJsonFile.js.map +1 -1
- package/build/component/driver/interface/stepDriver.d.ts +1 -0
- package/build/component/driver/interface/stepDriver.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.d.ts +1 -0
- package/build/component/driver/m365/acquire.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.js +5 -11
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/script/baseBuildDriver.d.ts.map +1 -1
- package/build/component/driver/script/baseBuildDriver.js +1 -0
- package/build/component/driver/script/baseBuildDriver.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts +1 -0
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +28 -21
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +3 -3
- package/build/component/driver/teamsApp/appStudio.js.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +21 -5
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.js +2 -0
- package/build/component/driver/teamsApp/clients/authSvcClient.js.map +1 -1
- package/build/component/driver/teamsApp/configure.d.ts +1 -0
- package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
- package/build/component/driver/teamsApp/configure.js +3 -6
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts +1 -0
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts.map +1 -1
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.js +3 -6
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.js.map +1 -1
- package/build/component/driver/teamsApp/create.d.ts +1 -0
- package/build/component/driver/teamsApp/create.d.ts.map +1 -1
- package/build/component/driver/teamsApp/create.js +5 -6
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -2
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +22 -24
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
- package/build/component/driver/teamsApp/errors.js +2 -0
- package/build/component/driver/teamsApp/errors.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtension.d.ts +3 -0
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtension.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtensionCommand.d.ts +1 -0
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtensionCommand.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.d.ts +1 -0
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +3 -6
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +2 -0
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.d.ts +2 -2
- package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.js +21 -10
- package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts +1 -0
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +3 -6
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts +1 -0
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +3 -6
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/error/componentError.d.ts +2 -1
- package/build/component/error/componentError.d.ts.map +1 -1
- package/build/component/error/componentError.js +8 -4
- package/build/component/error/componentError.js.map +1 -1
- package/build/component/feature/collaboration.d.ts.map +1 -1
- package/build/component/feature/collaboration.js +25 -6
- package/build/component/feature/collaboration.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts +5 -2
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/generator.js +42 -14
- package/build/component/generator/copilotPlugin/generator.js.map +1 -1
- package/build/component/generator/copilotPlugin/helper.d.ts +5 -3
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/helper.js +107 -35
- package/build/component/generator/copilotPlugin/helper.js.map +1 -1
- package/build/component/generator/error.d.ts +1 -1
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +2 -2
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +18 -15
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +9 -1
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +8 -4
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.js +4 -2
- package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.js +3 -3
- package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +2 -2
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/utils.js +3 -3
- package/build/component/generator/spfx/utils/utils.js.map +1 -1
- package/build/component/generator/utils.d.ts +10 -2
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +4 -2
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/messages.d.ts +2 -3
- package/build/component/messages.d.ts.map +1 -1
- package/build/component/messages.js +3 -4
- package/build/component/messages.js.map +1 -1
- package/build/component/middleware/questionMW.d.ts +2 -2
- package/build/component/middleware/questionMW.d.ts.map +1 -1
- package/build/component/middleware/questionMW.js +7 -11
- package/build/component/middleware/questionMW.js.map +1 -1
- package/build/component/provisionUtils.d.ts +3 -3
- package/build/component/provisionUtils.d.ts.map +1 -1
- package/build/component/provisionUtils.js +3 -3
- package/build/component/provisionUtils.js.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.js +24 -2
- package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
- package/build/component/telemetry.js +2 -2
- package/build/component/telemetry.js.map +1 -1
- package/build/component/utils/ResourceGroupHelper.d.ts +2 -2
- package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/component/utils/ResourceGroupHelper.js +1 -4
- package/build/component/utils/ResourceGroupHelper.js.map +1 -1
- package/build/component/utils/charsetUtils.js +3 -3
- package/build/component/utils/charsetUtils.js.map +1 -1
- package/build/component/utils/common.d.ts +1 -1
- package/build/component/utils/common.d.ts.map +1 -1
- package/build/component/utils/common.js +3 -3
- package/build/component/utils/common.js.map +1 -1
- package/build/component/utils/depsChecker/cpUtils.d.ts.map +1 -1
- package/build/component/utils/depsChecker/cpUtils.js +8 -4
- package/build/component/utils/depsChecker/cpUtils.js.map +1 -1
- package/build/component/utils/envUtil.js +2 -2
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/metadataUtil.d.ts +3 -0
- package/build/component/utils/metadataUtil.d.ts.map +1 -1
- package/build/component/utils/metadataUtil.js +16 -3
- package/build/component/utils/metadataUtil.js.map +1 -1
- package/build/component/utils/teamsFxTelemetryReporter.js +2 -2
- package/build/component/utils/teamsFxTelemetryReporter.js.map +1 -1
- package/build/core/FxCore.d.ts +40 -33
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +810 -66
- package/build/core/FxCore.js.map +1 -1
- package/build/core/collaborator.js +2 -2
- package/build/core/collaborator.js.map +1 -1
- package/build/core/globalVars.d.ts +16 -0
- package/build/core/globalVars.d.ts.map +1 -1
- package/build/core/globalVars.js +34 -1
- package/build/core/globalVars.js.map +1 -1
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +7 -3
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts +4 -0
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +34 -32
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.js +5 -5
- package/build/core/middleware/projectVersionChecker.js.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.d.ts.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.js +2 -1
- package/build/core/middleware/utils/appYmlGenerator.js.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +3 -0
- package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
- package/build/core/middleware/utils/migrationContext.d.ts +1 -0
- package/build/core/middleware/utils/migrationContext.d.ts.map +1 -1
- package/build/core/middleware/utils/migrationContext.js.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.js +5 -1
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/error/common.d.ts +2 -8
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +8 -33
- package/build/error/common.js.map +1 -1
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +4 -0
- package/build/question/constants.d.ts.map +1 -0
- package/build/question/constants.js +12 -0
- package/build/question/constants.js.map +1 -0
- package/build/question/create.d.ts +11 -3
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +339 -248
- package/build/question/create.js.map +1 -1
- package/build/question/generator.d.ts +4 -0
- package/build/question/generator.d.ts.map +1 -0
- package/build/question/generator.js +371 -0
- package/build/question/generator.js.map +1 -0
- package/build/question/index.d.ts +18 -30
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +13 -47
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/CreateEnvInputs.d.ts +14 -0
- package/build/question/inputs/CreateEnvInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateEnvInputs.js +5 -0
- package/build/question/inputs/CreateEnvInputs.js.map +1 -0
- package/build/question/inputs/CreateProjectInputs.d.ts +40 -0
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateProjectInputs.js +5 -0
- package/build/question/inputs/CreateProjectInputs.js.map +1 -0
- package/build/question/inputs/CreateSampleProjectInputs.d.ts +12 -0
- package/build/question/inputs/CreateSampleProjectInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateSampleProjectInputs.js +5 -0
- package/build/question/inputs/CreateSampleProjectInputs.js.map +1 -0
- package/build/question/inputs/DeployAadManifestInputs.d.ts +14 -0
- package/build/question/inputs/DeployAadManifestInputs.d.ts.map +1 -0
- package/build/question/inputs/DeployAadManifestInputs.js +5 -0
- package/build/question/inputs/DeployAadManifestInputs.js.map +1 -0
- package/build/question/inputs/PermissionGrantInputs.d.ts +18 -0
- package/build/question/inputs/PermissionGrantInputs.d.ts.map +1 -0
- package/build/question/inputs/PermissionGrantInputs.js +5 -0
- package/build/question/inputs/PermissionGrantInputs.js.map +1 -0
- package/build/question/inputs/PermissionListInputs.d.ts +16 -0
- package/build/question/inputs/PermissionListInputs.d.ts.map +1 -0
- package/build/question/inputs/PermissionListInputs.js +5 -0
- package/build/question/inputs/PermissionListInputs.js.map +1 -0
- package/build/question/inputs/PreviewTeamsAppInputs.d.ts +14 -0
- package/build/question/inputs/PreviewTeamsAppInputs.d.ts.map +1 -0
- package/build/question/inputs/PreviewTeamsAppInputs.js +5 -0
- package/build/question/inputs/PreviewTeamsAppInputs.js.map +1 -0
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts +18 -0
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts.map +1 -0
- package/build/question/inputs/SPFxAddWebpartInputs.js +5 -0
- package/build/question/inputs/SPFxAddWebpartInputs.js.map +1 -0
- package/build/question/inputs/SelectTeamsManifestInputs.d.ts +12 -0
- package/build/question/inputs/SelectTeamsManifestInputs.d.ts.map +1 -0
- package/build/question/inputs/SelectTeamsManifestInputs.js +5 -0
- package/build/question/inputs/SelectTeamsManifestInputs.js.map +1 -0
- package/build/question/inputs/ValidateTeamsAppInputs.d.ts +14 -0
- package/build/question/inputs/ValidateTeamsAppInputs.d.ts.map +1 -0
- package/build/question/inputs/ValidateTeamsAppInputs.js +5 -0
- package/build/question/inputs/ValidateTeamsAppInputs.js.map +1 -0
- package/build/question/inputs/index.d.ts +11 -0
- package/build/question/inputs/index.d.ts.map +1 -0
- package/build/question/inputs/index.js +16 -0
- package/build/question/inputs/index.js.map +1 -0
- package/build/question/options/CreateEnvOptions.d.ts +10 -0
- package/build/question/options/CreateEnvOptions.d.ts.map +1 -0
- package/build/question/options/CreateEnvOptions.js +24 -0
- package/build/question/options/CreateEnvOptions.js.map +1 -0
- package/build/question/options/CreateProjectOptions.d.ts +10 -0
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -0
- package/build/question/options/CreateProjectOptions.js +139 -0
- package/build/question/options/CreateProjectOptions.js.map +1 -0
- package/build/question/options/CreateSampleProjectOptions.d.ts +10 -0
- package/build/question/options/CreateSampleProjectOptions.d.ts.map +1 -0
- package/build/question/options/CreateSampleProjectOptions.js +52 -0
- package/build/question/options/CreateSampleProjectOptions.js.map +1 -0
- package/build/question/options/DeployAadManifestOptions.d.ts +10 -0
- package/build/question/options/DeployAadManifestOptions.d.ts.map +1 -0
- package/build/question/options/DeployAadManifestOptions.js +21 -0
- package/build/question/options/DeployAadManifestOptions.js.map +1 -0
- package/build/question/options/PermissionGrantOptions.d.ts +10 -0
- package/build/question/options/PermissionGrantOptions.d.ts.map +1 -0
- package/build/question/options/PermissionGrantOptions.js +33 -0
- package/build/question/options/PermissionGrantOptions.js.map +1 -0
- package/build/question/options/PermissionListOptions.d.ts +10 -0
- package/build/question/options/PermissionListOptions.d.ts.map +1 -0
- package/build/question/options/PermissionListOptions.js +28 -0
- package/build/question/options/PermissionListOptions.js.map +1 -0
- package/build/question/options/PreviewTeamsAppOptions.d.ts +10 -0
- package/build/question/options/PreviewTeamsAppOptions.d.ts.map +1 -0
- package/build/question/options/PreviewTeamsAppOptions.js +26 -0
- package/build/question/options/PreviewTeamsAppOptions.js.map +1 -0
- package/build/question/options/SPFxAddWebpartOptions.d.ts +10 -0
- package/build/question/options/SPFxAddWebpartOptions.d.ts.map +1 -0
- package/build/question/options/SPFxAddWebpartOptions.js +38 -0
- package/build/question/options/SPFxAddWebpartOptions.js.map +1 -0
- package/build/question/options/SelectTeamsManifestOptions.d.ts +10 -0
- package/build/question/options/SelectTeamsManifestOptions.d.ts.map +1 -0
- package/build/question/options/SelectTeamsManifestOptions.js +17 -0
- package/build/question/options/SelectTeamsManifestOptions.js.map +1 -0
- package/build/question/options/ValidateTeamsAppOptions.d.ts +10 -0
- package/build/question/options/ValidateTeamsAppOptions.d.ts.map +1 -0
- package/build/question/options/ValidateTeamsAppOptions.js +23 -0
- package/build/question/options/ValidateTeamsAppOptions.js.map +1 -0
- package/build/question/options/index.d.ts +11 -0
- package/build/question/options/index.d.ts.map +1 -0
- package/build/question/options/index.js +16 -0
- package/build/question/options/index.js.map +1 -0
- package/build/question/other.d.ts +12 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +123 -30
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +6 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +8 -2
- package/build/question/questionNames.js.map +1 -1
- package/build/ui/validationUtils.d.ts +15 -0
- package/build/ui/validationUtils.d.ts.map +1 -0
- package/build/ui/validationUtils.js +95 -0
- package/build/ui/validationUtils.js.map +1 -0
- package/build/ui/visitor.d.ts +13 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +257 -232
- package/build/ui/visitor.js.map +1 -1
- package/package.json +9 -10
- package/resource/package.nls.json +34 -14
- package/resource/yaml-schema/{1.1.1 → v1.2}/yaml.schema.json +11 -5
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/plugins/resource/aad/auth/V3/Tab/GetUserProfile.razor +1 -2
- package/templates/plugins/resource/aad/auth/bot/README.md +281 -263
- package/templates/plugins/resource/aad/auth/bot/js/sso/handleMessageExtensionQueryWithToken.js +13 -3
- package/templates/plugins/resource/aad/auth/bot/js/sso/profileSsoCommandHandler.js +14 -5
- package/templates/plugins/resource/aad/auth/bot/ts/sso/handleMessageExtensionQueryWithToken.ts +11 -3
- package/templates/plugins/resource/aad/auth/bot/ts/sso/profileSsoCommandHandler.ts +12 -3
- package/templates/plugins/resource/aad/auth/tab/csharp/GetUserProfile.razor +1 -2
- package/build/component/driver/middleware/updateProgress.d.ts +0 -6
- package/build/component/driver/middleware/updateProgress.d.ts.map +0 -1
- package/build/component/driver/middleware/updateProgress.js +0 -15
- package/build/component/driver/middleware/updateProgress.js.map +0 -1
- package/build/core/FxCoreImplementV3.d.ts +0 -47
- package/build/core/FxCoreImplementV3.d.ts.map +0 -1
- package/build/core/FxCoreImplementV3.js +0 -702
- package/build/core/FxCoreImplementV3.js.map +0 -1
package/build/core/FxCore.js
CHANGED
|
@@ -6,35 +6,58 @@ exports.FxCore = void 0;
|
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const hooks_1 = require("@feathersjs/hooks");
|
|
8
8
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
9
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
10
|
+
const os = tslib_1.__importStar(require("os"));
|
|
9
11
|
const path = tslib_1.__importStar(require("path"));
|
|
10
12
|
require("reflect-metadata");
|
|
11
|
-
const
|
|
13
|
+
const typedi_1 = require("typedi");
|
|
14
|
+
const url_1 = require("url");
|
|
15
|
+
const yaml_1 = require("yaml");
|
|
16
|
+
const constants_1 = require("../common/constants");
|
|
17
|
+
const localizeUtils_1 = require("../common/localizeUtils");
|
|
18
|
+
const launchHelper_1 = require("../common/m365/launchHelper");
|
|
19
|
+
const projectSettingsHelper_1 = require("../common/projectSettingsHelper");
|
|
20
|
+
const specParser_1 = require("../common/spec-parser/specParser");
|
|
21
|
+
const specParserError_1 = require("../common/spec-parser/specParserError");
|
|
22
|
+
const versionMetadata_1 = require("../common/versionMetadata");
|
|
12
23
|
const parser_1 = require("../component/configManager/parser");
|
|
13
|
-
const
|
|
24
|
+
const constants_2 = require("../component/constants");
|
|
25
|
+
const coordinator_1 = require("../component/coordinator");
|
|
26
|
+
const buildAadManifest_1 = require("../component/driver/aad/utility/buildAadManifest");
|
|
14
27
|
require("../component/driver/index");
|
|
15
28
|
require("../component/driver/script/scriptDriver");
|
|
29
|
+
const appStudio_1 = require("../component/driver/teamsApp/appStudio");
|
|
30
|
+
const ManifestUtils_1 = require("../component/driver/teamsApp/utils/ManifestUtils");
|
|
31
|
+
const utils_1 = require("../component/driver/teamsApp/utils/utils");
|
|
32
|
+
const helper_1 = require("../component/generator/copilotPlugin/helper");
|
|
16
33
|
const envMW_1 = require("../component/middleware/envMW");
|
|
17
34
|
const questionMW_1 = require("../component/middleware/questionMW");
|
|
35
|
+
const utils_2 = require("../component/utils");
|
|
18
36
|
const envUtil_1 = require("../component/utils/envUtil");
|
|
19
37
|
const metadataUtil_1 = require("../component/utils/metadataUtil");
|
|
20
38
|
const pathUtils_1 = require("../component/utils/pathUtils");
|
|
21
39
|
const settingsUtil_1 = require("../component/utils/settingsUtil");
|
|
40
|
+
const common_1 = require("../error/common");
|
|
41
|
+
const upgrade_1 = require("../error/upgrade");
|
|
42
|
+
const yml_1 = require("../error/yml");
|
|
22
43
|
const create_1 = require("../question/create");
|
|
44
|
+
const other_1 = require("../question/other");
|
|
45
|
+
const questionNames_1 = require("../question/questionNames");
|
|
23
46
|
const callback_1 = require("./callback");
|
|
47
|
+
const collaborator_1 = require("./collaborator");
|
|
24
48
|
const crypto_1 = require("./crypto");
|
|
25
49
|
const environment_1 = require("./environment");
|
|
26
50
|
const error_1 = require("./error");
|
|
27
|
-
const FxCoreImplementV3_1 = require("./FxCoreImplementV3");
|
|
28
51
|
const globalVars_1 = require("./globalVars");
|
|
52
|
+
const concurrentLocker_1 = require("./middleware/concurrentLocker");
|
|
53
|
+
const contextInjector_1 = require("./middleware/contextInjector");
|
|
29
54
|
const errorHandler_1 = require("./middleware/errorHandler");
|
|
30
|
-
const
|
|
31
|
-
const
|
|
55
|
+
const projectMigratorV3_1 = require("./middleware/projectMigratorV3");
|
|
56
|
+
const v3MigrationUtils_1 = require("./middleware/utils/v3MigrationUtils");
|
|
57
|
+
const telemetry_1 = require("./telemetry");
|
|
32
58
|
class FxCore {
|
|
33
59
|
constructor(tools) {
|
|
34
|
-
this.tools = tools;
|
|
35
60
|
globalVars_1.setTools(tools);
|
|
36
|
-
telemetry_1.TelemetryReporterInstance.telemetryReporter = tools.telemetryReporter;
|
|
37
|
-
this.v3Implement = new FxCoreImplementV3_1.FxCoreV3Implement(tools);
|
|
38
61
|
}
|
|
39
62
|
/**
|
|
40
63
|
* @todo this's a really primitive implement. Maybe could use Subscription Model to
|
|
@@ -43,23 +66,77 @@ class FxCore {
|
|
|
43
66
|
on(event, callback) {
|
|
44
67
|
return callback_1.CallbackRegistry.set(event, callback);
|
|
45
68
|
}
|
|
69
|
+
async createProject(inputs) {
|
|
70
|
+
const context = utils_2.createContextV3();
|
|
71
|
+
inputs[questionNames_1.QuestionNames.Scratch] = create_1.ScratchOptions.yes().id;
|
|
72
|
+
if (inputs.teamsAppFromTdp) {
|
|
73
|
+
// should never happen as we do same check on Developer Portal.
|
|
74
|
+
if (utils_1.containsUnsupportedFeature(inputs.teamsAppFromTdp)) {
|
|
75
|
+
return teamsfx_api_1.err(error_1.InvalidInputError("Teams app contains unsupported features"));
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
context.telemetryReporter.sendTelemetryEvent(telemetry_1.CoreTelemetryEvent.CreateFromTdpStart, {
|
|
79
|
+
[telemetry_1.CoreTelemetryProperty.TdpTeamsAppFeatures]: utils_1.getFeaturesFromAppDefinition(inputs.teamsAppFromTdp).join(","),
|
|
80
|
+
[telemetry_1.CoreTelemetryProperty.TdpTeamsAppId]: inputs.teamsAppFromTdp.teamsAppId,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const res = await coordinator_1.coordinator.create(context, inputs);
|
|
85
|
+
inputs.projectPath = context.projectPath;
|
|
86
|
+
return res;
|
|
87
|
+
}
|
|
46
88
|
/**
|
|
47
|
-
* lifecycle command: create new project
|
|
89
|
+
* lifecycle command: create new sample project
|
|
48
90
|
*/
|
|
49
|
-
async
|
|
50
|
-
|
|
91
|
+
async createSampleProject(inputs) {
|
|
92
|
+
const context = utils_2.createContextV3();
|
|
93
|
+
inputs[questionNames_1.QuestionNames.Scratch] = create_1.ScratchOptions.no().id;
|
|
94
|
+
const res = await coordinator_1.coordinator.create(context, inputs);
|
|
95
|
+
inputs.projectPath = context.projectPath;
|
|
96
|
+
return res;
|
|
51
97
|
}
|
|
52
98
|
/**
|
|
53
99
|
* lifecycle commands: provision
|
|
54
100
|
*/
|
|
55
|
-
async provisionResources(inputs) {
|
|
56
|
-
|
|
101
|
+
async provisionResources(inputs, ctx) {
|
|
102
|
+
inputs.stage = teamsfx_api_1.Stage.provision;
|
|
103
|
+
const context = utils_2.createDriverContext(inputs);
|
|
104
|
+
try {
|
|
105
|
+
const res = await coordinator_1.coordinator.provision(context, inputs);
|
|
106
|
+
if (res.isOk()) {
|
|
107
|
+
ctx.envVars = res.value;
|
|
108
|
+
return teamsfx_api_1.ok(undefined);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
// for partial success scenario, output is set in inputs object
|
|
112
|
+
ctx.envVars = inputs.envVars;
|
|
113
|
+
return teamsfx_api_1.err(res.error);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
//reset subscription
|
|
118
|
+
try {
|
|
119
|
+
await globalVars_1.TOOLS.tokenProvider.azureAccountProvider.setSubscription("");
|
|
120
|
+
}
|
|
121
|
+
catch (e) { }
|
|
122
|
+
}
|
|
57
123
|
}
|
|
58
124
|
/**
|
|
59
125
|
* lifecycle commands: deploy
|
|
60
126
|
*/
|
|
61
|
-
async deployArtifacts(inputs) {
|
|
62
|
-
|
|
127
|
+
async deployArtifacts(inputs, ctx) {
|
|
128
|
+
inputs.stage = teamsfx_api_1.Stage.deploy;
|
|
129
|
+
const context = utils_2.createDriverContext(inputs);
|
|
130
|
+
const res = await coordinator_1.coordinator.deploy(context, inputs);
|
|
131
|
+
if (res.isOk()) {
|
|
132
|
+
ctx.envVars = res.value;
|
|
133
|
+
return teamsfx_api_1.ok(undefined);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
// for partial success scenario, output is set in inputs object
|
|
137
|
+
ctx.envVars = inputs.envVars;
|
|
138
|
+
return teamsfx_api_1.err(res.error);
|
|
139
|
+
}
|
|
63
140
|
}
|
|
64
141
|
async localDebug(inputs) {
|
|
65
142
|
inputs.env = environment_1.environmentManager.getLocalEnvName();
|
|
@@ -69,43 +146,131 @@ class FxCore {
|
|
|
69
146
|
* none lifecycle command, v3 only
|
|
70
147
|
*/
|
|
71
148
|
async deployAadManifest(inputs) {
|
|
72
|
-
|
|
149
|
+
inputs.stage = teamsfx_api_1.Stage.deployAad;
|
|
150
|
+
const updateAadClient = typedi_1.Container.get("aadApp/update");
|
|
151
|
+
// In V3, the aad.template.json exist at .fx folder, and output to root build folder.
|
|
152
|
+
const manifestTemplatePath = inputs[questionNames_1.QuestionNames.AadAppManifestFilePath];
|
|
153
|
+
if (!(await fs_extra_1.default.pathExists(manifestTemplatePath))) {
|
|
154
|
+
return teamsfx_api_1.err(new common_1.FileNotFoundError("deployAadManifest", manifestTemplatePath));
|
|
155
|
+
}
|
|
156
|
+
let manifestOutputPath = manifestTemplatePath;
|
|
157
|
+
if (inputs.env && (await other_1.isAadMainifestContainsPlaceholder(inputs))) {
|
|
158
|
+
await fs_extra_1.default.ensureDir(path.join(inputs.projectPath, "build"));
|
|
159
|
+
manifestOutputPath = path.join(inputs.projectPath, "build", `aad.manifest.${inputs.env}.json`);
|
|
160
|
+
}
|
|
161
|
+
const inputArgs = {
|
|
162
|
+
manifestPath: manifestTemplatePath,
|
|
163
|
+
outputFilePath: manifestOutputPath,
|
|
164
|
+
};
|
|
165
|
+
const Context = utils_2.createDriverContext(inputs);
|
|
166
|
+
globalVars_1.setErrorContext({ component: "aadAppUpdate" });
|
|
167
|
+
const res = await updateAadClient.run(inputArgs, Context);
|
|
168
|
+
if (res.isErr()) {
|
|
169
|
+
return teamsfx_api_1.err(res.error);
|
|
170
|
+
}
|
|
171
|
+
if (Context.platform === teamsfx_api_1.Platform.CLI) {
|
|
172
|
+
const msg = localizeUtils_1.getLocalizedString("core.deploy.aadManifestOnCLISuccessNotice");
|
|
173
|
+
void Context.ui.showMessage("info", msg, false);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
const msg = localizeUtils_1.getLocalizedString("core.deploy.aadManifestSuccessNotice");
|
|
177
|
+
const result = await Context.ui.showMessage("info", msg, false, localizeUtils_1.getLocalizedString("core.deploy.aadManifestLearnMore"));
|
|
178
|
+
const userSelected = result.isOk() ? result.value : undefined;
|
|
179
|
+
if (userSelected === localizeUtils_1.getLocalizedString("core.deploy.aadManifestLearnMore")) {
|
|
180
|
+
void Context.ui.openUrl(constants_2.ViewAadAppHelpLinkV5);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return teamsfx_api_1.ok(undefined);
|
|
73
184
|
}
|
|
74
185
|
/**
|
|
75
186
|
* none lifecycle command, v3 only
|
|
76
187
|
*/
|
|
77
188
|
async addWebpart(inputs) {
|
|
78
|
-
|
|
189
|
+
globalVars_1.setErrorContext({ component: "spfxAdd", method: "run" });
|
|
190
|
+
const driver = typedi_1.Container.get("spfx/add");
|
|
191
|
+
const args = {
|
|
192
|
+
manifestPath: inputs[constants_2.SPFxQuestionNames.ManifestPath],
|
|
193
|
+
localManifestPath: inputs[constants_2.SPFxQuestionNames.LocalManifestPath],
|
|
194
|
+
spfxFolder: inputs[constants_2.SPFxQuestionNames.SPFxFolder],
|
|
195
|
+
webpartName: inputs[constants_2.SPFxQuestionNames.WebPartName],
|
|
196
|
+
spfxPackage: create_1.SPFxVersionOptionIds.installLocally,
|
|
197
|
+
};
|
|
198
|
+
const Context = utils_2.createDriverContext(inputs);
|
|
199
|
+
const res = await driver.run(args, Context);
|
|
200
|
+
if (res.isErr()) {
|
|
201
|
+
return teamsfx_api_1.err(res.error);
|
|
202
|
+
}
|
|
203
|
+
return teamsfx_api_1.ok(undefined);
|
|
79
204
|
}
|
|
80
205
|
/**
|
|
81
206
|
* lifecycle command: publish
|
|
82
207
|
*/
|
|
83
|
-
async publishApplication(inputs) {
|
|
84
|
-
|
|
208
|
+
async publishApplication(inputs, ctx) {
|
|
209
|
+
inputs.stage = teamsfx_api_1.Stage.publish;
|
|
210
|
+
const context = utils_2.createDriverContext(inputs);
|
|
211
|
+
const res = await coordinator_1.coordinator.publish(context, inputs);
|
|
212
|
+
if (res.isOk()) {
|
|
213
|
+
ctx.envVars = res.value;
|
|
214
|
+
return teamsfx_api_1.ok(undefined);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
// for partial success scenario, output is set in inputs object
|
|
218
|
+
ctx.envVars = inputs.envVars;
|
|
219
|
+
return teamsfx_api_1.err(res.error);
|
|
220
|
+
}
|
|
85
221
|
}
|
|
86
222
|
/**
|
|
87
223
|
* most commands will be deprecated in V3
|
|
88
224
|
*/
|
|
89
225
|
async executeUserTask(func, inputs) {
|
|
90
|
-
|
|
226
|
+
let res = teamsfx_api_1.ok(undefined);
|
|
227
|
+
const context = utils_2.createDriverContext(inputs);
|
|
228
|
+
if (func.method === "addSso") {
|
|
229
|
+
// used in v3 only in VS
|
|
230
|
+
inputs.stage = teamsfx_api_1.Stage.addFeature;
|
|
231
|
+
inputs[questionNames_1.QuestionNames.Features] = constants_2.SingleSignOnOptionItem.id;
|
|
232
|
+
const component = typedi_1.Container.get("sso");
|
|
233
|
+
globalVars_1.setErrorContext({ component: "sso", method: "add" });
|
|
234
|
+
res = await component.add(context, inputs);
|
|
235
|
+
}
|
|
236
|
+
return res;
|
|
91
237
|
}
|
|
92
238
|
/**
|
|
93
239
|
* v3 only none lifecycle command
|
|
94
240
|
*/
|
|
95
241
|
async buildAadManifest(inputs) {
|
|
96
|
-
|
|
242
|
+
const manifestTemplatePath = inputs.AAD_MANIFEST_FILE
|
|
243
|
+
? inputs.AAD_MANIFEST_FILE
|
|
244
|
+
: path.join(inputs.projectPath, constants_2.AadConstants.DefaultTemplateFileName);
|
|
245
|
+
if (!(await fs_extra_1.default.pathExists(manifestTemplatePath))) {
|
|
246
|
+
return teamsfx_api_1.err(new common_1.FileNotFoundError("buildAadManifest", manifestTemplatePath));
|
|
247
|
+
}
|
|
248
|
+
await fs_extra_1.default.ensureDir(path.join(inputs.projectPath, "build"));
|
|
249
|
+
const manifestOutputPath = path.join(inputs.projectPath, "build",
|
|
250
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
251
|
+
`aad.${inputs.env}.json`);
|
|
252
|
+
const Context = utils_2.createDriverContext(inputs);
|
|
253
|
+
await buildAadManifest_1.buildAadManifest(Context, manifestTemplatePath, manifestOutputPath);
|
|
254
|
+
return teamsfx_api_1.ok(undefined);
|
|
97
255
|
}
|
|
98
256
|
/**
|
|
99
257
|
* v3 only none lifecycle command
|
|
100
258
|
*/
|
|
101
|
-
async deployTeamsManifest(inputs) {
|
|
102
|
-
|
|
259
|
+
async deployTeamsManifest(inputs, ctx) {
|
|
260
|
+
inputs.manifestTemplatePath = inputs[questionNames_1.QuestionNames.TeamsAppManifestFilePath];
|
|
261
|
+
const context = utils_2.createContextV3();
|
|
262
|
+
const res = await appStudio_1.updateManifestV3(context, inputs);
|
|
263
|
+
if (res.isOk()) {
|
|
264
|
+
ctx.envVars = envUtil_1.envUtil.map2object(res.value);
|
|
265
|
+
return teamsfx_api_1.ok(undefined);
|
|
266
|
+
}
|
|
267
|
+
return teamsfx_api_1.err(res.error);
|
|
103
268
|
}
|
|
104
269
|
/**
|
|
105
270
|
* v3 only none lifecycle command
|
|
106
271
|
*/
|
|
107
272
|
async validateApplication(inputs) {
|
|
108
|
-
if (inputs[
|
|
273
|
+
if (inputs["manifest-path"]) {
|
|
109
274
|
return await this.validateManifest(inputs);
|
|
110
275
|
}
|
|
111
276
|
else {
|
|
@@ -116,19 +281,69 @@ class FxCore {
|
|
|
116
281
|
* v3 only none lifecycle command
|
|
117
282
|
*/
|
|
118
283
|
async validateManifest(inputs) {
|
|
119
|
-
|
|
284
|
+
inputs.stage = teamsfx_api_1.Stage.validateApplication;
|
|
285
|
+
const context = utils_2.createDriverContext(inputs);
|
|
286
|
+
const teamsAppManifestFilePath = inputs["manifest-path"];
|
|
287
|
+
const args = {
|
|
288
|
+
manifestPath: teamsAppManifestFilePath,
|
|
289
|
+
showMessage: (inputs === null || inputs === void 0 ? void 0 : inputs.showMessage) != undefined ? inputs.showMessage : true,
|
|
290
|
+
};
|
|
291
|
+
const driver = typedi_1.Container.get("teamsApp/validateManifest");
|
|
292
|
+
const result = await driver.run(args, context);
|
|
293
|
+
return result;
|
|
120
294
|
}
|
|
121
295
|
/**
|
|
122
296
|
* v3 only none lifecycle command
|
|
123
297
|
*/
|
|
124
298
|
async validateAppPackage(inputs) {
|
|
125
|
-
|
|
299
|
+
inputs.stage = teamsfx_api_1.Stage.validateApplication;
|
|
300
|
+
const context = utils_2.createDriverContext(inputs);
|
|
301
|
+
const teamsAppPackageFilePath = inputs["app-package-file-path"];
|
|
302
|
+
const args = {
|
|
303
|
+
appPackagePath: teamsAppPackageFilePath,
|
|
304
|
+
showMessage: true,
|
|
305
|
+
};
|
|
306
|
+
const driver = typedi_1.Container.get("teamsApp/validateAppPackage");
|
|
307
|
+
return await driver.run(args, context);
|
|
126
308
|
}
|
|
127
309
|
/**
|
|
128
310
|
* v3 only none lifecycle command
|
|
129
311
|
*/
|
|
130
312
|
async createAppPackage(inputs) {
|
|
131
|
-
|
|
313
|
+
var _a, _b, _c;
|
|
314
|
+
inputs.stage = teamsfx_api_1.Stage.createAppPackage;
|
|
315
|
+
const context = utils_2.createDriverContext(inputs);
|
|
316
|
+
const teamsAppManifestFilePath = inputs === null || inputs === void 0 ? void 0 : inputs[questionNames_1.QuestionNames.TeamsAppManifestFilePath];
|
|
317
|
+
const driver = typedi_1.Container.get("teamsApp/zipAppPackage");
|
|
318
|
+
const args = {
|
|
319
|
+
manifestPath: teamsAppManifestFilePath,
|
|
320
|
+
outputZipPath: (_a = inputs[questionNames_1.QuestionNames.OutputZipPathParamName]) !== null && _a !== void 0 ? _a :
|
|
321
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
322
|
+
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}/appPackage.${process.env
|
|
323
|
+
.TEAMSFX_ENV}.zip`,
|
|
324
|
+
outputJsonPath: (_b = inputs[questionNames_1.QuestionNames.OutputManifestParamName]) !== null && _b !== void 0 ? _b :
|
|
325
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
326
|
+
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}/manifest.${process.env
|
|
327
|
+
.TEAMSFX_ENV}.json`,
|
|
328
|
+
};
|
|
329
|
+
const result = await driver.run(args, context);
|
|
330
|
+
if (context.platform === teamsfx_api_1.Platform.VSCode) {
|
|
331
|
+
if (result.isOk()) {
|
|
332
|
+
const isWindows = process.platform === "win32";
|
|
333
|
+
let zipFileName = args.outputZipPath;
|
|
334
|
+
if (!path.isAbsolute(zipFileName)) {
|
|
335
|
+
zipFileName = path.join(context.projectPath, zipFileName);
|
|
336
|
+
}
|
|
337
|
+
let builtSuccess = localizeUtils_1.getLocalizedString("plugins.appstudio.buildSucceedNotice.fallback", zipFileName);
|
|
338
|
+
if (isWindows) {
|
|
339
|
+
const folderLink = url_1.pathToFileURL(path.dirname(zipFileName));
|
|
340
|
+
const appPackageLink = `${constants_1.VSCodeExtensionCommand.openFolder}?%5B%22${folderLink.toString()}%22%5D`;
|
|
341
|
+
builtSuccess = localizeUtils_1.getLocalizedString("plugins.appstudio.buildSucceedNotice", appPackageLink);
|
|
342
|
+
}
|
|
343
|
+
(_c = context.ui) === null || _c === void 0 ? void 0 : _c.showMessage("info", builtSuccess, false);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return result;
|
|
132
347
|
}
|
|
133
348
|
/**
|
|
134
349
|
* get url to preview the app, may prompt to select env, hub and Teams manifest
|
|
@@ -137,13 +352,23 @@ class FxCore {
|
|
|
137
352
|
* @returns the url to preview the app
|
|
138
353
|
*/
|
|
139
354
|
async previewWithManifest(inputs) {
|
|
140
|
-
|
|
355
|
+
inputs.stage = teamsfx_api_1.Stage.previewWithManifest;
|
|
356
|
+
const hub = inputs[questionNames_1.QuestionNames.M365Host];
|
|
357
|
+
const manifestFilePath = inputs[questionNames_1.QuestionNames.TeamsAppManifestFilePath];
|
|
358
|
+
const manifestRes = await ManifestUtils_1.manifestUtils.getManifestV3(manifestFilePath, false);
|
|
359
|
+
if (manifestRes.isErr()) {
|
|
360
|
+
return teamsfx_api_1.err(manifestRes.error);
|
|
361
|
+
}
|
|
362
|
+
const teamsAppId = manifestRes.value.id;
|
|
363
|
+
const capabilities = ManifestUtils_1.manifestUtils.getCapabilities(manifestRes.value);
|
|
364
|
+
const launchHelper = new launchHelper_1.LaunchHelper(globalVars_1.TOOLS.tokenProvider.m365TokenProvider, globalVars_1.TOOLS.logProvider);
|
|
365
|
+
const result = await launchHelper.getLaunchUrl(hub, teamsAppId, capabilities);
|
|
366
|
+
return result;
|
|
141
367
|
}
|
|
142
368
|
/**
|
|
143
369
|
* Warning: this API only works for CLI_HELP, it has no business with interactive run for CLI!
|
|
144
370
|
*/
|
|
145
|
-
|
|
146
|
-
inputs.stage = teamsfx_api_1.Stage.getQuestions;
|
|
371
|
+
getQuestions(stage, inputs) {
|
|
147
372
|
if (stage === teamsfx_api_1.Stage.create) {
|
|
148
373
|
return teamsfx_api_1.ok(create_1.createProjectCliHelpNode());
|
|
149
374
|
}
|
|
@@ -153,7 +378,19 @@ class FxCore {
|
|
|
153
378
|
* get all dot envs
|
|
154
379
|
*/
|
|
155
380
|
async getDotEnvs(inputs) {
|
|
156
|
-
|
|
381
|
+
const envListRes = await envUtil_1.envUtil.listEnv(inputs.projectPath);
|
|
382
|
+
if (envListRes.isErr()) {
|
|
383
|
+
return teamsfx_api_1.err(envListRes.error);
|
|
384
|
+
}
|
|
385
|
+
const res = {};
|
|
386
|
+
for (const env of envListRes.value) {
|
|
387
|
+
const envRes = await envUtil_1.envUtil.readEnv(inputs.projectPath, env, false, false);
|
|
388
|
+
if (envRes.isErr()) {
|
|
389
|
+
return teamsfx_api_1.err(envRes.error);
|
|
390
|
+
}
|
|
391
|
+
res[env] = envRes.value;
|
|
392
|
+
}
|
|
393
|
+
return teamsfx_api_1.ok(res);
|
|
157
394
|
}
|
|
158
395
|
/**
|
|
159
396
|
* given projectPath and filePath, return whether the filePath is a env file
|
|
@@ -178,13 +415,31 @@ class FxCore {
|
|
|
178
415
|
* get projectId
|
|
179
416
|
*/
|
|
180
417
|
async getProjectId(projectPath) {
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
418
|
+
const res = await this.getProjectMetadata(projectPath);
|
|
419
|
+
if (res.isErr()) {
|
|
420
|
+
return teamsfx_api_1.err(res.error);
|
|
421
|
+
}
|
|
422
|
+
return teamsfx_api_1.ok(res.value.projectId || "");
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* @description get projectId and version from yml
|
|
426
|
+
*/
|
|
427
|
+
async getProjectMetadata(projectPath) {
|
|
428
|
+
try {
|
|
429
|
+
const ymlPath = pathUtils_1.pathUtils.getYmlFilePath(projectPath, "dev");
|
|
430
|
+
if (!ymlPath || !(await fs_extra_1.default.pathExists(ymlPath))) {
|
|
431
|
+
return teamsfx_api_1.ok({});
|
|
432
|
+
}
|
|
433
|
+
const ymlContent = await fs_extra_1.default.readFile(ymlPath, "utf-8");
|
|
434
|
+
const ymlObject = yaml_1.parse(ymlContent);
|
|
435
|
+
return teamsfx_api_1.ok({
|
|
436
|
+
projectId: (ymlObject === null || ymlObject === void 0 ? void 0 : ymlObject.projectId) ? ymlObject.projectId.toString() : "",
|
|
437
|
+
version: (ymlObject === null || ymlObject === void 0 ? void 0 : ymlObject.version) ? ymlObject.version.toString() : "",
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
catch (_a) {
|
|
441
|
+
return teamsfx_api_1.ok({});
|
|
185
442
|
}
|
|
186
|
-
const projectModel = maybeProjectModel.value;
|
|
187
|
-
return teamsfx_api_1.ok(projectModel.projectId || "");
|
|
188
443
|
}
|
|
189
444
|
/**
|
|
190
445
|
* get Teams App Name from yml
|
|
@@ -247,22 +502,32 @@ class FxCore {
|
|
|
247
502
|
return teamsfx_api_1.ok(res);
|
|
248
503
|
}
|
|
249
504
|
async grantPermission(inputs) {
|
|
250
|
-
|
|
505
|
+
inputs.stage = teamsfx_api_1.Stage.grantPermission;
|
|
506
|
+
const context = utils_2.createContextV3();
|
|
507
|
+
globalVars_1.setErrorContext({ component: "collaborator" });
|
|
508
|
+
const res = await collaborator_1.grantPermission(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
509
|
+
return res;
|
|
251
510
|
}
|
|
252
511
|
/**
|
|
253
512
|
* none lifecycle command
|
|
254
513
|
*/
|
|
255
514
|
async checkPermission(inputs) {
|
|
256
|
-
|
|
515
|
+
inputs.stage = teamsfx_api_1.Stage.checkPermission;
|
|
516
|
+
const context = utils_2.createContextV3();
|
|
517
|
+
const res = await collaborator_1.checkPermission(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
518
|
+
return res;
|
|
257
519
|
}
|
|
258
520
|
/**
|
|
259
521
|
* none lifecycle command
|
|
260
522
|
*/
|
|
261
523
|
async listCollaborator(inputs) {
|
|
262
|
-
|
|
524
|
+
inputs.stage = teamsfx_api_1.Stage.listCollaborator;
|
|
525
|
+
const context = utils_2.createContextV3();
|
|
526
|
+
const res = await collaborator_1.listCollaborator(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
527
|
+
return res;
|
|
263
528
|
}
|
|
264
|
-
|
|
265
|
-
return teamsfx_api_1.ok(inputs.env); //work for both v2 and v3
|
|
529
|
+
getSelectedEnv(inputs) {
|
|
530
|
+
return Promise.resolve(teamsfx_api_1.ok(inputs.env)); //work for both v2 and v3
|
|
266
531
|
}
|
|
267
532
|
async createLocalCrypto(projectPath) {
|
|
268
533
|
const settingsRes = await settingsUtil_1.settingsUtil.readSettings(projectPath);
|
|
@@ -294,15 +559,93 @@ class FxCore {
|
|
|
294
559
|
return res.value.decrypt(ciphertext);
|
|
295
560
|
}
|
|
296
561
|
async createEnv(inputs) {
|
|
297
|
-
return this.
|
|
562
|
+
return this.createEnvCopyV3(inputs[questionNames_1.QuestionNames.NewTargetEnvName], inputs[questionNames_1.QuestionNames.SourceEnvName], inputs.projectPath);
|
|
563
|
+
}
|
|
564
|
+
async createEnvCopyV3(targetEnvName, sourceEnvName, projectPath) {
|
|
565
|
+
let res = await pathUtils_1.pathUtils.getEnvFilePath(projectPath, sourceEnvName);
|
|
566
|
+
if (res.isErr())
|
|
567
|
+
return teamsfx_api_1.err(res.error);
|
|
568
|
+
const sourceDotEnvFile = res.value;
|
|
569
|
+
res = await pathUtils_1.pathUtils.getEnvFilePath(projectPath, targetEnvName);
|
|
570
|
+
if (res.isErr())
|
|
571
|
+
return teamsfx_api_1.err(res.error);
|
|
572
|
+
const targetDotEnvFile = res.value;
|
|
573
|
+
if (!sourceDotEnvFile || !targetDotEnvFile)
|
|
574
|
+
return teamsfx_api_1.err(new yml_1.YamlFieldMissingError("environmentFolderPath"));
|
|
575
|
+
if (!(await fs_extra_1.default.pathExists(sourceDotEnvFile)))
|
|
576
|
+
return teamsfx_api_1.err(new common_1.FileNotFoundError("createEnvCopyV3", sourceDotEnvFile));
|
|
577
|
+
const source = await fs_extra_1.default.readFile(sourceDotEnvFile);
|
|
578
|
+
const writeStream = fs_extra_1.default.createWriteStream(targetDotEnvFile);
|
|
579
|
+
source
|
|
580
|
+
.toString()
|
|
581
|
+
.split(/\r?\n/)
|
|
582
|
+
.forEach((line) => {
|
|
583
|
+
const reg = /^([a-zA-Z_][a-zA-Z0-9_]*=)/g;
|
|
584
|
+
const match = reg.exec(line);
|
|
585
|
+
if (match) {
|
|
586
|
+
if (match[1].startsWith("TEAMSFX_ENV=")) {
|
|
587
|
+
writeStream.write(`TEAMSFX_ENV=${targetEnvName}${os.EOL}`);
|
|
588
|
+
}
|
|
589
|
+
else {
|
|
590
|
+
writeStream.write(`${match[1]}${os.EOL}`);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
else {
|
|
594
|
+
writeStream.write(`${line.trim()}${os.EOL}`);
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
writeStream.end();
|
|
598
|
+
return teamsfx_api_1.ok(undefined);
|
|
298
599
|
}
|
|
299
600
|
// a phantom migration method for V3
|
|
300
601
|
async phantomMigrationV3(inputs) {
|
|
301
|
-
|
|
602
|
+
// If the project is invalid or upgraded, the ProjectMigratorMWV3 will not take action.
|
|
603
|
+
// Check invaliad/upgraded project here before call ProjectMigratorMWV3
|
|
604
|
+
const projectPath = inputs.projectPath || "";
|
|
605
|
+
const version = await v3MigrationUtils_1.getProjectVersionFromPath(projectPath);
|
|
606
|
+
if (version.source === versionMetadata_1.VersionSource.teamsapp) {
|
|
607
|
+
return teamsfx_api_1.err(new upgrade_1.NoNeedUpgradeError());
|
|
608
|
+
}
|
|
609
|
+
else if (version.source === versionMetadata_1.VersionSource.projectSettings) {
|
|
610
|
+
const isValid = await projectMigratorV3_1.checkActiveResourcePlugins(projectPath);
|
|
611
|
+
if (!isValid) {
|
|
612
|
+
return teamsfx_api_1.err(new common_1.InvalidProjectError());
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
if (version.source === versionMetadata_1.VersionSource.unknown) {
|
|
616
|
+
return teamsfx_api_1.err(new common_1.InvalidProjectError());
|
|
617
|
+
}
|
|
618
|
+
return this.innerMigrationV3(inputs);
|
|
619
|
+
}
|
|
620
|
+
innerMigrationV3(inputs) {
|
|
621
|
+
return teamsfx_api_1.ok(undefined);
|
|
302
622
|
}
|
|
303
623
|
// a project version check
|
|
304
624
|
async projectVersionCheck(inputs) {
|
|
305
|
-
|
|
625
|
+
const projectPath = inputs.projectPath || "";
|
|
626
|
+
if (projectSettingsHelper_1.isValidProjectV3(projectPath) || projectSettingsHelper_1.isValidProjectV2(projectPath)) {
|
|
627
|
+
const versionInfo = await v3MigrationUtils_1.getProjectVersionFromPath(projectPath);
|
|
628
|
+
if (!versionInfo.version) {
|
|
629
|
+
return teamsfx_api_1.err(new common_1.InvalidProjectError());
|
|
630
|
+
}
|
|
631
|
+
const trackingId = await v3MigrationUtils_1.getTrackingIdFromPath(projectPath);
|
|
632
|
+
const isSupport = v3MigrationUtils_1.getVersionState(versionInfo);
|
|
633
|
+
// if the project is upgradeable, check whether the project is valid and invalid project should not show upgrade option.
|
|
634
|
+
if (isSupport === versionMetadata_1.VersionState.upgradeable) {
|
|
635
|
+
if (!(await projectMigratorV3_1.checkActiveResourcePlugins(projectPath))) {
|
|
636
|
+
return teamsfx_api_1.err(new common_1.InvalidProjectError());
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
return teamsfx_api_1.ok({
|
|
640
|
+
currentVersion: versionInfo.version,
|
|
641
|
+
trackingId,
|
|
642
|
+
isSupport,
|
|
643
|
+
versionSource: versionMetadata_1.VersionSource[versionInfo.source],
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
else {
|
|
647
|
+
return teamsfx_api_1.err(new common_1.InvalidProjectError());
|
|
648
|
+
}
|
|
306
649
|
}
|
|
307
650
|
// apply the given yaml template to current project.
|
|
308
651
|
async apply(inputs, templatePath, lifecycleName) {
|
|
@@ -340,22 +683,22 @@ class FxCore {
|
|
|
340
683
|
return this.runLifecycle(lifecycle, driverContext, env);
|
|
341
684
|
}
|
|
342
685
|
else {
|
|
343
|
-
|
|
344
|
-
return teamsfx_api_1.ok(
|
|
686
|
+
driverContext.logProvider.warning(`No definition found for ${lifecycleName}`);
|
|
687
|
+
return teamsfx_api_1.ok(undefined);
|
|
345
688
|
}
|
|
346
689
|
}
|
|
347
690
|
async runLifecycle(lifecycle, driverContext, env) {
|
|
348
691
|
const r = await lifecycle.execute(driverContext);
|
|
349
692
|
const runResult = r.result;
|
|
350
693
|
if (runResult.isOk()) {
|
|
351
|
-
|
|
694
|
+
driverContext.logProvider.info(`Lifecycle ${lifecycle.name} succeeded`);
|
|
352
695
|
const writeResult = await envUtil_1.envUtil.writeEnv(driverContext.projectPath, env, envUtil_1.envUtil.map2object(runResult.value));
|
|
353
|
-
return writeResult.map(() =>
|
|
696
|
+
return writeResult.map(() => undefined);
|
|
354
697
|
}
|
|
355
698
|
else {
|
|
356
699
|
const error = runResult.error;
|
|
357
700
|
if (error.kind === "Failure") {
|
|
358
|
-
|
|
701
|
+
driverContext.logProvider.error(`Failed to run ${lifecycle.name} due to ${error.error.name}: ${error.error.message}`);
|
|
359
702
|
return teamsfx_api_1.err(error.error);
|
|
360
703
|
}
|
|
361
704
|
else {
|
|
@@ -363,11 +706,11 @@ class FxCore {
|
|
|
363
706
|
const failedDriver = error.reason.failedDriver;
|
|
364
707
|
if (error.reason.kind === "UnresolvedPlaceholders") {
|
|
365
708
|
const unresolved = error.reason.unresolvedPlaceHolders;
|
|
366
|
-
|
|
367
|
-
return teamsfx_api_1.ok(
|
|
709
|
+
driverContext.logProvider.warning(`Unresolved placeholders: ${unresolved.join(",")} for driver ${failedDriver.uses}`);
|
|
710
|
+
return teamsfx_api_1.ok(undefined);
|
|
368
711
|
}
|
|
369
712
|
else {
|
|
370
|
-
|
|
713
|
+
driverContext.logProvider.error(`Failed to run ${lifecycle.name} due to ${error.reason.error.name}: ${error.reason.error.message}. Failed driver: ${failedDriver.uses}`);
|
|
371
714
|
return teamsfx_api_1.err(error.reason.error);
|
|
372
715
|
}
|
|
373
716
|
}
|
|
@@ -378,53 +721,454 @@ class FxCore {
|
|
|
378
721
|
}
|
|
379
722
|
}
|
|
380
723
|
async preProvisionForVS(inputs) {
|
|
381
|
-
|
|
724
|
+
const context = utils_2.createDriverContext(inputs);
|
|
725
|
+
return coordinator_1.coordinator.preProvisionForVS(context, inputs);
|
|
382
726
|
}
|
|
383
727
|
async preCheckYmlAndEnvForVS(inputs) {
|
|
384
|
-
|
|
728
|
+
const context = utils_2.createDriverContext(inputs);
|
|
729
|
+
const result = await coordinator_1.coordinator.preCheckYmlAndEnvForVS(context, inputs);
|
|
730
|
+
return result;
|
|
385
731
|
}
|
|
386
732
|
async publishInDeveloperPortal(inputs) {
|
|
387
|
-
|
|
733
|
+
inputs.stage = teamsfx_api_1.Stage.publishInDeveloperPortal;
|
|
734
|
+
const context = utils_2.createContextV3();
|
|
735
|
+
return await coordinator_1.coordinator.publishInDeveloperPortal(context, inputs);
|
|
388
736
|
}
|
|
389
737
|
async copilotPluginAddAPI(inputs) {
|
|
390
|
-
|
|
738
|
+
var _a, _b;
|
|
739
|
+
const operations = inputs[questionNames_1.QuestionNames.ApiOperation];
|
|
740
|
+
const url = (_a = inputs[questionNames_1.QuestionNames.ApiSpecLocation]) !== null && _a !== void 0 ? _a : (_b = inputs.openAIPluginManifest) === null || _b === void 0 ? void 0 : _b.api.url;
|
|
741
|
+
const manifestPath = inputs[questionNames_1.QuestionNames.ManifestPath];
|
|
742
|
+
// Get API spec file path from manifest
|
|
743
|
+
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(manifestPath);
|
|
744
|
+
if (manifestRes.isErr()) {
|
|
745
|
+
return teamsfx_api_1.err(manifestRes.error);
|
|
746
|
+
}
|
|
747
|
+
const apiSpecFile = manifestRes.value.composeExtensions[0].apiSpecFile;
|
|
748
|
+
const outputAPISpecPath = path.join(path.dirname(manifestPath), apiSpecFile);
|
|
749
|
+
const adaptiveCardFolder = path.join(inputs.projectPath, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.AdaptiveFolderName);
|
|
750
|
+
try {
|
|
751
|
+
const specParser = new specParser_1.SpecParser(url);
|
|
752
|
+
await specParser.generate(manifestPath, operations, outputAPISpecPath, adaptiveCardFolder);
|
|
753
|
+
}
|
|
754
|
+
catch (e) {
|
|
755
|
+
let error;
|
|
756
|
+
if (e instanceof specParserError_1.SpecParserError) {
|
|
757
|
+
error = helper_1.convertSpecParserErrorToFxError(e);
|
|
758
|
+
}
|
|
759
|
+
else {
|
|
760
|
+
error = common_1.assembleError(e);
|
|
761
|
+
}
|
|
762
|
+
return teamsfx_api_1.err(error);
|
|
763
|
+
}
|
|
764
|
+
const message = localizeUtils_1.getLocalizedString("core.copilot.addAPI.success", operations, inputs.projectPath);
|
|
765
|
+
await globalVars_1.TOOLS.ui.showMessage("info", message, false);
|
|
766
|
+
return teamsfx_api_1.ok(undefined);
|
|
391
767
|
}
|
|
392
768
|
async copilotPluginLoadOpenAIManifest(inputs) {
|
|
393
|
-
|
|
769
|
+
try {
|
|
770
|
+
return teamsfx_api_1.ok(await helper_1.OpenAIPluginManifestHelper.loadOpenAIPluginManifest(inputs.domain));
|
|
771
|
+
}
|
|
772
|
+
catch (error) {
|
|
773
|
+
return teamsfx_api_1.err(error);
|
|
774
|
+
}
|
|
394
775
|
}
|
|
395
776
|
async copilotPluginListOperations(inputs) {
|
|
396
|
-
return
|
|
777
|
+
return await helper_1.listOperations(utils_2.createContextV3(), inputs.manifest, inputs.apiSpecUrl, inputs[questionNames_1.QuestionNames.ManifestPath], inputs.includeExistingAPIs, inputs.shouldLogWarning);
|
|
397
778
|
}
|
|
398
779
|
}
|
|
399
780
|
tslib_1.__decorate([
|
|
400
|
-
hooks_1.hooks([
|
|
781
|
+
hooks_1.hooks([
|
|
782
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createProject", reset: true }),
|
|
783
|
+
errorHandler_1.ErrorHandlerMW,
|
|
784
|
+
questionMW_1.QuestionMW("createProject"),
|
|
785
|
+
]),
|
|
786
|
+
tslib_1.__metadata("design:type", Function),
|
|
787
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
788
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
789
|
+
], FxCore.prototype, "createProject", null);
|
|
790
|
+
tslib_1.__decorate([
|
|
791
|
+
hooks_1.hooks([
|
|
792
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createSampleProject", reset: true }),
|
|
793
|
+
errorHandler_1.ErrorHandlerMW,
|
|
794
|
+
questionMW_1.QuestionMW("createSampleProject"),
|
|
795
|
+
]),
|
|
796
|
+
tslib_1.__metadata("design:type", Function),
|
|
797
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
798
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
799
|
+
], FxCore.prototype, "createSampleProject", null);
|
|
800
|
+
tslib_1.__decorate([
|
|
801
|
+
hooks_1.hooks([
|
|
802
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "provision", reset: true }),
|
|
803
|
+
errorHandler_1.ErrorHandlerMW,
|
|
804
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
805
|
+
envMW_1.EnvLoaderMW(false),
|
|
806
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
807
|
+
contextInjector_1.ContextInjectorMW,
|
|
808
|
+
envMW_1.EnvWriterMW,
|
|
809
|
+
]),
|
|
810
|
+
tslib_1.__metadata("design:type", Function),
|
|
811
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
812
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
813
|
+
], FxCore.prototype, "provisionResources", null);
|
|
814
|
+
tslib_1.__decorate([
|
|
815
|
+
hooks_1.hooks([
|
|
816
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "deploy", reset: true }),
|
|
817
|
+
errorHandler_1.ErrorHandlerMW,
|
|
818
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
819
|
+
envMW_1.EnvLoaderMW(false),
|
|
820
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
821
|
+
contextInjector_1.ContextInjectorMW,
|
|
822
|
+
envMW_1.EnvWriterMW,
|
|
823
|
+
]),
|
|
824
|
+
tslib_1.__metadata("design:type", Function),
|
|
825
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
826
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
827
|
+
], FxCore.prototype, "deployArtifacts", null);
|
|
828
|
+
tslib_1.__decorate([
|
|
829
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "localDebug", reset: true })]),
|
|
830
|
+
tslib_1.__metadata("design:type", Function),
|
|
831
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
832
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
833
|
+
], FxCore.prototype, "localDebug", null);
|
|
834
|
+
tslib_1.__decorate([
|
|
835
|
+
hooks_1.hooks([
|
|
836
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "deployAadManifest", reset: true }),
|
|
837
|
+
errorHandler_1.ErrorHandlerMW,
|
|
838
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
839
|
+
questionMW_1.QuestionMW("deployAadManifest"),
|
|
840
|
+
envMW_1.EnvLoaderMW(true, true),
|
|
841
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
842
|
+
contextInjector_1.ContextInjectorMW,
|
|
843
|
+
]),
|
|
844
|
+
tslib_1.__metadata("design:type", Function),
|
|
845
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
846
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
847
|
+
], FxCore.prototype, "deployAadManifest", null);
|
|
848
|
+
tslib_1.__decorate([
|
|
849
|
+
hooks_1.hooks([
|
|
850
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "addWebpart", reset: true }),
|
|
851
|
+
errorHandler_1.ErrorHandlerMW,
|
|
852
|
+
questionMW_1.QuestionMW("addWebpart"),
|
|
853
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
854
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
855
|
+
]),
|
|
856
|
+
tslib_1.__metadata("design:type", Function),
|
|
857
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
858
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
859
|
+
], FxCore.prototype, "addWebpart", null);
|
|
860
|
+
tslib_1.__decorate([
|
|
861
|
+
hooks_1.hooks([
|
|
862
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "publish", reset: true }),
|
|
863
|
+
errorHandler_1.ErrorHandlerMW,
|
|
864
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
865
|
+
envMW_1.EnvLoaderMW(false),
|
|
866
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
867
|
+
contextInjector_1.ContextInjectorMW,
|
|
868
|
+
envMW_1.EnvWriterMW,
|
|
869
|
+
]),
|
|
870
|
+
tslib_1.__metadata("design:type", Function),
|
|
871
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
872
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
873
|
+
], FxCore.prototype, "publishApplication", null);
|
|
874
|
+
tslib_1.__decorate([
|
|
875
|
+
hooks_1.hooks([
|
|
876
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "executeUserTask", reset: true }),
|
|
877
|
+
errorHandler_1.ErrorHandlerMW,
|
|
878
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
879
|
+
envMW_1.EnvLoaderMW(false),
|
|
880
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
881
|
+
]),
|
|
882
|
+
tslib_1.__metadata("design:type", Function),
|
|
883
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
884
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
885
|
+
], FxCore.prototype, "executeUserTask", null);
|
|
886
|
+
tslib_1.__decorate([
|
|
887
|
+
hooks_1.hooks([
|
|
888
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "buildAadManifest", reset: true }),
|
|
889
|
+
errorHandler_1.ErrorHandlerMW,
|
|
890
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
891
|
+
envMW_1.EnvLoaderMW(false),
|
|
892
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
893
|
+
]),
|
|
894
|
+
tslib_1.__metadata("design:type", Function),
|
|
895
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
896
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
897
|
+
], FxCore.prototype, "buildAadManifest", null);
|
|
898
|
+
tslib_1.__decorate([
|
|
899
|
+
hooks_1.hooks([
|
|
900
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "deployTeamsManifest", reset: true }),
|
|
901
|
+
errorHandler_1.ErrorHandlerMW,
|
|
902
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
903
|
+
questionMW_1.QuestionMW("selectTeamsAppManifest"),
|
|
904
|
+
envMW_1.EnvLoaderMW(true),
|
|
905
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
906
|
+
contextInjector_1.ContextInjectorMW,
|
|
907
|
+
envMW_1.EnvWriterMW,
|
|
908
|
+
]),
|
|
909
|
+
tslib_1.__metadata("design:type", Function),
|
|
910
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
911
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
912
|
+
], FxCore.prototype, "deployTeamsManifest", null);
|
|
913
|
+
tslib_1.__decorate([
|
|
914
|
+
hooks_1.hooks([
|
|
915
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "validateApplication", reset: true }),
|
|
916
|
+
questionMW_1.QuestionMW("validateTeamsApp"),
|
|
917
|
+
]),
|
|
401
918
|
tslib_1.__metadata("design:type", Function),
|
|
402
919
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
403
920
|
tslib_1.__metadata("design:returntype", Promise)
|
|
404
921
|
], FxCore.prototype, "validateApplication", null);
|
|
405
922
|
tslib_1.__decorate([
|
|
406
|
-
hooks_1.hooks([
|
|
923
|
+
hooks_1.hooks([
|
|
924
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "validateManifest", reset: true }),
|
|
925
|
+
errorHandler_1.ErrorHandlerMW,
|
|
926
|
+
envMW_1.EnvLoaderMW(true),
|
|
927
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
928
|
+
]),
|
|
407
929
|
tslib_1.__metadata("design:type", Function),
|
|
408
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
930
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
931
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
932
|
+
], FxCore.prototype, "validateManifest", null);
|
|
933
|
+
tslib_1.__decorate([
|
|
934
|
+
hooks_1.hooks([
|
|
935
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "validateAppPackage", reset: true }),
|
|
936
|
+
errorHandler_1.ErrorHandlerMW,
|
|
937
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
938
|
+
]),
|
|
939
|
+
tslib_1.__metadata("design:type", Function),
|
|
940
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
941
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
942
|
+
], FxCore.prototype, "validateAppPackage", null);
|
|
943
|
+
tslib_1.__decorate([
|
|
944
|
+
hooks_1.hooks([
|
|
945
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createAppPackage", reset: true }),
|
|
946
|
+
errorHandler_1.ErrorHandlerMW,
|
|
947
|
+
questionMW_1.QuestionMW("selectTeamsAppManifest"),
|
|
948
|
+
envMW_1.EnvLoaderMW(true),
|
|
949
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
950
|
+
]),
|
|
951
|
+
tslib_1.__metadata("design:type", Function),
|
|
952
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
953
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
954
|
+
], FxCore.prototype, "createAppPackage", null);
|
|
955
|
+
tslib_1.__decorate([
|
|
956
|
+
hooks_1.hooks([
|
|
957
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "preview", reset: true }),
|
|
958
|
+
errorHandler_1.ErrorHandlerMW,
|
|
959
|
+
questionMW_1.QuestionMW("previewWithTeamsAppManifest"),
|
|
960
|
+
envMW_1.EnvLoaderMW(false),
|
|
961
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
962
|
+
]),
|
|
963
|
+
tslib_1.__metadata("design:type", Function),
|
|
964
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
965
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
966
|
+
], FxCore.prototype, "previewWithManifest", null);
|
|
967
|
+
tslib_1.__decorate([
|
|
968
|
+
hooks_1.hooks([
|
|
969
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getDotEnvs", reset: true }),
|
|
970
|
+
errorHandler_1.ErrorHandlerMW,
|
|
971
|
+
]),
|
|
972
|
+
tslib_1.__metadata("design:type", Function),
|
|
973
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
974
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
975
|
+
], FxCore.prototype, "getDotEnvs", null);
|
|
976
|
+
tslib_1.__decorate([
|
|
977
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "isEnvFile", reset: true })]),
|
|
978
|
+
tslib_1.__metadata("design:type", Function),
|
|
979
|
+
tslib_1.__metadata("design:paramtypes", [String, String]),
|
|
980
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
981
|
+
], FxCore.prototype, "isEnvFile", null);
|
|
982
|
+
tslib_1.__decorate([
|
|
983
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getProjectId", reset: true })]),
|
|
984
|
+
tslib_1.__metadata("design:type", Function),
|
|
985
|
+
tslib_1.__metadata("design:paramtypes", [String]),
|
|
986
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
987
|
+
], FxCore.prototype, "getProjectId", null);
|
|
988
|
+
tslib_1.__decorate([
|
|
989
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getProjectMetadata", reset: true })]),
|
|
990
|
+
tslib_1.__metadata("design:type", Function),
|
|
991
|
+
tslib_1.__metadata("design:paramtypes", [String]),
|
|
992
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
993
|
+
], FxCore.prototype, "getProjectMetadata", null);
|
|
994
|
+
tslib_1.__decorate([
|
|
995
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getTeamsAppName", reset: true })]),
|
|
996
|
+
tslib_1.__metadata("design:type", Function),
|
|
997
|
+
tslib_1.__metadata("design:paramtypes", [String]),
|
|
998
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
999
|
+
], FxCore.prototype, "getTeamsAppName", null);
|
|
1000
|
+
tslib_1.__decorate([
|
|
1001
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getProjectInfo", reset: true })]),
|
|
1002
|
+
tslib_1.__metadata("design:type", Function),
|
|
1003
|
+
tslib_1.__metadata("design:paramtypes", [String, String]),
|
|
1004
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1005
|
+
], FxCore.prototype, "getProjectInfo", null);
|
|
1006
|
+
tslib_1.__decorate([
|
|
1007
|
+
hooks_1.hooks([
|
|
1008
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "grantPermission", reset: true }),
|
|
1009
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1010
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1011
|
+
questionMW_1.QuestionMW("grantPermission"),
|
|
1012
|
+
envMW_1.EnvLoaderMW(false, true),
|
|
1013
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
1014
|
+
envMW_1.EnvWriterMW,
|
|
1015
|
+
]),
|
|
1016
|
+
tslib_1.__metadata("design:type", Function),
|
|
1017
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1018
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1019
|
+
], FxCore.prototype, "grantPermission", null);
|
|
1020
|
+
tslib_1.__decorate([
|
|
1021
|
+
hooks_1.hooks([
|
|
1022
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "checkPermission", reset: true }),
|
|
1023
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1024
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1025
|
+
envMW_1.EnvLoaderMW(false, true),
|
|
1026
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
1027
|
+
envMW_1.EnvWriterMW,
|
|
1028
|
+
]),
|
|
1029
|
+
tslib_1.__metadata("design:type", Function),
|
|
1030
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1031
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1032
|
+
], FxCore.prototype, "checkPermission", null);
|
|
1033
|
+
tslib_1.__decorate([
|
|
1034
|
+
hooks_1.hooks([
|
|
1035
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "listCollaborator", reset: true }),
|
|
1036
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1037
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1038
|
+
questionMW_1.QuestionMW("listCollaborator"),
|
|
1039
|
+
envMW_1.EnvLoaderMW(false, true),
|
|
1040
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
1041
|
+
envMW_1.EnvWriterMW,
|
|
1042
|
+
]),
|
|
1043
|
+
tslib_1.__metadata("design:type", Function),
|
|
1044
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
409
1045
|
tslib_1.__metadata("design:returntype", Promise)
|
|
410
|
-
], FxCore.prototype, "
|
|
1046
|
+
], FxCore.prototype, "listCollaborator", null);
|
|
411
1047
|
tslib_1.__decorate([
|
|
412
|
-
hooks_1.hooks([
|
|
1048
|
+
hooks_1.hooks([
|
|
1049
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getSelectedEnv", reset: true }),
|
|
1050
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1051
|
+
envMW_1.EnvLoaderMW(false),
|
|
1052
|
+
]),
|
|
413
1053
|
tslib_1.__metadata("design:type", Function),
|
|
414
1054
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
415
1055
|
tslib_1.__metadata("design:returntype", Promise)
|
|
416
1056
|
], FxCore.prototype, "getSelectedEnv", null);
|
|
417
1057
|
tslib_1.__decorate([
|
|
418
|
-
hooks_1.hooks([
|
|
1058
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createLocalCrypto" })]),
|
|
1059
|
+
tslib_1.__metadata("design:type", Function),
|
|
1060
|
+
tslib_1.__metadata("design:paramtypes", [String]),
|
|
1061
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1062
|
+
], FxCore.prototype, "createLocalCrypto", null);
|
|
1063
|
+
tslib_1.__decorate([
|
|
1064
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "encrypt", reset: true }), errorHandler_1.ErrorHandlerMW]),
|
|
419
1065
|
tslib_1.__metadata("design:type", Function),
|
|
420
1066
|
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
421
1067
|
tslib_1.__metadata("design:returntype", Promise)
|
|
422
1068
|
], FxCore.prototype, "encrypt", null);
|
|
423
1069
|
tslib_1.__decorate([
|
|
424
|
-
hooks_1.hooks([errorHandler_1.ErrorHandlerMW]),
|
|
1070
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "decrypt", reset: true }), errorHandler_1.ErrorHandlerMW]),
|
|
425
1071
|
tslib_1.__metadata("design:type", Function),
|
|
426
1072
|
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
427
1073
|
tslib_1.__metadata("design:returntype", Promise)
|
|
428
1074
|
], FxCore.prototype, "decrypt", null);
|
|
1075
|
+
tslib_1.__decorate([
|
|
1076
|
+
hooks_1.hooks([
|
|
1077
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createEnv", reset: true }),
|
|
1078
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1079
|
+
questionMW_1.QuestionMW("createNewEnv"),
|
|
1080
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
1081
|
+
]),
|
|
1082
|
+
tslib_1.__metadata("design:type", Function),
|
|
1083
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1084
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1085
|
+
], FxCore.prototype, "createEnv", null);
|
|
1086
|
+
tslib_1.__decorate([
|
|
1087
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "phantomMigrationV3", reset: true })]),
|
|
1088
|
+
tslib_1.__metadata("design:type", Function),
|
|
1089
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1090
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1091
|
+
], FxCore.prototype, "phantomMigrationV3", null);
|
|
1092
|
+
tslib_1.__decorate([
|
|
1093
|
+
hooks_1.hooks([errorHandler_1.ErrorHandlerMW, projectMigratorV3_1.ProjectMigratorMWV3]),
|
|
1094
|
+
tslib_1.__metadata("design:type", Function),
|
|
1095
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1096
|
+
tslib_1.__metadata("design:returntype", Object)
|
|
1097
|
+
], FxCore.prototype, "innerMigrationV3", null);
|
|
1098
|
+
tslib_1.__decorate([
|
|
1099
|
+
hooks_1.hooks([
|
|
1100
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "projectVersionCheck", reset: true }),
|
|
1101
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1102
|
+
]),
|
|
1103
|
+
tslib_1.__metadata("design:type", Function),
|
|
1104
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1105
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1106
|
+
], FxCore.prototype, "projectVersionCheck", null);
|
|
1107
|
+
tslib_1.__decorate([
|
|
1108
|
+
hooks_1.hooks([
|
|
1109
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "preProvisionForVS" }),
|
|
1110
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1111
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1112
|
+
envMW_1.EnvLoaderMW(false),
|
|
1113
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
1114
|
+
contextInjector_1.ContextInjectorMW,
|
|
1115
|
+
]),
|
|
1116
|
+
tslib_1.__metadata("design:type", Function),
|
|
1117
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1118
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1119
|
+
], FxCore.prototype, "preProvisionForVS", null);
|
|
1120
|
+
tslib_1.__decorate([
|
|
1121
|
+
hooks_1.hooks([
|
|
1122
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "preCheckYmlAndEnvForVS" }),
|
|
1123
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1124
|
+
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1125
|
+
envMW_1.EnvLoaderMW(false),
|
|
1126
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
1127
|
+
contextInjector_1.ContextInjectorMW,
|
|
1128
|
+
]),
|
|
1129
|
+
tslib_1.__metadata("design:type", Function),
|
|
1130
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1131
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1132
|
+
], FxCore.prototype, "preCheckYmlAndEnvForVS", null);
|
|
1133
|
+
tslib_1.__decorate([
|
|
1134
|
+
hooks_1.hooks([
|
|
1135
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "publishInDeveloperPortal" }),
|
|
1136
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1137
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
1138
|
+
contextInjector_1.ContextInjectorMW,
|
|
1139
|
+
]),
|
|
1140
|
+
tslib_1.__metadata("design:type", Function),
|
|
1141
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1142
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1143
|
+
], FxCore.prototype, "publishInDeveloperPortal", null);
|
|
1144
|
+
tslib_1.__decorate([
|
|
1145
|
+
hooks_1.hooks([
|
|
1146
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "copilotPluginAddAPI" }),
|
|
1147
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1148
|
+
questionMW_1.QuestionMW("copilotPluginAddAPI"),
|
|
1149
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
1150
|
+
]),
|
|
1151
|
+
tslib_1.__metadata("design:type", Function),
|
|
1152
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1153
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1154
|
+
], FxCore.prototype, "copilotPluginAddAPI", null);
|
|
1155
|
+
tslib_1.__decorate([
|
|
1156
|
+
hooks_1.hooks([
|
|
1157
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "copilotPluginLoadOpenAIManifest" }),
|
|
1158
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1159
|
+
]),
|
|
1160
|
+
tslib_1.__metadata("design:type", Function),
|
|
1161
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1162
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1163
|
+
], FxCore.prototype, "copilotPluginLoadOpenAIManifest", null);
|
|
1164
|
+
tslib_1.__decorate([
|
|
1165
|
+
hooks_1.hooks([
|
|
1166
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "copilotPluginListOperations" }),
|
|
1167
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1168
|
+
]),
|
|
1169
|
+
tslib_1.__metadata("design:type", Function),
|
|
1170
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1171
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1172
|
+
], FxCore.prototype, "copilotPluginListOperations", null);
|
|
429
1173
|
exports.FxCore = FxCore;
|
|
430
1174
|
//# sourceMappingURL=FxCore.js.map
|