The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix `yarn-install-lambda` and `lambda-build` `target` (#19407)
Paul Rastoin137e068cedd6
diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/builder/index.mjs b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/builder/index.mjsindex 86937ff9e31..410931bd1d7 100644--- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/builder/index.mjs+++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/constants/builder/index.mjs@@ -49,7 +49,7 @@ export const handler = async (event) => {outfile: outFilePath,platform: 'node',format: 'esm',- target: 'es2017',+ target: 'esnext',bundle: true,sourcemap: true,packages: 'external',diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/lambda.driver.ts b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/lambda.driver.tsindex 126c1d042b9..42f2e92f0ae 100644--- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/lambda.driver.ts+++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/lambda.driver.ts@@ -59,6 +59,7 @@ const YARN_INSTALL_LAMBDA_MEMORY_MB = 1024;const COMMON_LAYER_NAME_PREFIX = 'twenty-common-layer';const BUILDER_LAMBDA_TIMEOUT_SECONDS = 60;const BUILDER_LAMBDA_MEMORY_MB = 512;+const LAMBDA_EPHEMERAL_STORAGE_MB = 2048;const YARN_INSTALL_HANDLER_PATH = resolve(__dirname,@@ -390,6 +391,7 @@ export class LambdaDriver implements LogicFunctionDriver {Runtime: LogicFunctionRuntime.NODE22,Timeout: YARN_INSTALL_LAMBDA_TIMEOUT_SECONDS,MemorySize: YARN_INSTALL_LAMBDA_MEMORY_MB,+ EphemeralStorage: { Size: LAMBDA_EPHEMERAL_STORAGE_MB },};await lambdaClient.send(new CreateFunctionCommand(params));@@ -479,6 +481,7 @@ export class LambdaDriver implements LogicFunctionDriver {Runtime: LogicFunctionRuntime.NODE22,Timeout: BUILDER_LAMBDA_TIMEOUT_SECONDS,MemorySize: BUILDER_LAMBDA_MEMORY_MB,+ EphemeralStorage: { Size: LAMBDA_EPHEMERAL_STORAGE_MB },};await lambdaClient.send(new CreateFunctionCommand(params));@@ -934,6 +937,7 @@ export class LambdaDriver implements LogicFunctionDriver {Role: this.options.lambdaRole,Runtime: flatLogicFunction.runtime,Timeout: 900,+ EphemeralStorage: { Size: LAMBDA_EPHEMERAL_STORAGE_MB },};const command = new CreateFunctionCommand(params);diff --git a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/local.driver.ts b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/local.driver.tsindex 3e71d855136..3137301f7e3 100644--- a/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/local.driver.ts+++ b/packages/twenty-server/src/engine/core-modules/logic-function/logic-function-drivers/drivers/local.driver.ts@@ -151,7 +151,7 @@ export class LocalDriver implements LogicFunctionDriver {outfile: builtBundleFilePath,platform: 'node',format: 'esm',- target: 'es2017',+ target: 'esnext',bundle: true,sourcemap: true,packages: 'external',