UNPKG

@mdfriday/foundry

Version:

The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.

26 lines (25 loc) 909 B
import { Template } from '@mdfriday/text-template'; import { TemplateExecutor, TemplateError } from '../type'; export declare class Executor implements TemplateExecutor { execute(tmpl: Template, data: any): Promise<string>; executeWithTimeout(tmpl: Template, data: any, timeoutMs: number): Promise<string>; executeSafely(tmpl: Template, data: any): Promise<{ result: string | null; error: TemplateError | null; }>; executeBatch(templates: Array<{ name: string; template: Template; data: any; }>): Promise<Array<{ name: string; result: string | null; error: TemplateError | null; }>>; executeWithContext(tmpl: Template, data: any, context: { signal?: AbortSignal; timeout?: number; metadata?: Record<string, any>; }): Promise<string>; } export declare function newExecutor(): Executor;