UNPKG

@mdfriday/foundry

Version:

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

48 lines 1.39 kB
import { Template } from '@mdfriday/text-template'; import { TemplateExecutor, TemplateError } from '../type'; /** * Executor entity for executing templates * TypeScript version of Go's Executor struct */ export declare class Executor implements TemplateExecutor { /** * Execute template with data */ execute(tmpl: Template, data: any): Promise<string>; /** * Execute template with timeout */ executeWithTimeout(tmpl: Template, data: any, timeoutMs: number): Promise<string>; /** * Execute template safely with error handling */ executeSafely(tmpl: Template, data: any): Promise<{ result: string | null; error: TemplateError | null; }>; /** * Execute multiple templates in batch */ executeBatch(templates: Array<{ name: string; template: Template; data: any; }>): Promise<Array<{ name: string; result: string | null; error: TemplateError | null; }>>; /** * Execute template with context and cancellation support */ executeWithContext(tmpl: Template, data: any, context: { signal?: AbortSignal; timeout?: number; metadata?: Record<string, any>; }): Promise<string>; } /** * Create a new Executor instance */ export declare function newExecutor(): Executor; //# sourceMappingURL=executor.d.ts.map