(port: number)
| 32 | } |
| 33 | |
| 34 | export const createPortOverrideComposeFile = (port: number): string => { |
| 35 | const tempFile = join(os.tmpdir(), `nostream-port-override-${process.pid}-${Date.now()}.yml`) |
| 36 | const content = [ |
| 37 | 'services:', |
| 38 | ' nostream:', |
| 39 | ' environment:', |
| 40 | ` RELAY_PORT: ${port}`, |
| 41 | ' ports:', |
| 42 | ` - 127.0.0.1:${port}:${port}`, |
| 43 | ].join('\n') |
| 44 | |
| 45 | fs.writeFileSync(tempFile, content, { encoding: 'utf-8' }) |
| 46 | return tempFile |
| 47 | } |
no outgoing calls
no test coverage detected