UNPKG

@mondaydotcomorg/atp-compiler

Version:

Production-ready compiler for transforming async iteration patterns into resumable operations with checkpoint-based state management

25 lines 700 B
const contextStack = []; export function setRuntimeContext(context) { contextStack.push(context); } export function getRuntimeContext() { const context = contextStack[contextStack.length - 1]; if (!context) { throw new Error('No runtime context available. Compiler runtime not properly initialized.'); } return context; } export function clearRuntimeContext() { contextStack.pop(); } export function hasRuntimeContext() { return contextStack.length > 0; } let idCounter = 0; export function generateUniqueId(prefix) { return `${prefix}_${Date.now()}_${idCounter++}`; } export function resetIdCounter() { idCounter = 0; } //# sourceMappingURL=context.js.map