UNPKG

@sap/generator-adaptation-project

Version:

Adaptation project allows you to create an app variant for an existing SAP Fiori elements-based or SAPUI5 freestyle application, without changing the original application.

191 lines (190 loc) 6.78 kB
import { Prompts } from "@sap-devx/yeoman-ui-types"; import AdaptationProjectGeneratorBase from "../common/generator/AdaptationProjectGeneratorBase"; declare class AdaptationProjectGenerator extends AdaptationProjectGeneratorBase { setPromptsCallback: (fn: any) => void; prompts: Prompts; private answers; private targetEnvAnswer; private localDestinationService; private readonly STANDALONE_APPROUTER; private readonly APPROUTER; readonly BUSINESS_SERVICE = "businessService"; readonly BASE_APP = "baseApp"; private readonly MANAGED_APPROUTER; private readonly RESOURCE_BUNDLE_TEXT; private readonly TRANSLARION_UUID_TEXT; private readonly PROPERTIES_TEXT; private readonly mainI18nPath; private basicInfoAnswers; private appSourceAnswers; private projectPathAnswers; private isInYeomanUIContext; private isErrorPresent; private writeContent; private isCFEnv; private targetEnvironment; private readonly fdcService; private readonly isMtaYamlFound; private isInternalUsage; private cfOrganization; private cfSpace; private cfApiUrl; private isCfInstalled; private cfConfig; private isCFLoggedIn; private isCFLoginSuccessfull; private cfProjectDestinationPath; private businessServices; private showSolutionNamePrompt; approuter: string; private baseAppOnChoiceError; private cachedServiceName; private businessServiceKeys; private apps; private readonly vscode; private isApplicationSupported; private applicationIds; destinationHostPattern: string; destinationProxyType: string; private versionsOnSystem; private ui5VersionDetected; private hasSystemAuthentication; private flexUISystem; private layer; private shouldCreateExtProject; private manifest; private extensibilitySubGenerator; private isCloudProject; private isLoginSuccessfull; private readonly isExtensionInstalled; private readonly applicationValidator; private readonly isRunningInBAS; private toolsId; private endpointsManager; private providerManager; private manifestManager; private appsManager; private abapService; private jsonInput; constructor(args: string | string[], opts: any); /** * Public API for implementing user interaction with generator */ prompting(): Promise<void>; writing(): Promise<void>; private _generateProjectArtifactsFromJson; private _initializeAnswersFromJson; private _generateExtensionProject; private _resolveNodeModuleGenerator; private _connectToAbapProviderIfNeeded; private _generateAdpProjectArtifactsABAP; private _getManifestContent; private _getMinUI5VersionForManifest; private _getSupportForUI5Yaml; private _generateAdpProjectArtifactsCF; private _getI18NModels; private _getI18NContent; private _extractResourceModelPath; install(): Promise<void>; end(): Promise<void>; private _generateGuid; private _determineInitialPrompt; private _determineSecondPrompt; private _setPrompts; private _getUIPageLabels; private _setCFLoginPageDescription; private _getTemplateModel; private _getConfigJsonCF; private _createDescriptorChangeForResourceModel; private _getTrimmedUI5Version; private _getProjectPath; private _generate4Chars; private _isInternalMode; private _getLayer; private _getTargetEnvPrompt; private _getEnvironments; private _getBasicInformationPrompts; private _getProjectNamePrompt; private _getApplicationTitlePrompt; private _getNamespacePrompt; private _getEnableTypeScriptPrompt; private _isVisible; private _generateValidNamespace; private _getConfigurationPrompts; private _getUsernamePrompt; private _getPasswordPrompt; private _getSystemPrompt; private _getProjectTypeLabelPrompt; private _getOnPemiseProjectTypeLabelPrompt; private _getCloudProjectTypeLabelPrompt; /** * Retrieves applications from the specified system. * Throws an error if no applications are available after loading. */ private _getApplications; private _getSystemListPrompt; private _getSystemListPromptGeneric; private _getNotFlexEnabledSystemLabelPrompt; private _getNotDeployableSystemLabelPrompt; private _getNotFlexAndNotDeployableSystemLabelPrompt; private _systemPromptValidationHandler; /** * Handles the fetching and validation of system data. * * @param {string} value - The system. * @returns {Promise<boolean | string>} True if successful, or an error message if an error occurs. */ private _handleSystemDataValidation; /** * Handles errors that occur while fetching system information, setting default values and rethrowing if necessary. * * @param {Error} error - The error encountered during the system info fetch. */ private _handleSystemDataError; /** * Fetches system data for the specified system. */ private _getSystemData; /** * Validates the UI5 system version based on the provided value or fetches all relevant versions if no value is provided. * Updates the internal state with the fetched versions and the detection status. * * @param {string} value - The system version to validate. */ private _validateSystemVersion; private _getUi5VersionPrompt; private _getCurrentUI5VersionPrompt; private _getVersionDefaultValue; private _getVersionInfoPrompt; private _getSystemNativePrompt; private _getSystemInputPrompt; private _getSystemClientPrompt; private _getApplicationPrompt; private _getApplicationListPrompt; private getApplicationInfoErrorPrompt; private getConfirmExtProjCreationPrompt; private _getApplicationInputPrompt; private _getAdpOverAdpInfoPrompt; private _getAdpOverAdpPartialSupportInfoPrompt; private _getApplicationV4InfoPrompt; private _getApplicationInfoPrompt; private _applicationPromptValidationHandler; private _getFioriIdPrompt; private _getACHprompt; private _shouldAuthenticate; private _getLoginPrompts; private _getLoggedInInfo; private _getExternalLoginPromts; private _getLoggedInfoMessagePrompt; private _promptUserForProjectPath; private _getTargetFolderPrompt; private _getDefaultFolder; private _getApplicationSourcesPrompts; private _getBusinessSolutionNamePrompt; private _getAppRouterPrompt; private _getCFParameters; private _getBaseAppPrompt; private _getBusinessServicesPrompt; private _allowExtensionProject; } export = AdaptationProjectGenerator;