Skip to content

Commit

Permalink
refactor: remove #getEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jul 24, 2022
1 parent e459110 commit f6f40fd
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/lambda/LambdaFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ export default class LambdaFunction {

this.#verifySupportedRuntime()

const env = this.#getEnv(
provider.environment,
functionDefinition.environment,
handler,
)
const env = {
...this.#getAwsEnvVars(handler),
...provider.environment,
...functionDefinition.environment,
IS_OFFLINE: 'true',
}

this.#artifact = functionDefinition.package?.artifact

Expand Down Expand Up @@ -194,15 +195,6 @@ export default class LambdaFunction {
}
}

#getEnv(providerEnv, functionDefinitionEnv, handler) {
return {
...this.#getAwsEnvVars(handler),
...providerEnv,
...functionDefinitionEnv,
IS_OFFLINE: 'true',
}
}

setClientContext(clientContext) {
this.#clientContext = clientContext
}
Expand Down

0 comments on commit f6f40fd

Please sign in to comment.