(server: ReactotronServer)
| 31 | } |
| 32 | |
| 33 | function connectionMeta(server: ReactotronServer): Record<string, unknown> { |
| 34 | const apps = getApps(server) |
| 35 | |
| 36 | if (apps.length === 0) { |
| 37 | return { |
| 38 | connection: "no_apps_connected", |
| 39 | hint: "No apps are connected to Reactotron. Start your React Native / React app with Reactotron configured.", |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | if (apps.length === 1) { |
| 44 | return { |
| 45 | connection: "single_app", |
| 46 | app: apps[0], |
| 47 | hint: `Connected to ${apps[0].name} (${apps[0].platform}). All data is from this app.`, |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | return { |
| 52 | connection: "multiple_apps", |
| 53 | apps, |
| 54 | hint: "Multiple apps are connected. If the user hasn't specified which app, ask them. Then pass clientId to filter data. Check the workspace's package.json name to see if it matches one of these app names.", |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | function filterByClient( |
| 59 | commands: Command[], |
no test coverage detected