UNPKG

@sap-ux/project-access

Version:

Library to access SAP Fiori tools projects

21 lines 739 B
import { join } from 'node:path'; import { readDirectory, readFile } from '../file/index.js'; import { existsSync } from 'node:fs'; /** * Reads all flex change files from the changes directory. * * @param changesPath - path to changes directory. * @param memFs - optional mem-fs-editor instance. * @returns A promise that resolves to an array of flex change files. */ export async function readFlexChanges(changesPath, memFs) { const changes = {}; if (existsSync(changesPath)) { const files = await readDirectory(changesPath); for (const file of files) { changes[file] = await readFile(join(changesPath, file), memFs); } } return changes; } //# sourceMappingURL=flex-changes.js.map