()
| 95 | }; |
| 96 | |
| 97 | async function spawn(): Promise<RunningServer> { |
| 98 | const r = await startServer({ |
| 99 | host: '127.0.0.1', |
| 100 | port: 0, |
| 101 | lockPath, |
| 102 | logger: pino({ level: 'silent' }), |
| 103 | coreProcessOptions: { homeDir: bridgeHome }, |
| 104 | wsGatewayOptions: { |
| 105 | pingIntervalMs: 60, |
| 106 | pongTimeoutMs: 200, |
| 107 | }, |
| 108 | // Inject the fixed token via the DI seam (M5.1 reads it through the WS |
| 109 | // gateway's `setAuthTokenService`, no longer via `wsGatewayOptions`). |
| 110 | serviceOverrides: [[IAuthTokenService, fixedTokenAuth]], |
| 111 | }); |
| 112 | running.push(r); |
| 113 | return r; |
| 114 | } |
| 115 | |
| 116 | function wsUrl(http: string): string { |
| 117 | return http.replace(/^http:\/\//, 'ws://') + '/api/v1/ws'; |
no test coverage detected