UNPKG

@sparticuz/chromium

Version:

Chromium Binary for Serverless Platforms

32 lines (31 loc) 1.56 kB
/** * Adds the proper folders to the environment * @param baseLibPath the path to this packages lib folder */ export declare const setupLambdaEnvironment: (baseLibPath: string) => void; /** * Determines if the input is a valid URL * @param input the input to check * @returns boolean indicating if the input is a valid URL */ export declare const isValidUrl: (input: string) => boolean; /** * Determines if the running instance is inside an AWS Lambda container, * and the nodejs version is less than v20. This is to target AL2 instances * AWS_EXECUTION_ENV is for native Lambda instances * AWS_LAMBDA_JS_RUNTIME is for netlify instances * VERCEL for Vercel Functions (Node 18 enables an AL2-compatible environment) * @returns boolean indicating if the running instance is inside a Lambda container */ export declare const isRunningInAwsLambda: (nodeMajorVersion: number) => boolean; /** * Determines if the running instance is inside an AWS Lambda container, * and the nodejs version is 20. This is to target AL2023 instances * AWS_EXECUTION_ENV is for native Lambda instances * AWS_LAMBDA_JS_RUNTIME is for netlify instances * CODEBUILD_BUILD_IMAGE is for CodeBuild instances * VERCEL is for Vercel Functions (Node 20 or later enables an AL2023-compatible environment). * @returns boolean indicating if the running instance is inside a Lambda container with nodejs20 */ export declare const isRunningInAwsLambdaNode20: (nodeMajorVersion: number) => boolean; export declare const downloadAndExtract: (url: string) => Promise<string>;