UNPKG

@webda/aws

Version:

Webda AWS Services implementation

26 lines 886 B
import { getCommonJS } from "@webda/core"; import { Packager } from "@webda/shell"; import * as path from "path"; const { __dirname } = getCommonJS(import.meta.url); /** * Package a Lambda function * * It uses the normmal Packager and just add the default entrypoint * And the exclusion of aws-sdk by default * @WebdaDeployer WebdaAWSDeployer/LambdaPackager */ export default class LambdaPackager extends Packager { /** * Define the default resources */ async loadDefaults() { await super.loadDefaults(); this.resources.entrypoint = this.resources.entrypoint || path.join(__dirname, "lambda-entrypoint.js"); // Exclude aws-sdk by default if (!this.resources.customAwsSdk) { this.resources.package.modules.excludes.push("aws-sdk"); } } } export { LambdaPackager }; //# sourceMappingURL=lambdapackager.js.map