UNPKG

967 BTypeScriptView Raw
1/// <reference types="node" />
2import { Readable } from "stream";
3import { CommonOptions } from "./provider";
4import { TrampolineFactory, WrapperOptions } from "./wrapper";
5export interface PackerResult {
6 archive: NodeJS.ReadableStream;
7}
8export declare function packer(trampolineFactory: TrampolineFactory, functionModule: string, userOptions: CommonOptions, userWrapperOptions: WrapperOptions, FunctionName: string): Promise<PackerResult>;
9/**
10 * @param {NodeJS.ReadableStream | string} archive A zip archive as a stream or a filename
11 * @param {(filename: string, contents: Readable) => void} processEntry Every
12 * entry's contents must be consumed, otherwise the next entry won't be read.
13 */
14export declare function processZip(archive: NodeJS.ReadableStream | string, processEntry: (filename: string, contents: Readable, mode: number) => void): Promise<void>;
15export declare function unzipInDir(dir: string, archive: NodeJS.ReadableStream): Promise<number>;