Add regex functions
This commit is contained in:
parent
a2082e94d3
commit
9949b08879
|
@ -5,12 +5,12 @@ import { context } from "@budibase/backend-core"
|
||||||
import tracer from "dd-trace"
|
import tracer from "dd-trace"
|
||||||
import fs from "fs"
|
import fs from "fs"
|
||||||
|
|
||||||
const helpersSource = fs.readFileSync(
|
|
||||||
`${require.resolve("@budibase/string-templates/index-helpers")}`,
|
|
||||||
"utf8"
|
|
||||||
)
|
|
||||||
|
|
||||||
export function init() {
|
export function init() {
|
||||||
|
const helpersSource = fs.readFileSync(
|
||||||
|
`${require.resolve("@budibase/string-templates/index-helpers")}`,
|
||||||
|
"utf8"
|
||||||
|
)
|
||||||
|
|
||||||
setJSRunner((js: string, ctx: Record<string, any>) => {
|
setJSRunner((js: string, ctx: Record<string, any>) => {
|
||||||
return tracer.trace("runJS", {}, span => {
|
return tracer.trace("runJS", {}, span => {
|
||||||
const bbCtx = context.getCurrentContext()!
|
const bbCtx = context.getCurrentContext()!
|
||||||
|
|
|
@ -9,7 +9,7 @@ const externalCollections = {
|
||||||
string: require("@budibase/handlebars-helpers/lib/string"),
|
string: require("@budibase/handlebars-helpers/lib/string"),
|
||||||
// comparison: require("@budibase/handlebars-helpers/lib/comparison"),
|
// comparison: require("@budibase/handlebars-helpers/lib/comparison"),
|
||||||
object: require("@budibase/handlebars-helpers/lib/object"),
|
object: require("@budibase/handlebars-helpers/lib/object"),
|
||||||
// regex: require("@budibase/handlebars-helpers/lib/regex"),
|
regex: require("@budibase/handlebars-helpers/lib/regex"),
|
||||||
// uuid: require("@budibase/handlebars-helpers/lib/uuid"),
|
// uuid: require("@budibase/handlebars-helpers/lib/uuid"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue