| 21 | } |
| 22 | |
| 23 | export interface ServerManagerOptions { |
| 24 | command: string; |
| 25 | args: ReadonlyArray<string>; |
| 26 | /** URL used to probe readiness, e.g. http://127.0.0.1:9000/. */ |
| 27 | url: string; |
| 28 | output: OutputSink; |
| 29 | /** Defaults to node:child_process.spawn. */ |
| 30 | spawnFn?: SpawnFn; |
| 31 | /** Defaults to the built-in http.get probe. */ |
| 32 | probeFn?: (url: string) => Promise<boolean>; |
| 33 | /** Total time to wait for the server to become healthy. Default 10s. */ |
| 34 | readinessTimeoutMs?: number; |
| 35 | /** Time between probes. Default 200ms. */ |
| 36 | readinessPollMs?: number; |
| 37 | } |
| 38 | |
| 39 | export type ServerStatus = "stopped" | "starting" | "ready" | "exited" | "failed"; |
| 40 |
nothing calls this directly
no outgoing calls
no test coverage detected