UNPKG

snyk-docker-plugin

Version:
22 lines (21 loc) 1.61 kB
/// <reference types="node" /> /// <reference types="node" /> import { AutoDetectedUserInstructions, ImageType } from "../types"; import { PluginOptions } from "../types"; import { ExtractAction, ExtractedLayers, ExtractionResult, ImageConfig } from "./types"; export { InvalidArchiveError } from "./generic-archive-extractor"; /** * Given a path on the file system to a image archive, open it up to inspect the layers * and look for specific files. File content can be transformed with a custom callback function if needed. * @param fileSystemPath Path to an existing archive. * @param extractActions This denotes a file pattern to look for and how to transform the file if it is found. * By default the file is returned raw if no processing is desired. */ export declare function extractImageContent(imageType: ImageType, fileSystemPath: string, extractActions: ExtractAction[], options: Partial<PluginOptions>): Promise<ExtractionResult>; export declare function getRootFsLayersFromConfig(imageConfig: ImageConfig): string[]; export declare function getPlatformFromConfig(imageConfig: ImageConfig): string | undefined; export declare function getDetectedLayersInfoFromConfig(imageConfig: any): AutoDetectedUserInstructions; export declare function getUserInstructionLayersFromConfig(imageConfig: any): any; export { isWhitedOutFile } from "./layer"; export declare function getContentAsBuffer(extractedLayers: ExtractedLayers, extractAction: ExtractAction): Buffer | undefined; export declare function getContentAsString(extractedLayers: ExtractedLayers, extractAction: ExtractAction): string | undefined;