UNPKG

snyk-docker-plugin

Version:
17 lines (16 loc) 966 B
import { PluginOptions } from "../../types"; import { ExtractAction, ExtractedLayersAndManifest } from "../types"; /** * Retrieve the products of files content from the specified oci-archive. * * OCI archives contain multiple blobs (configs, manifests, layers). For each blob, * we attempt to parse it as both JSON (for configs/manifests) and as a compressed layer * tarball. Most attempts will fail gracefully (a layer isn't valid JSON, a manifest isn't * a valid tarball), which is expected behavior. * * @param ociArchiveFilesystemPath Path to image file saved in oci-archive format. * @param extractActions Array of pattern-callbacks pairs. * @param options PluginOptions * @returns Array of extracted files products sorted by the reverse order of the layers from last to first. */ export declare function extractArchive(ociArchiveFilesystemPath: string, extractActions: ExtractAction[], options: PluginOptions): Promise<ExtractedLayersAndManifest>;