@ui5/task-adaptation
Version:
Custom task for ui5-builder which allows building UI5 Flexibility Adaptation Projects for SAP BTP, Cloud Foundry environment
33 lines (32 loc) • 1.38 kB
TypeScript
import { IChange } from "./model/types.js";
import TaskUtil from "@ui5/project/build/helpers/TaskUtil";
export default class AppVariant {
readonly files: ReadonlyMap<string, string>;
readonly resources?: ReadonlyArray<Resource>;
readonly id: string;
readonly reference: string;
readonly layer: any;
readonly content: any;
prefix: string;
private movedFiles;
private renaming;
static fromWorkspace(workspace: IWorkspace, projectNamespace: string): Promise<AppVariant>;
static fromFiles(files: ReadonlyMap<string, string>): AppVariant;
private constructor();
getProcessedFiles(): ReadonlyMap<string, string>;
/**
* Since we moved files, we need to update paths where they were referenced.
* To do this we use renameMap function along with renaming ids.
*/
getRenamingForMovedFiles(): Map<string, string>;
getProcessedManifestChanges(): IChange[];
private validateManifest;
private updateRelativePaths;
/**
* 3p. We not only omit files, which were moved or deleted from the resulted
* file set, but also update existing adaptation project resources with
* renamed content, otherwise flexibility-bundle will contain not renamed
* content of files.
*/
omitDeletedResources(files: ReadonlyMap<string, string>, projectNamespace: string, taskUtil: TaskUtil): void;
}