UNPKG

@ui5/task-adaptation

Version:

Custom task for ui5-builder which allows building UI5 Flexibility Adaptation Projects for SAP BTP, Cloud Foundry environment

27 lines (26 loc) 1.17 kB
import AppVariant from "../appVariantManager.js"; import { IChange } from "../model/types.js"; export default class FileMerger { static analyzeAppVariantManifestChanges(manifestChanges: ReadonlyArray<IChange>): { mergePaths: RegExp[]; copyPaths: RegExp[]; }; static merge(baseAppFiles: ReadonlyMap<string, string>, i18nPath: string, appVariant: AppVariant): Map<string, string>; /** * Filters out specific lines from the given string. * Removes lines matching: * - __ldi.translation.uuid\s*=\s*(.*) * - ABAP_TRANSLATION * - SAPUI5 TRANSLATION-KEY */ private static filterTranslationMetaLines; /** * Merge/Append base property file with property file from app variant * FIXME Currently merge could duplicate keys which causes undefined * behavior => Existing keys which are in merge content must be removed => * Actually only descriptor texts are relevant for merge which always have * app variant Id as prefix => If we filter on them we do not need to remove * existing overwritten keys (as there should be none) */ private static mergePropertiesFiles; }