From 62994c2026ed57dad6e5c4e2da37e47bdca9f82e Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 5 Feb 2024 10:20:12 +0100 Subject: [PATCH] Lint --- packages/server/src/jsRunner/index.ts | 33 ++++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/packages/server/src/jsRunner/index.ts b/packages/server/src/jsRunner/index.ts index 8e529d533d..ebf90257d1 100644 --- a/packages/server/src/jsRunner/index.ts +++ b/packages/server/src/jsRunner/index.ts @@ -33,19 +33,20 @@ export function init() { }) const jsContext = jsIsolate.createContextSync() - const injectedRequire = `const require = function(val){ - switch (val) { - case "url": - return { - resolve: (...params) => urlResolveCb(...params), - parse: (...params) => urlParseCb(...params), - } - case "querystring": - return { - escape: (...params) => querystringEscapeCb(...params), - } - } - };` + const injectedRequire = ` + const require = function(val){ + switch (val) { + case "url": + return { + resolve: (...params) => urlResolveCb(...params), + parse: (...params) => urlParseCb(...params), + } + case "querystring": + return { + escape: (...params) => querystringEscapeCb(...params), + } + } + };` const global = jsContext.global global.setSync( @@ -83,9 +84,9 @@ export function init() { `${injectedRequire};${helpersSource}` ) - const cryptoModule = jsIsolate.compileModuleSync(`export default { - randomUUID: cryptoRandomUUIDCb, - }`) + const cryptoModule = jsIsolate.compileModuleSync( + `export default { randomUUID: cryptoRandomUUIDCb }` + ) cryptoModule.instantiateSync(jsContext, specifier => { throw new Error(`No imports allowed. Required: ${specifier}`) })