1
0
Fork 0
mirror of synced 2024-06-12 23:44:39 +12:00

Move bundle for ivm to server

This commit is contained in:
Adria Navarro 2024-02-05 18:26:39 +01:00
parent 62994c2026
commit f28417a776
3 changed files with 13 additions and 2 deletions

View file

@ -7,11 +7,11 @@ module.exports = {
if (
/^@budibase\/[^/]+\/.*$/.test(importPath) &&
importPath !== "@budibase/backend-core/tests"
!["@budibase/backend-core/tests","@budibase/string-templates/js-helpers"].includes(importPath)
) {
context.report({
node,
message: `Importing from @budibase is not allowed, except for @budibase/backend-core/tests.`,
message: `Importing from @budibase is not allowed, except for @budibase/backend-core/tests and @budibase/string-templates/js-helpers.`,
})
}
},

View file

@ -0,0 +1,10 @@
import getJsHelperList from '@budibase/string-templates/js-helpers'
const helpers = getJsHelperList()
module.exports = {
...helpers,
// pointing stripProtocol to a unexisting function to be able to declare it on isolated-vm
// @ts-ignore
// eslint-disable-next-line no-undef
stripProtocol: helpersStripProtocol,
}

View file

@ -12,6 +12,7 @@
"import": "./dist/bundle.mjs"
},
"./package.json": "./package.json",
"./js-helpers": "./src/index-helpers.js",
"./index-helpers": "./dist/index-helpers.bundled.js",
"./test/utils": "./test/utils.js"
},