UNPKG

@aws-amplify/cli-internal

Version:
50 lines 1.85 kB
import ts from 'typescript'; export interface FunctionRenderOptions { readonly resourceName: string; readonly entry: string; readonly name?: string; readonly timeoutSeconds?: number; readonly memoryMB?: number; readonly runtime?: string; readonly schedule?: string; readonly literalEnvVars?: Readonly<Record<string, string>>; readonly dynamicEnvVars: readonly DynamicEnvVar[]; readonly dynamoActions: readonly string[]; readonly appSyncPermissions: { readonly hasMutation: boolean; readonly hasQuery: boolean; }; readonly dataTriggerModels: readonly string[]; readonly kinesisConfig?: KinesisConfig; readonly unMappedAuthActions: readonly string[]; readonly storageTriggerTables: readonly string[]; } export interface KinesisConfig { readonly resourceName: string; readonly actions: readonly string[]; readonly isTrigger: boolean; } export interface DynamicEnvVar { readonly name: string; readonly expression: ts.Expression; } export declare class FunctionRenderer { private readonly appId; private readonly backendEnvironmentName; constructor(appId: string, backendEnvironmentName: string); private renderDefineFunction; render(opts: FunctionRenderOptions): ts.NodeArray<ts.Node>; private renderBackendTypeImport; private renderAnalyticsTypeImport; private renderCdkImports; private renderApplyEscapeHatches; private renderEnvironment; private renderRuntime; private renderSchedule; } export declare function classifyEnvVars(variables: Record<string, string>): { readonly literalEnvVars: Record<string, string>; readonly dynamicEnvVars: readonly DynamicEnvVar[]; }; export declare function extractTableName(envVar: string): string | undefined; //# sourceMappingURL=function.renderer.d.ts.map