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/aws-component/types.d.ts

43 lines
1.2 KiB
TypeScript

import { PublicDirectoryCache } from 'aws-s3-utils/types';
type AwsComponentInputs = {
build?: BuildOptions; // TODO: figure out a way to properly type this as "BuildOptions | boolean" doesn't work correctly
nextConfigDir?: string;
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?: DomainType;
cloudfront?: CloudfrontOptions;
};
type CloudfrontOptions = Record<string, any>;
type DomainType = 'www' | 'apex' | 'both';
type BuildOptions = {
cwd?: string;
enabled?: boolean;
cmd: string;
args: string[];
};
type LambdaType = 'defaultLambda' | 'apiLambda';
type LambdaInput = {
description: string;
handler: string;
code: string;
role: Record<string, unknown>;
memory: number;
timeout: number;
runtime: string;
name?: string;
};