Skip to content

Make NodejsFunction L2 construct as injectable #34519

Open
@moelasmar

Description

@moelasmar

Background

This issue is a follow-up to #34486 which was temporarily fixed by PR #34498. The temporary fix removed the usage of Injectable decorator from NodejsFunction L2 construct.

Problem

The current implementation of findDefiningFile in NodejsFunction doesn't correctly handle cases where decorators are used. This leads to incorrect file path resolution when trying to determine the source file for a Lambda function.

Proposed Solutions

There are two potential approaches to properly fix this issue:

  1. Remove the decorator pattern entirely:

  2. Enhance the findDefiningFile function (RECOMMENDED):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions