import * as asset from "../../asset"; import { Resource } from "../../resource"; /** * Options for controlling what gets returned by [computeCodePaths]. */ export interface CodePathOptions { /** * Local file/directory paths that we always want to include when producing the Assets to be * included for a serialized closure. */ extraIncludePaths?: string[]; /** * Extra packages to include when producing the Assets for a serialized closure. This can be * useful if the packages are acquired in a way that the serialization code does not understand. * For example, if there was some sort of module that was pulled in based off of a computed * string. */ extraIncludePackages?: string[]; /** * Packages to explicitly exclude from the Assets for a serialized closure. This can be used * when clients want to trim down the size of a closure, and they know that some package won't * ever actually be needed at runtime, but is still a dependency of some package that is being * used at runtime. */ extraExcludePackages?: string[]; /** * The resource to log any errors we encounter against. */ logResource?: Resource; } /** * computeCodePaths computes the local node_module paths to include in an uploaded cloud 'Lambda'. * Specifically, it will examine the package.json for the caller's code, and will transitively walk * it's 'dependencies' section to determine what packages should be included. * * During this walk, if a package is encountered that contains a `"pulumi": { ... }` section then * the normal `"dependencies": { ... }` section of that package will not be included. These are * "pulumi" packages, and those dependencies are only intended for use at deployment time. However, * a "pulumi" package can also specify package that should be available at cloud-runtime. These * packages are found in a `"runtimeDependencies": { ... }` section in the package.json file with * the same format as the normal "dependencies" section. * * See [CodePathOptions] for information on ways to control and configure the final set of paths * included in the resultant asset/archive map. * * Note: this functionality is specifically intended for use by downstream library code that is * determining what is needed for a cloud-lambda. i.e. the aws.serverless.Function or * azure.serverless.FunctionApp libraries. In general, other clients should not need to use this * helper. */ export declare function computeCodePaths(options?: CodePathOptions): Promise>; /** * @deprecated Use the [computeCodePaths] overload that takes a [CodePathOptions] instead. */ export declare function computeCodePaths(extraIncludePaths?: string[], extraIncludePackages?: string[], extraExcludePackages?: string[]): Promise>;