UNPKG

everything-dev

Version:

A consolidated product package for building Module Federation apps with oRPC APIs.

1 lines • 1.73 kB
{"version":3,"file":"render.cjs","names":["Context"],"sources":["../../../src/services/dev/render.ts"],"sourcesContent":["import { Context } from \"effect\";\n\nexport type DevProcessStatus = \"pending\" | \"starting\" | \"ready\" | \"error\";\n\nexport interface DevProcessState {\n name: string;\n status: DevProcessStatus;\n port: number;\n message?: string;\n source?: string;\n uiPort?: number;\n}\n\nexport interface DevLogLine {\n source: string;\n line: string;\n isError?: boolean;\n}\n\nexport interface DevSessionState {\n description: string;\n proxyTarget?: string;\n processes: DevProcessState[];\n logs: DevLogLine[];\n}\n\nexport interface DevRendererHandle {\n updateProcess: (name: string, status: DevProcessStatus, message?: string) => void;\n addLog: (source: string, line: string, isError?: boolean) => void;\n unmount: () => void;\n}\n\nexport interface DevRendererOutput {\n write: (text: string) => void;\n}\n\n/**\n * The dev session's view seam (DIP): the session owns the process lifecycle\n * and pushes status/log events; the CLI supplies the terminal renderer\n * implementation. The interface is the render contract — a non-interactive\n * consumer can supply a no-op handle.\n */\nexport class DevRenderer extends Context.Service<\n DevRenderer,\n {\n create: (\n initialProcesses: DevProcessState[],\n description: string,\n env: Record<string, string>,\n requestShutdown: () => void,\n requestExportShutdown: () => void,\n options: { interactive: boolean; onForceExit: () => void },\n ) => DevRendererHandle;\n }\n>()(\"bos/DevRenderer\") {}\n"],"mappings":";;;;;;;;;AA0CA,IAAa,cAAb,cAAiCA,eAAQ,QAYvC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC"}