function groupByDomain(schemas) {
  const grouped = /** @type {Record<string, Array<{ url: string }>>} */ ({})

  for (const schema of schemas) {
    const domain = extractDomain(schema.url)
    if (!grouped[domain]) {
      grouped[domain] = []
    }
    grouped[domain].push(schema)
  }

  return grouped
}
Groups schemas by their domain.
@param {Array<{ url: string }>} schemas - The schemas to group.
@returns {Record<string, Array<{ url: string }>>} - The grouped schemas.