(endpoint: string)
| 197 | |
| 198 | /** Derive an integration slug from an endpoint URL. */ |
| 199 | const slugFromEndpoint = (endpoint: string): string => { |
| 200 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: URL construction throws; this helper intentionally falls back to the stable default slug |
| 201 | try { |
| 202 | const url = new URL(endpoint); |
| 203 | return url.hostname.replace(/[^a-z0-9]+/gi, "_").toLowerCase(); |
| 204 | } catch { |
| 205 | return "graphql"; |
| 206 | } |
| 207 | }; |
| 208 | |
| 209 | const formatTypeRef = (ref: IntrospectionTypeRef): string => |
| 210 | Match.value(ref.kind).pipe( |
no test coverage detected