serverless-aws-lambda
Version:
AWS Application Load Balancer and API Gateway - Lambda dev tool for Serverless. Allows Express synthax in handlers. Supports packaging, local invoking and offline ALB, APG, S3, SNS, SQS, DynamoDB Stream server mocking.
43 lines (42 loc) • 1.44 kB
TypeScript
import type Serverless from "serverless";
import type { ILambdaMock } from "../runtime/rapidApi";
import type { Metafile } from "esbuild";
interface includeWithAlias {
at: string;
as: string;
}
interface includeWithPattern {
pattern?: string;
dir?: string;
}
interface includeFromText {
text: string;
to: string;
}
type includeFiles = string | includeWithAlias | includeWithPattern | includeFromText;
export interface IZipOptions {
filePath: string;
handlerPath: string;
zipName: string;
include: includeFiles[];
sourcemap?: boolean | string;
preserveDir?: boolean | undefined;
format: string;
}
export declare class Zipper {
serverless: Serverless;
defaultPreserveDir: boolean;
defaultFiles: IZipOptions["include"];
defaultAssets: boolean | string | string[];
format: string;
sourcemap: IZipOptions["sourcemap"];
outputs: Metafile["outputs"];
outdir: string;
constructor(serverless: Serverless, format: string, sourcemap: IZipOptions["sourcemap"], outputs: Metafile["outputs"], outdir: string);
normalizePath: (p: string) => string;
isValidAssetsType(assets: any): boolean;
package: ({ filePath, handlerPath, zipName, include, sourcemap, format, preserveDir }: IZipOptions) => Promise<unknown>;
getAssets: (outputPath: string, handlerRoot: string) => includeWithAlias[];
zipHandler: (l: ILambdaMock) => Promise<void>;
}
export {};