@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
|
@@ -16,45 +16,153 @@ const telemetryEvents_1 = require("../spfx/utils/telemetryEvents");
|
|
|
16
16
|
const specParser_1 = require("../../../common/spec-parser/specParser");
|
|
17
17
|
const questionNames_1 = require("../../../question/questionNames");
|
|
18
18
|
const helper_1 = require("./helper");
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
19
|
+
const interfaces_1 = require("../../../common/spec-parser/interfaces");
|
|
20
|
+
const localizeUtils_1 = require("../../../common/localizeUtils");
|
|
21
|
+
const ManifestUtils_1 = require("../../driver/teamsApp/utils/ManifestUtils");
|
|
22
|
+
const create_1 = require("../../../question/create");
|
|
23
|
+
const fs = tslib_1.__importStar(require("fs-extra"));
|
|
24
|
+
const error_1 = require("../../../error");
|
|
25
|
+
const utils_1 = require("../../../common/spec-parser/utils");
|
|
26
|
+
const constants_1 = require("../../../common/spec-parser/constants");
|
|
27
|
+
const util = tslib_1.__importStar(require("util"));
|
|
28
|
+
const specParserError_1 = require("../../../common/spec-parser/specParserError");
|
|
29
|
+
const fromApiSpeccomponentName = "copilot-plugin-existing-api";
|
|
30
|
+
const fromApiSpecTemplateName = "copilot-plugin-existing-api";
|
|
31
|
+
const fromOpenAIPlugincomponentName = "copilot-plugin-from-oai-plugin";
|
|
32
|
+
const fromOpenAIPluginTemplateName = "copilot-plugin-from-oai-plugin";
|
|
33
|
+
const apiSpecFolderName = "apiSpecificationFiles";
|
|
34
|
+
const apiSpecYamlFileName = "openapi.yaml";
|
|
35
|
+
const apiSpecJsonFileName = "openapi.json";
|
|
36
|
+
const invalidApiSpecErrorName = "invalid-api-spec";
|
|
26
37
|
class CopilotPluginGenerator {
|
|
27
|
-
static async
|
|
38
|
+
static async generateFromApiSpec(context, inputs, destinationPath) {
|
|
39
|
+
return await this.generateForME(context, inputs, destinationPath, fromApiSpecTemplateName, fromApiSpeccomponentName);
|
|
40
|
+
}
|
|
41
|
+
static async generateFromOpenAIPlugin(context, inputs, destinationPath) {
|
|
42
|
+
return await this.generateForME(context, inputs, destinationPath, fromOpenAIPluginTemplateName, fromOpenAIPlugincomponentName);
|
|
43
|
+
}
|
|
44
|
+
static async generateForME(context, inputs, destinationPath, templateName, componentName) {
|
|
28
45
|
var _a, _b;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
try {
|
|
47
|
+
const appName = inputs[questionNames_1.QuestionNames.AppName];
|
|
48
|
+
const language = inputs[questionNames_1.QuestionNames.ProgrammingLanguage];
|
|
49
|
+
const safeProjectNameFromVS = language === "csharp" ? inputs[questionNames_1.QuestionNames.SafeProjectName] : undefined;
|
|
50
|
+
context.templateVariables = generator_1.Generator.getDefaultVariables(appName, safeProjectNameFromVS);
|
|
51
|
+
const filters = inputs[questionNames_1.QuestionNames.ApiOperation];
|
|
52
|
+
// download template
|
|
53
|
+
const templateRes = await generator_1.Generator.generateTemplate(context, destinationPath, templateName, language === create_1.ProgrammingLanguage.CSharp ? create_1.ProgrammingLanguage.CSharp : undefined);
|
|
54
|
+
if (templateRes.isErr())
|
|
55
|
+
return teamsfx_api_1.err(templateRes.error);
|
|
56
|
+
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;
|
|
57
|
+
// validate API spec
|
|
58
|
+
const specParser = new specParser_1.SpecParser(url);
|
|
59
|
+
const validationRes = await specParser.validate();
|
|
60
|
+
const warnings = validationRes.warnings;
|
|
61
|
+
const operationIdWarning = warnings.find((w) => w.type === interfaces_1.WarningType.OperationIdMissing);
|
|
62
|
+
if (operationIdWarning && operationIdWarning.data) {
|
|
63
|
+
const apisMissingOperationId = operationIdWarning.data.filter((api) => filters.includes(api));
|
|
64
|
+
if (apisMissingOperationId.length > 0) {
|
|
65
|
+
operationIdWarning.content = util.format(constants_1.ConstantString.MissingOperationId, apisMissingOperationId.join(", "));
|
|
66
|
+
delete operationIdWarning.data;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
warnings.splice(warnings.indexOf(operationIdWarning), 1);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (validationRes.status === interfaces_1.ValidationStatus.Error) {
|
|
73
|
+
helper_1.logValidationResults(validationRes.errors, warnings, context, true, false, true);
|
|
74
|
+
const errorMessage = inputs.platform === teamsfx_api_1.Platform.VSCode
|
|
75
|
+
? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.vscode.message")
|
|
76
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.message");
|
|
77
|
+
return teamsfx_api_1.err(new teamsfx_api_1.UserError(componentName, invalidApiSpecErrorName, errorMessage, errorMessage));
|
|
78
|
+
}
|
|
79
|
+
// generate files
|
|
80
|
+
const manifestPath = path_1.default.join(destinationPath, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ManifestTemplateFileName);
|
|
81
|
+
const apiSpecFolderPath = path_1.default.join(destinationPath, teamsfx_api_1.AppPackageFolderName, apiSpecFolderName);
|
|
82
|
+
await fs.ensureDir(apiSpecFolderPath);
|
|
83
|
+
let isYaml;
|
|
84
|
+
try {
|
|
85
|
+
isYaml = await utils_1.isYamlSpecFile(url);
|
|
86
|
+
}
|
|
87
|
+
catch (e) {
|
|
88
|
+
isYaml = false;
|
|
89
|
+
}
|
|
90
|
+
const openapiSpecPath = path_1.default.join(apiSpecFolderPath, isYaml ? apiSpecYamlFileName : apiSpecJsonFileName);
|
|
91
|
+
const adaptiveCardFolder = path_1.default.join(destinationPath, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.AdaptiveFolderName);
|
|
92
|
+
const generateResult = await specParser.generate(manifestPath, filters, openapiSpecPath, adaptiveCardFolder);
|
|
93
|
+
if (generateResult.warnings.length > 0) {
|
|
94
|
+
warnings.push(...generateResult.warnings);
|
|
95
|
+
}
|
|
96
|
+
// update manifest based on openAI plugin manifest
|
|
97
|
+
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(manifestPath);
|
|
98
|
+
if (manifestRes.isErr()) {
|
|
99
|
+
return teamsfx_api_1.err(manifestRes.error);
|
|
100
|
+
}
|
|
101
|
+
const teamsManifest = manifestRes.value;
|
|
102
|
+
if (inputs.openAIPluginManifest) {
|
|
103
|
+
const updateManifestRes = await helper_1.OpenAIPluginManifestHelper.updateManifest(inputs.openAIPluginManifest, teamsManifest, manifestPath);
|
|
104
|
+
if (updateManifestRes.isErr())
|
|
105
|
+
return teamsfx_api_1.err(updateManifestRes.error);
|
|
106
|
+
}
|
|
107
|
+
// log warnings
|
|
108
|
+
if (inputs.platform === teamsfx_api_1.Platform.CLI || inputs.platform === teamsfx_api_1.Platform.VS) {
|
|
109
|
+
const warnSummary = helper_1.generateScaffoldingSummary(warnings, teamsManifest, destinationPath);
|
|
110
|
+
if (warnSummary) {
|
|
111
|
+
void context.logProvider.info(warnSummary);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
|
|
115
|
+
return teamsfx_api_1.ok({
|
|
116
|
+
warnings: warnings.map((warning) => {
|
|
117
|
+
return {
|
|
118
|
+
type: warning.type,
|
|
119
|
+
content: warning.content,
|
|
120
|
+
data: warning.data,
|
|
121
|
+
};
|
|
122
|
+
}),
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
return teamsfx_api_1.ok({ warnings: undefined });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
catch (e) {
|
|
130
|
+
let error;
|
|
131
|
+
if (e instanceof specParserError_1.SpecParserError) {
|
|
132
|
+
error = helper_1.convertSpecParserErrorToFxError(e);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
error = error_1.assembleError(e);
|
|
136
|
+
}
|
|
137
|
+
return teamsfx_api_1.err(error);
|
|
41
138
|
}
|
|
42
|
-
// TODO: log warnings
|
|
43
|
-
return teamsfx_api_1.ok(undefined);
|
|
44
139
|
}
|
|
45
140
|
}
|
|
46
141
|
tslib_1.__decorate([
|
|
47
142
|
lib_1.hooks([
|
|
48
143
|
actionExecutionMW_1.ActionExecutionMW({
|
|
49
144
|
enableTelemetry: true,
|
|
50
|
-
telemetryComponentName:
|
|
145
|
+
telemetryComponentName: fromApiSpeccomponentName,
|
|
146
|
+
telemetryEventName: telemetryEvents_1.TelemetryEvents.Generate,
|
|
147
|
+
errorSource: fromApiSpeccomponentName,
|
|
148
|
+
}),
|
|
149
|
+
]),
|
|
150
|
+
tslib_1.__metadata("design:type", Function),
|
|
151
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object, String]),
|
|
152
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
153
|
+
], CopilotPluginGenerator, "generateFromApiSpec", null);
|
|
154
|
+
tslib_1.__decorate([
|
|
155
|
+
lib_1.hooks([
|
|
156
|
+
actionExecutionMW_1.ActionExecutionMW({
|
|
157
|
+
enableTelemetry: true,
|
|
158
|
+
telemetryComponentName: fromOpenAIPlugincomponentName,
|
|
51
159
|
telemetryEventName: telemetryEvents_1.TelemetryEvents.Generate,
|
|
52
|
-
errorSource:
|
|
160
|
+
errorSource: fromOpenAIPlugincomponentName,
|
|
53
161
|
}),
|
|
54
162
|
]),
|
|
55
163
|
tslib_1.__metadata("design:type", Function),
|
|
56
164
|
tslib_1.__metadata("design:paramtypes", [Object, Object, String]),
|
|
57
165
|
tslib_1.__metadata("design:returntype", Promise)
|
|
58
|
-
], CopilotPluginGenerator, "
|
|
166
|
+
], CopilotPluginGenerator, "generateFromOpenAIPlugin", null);
|
|
59
167
|
exports.CopilotPluginGenerator = CopilotPluginGenerator;
|
|
60
168
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/generator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AAEH,+CAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/generator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AAEH,+CAA8C;AAC9C,wDAagC;AAChC,4CAAyC;AACzC,wDAAwB;AACxB,0EAAuE;AACvE,mEAAgE;AAChE,uEAAoE;AACpE,mEAAgE;AAChE,qCAKkB;AAClB,uEAAuF;AACvF,iEAAmE;AACnE,6EAA0E;AAC1E,qDAA+D;AAC/D,qDAA+B;AAC/B,0CAA+C;AAC/C,6DAAmE;AACnE,qEAAuE;AACvE,mDAA6B;AAC7B,iFAA8E;AAE9E,MAAM,wBAAwB,GAAG,6BAA6B,CAAC;AAC/D,MAAM,uBAAuB,GAAG,6BAA6B,CAAC;AAC9D,MAAM,6BAA6B,GAAG,gCAAgC,CAAC;AACvE,MAAM,4BAA4B,GAAG,gCAAgC,CAAC;AACtE,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AAClD,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAC3C,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAE3C,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAMnD,MAAa,sBAAsB;IAS1B,MAAM,CAAC,KAAK,CAAC,mBAAmB,CACrC,OAAgB,EAChB,MAAc,EACd,eAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,aAAa,CAC7B,OAAO,EACP,MAAM,EACN,eAAe,EACf,uBAAuB,EACvB,wBAAwB,CACzB,CAAC;IACJ,CAAC;IAUM,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAC1C,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,CAAC;YAChB,eAAe,EAAE,IAAI;YACrB,sBAAsB,EAAE,wBAAwB;YAChD,kBAAkB,EAAE,iCAAe,CAAC,QAAQ;YAC5C,WAAW,EAAE,wBAAwB;SACtC,CAAC;KACH,CAAC;;;;uDAaD;AAUD;IARC,WAAK,CAAC;QACL,qCAAiB,CAAC;YAChB,eAAe,EAAE,IAAI;YACrB,sBAAsB,EAAE,6BAA6B;YACrD,kBAAkB,EAAE,iCAAe,CAAC,QAAQ;YAC5C,WAAW,EAAE,6BAA6B;SAC3C,CAAC;KACH,CAAC;;;;4DAaD;AA3CH,wDA+LC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @author yuqzho@microsoft.com
|
|
3
3
|
*/
|
|
4
|
-
import { Context, OpenAIPluginManifest, Result } from "@microsoft/teamsfx-api";
|
|
5
|
-
import { ErrorType as ApiSpecErrorType } from "../../../common/spec-parser/interfaces";
|
|
4
|
+
import { Context, FxError, OpenAIPluginManifest, Result, TeamsAppManifest, ApiOperation, Warning } from "@microsoft/teamsfx-api";
|
|
5
|
+
import { ErrorType as ApiSpecErrorType, WarningResult } from "../../../common/spec-parser/interfaces";
|
|
6
|
+
import { SpecParserError } from "../../../common/spec-parser/specParserError";
|
|
6
7
|
declare enum OpenAIPluginManifestErrorType {
|
|
7
|
-
AuthNotSupported =
|
|
8
|
-
ApiUrlMissing =
|
|
8
|
+
AuthNotSupported = "openai-pliugin-auth-not-supported",
|
|
9
|
+
ApiUrlMissing = "openai-plugin-api-url-missing"
|
|
9
10
|
}
|
|
10
11
|
export interface ErrorResult {
|
|
11
12
|
/**
|
|
@@ -16,15 +17,14 @@ export interface ErrorResult {
|
|
|
16
17
|
* The content of the error.
|
|
17
18
|
*/
|
|
18
19
|
content: string;
|
|
19
|
-
/**
|
|
20
|
-
* The api path of the error.
|
|
21
|
-
*/
|
|
22
|
-
apiPath?: string;
|
|
23
20
|
}
|
|
24
|
-
export declare class
|
|
25
|
-
static loadOpenAIPluginManifest(
|
|
26
|
-
static updateManifest(
|
|
21
|
+
export declare class OpenAIPluginManifestHelper {
|
|
22
|
+
static loadOpenAIPluginManifest(input: string): Promise<OpenAIPluginManifest>;
|
|
23
|
+
static updateManifest(openAiPluginManifest: OpenAIPluginManifest, teamsAppManifest: TeamsAppManifest, manifestPath: string): Promise<Result<undefined, FxError>>;
|
|
27
24
|
}
|
|
28
|
-
export declare function listOperations(context: Context, manifest: OpenAIPluginManifest | undefined, apiSpecUrl: string | undefined, shouldLogWarning?: boolean): Promise<Result<
|
|
25
|
+
export declare function listOperations(context: Context, manifest: OpenAIPluginManifest | undefined, apiSpecUrl: string | undefined, teamsManifestPath: string | undefined, includeExistingAPIs?: boolean, shouldLogWarning?: boolean): Promise<Result<ApiOperation[], ErrorResult[]>>;
|
|
26
|
+
export declare function logValidationResults(errors: ErrorResult[], warnings: WarningResult[], context: Context, isApiSpec: boolean, shouldLogWarning: boolean, shouldSkipTelemetry?: boolean): void;
|
|
27
|
+
export declare function generateScaffoldingSummary(warnings: Warning[], teamsManifest: TeamsAppManifest, projectPath: string): string;
|
|
28
|
+
export declare function convertSpecParserErrorToFxError(error: SpecParserError): FxError;
|
|
29
29
|
export {};
|
|
30
30
|
//# sourceMappingURL=helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/helper.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH,OAAO,EACL,OAAO,EAEP,oBAAoB,EACpB,MAAM,
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/helper.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH,OAAO,EACL,OAAO,EACP,OAAO,EAEP,oBAAoB,EACpB,MAAM,EAIN,gBAAgB,EAChB,YAAY,EAEZ,OAAO,EAKR,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,SAAS,IAAI,g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E/E"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.listOperations = exports.
|
|
5
|
+
exports.convertSpecParserErrorToFxError = exports.generateScaffoldingSummary = exports.logValidationResults = exports.listOperations = exports.OpenAIPluginManifestHelper = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
/**
|
|
8
8
|
* @author yuqzho@microsoft.com
|
|
@@ -12,61 +12,247 @@ const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
|
12
12
|
const utils_1 = require("../utils");
|
|
13
13
|
const interfaces_1 = require("../../../common/spec-parser/interfaces");
|
|
14
14
|
const specParser_1 = require("../../../common/spec-parser/specParser");
|
|
15
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
16
|
+
const localizeUtils_1 = require("../../../common/localizeUtils");
|
|
17
|
+
const error_1 = require("../../../error");
|
|
18
|
+
const os_1 = require("os");
|
|
19
|
+
const constant_1 = require("../../configManager/constant");
|
|
20
|
+
const ManifestUtils_1 = require("../../driver/teamsApp/utils/ManifestUtils");
|
|
21
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
22
|
+
const specParserError_1 = require("../../../common/spec-parser/specParserError");
|
|
15
23
|
const manifestFilePath = "/.well-known/ai-plugin.json";
|
|
24
|
+
const componentName = "OpenAIPluginManifestHelper";
|
|
16
25
|
var OpenAIPluginManifestErrorType;
|
|
17
26
|
(function (OpenAIPluginManifestErrorType) {
|
|
18
|
-
OpenAIPluginManifestErrorType[
|
|
19
|
-
OpenAIPluginManifestErrorType[
|
|
27
|
+
OpenAIPluginManifestErrorType["AuthNotSupported"] = "openai-pliugin-auth-not-supported";
|
|
28
|
+
OpenAIPluginManifestErrorType["ApiUrlMissing"] = "openai-plugin-api-url-missing";
|
|
20
29
|
})(OpenAIPluginManifestErrorType || (OpenAIPluginManifestErrorType = {}));
|
|
21
|
-
class
|
|
22
|
-
static async loadOpenAIPluginManifest(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
30
|
+
class OpenAIPluginManifestHelper {
|
|
31
|
+
static async loadOpenAIPluginManifest(input) {
|
|
32
|
+
let path = (input.endsWith("/") ? input.substring(0, input.length - 1) : input) + manifestFilePath;
|
|
33
|
+
if (!input.toLowerCase().startsWith("https://") && !input.toLowerCase().startsWith("http://")) {
|
|
34
|
+
path = "https://" + path;
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
const res = await utils_1.sendRequestWithRetry(async () => {
|
|
38
|
+
return await axios_1.default.get(path);
|
|
39
|
+
}, 3);
|
|
40
|
+
return res.data;
|
|
41
|
+
}
|
|
42
|
+
catch (e) {
|
|
43
|
+
throw new teamsfx_api_1.UserError(componentName, "loadOpenAIPluginManifest", localizeUtils_1.getLocalizedString("error.copilotPlugin.openAiPluginManifest.CannotGetManifest", path), localizeUtils_1.getLocalizedString("error.copilotPlugin.openAiPluginManifest.CannotGetManifest", path));
|
|
44
|
+
}
|
|
28
45
|
}
|
|
29
|
-
static async updateManifest(
|
|
30
|
-
|
|
46
|
+
static async updateManifest(openAiPluginManifest, teamsAppManifest, manifestPath) {
|
|
47
|
+
teamsAppManifest.description.full = openAiPluginManifest.description_for_human;
|
|
48
|
+
teamsAppManifest.description.short = openAiPluginManifest.description_for_human;
|
|
49
|
+
teamsAppManifest.developer.websiteUrl = openAiPluginManifest.legal_info_url;
|
|
50
|
+
teamsAppManifest.developer.privacyUrl = openAiPluginManifest.legal_info_url;
|
|
51
|
+
teamsAppManifest.developer.termsOfUseUrl = openAiPluginManifest.legal_info_url;
|
|
52
|
+
await fs_extra_1.default.writeFile(manifestPath, JSON.stringify(teamsAppManifest, null, "\t"), "utf-8");
|
|
53
|
+
return teamsfx_api_1.ok(undefined);
|
|
31
54
|
}
|
|
32
55
|
}
|
|
33
|
-
exports.
|
|
34
|
-
async function listOperations(context, manifest, apiSpecUrl, shouldLogWarning = true) {
|
|
56
|
+
exports.OpenAIPluginManifestHelper = OpenAIPluginManifestHelper;
|
|
57
|
+
async function listOperations(context, manifest, apiSpecUrl, teamsManifestPath, includeExistingAPIs = true, shouldLogWarning = true) {
|
|
35
58
|
if (manifest) {
|
|
36
|
-
apiSpecUrl = manifest.api.url;
|
|
37
59
|
const errors = validateOpenAIPluginManifest(manifest);
|
|
60
|
+
logValidationResults(errors, [], context, false, shouldLogWarning);
|
|
38
61
|
if (errors.length > 0) {
|
|
39
62
|
return teamsfx_api_1.err(errors);
|
|
40
63
|
}
|
|
64
|
+
apiSpecUrl = manifest.api.url;
|
|
41
65
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
66
|
+
try {
|
|
67
|
+
const specParser = new specParser_1.SpecParser(apiSpecUrl);
|
|
68
|
+
const validationRes = await specParser.validate();
|
|
69
|
+
logValidationResults(validationRes.errors, validationRes.warnings, context, true, shouldLogWarning);
|
|
70
|
+
if (validationRes.status === interfaces_1.ValidationStatus.Error) {
|
|
71
|
+
return teamsfx_api_1.err(validationRes.errors);
|
|
72
|
+
}
|
|
73
|
+
let operations = await specParser.list();
|
|
74
|
+
// Filter out exsiting APIs
|
|
75
|
+
if (!includeExistingAPIs) {
|
|
76
|
+
if (!teamsManifestPath) {
|
|
77
|
+
throw new error_1.MissingRequiredInputError("teamsManifestPath", "inputs");
|
|
78
|
+
}
|
|
79
|
+
const manifest = await ManifestUtils_1.manifestUtils._readAppManifest(teamsManifestPath);
|
|
80
|
+
if (manifest.isOk()) {
|
|
81
|
+
const existingOperationIds = ManifestUtils_1.manifestUtils.getOperationIds(manifest.value);
|
|
82
|
+
const operationMaps = await specParser.listOperationMap();
|
|
83
|
+
const existingOperations = existingOperationIds.map((key) => operationMaps.get(key));
|
|
84
|
+
operations = operations.filter((operation) => !existingOperations.includes(operation));
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
throw manifest.error;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const sortedOperations = sortOperations(operations);
|
|
91
|
+
return teamsfx_api_1.ok(sortedOperations);
|
|
46
92
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
93
|
+
catch (e) {
|
|
94
|
+
if (e instanceof specParserError_1.SpecParserError) {
|
|
95
|
+
throw convertSpecParserErrorToFxError(e);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
throw e;
|
|
50
99
|
}
|
|
51
100
|
}
|
|
52
|
-
const operations = await specParser.list();
|
|
53
|
-
return teamsfx_api_1.ok(operations);
|
|
54
101
|
}
|
|
55
102
|
exports.listOperations = listOperations;
|
|
103
|
+
function sortOperations(operations) {
|
|
104
|
+
const operationsWithSeparator = [];
|
|
105
|
+
for (const operation of operations) {
|
|
106
|
+
const arr = operation.toUpperCase().split(" ");
|
|
107
|
+
operationsWithSeparator.push({ id: operation, label: operation, groupName: arr[0] });
|
|
108
|
+
}
|
|
109
|
+
return operationsWithSeparator.sort((operation1, operation2) => {
|
|
110
|
+
const arr1 = operation1.id.toLowerCase().split(" ");
|
|
111
|
+
const arr2 = operation2.id.toLowerCase().split(" ");
|
|
112
|
+
return arr1[0] < arr2[0] ? -1 : arr1[0] > arr2[0] ? 1 : arr1[1].localeCompare(arr2[1]);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function formatTelemetryValidationProperty(result) {
|
|
116
|
+
return result.type.toString() + ": " + result.content;
|
|
117
|
+
}
|
|
118
|
+
function logValidationResults(errors, warnings, context, isApiSpec, shouldLogWarning, shouldSkipTelemetry = false) {
|
|
119
|
+
if (!shouldSkipTelemetry) {
|
|
120
|
+
context.telemetryReporter.sendTelemetryEvent(isApiSpec ? "validate-api-spec" /* validateApiSpec */ : "validate-openai-plugin-manifest" /* validateOpenAiPluginManifest */, {
|
|
121
|
+
["validation-status" /* validationStatus */]: errors.length !== 0 ? "error" : warnings.length !== 0 ? "warning" : "success",
|
|
122
|
+
["validation-errors" /* validationErrors */]: errors
|
|
123
|
+
.map((error) => formatTelemetryValidationProperty(error))
|
|
124
|
+
.join(";"),
|
|
125
|
+
["validation-warnings" /* validationWarnings */]: warnings
|
|
126
|
+
.map((warn) => formatTelemetryValidationProperty(warn))
|
|
127
|
+
.join(";"),
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
if (errors.length === 0 && (warnings.length === 0 || !shouldLogWarning)) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
// errors > 0 || (warnings > 0 && shouldLogWarning)
|
|
134
|
+
const errorMessage = errors
|
|
135
|
+
.map((error) => {
|
|
136
|
+
return `${constant_1.SummaryConstant.Failed} ${error.content}`;
|
|
137
|
+
})
|
|
138
|
+
.join(os_1.EOL);
|
|
139
|
+
const warningMessage = shouldLogWarning
|
|
140
|
+
? warnings
|
|
141
|
+
.map((warning) => {
|
|
142
|
+
return `${constant_1.SummaryConstant.NotExecuted} ${warning.content}`;
|
|
143
|
+
})
|
|
144
|
+
.join(os_1.EOL)
|
|
145
|
+
: "";
|
|
146
|
+
const failed = errors.length;
|
|
147
|
+
const warns = warnings.length;
|
|
148
|
+
const summaryStr = [];
|
|
149
|
+
if (failed > 0) {
|
|
150
|
+
summaryStr.push(localizeUtils_1.getLocalizedString("core.copilotPlugin.validate.summary.validate.failed", failed));
|
|
151
|
+
}
|
|
152
|
+
if (warns > 0 && shouldLogWarning) {
|
|
153
|
+
summaryStr.push(localizeUtils_1.getLocalizedString("core.copilotPlugin.validate.summary.validate.warning", warns));
|
|
154
|
+
}
|
|
155
|
+
const outputMessage = isApiSpec
|
|
156
|
+
? os_1.EOL +
|
|
157
|
+
localizeUtils_1.getLocalizedString("core.copilotPlugin.validate.apiSpec.summary", summaryStr.join(", "), errorMessage, warningMessage)
|
|
158
|
+
: os_1.EOL +
|
|
159
|
+
localizeUtils_1.getLocalizedString("core.copilotPlugin.validate.openAIPluginManifest.summary", summaryStr.join(", "), errorMessage, warningMessage);
|
|
160
|
+
void context.logProvider.info(outputMessage);
|
|
161
|
+
}
|
|
162
|
+
exports.logValidationResults = logValidationResults;
|
|
56
163
|
function validateOpenAIPluginManifest(manifest) {
|
|
164
|
+
var _a, _b;
|
|
57
165
|
const errors = [];
|
|
58
|
-
if (!manifest.api.url) {
|
|
166
|
+
if (!((_a = manifest.api) === null || _a === void 0 ? void 0 : _a.url)) {
|
|
59
167
|
errors.push({
|
|
60
168
|
type: OpenAIPluginManifestErrorType.ApiUrlMissing,
|
|
61
|
-
content: "
|
|
169
|
+
content: localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.validationError.missingApiUrl", "api.url"),
|
|
62
170
|
});
|
|
63
171
|
}
|
|
64
|
-
if (manifest.auth.type !== teamsfx_api_1.OpenAIManifestAuthType.None) {
|
|
172
|
+
if (((_b = manifest.auth) === null || _b === void 0 ? void 0 : _b.type) !== teamsfx_api_1.OpenAIManifestAuthType.None) {
|
|
65
173
|
errors.push({
|
|
66
174
|
type: OpenAIPluginManifestErrorType.AuthNotSupported,
|
|
67
|
-
content: "
|
|
175
|
+
content: localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.validationError.authNotSupported", "none"),
|
|
68
176
|
});
|
|
69
177
|
}
|
|
70
178
|
return errors;
|
|
71
179
|
}
|
|
180
|
+
function generateScaffoldingSummary(warnings, teamsManifest, projectPath) {
|
|
181
|
+
const apiSpecWarningMessage = formatApiSpecValidationWarningMessage(warnings);
|
|
182
|
+
const manifestWarningResult = validateTeamsManifestLength(teamsManifest, projectPath, warnings);
|
|
183
|
+
const manifestWarningMessage = manifestWarningResult.map((warn) => {
|
|
184
|
+
return `${constant_1.SummaryConstant.NotExecuted} ${warn}`;
|
|
185
|
+
});
|
|
186
|
+
if (apiSpecWarningMessage || manifestWarningMessage.length) {
|
|
187
|
+
let details = "";
|
|
188
|
+
if (apiSpecWarningMessage) {
|
|
189
|
+
details += os_1.EOL + apiSpecWarningMessage;
|
|
190
|
+
}
|
|
191
|
+
if (manifestWarningMessage.length) {
|
|
192
|
+
details += os_1.EOL + manifestWarningMessage.join(os_1.EOL);
|
|
193
|
+
}
|
|
194
|
+
return localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary", details);
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
return "";
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
exports.generateScaffoldingSummary = generateScaffoldingSummary;
|
|
201
|
+
function formatApiSpecValidationWarningMessage(specWarnings) {
|
|
202
|
+
const apiSpecWarning = specWarnings.length > 0 && specWarnings[0].type === interfaces_1.WarningType.OperationIdMissing
|
|
203
|
+
? `${constant_1.SummaryConstant.NotExecuted} ${specWarnings[0].content}`
|
|
204
|
+
: "";
|
|
205
|
+
return apiSpecWarning
|
|
206
|
+
? localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.operationId", apiSpecWarning, teamsfx_api_1.ManifestTemplateFileName)
|
|
207
|
+
: "";
|
|
208
|
+
}
|
|
209
|
+
function validateTeamsManifestLength(teamsManifest, projectPath, warnings) {
|
|
210
|
+
var _a, _b, _c, _d;
|
|
211
|
+
const nameShortLimit = 30;
|
|
212
|
+
const nameFullLimit = 100;
|
|
213
|
+
const descriptionShortLimit = 80;
|
|
214
|
+
const descriptionFullLimit = 4000;
|
|
215
|
+
const resultWarnings = [];
|
|
216
|
+
// validate name
|
|
217
|
+
if (teamsManifest.name.short.length > nameShortLimit) {
|
|
218
|
+
resultWarnings.push(formatLengthExceedingErrorMessage("/name/short", nameShortLimit));
|
|
219
|
+
}
|
|
220
|
+
if (!!teamsManifest.name.full && ((_a = teamsManifest.name.full) === null || _a === void 0 ? void 0 : _a.length) > nameFullLimit) {
|
|
221
|
+
resultWarnings.push(formatLengthExceedingErrorMessage("/name/full", nameFullLimit));
|
|
222
|
+
}
|
|
223
|
+
// validate description
|
|
224
|
+
if (teamsManifest.description.short.length > descriptionShortLimit) {
|
|
225
|
+
resultWarnings.push(formatLengthExceedingErrorMessage("/description/short", descriptionShortLimit));
|
|
226
|
+
}
|
|
227
|
+
if (!((_b = teamsManifest.description.full) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
228
|
+
resultWarnings.push(localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.missingFullDescription") +
|
|
229
|
+
localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.mitigation", "full/description", path_1.default.join(teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ManifestTemplateFileName)));
|
|
230
|
+
}
|
|
231
|
+
if (teamsManifest.description.full.length > descriptionFullLimit) {
|
|
232
|
+
resultWarnings.push(formatLengthExceedingErrorMessage("/description/full", descriptionFullLimit));
|
|
233
|
+
}
|
|
234
|
+
// validate card
|
|
235
|
+
if (teamsfx_api_1.ManifestUtil.parseCommonProperties(teamsManifest).isCopilotPlugin) {
|
|
236
|
+
const commands = ((_c = teamsManifest.composeExtensions) === null || _c === void 0 ? void 0 : _c[0]).commands;
|
|
237
|
+
for (const command of commands) {
|
|
238
|
+
if (command.type === "query") {
|
|
239
|
+
if (!command.apiResponseRenderingTemplateFile) {
|
|
240
|
+
const errorDetail = (_d = warnings.find((w) => w.type === interfaces_1.WarningType.GenerateCardFailed && w.data === command.id)) === null || _d === void 0 ? void 0 : _d.content;
|
|
241
|
+
resultWarnings.push(localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.missingCardTemlate", "apiResponseRenderingTemplateFile", command.id) +
|
|
242
|
+
localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.missingCardTemlate.mitigation", teamsfx_api_1.AppPackageFolderName, `composeExtensions/commands/${command.id}/apiResponseRenderingTemplateFile`, path_1.default.join(teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ManifestTemplateFileName)) +
|
|
243
|
+
(errorDetail ? os_1.EOL + errorDetail : ""));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return resultWarnings;
|
|
249
|
+
}
|
|
250
|
+
function formatLengthExceedingErrorMessage(field, limit) {
|
|
251
|
+
return (localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.lengthExceeding", field, limit.toString()) +
|
|
252
|
+
localizeUtils_1.getLocalizedString("core.copilotPlugin.scaffold.summary.warning.teamsManifest.mitigation", field, path_1.default.join(teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ManifestTemplateFileName)));
|
|
253
|
+
}
|
|
254
|
+
function convertSpecParserErrorToFxError(error) {
|
|
255
|
+
return new teamsfx_api_1.SystemError("SpecParser", error.errorType.toString(), error.message, error.message);
|
|
256
|
+
}
|
|
257
|
+
exports.convertSpecParserErrorToFxError = convertSpecParserErrorToFxError;
|
|
72
258
|
//# sourceMappingURL=helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/helper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AAEH,
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../src/component/generator/copilotPlugin/helper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AAEH,wDAiBgC;AAChC,0DAA6C;AAC7C,oCAAgD;AAChD,uEAKgD;AAChD,uEAAoE;AACpE,gEAA0B;AAC1B,iEAAmE;AACnE,0CAA2D;AAC3D,2BAAyB;AACzB,2DAA+D;AAC/D,6EAA0E;AAC1E,wDAAwB;AACxB,iFAA8E;AAE9E,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AACvD,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAanD,IAAK,6BAGJ;AAHD,WAAK,6BAA6B;IAChC,uFAAsD,CAAA;IACtD,gFAA+C,CAAA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EAEC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { BaseComponentInnerError } from "../error/componentError";
|
|
2
2
|
export declare class CancelDownloading extends Error {
|
|
3
3
|
}
|
|
4
|
+
export declare class SampleNotFoundError extends BaseComponentInnerError {
|
|
5
|
+
constructor(templateName: string);
|
|
6
|
+
}
|
|
7
|
+
export declare class TemplateNotFoundError extends BaseComponentInnerError {
|
|
8
|
+
constructor(templateName: string);
|
|
9
|
+
}
|
|
4
10
|
export declare class TemplateZipFallbackError extends BaseComponentInnerError {
|
|
5
11
|
constructor();
|
|
6
12
|
}
|
|
@@ -17,7 +23,7 @@ export declare class ParseUrlError extends BaseComponentInnerError {
|
|
|
17
23
|
constructor(url: string);
|
|
18
24
|
}
|
|
19
25
|
export declare class FetchZipFromUrlError extends BaseComponentInnerError {
|
|
20
|
-
constructor(url: string);
|
|
26
|
+
constructor(url: string, error?: Error);
|
|
21
27
|
}
|
|
22
28
|
export declare class MissKeyError extends BaseComponentInnerError {
|
|
23
29
|
constructor(keyName: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/component/generator/error.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,qBAAa,wBAAyB,SAAQ,uBAAuB;;CASpE;AAED,qBAAa,UAAW,SAAQ,uBAAuB;;CAMtD;AAED,qBAAa,0BAA2B,SAAQ,uBAAuB;gBACzD,GAAG,EAAE,MAAM;CASxB;AAED,qBAAa,2BAA4B,SAAQ,uBAAuB;gBAC1D,GAAG,EAAE,MAAM;CASxB;AAED,qBAAa,aAAc,SAAQ,uBAAuB;gBAC5C,GAAG,EAAE,MAAM;CAGxB;AAED,qBAAa,oBAAqB,SAAQ,uBAAuB;gBACnD,GAAG,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"error.d.ts","source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