Function computeCodePaths

  • 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.

    Parameters

    Returns Promise<Map<string, Asset | Archive>>

  • Parameters

    • Optional extraIncludePaths: string[]
    • Optional extraIncludePackages: string[]
    • Optional extraExcludePackages: string[]

    Returns Promise<Map<string, Asset | Archive>>

    Deprecated

    Use the [computeCodePaths] overload that takes a [CodePathOptions] instead.

Generated using TypeDoc