import { TokenizationError } from 'liquidjs' import type { TagToken, Liquid, Template } from 'liquidjs' import { THROW_ON_EMPTY, DataReferenceError } from './error-handling' import { getDataByLanguage } from '@/data-directory/lib/get-data' const Syntax = /([a-z0-9/\\_.\-[\]]+)/i const SyntaxHelp = "Syntax Error in 'data' - Valid syntax: data [path]" // Using any for scope because it has custom environments property not in Liquid's Scope type interface CustomScope { environments: any [key: string]: any } interface DataTag { path: string tagToken: TagToken liquid: Liquid parse(tagToken: TagToken): void render(scope: CustomScope): Promise