@microsoft/teamsfx-core 2.0.4-alpha.bdda88800.0 → 2.0.4-alpha.d636c02fa.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 +44 -30
- 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 +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/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 +3 -11
- 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 +466 -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 +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 +13 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +136 -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 +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 -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
package/build/question/create.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
2
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createProjectCliHelpNode = exports.createProjectQuestionNode = exports.apiOperationQuestion = exports.RuntimeOptions = exports.appNameQuestion = exports.AppNamePattern = exports.programmingLanguageQuestion = exports.ProgrammingLanguage = exports.getLanguageOptions = exports.
|
|
5
|
+
exports.createProjectCliHelpNode = exports.createSampleProjectQuestionNode = exports.createProjectQuestionNode = exports.capabilitySubTree = exports.apiOperationQuestion = exports.openAIPluginManifestLocationQuestion = exports.apiSpecLocationQuestion = exports.RuntimeOptions = exports.appNameQuestion = exports.AppNamePattern = exports.folderQuestion = exports.programmingLanguageQuestion = exports.ProgrammingLanguage = exports.getLanguageOptions = exports.officeAddinHostingQuestion = exports.getTemplate = exports.SPFxImportFolderQuestion = exports.SPFxVersionOptionIds = exports.SPFxWebpartNameQuestion = exports.SPFxPackageSelectQuestion = exports.NotificationTriggerOptions = exports.CapabilityOptions = exports.ProjectTypeOptions = exports.ScratchOptions = void 0;
|
|
4
6
|
const tslib_1 = require("tslib");
|
|
5
7
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
6
8
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
@@ -8,7 +10,6 @@ const jsonschema = tslib_1.__importStar(require("jsonschema"));
|
|
|
8
10
|
const lodash_1 = require("lodash");
|
|
9
11
|
const os = tslib_1.__importStar(require("os"));
|
|
10
12
|
const path = tslib_1.__importStar(require("path"));
|
|
11
|
-
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
12
13
|
const constants_1 = require("../common/constants");
|
|
13
14
|
const featureFlags_1 = require("../common/featureFlags");
|
|
14
15
|
const localizeUtils_1 = require("../common/localizeUtils");
|
|
@@ -16,16 +17,17 @@ const samples_1 = require("../common/samples");
|
|
|
16
17
|
const utils_1 = require("../common/utils");
|
|
17
18
|
const developerPortalScaffoldUtils_1 = require("../component/developerPortalScaffoldUtils");
|
|
18
19
|
const utils_2 = require("../component/driver/teamsApp/utils/utils");
|
|
20
|
+
const helper_1 = require("../component/generator/copilotPlugin/helper");
|
|
19
21
|
const projectsJsonData_1 = tslib_1.__importDefault(require("../component/generator/officeAddin/config/projectsJsonData"));
|
|
20
22
|
const error_1 = require("../component/generator/spfx/error");
|
|
21
23
|
const spfxGenerator_1 = require("../component/generator/spfx/spfxGenerator");
|
|
22
24
|
const constants_2 = require("../component/generator/spfx/utils/constants");
|
|
23
25
|
const utils_3 = require("../component/generator/spfx/utils/utils");
|
|
26
|
+
const utils_4 = require("../component/utils");
|
|
27
|
+
const error_2 = require("../error");
|
|
24
28
|
const questionNames_1 = require("./questionNames");
|
|
25
29
|
const util_1 = require("./util");
|
|
26
|
-
const
|
|
27
|
-
const helper_1 = require("../component/generator/copilotPlugin/helper");
|
|
28
|
-
const utils_4 = require("../component/utils");
|
|
30
|
+
const constants_3 = require("./constants");
|
|
29
31
|
class ScratchOptions {
|
|
30
32
|
static yes() {
|
|
31
33
|
return {
|
|
@@ -84,19 +86,6 @@ class ProjectTypeOptions {
|
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
exports.ProjectTypeOptions = ProjectTypeOptions;
|
|
87
|
-
function scratchOrSampleQuestion() {
|
|
88
|
-
const staticOptions = ScratchOptions.all();
|
|
89
|
-
return {
|
|
90
|
-
type: "singleSelect",
|
|
91
|
-
name: questionNames_1.QuestionNames.Scratch,
|
|
92
|
-
title: localizeUtils_1.getLocalizedString("core.getCreateNewOrFromSampleQuestion.title"),
|
|
93
|
-
staticOptions,
|
|
94
|
-
default: ScratchOptions.yes().id,
|
|
95
|
-
placeholder: localizeUtils_1.getLocalizedString("core.getCreateNewOrFromSampleQuestion.placeholder"),
|
|
96
|
-
skipSingleOption: true,
|
|
97
|
-
forgetLastValue: true,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
89
|
function projectTypeQuestion() {
|
|
101
90
|
const staticOptions = [
|
|
102
91
|
ProjectTypeOptions.bot(),
|
|
@@ -128,7 +117,7 @@ function projectTypeQuestion() {
|
|
|
128
117
|
];
|
|
129
118
|
}
|
|
130
119
|
if (developerPortalScaffoldUtils_1.isFromDevPortal(inputs)) {
|
|
131
|
-
const projectType = (_a = developerPortalScaffoldUtils_1.
|
|
120
|
+
const projectType = (_a = developerPortalScaffoldUtils_1.getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.projectType;
|
|
132
121
|
if (projectType) {
|
|
133
122
|
return [projectType];
|
|
134
123
|
}
|
|
@@ -147,18 +136,16 @@ class CapabilityOptions {
|
|
|
147
136
|
// bot
|
|
148
137
|
static basicBot() {
|
|
149
138
|
return {
|
|
150
|
-
id: "
|
|
139
|
+
id: "bot",
|
|
151
140
|
label: `${localizeUtils_1.getLocalizedString("core.BotNewUIOption.label")}`,
|
|
152
|
-
cliName: "bot",
|
|
153
141
|
detail: localizeUtils_1.getLocalizedString("core.BotNewUIOption.detail"),
|
|
154
142
|
};
|
|
155
143
|
}
|
|
156
144
|
static notificationBot() {
|
|
157
145
|
return {
|
|
158
146
|
// For default option, id and cliName must be the same
|
|
159
|
-
id: "
|
|
147
|
+
id: "notification",
|
|
160
148
|
label: `${localizeUtils_1.getLocalizedString("core.NotificationOption.label")}`,
|
|
161
|
-
cliName: "notification",
|
|
162
149
|
detail: localizeUtils_1.getLocalizedString("core.NotificationOption.detail"),
|
|
163
150
|
data: "https://aka.ms/teamsfx-send-notification",
|
|
164
151
|
buttons: [
|
|
@@ -175,7 +162,6 @@ class CapabilityOptions {
|
|
|
175
162
|
// id must match cli `yargsHelp`
|
|
176
163
|
id: "command-bot",
|
|
177
164
|
label: `${localizeUtils_1.getLocalizedString("core.CommandAndResponseOption.label")}`,
|
|
178
|
-
cliName: "command-bot",
|
|
179
165
|
detail: localizeUtils_1.getLocalizedString("core.CommandAndResponseOption.detail"),
|
|
180
166
|
data: "https://aka.ms/teamsfx-create-command",
|
|
181
167
|
buttons: [
|
|
@@ -192,7 +178,6 @@ class CapabilityOptions {
|
|
|
192
178
|
// id must match cli `yargsHelp`
|
|
193
179
|
id: "workflow-bot",
|
|
194
180
|
label: `${localizeUtils_1.getLocalizedString("core.WorkflowOption.label")}`,
|
|
195
|
-
cliName: "workflow-bot",
|
|
196
181
|
detail: localizeUtils_1.getLocalizedString("core.WorkflowOption.detail"),
|
|
197
182
|
data: "https://aka.ms/teamsfx-create-workflow",
|
|
198
183
|
buttons: [
|
|
@@ -218,27 +203,24 @@ class CapabilityOptions {
|
|
|
218
203
|
//tab
|
|
219
204
|
static nonSsoTab() {
|
|
220
205
|
return {
|
|
221
|
-
id: "
|
|
206
|
+
id: "tab-non-sso",
|
|
222
207
|
label: `${localizeUtils_1.getLocalizedString("core.TabNonSso.label")}`,
|
|
223
|
-
cliName: "tab-non-sso",
|
|
224
208
|
detail: localizeUtils_1.getLocalizedString("core.TabNonSso.detail"),
|
|
225
209
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
|
|
226
210
|
};
|
|
227
211
|
}
|
|
228
212
|
static tab() {
|
|
229
213
|
return {
|
|
230
|
-
id: "
|
|
214
|
+
id: "tab",
|
|
231
215
|
label: localizeUtils_1.getLocalizedString("core.TabOption.label"),
|
|
232
|
-
cliName: "tab",
|
|
233
216
|
description: localizeUtils_1.getLocalizedString("core.TabOption.description"),
|
|
234
217
|
detail: localizeUtils_1.getLocalizedString("core.TabOption.detail"),
|
|
235
218
|
};
|
|
236
219
|
}
|
|
237
220
|
static m365SsoLaunchPage() {
|
|
238
221
|
return {
|
|
239
|
-
id: "
|
|
222
|
+
id: "sso-launch-page",
|
|
240
223
|
label: `${localizeUtils_1.getLocalizedString("core.M365SsoLaunchPageOptionItem.label")}`,
|
|
241
|
-
cliName: "sso-launch-page",
|
|
242
224
|
detail: localizeUtils_1.getLocalizedString("core.M365SsoLaunchPageOptionItem.detail"),
|
|
243
225
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
|
|
244
226
|
};
|
|
@@ -247,7 +229,6 @@ class CapabilityOptions {
|
|
|
247
229
|
return {
|
|
248
230
|
id: "dashboard-tab",
|
|
249
231
|
label: `${localizeUtils_1.getLocalizedString("core.DashboardOption.label")}`,
|
|
250
|
-
cliName: "dashboard-tab",
|
|
251
232
|
detail: localizeUtils_1.getLocalizedString("core.DashboardOption.detail"),
|
|
252
233
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
|
|
253
234
|
data: "https://aka.ms/teamsfx-dashboard-app",
|
|
@@ -262,9 +243,8 @@ class CapabilityOptions {
|
|
|
262
243
|
}
|
|
263
244
|
static SPFxTab() {
|
|
264
245
|
return {
|
|
265
|
-
id: "
|
|
246
|
+
id: "tab-spfx",
|
|
266
247
|
label: localizeUtils_1.getLocalizedString("core.TabSPFxOption.labelNew"),
|
|
267
|
-
cliName: "tab-spfx",
|
|
268
248
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlookM365"),
|
|
269
249
|
detail: localizeUtils_1.getLocalizedString("core.TabSPFxOption.detailNew"),
|
|
270
250
|
};
|
|
@@ -272,46 +252,58 @@ class CapabilityOptions {
|
|
|
272
252
|
//message extension
|
|
273
253
|
static linkUnfurling() {
|
|
274
254
|
return {
|
|
275
|
-
id: "
|
|
255
|
+
id: "link-unfurling",
|
|
276
256
|
label: `${localizeUtils_1.getLocalizedString("core.LinkUnfurlingOption.label")}`,
|
|
277
|
-
cliName: "link-unfurling",
|
|
278
257
|
detail: localizeUtils_1.getLocalizedString("core.LinkUnfurlingOption.detail"),
|
|
279
258
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlook"),
|
|
280
259
|
};
|
|
281
260
|
}
|
|
282
261
|
static m365SearchMe() {
|
|
283
262
|
return {
|
|
284
|
-
id: "
|
|
263
|
+
id: "search-app",
|
|
285
264
|
label: `${localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.label")}`,
|
|
286
|
-
cliName: "search-app",
|
|
287
265
|
detail: localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.detail"),
|
|
288
266
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.worksInOutlook"),
|
|
289
267
|
};
|
|
290
268
|
}
|
|
269
|
+
static SearchMe() {
|
|
270
|
+
return {
|
|
271
|
+
id: "search-message-extension",
|
|
272
|
+
label: `${localizeUtils_1.getLocalizedString("core.M365SearchAppOptionItem.label")}`,
|
|
273
|
+
detail: localizeUtils_1.getLocalizedString("core.SearchAppOptionItem.detail"),
|
|
274
|
+
};
|
|
275
|
+
}
|
|
291
276
|
static collectFormMe() {
|
|
292
277
|
return {
|
|
293
|
-
id: "
|
|
278
|
+
id: "collect-form-message-extension",
|
|
294
279
|
label: `${localizeUtils_1.getLocalizedString("core.MessageExtensionOption.labelNew")}`,
|
|
295
|
-
cliName: "message-extension",
|
|
296
280
|
detail: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.detail"),
|
|
297
281
|
};
|
|
298
282
|
}
|
|
299
283
|
static me() {
|
|
300
284
|
return {
|
|
301
|
-
id: "
|
|
285
|
+
id: "message-extension",
|
|
302
286
|
label: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.label"),
|
|
303
|
-
cliName: "message-extension",
|
|
304
287
|
description: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.description"),
|
|
305
288
|
detail: localizeUtils_1.getLocalizedString("core.MessageExtensionOption.detail"),
|
|
306
289
|
};
|
|
307
290
|
}
|
|
308
291
|
static bots(inputs) {
|
|
309
|
-
return
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
292
|
+
return inputs !== undefined && getRuntime(inputs) === RuntimeOptions.DotNet().id
|
|
293
|
+
? // currently no ai bot for dotnet
|
|
294
|
+
[
|
|
295
|
+
CapabilityOptions.basicBot(),
|
|
296
|
+
CapabilityOptions.notificationBot(),
|
|
297
|
+
CapabilityOptions.commandBot(),
|
|
298
|
+
CapabilityOptions.workflowBot(inputs),
|
|
299
|
+
]
|
|
300
|
+
: [
|
|
301
|
+
CapabilityOptions.basicBot(),
|
|
302
|
+
CapabilityOptions.aiBot(),
|
|
303
|
+
CapabilityOptions.notificationBot(),
|
|
304
|
+
CapabilityOptions.commandBot(),
|
|
305
|
+
CapabilityOptions.workflowBot(inputs),
|
|
306
|
+
];
|
|
315
307
|
}
|
|
316
308
|
static tabs() {
|
|
317
309
|
return [
|
|
@@ -321,21 +313,27 @@ class CapabilityOptions {
|
|
|
321
313
|
CapabilityOptions.SPFxTab(),
|
|
322
314
|
];
|
|
323
315
|
}
|
|
324
|
-
static dotnetCaps() {
|
|
316
|
+
static dotnetCaps(inputs) {
|
|
325
317
|
return [
|
|
326
|
-
CapabilityOptions.
|
|
327
|
-
CapabilityOptions.
|
|
318
|
+
...CapabilityOptions.copilotPlugins(),
|
|
319
|
+
...CapabilityOptions.bots(inputs),
|
|
328
320
|
CapabilityOptions.nonSsoTab(),
|
|
329
321
|
CapabilityOptions.tab(),
|
|
330
|
-
CapabilityOptions.
|
|
322
|
+
...CapabilityOptions.mes(inputs),
|
|
331
323
|
];
|
|
332
324
|
}
|
|
333
|
-
static mes() {
|
|
334
|
-
return
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
325
|
+
static mes(inputs) {
|
|
326
|
+
return inputs !== undefined && getRuntime(inputs) === RuntimeOptions.DotNet().id
|
|
327
|
+
? [
|
|
328
|
+
CapabilityOptions.linkUnfurling(),
|
|
329
|
+
CapabilityOptions.SearchMe(),
|
|
330
|
+
CapabilityOptions.collectFormMe(),
|
|
331
|
+
]
|
|
332
|
+
: [
|
|
333
|
+
CapabilityOptions.linkUnfurling(),
|
|
334
|
+
CapabilityOptions.m365SearchMe(),
|
|
335
|
+
CapabilityOptions.collectFormMe(),
|
|
336
|
+
];
|
|
339
337
|
}
|
|
340
338
|
static copilotPlugins() {
|
|
341
339
|
return [
|
|
@@ -344,22 +342,38 @@ class CapabilityOptions {
|
|
|
344
342
|
CapabilityOptions.copilotPluginOpenAIPlugin(),
|
|
345
343
|
];
|
|
346
344
|
}
|
|
345
|
+
static copilotPluginCli() {
|
|
346
|
+
return {
|
|
347
|
+
id: "copilot-plugin-capability",
|
|
348
|
+
label: `${localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.label")}`,
|
|
349
|
+
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.detail"),
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
static staticAll(inputs) {
|
|
353
|
+
const capabilityOptions = [
|
|
354
|
+
...CapabilityOptions.bots(inputs),
|
|
355
|
+
...CapabilityOptions.tabs(),
|
|
356
|
+
...CapabilityOptions.mes(),
|
|
357
|
+
CapabilityOptions.copilotPluginCli(),
|
|
358
|
+
];
|
|
359
|
+
return capabilityOptions;
|
|
360
|
+
}
|
|
347
361
|
static all(inputs) {
|
|
362
|
+
// teamsfx list capabilities
|
|
348
363
|
const capabilityOptions = [
|
|
349
364
|
...CapabilityOptions.bots(inputs),
|
|
350
365
|
...CapabilityOptions.tabs(),
|
|
351
366
|
...CapabilityOptions.mes(),
|
|
352
367
|
];
|
|
353
368
|
if (featureFlags_1.isCopilotPluginEnabled()) {
|
|
354
|
-
capabilityOptions.push(
|
|
369
|
+
capabilityOptions.push(CapabilityOptions.copilotPluginCli());
|
|
355
370
|
}
|
|
356
371
|
return capabilityOptions;
|
|
357
372
|
}
|
|
358
373
|
static officeAddinImport() {
|
|
359
374
|
return {
|
|
360
|
-
id: "import
|
|
375
|
+
id: "import",
|
|
361
376
|
label: localizeUtils_1.getLocalizedString("core.importAddin.label"),
|
|
362
|
-
cliName: "import",
|
|
363
377
|
detail: localizeUtils_1.getLocalizedString("core.importAddin.detail"),
|
|
364
378
|
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
|
|
365
379
|
};
|
|
@@ -387,25 +401,32 @@ class CapabilityOptions {
|
|
|
387
401
|
// copilot plugin
|
|
388
402
|
static copilotPluginNewApi() {
|
|
389
403
|
return {
|
|
390
|
-
id: "
|
|
404
|
+
id: "new-api",
|
|
391
405
|
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.label"),
|
|
392
406
|
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginNewApiOption.detail"),
|
|
393
407
|
};
|
|
394
408
|
}
|
|
395
409
|
static copilotPluginApiSpec() {
|
|
396
410
|
return {
|
|
397
|
-
id:
|
|
411
|
+
id: constants_3.copilotPluginApiSpecOptionId,
|
|
398
412
|
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.label"),
|
|
399
413
|
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginApiSpecOption.detail"),
|
|
400
414
|
};
|
|
401
415
|
}
|
|
402
416
|
static copilotPluginOpenAIPlugin() {
|
|
403
417
|
return {
|
|
404
|
-
id:
|
|
418
|
+
id: constants_3.copilotPluginOpenAIPluginOptionId,
|
|
405
419
|
label: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginAIPluginOption.label"),
|
|
406
420
|
detail: localizeUtils_1.getLocalizedString("core.createProjectQuestion.capability.copilotPluginAIPluginOption.detail"),
|
|
407
421
|
};
|
|
408
422
|
}
|
|
423
|
+
static aiBot() {
|
|
424
|
+
return {
|
|
425
|
+
id: "ai-bot",
|
|
426
|
+
label: localizeUtils_1.getLocalizedString("core.aiBotOption.label"),
|
|
427
|
+
detail: localizeUtils_1.getLocalizedString("core.aiBotOption.detail"),
|
|
428
|
+
};
|
|
429
|
+
}
|
|
409
430
|
}
|
|
410
431
|
exports.CapabilityOptions = CapabilityOptions;
|
|
411
432
|
function capabilityQuestion() {
|
|
@@ -428,20 +449,24 @@ function capabilityQuestion() {
|
|
|
428
449
|
return localizeUtils_1.getLocalizedString("core.createCapabilityQuestion.titleNew");
|
|
429
450
|
}
|
|
430
451
|
},
|
|
452
|
+
cliDescription: "Specifies the Teams App capability.",
|
|
453
|
+
cliName: questionNames_1.CliQuestionName.Capability,
|
|
454
|
+
cliShortName: "c",
|
|
455
|
+
cliChoiceListCommand: "teamsfx list templates",
|
|
431
456
|
type: "singleSelect",
|
|
432
|
-
staticOptions: CapabilityOptions.
|
|
457
|
+
staticOptions: CapabilityOptions.staticAll(),
|
|
433
458
|
dynamicOptions: (inputs) => {
|
|
434
459
|
var _a;
|
|
435
460
|
// from dev portal
|
|
436
461
|
if (developerPortalScaffoldUtils_1.isFromDevPortal(inputs)) {
|
|
437
|
-
const capability = (_a = developerPortalScaffoldUtils_1.
|
|
462
|
+
const capability = (_a = developerPortalScaffoldUtils_1.getProjectTypeAndCapability(inputs.teamsAppFromTdp)) === null || _a === void 0 ? void 0 : _a.templateId;
|
|
438
463
|
if (capability) {
|
|
439
464
|
return [capability];
|
|
440
465
|
}
|
|
441
466
|
}
|
|
442
467
|
// dotnet capabilities
|
|
443
468
|
if (getRuntime(inputs) === RuntimeOptions.DotNet().id) {
|
|
444
|
-
return CapabilityOptions.dotnetCaps();
|
|
469
|
+
return CapabilityOptions.dotnetCaps(inputs);
|
|
445
470
|
}
|
|
446
471
|
// nodejs capabilities
|
|
447
472
|
const projectType = inputs[questionNames_1.QuestionNames.ProjectType];
|
|
@@ -467,7 +492,7 @@ function capabilityQuestion() {
|
|
|
467
492
|
...CapabilityOptions.mes(),
|
|
468
493
|
];
|
|
469
494
|
if (featureFlags_1.isCopilotPluginEnabled()) {
|
|
470
|
-
capabilityOptions.push(
|
|
495
|
+
capabilityOptions.push(CapabilityOptions.copilotPluginCli());
|
|
471
496
|
}
|
|
472
497
|
return capabilityOptions;
|
|
473
498
|
}
|
|
@@ -497,7 +522,6 @@ class NotificationTriggerOptions {
|
|
|
497
522
|
id: "http-restify",
|
|
498
523
|
hostType: HostType.AppService,
|
|
499
524
|
label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.label"),
|
|
500
|
-
cliName: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.cliName"),
|
|
501
525
|
description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.description"),
|
|
502
526
|
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-restify.detail"),
|
|
503
527
|
};
|
|
@@ -507,7 +531,6 @@ class NotificationTriggerOptions {
|
|
|
507
531
|
id: "http-webapi",
|
|
508
532
|
hostType: HostType.AppService,
|
|
509
533
|
label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.label"),
|
|
510
|
-
cliName: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.cliName"),
|
|
511
534
|
description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.description"),
|
|
512
535
|
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-webapi.detail"),
|
|
513
536
|
};
|
|
@@ -519,7 +542,6 @@ class NotificationTriggerOptions {
|
|
|
519
542
|
hostType: HostType.Functions,
|
|
520
543
|
triggers: [NotificationTriggers.TIMER],
|
|
521
544
|
label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.label"),
|
|
522
|
-
cliName: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.cliName"),
|
|
523
545
|
description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.description"),
|
|
524
546
|
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.timer-functions.detail"),
|
|
525
547
|
};
|
|
@@ -530,7 +552,6 @@ class NotificationTriggerOptions {
|
|
|
530
552
|
hostType: HostType.Functions,
|
|
531
553
|
triggers: [NotificationTriggers.HTTP, NotificationTriggers.TIMER],
|
|
532
554
|
label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.label"),
|
|
533
|
-
cliName: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.cliName"),
|
|
534
555
|
description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.description"),
|
|
535
556
|
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-and-timer-functions.detail"),
|
|
536
557
|
};
|
|
@@ -541,7 +562,6 @@ class NotificationTriggerOptions {
|
|
|
541
562
|
hostType: HostType.Functions,
|
|
542
563
|
triggers: [NotificationTriggers.HTTP],
|
|
543
564
|
label: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.label"),
|
|
544
|
-
cliName: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.cliName"),
|
|
545
565
|
description: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.description"),
|
|
546
566
|
detail: localizeUtils_1.getLocalizedString("plugins.bot.triggers.http-functions.detail"),
|
|
547
567
|
};
|
|
@@ -580,6 +600,8 @@ function botTriggerQuestion() {
|
|
|
580
600
|
return {
|
|
581
601
|
name: questionNames_1.QuestionNames.BotTrigger,
|
|
582
602
|
title: localizeUtils_1.getLocalizedString("plugins.bot.questionHostTypeTrigger.title"),
|
|
603
|
+
cliDescription: "Specifies the trigger for `Chat Notification Message` app template.",
|
|
604
|
+
cliShortName: "t",
|
|
583
605
|
type: "singleSelect",
|
|
584
606
|
staticOptions: NotificationTriggerOptions.all(),
|
|
585
607
|
dynamicOptions: (inputs) => {
|
|
@@ -600,16 +622,33 @@ function botTriggerQuestion() {
|
|
|
600
622
|
placeholder: localizeUtils_1.getLocalizedString("plugins.bot.questionHostTypeTrigger.placeholder"),
|
|
601
623
|
};
|
|
602
624
|
}
|
|
625
|
+
function copilotPluginDevelopmentQuestion() {
|
|
626
|
+
return {
|
|
627
|
+
name: questionNames_1.QuestionNames.CopilotPluginDevelopment,
|
|
628
|
+
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.projectType.copilotPlugin.title"),
|
|
629
|
+
type: "singleSelect",
|
|
630
|
+
staticOptions: CapabilityOptions.copilotPlugins(),
|
|
631
|
+
cliShortName: "p",
|
|
632
|
+
cliDescription: "Plugin for Copilot.",
|
|
633
|
+
};
|
|
634
|
+
}
|
|
603
635
|
function SPFxSolutionQuestion() {
|
|
604
636
|
return {
|
|
605
637
|
type: "singleSelect",
|
|
606
638
|
name: questionNames_1.QuestionNames.SPFxSolution,
|
|
607
639
|
title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.title"),
|
|
640
|
+
cliDescription: "Create a new or import an existing SharePoint Framework solution.",
|
|
641
|
+
cliShortName: "s",
|
|
608
642
|
staticOptions: [
|
|
609
|
-
{
|
|
643
|
+
{
|
|
644
|
+
id: "new",
|
|
645
|
+
label: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.createNew"),
|
|
646
|
+
detail: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.createNew.detail"),
|
|
647
|
+
},
|
|
610
648
|
{
|
|
611
649
|
id: "import",
|
|
612
650
|
label: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.importExisting"),
|
|
651
|
+
detail: localizeUtils_1.getLocalizedString("plugins.spfx.questions.spfxSolution.importExisting.detail"),
|
|
613
652
|
},
|
|
614
653
|
],
|
|
615
654
|
default: "new",
|
|
@@ -620,24 +659,49 @@ function SPFxPackageSelectQuestion() {
|
|
|
620
659
|
type: "singleSelect",
|
|
621
660
|
name: questionNames_1.QuestionNames.SPFxInstallPackage,
|
|
622
661
|
title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.title"),
|
|
662
|
+
cliDescription: "Install the latest version of SharePoint Framework.",
|
|
623
663
|
staticOptions: [],
|
|
624
664
|
placeholder: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.placeholder"),
|
|
625
665
|
dynamicOptions: async (inputs) => {
|
|
626
|
-
await
|
|
627
|
-
|
|
666
|
+
const versions = await Promise.all([
|
|
667
|
+
utils_3.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.GeneratorPackageName, 0, false),
|
|
668
|
+
utils_3.Utils.findLatestVersion(undefined, constants_2.Constants.GeneratorPackageName, 5),
|
|
669
|
+
utils_3.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.YeomanPackageName, 0, false),
|
|
670
|
+
]);
|
|
671
|
+
inputs.globalSpfxPackageVersion = versions[0];
|
|
672
|
+
inputs.latestSpfxPackageVersion = versions[1];
|
|
673
|
+
inputs.globalYeomanPackageVersion = versions[2];
|
|
674
|
+
return [
|
|
675
|
+
{
|
|
676
|
+
id: SPFxVersionOptionIds.installLocally,
|
|
677
|
+
label: versions[1] !== undefined
|
|
678
|
+
? localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.installLocally.withVersion.label", "v" + versions[1])
|
|
679
|
+
: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.installLocally.noVersion.label"),
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
id: SPFxVersionOptionIds.globalPackage,
|
|
683
|
+
label: versions[0] !== undefined
|
|
684
|
+
? localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.withVersion.label", "v" + versions[0])
|
|
685
|
+
: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.noVersion.label"),
|
|
686
|
+
description: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.detail", constants_2.Constants.RecommendedLowestSpfxVersion),
|
|
687
|
+
},
|
|
688
|
+
];
|
|
628
689
|
},
|
|
629
690
|
default: SPFxVersionOptionIds.installLocally,
|
|
630
691
|
validation: {
|
|
631
|
-
validFunc:
|
|
692
|
+
validFunc: (input, previousInputs) => {
|
|
632
693
|
if (input === SPFxVersionOptionIds.globalPackage) {
|
|
633
|
-
const hasPackagesInstalled =
|
|
694
|
+
const hasPackagesInstalled = !!previousInputs &&
|
|
695
|
+
!!previousInputs.globalSpfxPackageVersion &&
|
|
696
|
+
!!previousInputs.globalYeomanPackageVersion;
|
|
634
697
|
if (!hasPackagesInstalled) {
|
|
635
|
-
|
|
698
|
+
return Promise.reject(error_1.DevEnvironmentSetupError());
|
|
636
699
|
}
|
|
637
700
|
}
|
|
638
|
-
return undefined;
|
|
701
|
+
return Promise.resolve(undefined);
|
|
639
702
|
},
|
|
640
703
|
},
|
|
704
|
+
isBoolean: true,
|
|
641
705
|
};
|
|
642
706
|
}
|
|
643
707
|
exports.SPFxPackageSelectQuestion = SPFxPackageSelectQuestion;
|
|
@@ -645,6 +709,7 @@ function SPFxFrameworkQuestion() {
|
|
|
645
709
|
return {
|
|
646
710
|
type: "singleSelect",
|
|
647
711
|
name: questionNames_1.QuestionNames.SPFxFramework,
|
|
712
|
+
cliShortName: "k",
|
|
648
713
|
title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.framework.title"),
|
|
649
714
|
staticOptions: [
|
|
650
715
|
{ id: "react", label: "React" },
|
|
@@ -659,7 +724,9 @@ function SPFxWebpartNameQuestion() {
|
|
|
659
724
|
return {
|
|
660
725
|
type: "text",
|
|
661
726
|
name: questionNames_1.QuestionNames.SPFxWebpartName,
|
|
662
|
-
|
|
727
|
+
cliShortName: "w",
|
|
728
|
+
cliDescription: "Name for SharePoint Framework Web Part.",
|
|
729
|
+
title: localizeUtils_1.getLocalizedString("plugins.spfx.questions.webpartName"),
|
|
663
730
|
default: constants_2.Constants.DEFAULT_WEBPART_NAME,
|
|
664
731
|
validation: {
|
|
665
732
|
validFunc: async (input, previousInputs) => {
|
|
@@ -690,65 +757,12 @@ var SPFxVersionOptionIds;
|
|
|
690
757
|
SPFxVersionOptionIds["installLocally"] = "true";
|
|
691
758
|
SPFxVersionOptionIds["globalPackage"] = "false";
|
|
692
759
|
})(SPFxVersionOptionIds = exports.SPFxVersionOptionIds || (exports.SPFxVersionOptionIds = {}));
|
|
693
|
-
class PackageSelectOptionsHelper {
|
|
694
|
-
static async loadOptions() {
|
|
695
|
-
const versions = await Promise.all([
|
|
696
|
-
utils_3.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.GeneratorPackageName, 0, false),
|
|
697
|
-
utils_3.Utils.findLatestVersion(undefined, constants_2.Constants.GeneratorPackageName, 5),
|
|
698
|
-
utils_3.Utils.findGloballyInstalledVersion(undefined, constants_2.Constants.YeomanPackageName, 0, false),
|
|
699
|
-
]);
|
|
700
|
-
PackageSelectOptionsHelper.globalPackageVersions[0] = versions[0];
|
|
701
|
-
PackageSelectOptionsHelper.globalPackageVersions[1] = versions[2];
|
|
702
|
-
PackageSelectOptionsHelper.latestSpGeneratorVersion = versions[1];
|
|
703
|
-
PackageSelectOptionsHelper.options = [
|
|
704
|
-
{
|
|
705
|
-
id: SPFxVersionOptionIds.installLocally,
|
|
706
|
-
label: versions[1] !== undefined
|
|
707
|
-
? localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.installLocally.withVersion.label", "v" + versions[1])
|
|
708
|
-
: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.installLocally.noVersion.label"),
|
|
709
|
-
},
|
|
710
|
-
{
|
|
711
|
-
id: SPFxVersionOptionIds.globalPackage,
|
|
712
|
-
label: versions[0] !== undefined
|
|
713
|
-
? localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.withVersion.label", "v" + versions[0])
|
|
714
|
-
: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.noVersion.label"),
|
|
715
|
-
description: localizeUtils_1.getLocalizedString("plugins.spfx.questions.packageSelect.useGlobalPackage.detail", constants_2.Constants.RecommendedLowestSpfxVersion),
|
|
716
|
-
},
|
|
717
|
-
];
|
|
718
|
-
}
|
|
719
|
-
static getOptions() {
|
|
720
|
-
return PackageSelectOptionsHelper.options;
|
|
721
|
-
}
|
|
722
|
-
static clear() {
|
|
723
|
-
PackageSelectOptionsHelper.options = [];
|
|
724
|
-
PackageSelectOptionsHelper.globalPackageVersions = [undefined, undefined];
|
|
725
|
-
PackageSelectOptionsHelper.latestSpGeneratorVersion = undefined;
|
|
726
|
-
}
|
|
727
|
-
static checkGlobalPackages() {
|
|
728
|
-
return (!!PackageSelectOptionsHelper.globalPackageVersions[0] &&
|
|
729
|
-
!!PackageSelectOptionsHelper.globalPackageVersions[1]);
|
|
730
|
-
}
|
|
731
|
-
static getLatestSpGeneratorVersion() {
|
|
732
|
-
return PackageSelectOptionsHelper.latestSpGeneratorVersion;
|
|
733
|
-
}
|
|
734
|
-
static isLowerThanRecommendedVersion() {
|
|
735
|
-
const installedVersion = PackageSelectOptionsHelper.globalPackageVersions[0];
|
|
736
|
-
if (!installedVersion) {
|
|
737
|
-
return undefined;
|
|
738
|
-
}
|
|
739
|
-
const recommendedLowestVersion = constants_2.Constants.RecommendedLowestSpfxVersion.substring(1); // remove "v"
|
|
740
|
-
return semver_1.default.lte(installedVersion, recommendedLowestVersion);
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
exports.PackageSelectOptionsHelper = PackageSelectOptionsHelper;
|
|
744
|
-
PackageSelectOptionsHelper.options = [];
|
|
745
|
-
PackageSelectOptionsHelper.globalPackageVersions = [undefined, undefined];
|
|
746
|
-
PackageSelectOptionsHelper.latestSpGeneratorVersion = undefined;
|
|
747
760
|
function SPFxImportFolderQuestion(hasDefaultFunc = false) {
|
|
748
761
|
return {
|
|
749
762
|
type: "folder",
|
|
750
763
|
name: questionNames_1.QuestionNames.SPFxFolder,
|
|
751
764
|
title: localizeUtils_1.getLocalizedString("core.spfxFolder.title"),
|
|
765
|
+
cliDescription: "Directory or Path that contains the existing SharePoint Framework solution.",
|
|
752
766
|
placeholder: localizeUtils_1.getLocalizedString("core.spfxFolder.placeholder"),
|
|
753
767
|
default: hasDefaultFunc
|
|
754
768
|
? (inputs) => {
|
|
@@ -764,7 +778,7 @@ const getTemplate = (inputs) => {
|
|
|
764
778
|
const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
|
|
765
779
|
const templates = officeAddinJsonData.getProjectTemplateNames();
|
|
766
780
|
const foundTemplate = templates.find((template) => {
|
|
767
|
-
return capabilities.includes(template);
|
|
781
|
+
return capabilities && capabilities.includes(template);
|
|
768
782
|
});
|
|
769
783
|
return foundTemplate !== null && foundTemplate !== void 0 ? foundTemplate : "";
|
|
770
784
|
};
|
|
@@ -775,7 +789,7 @@ function officeAddinHostingQuestion() {
|
|
|
775
789
|
name: questionNames_1.QuestionNames.OfficeAddinHost,
|
|
776
790
|
title: "Add-in Host",
|
|
777
791
|
staticOptions: [],
|
|
778
|
-
dynamicOptions:
|
|
792
|
+
dynamicOptions: (inputs) => {
|
|
779
793
|
const template = exports.getTemplate(inputs);
|
|
780
794
|
const getHostTemplateNames = officeAddinJsonData.getHostTemplateNames(template);
|
|
781
795
|
const options = getHostTemplateNames.map((host) => ({
|
|
@@ -784,7 +798,7 @@ function officeAddinHostingQuestion() {
|
|
|
784
798
|
}));
|
|
785
799
|
return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
|
|
786
800
|
},
|
|
787
|
-
default:
|
|
801
|
+
default: (inputs) => {
|
|
788
802
|
const template = exports.getTemplate(inputs);
|
|
789
803
|
const options = officeAddinJsonData.getHostTemplateNames(template);
|
|
790
804
|
return options[0] || "No Options";
|
|
@@ -793,6 +807,7 @@ function officeAddinHostingQuestion() {
|
|
|
793
807
|
};
|
|
794
808
|
return OfficeHostQuestion;
|
|
795
809
|
}
|
|
810
|
+
exports.officeAddinHostingQuestion = officeAddinHostingQuestion;
|
|
796
811
|
const officeAddinJsonData = new projectsJsonData_1.default();
|
|
797
812
|
function getLanguageOptions(inputs) {
|
|
798
813
|
const runtime = getRuntime(inputs);
|
|
@@ -829,7 +844,8 @@ var ProgrammingLanguage;
|
|
|
829
844
|
function programmingLanguageQuestion() {
|
|
830
845
|
const programmingLanguageQuestion = {
|
|
831
846
|
name: questionNames_1.QuestionNames.ProgrammingLanguage,
|
|
832
|
-
|
|
847
|
+
cliShortName: "l",
|
|
848
|
+
title: "Programming Language.",
|
|
833
849
|
type: "singleSelect",
|
|
834
850
|
staticOptions: [
|
|
835
851
|
{ id: ProgrammingLanguage.JS, label: "JavaScript" },
|
|
@@ -866,21 +882,30 @@ function programmingLanguageQuestion() {
|
|
|
866
882
|
return programmingLanguageQuestion;
|
|
867
883
|
}
|
|
868
884
|
exports.programmingLanguageQuestion = programmingLanguageQuestion;
|
|
869
|
-
function
|
|
885
|
+
function folderQuestion() {
|
|
870
886
|
return {
|
|
871
887
|
type: "folder",
|
|
872
888
|
name: questionNames_1.QuestionNames.Folder,
|
|
873
|
-
|
|
889
|
+
cliShortName: "f",
|
|
890
|
+
title: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
|
|
891
|
+
? "Directory where the project folder will be created in"
|
|
892
|
+
: localizeUtils_1.getLocalizedString("core.question.workspaceFolder.title"),
|
|
893
|
+
cliDescription: "Directory where the project folder will be created in.",
|
|
874
894
|
placeholder: localizeUtils_1.getLocalizedString("core.question.workspaceFolder.placeholder"),
|
|
875
|
-
default:
|
|
895
|
+
default: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
|
|
896
|
+
? "./"
|
|
897
|
+
: path.join(os.homedir(), constants_1.ConstantString.RootFolder),
|
|
876
898
|
};
|
|
877
899
|
}
|
|
900
|
+
exports.folderQuestion = folderQuestion;
|
|
878
901
|
exports.AppNamePattern = '^(?=(.*[\\da-zA-Z]){2})[a-zA-Z][^"<>:\\?/*&|\u0000-\u001F]*[^"\\s.<>:\\?/*&|\u0000-\u001F]$';
|
|
879
902
|
function appNameQuestion() {
|
|
880
903
|
const question = {
|
|
881
904
|
type: "text",
|
|
882
905
|
name: questionNames_1.QuestionNames.AppName,
|
|
906
|
+
cliShortName: "n",
|
|
883
907
|
title: "Application name",
|
|
908
|
+
required: true,
|
|
884
909
|
default: async (inputs) => {
|
|
885
910
|
var _a, _b;
|
|
886
911
|
let defaultName = undefined;
|
|
@@ -890,6 +915,9 @@ function appNameQuestion() {
|
|
|
890
915
|
else if (inputs[questionNames_1.QuestionNames.SPFxSolution] == "import") {
|
|
891
916
|
defaultName = await spfxGenerator_1.SPFxGenerator.getSolutionName(inputs[questionNames_1.QuestionNames.SPFxFolder]);
|
|
892
917
|
}
|
|
918
|
+
else if (inputs.openAIPluginManifest) {
|
|
919
|
+
defaultName = inputs.openAIPluginManifest.name_for_human;
|
|
920
|
+
}
|
|
893
921
|
return defaultName;
|
|
894
922
|
},
|
|
895
923
|
validation: {
|
|
@@ -929,6 +957,11 @@ function sampleSelectQuestion() {
|
|
|
929
957
|
return {
|
|
930
958
|
type: "singleSelect",
|
|
931
959
|
name: questionNames_1.QuestionNames.Samples,
|
|
960
|
+
cliName: "sample-name",
|
|
961
|
+
cliDescription: "Specifies the Teams App sample name.",
|
|
962
|
+
cliChoiceListCommand: "teamsfx list samples",
|
|
963
|
+
skipValidation: true,
|
|
964
|
+
cliType: "argument",
|
|
932
965
|
title: localizeUtils_1.getLocalizedString("core.SampleSelect.title"),
|
|
933
966
|
staticOptions: samples_1.sampleProvider.SampleCollection.samples.map((sample) => {
|
|
934
967
|
return {
|
|
@@ -938,6 +971,17 @@ function sampleSelectQuestion() {
|
|
|
938
971
|
detail: sample.shortDescription,
|
|
939
972
|
};
|
|
940
973
|
}),
|
|
974
|
+
dynamicOptions: async () => {
|
|
975
|
+
await samples_1.sampleProvider.fetchSampleConfig();
|
|
976
|
+
return samples_1.sampleProvider.SampleCollection.samples.map((sample) => {
|
|
977
|
+
return {
|
|
978
|
+
id: sample.id,
|
|
979
|
+
label: sample.title,
|
|
980
|
+
description: `${sample.time} • ${sample.configuration}`,
|
|
981
|
+
detail: sample.shortDescription,
|
|
982
|
+
};
|
|
983
|
+
});
|
|
984
|
+
},
|
|
941
985
|
placeholder: localizeUtils_1.getLocalizedString("core.SampleSelect.placeholder"),
|
|
942
986
|
buttons: [
|
|
943
987
|
{
|
|
@@ -973,6 +1017,7 @@ function runtimeQuestion() {
|
|
|
973
1017
|
staticOptions: [RuntimeOptions.NodeJS(), RuntimeOptions.DotNet()],
|
|
974
1018
|
default: RuntimeOptions.NodeJS().id,
|
|
975
1019
|
placeholder: localizeUtils_1.getLocalizedString("core.getRuntimeQuestion.placeholder"),
|
|
1020
|
+
cliHidden: true,
|
|
976
1021
|
};
|
|
977
1022
|
}
|
|
978
1023
|
const defaultTabLocalHostUrl = "https://localhost:53000/index.html#/tab";
|
|
@@ -1064,6 +1109,8 @@ function getBotIdAndMeId(appDefinition) {
|
|
|
1064
1109
|
}
|
|
1065
1110
|
function getBotOptions(inputs) {
|
|
1066
1111
|
const appDefinition = inputs.teamsAppFromTdp;
|
|
1112
|
+
if (!appDefinition)
|
|
1113
|
+
return [];
|
|
1067
1114
|
const [botId, messageExtensionId] = getBotIdAndMeId(appDefinition);
|
|
1068
1115
|
const options = [];
|
|
1069
1116
|
if (botId) {
|
|
@@ -1075,14 +1122,14 @@ function getBotOptions(inputs) {
|
|
|
1075
1122
|
return options;
|
|
1076
1123
|
}
|
|
1077
1124
|
function selectBotIdsQuestion() {
|
|
1078
|
-
const statcOptions = [];
|
|
1079
|
-
statcOptions.push(botOptionItem(false, "000000-0000-0000"));
|
|
1080
|
-
statcOptions.push(botOptionItem(true, "000000-0000-0000"));
|
|
1125
|
+
// const statcOptions: OptionItem[] = [];
|
|
1126
|
+
// statcOptions.push(botOptionItem(false, "000000-0000-0000"));
|
|
1127
|
+
// statcOptions.push(botOptionItem(true, "000000-0000-0000"));
|
|
1081
1128
|
return {
|
|
1082
1129
|
type: "multiSelect",
|
|
1083
1130
|
name: questionNames_1.QuestionNames.ReplaceBotIds,
|
|
1084
1131
|
title: localizeUtils_1.getLocalizedString("core.updateBotIdsQuestion.title"),
|
|
1085
|
-
staticOptions:
|
|
1132
|
+
staticOptions: [],
|
|
1086
1133
|
dynamicOptions: getBotOptions,
|
|
1087
1134
|
default: (inputs) => {
|
|
1088
1135
|
const options = getBotOptions(inputs);
|
|
@@ -1092,21 +1139,58 @@ function selectBotIdsQuestion() {
|
|
|
1092
1139
|
forgetLastValue: true,
|
|
1093
1140
|
};
|
|
1094
1141
|
}
|
|
1095
|
-
|
|
1142
|
+
const maximumLengthOfDetailsErrorMessageInInputBox = 90;
|
|
1143
|
+
function apiSpecLocationQuestion(includeExistingAPIs = true) {
|
|
1144
|
+
const validationOnAccept = async (input, inputs) => {
|
|
1145
|
+
try {
|
|
1146
|
+
const context = utils_4.createContextV3();
|
|
1147
|
+
const res = await helper_1.listOperations(context, undefined, input, inputs[questionNames_1.QuestionNames.ManifestPath], includeExistingAPIs, false);
|
|
1148
|
+
if (res.isOk()) {
|
|
1149
|
+
inputs.supportedApisFromApiSpec = res.value;
|
|
1150
|
+
}
|
|
1151
|
+
else {
|
|
1152
|
+
const errors = res.error;
|
|
1153
|
+
if ((inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI) {
|
|
1154
|
+
return errors.map((e) => e.content).join("\n");
|
|
1155
|
+
}
|
|
1156
|
+
if (errors.length === 1 &&
|
|
1157
|
+
errors[0].content.length <= maximumLengthOfDetailsErrorMessageInInputBox) {
|
|
1158
|
+
return errors[0].content;
|
|
1159
|
+
}
|
|
1160
|
+
else {
|
|
1161
|
+
return inputs.platform === teamsfx_api_1.Platform.VSCode
|
|
1162
|
+
? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.vscode.message")
|
|
1163
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.message");
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
catch (e) {
|
|
1168
|
+
const error = error_2.assembleError(e);
|
|
1169
|
+
throw error;
|
|
1170
|
+
}
|
|
1171
|
+
};
|
|
1096
1172
|
return {
|
|
1097
1173
|
type: "singleFileOrText",
|
|
1098
1174
|
name: questionNames_1.QuestionNames.ApiSpecLocation,
|
|
1175
|
+
cliShortName: "a",
|
|
1176
|
+
cliDescription: "OpenAPI specification file location.",
|
|
1099
1177
|
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.title"),
|
|
1100
1178
|
forgetLastValue: true,
|
|
1101
1179
|
inputBoxConfig: {
|
|
1180
|
+
type: "innerText",
|
|
1102
1181
|
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.title"),
|
|
1103
1182
|
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.placeholder"),
|
|
1104
1183
|
name: "input-api-spec-url",
|
|
1105
1184
|
step: 2,
|
|
1106
|
-
validation:
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1185
|
+
validation: {
|
|
1186
|
+
validFunc: (input, inputs) => {
|
|
1187
|
+
const result = util_1.isValidHttpUrl(input)
|
|
1188
|
+
? undefined
|
|
1189
|
+
: (inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI
|
|
1190
|
+
? "Please enter a valid URL or local path of your API Specification"
|
|
1191
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.invalidUrl.message");
|
|
1192
|
+
return Promise.resolve(result);
|
|
1193
|
+
},
|
|
1110
1194
|
},
|
|
1111
1195
|
},
|
|
1112
1196
|
inputOptionItem: {
|
|
@@ -1116,223 +1200,292 @@ function apiSpecLocationQuestion() {
|
|
|
1116
1200
|
filters: {
|
|
1117
1201
|
files: ["json", "yml", "yaml"],
|
|
1118
1202
|
},
|
|
1203
|
+
validation: {
|
|
1204
|
+
validFunc: async (input, inputs) => {
|
|
1205
|
+
if (!util_1.isValidHttpUrl(input) && !(await fs_extra_1.default.pathExists(input))) {
|
|
1206
|
+
return "Please enter a valid URL or local path of your API Specification";
|
|
1207
|
+
}
|
|
1208
|
+
return await validationOnAccept(input, inputs);
|
|
1209
|
+
},
|
|
1210
|
+
},
|
|
1119
1211
|
};
|
|
1120
1212
|
}
|
|
1213
|
+
exports.apiSpecLocationQuestion = apiSpecLocationQuestion;
|
|
1121
1214
|
function openAIPluginManifestLocationQuestion() {
|
|
1215
|
+
// export for unit test
|
|
1122
1216
|
return {
|
|
1123
1217
|
type: "text",
|
|
1124
|
-
name: questionNames_1.QuestionNames.
|
|
1218
|
+
name: questionNames_1.QuestionNames.OpenAIPluginDomain,
|
|
1219
|
+
cliShortName: "d",
|
|
1125
1220
|
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.AIPluginManifest.title"),
|
|
1126
1221
|
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.AIPluginManifest.placeholder"),
|
|
1222
|
+
cliDescription: "OpenAI plugin website domain.",
|
|
1127
1223
|
forgetLastValue: true,
|
|
1128
1224
|
validation: {
|
|
1129
|
-
validFunc:
|
|
1130
|
-
|
|
1225
|
+
validFunc: (input) => {
|
|
1226
|
+
const pattern = /(https?:\/\/)?([a-z0-9-]+(\.[a-z0-9-]+)*)(:[0-9]{1,5})?(\/)?$/i;
|
|
1227
|
+
const match = pattern.test(input);
|
|
1228
|
+
const result = match
|
|
1131
1229
|
? undefined
|
|
1132
|
-
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.
|
|
1230
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.invalidDomain.message");
|
|
1231
|
+
return Promise.resolve(result);
|
|
1232
|
+
},
|
|
1233
|
+
},
|
|
1234
|
+
additionalValidationOnAccept: {
|
|
1235
|
+
validFunc: async (input, inputs) => {
|
|
1236
|
+
let manifest;
|
|
1237
|
+
try {
|
|
1238
|
+
manifest = await helper_1.OpenAIPluginManifestHelper.loadOpenAIPluginManifest(input);
|
|
1239
|
+
inputs.openAIPluginManifest = manifest;
|
|
1240
|
+
}
|
|
1241
|
+
catch (e) {
|
|
1242
|
+
const error = error_2.assembleError(e);
|
|
1243
|
+
return error.message;
|
|
1244
|
+
}
|
|
1245
|
+
const context = utils_4.createContextV3();
|
|
1246
|
+
try {
|
|
1247
|
+
const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation], undefined, true, true);
|
|
1248
|
+
if (res.isOk()) {
|
|
1249
|
+
inputs.supportedApisFromApiSpec = res.value;
|
|
1250
|
+
}
|
|
1251
|
+
else {
|
|
1252
|
+
const errors = res.error;
|
|
1253
|
+
if ((inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI) {
|
|
1254
|
+
return errors.map((e) => e.content).join("\n");
|
|
1255
|
+
}
|
|
1256
|
+
if (errors.length === 1 &&
|
|
1257
|
+
errors[0].content.length <= maximumLengthOfDetailsErrorMessageInInputBox) {
|
|
1258
|
+
return errors[0].content;
|
|
1259
|
+
}
|
|
1260
|
+
else {
|
|
1261
|
+
return inputs.platform === teamsfx_api_1.Platform.VSCode
|
|
1262
|
+
? localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.multipleValidationErrors.vscode.message")
|
|
1263
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.multipleValidationErrors.message");
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
catch (e) {
|
|
1268
|
+
const error = error_2.assembleError(e);
|
|
1269
|
+
throw error;
|
|
1270
|
+
}
|
|
1133
1271
|
},
|
|
1134
1272
|
},
|
|
1135
1273
|
};
|
|
1136
1274
|
}
|
|
1137
|
-
|
|
1275
|
+
exports.openAIPluginManifestLocationQuestion = openAIPluginManifestLocationQuestion;
|
|
1276
|
+
function apiOperationQuestion(includeExistingAPIs = true) {
|
|
1138
1277
|
// export for unit test
|
|
1139
1278
|
return {
|
|
1140
1279
|
type: "multiSelect",
|
|
1141
1280
|
name: questionNames_1.QuestionNames.ApiOperation,
|
|
1142
1281
|
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.title"),
|
|
1143
|
-
|
|
1282
|
+
cliDescription: "Specifies API(s) to be used in Copilot plugin.",
|
|
1283
|
+
cliShortName: "o",
|
|
1284
|
+
placeholder: includeExistingAPIs
|
|
1285
|
+
? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder")
|
|
1286
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting"),
|
|
1144
1287
|
forgetLastValue: true,
|
|
1145
1288
|
staticOptions: [],
|
|
1146
1289
|
validation: {
|
|
1147
1290
|
minItems: 1,
|
|
1148
1291
|
},
|
|
1149
|
-
dynamicOptions:
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
manifest = await helper_1.OpenAIManifestHelper.loadOpenAIPluginManifest(inputs[questionNames_1.QuestionNames.OpenAIPluginManifestLocation]);
|
|
1153
|
-
inputs.openAIPluginManifest = manifest;
|
|
1154
|
-
}
|
|
1155
|
-
const context = utils_4.createContextV3();
|
|
1156
|
-
try {
|
|
1157
|
-
const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation]);
|
|
1158
|
-
if (res.isOk()) {
|
|
1159
|
-
return res.value.map((operation) => {
|
|
1160
|
-
return { id: operation, label: operation };
|
|
1161
|
-
});
|
|
1162
|
-
}
|
|
1163
|
-
else {
|
|
1164
|
-
throw new error_2.EmptyOptionError(); // TODO: handle errors based on error results
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
catch (e) {
|
|
1168
|
-
const error = error_2.assembleError(e);
|
|
1169
|
-
throw error;
|
|
1292
|
+
dynamicOptions: (inputs) => {
|
|
1293
|
+
if (!inputs.supportedApisFromApiSpec) {
|
|
1294
|
+
throw new error_2.EmptyOptionError(questionNames_1.QuestionNames.ApiOperation, "question");
|
|
1170
1295
|
}
|
|
1296
|
+
const operations = inputs.supportedApisFromApiSpec;
|
|
1297
|
+
return operations;
|
|
1171
1298
|
},
|
|
1172
1299
|
};
|
|
1173
1300
|
}
|
|
1174
1301
|
exports.apiOperationQuestion = apiOperationQuestion;
|
|
1175
|
-
function
|
|
1176
|
-
|
|
1177
|
-
|
|
1302
|
+
function getCopilotPluginFeatureId(inputs) {
|
|
1303
|
+
if (teamsfx_api_1.CLIPlatforms.includes(inputs.platform)) {
|
|
1304
|
+
return inputs[questionNames_1.QuestionNames.CopilotPluginDevelopment];
|
|
1305
|
+
}
|
|
1306
|
+
else {
|
|
1307
|
+
return inputs[questionNames_1.QuestionNames.Capabilities];
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
function capabilitySubTree() {
|
|
1311
|
+
const node = {
|
|
1312
|
+
data: capabilityQuestion(),
|
|
1178
1313
|
children: [
|
|
1179
1314
|
{
|
|
1180
|
-
|
|
1181
|
-
|
|
1315
|
+
// Notification bot trigger sub-tree
|
|
1316
|
+
condition: { equals: CapabilityOptions.notificationBot().id },
|
|
1317
|
+
data: botTriggerQuestion(),
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
// SPFx sub-tree
|
|
1321
|
+
condition: { equals: CapabilityOptions.SPFxTab().id },
|
|
1322
|
+
data: SPFxSolutionQuestion(),
|
|
1182
1323
|
children: [
|
|
1183
1324
|
{
|
|
1184
|
-
|
|
1185
|
-
|
|
1325
|
+
data: { type: "group" },
|
|
1326
|
+
children: [
|
|
1327
|
+
{ data: SPFxPackageSelectQuestion() },
|
|
1328
|
+
{ data: SPFxFrameworkQuestion() },
|
|
1329
|
+
{ data: SPFxWebpartNameQuestion() },
|
|
1330
|
+
],
|
|
1331
|
+
condition: { equals: "new" },
|
|
1186
1332
|
},
|
|
1187
1333
|
{
|
|
1188
|
-
|
|
1189
|
-
|
|
1334
|
+
data: SPFxImportFolderQuestion(),
|
|
1335
|
+
condition: { equals: "import" },
|
|
1190
1336
|
},
|
|
1337
|
+
],
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
// office addin import sub-tree
|
|
1341
|
+
condition: { equals: CapabilityOptions.officeAddinImport().id },
|
|
1342
|
+
data: { type: "group", name: questionNames_1.QuestionNames.OfficeAddinImport },
|
|
1343
|
+
children: [
|
|
1191
1344
|
{
|
|
1192
|
-
data:
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
data: botTriggerQuestion(),
|
|
1198
|
-
},
|
|
1199
|
-
{
|
|
1200
|
-
// SPFx sub-tree
|
|
1201
|
-
condition: { equals: CapabilityOptions.SPFxTab().id },
|
|
1202
|
-
data: SPFxSolutionQuestion(),
|
|
1203
|
-
children: [
|
|
1204
|
-
{
|
|
1205
|
-
data: { type: "group" },
|
|
1206
|
-
children: [
|
|
1207
|
-
{ data: SPFxPackageSelectQuestion() },
|
|
1208
|
-
{ data: SPFxFrameworkQuestion() },
|
|
1209
|
-
{ data: SPFxWebpartNameQuestion() },
|
|
1210
|
-
],
|
|
1211
|
-
condition: { equals: "new" },
|
|
1212
|
-
},
|
|
1213
|
-
{
|
|
1214
|
-
data: SPFxImportFolderQuestion(),
|
|
1215
|
-
condition: { equals: "import" },
|
|
1216
|
-
},
|
|
1217
|
-
],
|
|
1218
|
-
},
|
|
1219
|
-
{
|
|
1220
|
-
// office addin import sub-tree
|
|
1221
|
-
condition: { equals: CapabilityOptions.officeAddinImport().id },
|
|
1222
|
-
data: { type: "group", name: questionNames_1.QuestionNames.OfficeAddinImport },
|
|
1223
|
-
children: [
|
|
1224
|
-
{
|
|
1225
|
-
data: {
|
|
1226
|
-
type: "folder",
|
|
1227
|
-
name: questionNames_1.QuestionNames.OfficeAddinFolder,
|
|
1228
|
-
title: "Existing add-in project folder",
|
|
1229
|
-
},
|
|
1230
|
-
},
|
|
1231
|
-
{
|
|
1232
|
-
data: {
|
|
1233
|
-
type: "singleFile",
|
|
1234
|
-
name: questionNames_1.QuestionNames.OfficeAddinManifest,
|
|
1235
|
-
title: "Select import project manifest file",
|
|
1236
|
-
},
|
|
1237
|
-
},
|
|
1238
|
-
],
|
|
1239
|
-
},
|
|
1240
|
-
{
|
|
1241
|
-
// office addin other items sub-tree
|
|
1242
|
-
condition: {
|
|
1243
|
-
enum: CapabilityOptions.officeAddinItems().map((i) => i.id),
|
|
1244
|
-
},
|
|
1245
|
-
data: officeAddinHostingQuestion(),
|
|
1246
|
-
},
|
|
1247
|
-
{
|
|
1248
|
-
// Copilot plugin from API spec or AI Plugin
|
|
1249
|
-
condition: {
|
|
1250
|
-
enum: [
|
|
1251
|
-
CapabilityOptions.copilotPluginApiSpec().id,
|
|
1252
|
-
CapabilityOptions.copilotPluginOpenAIPlugin().id,
|
|
1253
|
-
],
|
|
1254
|
-
},
|
|
1255
|
-
data: { type: "group", name: questionNames_1.QuestionNames.CopilotPluginExistingApi },
|
|
1256
|
-
children: [
|
|
1257
|
-
{
|
|
1258
|
-
condition: { equals: CapabilityOptions.copilotPluginApiSpec().id },
|
|
1259
|
-
data: apiSpecLocationQuestion(),
|
|
1260
|
-
},
|
|
1261
|
-
{
|
|
1262
|
-
condition: { equals: CapabilityOptions.copilotPluginOpenAIPlugin().id },
|
|
1263
|
-
data: openAIPluginManifestLocationQuestion(),
|
|
1264
|
-
},
|
|
1265
|
-
{
|
|
1266
|
-
data: apiOperationQuestion(),
|
|
1267
|
-
},
|
|
1268
|
-
],
|
|
1269
|
-
},
|
|
1270
|
-
{
|
|
1271
|
-
// programming language
|
|
1272
|
-
data: programmingLanguageQuestion(),
|
|
1273
|
-
condition: {
|
|
1274
|
-
excludesEnum: [
|
|
1275
|
-
CapabilityOptions.copilotPluginApiSpec().id,
|
|
1276
|
-
CapabilityOptions.copilotPluginOpenAIPlugin().id,
|
|
1277
|
-
],
|
|
1278
|
-
},
|
|
1279
|
-
},
|
|
1280
|
-
{
|
|
1281
|
-
// root folder
|
|
1282
|
-
data: rootFolderQuestion(),
|
|
1283
|
-
},
|
|
1284
|
-
{
|
|
1285
|
-
// app name
|
|
1286
|
-
data: appNameQuestion(),
|
|
1287
|
-
},
|
|
1288
|
-
],
|
|
1345
|
+
data: {
|
|
1346
|
+
type: "folder",
|
|
1347
|
+
name: questionNames_1.QuestionNames.OfficeAddinFolder,
|
|
1348
|
+
title: "Existing add-in project folder",
|
|
1349
|
+
},
|
|
1289
1350
|
},
|
|
1290
1351
|
{
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
var _a;
|
|
1297
|
-
return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.websiteUrl)) || [])
|
|
1298
|
-
.length > 0;
|
|
1299
|
-
},
|
|
1300
|
-
data: selectTabWebsiteUrlQuestion(),
|
|
1301
|
-
},
|
|
1302
|
-
{
|
|
1303
|
-
condition: (inputs) => {
|
|
1304
|
-
var _a;
|
|
1305
|
-
return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.contentUrl)) || [])
|
|
1306
|
-
.length > 0;
|
|
1307
|
-
},
|
|
1308
|
-
data: selectTabsContentUrlQuestion(),
|
|
1309
|
-
},
|
|
1310
|
-
],
|
|
1352
|
+
data: {
|
|
1353
|
+
type: "singleFile",
|
|
1354
|
+
name: questionNames_1.QuestionNames.OfficeAddinManifest,
|
|
1355
|
+
title: "Select import project manifest file",
|
|
1356
|
+
},
|
|
1311
1357
|
},
|
|
1358
|
+
],
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
// office addin other items sub-tree
|
|
1362
|
+
condition: {
|
|
1363
|
+
enum: CapabilityOptions.officeAddinItems().map((i) => i.id),
|
|
1364
|
+
},
|
|
1365
|
+
data: officeAddinHostingQuestion(),
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
// Copilot plugin sub-tree (will show in CLI only)
|
|
1369
|
+
condition: (inputs) => {
|
|
1370
|
+
return (teamsfx_api_1.CLIPlatforms.includes(inputs.platform) &&
|
|
1371
|
+
inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginCli().id);
|
|
1372
|
+
},
|
|
1373
|
+
data: copilotPluginDevelopmentQuestion(),
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
// Copilot plugin from API spec or AI Plugin
|
|
1377
|
+
condition: (inputs) => {
|
|
1378
|
+
return constants_3.copilotPluginExistingApiOptionIds.includes(getCopilotPluginFeatureId(inputs));
|
|
1379
|
+
},
|
|
1380
|
+
data: { type: "group", name: questionNames_1.QuestionNames.CopilotPluginExistingApi },
|
|
1381
|
+
children: [
|
|
1312
1382
|
{
|
|
1313
1383
|
condition: (inputs) => {
|
|
1314
|
-
|
|
1315
|
-
return appDef && utils_2.needBotCode(appDef);
|
|
1384
|
+
return (getCopilotPluginFeatureId(inputs) === CapabilityOptions.copilotPluginApiSpec().id);
|
|
1316
1385
|
},
|
|
1317
|
-
data:
|
|
1386
|
+
data: apiSpecLocationQuestion(),
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
condition: (inputs) => {
|
|
1390
|
+
return (getCopilotPluginFeatureId(inputs) ===
|
|
1391
|
+
CapabilityOptions.copilotPluginOpenAIPlugin().id);
|
|
1392
|
+
},
|
|
1393
|
+
data: openAIPluginManifestLocationQuestion(),
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
data: apiOperationQuestion(),
|
|
1318
1397
|
},
|
|
1319
1398
|
],
|
|
1320
1399
|
},
|
|
1321
1400
|
{
|
|
1322
|
-
|
|
1323
|
-
data:
|
|
1401
|
+
// programming language
|
|
1402
|
+
data: programmingLanguageQuestion(),
|
|
1403
|
+
condition: (inputs) => {
|
|
1404
|
+
const copilotFeature = getCopilotPluginFeatureId(inputs);
|
|
1405
|
+
if (copilotFeature) {
|
|
1406
|
+
return !constants_3.copilotPluginExistingApiOptionIds.includes(getCopilotPluginFeatureId(inputs));
|
|
1407
|
+
}
|
|
1408
|
+
else {
|
|
1409
|
+
return !!inputs[questionNames_1.QuestionNames.Capabilities];
|
|
1410
|
+
}
|
|
1411
|
+
},
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
// root folder
|
|
1415
|
+
data: folderQuestion(),
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
// app name
|
|
1419
|
+
data: appNameQuestion(),
|
|
1420
|
+
},
|
|
1421
|
+
],
|
|
1422
|
+
};
|
|
1423
|
+
return node;
|
|
1424
|
+
}
|
|
1425
|
+
exports.capabilitySubTree = capabilitySubTree;
|
|
1426
|
+
function createProjectQuestionNode() {
|
|
1427
|
+
const createProjectQuestion = {
|
|
1428
|
+
data: { type: "group" },
|
|
1429
|
+
children: [
|
|
1430
|
+
{
|
|
1431
|
+
condition: (inputs) => featureFlags_1.isCLIDotNetEnabled() && teamsfx_api_1.CLIPlatforms.includes(inputs.platform),
|
|
1432
|
+
data: runtimeQuestion(),
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
condition: (inputs) => inputs.platform === teamsfx_api_1.Platform.VSCode,
|
|
1436
|
+
data: projectTypeQuestion(),
|
|
1437
|
+
cliOptionDisabled: "self",
|
|
1438
|
+
},
|
|
1439
|
+
capabilitySubTree(),
|
|
1440
|
+
{
|
|
1441
|
+
condition: (inputs) => inputs.teamsAppFromTdp && utils_2.isPersonalApp(inputs.teamsAppFromTdp),
|
|
1442
|
+
data: { type: "group", name: questionNames_1.QuestionNames.RepalceTabUrl },
|
|
1443
|
+
cliOptionDisabled: "all",
|
|
1444
|
+
inputsDisabled: "all",
|
|
1324
1445
|
children: [
|
|
1325
1446
|
{
|
|
1326
|
-
|
|
1327
|
-
|
|
1447
|
+
condition: (inputs) => {
|
|
1448
|
+
var _a;
|
|
1449
|
+
return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.websiteUrl)) || []).length >
|
|
1450
|
+
0;
|
|
1451
|
+
},
|
|
1452
|
+
data: selectTabWebsiteUrlQuestion(),
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
condition: (inputs) => {
|
|
1456
|
+
var _a;
|
|
1457
|
+
return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.contentUrl)) || []).length >
|
|
1458
|
+
0;
|
|
1459
|
+
},
|
|
1460
|
+
data: selectTabsContentUrlQuestion(),
|
|
1328
1461
|
},
|
|
1329
1462
|
],
|
|
1330
1463
|
},
|
|
1464
|
+
{
|
|
1465
|
+
condition: (inputs) => {
|
|
1466
|
+
const appDef = inputs.teamsAppFromTdp;
|
|
1467
|
+
return appDef && utils_2.needBotCode(appDef);
|
|
1468
|
+
},
|
|
1469
|
+
data: selectBotIdsQuestion(),
|
|
1470
|
+
cliOptionDisabled: "all",
|
|
1471
|
+
inputsDisabled: "all",
|
|
1472
|
+
},
|
|
1331
1473
|
],
|
|
1332
1474
|
};
|
|
1333
1475
|
return createProjectQuestion;
|
|
1334
1476
|
}
|
|
1335
1477
|
exports.createProjectQuestionNode = createProjectQuestionNode;
|
|
1478
|
+
function createSampleProjectQuestionNode() {
|
|
1479
|
+
return {
|
|
1480
|
+
data: sampleSelectQuestion(),
|
|
1481
|
+
children: [
|
|
1482
|
+
{
|
|
1483
|
+
data: folderQuestion(),
|
|
1484
|
+
},
|
|
1485
|
+
],
|
|
1486
|
+
};
|
|
1487
|
+
}
|
|
1488
|
+
exports.createSampleProjectQuestionNode = createSampleProjectQuestionNode;
|
|
1336
1489
|
function createProjectCliHelpNode() {
|
|
1337
1490
|
const node = lodash_1.cloneDeep(createProjectQuestionNode());
|
|
1338
1491
|
const deleteNames = [
|
|
@@ -1348,10 +1501,10 @@ function createProjectCliHelpNode() {
|
|
|
1348
1501
|
}
|
|
1349
1502
|
if (!featureFlags_1.isCopilotPluginEnabled()) {
|
|
1350
1503
|
deleteNames.push(questionNames_1.QuestionNames.CopilotPluginExistingApi);
|
|
1504
|
+
deleteNames.push(questionNames_1.QuestionNames.CopilotPluginDevelopment);
|
|
1351
1505
|
}
|
|
1352
1506
|
trimQuestionTreeForCliHelp(node, deleteNames);
|
|
1353
|
-
|
|
1354
|
-
return subTree;
|
|
1507
|
+
return node;
|
|
1355
1508
|
}
|
|
1356
1509
|
exports.createProjectCliHelpNode = createProjectCliHelpNode;
|
|
1357
1510
|
function trimQuestionTreeForCliHelp(node, deleteNames) {
|