UNPKG

its-compiler-js

Version:

JavaScript/TypeScript implementation of the Instruction Template Specification (ITS) compiler

47 lines 1.73 kB
/** * ITS Compiler - JavaScript/TypeScript implementation * * Reference implementation of the Instruction Template Specification (ITS) compiler * that converts content templates with placeholders into structured AI prompts. */ import { ITSCompiler } from './compiler.js'; export { ITSCompiler } from './compiler.js'; export { SecurityValidator, DEFAULT_SECURITY_CONFIG } from './security.js'; export { VariableProcessor } from './variable-processor.js'; export { ConditionalEvaluator } from './conditional-evaluator.js'; export { SchemaLoader } from './schema-loader.js'; export { OverrideType, ITSError, ITSValidationError, ITSCompilationError, ITSSecurityError, ITSVariableError, } from './types.js'; // Default export for convenience export { ITSCompiler as default } from './compiler.js'; /** * Package version */ export const VERSION = '1.0.0'; /** * Create a new ITS Compiler instance with default configuration */ export function createCompiler(securityConfig) { return new ITSCompiler(securityConfig); } /** * Compile a template file with default settings */ export async function compileFile(templatePath, variables, options) { const compiler = new ITSCompiler(); return await compiler.compileFile(templatePath, variables, options); } /** * Compile a template object with default settings */ export async function compile(template, variables, options) { const compiler = new ITSCompiler(); return await compiler.compile(template, variables, options); } /** * Validate a template with default settings */ export async function validate(template, baseUrl) { const compiler = new ITSCompiler(); return await compiler.validate(template, baseUrl); } //# sourceMappingURL=index.js.map