import type { Logger } from '@sap-ux/logger'; import type { ReaderCollection } from '@ui5/fs'; import type { Editor } from 'mem-fs-editor'; import type { CommonChangeProperties } from '@sap-ux/adp-tooling'; /** * Set of local module paths (fragments, controllers) used to strip * inlined modules from the LrepConnector response so that UI5 loads * local workspace versions via HTTP instead. */ export type LocalModulePaths = Set; /** * State of local module files in the workspace. * - `active`: paths derived from local change files — deployed changes should be served from the local workspace. * - `orphaned`: local files with no corresponding local change record (e.g. change file was deleted) — * the associated deployed change should be suppressed entirely. */ export interface LocalModuleState { active: LocalModulePaths; orphaned: LocalModulePaths; } /** * Read changes from the file system and return them. * * @param project reference to the UI5 project * @param logger logger instance * @returns object with the file name as key and the file content as value */ export declare function readChanges(project: ReaderCollection, logger: Logger): Promise>; /** * Reads local module state from the workspace. * * @param project reference to the UI5 project * @param logger logger instance * @returns LocalModuleState with `active` and `orphaned` sets of relative paths under /changes/ */ export declare function readLocalModulePaths(project: ReaderCollection, logger: Logger): Promise; /** * Patches an LREP flex data response so that deployed changes whose module * files exist locally in the workspace are loaded from the local workspace * instead of from ABAP. * * @param responseData the parsed LREP flex data response * @param localModuleState state of local module files (active and orphaned) * @param logger logger instance * @returns the (possibly patched) response data */ export declare function stripLocalModulesFromLrepResponse(responseData: Record, localModuleState: LocalModuleState, logger: Logger): Record; /** * Writes flex changes to the user's workspace. * * @param data JS object to be stored as change * @param data.fileName file name that is required for a valid change * @param data.fileType file type that is required * @param webappPath path to the webapp folder * @param fs mem-fs editor * @param logger logger instance * @returns object with success flag and optional message */ export declare function writeChange(data: object & { fileName?: string; fileType?: string; }, webappPath: string, fs: Editor, logger: Logger): { success: boolean; message?: string; }; /** * Deletes an existing flex change from the file system if it exists. * * @param data JS object of the change to be deleted * @param data.fileName file name that is required for a valid change * @param webappPath path to the webapp folder * @param logger logger instance * @returns object with success flag and optional message */ export declare function deleteChange(data: object & { fileName?: string; }, webappPath: string, logger: Logger): { success: boolean; message?: string; }; //# sourceMappingURL=flex.d.ts.map