@t1mmen/srtd
Version:
Supabase Repeatable Template Definitions (srtd): 🪄 Live-reloading SQL templates for Supabase DX. Make your database changes reviewable and migrations maintainable! 🚀
15 lines (14 loc) • 752 B
TypeScript
import type { TemplateResult } from '../ui/types.js';
/**
* Event types for NDJSON streaming output in watch mode.
* Note: These are watch-specific events, not a 1:1 mapping to OrchestratorEvents.
* - 'init' and 'error' are synthetic events created by watch command
* - 'templateChanged', 'templateApplied', 'templateError' map to Orchestrator events
*/
export type StreamEventType = 'init' | 'templateChanged' | 'templateApplied' | 'templateError' | 'error';
export interface StreamEvent {
type: StreamEventType;
timestamp: string;
data: TemplateResult | TemplateResult[] | Record<string, unknown>;
}
export declare function ndjsonEvent(type: StreamEventType, data: TemplateResult | TemplateResult[] | Record<string, unknown>): void;