| 1 | import { connectionRoutes, type ConnectionCatalogEntry } from "@t3tools/client-runtime/connection"; |
| 2 | |
| 3 | export function shouldEnableCloudAuth( |
| 4 | service: "t3-connect" | "self-hosted" | undefined, |
| 5 | entries: Iterable<ConnectionCatalogEntry>, |
| 6 | ): boolean { |
| 7 | return ( |
| 8 | service === "t3-connect" || |
| 9 | [...entries].some((entry) => |
| 10 | connectionRoutes(entry).some((route) => route.target._tag === "RelayConnectionTarget"), |
| 11 | ) |
| 12 | ); |
| 13 | } |