diff --git a/packages/string-templates/src/helpers/list.ts b/packages/string-templates/src/helpers/list.ts index 5852bc9127..ca331edd8e 100644 --- a/packages/string-templates/src/helpers/list.ts +++ b/packages/string-templates/src/helpers/list.ts @@ -1,17 +1,23 @@ import { date, duration } from "./date" -import { - math, - array, - number, - url, - string, - comparison, - object, - regex, - uuid, - // @ts-expect-error -} from "@budibase/handlebars-helpers" +// @ts-expect-error +import math from "@budibase/handlebars-helpers/lib/math" +// @ts-expect-error +import array from "@budibase/handlebars-helpers/lib/array" +// @ts-expect-error +import number from "@budibase/handlebars-helpers/lib/number" +// @ts-expect-error +import url from "@budibase/handlebars-helpers/lib/url" +// @ts-expect-error +import string from "@budibase/handlebars-helpers/lib/string" +// @ts-expect-error +import comparison from "@budibase/handlebars-helpers/lib/comparison" +// @ts-expect-error +import object from "@budibase/handlebars-helpers/lib/object" +// @ts-expect-error +import regex from "@budibase/handlebars-helpers/lib/regex" +// @ts-expect-error +import uuid from "@budibase/handlebars-helpers/lib/uuid" // https://github.com/evanw/esbuild/issues/56 const externalCollections = { @@ -42,7 +48,7 @@ export function getJsHelperList() { helpers = {} for (let collection of Object.values(externalCollections)) { - for (let [key, func] of Object.entries(collection())) { + for (let [key, func] of Object.entries(collection)) { // Handlebars injects the hbs options to the helpers by default. We are adding an empty {} as a last parameter to simulate it helpers[key] = (...props: any) => func(...props, {}) }