()
| 61 | } |
| 62 | |
| 63 | async function loadPtySpawn(): Promise<PtySpawn | null> { |
| 64 | if (cachedPtySpawn) { |
| 65 | return cachedPtySpawn; |
| 66 | } |
| 67 | try { |
| 68 | const mod = await import('node-pty'); |
| 69 | cachedPtySpawn = mod.spawn; |
| 70 | return cachedPtySpawn; |
| 71 | } catch (error) { |
| 72 | console.warn('[Docker][PTY] node-pty module not available:', error instanceof Error ? error.message : error); |
| 73 | return null; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | export async function runComponentInline<I, O>( |
| 78 | execute: (params: I, context: ExecutionContext) => Promise<O>, |
no test coverage detected