1
0
Fork 0
mirror of synced 2024-07-04 05:50:57 +12:00
This commit is contained in:
Adria Navarro 2024-02-22 00:39:27 +01:00
parent d24ea36c64
commit 38f64aa704
3 changed files with 10 additions and 5 deletions

View file

@ -7,6 +7,7 @@ import {
HelperFunctionBuiltin,
LITERAL_MARKER,
} from "./constants"
export { getJsHelperList } from "./list"
const HTML_SWAPS = {

View file

@ -1,10 +1,11 @@
import fs from "fs"
import { createContext, runInNewContext } from "vm"
import { create } from "handlebars"
import { registerAll, registerMinimum } from "./helpers/index"
import { preprocess, postprocess } from "./processors"
import { atob, btoa, isBackendService } from "./utilities"
import {
atob,
btoa,
isBackendService,
FIND_HBS_REGEX,
FIND_ANY_HBS_REGEX,
findDoubleHbsInstances,
@ -13,6 +14,8 @@ import { convertHBSBlock } from "./conversion"
import { setJSRunner, removeJSRunner } from "./helpers/javascript"
import { helpersToRemoveForJs } from "./helpers/list"
import manifest from "../manifest.json"
export { setJSRunner, setOnErrorLog } from "./helpers/javascript"
const hbsInstance = create()
@ -256,7 +259,6 @@ export function isValid(string, opts?) {
* This manifest provides information about each of the helpers and how it can be used.
* @returns The manifest JSON which has been generated from the helpers.
*/
import manifest from "../manifest.json"
export function getManifest() {
return manifest
}

View file

@ -5,8 +5,10 @@ jest.mock("../src/utilities", () => {
isBackendService: jest.fn().mockReturnValue(true),
}
})
const { defaultJSSetup, processStringSync, encodeJSBinding } = require("../src")
const { isBackendService } = require("../src/utilities")
import { defaultJSSetup, processStringSync, encodeJSBinding } from "../src"
import { isBackendService } from "../src/utilities"
const mockedBackendService = jest.mocked(isBackendService)
const binding = encodeJSBinding("return 1")