@microsoft/teamsfx-core 2.0.4-alpha.bdda88800.0 → 2.0.4-alpha.ceeb9e1b9.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 +5 -5
- package/build/common/deps-checker/util/cpUtils.js.map +1 -1
- package/build/common/deps-checker/util/fileHelper.d.ts.map +1 -1
- package/build/common/deps-checker/util/fileHelper.js +2 -0
- package/build/common/deps-checker/util/fileHelper.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/jsonUtils.d.ts.map +1 -1
- package/build/common/jsonUtils.js +2 -0
- package/build/common/jsonUtils.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 +52 -13
- 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 +60 -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 +19 -1
- package/build/common/spec-parser/constants.d.ts.map +1 -1
- package/build/common/spec-parser/constants.js +43 -1
- package/build/common/spec-parser/constants.js.map +1 -1
- package/build/common/spec-parser/interfaces.d.ts +72 -14
- package/build/common/spec-parser/interfaces.d.ts.map +1 -1
- package/build/common/spec-parser/interfaces.js +21 -10
- 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 +119 -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 +15 -5
- package/build/common/spec-parser/specParser.d.ts.map +1 -1
- package/build/common/spec-parser/specParser.js +183 -34
- package/build/common/spec-parser/specParser.js.map +1 -1
- package/build/common/spec-parser/utils.d.ts +28 -0
- package/build/common/spec-parser/utils.d.ts.map +1 -0
- package/build/common/spec-parser/utils.js +242 -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 +40 -15
- package/build/common/telemetry.js.map +1 -1
- package/build/common/tools.js +2 -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/constant.d.ts.map +1 -1
- package/build/component/configManager/constant.js +4 -2
- package/build/component/configManager/constant.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 +2 -3
- 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 +27 -53
- 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 +17 -9
- 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 +4 -12
- package/build/component/configManager/validator.js.map +1 -1
- package/build/component/constants.d.ts +10 -0
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +10 -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 +85 -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 +4 -1
- package/build/component/coordinator/summary.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +7 -7
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/create.d.ts +1 -0
- package/build/component/driver/aad/create.d.ts.map +1 -1
- package/build/component/driver/aad/create.js +2 -5
- package/build/component/driver/aad/create.js.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.d.ts +3 -0
- package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.js +14 -2
- package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
- package/build/component/driver/aad/interface/AADApplication.js +1 -1
- package/build/component/driver/aad/interface/AADApplication.js.map +1 -1
- package/build/component/driver/aad/interface/AADManifest.js +1 -1
- package/build/component/driver/aad/interface/AADManifest.js.map +1 -1
- package/build/component/driver/aad/update.d.ts +1 -0
- package/build/component/driver/aad/update.d.ts.map +1 -1
- package/build/component/driver/aad/update.js +2 -5
- package/build/component/driver/aad/update.js.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.js +58 -13
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.js +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.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.d.ts.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.js +9 -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 +1 -0
- package/build/component/driver/botAadApp/create.d.ts.map +1 -1
- package/build/component/driver/botAadApp/create.js +4 -7
- package/build/component/driver/botAadApp/create.js.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts +1 -0
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.js +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 +33 -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 +3 -3
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +43 -29
- 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/results.d.ts.map +1 -1
- package/build/component/driver/teamsApp/results.js +2 -0
- package/build/component/driver/teamsApp/results.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +6 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +19 -2
- package/build/component/driver/teamsApp/utils/ManifestUtils.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 +2 -10
- 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 +53 -24
- 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/config/projectProperties.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.js +2 -0
- package/build/component/generator/officeAddin/config/projectProperties.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.js +2 -0
- package/build/component/generator/officeAddin/config/projectsJsonData.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 +11 -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 +2 -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.d.ts.map +1 -1
- package/build/component/migrate.js +2 -0
- 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.d.ts.map +1 -1
- package/build/component/utils/charsetUtils.js +5 -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/common.d.ts.map +1 -1
- package/build/component/utils/depsChecker/common.js +1 -1
- package/build/component/utils/depsChecker/common.js.map +1 -1
- package/build/component/utils/depsChecker/cpUtils.d.ts.map +1 -1
- package/build/component/utils/depsChecker/cpUtils.js +9 -5
- package/build/component/utils/depsChecker/cpUtils.js.map +1 -1
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +4 -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 +18 -4
- package/build/component/utils/metadataUtil.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts.map +1 -1
- package/build/component/utils/pathUtils.js +2 -0
- package/build/component/utils/pathUtils.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 -32
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +823 -63
- 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/index.js +1 -0
- package/build/core/index.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/arm.d.ts.map +1 -1
- package/build/error/arm.js +2 -0
- package/build/error/arm.js.map +1 -1
- package/build/error/azure.d.ts.map +1 -1
- package/build/error/azure.js +2 -0
- package/build/error/azure.js.map +1 -1
- package/build/error/common.d.ts +8 -2
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +129 -22
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +2 -0
- package/build/error/deploy.js.map +1 -1
- package/build/error/index.d.ts.map +1 -1
- package/build/error/index.js +2 -0
- package/build/error/index.js.map +1 -1
- package/build/error/m365.d.ts.map +1 -1
- package/build/error/m365.js +2 -0
- package/build/error/m365.js.map +1 -1
- package/build/error/script.d.ts.map +1 -1
- package/build/error/script.js +2 -0
- package/build/error/script.js.map +1 -1
- package/build/error/upgrade.d.ts.map +1 -1
- package/build/error/upgrade.js +2 -0
- package/build/error/upgrade.js.map +1 -1
- package/build/error/yml.d.ts.map +1 -1
- package/build/error/yml.js +2 -0
- package/build/error/yml.js.map +1 -1
- package/build/failpoint/index.d.ts.map +1 -1
- package/build/failpoint/index.js +2 -0
- package/build/failpoint/index.js.map +1 -1
- package/build/failpoint/marker.d.ts.map +1 -1
- package/build/failpoint/marker.js +2 -0
- package/build/failpoint/marker.js.map +1 -1
- package/build/failpoint/runtime.d.ts.map +1 -1
- package/build/failpoint/runtime.js +3 -4
- package/build/failpoint/runtime.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 +4 -0
- package/build/question/constants.d.ts.map +1 -0
- package/build/question/constants.js +12 -0
- package/build/question/constants.js.map +1 -0
- package/build/question/create.d.ts +14 -15
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +465 -313
- 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 +18 -28
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +18 -44
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/CreateEnvInputs.d.ts +14 -0
- package/build/question/inputs/CreateEnvInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateEnvInputs.js +5 -0
- package/build/question/inputs/CreateEnvInputs.js.map +1 -0
- package/build/question/inputs/CreateProjectInputs.d.ts +40 -0
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateProjectInputs.js +5 -0
- package/build/question/inputs/CreateProjectInputs.js.map +1 -0
- package/build/question/inputs/CreateSampleProjectInputs.d.ts +12 -0
- package/build/question/inputs/CreateSampleProjectInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateSampleProjectInputs.js +5 -0
- package/build/question/inputs/CreateSampleProjectInputs.js.map +1 -0
- package/build/question/inputs/DeployAadManifestInputs.d.ts +14 -0
- package/build/question/inputs/DeployAadManifestInputs.d.ts.map +1 -0
- package/build/question/inputs/DeployAadManifestInputs.js +5 -0
- package/build/question/inputs/DeployAadManifestInputs.js.map +1 -0
- package/build/question/inputs/PermissionGrantInputs.d.ts +18 -0
- package/build/question/inputs/PermissionGrantInputs.d.ts.map +1 -0
- package/build/question/inputs/PermissionGrantInputs.js +5 -0
- package/build/question/inputs/PermissionGrantInputs.js.map +1 -0
- package/build/question/inputs/PermissionListInputs.d.ts +16 -0
- package/build/question/inputs/PermissionListInputs.d.ts.map +1 -0
- package/build/question/inputs/PermissionListInputs.js +5 -0
- package/build/question/inputs/PermissionListInputs.js.map +1 -0
- package/build/question/inputs/PreviewTeamsAppInputs.d.ts +14 -0
- package/build/question/inputs/PreviewTeamsAppInputs.d.ts.map +1 -0
- package/build/question/inputs/PreviewTeamsAppInputs.js +5 -0
- package/build/question/inputs/PreviewTeamsAppInputs.js.map +1 -0
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts +18 -0
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts.map +1 -0
- package/build/question/inputs/SPFxAddWebpartInputs.js +5 -0
- package/build/question/inputs/SPFxAddWebpartInputs.js.map +1 -0
- package/build/question/inputs/SelectTeamsManifestInputs.d.ts +12 -0
- package/build/question/inputs/SelectTeamsManifestInputs.d.ts.map +1 -0
- package/build/question/inputs/SelectTeamsManifestInputs.js +5 -0
- package/build/question/inputs/SelectTeamsManifestInputs.js.map +1 -0
- package/build/question/inputs/ValidateTeamsAppInputs.d.ts +14 -0
- package/build/question/inputs/ValidateTeamsAppInputs.d.ts.map +1 -0
- package/build/question/inputs/ValidateTeamsAppInputs.js +5 -0
- package/build/question/inputs/ValidateTeamsAppInputs.js.map +1 -0
- package/build/question/inputs/index.d.ts +11 -0
- package/build/question/inputs/index.d.ts.map +1 -0
- package/build/question/inputs/index.js +16 -0
- package/build/question/inputs/index.js.map +1 -0
- package/build/question/options/CreateEnvOptions.d.ts +10 -0
- package/build/question/options/CreateEnvOptions.d.ts.map +1 -0
- package/build/question/options/CreateEnvOptions.js +24 -0
- package/build/question/options/CreateEnvOptions.js.map +1 -0
- package/build/question/options/CreateProjectOptions.d.ts +10 -0
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -0
- package/build/question/options/CreateProjectOptions.js +137 -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 +37 -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 +13 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +134 -26
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +7 -2
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +11 -3
- package/build/question/questionNames.js.map +1 -1
- package/build/question/util.d.ts.map +1 -1
- package/build/question/util.js +2 -2
- package/build/question/util.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 +58 -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 -47
- 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 -43
- package/build/core/FxCoreImplementV3.d.ts.map +0 -1
- package/build/core/FxCoreImplementV3.js +0 -653
- package/build/core/FxCoreImplementV3.js.map +0 -1
|
@@ -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;AACjD,CAAC,EAHI,6BAA6B,KAA7B,6BAA6B,QAGjC;AAcD,MAAa,0BAA0B;IACrC,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAa;QACjD,IAAI,IAAI,GACN,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC;QAC1F,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI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,kCAAkB,CAChB,8EAA8E,EAC9E,kCAAkC,EAClC,OAAO,CAAC,EAAE,CACX;wBACC,kCAAkB,CAChB,yFAAyF,EACzF,kCAAoB,EACpB,8BAA8B,OAAO,CAAC,EAAE,mCAAmC,EAC3E,cAAI,CAAC,IAAI,CAAC,kCAAoB,EAAE,sCAAwB,CAAC,CAC1D;wBACD,CAAC,WAAW,CAAC,CAAC,CAAC,QAAG,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CACzC,CAAC;iBACH;aACF;SACF;KACF;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,SAAS,iCAAiC,CAAC,KAAa,EAAE,KAAa;IACrE,OAAO,CACL,kCAAkB,CAChB,2EAA2E,EAC3E,KAAK,EACL,KAAK,CAAC,QAAQ,EAAE,CACjB;QACD,kCAAkB,CAChB,sEAAsE,EACtE,KAAK,EACL,cAAI,CAAC,IAAI,CAAC,kCAAoB,EAAE,sCAAwB,CAAC,CAC1D,CACF,CAAC;AACJ,CAAC;AAED,SAAgB,+BAA+B,CAAC,KAAsB;IACpE,OAAO,IAAI,yBAAW,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;AACjG,CAAC;AAFD,0EAEC"}
|
|
@@ -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","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,mBAAoB,SAAQ,uBAAuB;gBAClD,YAAY,EAAE,MAAM;CASjC;AAED,qBAAa,qBAAsB,SAAQ,uBAAuB;gBACpD,YAAY,EAAE,MAAM;CASjC;AAED,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,EAAE,KAAK,CAAC,EAAE,KAAK;CAavC;AAED,qBAAa,YAAa,SAAQ,uBAAuB;gBAC3C,OAAO,EAAE,MAAM;CAG5B"}
|
|
@@ -2,12 +2,24 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.MissKeyError = exports.FetchZipFromUrlError = exports.ParseUrlError = exports.DownloadSampleApiLimitError = exports.DownloadSampleNetworkError = exports.UnzipError = exports.TemplateZipFallbackError = exports.CancelDownloading = void 0;
|
|
5
|
+
exports.MissKeyError = exports.FetchZipFromUrlError = exports.ParseUrlError = exports.DownloadSampleApiLimitError = exports.DownloadSampleNetworkError = exports.UnzipError = exports.TemplateZipFallbackError = exports.TemplateNotFoundError = exports.SampleNotFoundError = exports.CancelDownloading = void 0;
|
|
6
6
|
const componentError_1 = require("../error/componentError");
|
|
7
7
|
const constant_1 = require("./constant");
|
|
8
8
|
class CancelDownloading extends Error {
|
|
9
9
|
}
|
|
10
10
|
exports.CancelDownloading = CancelDownloading;
|
|
11
|
+
class SampleNotFoundError extends componentError_1.BaseComponentInnerError {
|
|
12
|
+
constructor(templateName) {
|
|
13
|
+
super(constant_1.errorSource, "SystemError", "SampleNotFoundError", "error.generator.SampleNotFoundError", [templateName]);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.SampleNotFoundError = SampleNotFoundError;
|
|
17
|
+
class TemplateNotFoundError extends componentError_1.BaseComponentInnerError {
|
|
18
|
+
constructor(templateName) {
|
|
19
|
+
super(constant_1.errorSource, "SystemError", "TemplateNotFoundError", "error.generator.TemplateNotFoundError", [templateName]);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.TemplateNotFoundError = TemplateNotFoundError;
|
|
11
23
|
class TemplateZipFallbackError extends componentError_1.BaseComponentInnerError {
|
|
12
24
|
constructor() {
|
|
13
25
|
super(constant_1.errorSource, "SystemError", "TemplateZipFallbackError", "error.generator.TemplateZipFallbackError");
|
|
@@ -41,8 +53,8 @@ class ParseUrlError extends componentError_1.BaseComponentInnerError {
|
|
|
41
53
|
}
|
|
42
54
|
exports.ParseUrlError = ParseUrlError;
|
|
43
55
|
class FetchZipFromUrlError extends componentError_1.BaseComponentInnerError {
|
|
44
|
-
constructor(url) {
|
|
45
|
-
super(constant_1.errorSource, "SystemError", "FetchZipFromUrlError", "error.generator.FetchZipFromUrlError", [url], ["plugins.frontend.checkNetworkTip"]);
|
|
56
|
+
constructor(url, error) {
|
|
57
|
+
super(constant_1.errorSource, "SystemError", "FetchZipFromUrlError", "error.generator.FetchZipFromUrlError", [url], ["plugins.frontend.checkNetworkTip"], undefined, undefined, error);
|
|
46
58
|
}
|
|
47
59
|
}
|
|
48
60
|
exports.FetchZipFromUrlError = FetchZipFromUrlError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/component/generator/error.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,4DAAkE;AAClE,yCAAyC;AAEzC,MAAa,iBAAkB,SAAQ,KAAK;CAAG;AAA/C,8CAA+C;AAE/C,MAAa,wBAAyB,SAAQ,wCAAuB;IACnE;QACE,KAAK,CACH,sBAAW,EACX,aAAa,EACb,0BAA0B,EAC1B,0CAA0C,CAC3C,CAAC;IACJ,CAAC;CACF;AATD,4DASC;AAED,MAAa,UAAW,SAAQ,wCAAuB;IACrD;QACE,KAAK,CAAC,sBAAW,EAAE,aAAa,EAAE,YAAY,EAAE,4BAA4B,EAAE,SAAS,EAAE;YACvF,wCAAwC;SACzC,CAAC,CAAC;IACL,CAAC;CACF;AAND,gCAMC;AAED,MAAa,0BAA2B,SAAQ,wCAAuB;IACrE,YAAY,GAAW;QACrB,KAAK,CACH,sBAAW,EACX,WAAW,EACX,4BAA4B,EAC5B,4CAA4C,EAC5C,CAAC,GAAG,CAAC,CACN,CAAC;IACJ,CAAC;CACF;AAVD,gEAUC;AAED,MAAa,2BAA4B,SAAQ,wCAAuB;IACtE,YAAY,GAAW;QACrB,KAAK,CACH,sBAAW,EACX,WAAW,EACX,6BAA6B,EAC7B,6CAA6C,EAC7C,CAAC,GAAG,CAAC,CACN,CAAC;IACJ,CAAC;CACF;AAVD,kEAUC;AAED,MAAa,aAAc,SAAQ,wCAAuB;IACxD,YAAY,GAAW;QACrB,KAAK,CAAC,sBAAW,EAAE,aAAa,EAAE,eAAe,EAAE,+BAA+B,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7F,CAAC;CACF;AAJD,sCAIC;AAED,MAAa,oBAAqB,SAAQ,wCAAuB;IAC/D,YAAY,GAAW;
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/component/generator/error.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,4DAAkE;AAClE,yCAAyC;AAEzC,MAAa,iBAAkB,SAAQ,KAAK;CAAG;AAA/C,8CAA+C;AAE/C,MAAa,mBAAoB,SAAQ,wCAAuB;IAC9D,YAAY,YAAoB;QAC9B,KAAK,CACH,sBAAW,EACX,aAAa,EACb,qBAAqB,EACrB,qCAAqC,EACrC,CAAC,YAAY,CAAC,CACf,CAAC;IACJ,CAAC;CACF;AAVD,kDAUC;AAED,MAAa,qBAAsB,SAAQ,wCAAuB;IAChE,YAAY,YAAoB;QAC9B,KAAK,CACH,sBAAW,EACX,aAAa,EACb,uBAAuB,EACvB,uCAAuC,EACvC,CAAC,YAAY,CAAC,CACf,CAAC;IACJ,CAAC;CACF;AAVD,sDA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,8BAA8B,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/F,CAAC;CACF;AAJD,oCAIC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/component/generator/generator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/component/generator/generator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAW,MAAM,wBAAwB,CAAC;AAO3E,OAAO,EAAE,aAAa,EAAqB,MAAM,iCAAiC,CAAC;AAiBnF,OAAO,EAEL,eAAe,EAEf,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAG3B,qBAAa,SAAS;WACN,mBAAmB,CAC/B,OAAO,EAAE,MAAM,EACf,qBAAqB,CAAC,EAAE,MAAM,GAC7B;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;WAoBR,gBAAgB,CAClC,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;WA0ClB,cAAc,CAChC,GAAG,EAAE,OAAO,EACZ,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,EAClB,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;mBAwBjB,QAAQ;CAiB9B;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,KAAK,GACX,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,KAAK,GACX,OAAO,CAAC,IAAI,CAAC,CAoBf"}
|
|
@@ -28,31 +28,36 @@ class Generator {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
static async generateTemplate(ctx, destinationPath, scenario, language, actionContext) {
|
|
31
|
-
var _a, _b;
|
|
31
|
+
var _a, _b, _c;
|
|
32
32
|
const replaceMap = (_a = ctx.templateVariables) !== null && _a !== void 0 ? _a : {};
|
|
33
33
|
const generatorContext = {
|
|
34
34
|
name: language !== null && language !== void 0 ? language : constant_1.commonTemplateName,
|
|
35
|
-
relativePath: `${scenario}/`,
|
|
36
35
|
destination: destinationPath,
|
|
37
36
|
logProvider: ctx.logProvider,
|
|
38
|
-
fileNameReplaceFn: (fileName, fileData) => utils_2.renderTemplateFileName(fileName, fileData, replaceMap),
|
|
37
|
+
fileNameReplaceFn: (fileName, fileData) => utils_2.renderTemplateFileName(fileName, fileData, replaceMap).replace(`${scenario}/`, ""),
|
|
39
38
|
fileDataReplaceFn: (fileName, fileData) => utils_2.renderTemplateFileData(fileName, fileData, replaceMap),
|
|
39
|
+
filterFn: (fileName) => fileName.startsWith(`${scenario}/`),
|
|
40
40
|
onActionError: templateDefaultOnActionError,
|
|
41
41
|
};
|
|
42
|
+
const templateName = `${scenario}-${generatorContext.name}`;
|
|
42
43
|
lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
|
|
43
|
-
[telemetry_1.TelemetryProperty.TemplateName]:
|
|
44
|
+
[telemetry_1.TelemetryProperty.TemplateName]: templateName,
|
|
44
45
|
});
|
|
45
|
-
await ((_b = actionContext === null || actionContext === void 0 ? void 0 : actionContext.progressBar) === null || _b === void 0 ? void 0 : _b.next(messages_1.ProgressMessages.generateTemplate
|
|
46
|
+
await ((_b = actionContext === null || actionContext === void 0 ? void 0 : actionContext.progressBar) === null || _b === void 0 ? void 0 : _b.next(messages_1.ProgressMessages.generateTemplate));
|
|
47
|
+
ctx.logProvider.verbose(`Downloading app template "${templateName}" to ${destinationPath}`);
|
|
46
48
|
await this.generate(generatorContext, generatorAction_1.TemplateActionSeq);
|
|
47
49
|
lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
|
|
48
50
|
[telemetry_1.TelemetryProperty.Fallback]: generatorContext.fallback ? "true" : "false", // Track fallback cases.
|
|
49
51
|
});
|
|
52
|
+
if (!((_c = generatorContext.outputs) === null || _c === void 0 ? void 0 : _c.length)) {
|
|
53
|
+
return teamsfx_api_1.err(new error_1.TemplateNotFoundError(scenario).toFxError());
|
|
54
|
+
}
|
|
50
55
|
return teamsfx_api_1.ok(undefined);
|
|
51
56
|
}
|
|
52
57
|
static async generateSample(ctx, destinationPath, sampleName, actionContext) {
|
|
53
|
-
var _a;
|
|
58
|
+
var _a, _b;
|
|
54
59
|
lodash_1.merge(actionContext === null || actionContext === void 0 ? void 0 : actionContext.telemetryProps, {
|
|
55
|
-
[telemetry_1.TelemetryProperty.
|
|
60
|
+
[telemetry_1.TelemetryProperty.SampleAppName]: sampleName,
|
|
56
61
|
[telemetry_1.TelemetryProperty.SampleDownloadDirectory]: "true",
|
|
57
62
|
});
|
|
58
63
|
const sample = utils_2.getSampleInfoFromName(sampleName);
|
|
@@ -61,13 +66,16 @@ class Generator {
|
|
|
61
66
|
name: sampleName,
|
|
62
67
|
destination: destinationPath,
|
|
63
68
|
logProvider: ctx.logProvider,
|
|
64
|
-
url: sample.
|
|
69
|
+
url: sample.downloadUrl,
|
|
65
70
|
timeoutInMs: constant_1.sampleDefaultTimeoutInMs,
|
|
66
71
|
onActionError: sampleDefaultOnActionError,
|
|
67
72
|
};
|
|
68
73
|
await ((_a = actionContext === null || actionContext === void 0 ? void 0 : actionContext.progressBar) === null || _a === void 0 ? void 0 : _a.next(messages_1.ProgressMessages.generateSample(sampleName)));
|
|
69
|
-
|
|
70
|
-
await this.generate(generatorContext,
|
|
74
|
+
ctx.logProvider.verbose(`Downloading sample "${sampleName}" to ${destinationPath}`);
|
|
75
|
+
await this.generate(generatorContext, generatorAction_1.DownloadDirectoryActionSeq);
|
|
76
|
+
if (!((_b = generatorContext.outputs) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
77
|
+
return teamsfx_api_1.err(new error_1.SampleNotFoundError(sampleName).toFxError());
|
|
78
|
+
}
|
|
71
79
|
return teamsfx_api_1.ok(undefined);
|
|
72
80
|
}
|
|
73
81
|
static async generate(context, actions) {
|
|
@@ -92,7 +100,7 @@ tslib_1.__decorate([
|
|
|
92
100
|
lib_1.hooks([
|
|
93
101
|
actionExecutionMW_1.ActionExecutionMW({
|
|
94
102
|
enableProgressBar: true,
|
|
95
|
-
progressTitle: messages_1.ProgressTitles.
|
|
103
|
+
progressTitle: messages_1.ProgressTitles.create,
|
|
96
104
|
progressSteps: 1,
|
|
97
105
|
componentName: constant_1.componentName,
|
|
98
106
|
errorSource: constant_1.errorSource,
|
|
@@ -108,7 +116,7 @@ tslib_1.__decorate([
|
|
|
108
116
|
lib_1.hooks([
|
|
109
117
|
actionExecutionMW_1.ActionExecutionMW({
|
|
110
118
|
enableProgressBar: true,
|
|
111
|
-
progressTitle: messages_1.ProgressTitles.
|
|
119
|
+
progressTitle: messages_1.ProgressTitles.create,
|
|
112
120
|
progressSteps: 1,
|
|
113
121
|
componentName: constant_1.componentName,
|
|
114
122
|
errorSource: constant_1.errorSource,
|
|
@@ -121,29 +129,30 @@ tslib_1.__decorate([
|
|
|
121
129
|
tslib_1.__metadata("design:returntype", Promise)
|
|
122
130
|
], Generator, "generateSample", null);
|
|
123
131
|
exports.Generator = Generator;
|
|
124
|
-
|
|
132
|
+
function templateDefaultOnActionError(action, context, error) {
|
|
125
133
|
switch (action.name) {
|
|
126
134
|
case generatorAction_1.GeneratorActionName.FetchTemplateUrlWithTag:
|
|
127
135
|
case generatorAction_1.GeneratorActionName.FetchZipFromUrl:
|
|
128
136
|
context.cancelDownloading = true;
|
|
129
137
|
if (!(error instanceof error_1.CancelDownloading)) {
|
|
130
|
-
|
|
131
|
-
|
|
138
|
+
context.logProvider.info(error.message);
|
|
139
|
+
context.logProvider.info(messages_1.LogMessages.getTemplateFromLocal);
|
|
132
140
|
}
|
|
133
141
|
break;
|
|
134
142
|
case generatorAction_1.GeneratorActionName.FetchTemplateZipFromLocal:
|
|
135
|
-
|
|
136
|
-
|
|
143
|
+
context.logProvider.error(error.message);
|
|
144
|
+
return Promise.reject(new error_1.TemplateZipFallbackError().toFxError());
|
|
137
145
|
case generatorAction_1.GeneratorActionName.Unzip:
|
|
138
|
-
|
|
139
|
-
|
|
146
|
+
context.logProvider.error(error.message);
|
|
147
|
+
return Promise.reject(new error_1.UnzipError().toFxError());
|
|
140
148
|
default:
|
|
141
|
-
|
|
149
|
+
return Promise.reject(new Error(error.message));
|
|
142
150
|
}
|
|
151
|
+
return Promise.resolve();
|
|
143
152
|
}
|
|
144
153
|
exports.templateDefaultOnActionError = templateDefaultOnActionError;
|
|
145
154
|
async function sampleDefaultOnActionError(action, context, error) {
|
|
146
|
-
|
|
155
|
+
context.logProvider.error(error.message);
|
|
147
156
|
switch (action.name) {
|
|
148
157
|
case generatorAction_1.GeneratorActionName.DownloadDirectory:
|
|
149
158
|
if (await fs_extra_1.default.pathExists(context.destination)) {
|
|
@@ -158,7 +167,7 @@ async function sampleDefaultOnActionError(action, context, error) {
|
|
|
158
167
|
throw new error_1.DownloadSampleNetworkError(context.url).toFxError();
|
|
159
168
|
}
|
|
160
169
|
case generatorAction_1.GeneratorActionName.FetchZipFromUrl:
|
|
161
|
-
throw new error_1.FetchZipFromUrlError(context.url).toFxError();
|
|
170
|
+
throw new error_1.FetchZipFromUrlError(context.url, error).toFxError();
|
|
162
171
|
case generatorAction_1.GeneratorActionName.Unzip:
|
|
163
172
|
throw new error_1.UnzipError().toFxError();
|
|
164
173
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../src/component/generator/generator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,+CAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../src/component/generator/generator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,+CAA8C;AAC9C,wDAA2E;AAC3E,gEAA0B;AAC1B,mCAA+B;AAC/B,sDAA2E;AAC3E,8CAA+D;AAC/D,4DAAkE;AAClE,0CAA4E;AAC5E,uEAAmF;AACnF,yCAKoB;AACpB,mCASiB;AACjB,uDAM2B;AAC3B,mCAAgG;AAEhG,MAAa,SAAS;IACb,MAAM,CAAC,mBAAmB,CAC/B,OAAe,EACf,qBAA8B;QAE9B,MAAM,eAAe,GAAG,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,iCAAyB,CAAC,OAAO,CAAC,CAAC;QACpF,OAAO;YACL,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,OAAO;YACpB,eAAe,EAAE,eAAe;YAChC,wBAAwB,EAAE,eAAe,CAAC,iBAAiB,EAAE;SAC9D,CAAC;IACJ,CAAC;IAYM,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAClC,GAAY,EACZ,eAAuB,EACvB,QAAgB,EAChB,QAAiB,EACjB,aAA6B;;QAE7B,MAAM,UAAU,GAAG,MAAA,GAAG,CAAC,iBAAiB,mCAAI,EAAE,CAAC;QAC/C,MAAM,gBAAgB,GAAqB;YACzC,IAAI,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,6BAAkB;YACpC,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,iBAAiB,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,CACxC,8BAAsB,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,GAAG,QAAQ,GAAG,EAAE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Y,wCAAuB;gBAAE,MAAM,KAAK,CAAC,SAAS,EAAE,CAAC;iBACjE,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gBACtC,MAAM,IAAI,mCAA2B,CAAC,OAAO,CAAC,GAAI,CAAC,CAAC,SAAS,EAAE,CAAC;aACjE;iBAAM;gBACL,MAAM,IAAI,kCAA0B,CAAC,OAAO,CAAC,GAAI,CAAC,CAAC,SAAS,EAAE,CAAC;aAChE;QACH,KAAK,qCAAmB,CAAC,eAAe;YACtC,MAAM,IAAI,4BAAoB,CAAC,OAAO,CAAC,GAAI,EAAE,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC;QAClE,KAAK,qCAAmB,CAAC,KAAK;YAC5B,MAAM,IAAI,kBAAU,EAAE,CAAC,SAAS,EAAE,CAAC;QACrC;YACE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KAClC;AACH,CAAC;AAxBD,gEAwBC"}
|
|
@@ -7,11 +7,12 @@ export interface GeneratorContext {
|
|
|
7
7
|
logProvider: LogProvider;
|
|
8
8
|
tryLimits?: number;
|
|
9
9
|
timeoutInMs?: number;
|
|
10
|
-
relativePath?: string;
|
|
11
10
|
url?: string;
|
|
12
11
|
zip?: AdmZip;
|
|
13
12
|
fallback?: boolean;
|
|
14
13
|
cancelDownloading?: boolean;
|
|
14
|
+
outputs?: string[];
|
|
15
|
+
filterFn?: (name: string) => boolean;
|
|
15
16
|
fileNameReplaceFn?: (name: string, data: Buffer) => string;
|
|
16
17
|
fileDataReplaceFn?: (name: string, data: Buffer) => Buffer | string;
|
|
17
18
|
onActionStart?: (action: GeneratorAction, context: GeneratorContext) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatorAction.d.ts","sourceRoot":"","sources":["../../../src/component/generator/generatorAction.ts"],"names":[],"mappings":";AAGA,OAAO,MAAM,MAAM,SAAS,CAAC;AAO7B,OAAO,EAAE,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