( commands: Command[], server: ReactotronServer, clientId?: string )
| 56 | } |
| 57 | |
| 58 | function filterByClient( |
| 59 | commands: Command[], |
| 60 | server: ReactotronServer, |
| 61 | clientId?: string |
| 62 | ): Command[] { |
| 63 | const apps = getApps(server) |
| 64 | |
| 65 | if (clientId) { |
| 66 | return commands.filter((c) => c.clientId === clientId) |
| 67 | } |
| 68 | |
| 69 | if (apps.length === 1) { |
| 70 | return commands.filter((c) => c.clientId === apps[0].clientId) |
| 71 | } |
| 72 | |
| 73 | return commands |
| 74 | } |
| 75 | |
| 76 | function json(uri: URL, data: unknown, guidance?: string) { |
| 77 | return { |
no test coverage detected