From 73fee7dec734d2fa2d46d544f2b7337a40269312 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 15 Jan 2024 12:04:35 +0100 Subject: [PATCH] Fix build --- packages/backend-core/src/context/types.ts | 4 ++-- packages/server/src/jsRunner.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend-core/src/context/types.ts b/packages/backend-core/src/context/types.ts index 65e9a3778a..06f75ce6af 100644 --- a/packages/backend-core/src/context/types.ts +++ b/packages/backend-core/src/context/types.ts @@ -10,6 +10,6 @@ export type ContextMap = { isScim?: boolean automationId?: string isMigrating?: boolean - jsIsolate: Isolate - jsContext: Context + jsIsolate?: Isolate + jsContext?: Context } diff --git a/packages/server/src/jsRunner.ts b/packages/server/src/jsRunner.ts index 5d3face3d8..cdc619ebc0 100644 --- a/packages/server/src/jsRunner.ts +++ b/packages/server/src/jsRunner.ts @@ -33,7 +33,7 @@ export function init() { } } - const global = bbCtx.jsContext.global + const global = bbCtx.jsContext!.global for (const [key, value] of Object.entries(ctx)) { if (typeof value === "function") { // Can't copy functions into the isolate, so we just ignore them @@ -43,7 +43,7 @@ export function init() { } const script = bbCtx.jsIsolate.compileScriptSync(js) - return script.runSync(bbCtx.jsContext, { + return script.runSync(bbCtx.jsContext!, { timeout: env.JS_PER_EXECUTION_TIME_LIMIT_MS, }) })