This repository has been archived on 2026-04-30. You can view files and clone it, but cannot push or open issues or pull requests.
next-deploy/packages/serverless-component/types.d.ts
2020-07-05 16:56:57 -07:00

42 lines
1.2 KiB
TypeScript

import { PublicDirectoryCache } from 's3-static-assets/src/lib/getPublicAssetCacheControl';
export type ServerlessComponentInputs = {
build?: BuildOptions; // TODO: figure out a way to properly type this as "BuildOptions | boolean" doesn't work correctly
nextConfigDir?: string;
useServerlessTraceTarget?: boolean;
nextStaticDir?: string;
bucketName?: string;
bucketRegion?: string;
publicDirectoryCache?: PublicDirectoryCache;
memory?: number | { defaultLambda?: number; apiLambda?: number };
timeout?: number | { defaultLambda?: number; apiLambda?: number };
name?: string | { defaultLambda?: string; apiLambda?: string };
runtime?: string | { defaultLambda?: string; apiLambda?: string };
description?: string;
policy?: string;
domain?: string | string[];
domainType?: 'www' | 'apex' | 'both';
cloudfront?: CloudfrontOptions;
};
type CloudfrontOptions = Record<string, any>;
export type BuildOptions = {
cwd?: string;
enabled?: boolean;
cmd: string;
args: string[];
};
export type LambdaType = 'defaultLambda' | 'apiLambda';
export type LambdaInput = {
description: string;
handler: string;
code: string;
role: Record<string, unknown>;
memory: number;
timeout: number;
runtime: string;
name?: string;
};