MCPcopy Create free account
hub / github.com/cargo-lambda/cargo-lambda-cdk / bundle

Method bundle

src/bundling.ts:54–74  ·  view source on GitHub ↗
(options: BundlingProps)

Source from the content-addressed store, hash-verified

52 */
53export class Bundling implements cdk.BundlingOptions {
54 public static bundle(options: BundlingProps): AssetCode {
55 const projectRoot = dirname(options.manifestPath);
56 const bundling = new Bundling(projectRoot, options);
57
58 return Code.fromAsset(projectRoot, {
59 assetHashType: options.assetHashType ?? cdk.AssetHashType.OUTPUT,
60 assetHash: options.assetHash,
61 bundling: {
62 image: bundling.image,
63 command: bundling.command,
64 environment: bundling.environment,
65 local: bundling.local,
66 // Overwrite properties which are defined from the docker options.
67 ...Object.fromEntries(
68 Object.entries(options.dockerOptions ?? {}).filter(
69 ([_, value]) => value !== undefined,
70 ),
71 ),
72 },
73 });
74 }
75
76 public static clearRunsLocallyCache(): void { // for tests
77 this.runsLocally = undefined;

Callers 3

constructorMethod · 0.80
constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected