@microsoft/teamsfx-core 2.0.4-alpha.bdda88800.0 → 2.0.4-alpha.ceeb9e1b9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/constants.d.ts +1 -0
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +1 -0
- package/build/common/constants.js.map +1 -1
- package/build/common/deps-checker/checkerFactory.d.ts +1 -2
- package/build/common/deps-checker/checkerFactory.d.ts.map +1 -1
- package/build/common/deps-checker/checkerFactory.js +2 -2
- package/build/common/deps-checker/checkerFactory.js.map +1 -1
- package/build/common/deps-checker/depsLogger.d.ts +14 -14
- package/build/common/deps-checker/depsLogger.d.ts.map +1 -1
- package/build/common/deps-checker/depsLogger.js +7 -21
- package/build/common/deps-checker/depsLogger.js.map +1 -1
- package/build/common/deps-checker/internal/dotnetChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/dotnetChecker.js +42 -37
- package/build/common/deps-checker/internal/dotnetChecker.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js +2 -2
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +8 -8
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/common/deps-checker/internal/vxTestAppChecker.js +1 -1
- package/build/common/deps-checker/internal/vxTestAppChecker.js.map +1 -1
- package/build/common/deps-checker/util/cpUtils.d.ts +1 -1
- package/build/common/deps-checker/util/cpUtils.d.ts.map +1 -1
- package/build/common/deps-checker/util/cpUtils.js +5 -5
- package/build/common/deps-checker/util/cpUtils.js.map +1 -1
- package/build/common/deps-checker/util/fileHelper.d.ts.map +1 -1
- package/build/common/deps-checker/util/fileHelper.js +2 -0
- package/build/common/deps-checker/util/fileHelper.js.map +1 -1
- package/build/common/deps-checker/util/progressIndicator.js +2 -2
- package/build/common/deps-checker/util/progressIndicator.js.map +1 -1
- package/build/common/featureFlags.d.ts +1 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +5 -1
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/jsonUtils.d.ts.map +1 -1
- package/build/common/jsonUtils.js +2 -0
- package/build/common/jsonUtils.js.map +1 -1
- package/build/common/local/localCertificateManager.d.ts.map +1 -1
- package/build/common/local/localCertificateManager.js +4 -1
- package/build/common/local/localCertificateManager.js.map +1 -1
- package/build/common/local/packageJsonHelper.d.ts.map +1 -1
- package/build/common/local/packageJsonHelper.js +1 -0
- package/build/common/local/packageJsonHelper.js.map +1 -1
- package/build/common/local/portChecker.js.map +1 -1
- package/build/common/m365/launchHelper.d.ts +2 -2
- package/build/common/m365/launchHelper.d.ts.map +1 -1
- package/build/common/m365/launchHelper.js +24 -6
- package/build/common/m365/launchHelper.js.map +1 -1
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +52 -13
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -0
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/samples.d.ts +13 -5
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +60 -38
- package/build/common/samples.js.map +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts +5 -0
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +1 -0
- package/build/common/spec-parser/adaptiveCardGenerator.js +120 -0
- package/build/common/spec-parser/adaptiveCardGenerator.js.map +1 -0
- package/build/common/spec-parser/constants.d.ts +19 -1
- package/build/common/spec-parser/constants.d.ts.map +1 -1
- package/build/common/spec-parser/constants.js +43 -1
- package/build/common/spec-parser/constants.js.map +1 -1
- package/build/common/spec-parser/interfaces.d.ts +72 -14
- package/build/common/spec-parser/interfaces.d.ts.map +1 -1
- package/build/common/spec-parser/interfaces.js +21 -10
- package/build/common/spec-parser/interfaces.js.map +1 -1
- package/build/common/spec-parser/manifestUpdater.d.ts +6 -0
- package/build/common/spec-parser/manifestUpdater.d.ts.map +1 -0
- package/build/common/spec-parser/manifestUpdater.js +119 -0
- package/build/common/spec-parser/manifestUpdater.js.map +1 -0
- package/build/common/spec-parser/specFilter.d.ts +3 -0
- package/build/common/spec-parser/specFilter.d.ts.map +1 -0
- package/build/common/spec-parser/specFilter.js +40 -0
- package/build/common/spec-parser/specFilter.js.map +1 -0
- package/build/common/spec-parser/specParser.d.ts +15 -5
- package/build/common/spec-parser/specParser.d.ts.map +1 -1
- package/build/common/spec-parser/specParser.js +183 -34
- package/build/common/spec-parser/specParser.js.map +1 -1
- package/build/common/spec-parser/utils.d.ts +28 -0
- package/build/common/spec-parser/utils.d.ts.map +1 -0
- package/build/common/spec-parser/utils.js +242 -0
- package/build/common/spec-parser/utils.js.map +1 -0
- package/build/common/telemetry.d.ts +7 -5
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +40 -15
- package/build/common/telemetry.js.map +1 -1
- package/build/common/tools.js +2 -2
- package/build/common/tools.js.map +1 -1
- package/build/common/utils.d.ts +1 -0
- package/build/common/utils.d.ts.map +1 -1
- package/build/common/utils.js +5 -1
- package/build/common/utils.js.map +1 -1
- package/build/component/configManager/constant.d.ts.map +1 -1
- package/build/component/configManager/constant.js +4 -2
- package/build/component/configManager/constant.js.map +1 -1
- package/build/component/configManager/interface.d.ts +5 -1
- package/build/component/configManager/interface.d.ts.map +1 -1
- package/build/component/configManager/interface.js +2 -3
- package/build/component/configManager/interface.js.map +1 -1
- package/build/component/configManager/lifecycle.d.ts +1 -3
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +27 -53
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/configManager/parser.d.ts.map +1 -1
- package/build/component/configManager/parser.js +17 -9
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/configManager/validator.d.ts +0 -3
- package/build/component/configManager/validator.d.ts.map +1 -1
- package/build/component/configManager/validator.js +4 -12
- package/build/component/configManager/validator.js.map +1 -1
- package/build/component/constants.d.ts +10 -0
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +10 -0
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts +12 -8
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +85 -67
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/coordinator/summary.d.ts.map +1 -1
- package/build/component/coordinator/summary.js +4 -1
- package/build/component/coordinator/summary.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +7 -7
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/create.d.ts +1 -0
- package/build/component/driver/aad/create.d.ts.map +1 -1
- package/build/component/driver/aad/create.js +2 -5
- package/build/component/driver/aad/create.js.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.d.ts +3 -0
- package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.js +14 -2
- package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
- package/build/component/driver/aad/interface/AADApplication.js +1 -1
- package/build/component/driver/aad/interface/AADApplication.js.map +1 -1
- package/build/component/driver/aad/interface/AADManifest.js +1 -1
- package/build/component/driver/aad/interface/AADManifest.js.map +1 -1
- package/build/component/driver/aad/update.d.ts +1 -0
- package/build/component/driver/aad/update.d.ts.map +1 -1
- package/build/component/driver/aad/update.js +2 -5
- package/build/component/driver/aad/update.js.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.js +58 -13
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.js +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.js.map +1 -1
- package/build/component/driver/aad/utility/constants.d.ts +3 -0
- package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
- package/build/component/driver/aad/utility/constants.js +4 -1
- package/build/component/driver/aad/utility/constants.js.map +1 -1
- package/build/component/driver/add/addWebPart.d.ts.map +1 -1
- package/build/component/driver/add/addWebPart.js +10 -1
- package/build/component/driver/add/addWebPart.js.map +1 -1
- package/build/component/driver/arm/deploy.d.ts +1 -3
- package/build/component/driver/arm/deploy.d.ts.map +1 -1
- package/build/component/driver/arm/deploy.js +1 -14
- package/build/component/driver/arm/deploy.js.map +1 -1
- package/build/component/driver/arm/deployImpl.d.ts +2 -1
- package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
- package/build/component/driver/arm/deployImpl.js +15 -0
- package/build/component/driver/arm/deployImpl.js.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.d.ts.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.js +9 -6
- package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
- package/build/component/driver/arm/util/handleError.js.map +1 -1
- package/build/component/driver/arm/validator.d.ts.map +1 -1
- package/build/component/driver/arm/validator.js +3 -3
- package/build/component/driver/arm/validator.js.map +1 -1
- package/build/component/driver/botAadApp/create.d.ts +1 -0
- package/build/component/driver/botAadApp/create.d.ts.map +1 -1
- package/build/component/driver/botAadApp/create.js +4 -7
- package/build/component/driver/botAadApp/create.js.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts +1 -0
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.js +8 -12
- package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
- package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.d.ts +0 -2
- package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js +0 -10
- package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.d.ts +0 -2
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js +0 -10
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.d.ts +0 -2
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +17 -19
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js +11 -4
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +29 -16
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +18 -15
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.js +4 -4
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/spfx/deployDriver.d.ts +1 -0
- package/build/component/driver/deploy/spfx/deployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/spfx/deployDriver.js +27 -5
- package/build/component/driver/deploy/spfx/deployDriver.js.map +1 -1
- package/build/component/driver/devTool/installDriver.d.ts +1 -0
- package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
- package/build/component/driver/devTool/installDriver.js +33 -11
- package/build/component/driver/devTool/installDriver.js.map +1 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts +1 -0
- package/build/component/driver/file/createOrUpdateEnvironmentFile.d.ts.map +1 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js +12 -18
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
- package/build/component/driver/file/createOrUpdateJsonFile.d.ts +1 -0
- package/build/component/driver/file/createOrUpdateJsonFile.d.ts.map +1 -1
- package/build/component/driver/file/createOrUpdateJsonFile.js +5 -11
- package/build/component/driver/file/createOrUpdateJsonFile.js.map +1 -1
- package/build/component/driver/interface/stepDriver.d.ts +2 -7
- package/build/component/driver/interface/stepDriver.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.d.ts +1 -0
- package/build/component/driver/m365/acquire.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.js +6 -12
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/script/baseBuildDriver.d.ts.map +1 -1
- package/build/component/driver/script/baseBuildDriver.js +1 -0
- package/build/component/driver/script/baseBuildDriver.js.map +1 -1
- package/build/component/driver/script/baseBuildStepDriver.d.ts +0 -2
- package/build/component/driver/script/baseBuildStepDriver.d.ts.map +1 -1
- package/build/component/driver/script/baseBuildStepDriver.js +0 -4
- package/build/component/driver/script/baseBuildStepDriver.js.map +1 -1
- package/build/component/driver/script/dotnetBuildDriver.d.ts +0 -2
- package/build/component/driver/script/dotnetBuildDriver.d.ts.map +1 -1
- package/build/component/driver/script/dotnetBuildDriver.js +0 -9
- package/build/component/driver/script/dotnetBuildDriver.js.map +1 -1
- package/build/component/driver/script/npmBuildDriver.d.ts +0 -2
- package/build/component/driver/script/npmBuildDriver.d.ts.map +1 -1
- package/build/component/driver/script/npmBuildDriver.js +0 -9
- package/build/component/driver/script/npmBuildDriver.js.map +1 -1
- package/build/component/driver/script/npxBuildDriver.d.ts +0 -2
- package/build/component/driver/script/npxBuildDriver.d.ts.map +1 -1
- package/build/component/driver/script/npxBuildDriver.js +0 -9
- package/build/component/driver/script/npxBuildDriver.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts +10 -1
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +33 -30
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +11 -11
- package/build/component/driver/teamsApp/appStudio.js.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +5 -5
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +31 -11
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.js +2 -0
- package/build/component/driver/teamsApp/clients/authSvcClient.js.map +1 -1
- package/build/component/driver/teamsApp/configure.d.ts +1 -1
- package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
- package/build/component/driver/teamsApp/configure.js +5 -23
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +0 -1
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +1 -2
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts +1 -2
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts.map +1 -1
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.js +4 -11
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.js.map +1 -1
- package/build/component/driver/teamsApp/create.d.ts +1 -1
- package/build/component/driver/teamsApp/create.d.ts.map +1 -1
- package/build/component/driver/teamsApp/create.js +6 -11
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -3
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +43 -29
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
- package/build/component/driver/teamsApp/errors.js +2 -0
- package/build/component/driver/teamsApp/errors.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtension.d.ts +2 -0
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtension.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtensionCommand.d.ts +1 -0
- package/build/component/driver/teamsApp/interfaces/appdefinitions/messagingExtensionCommand.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.d.ts +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +4 -12
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/results.d.ts.map +1 -1
- package/build/component/driver/teamsApp/results.js +2 -0
- package/build/component/driver/teamsApp/results.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +6 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +19 -2
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.d.ts +2 -3
- package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.js +21 -19
- package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts +1 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +2 -10
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +22 -18
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/error/componentError.d.ts +2 -1
- package/build/component/error/componentError.d.ts.map +1 -1
- package/build/component/error/componentError.js +8 -4
- package/build/component/error/componentError.js.map +1 -1
- package/build/component/feature/collaboration.d.ts.map +1 -1
- package/build/component/feature/collaboration.js +53 -24
- package/build/component/feature/collaboration.js.map +1 -1
- package/build/component/feature/createAuthFiles.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts +7 -2
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/generator.js +133 -25
- package/build/component/generator/copilotPlugin/generator.js.map +1 -1
- package/build/component/generator/copilotPlugin/helper.d.ts +12 -12
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/helper.js +214 -28
- package/build/component/generator/copilotPlugin/helper.js.map +1 -1
- package/build/component/generator/error.d.ts +7 -1
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +15 -3
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +31 -22
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +2 -1
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +12 -5
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.js +2 -0
- package/build/component/generator/officeAddin/config/projectProperties.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.js +2 -0
- package/build/component/generator/officeAddin/config/projectsJsonData.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +9 -1
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +11 -5
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.js +12 -12
- package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.d.ts +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.js +10 -10
- package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +16 -14
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +1 -0
- package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/constants.js +2 -0
- package/build/component/generator/spfx/utils/constants.js.map +1 -1
- package/build/component/generator/spfx/utils/utils.js +3 -3
- package/build/component/generator/spfx/utils/utils.js.map +1 -1
- package/build/component/generator/utils.d.ts +12 -4
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +17 -16
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/messages.d.ts +2 -3
- package/build/component/messages.d.ts.map +1 -1
- package/build/component/messages.js +3 -4
- package/build/component/messages.js.map +1 -1
- package/build/component/middleware/actionExecutionMW.d.ts +2 -2
- package/build/component/middleware/actionExecutionMW.d.ts.map +1 -1
- package/build/component/middleware/envMW.js +1 -1
- package/build/component/middleware/envMW.js.map +1 -1
- package/build/component/middleware/questionMW.d.ts +2 -2
- package/build/component/middleware/questionMW.d.ts.map +1 -1
- package/build/component/middleware/questionMW.js +7 -11
- package/build/component/middleware/questionMW.js.map +1 -1
- package/build/component/migrate.d.ts.map +1 -1
- package/build/component/migrate.js +2 -0
- package/build/component/migrate.js.map +1 -1
- package/build/component/provisionUtils.d.ts +3 -3
- package/build/component/provisionUtils.d.ts.map +1 -1
- package/build/component/provisionUtils.js +3 -3
- package/build/component/provisionUtils.js.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.js +24 -2
- package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts +2 -2
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts.map +1 -1
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js +6 -1
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js.map +1 -1
- package/build/component/telemetry.d.ts.map +1 -1
- package/build/component/telemetry.js +3 -6
- package/build/component/telemetry.js.map +1 -1
- package/build/component/utils/ResourceGroupHelper.d.ts +2 -2
- package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/component/utils/ResourceGroupHelper.js +1 -4
- package/build/component/utils/ResourceGroupHelper.js.map +1 -1
- package/build/component/utils/azureResourceOperation.js +2 -2
- package/build/component/utils/azureResourceOperation.js.map +1 -1
- package/build/component/utils/charsetUtils.d.ts.map +1 -1
- package/build/component/utils/charsetUtils.js +5 -3
- package/build/component/utils/charsetUtils.js.map +1 -1
- package/build/component/utils/common.d.ts +1 -1
- package/build/component/utils/common.d.ts.map +1 -1
- package/build/component/utils/common.js +4 -5
- package/build/component/utils/common.js.map +1 -1
- package/build/component/utils/depsChecker/common.d.ts.map +1 -1
- package/build/component/utils/depsChecker/common.js +1 -1
- package/build/component/utils/depsChecker/common.js.map +1 -1
- package/build/component/utils/depsChecker/cpUtils.d.ts.map +1 -1
- package/build/component/utils/depsChecker/cpUtils.js +9 -5
- package/build/component/utils/depsChecker/cpUtils.js.map +1 -1
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +4 -2
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/metadataUtil.d.ts +3 -0
- package/build/component/utils/metadataUtil.d.ts.map +1 -1
- package/build/component/utils/metadataUtil.js +18 -4
- package/build/component/utils/metadataUtil.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts.map +1 -1
- package/build/component/utils/pathUtils.js +2 -0
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/component/utils/teamsFxTelemetryReporter.d.ts.map +1 -1
- package/build/component/utils/teamsFxTelemetryReporter.js +3 -6
- package/build/component/utils/teamsFxTelemetryReporter.js.map +1 -1
- package/build/component/utils.js.map +1 -1
- package/build/core/FxCore.d.ts +44 -32
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +823 -63
- package/build/core/FxCore.js.map +1 -1
- package/build/core/collaborator.d.ts +1 -1
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/collaborator.js +16 -10
- package/build/core/collaborator.js.map +1 -1
- package/build/core/error.d.ts +6 -0
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +23 -1
- package/build/core/error.js.map +1 -1
- package/build/core/globalVars.d.ts +16 -0
- package/build/core/globalVars.d.ts.map +1 -1
- package/build/core/globalVars.js +34 -1
- package/build/core/globalVars.js.map +1 -1
- package/build/core/index.js +1 -0
- package/build/core/index.js.map +1 -1
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +7 -3
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/errorHandler.d.ts +2 -0
- package/build/core/middleware/errorHandler.d.ts.map +1 -1
- package/build/core/middleware/errorHandler.js +16 -25
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts +7 -1
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +35 -34
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.js +8 -8
- package/build/core/middleware/projectVersionChecker.js.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.d.ts.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.js +2 -1
- package/build/core/middleware/utils/appYmlGenerator.js.map +1 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js +3 -2
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js.map +1 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +33 -15
- package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
- package/build/core/middleware/utils/migrationContext.d.ts +1 -0
- package/build/core/middleware/utils/migrationContext.d.ts.map +1 -1
- package/build/core/middleware/utils/migrationContext.js.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.js +6 -2
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/error/arm.d.ts.map +1 -1
- package/build/error/arm.js +2 -0
- package/build/error/arm.js.map +1 -1
- package/build/error/azure.d.ts.map +1 -1
- package/build/error/azure.js +2 -0
- package/build/error/azure.js.map +1 -1
- package/build/error/common.d.ts +8 -2
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +129 -22
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +2 -0
- package/build/error/deploy.js.map +1 -1
- package/build/error/index.d.ts.map +1 -1
- package/build/error/index.js +2 -0
- package/build/error/index.js.map +1 -1
- package/build/error/m365.d.ts.map +1 -1
- package/build/error/m365.js +2 -0
- package/build/error/m365.js.map +1 -1
- package/build/error/script.d.ts.map +1 -1
- package/build/error/script.js +2 -0
- package/build/error/script.js.map +1 -1
- package/build/error/upgrade.d.ts.map +1 -1
- package/build/error/upgrade.js +2 -0
- package/build/error/upgrade.js.map +1 -1
- package/build/error/yml.d.ts.map +1 -1
- package/build/error/yml.js +2 -0
- package/build/error/yml.js.map +1 -1
- package/build/failpoint/index.d.ts.map +1 -1
- package/build/failpoint/index.js +2 -0
- package/build/failpoint/index.js.map +1 -1
- package/build/failpoint/marker.d.ts.map +1 -1
- package/build/failpoint/marker.js +2 -0
- package/build/failpoint/marker.js.map +1 -1
- package/build/failpoint/runtime.d.ts.map +1 -1
- package/build/failpoint/runtime.js +3 -4
- package/build/failpoint/runtime.js.map +1 -1
- package/build/index.d.ts +4 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5 -1
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +4 -0
- package/build/question/constants.d.ts.map +1 -0
- package/build/question/constants.js +12 -0
- package/build/question/constants.js.map +1 -0
- package/build/question/create.d.ts +14 -15
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +465 -313
- package/build/question/create.js.map +1 -1
- package/build/question/generator.d.ts +4 -0
- package/build/question/generator.d.ts.map +1 -0
- package/build/question/generator.js +365 -0
- package/build/question/generator.js.map +1 -0
- package/build/question/index.d.ts +18 -28
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +18 -44
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/CreateEnvInputs.d.ts +14 -0
- package/build/question/inputs/CreateEnvInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateEnvInputs.js +5 -0
- package/build/question/inputs/CreateEnvInputs.js.map +1 -0
- package/build/question/inputs/CreateProjectInputs.d.ts +40 -0
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateProjectInputs.js +5 -0
- package/build/question/inputs/CreateProjectInputs.js.map +1 -0
- package/build/question/inputs/CreateSampleProjectInputs.d.ts +12 -0
- package/build/question/inputs/CreateSampleProjectInputs.d.ts.map +1 -0
- package/build/question/inputs/CreateSampleProjectInputs.js +5 -0
- package/build/question/inputs/CreateSampleProjectInputs.js.map +1 -0
- package/build/question/inputs/DeployAadManifestInputs.d.ts +14 -0
- package/build/question/inputs/DeployAadManifestInputs.d.ts.map +1 -0
- package/build/question/inputs/DeployAadManifestInputs.js +5 -0
- package/build/question/inputs/DeployAadManifestInputs.js.map +1 -0
- package/build/question/inputs/PermissionGrantInputs.d.ts +18 -0
- package/build/question/inputs/PermissionGrantInputs.d.ts.map +1 -0
- package/build/question/inputs/PermissionGrantInputs.js +5 -0
- package/build/question/inputs/PermissionGrantInputs.js.map +1 -0
- package/build/question/inputs/PermissionListInputs.d.ts +16 -0
- package/build/question/inputs/PermissionListInputs.d.ts.map +1 -0
- package/build/question/inputs/PermissionListInputs.js +5 -0
- package/build/question/inputs/PermissionListInputs.js.map +1 -0
- package/build/question/inputs/PreviewTeamsAppInputs.d.ts +14 -0
- package/build/question/inputs/PreviewTeamsAppInputs.d.ts.map +1 -0
- package/build/question/inputs/PreviewTeamsAppInputs.js +5 -0
- package/build/question/inputs/PreviewTeamsAppInputs.js.map +1 -0
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts +18 -0
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts.map +1 -0
- package/build/question/inputs/SPFxAddWebpartInputs.js +5 -0
- package/build/question/inputs/SPFxAddWebpartInputs.js.map +1 -0
- package/build/question/inputs/SelectTeamsManifestInputs.d.ts +12 -0
- package/build/question/inputs/SelectTeamsManifestInputs.d.ts.map +1 -0
- package/build/question/inputs/SelectTeamsManifestInputs.js +5 -0
- package/build/question/inputs/SelectTeamsManifestInputs.js.map +1 -0
- package/build/question/inputs/ValidateTeamsAppInputs.d.ts +14 -0
- package/build/question/inputs/ValidateTeamsAppInputs.d.ts.map +1 -0
- package/build/question/inputs/ValidateTeamsAppInputs.js +5 -0
- package/build/question/inputs/ValidateTeamsAppInputs.js.map +1 -0
- package/build/question/inputs/index.d.ts +11 -0
- package/build/question/inputs/index.d.ts.map +1 -0
- package/build/question/inputs/index.js +16 -0
- package/build/question/inputs/index.js.map +1 -0
- package/build/question/options/CreateEnvOptions.d.ts +10 -0
- package/build/question/options/CreateEnvOptions.d.ts.map +1 -0
- package/build/question/options/CreateEnvOptions.js +24 -0
- package/build/question/options/CreateEnvOptions.js.map +1 -0
- package/build/question/options/CreateProjectOptions.d.ts +10 -0
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -0
- package/build/question/options/CreateProjectOptions.js +137 -0
- package/build/question/options/CreateProjectOptions.js.map +1 -0
- package/build/question/options/CreateSampleProjectOptions.d.ts +10 -0
- package/build/question/options/CreateSampleProjectOptions.d.ts.map +1 -0
- package/build/question/options/CreateSampleProjectOptions.js +52 -0
- package/build/question/options/CreateSampleProjectOptions.js.map +1 -0
- package/build/question/options/DeployAadManifestOptions.d.ts +10 -0
- package/build/question/options/DeployAadManifestOptions.d.ts.map +1 -0
- package/build/question/options/DeployAadManifestOptions.js +21 -0
- package/build/question/options/DeployAadManifestOptions.js.map +1 -0
- package/build/question/options/PermissionGrantOptions.d.ts +10 -0
- package/build/question/options/PermissionGrantOptions.d.ts.map +1 -0
- package/build/question/options/PermissionGrantOptions.js +33 -0
- package/build/question/options/PermissionGrantOptions.js.map +1 -0
- package/build/question/options/PermissionListOptions.d.ts +10 -0
- package/build/question/options/PermissionListOptions.d.ts.map +1 -0
- package/build/question/options/PermissionListOptions.js +28 -0
- package/build/question/options/PermissionListOptions.js.map +1 -0
- package/build/question/options/PreviewTeamsAppOptions.d.ts +10 -0
- package/build/question/options/PreviewTeamsAppOptions.d.ts.map +1 -0
- package/build/question/options/PreviewTeamsAppOptions.js +26 -0
- package/build/question/options/PreviewTeamsAppOptions.js.map +1 -0
- package/build/question/options/SPFxAddWebpartOptions.d.ts +10 -0
- package/build/question/options/SPFxAddWebpartOptions.d.ts.map +1 -0
- package/build/question/options/SPFxAddWebpartOptions.js +37 -0
- package/build/question/options/SPFxAddWebpartOptions.js.map +1 -0
- package/build/question/options/SelectTeamsManifestOptions.d.ts +10 -0
- package/build/question/options/SelectTeamsManifestOptions.d.ts.map +1 -0
- package/build/question/options/SelectTeamsManifestOptions.js +17 -0
- package/build/question/options/SelectTeamsManifestOptions.js.map +1 -0
- package/build/question/options/ValidateTeamsAppOptions.d.ts +10 -0
- package/build/question/options/ValidateTeamsAppOptions.d.ts.map +1 -0
- package/build/question/options/ValidateTeamsAppOptions.js +23 -0
- package/build/question/options/ValidateTeamsAppOptions.js.map +1 -0
- package/build/question/options/index.d.ts +11 -0
- package/build/question/options/index.d.ts.map +1 -0
- package/build/question/options/index.js +16 -0
- package/build/question/options/index.js.map +1 -0
- package/build/question/other.d.ts +13 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +134 -26
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +7 -2
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +11 -3
- package/build/question/questionNames.js.map +1 -1
- package/build/question/util.d.ts.map +1 -1
- package/build/question/util.js +2 -2
- package/build/question/util.js.map +1 -1
- package/build/ui/validationUtils.d.ts +31 -0
- package/build/ui/validationUtils.d.ts.map +1 -0
- package/build/ui/validationUtils.js +297 -0
- package/build/ui/validationUtils.js.map +1 -0
- package/build/ui/visitor.d.ts +13 -1
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +264 -215
- package/build/ui/visitor.js.map +1 -1
- package/package.json +21 -14
- package/resource/package.nls.json +58 -18
- package/resource/yaml-schema/v1.2/yaml.schema.json +1474 -0
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/plugins/resource/aad/auth/V3/Tab/GetUserProfile.razor +1 -2
- package/templates/plugins/resource/aad/auth/bot/README.md +281 -263
- package/templates/plugins/resource/aad/auth/bot/js/sso/handleMessageExtensionQueryWithToken.js +13 -3
- package/templates/plugins/resource/aad/auth/bot/js/sso/profileSsoCommandHandler.js +14 -5
- package/templates/plugins/resource/aad/auth/bot/ts/sso/handleMessageExtensionQueryWithToken.ts +11 -3
- package/templates/plugins/resource/aad/auth/bot/ts/sso/profileSsoCommandHandler.ts +12 -3
- package/templates/plugins/resource/aad/auth/tab/csharp/GetUserProfile.razor +1 -2
- package/build/common/samples-config-v3.json +0 -233
- package/build/component/configManager/diagnostic.d.ts +0 -9
- package/build/component/configManager/diagnostic.d.ts.map +0 -1
- package/build/component/configManager/diagnostic.js +0 -47
- package/build/component/configManager/diagnostic.js.map +0 -1
- package/build/component/driver/middleware/updateProgress.d.ts +0 -6
- package/build/component/driver/middleware/updateProgress.d.ts.map +0 -1
- package/build/component/driver/middleware/updateProgress.js +0 -15
- package/build/component/driver/middleware/updateProgress.js.map +0 -1
- package/build/core/FxCoreImplementV3.d.ts +0 -43
- package/build/core/FxCoreImplementV3.d.ts.map +0 -1
- package/build/core/FxCoreImplementV3.js +0 -653
- package/build/core/FxCoreImplementV3.js.map +0 -1
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,8 @@ function SPFxWebpartNameQuestion() {
|
|
|
659
724
|
return {
|
|
660
725
|
type: "text",
|
|
661
726
|
name: questionNames_1.QuestionNames.SPFxWebpartName,
|
|
662
|
-
|
|
727
|
+
cliShortName: "w",
|
|
728
|
+
title: "Name for SharePoint Framework Web Part.",
|
|
663
729
|
default: constants_2.Constants.DEFAULT_WEBPART_NAME,
|
|
664
730
|
validation: {
|
|
665
731
|
validFunc: async (input, previousInputs) => {
|
|
@@ -690,65 +756,12 @@ var SPFxVersionOptionIds;
|
|
|
690
756
|
SPFxVersionOptionIds["installLocally"] = "true";
|
|
691
757
|
SPFxVersionOptionIds["globalPackage"] = "false";
|
|
692
758
|
})(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
759
|
function SPFxImportFolderQuestion(hasDefaultFunc = false) {
|
|
748
760
|
return {
|
|
749
761
|
type: "folder",
|
|
750
762
|
name: questionNames_1.QuestionNames.SPFxFolder,
|
|
751
763
|
title: localizeUtils_1.getLocalizedString("core.spfxFolder.title"),
|
|
764
|
+
cliDescription: "Directory or Path that contains the existing SharePoint Framework solution.",
|
|
752
765
|
placeholder: localizeUtils_1.getLocalizedString("core.spfxFolder.placeholder"),
|
|
753
766
|
default: hasDefaultFunc
|
|
754
767
|
? (inputs) => {
|
|
@@ -764,7 +777,7 @@ const getTemplate = (inputs) => {
|
|
|
764
777
|
const capabilities = inputs[questionNames_1.QuestionNames.Capabilities];
|
|
765
778
|
const templates = officeAddinJsonData.getProjectTemplateNames();
|
|
766
779
|
const foundTemplate = templates.find((template) => {
|
|
767
|
-
return capabilities.includes(template);
|
|
780
|
+
return capabilities && capabilities.includes(template);
|
|
768
781
|
});
|
|
769
782
|
return foundTemplate !== null && foundTemplate !== void 0 ? foundTemplate : "";
|
|
770
783
|
};
|
|
@@ -775,7 +788,7 @@ function officeAddinHostingQuestion() {
|
|
|
775
788
|
name: questionNames_1.QuestionNames.OfficeAddinHost,
|
|
776
789
|
title: "Add-in Host",
|
|
777
790
|
staticOptions: [],
|
|
778
|
-
dynamicOptions:
|
|
791
|
+
dynamicOptions: (inputs) => {
|
|
779
792
|
const template = exports.getTemplate(inputs);
|
|
780
793
|
const getHostTemplateNames = officeAddinJsonData.getHostTemplateNames(template);
|
|
781
794
|
const options = getHostTemplateNames.map((host) => ({
|
|
@@ -784,7 +797,7 @@ function officeAddinHostingQuestion() {
|
|
|
784
797
|
}));
|
|
785
798
|
return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
|
|
786
799
|
},
|
|
787
|
-
default:
|
|
800
|
+
default: (inputs) => {
|
|
788
801
|
const template = exports.getTemplate(inputs);
|
|
789
802
|
const options = officeAddinJsonData.getHostTemplateNames(template);
|
|
790
803
|
return options[0] || "No Options";
|
|
@@ -793,6 +806,7 @@ function officeAddinHostingQuestion() {
|
|
|
793
806
|
};
|
|
794
807
|
return OfficeHostQuestion;
|
|
795
808
|
}
|
|
809
|
+
exports.officeAddinHostingQuestion = officeAddinHostingQuestion;
|
|
796
810
|
const officeAddinJsonData = new projectsJsonData_1.default();
|
|
797
811
|
function getLanguageOptions(inputs) {
|
|
798
812
|
const runtime = getRuntime(inputs);
|
|
@@ -829,7 +843,8 @@ var ProgrammingLanguage;
|
|
|
829
843
|
function programmingLanguageQuestion() {
|
|
830
844
|
const programmingLanguageQuestion = {
|
|
831
845
|
name: questionNames_1.QuestionNames.ProgrammingLanguage,
|
|
832
|
-
|
|
846
|
+
cliShortName: "l",
|
|
847
|
+
title: "Programming Language.",
|
|
833
848
|
type: "singleSelect",
|
|
834
849
|
staticOptions: [
|
|
835
850
|
{ id: ProgrammingLanguage.JS, label: "JavaScript" },
|
|
@@ -866,21 +881,30 @@ function programmingLanguageQuestion() {
|
|
|
866
881
|
return programmingLanguageQuestion;
|
|
867
882
|
}
|
|
868
883
|
exports.programmingLanguageQuestion = programmingLanguageQuestion;
|
|
869
|
-
function
|
|
884
|
+
function folderQuestion() {
|
|
870
885
|
return {
|
|
871
886
|
type: "folder",
|
|
872
887
|
name: questionNames_1.QuestionNames.Folder,
|
|
873
|
-
|
|
888
|
+
cliShortName: "f",
|
|
889
|
+
title: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
|
|
890
|
+
? "Directory where the project folder will be created in"
|
|
891
|
+
: localizeUtils_1.getLocalizedString("core.question.workspaceFolder.title"),
|
|
892
|
+
cliDescription: "Directory where the project folder will be created in.",
|
|
874
893
|
placeholder: localizeUtils_1.getLocalizedString("core.question.workspaceFolder.placeholder"),
|
|
875
|
-
default:
|
|
894
|
+
default: (inputs) => teamsfx_api_1.CLIPlatforms.includes(inputs.platform)
|
|
895
|
+
? "./"
|
|
896
|
+
: path.join(os.homedir(), constants_1.ConstantString.RootFolder),
|
|
876
897
|
};
|
|
877
898
|
}
|
|
899
|
+
exports.folderQuestion = folderQuestion;
|
|
878
900
|
exports.AppNamePattern = '^(?=(.*[\\da-zA-Z]){2})[a-zA-Z][^"<>:\\?/*&|\u0000-\u001F]*[^"\\s.<>:\\?/*&|\u0000-\u001F]$';
|
|
879
901
|
function appNameQuestion() {
|
|
880
902
|
const question = {
|
|
881
903
|
type: "text",
|
|
882
904
|
name: questionNames_1.QuestionNames.AppName,
|
|
905
|
+
cliShortName: "n",
|
|
883
906
|
title: "Application name",
|
|
907
|
+
required: true,
|
|
884
908
|
default: async (inputs) => {
|
|
885
909
|
var _a, _b;
|
|
886
910
|
let defaultName = undefined;
|
|
@@ -890,6 +914,9 @@ function appNameQuestion() {
|
|
|
890
914
|
else if (inputs[questionNames_1.QuestionNames.SPFxSolution] == "import") {
|
|
891
915
|
defaultName = await spfxGenerator_1.SPFxGenerator.getSolutionName(inputs[questionNames_1.QuestionNames.SPFxFolder]);
|
|
892
916
|
}
|
|
917
|
+
else if (inputs.openAIPluginManifest) {
|
|
918
|
+
defaultName = inputs.openAIPluginManifest.name_for_human;
|
|
919
|
+
}
|
|
893
920
|
return defaultName;
|
|
894
921
|
},
|
|
895
922
|
validation: {
|
|
@@ -929,6 +956,11 @@ function sampleSelectQuestion() {
|
|
|
929
956
|
return {
|
|
930
957
|
type: "singleSelect",
|
|
931
958
|
name: questionNames_1.QuestionNames.Samples,
|
|
959
|
+
cliName: "sample-name",
|
|
960
|
+
cliDescription: "Specifies the Teams App sample name.",
|
|
961
|
+
cliChoiceListCommand: "teamsfx list samples",
|
|
962
|
+
skipValidation: true,
|
|
963
|
+
cliType: "argument",
|
|
932
964
|
title: localizeUtils_1.getLocalizedString("core.SampleSelect.title"),
|
|
933
965
|
staticOptions: samples_1.sampleProvider.SampleCollection.samples.map((sample) => {
|
|
934
966
|
return {
|
|
@@ -938,6 +970,17 @@ function sampleSelectQuestion() {
|
|
|
938
970
|
detail: sample.shortDescription,
|
|
939
971
|
};
|
|
940
972
|
}),
|
|
973
|
+
dynamicOptions: async () => {
|
|
974
|
+
await samples_1.sampleProvider.fetchSampleConfig();
|
|
975
|
+
return samples_1.sampleProvider.SampleCollection.samples.map((sample) => {
|
|
976
|
+
return {
|
|
977
|
+
id: sample.id,
|
|
978
|
+
label: sample.title,
|
|
979
|
+
description: `${sample.time} • ${sample.configuration}`,
|
|
980
|
+
detail: sample.shortDescription,
|
|
981
|
+
};
|
|
982
|
+
});
|
|
983
|
+
},
|
|
941
984
|
placeholder: localizeUtils_1.getLocalizedString("core.SampleSelect.placeholder"),
|
|
942
985
|
buttons: [
|
|
943
986
|
{
|
|
@@ -973,6 +1016,7 @@ function runtimeQuestion() {
|
|
|
973
1016
|
staticOptions: [RuntimeOptions.NodeJS(), RuntimeOptions.DotNet()],
|
|
974
1017
|
default: RuntimeOptions.NodeJS().id,
|
|
975
1018
|
placeholder: localizeUtils_1.getLocalizedString("core.getRuntimeQuestion.placeholder"),
|
|
1019
|
+
cliHidden: true,
|
|
976
1020
|
};
|
|
977
1021
|
}
|
|
978
1022
|
const defaultTabLocalHostUrl = "https://localhost:53000/index.html#/tab";
|
|
@@ -1064,6 +1108,8 @@ function getBotIdAndMeId(appDefinition) {
|
|
|
1064
1108
|
}
|
|
1065
1109
|
function getBotOptions(inputs) {
|
|
1066
1110
|
const appDefinition = inputs.teamsAppFromTdp;
|
|
1111
|
+
if (!appDefinition)
|
|
1112
|
+
return [];
|
|
1067
1113
|
const [botId, messageExtensionId] = getBotIdAndMeId(appDefinition);
|
|
1068
1114
|
const options = [];
|
|
1069
1115
|
if (botId) {
|
|
@@ -1075,14 +1121,14 @@ function getBotOptions(inputs) {
|
|
|
1075
1121
|
return options;
|
|
1076
1122
|
}
|
|
1077
1123
|
function selectBotIdsQuestion() {
|
|
1078
|
-
const statcOptions = [];
|
|
1079
|
-
statcOptions.push(botOptionItem(false, "000000-0000-0000"));
|
|
1080
|
-
statcOptions.push(botOptionItem(true, "000000-0000-0000"));
|
|
1124
|
+
// const statcOptions: OptionItem[] = [];
|
|
1125
|
+
// statcOptions.push(botOptionItem(false, "000000-0000-0000"));
|
|
1126
|
+
// statcOptions.push(botOptionItem(true, "000000-0000-0000"));
|
|
1081
1127
|
return {
|
|
1082
1128
|
type: "multiSelect",
|
|
1083
1129
|
name: questionNames_1.QuestionNames.ReplaceBotIds,
|
|
1084
1130
|
title: localizeUtils_1.getLocalizedString("core.updateBotIdsQuestion.title"),
|
|
1085
|
-
staticOptions:
|
|
1131
|
+
staticOptions: [],
|
|
1086
1132
|
dynamicOptions: getBotOptions,
|
|
1087
1133
|
default: (inputs) => {
|
|
1088
1134
|
const options = getBotOptions(inputs);
|
|
@@ -1092,21 +1138,58 @@ function selectBotIdsQuestion() {
|
|
|
1092
1138
|
forgetLastValue: true,
|
|
1093
1139
|
};
|
|
1094
1140
|
}
|
|
1095
|
-
|
|
1141
|
+
const maximumLengthOfDetailsErrorMessageInInputBox = 90;
|
|
1142
|
+
function apiSpecLocationQuestion(includeExistingAPIs = true) {
|
|
1143
|
+
const validationOnAccept = async (input, inputs) => {
|
|
1144
|
+
try {
|
|
1145
|
+
const context = utils_4.createContextV3();
|
|
1146
|
+
const res = await helper_1.listOperations(context, undefined, input, inputs[questionNames_1.QuestionNames.ManifestPath], includeExistingAPIs, false);
|
|
1147
|
+
if (res.isOk()) {
|
|
1148
|
+
inputs.supportedApisFromApiSpec = res.value;
|
|
1149
|
+
}
|
|
1150
|
+
else {
|
|
1151
|
+
const errors = res.error;
|
|
1152
|
+
if ((inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI) {
|
|
1153
|
+
return errors.map((e) => e.content).join("\n");
|
|
1154
|
+
}
|
|
1155
|
+
if (errors.length === 1 &&
|
|
1156
|
+
errors[0].content.length <= maximumLengthOfDetailsErrorMessageInInputBox) {
|
|
1157
|
+
return errors[0].content;
|
|
1158
|
+
}
|
|
1159
|
+
else {
|
|
1160
|
+
return inputs.platform === teamsfx_api_1.Platform.VSCode
|
|
1161
|
+
? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.vscode.message")
|
|
1162
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.multipleValidationErrors.message");
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
catch (e) {
|
|
1167
|
+
const error = error_2.assembleError(e);
|
|
1168
|
+
throw error;
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1096
1171
|
return {
|
|
1097
1172
|
type: "singleFileOrText",
|
|
1098
1173
|
name: questionNames_1.QuestionNames.ApiSpecLocation,
|
|
1174
|
+
cliShortName: "a",
|
|
1175
|
+
cliDescription: "OpenAPI specification file location.",
|
|
1099
1176
|
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.title"),
|
|
1100
1177
|
forgetLastValue: true,
|
|
1101
1178
|
inputBoxConfig: {
|
|
1179
|
+
type: "innerText",
|
|
1102
1180
|
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.title"),
|
|
1103
1181
|
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.placeholder"),
|
|
1104
1182
|
name: "input-api-spec-url",
|
|
1105
1183
|
step: 2,
|
|
1106
|
-
validation:
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1184
|
+
validation: {
|
|
1185
|
+
validFunc: (input, inputs) => {
|
|
1186
|
+
const result = util_1.isValidHttpUrl(input)
|
|
1187
|
+
? undefined
|
|
1188
|
+
: (inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI
|
|
1189
|
+
? "Please enter a valid URL or local path of your API Specification"
|
|
1190
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.invalidUrl.message");
|
|
1191
|
+
return Promise.resolve(result);
|
|
1192
|
+
},
|
|
1110
1193
|
},
|
|
1111
1194
|
},
|
|
1112
1195
|
inputOptionItem: {
|
|
@@ -1116,223 +1199,292 @@ function apiSpecLocationQuestion() {
|
|
|
1116
1199
|
filters: {
|
|
1117
1200
|
files: ["json", "yml", "yaml"],
|
|
1118
1201
|
},
|
|
1202
|
+
validation: {
|
|
1203
|
+
validFunc: async (input, inputs) => {
|
|
1204
|
+
if (!util_1.isValidHttpUrl(input) && !(await fs_extra_1.default.pathExists(input))) {
|
|
1205
|
+
return "Please enter a valid URL or local path of your API Specification";
|
|
1206
|
+
}
|
|
1207
|
+
return await validationOnAccept(input, inputs);
|
|
1208
|
+
},
|
|
1209
|
+
},
|
|
1119
1210
|
};
|
|
1120
1211
|
}
|
|
1212
|
+
exports.apiSpecLocationQuestion = apiSpecLocationQuestion;
|
|
1121
1213
|
function openAIPluginManifestLocationQuestion() {
|
|
1214
|
+
// export for unit test
|
|
1122
1215
|
return {
|
|
1123
1216
|
type: "text",
|
|
1124
|
-
name: questionNames_1.QuestionNames.
|
|
1217
|
+
name: questionNames_1.QuestionNames.OpenAIPluginDomain,
|
|
1218
|
+
cliShortName: "d",
|
|
1125
1219
|
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.AIPluginManifest.title"),
|
|
1126
1220
|
placeholder: localizeUtils_1.getLocalizedString("core.createProjectQuestion.AIPluginManifest.placeholder"),
|
|
1221
|
+
cliDescription: "OpenAI plugin website domain.",
|
|
1127
1222
|
forgetLastValue: true,
|
|
1128
1223
|
validation: {
|
|
1129
|
-
validFunc:
|
|
1130
|
-
|
|
1224
|
+
validFunc: (input) => {
|
|
1225
|
+
const pattern = /(https?:\/\/)?([a-z0-9-]+(\.[a-z0-9-]+)*)(:[0-9]{1,5})?(\/)?$/i;
|
|
1226
|
+
const match = pattern.test(input);
|
|
1227
|
+
const result = match
|
|
1131
1228
|
? undefined
|
|
1132
|
-
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.
|
|
1229
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.invalidDomain.message");
|
|
1230
|
+
return Promise.resolve(result);
|
|
1231
|
+
},
|
|
1232
|
+
},
|
|
1233
|
+
additionalValidationOnAccept: {
|
|
1234
|
+
validFunc: async (input, inputs) => {
|
|
1235
|
+
let manifest;
|
|
1236
|
+
try {
|
|
1237
|
+
manifest = await helper_1.OpenAIPluginManifestHelper.loadOpenAIPluginManifest(input);
|
|
1238
|
+
inputs.openAIPluginManifest = manifest;
|
|
1239
|
+
}
|
|
1240
|
+
catch (e) {
|
|
1241
|
+
const error = error_2.assembleError(e);
|
|
1242
|
+
return error.message;
|
|
1243
|
+
}
|
|
1244
|
+
const context = utils_4.createContextV3();
|
|
1245
|
+
try {
|
|
1246
|
+
const res = await helper_1.listOperations(context, manifest, inputs[questionNames_1.QuestionNames.ApiSpecLocation], undefined, true, true);
|
|
1247
|
+
if (res.isOk()) {
|
|
1248
|
+
inputs.supportedApisFromApiSpec = res.value;
|
|
1249
|
+
}
|
|
1250
|
+
else {
|
|
1251
|
+
const errors = res.error;
|
|
1252
|
+
if ((inputs === null || inputs === void 0 ? void 0 : inputs.platform) === teamsfx_api_1.Platform.CLI) {
|
|
1253
|
+
return errors.map((e) => e.content).join("\n");
|
|
1254
|
+
}
|
|
1255
|
+
if (errors.length === 1 &&
|
|
1256
|
+
errors[0].content.length <= maximumLengthOfDetailsErrorMessageInInputBox) {
|
|
1257
|
+
return errors[0].content;
|
|
1258
|
+
}
|
|
1259
|
+
else {
|
|
1260
|
+
return inputs.platform === teamsfx_api_1.Platform.VSCode
|
|
1261
|
+
? localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.multipleValidationErrors.vscode.message")
|
|
1262
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.openAiPluginManifest.multipleValidationErrors.message");
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
catch (e) {
|
|
1267
|
+
const error = error_2.assembleError(e);
|
|
1268
|
+
throw error;
|
|
1269
|
+
}
|
|
1133
1270
|
},
|
|
1134
1271
|
},
|
|
1135
1272
|
};
|
|
1136
1273
|
}
|
|
1137
|
-
|
|
1274
|
+
exports.openAIPluginManifestLocationQuestion = openAIPluginManifestLocationQuestion;
|
|
1275
|
+
function apiOperationQuestion(includeExistingAPIs = true) {
|
|
1138
1276
|
// export for unit test
|
|
1139
1277
|
return {
|
|
1140
1278
|
type: "multiSelect",
|
|
1141
1279
|
name: questionNames_1.QuestionNames.ApiOperation,
|
|
1142
1280
|
title: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.title"),
|
|
1143
|
-
|
|
1281
|
+
cliDescription: "Specifies API(s) to be used in Copilot plugin.",
|
|
1282
|
+
cliShortName: "o",
|
|
1283
|
+
placeholder: includeExistingAPIs
|
|
1284
|
+
? localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder")
|
|
1285
|
+
: localizeUtils_1.getLocalizedString("core.createProjectQuestion.apiSpec.operation.placeholder.skipExisting"),
|
|
1144
1286
|
forgetLastValue: true,
|
|
1145
1287
|
staticOptions: [],
|
|
1146
1288
|
validation: {
|
|
1147
1289
|
minItems: 1,
|
|
1148
1290
|
},
|
|
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;
|
|
1291
|
+
dynamicOptions: (inputs) => {
|
|
1292
|
+
if (!inputs.supportedApisFromApiSpec) {
|
|
1293
|
+
throw new error_2.EmptyOptionError(questionNames_1.QuestionNames.ApiOperation, "question");
|
|
1170
1294
|
}
|
|
1295
|
+
const operations = inputs.supportedApisFromApiSpec;
|
|
1296
|
+
return operations;
|
|
1171
1297
|
},
|
|
1172
1298
|
};
|
|
1173
1299
|
}
|
|
1174
1300
|
exports.apiOperationQuestion = apiOperationQuestion;
|
|
1175
|
-
function
|
|
1176
|
-
|
|
1177
|
-
|
|
1301
|
+
function getCopilotPluginFeatureId(inputs) {
|
|
1302
|
+
if (teamsfx_api_1.CLIPlatforms.includes(inputs.platform)) {
|
|
1303
|
+
return inputs[questionNames_1.QuestionNames.CopilotPluginDevelopment];
|
|
1304
|
+
}
|
|
1305
|
+
else {
|
|
1306
|
+
return inputs[questionNames_1.QuestionNames.Capabilities];
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
function capabilitySubTree() {
|
|
1310
|
+
const node = {
|
|
1311
|
+
data: capabilityQuestion(),
|
|
1178
1312
|
children: [
|
|
1179
1313
|
{
|
|
1180
|
-
|
|
1181
|
-
|
|
1314
|
+
// Notification bot trigger sub-tree
|
|
1315
|
+
condition: { equals: CapabilityOptions.notificationBot().id },
|
|
1316
|
+
data: botTriggerQuestion(),
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
// SPFx sub-tree
|
|
1320
|
+
condition: { equals: CapabilityOptions.SPFxTab().id },
|
|
1321
|
+
data: SPFxSolutionQuestion(),
|
|
1182
1322
|
children: [
|
|
1183
1323
|
{
|
|
1184
|
-
|
|
1185
|
-
|
|
1324
|
+
data: { type: "group" },
|
|
1325
|
+
children: [
|
|
1326
|
+
{ data: SPFxPackageSelectQuestion() },
|
|
1327
|
+
{ data: SPFxFrameworkQuestion() },
|
|
1328
|
+
{ data: SPFxWebpartNameQuestion() },
|
|
1329
|
+
],
|
|
1330
|
+
condition: { equals: "new" },
|
|
1186
1331
|
},
|
|
1187
1332
|
{
|
|
1188
|
-
|
|
1189
|
-
|
|
1333
|
+
data: SPFxImportFolderQuestion(),
|
|
1334
|
+
condition: { equals: "import" },
|
|
1190
1335
|
},
|
|
1336
|
+
],
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
// office addin import sub-tree
|
|
1340
|
+
condition: { equals: CapabilityOptions.officeAddinImport().id },
|
|
1341
|
+
data: { type: "group", name: questionNames_1.QuestionNames.OfficeAddinImport },
|
|
1342
|
+
children: [
|
|
1191
1343
|
{
|
|
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
|
-
],
|
|
1344
|
+
data: {
|
|
1345
|
+
type: "folder",
|
|
1346
|
+
name: questionNames_1.QuestionNames.OfficeAddinFolder,
|
|
1347
|
+
title: "Existing add-in project folder",
|
|
1348
|
+
},
|
|
1289
1349
|
},
|
|
1290
1350
|
{
|
|
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
|
-
],
|
|
1351
|
+
data: {
|
|
1352
|
+
type: "singleFile",
|
|
1353
|
+
name: questionNames_1.QuestionNames.OfficeAddinManifest,
|
|
1354
|
+
title: "Select import project manifest file",
|
|
1355
|
+
},
|
|
1311
1356
|
},
|
|
1357
|
+
],
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
// office addin other items sub-tree
|
|
1361
|
+
condition: {
|
|
1362
|
+
enum: CapabilityOptions.officeAddinItems().map((i) => i.id),
|
|
1363
|
+
},
|
|
1364
|
+
data: officeAddinHostingQuestion(),
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
// Copilot plugin sub-tree (will show in CLI only)
|
|
1368
|
+
condition: (inputs) => {
|
|
1369
|
+
return (teamsfx_api_1.CLIPlatforms.includes(inputs.platform) &&
|
|
1370
|
+
inputs[questionNames_1.QuestionNames.Capabilities] === CapabilityOptions.copilotPluginCli().id);
|
|
1371
|
+
},
|
|
1372
|
+
data: copilotPluginDevelopmentQuestion(),
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
// Copilot plugin from API spec or AI Plugin
|
|
1376
|
+
condition: (inputs) => {
|
|
1377
|
+
return constants_3.copilotPluginExistingApiOptionIds.includes(getCopilotPluginFeatureId(inputs));
|
|
1378
|
+
},
|
|
1379
|
+
data: { type: "group", name: questionNames_1.QuestionNames.CopilotPluginExistingApi },
|
|
1380
|
+
children: [
|
|
1312
1381
|
{
|
|
1313
1382
|
condition: (inputs) => {
|
|
1314
|
-
|
|
1315
|
-
return appDef && utils_2.needBotCode(appDef);
|
|
1383
|
+
return (getCopilotPluginFeatureId(inputs) === CapabilityOptions.copilotPluginApiSpec().id);
|
|
1316
1384
|
},
|
|
1317
|
-
data:
|
|
1385
|
+
data: apiSpecLocationQuestion(),
|
|
1386
|
+
},
|
|
1387
|
+
{
|
|
1388
|
+
condition: (inputs) => {
|
|
1389
|
+
return (getCopilotPluginFeatureId(inputs) ===
|
|
1390
|
+
CapabilityOptions.copilotPluginOpenAIPlugin().id);
|
|
1391
|
+
},
|
|
1392
|
+
data: openAIPluginManifestLocationQuestion(),
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
data: apiOperationQuestion(),
|
|
1318
1396
|
},
|
|
1319
1397
|
],
|
|
1320
1398
|
},
|
|
1321
1399
|
{
|
|
1322
|
-
|
|
1323
|
-
data:
|
|
1400
|
+
// programming language
|
|
1401
|
+
data: programmingLanguageQuestion(),
|
|
1402
|
+
condition: (inputs) => {
|
|
1403
|
+
const copilotFeature = getCopilotPluginFeatureId(inputs);
|
|
1404
|
+
if (copilotFeature) {
|
|
1405
|
+
return !constants_3.copilotPluginExistingApiOptionIds.includes(getCopilotPluginFeatureId(inputs));
|
|
1406
|
+
}
|
|
1407
|
+
else {
|
|
1408
|
+
return !!inputs[questionNames_1.QuestionNames.Capabilities];
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
// root folder
|
|
1414
|
+
data: folderQuestion(),
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
// app name
|
|
1418
|
+
data: appNameQuestion(),
|
|
1419
|
+
},
|
|
1420
|
+
],
|
|
1421
|
+
};
|
|
1422
|
+
return node;
|
|
1423
|
+
}
|
|
1424
|
+
exports.capabilitySubTree = capabilitySubTree;
|
|
1425
|
+
function createProjectQuestionNode() {
|
|
1426
|
+
const createProjectQuestion = {
|
|
1427
|
+
data: { type: "group" },
|
|
1428
|
+
children: [
|
|
1429
|
+
{
|
|
1430
|
+
condition: (inputs) => featureFlags_1.isCLIDotNetEnabled() && teamsfx_api_1.CLIPlatforms.includes(inputs.platform),
|
|
1431
|
+
data: runtimeQuestion(),
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
condition: (inputs) => inputs.platform === teamsfx_api_1.Platform.VSCode,
|
|
1435
|
+
data: projectTypeQuestion(),
|
|
1436
|
+
cliOptionDisabled: "self",
|
|
1437
|
+
},
|
|
1438
|
+
capabilitySubTree(),
|
|
1439
|
+
{
|
|
1440
|
+
condition: (inputs) => inputs.teamsAppFromTdp && utils_2.isPersonalApp(inputs.teamsAppFromTdp),
|
|
1441
|
+
data: { type: "group", name: questionNames_1.QuestionNames.RepalceTabUrl },
|
|
1442
|
+
cliOptionDisabled: "all",
|
|
1443
|
+
inputsDisabled: "all",
|
|
1324
1444
|
children: [
|
|
1325
1445
|
{
|
|
1326
|
-
|
|
1327
|
-
|
|
1446
|
+
condition: (inputs) => {
|
|
1447
|
+
var _a;
|
|
1448
|
+
return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.websiteUrl)) || []).length >
|
|
1449
|
+
0;
|
|
1450
|
+
},
|
|
1451
|
+
data: selectTabWebsiteUrlQuestion(),
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
condition: (inputs) => {
|
|
1455
|
+
var _a;
|
|
1456
|
+
return (((_a = inputs.teamsAppFromTdp) === null || _a === void 0 ? void 0 : _a.staticTabs.filter((o) => !!o.contentUrl)) || []).length >
|
|
1457
|
+
0;
|
|
1458
|
+
},
|
|
1459
|
+
data: selectTabsContentUrlQuestion(),
|
|
1328
1460
|
},
|
|
1329
1461
|
],
|
|
1330
1462
|
},
|
|
1463
|
+
{
|
|
1464
|
+
condition: (inputs) => {
|
|
1465
|
+
const appDef = inputs.teamsAppFromTdp;
|
|
1466
|
+
return appDef && utils_2.needBotCode(appDef);
|
|
1467
|
+
},
|
|
1468
|
+
data: selectBotIdsQuestion(),
|
|
1469
|
+
cliOptionDisabled: "all",
|
|
1470
|
+
inputsDisabled: "all",
|
|
1471
|
+
},
|
|
1331
1472
|
],
|
|
1332
1473
|
};
|
|
1333
1474
|
return createProjectQuestion;
|
|
1334
1475
|
}
|
|
1335
1476
|
exports.createProjectQuestionNode = createProjectQuestionNode;
|
|
1477
|
+
function createSampleProjectQuestionNode() {
|
|
1478
|
+
return {
|
|
1479
|
+
data: sampleSelectQuestion(),
|
|
1480
|
+
children: [
|
|
1481
|
+
{
|
|
1482
|
+
data: folderQuestion(),
|
|
1483
|
+
},
|
|
1484
|
+
],
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
exports.createSampleProjectQuestionNode = createSampleProjectQuestionNode;
|
|
1336
1488
|
function createProjectCliHelpNode() {
|
|
1337
1489
|
const node = lodash_1.cloneDeep(createProjectQuestionNode());
|
|
1338
1490
|
const deleteNames = [
|
|
@@ -1348,10 +1500,10 @@ function createProjectCliHelpNode() {
|
|
|
1348
1500
|
}
|
|
1349
1501
|
if (!featureFlags_1.isCopilotPluginEnabled()) {
|
|
1350
1502
|
deleteNames.push(questionNames_1.QuestionNames.CopilotPluginExistingApi);
|
|
1503
|
+
deleteNames.push(questionNames_1.QuestionNames.CopilotPluginDevelopment);
|
|
1351
1504
|
}
|
|
1352
1505
|
trimQuestionTreeForCliHelp(node, deleteNames);
|
|
1353
|
-
|
|
1354
|
-
return subTree;
|
|
1506
|
+
return node;
|
|
1355
1507
|
}
|
|
1356
1508
|
exports.createProjectCliHelpNode = createProjectCliHelpNode;
|
|
1357
1509
|
function trimQuestionTreeForCliHelp(node, deleteNames) {
|