UNPKG

snyk-docker-plugin

Version:
18 lines (13 loc) 477 B
import { basename } from "path"; import { ExtractAction } from "../../extractor/types"; import { streamToString } from "../../stream-utils"; const phpAppFiles = ["composer.json", "composer.lock"]; function filePathMatches(filePath: string): boolean { const fileName = basename(filePath); return phpAppFiles.includes(fileName); } export const getPhpAppFileContentAction: ExtractAction = { actionName: "php-app-files", filePathMatches, callback: streamToString, };