Skip to content

Commit d5866e6

Browse files
committed
fix var name
1 parent 9732c73 commit d5866e6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/cdkConstructs/src/constructs/TypescriptLambdaFunction.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ export interface TypescriptLambdaFunctionProps {
3131
* The base directory for resolving the package base path and entry point.
3232
* Should point to the monorepo root.
3333
*/
34-
readonly baseDir: string
34+
readonly projectBaseDir: string
3535
/**
36-
* The relative path from baseDir to the base folder where the lambda function code is located.
36+
* The relative path from projectBaseDir to the base folder where the lambda function code is located.
3737
*
3838
*/
3939
readonly packageBasePath: string
@@ -82,19 +82,19 @@ export interface TypescriptLambdaFunctionProps {
8282
const insightsLayerArn = "arn:aws:lambda:eu-west-2:580247275435:layer:LambdaInsightsExtension:60"
8383
const getDefaultLambdaOptions = (
8484
packageBasePath: string,
85-
baseDir: string,
85+
projectBaseDir: string,
8686
timeoutInSeconds: number):NodejsFunctionProps => {
8787
return {
8888
runtime: Runtime.NODEJS_22_X,
89-
projectRoot: baseDir,
89+
projectRoot: projectBaseDir,
9090
memorySize: 256,
9191
timeout: Duration.seconds(timeoutInSeconds),
9292
architecture: Architecture.X86_64,
9393
handler: "handler",
9494
bundling: {
9595
minify: true,
9696
sourceMap: true,
97-
tsconfig: join(baseDir, packageBasePath, "tsconfig.json"),
97+
tsconfig: join(projectBaseDir, packageBasePath, "tsconfig.json"),
9898
target: "es2022"
9999
}
100100
}
@@ -185,7 +185,7 @@ export class TypescriptLambdaFunction extends Construct {
185185
version,
186186
commitId,
187187
layers = [], // Default to empty array
188-
baseDir,
188+
projectBaseDir,
189189
timeoutInSeconds = 50
190190
} = props
191191

@@ -266,9 +266,9 @@ export class TypescriptLambdaFunction extends Construct {
266266
})
267267

268268
const lambdaFunction = new NodejsFunction(this, functionName, {
269-
...getDefaultLambdaOptions(packageBasePath, baseDir, timeoutInSeconds),
269+
...getDefaultLambdaOptions(packageBasePath, projectBaseDir, timeoutInSeconds),
270270
functionName: `${functionName}`,
271-
entry: join(baseDir, packageBasePath, entryPoint),
271+
entry: join(projectBaseDir, packageBasePath, entryPoint),
272272
role,
273273
environment: {
274274
...environmentVariables,

0 commit comments

Comments
 (0)