UNPKG

snyk-docker-plugin

Version:
19 lines 747 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getJarFileContentAction = void 0; const path = require("path"); const stream_utils_1 = require("../../stream-utils"); const ignoredPaths = ["/usr/lib", "gradle/cache"]; const javaArchiveFileFormats = [".jar", ".war"]; function filePathMatches(filePath) { const dirName = path.dirname(filePath); const fileExtension = filePath.slice(-4); return (javaArchiveFileFormats.includes(fileExtension) && !ignoredPaths.some((ignorePath) => dirName.includes(path.normalize(ignorePath)))); } exports.getJarFileContentAction = { actionName: "jar", filePathMatches, callback: stream_utils_1.streamToBuffer, }; //# sourceMappingURL=static.js.map