faastjs
Version:
Serverless batch computing made simple.
1,286 lines (1,285 loc) • 289 kB
JSON
{
"metadata": {
"toolPackage": "@microsoft/api-extractor",
"toolVersion": "7.39.0",
"schemaVersion": 1011,
"oldestForwardsCompatibleVersion": 1001,
"tsdocConfig": {
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
"noStandardTags": true,
"tagDefinitions": [
{
"tagName": "@alpha",
"syntaxKind": "modifier"
},
{
"tagName": "@beta",
"syntaxKind": "modifier"
},
{
"tagName": "@defaultValue",
"syntaxKind": "block"
},
{
"tagName": "@decorator",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@deprecated",
"syntaxKind": "block"
},
{
"tagName": "@eventProperty",
"syntaxKind": "modifier"
},
{
"tagName": "@example",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@experimental",
"syntaxKind": "modifier"
},
{
"tagName": "@inheritDoc",
"syntaxKind": "inline"
},
{
"tagName": "@internal",
"syntaxKind": "modifier"
},
{
"tagName": "@label",
"syntaxKind": "inline"
},
{
"tagName": "@link",
"syntaxKind": "inline",
"allowMultiple": true
},
{
"tagName": "@override",
"syntaxKind": "modifier"
},
{
"tagName": "@packageDocumentation",
"syntaxKind": "modifier"
},
{
"tagName": "@param",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@privateRemarks",
"syntaxKind": "block"
},
{
"tagName": "@public",
"syntaxKind": "modifier"
},
{
"tagName": "@readonly",
"syntaxKind": "modifier"
},
{
"tagName": "@remarks",
"syntaxKind": "block"
},
{
"tagName": "@returns",
"syntaxKind": "block"
},
{
"tagName": "@sealed",
"syntaxKind": "modifier"
},
{
"tagName": "@see",
"syntaxKind": "block"
},
{
"tagName": "@throws",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@typeParam",
"syntaxKind": "block",
"allowMultiple": true
},
{
"tagName": "@virtual",
"syntaxKind": "modifier"
},
{
"tagName": "@betaDocumentation",
"syntaxKind": "modifier"
},
{
"tagName": "@internalRemarks",
"syntaxKind": "block"
},
{
"tagName": "@preapproved",
"syntaxKind": "modifier"
}
],
"supportForTags": {
"@alpha": true,
"@beta": true,
"@defaultValue": true,
"@decorator": true,
"@deprecated": true,
"@eventProperty": true,
"@example": true,
"@experimental": true,
"@inheritDoc": true,
"@internal": true,
"@label": true,
"@link": true,
"@override": true,
"@packageDocumentation": true,
"@param": true,
"@privateRemarks": true,
"@public": true,
"@readonly": true,
"@remarks": true,
"@returns": true,
"@sealed": true,
"@see": true,
"@throws": true,
"@typeParam": true,
"@virtual": true,
"@betaDocumentation": true,
"@internalRemarks": true,
"@preapproved": true
},
"reportUnsupportedHtmlElements": false
}
},
"kind": "Package",
"canonicalReference": "faastjs!",
"docComment": "/**\n * Faast.js transforms ordinary JavaScript modules into serverless cloud functions that can run on AWS Lambda.\n *\n * The main entry point to faast.js is the {@link faast} function, which returns an object that implements the {@link FaastModule} interface. The most common options are {@link CommonOptions}. Using faast.js requires writing two modules, one containing the functions to upload to the cloud, and the other that invokes faast.js and calls the resulting cloud functions.\n *\n * @packageDocumentation\n */\n",
"name": "faastjs",
"preserveMemberOrder": false,
"members": [
{
"kind": "EntryPoint",
"canonicalReference": "faastjs!",
"name": "",
"preserveMemberOrder": false,
"members": [
{
"kind": "TypeAlias",
"canonicalReference": "faastjs!Async:type",
"docComment": "/**\n * `Async<T>` maps regular values to Promises and Iterators to AsyncIterators, If `T` is already a Promise or an AsyncIterator, it remains the same. This type is used to infer the return value of cloud functions from the types of the functions in the user's input module.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export type Async<T> = "
},
{
"kind": "Content",
"text": "T extends "
},
{
"kind": "Reference",
"text": "AsyncGenerator",
"canonicalReference": "!AsyncGenerator:interface"
},
{
"kind": "Content",
"text": "<infer R> ? "
},
{
"kind": "Reference",
"text": "AsyncGenerator",
"canonicalReference": "!AsyncGenerator:interface"
},
{
"kind": "Content",
"text": "<R> : T extends "
},
{
"kind": "Reference",
"text": "Generator",
"canonicalReference": "!Generator:interface"
},
{
"kind": "Content",
"text": "<infer R> ? "
},
{
"kind": "Reference",
"text": "AsyncGenerator",
"canonicalReference": "!AsyncGenerator:interface"
},
{
"kind": "Content",
"text": "<R> : T extends "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<infer R> ? "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<R> : "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<T>"
},
{
"kind": "Content",
"text": ";"
}
],
"fileUrlPath": "dist/decls/src/faast.d.ts",
"releaseTag": "Public",
"name": "Async",
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"typeTokenRange": {
"startIndex": 1,
"endIndex": 16
}
},
{
"kind": "TypeAlias",
"canonicalReference": "faastjs!AsyncDetail:type",
"docComment": "/**\n * `AsyncDetail<T>` is similar to {@link Async} except it maps retun values R to `Detail<R>`, which is the return value with additional information about each cloud function invocation.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export type AsyncDetail<T> = "
},
{
"kind": "Content",
"text": "T extends "
},
{
"kind": "Reference",
"text": "AsyncGenerator",
"canonicalReference": "!AsyncGenerator:interface"
},
{
"kind": "Content",
"text": "<infer R> ? "
},
{
"kind": "Reference",
"text": "AsyncGenerator",
"canonicalReference": "!AsyncGenerator:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "Detail",
"canonicalReference": "faastjs!Detail:interface"
},
{
"kind": "Content",
"text": "<R>> : T extends "
},
{
"kind": "Reference",
"text": "Generator",
"canonicalReference": "!Generator:interface"
},
{
"kind": "Content",
"text": "<infer R> ? "
},
{
"kind": "Reference",
"text": "AsyncGenerator",
"canonicalReference": "!AsyncGenerator:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "Detail",
"canonicalReference": "faastjs!Detail:interface"
},
{
"kind": "Content",
"text": "<R>> : T extends "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<infer R> ? "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "Detail",
"canonicalReference": "faastjs!Detail:interface"
},
{
"kind": "Content",
"text": "<R>> : "
},
{
"kind": "Reference",
"text": "Promise",
"canonicalReference": "!Promise:interface"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "Detail",
"canonicalReference": "faastjs!Detail:interface"
},
{
"kind": "Content",
"text": "<T>>"
},
{
"kind": "Content",
"text": ";"
}
],
"fileUrlPath": "dist/decls/src/faast.d.ts",
"releaseTag": "Public",
"name": "AsyncDetail",
"typeParameters": [
{
"typeParameterName": "T",
"constraintTokenRange": {
"startIndex": 0,
"endIndex": 0
},
"defaultTypeTokenRange": {
"startIndex": 0,
"endIndex": 0
}
}
],
"typeTokenRange": {
"startIndex": 1,
"endIndex": 24
}
},
{
"kind": "Interface",
"canonicalReference": "faastjs!AwsClientFactory:interface",
"docComment": "/**\n * Factory for AWS service clients, which allows for custom construction and configuration. {@link https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html#configuration | AWS Configuration}.\n *\n * @remarks\n *\n * This is an advanced option. This provides a way for a faast.js client to instantiate AWS service objects for itself to provide custom options. Note that if you create a service object yourself, it won't have the default options that faast.js would use, which are:\n *\n * - maxAttempts (faast.js default: 6) - region (faast.js default: \"us-west-2\") - logger (faast.js default: log.awssdk)\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface AwsClientFactory "
}
],
"fileUrlPath": "dist/decls/src/aws/aws-faast.d.ts",
"releaseTag": "Public",
"name": "AwsClientFactory",
"preserveMemberOrder": false,
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsClientFactory#createCloudWatchLogs:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "createCloudWatchLogs?: "
},
{
"kind": "Content",
"text": "() => "
},
{
"kind": "Reference",
"text": "CloudWatchLogs",
"canonicalReference": "@aws-sdk/client-cloudwatch-logs!CloudWatchLogs:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "createCloudWatchLogs",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsClientFactory#createIAM:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "createIAM?: "
},
{
"kind": "Content",
"text": "() => "
},
{
"kind": "Reference",
"text": "IAM",
"canonicalReference": "@aws-sdk/client-iam!IAM:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "createIAM",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsClientFactory#createLambda:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "createLambda?: "
},
{
"kind": "Content",
"text": "() => "
},
{
"kind": "Reference",
"text": "Lambda",
"canonicalReference": "@aws-sdk/client-lambda!Lambda:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "createLambda",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsClientFactory#createLambdaForInvocations:member",
"docComment": "/**\n * A special AWS Lambda factory for creating lambda functions that are used for faast.js invocations. These special clients have the following options set by default in faast.js:\n *\n * // Retries are handled by faast.js, not the sdk. maxAttempts: 0,\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "createLambdaForInvocations?: "
},
{
"kind": "Content",
"text": "() => "
},
{
"kind": "Reference",
"text": "Lambda",
"canonicalReference": "@aws-sdk/client-lambda!Lambda:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "createLambdaForInvocations",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsClientFactory#createPricing:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "createPricing?: "
},
{
"kind": "Content",
"text": "() => "
},
{
"kind": "Reference",
"text": "Pricing",
"canonicalReference": "@aws-sdk/client-pricing!Pricing:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "createPricing",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsClientFactory#createS3:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "createS3?: "
},
{
"kind": "Content",
"text": "() => "
},
{
"kind": "Reference",
"text": "S3",
"canonicalReference": "@aws-sdk/client-s3!S3:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "createS3",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsClientFactory#createSNS:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "createSNS?: "
},
{
"kind": "Content",
"text": "() => "
},
{
"kind": "Reference",
"text": "SNS",
"canonicalReference": "@aws-sdk/client-sns!SNS:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "createSNS",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsClientFactory#createSQS:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "createSQS?: "
},
{
"kind": "Content",
"text": "() => "
},
{
"kind": "Reference",
"text": "SQS",
"canonicalReference": "@aws-sdk/client-sqs!SQS:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "createSQS",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsClientFactory#createSts:member",
"docComment": "",
"excerptTokens": [
{
"kind": "Content",
"text": "createSts?: "
},
{
"kind": "Content",
"text": "() => "
},
{
"kind": "Reference",
"text": "STS",
"canonicalReference": "@aws-sdk/client-sts!STS:class"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "createSts",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 3
}
}
],
"extendsTokenRanges": []
},
{
"kind": "TypeAlias",
"canonicalReference": "faastjs!AwsFaastModule:type",
"docComment": "/**\n * The return type of {@link faastAws}. See {@link FaastModuleProxy}.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export type AwsFaastModule<M extends "
},
{
"kind": "Content",
"text": "object"
},
{
"kind": "Content",
"text": " = "
},
{
"kind": "Content",
"text": "object"
},
{
"kind": "Content",
"text": "> = "
},
{
"kind": "Reference",
"text": "FaastModuleProxy",
"canonicalReference": "faastjs!FaastModuleProxy:class"
},
{
"kind": "Content",
"text": "<M, "
},
{
"kind": "Reference",
"text": "AwsOptions",
"canonicalReference": "faastjs!AwsOptions:interface"
},
{
"kind": "Content",
"text": ", "
},
{
"kind": "Reference",
"text": "AwsState",
"canonicalReference": "faastjs!~AwsState:interface"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ";"
}
],
"fileUrlPath": "dist/decls/src/faast.d.ts",
"releaseTag": "Public",
"name": "AwsFaastModule",
"typeParameters": [
{
"typeParameterName": "M",
"constraintTokenRange": {
"startIndex": 1,
"endIndex": 2
},
"defaultTypeTokenRange": {
"startIndex": 3,
"endIndex": 4
}
}
],
"typeTokenRange": {
"startIndex": 5,
"endIndex": 11
}
},
{
"kind": "Interface",
"canonicalReference": "faastjs!AwsOptions:interface",
"docComment": "/**\n * AWS-specific options for {@link faastAws}.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface AwsOptions extends "
},
{
"kind": "Reference",
"text": "CommonOptions",
"canonicalReference": "faastjs!CommonOptions:interface"
},
{
"kind": "Content",
"text": " "
}
],
"fileUrlPath": "dist/decls/src/aws/aws-faast.d.ts",
"releaseTag": "Public",
"name": "AwsOptions",
"preserveMemberOrder": false,
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsOptions#awsClientFactory:member",
"docComment": "/**\n * AWS service factories. See {@link AwsClientFactory}.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "awsClientFactory?: "
},
{
"kind": "Reference",
"text": "AwsClientFactory",
"canonicalReference": "faastjs!AwsClientFactory:interface"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "awsClientFactory",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsOptions#awsLambdaOptions:member",
"docComment": "/**\n * Additional options to pass to AWS Lambda creation. See {@link https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html | CreateFunction}.\n *\n * @remarks\n *\n * If you need specialized options, you can pass them to the AWS Lambda SDK directly. Note that if you override any settings set by faast.js, you may cause faast.js to not work:\n * ```typescript\n * const request: aws.Lambda.CreateFunctionRequest = {\n * FunctionName,\n * Role,\n * Runtime: \"nodejs18.x\",\n * Handler: \"index.trampoline\",\n * Code,\n * Description: \"faast trampoline function\",\n * Timeout,\n * MemorySize,\n * ...awsLambdaOptions\n * };\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "awsLambdaOptions?: "
},
{
"kind": "Reference",
"text": "Partial",
"canonicalReference": "!Partial:type"
},
{
"kind": "Content",
"text": "<"
},
{
"kind": "Reference",
"text": "CreateFunctionRequest",
"canonicalReference": "@aws-sdk/client-lambda!CreateFunctionRequest:interface"
},
{
"kind": "Content",
"text": ">"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "awsLambdaOptions",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 5
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsOptions#region:member",
"docComment": "/**\n * The region to create resources in. Garbage collection is also limited to this region. Default: `\"us-west-2\"`.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "region?: "
},
{
"kind": "Reference",
"text": "AwsRegion",
"canonicalReference": "faastjs!AwsRegion:type"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "region",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!AwsOptions#RoleName:member",
"docComment": "/**\n * The role that the lambda function will assume when executing user code. Default: `\"faast-cached-lambda-role\"`. Rarely used.\n *\n * @remarks\n *\n * When a lambda executes, it first assumes an {@link https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html | execution role} to grant access to resources.\n *\n * By default, faast.js creates this execution role for you and leaves it permanently in your account (the role is shared across all lambda functions created by faast.js). By default, faast.js grants administrator privileges to this role so your code can perform any AWS operation it requires.\n *\n * You can {@link https://console.aws.amazon.com/iam/home#/roles | create a custom role} that specifies more limited permissions if you prefer not to grant administrator privileges. Any role you assign for faast.js modules needs at least the following permissions:\n *\n * - Execution Role:\n * ```json\n * {\n * \"Version\": \"2012-10-17\",\n * \"Statement\": [\n * {\n * \"Effect\": \"Allow\",\n * \"Action\": [\"logs:*\"],\n * \"Resource\": \"arn:aws:logs:*:*:log-group:faast-*\"\n * },\n * {\n * \"Effect\": \"Allow\",\n * \"Action\": [\"sqs:*\"],\n * \"Resource\": \"arn:aws:sqs:*:*:faast-*\"\n * }\n * ]\n * }\n * ```\n *\n * - Trust relationship (also known as `AssumeRolePolicyDocument` in the AWS SDK):\n * ```json\n * {\n * \"Version\": \"2012-10-17\",\n * \"Statement\": [\n * {\n * \"Effect\": \"Allow\",\n * \"Principal\": {\n * \"Service\": \"lambda.amazonaws.com\"\n * },\n * \"Action\": \"sts:AssumeRole\"\n * }\n * ]\n * }\n * ```\n *\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "RoleName?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "RoleName",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"extendsTokenRanges": [
{
"startIndex": 1,
"endIndex": 2
}
]
},
{
"kind": "TypeAlias",
"canonicalReference": "faastjs!AwsRegion:type",
"docComment": "/**\n * Valid AWS {@link https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html | regions}. Not all of these regions have Lambda support.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export type AwsRegion = "
},
{
"kind": "Content",
"text": "\"us-east-1\" | \"us-east-2\" | \"us-west-1\" | \"us-west-2\" | \"ca-central-1\" | \"eu-central-1\" | \"eu-west-1\" | \"eu-west-2\" | \"eu-west-3\" | \"ap-northeast-1\" | \"ap-northeast-2\" | \"ap-northeast-3\" | \"ap-southeast-1\" | \"ap-southeast-2\" | \"ap-south-1\" | \"sa-east-1\""
},
{
"kind": "Content",
"text": ";"
}
],
"fileUrlPath": "dist/decls/src/aws/aws-faast.d.ts",
"releaseTag": "Public",
"name": "AwsRegion",
"typeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "Interface",
"canonicalReference": "faastjs!CleanupOptions:interface",
"docComment": "/**\n * Options that apply to the {@link FaastModule.cleanup} method.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface CleanupOptions "
}
],
"fileUrlPath": "dist/decls/src/provider.d.ts",
"releaseTag": "Public",
"name": "CleanupOptions",
"preserveMemberOrder": false,
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!CleanupOptions#deleteCaches:member",
"docComment": "/**\n * If true, delete cached resources. Default: false.\n *\n * @remarks\n *\n * Some resources are cached persistently between calls for performance reasons. If this option is set to true, these cached resources are deleted when cleanup occurs, instead of being left behind for future use. For example, on AWS this includes the Lambda Layers that are created for {@link CommonOptions.packageJson} dependencies. Note that only the cached resources created by this instance of FaastModule are deleted, not cached resources from other FaastModules. This is similar to setting `useCachedDependencies` to `false` during function construction, except `deleteCaches` can be set at function cleanup time, and any other FaastModules created before cleanup may use the cached Layers.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "deleteCaches?: "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "deleteCaches",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!CleanupOptions#deleteResources:member",
"docComment": "/**\n * If true, delete provider cloud resources. Default: true.\n *\n * @remarks\n *\n * The cleanup operation has two functions: stopping the faast.js runtime and deleting cloud resources that were instantiated. If `deleteResources` is false, then only the runtime is stopped and no cloud resources are deleted. This can be useful for debugging and examining the state of resources created by faast.js.\n *\n * It is supported to call {@link FaastModule.cleanup} twice: once with `deleteResources` set to `false`, which only stops the runtime, and then again set to `true` to delete resources. This can be useful for testing.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "deleteResources?: "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "deleteResources",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!CleanupOptions#gcTimeout:member",
"docComment": "/**\n * Number of seconds to wait for garbage collection. Default: 10.\n *\n * @remarks\n *\n * Garbage collection can still be operating when cleanup is called; this option limits the amount of time faast waits for the garbage collector. If set to 0, the wait is unlimited.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "gcTimeout?: "
},
{
"kind": "Content",
"text": "number"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "gcTimeout",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
}
],
"extendsTokenRanges": []
},
{
"kind": "Interface",
"canonicalReference": "faastjs!CommonOptions:interface",
"docComment": "/**\n * Options common across all faast.js providers. Used as argument to {@link faast}.\n *\n * @remarks\n *\n * There are also more specific options for each provider. See {@link AwsOptions} and {@link LocalOptions}.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "export interface CommonOptions "
}
],
"fileUrlPath": "dist/decls/src/provider.d.ts",
"releaseTag": "Public",
"name": "CommonOptions",
"preserveMemberOrder": false,
"members": [
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!CommonOptions#childProcess:member",
"docComment": "/**\n * If true, create a child process to isolate user code from faast scaffolding. Default: true.\n *\n * @remarks\n *\n * If a child process is not created, faast runs in the same node instance as the user code and may not execute in a timely fashion because user code may {@link https://nodejs.org/en/docs/guides/dont-block-the-event-loop/ | block the event loop}. Creating a child process for user code allows faast.js to continue executing even if user code never yields. This provides better reliability and functionality:\n *\n * - Detect timeout errors more reliably, even if the function doesn't relinquish the CPU. Not applicable to AWS, which sends separate failure messages in case of timeout. See {@link CommonOptions.timeout}.\n *\n * - CPU metrics used for detecting invocations with high latency, which can be used for automatically retrying calls to reduce tail latency.\n *\n * The cost of creating a child process is mainly in the memory overhead of creating another node process.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "childProcess?: "
},
{
"kind": "Content",
"text": "boolean"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "childProcess",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!CommonOptions#childProcessMemoryMb:member",
"docComment": "/**\n * When childProcess is true, the child process will be spawned with the value of this property as the setting for --max-old-space-size.\n *\n * @remarks\n *\n * This is useful if a function requires the node process to limit its memory so that another spawned process (e.g. a browser instance) can use the rest.\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "childProcessMemoryMb?: "
},
{
"kind": "Content",
"text": "number"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "childProcessMemoryMb",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!CommonOptions#concurrency:member",
"docComment": "/**\n * The maximum number of concurrent invocations to allow. Default: 100, except for the `local` provider, where the default is 10.\n *\n * @remarks\n *\n * The concurrency limit applies to all invocations of all of the faast functions summed together. It is not a per-function limit. To apply a per-function limit, use {@link throttle}. A value of 0 is equivalent to Infinity. A value of 1 ensures mutually exclusive invocations.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "concurrency?: "
},
{
"kind": "Content",
"text": "number"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "concurrency",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!CommonOptions#description:member",
"docComment": "/**\n * A user-supplied description for this function, which may make it easier to track different functions when multiple functions are created.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "description?: "
},
{
"kind": "Content",
"text": "string"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "description",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!CommonOptions#env:member",
"docComment": "/**\n * Environment variables available during serverless function execution. Default: \\{\\}.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "env?: "
},
{
"kind": "Content",
"text": "{\n [key: string]: string;\n }"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "env",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!CommonOptions#exclude:member",
"docComment": "/**\n * Exclude a subset of files included by {@link CommonOptions.include}.\n *\n * @remarks\n *\n * The exclusion can be a directory or glob. Exclusions apply to all included entries.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "exclude?: "
},
{
"kind": "Content",
"text": "string[]"
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "exclude",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",
"canonicalReference": "faastjs!CommonOptions#gc:member",
"docComment": "/**\n * Garbage collector mode. Default: `\"auto\"`.\n *\n * @remarks\n *\n * Garbage collection deletes resources that were created by previous instantiations of faast that were not cleaned up by {@link FaastModule.cleanup}, either because it was not called or because the process terminated and did not execute this cleanup step. In `\"auto\"` mode, garbage collection may be throttled to run up to once per hour no matter how many faast.js instances are created. In `\"force\"` mode, garbage collection is run without regard to whether another gc has already been performed recently. In `\"off\"` mode, garbage collection is skipped entirely. This can be useful for performance-sensitive tests, or for more control over when gc is performed.\n *\n * Garbage collection is cloud-specific, but in general garbage collection should not interfere with the behavior or performance of faast cloud functions. When {@link FaastModule.cleanup} runs, it waits for garbage collection to complete. Therefore the cleanup step can in some circumstances take a significant amount of time even after all invocations have returned.\n *\n * It is generally recommended to leave garbage collection in `\"auto\"` mode, otherwise garbage resources may accumulate over time and you will eventually hit resource limits on your account.\n *\n * Also see {@link CommonOptions.retentionInDays}.\n */\n",
"excerptTokens": [
{
"kind": "Content",
"text": "gc?: "
},
{
"kind": "Content",
"text": "\"auto\" | \"force\" | \"off\""
},
{
"kind": "Content",
"text": ";"
}
],
"isReadonly": false,
"isOptional": true,
"releaseTag": "Public",
"name": "gc",
"propertyTypeTokenRange": {
"startIndex": 1,
"endIndex": 2
}
},
{
"kind": "PropertySignature",