From b28890b4010a1da42969eb31bad78f5ca534eee2 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 6 Feb 2024 10:04:54 +0100 Subject: [PATCH] Load --- packages/server/src/jsRunner/bundles/index-helpers.ts | 7 ++++--- packages/string-templates/package.json | 3 +-- scripts/build.js | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/server/src/jsRunner/bundles/index-helpers.ts b/packages/server/src/jsRunner/bundles/index-helpers.ts index 58ba3c6cc7..1a0eeeb566 100644 --- a/packages/server/src/jsRunner/bundles/index-helpers.ts +++ b/packages/server/src/jsRunner/bundles/index-helpers.ts @@ -1,10 +1,11 @@ -import getJsHelperList from '@budibase/string-templates/js-helpers' +import {getJsHelperList} from '@budibase/string-templates/js-helpers' + const helpers = getJsHelperList() -module.exports = { +export default { ...helpers, // pointing stripProtocol to a unexisting function to be able to declare it on isolated-vm // @ts-ignore - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef stripProtocol: helpersStripProtocol, } diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 9aeb3699af..a572963d19 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -12,8 +12,7 @@ "import": "./dist/bundle.mjs" }, "./package.json": "./package.json", - "./js-helpers": "./src/index-helpers.js", - "./index-helpers": "./dist/index-helpers.bundled.js", + "./js-helpers": "./src/helpers/list.js", "./test/utils": "./test/utils.js" }, "files": [ diff --git a/scripts/build.js b/scripts/build.js index c76217bb8b..599585c731 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -49,6 +49,7 @@ function runBuild(entry, outfile) { preserveSymlinks: true, loader: { ".svelte": "copy", + ".ivm.bundle.js.txt": "text", }, metafile: true, external: [ @@ -60,6 +61,7 @@ function runBuild(entry, outfile) { "bcrypt", "bcryptjs", "graphql/*", + "bson" ], }