(_, port)
| 24 | const defaultOptions = { iconPath } |
| 25 | |
| 26 | const findWindow = async (_, port) => { |
| 27 | const browserWindows = BrowserWindow.getAllWindows() |
| 28 | const browserWindow = await browserWindows.reduce(async (promise, win) => { |
| 29 | const acc = await promise |
| 30 | if (acc) return acc |
| 31 | |
| 32 | const { isWorkerRunning, isPortSettingRequired, location } = await checkWindowInfo(win) |
| 33 | return (!isWorkerRunning || location.port === port) |
| 34 | && !isPortSettingRequired |
| 35 | ? win |
| 36 | : null |
| 37 | }, Promise.resolve(null)) |
| 38 | if (!browserWindow) createWindow(defaultOptions) |
| 39 | if (browserWindow) { |
| 40 | if (browserWindow.isMinimized()) browserWindow.restore() |
| 41 | browserWindow.focus() |
| 42 | } |
| 43 | return browserWindow |
| 44 | } |
| 45 | |
| 46 | const handleCommandLine = async (commandLine) => { |
| 47 | const url = commandLine.find((arg) => arg.startsWith('rndebugger://')) |
nothing calls this directly
no test coverage detected