UNPKG

snyk-docker-plugin

Version:
22 lines 881 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAptFiles = exports.getDpkgPackageFileContentAction = void 0; const path_1 = require("path"); const stream_utils_1 = require("../../stream-utils"); exports.getDpkgPackageFileContentAction = { actionName: "dpkg", filePathMatches: (filePath) => filePath.startsWith((0, path_1.normalize)("/var/lib/dpkg/status.d/")), callback: stream_utils_1.streamToString, // TODO replace with a parser for apt data extractor }; function getAptFiles(extractedLayers) { const files = []; for (const fileName of Object.keys(extractedLayers)) { if (!("dpkg" in extractedLayers[fileName])) { continue; } files.push(extractedLayers[fileName].dpkg.toString("utf8")); } return files; } exports.getAptFiles = getAptFiles; //# sourceMappingURL=static.js.map