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