UNPKG

@ui5/task-adaptation

Version:

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

16 lines 545 B
import AdmZip from "adm-zip"; export async function unzipZipEntries(zip) { let admZip; try { admZip = new AdmZip(zip); const entries = admZip.getEntries(); return mapEntries(entries); } catch (error) { throw new Error("Failed to parse zip content from HTML5 Repository: " + error.message); } } function mapEntries(entries) { return new Map(entries.filter(entry => !entry.isDirectory).map(entry => [entry.entryName, entry.getData().toString("utf8")])); } //# sourceMappingURL=zipUtil.js.map