fix: correct auth.clawdhub.com typo to auth.clawhub.com

Fixes #143

The issue reported CORS errors when uploading skills. The root cause
was a typo in the legacy domain name - 'auth.clawdhub.com' (with an
extra 'd') instead of 'auth.clawhub.com'.

This typo appeared in:
- src/lib/site.ts: LEGACY_CLAWDHUB_HOSTS set
- packages/clawdhub/src/cli/registry.ts: LEGACY_REGISTRY_HOSTS set
- Tests for both files

When users tried to upload skills, requests were made to the
non-existent 'auth.clawdhub.com' domain, causing CORS policy
violations and 404s.

Changes:
- Fixed typo in site.ts legacy host set
- Fixed typo in registry.ts legacy registry hosts
- Removed duplicate 'auth.clawdhub.com' entry from registry.ts
- Updated tests to reflect correct domain

All tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Steve
2026-02-13 16:37:35 -04:00
parent d2919791d1
commit 7d17ec7acc
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ beforeEach(() => {
describe('registry resolution', () => {
it('prefers explicit registry over discovery/cache', async () => {
readGlobalConfig.mockResolvedValue({ registry: 'https://auth.clawdhub.com' })
readGlobalConfig.mockResolvedValue({ registry: 'https://auth.clawhub.com' })
discoverRegistryFromSite.mockResolvedValue({ apiBase: 'https://clawhub.ai' })
const registry = await resolveRegistry(
@@ -49,7 +49,7 @@ describe('registry resolution', () => {
})
it('ignores legacy registry and updates cache from discovery', async () => {
readGlobalConfig.mockResolvedValue({ registry: 'https://auth.clawdhub.com', token: 'tkn' })
readGlobalConfig.mockResolvedValue({ registry: 'https://auth.clawhub.com', token: 'tkn' })
discoverRegistryFromSite.mockResolvedValue({ apiBase: 'https://clawhub.ai' })
const registry = await getRegistry(makeOpts(), { cache: true })
+1 -1
View File
@@ -4,7 +4,7 @@ import type { GlobalOpts } from './types.js'
export const DEFAULT_SITE = 'https://clawhub.ai'
export const DEFAULT_REGISTRY = 'https://clawhub.ai'
const LEGACY_REGISTRY_HOSTS = new Set(['auth.clawdhub.com', 'auth.clawhub.com', 'auth.clawhub.ai'])
const LEGACY_REGISTRY_HOSTS = new Set(['auth.clawhub.com', 'auth.clawhub.ai'])
export async function resolveRegistry(opts: GlobalOpts) {
const explicit = opts.registrySource !== 'default' ? opts.registry.trim() : ''
+1 -1
View File
@@ -49,7 +49,7 @@ describe('site helpers', () => {
withMetaEnv({ VITE_SITE_URL: 'https://clawdhub.com' }, () => {
expect(getClawHubSiteUrl()).toBe('https://clawhub.ai')
})
withMetaEnv({ VITE_SITE_URL: 'https://auth.clawdhub.com' }, () => {
withMetaEnv({ VITE_SITE_URL: 'https://auth.clawhub.com' }, () => {
expect(getClawHubSiteUrl()).toBe('https://clawhub.ai')
})
})
+1 -1
View File
@@ -3,7 +3,7 @@ export type SiteMode = 'skills' | 'souls'
const DEFAULT_CLAWHUB_SITE_URL = 'https://clawhub.ai'
const DEFAULT_ONLYCRABS_SITE_URL = 'https://onlycrabs.ai'
const DEFAULT_ONLYCRABS_HOST = 'onlycrabs.ai'
const LEGACY_CLAWDHUB_HOSTS = new Set(['clawdhub.com', 'www.clawdhub.com', 'auth.clawdhub.com'])
const LEGACY_CLAWDHUB_HOSTS = new Set(['clawdhub.com', 'www.clawdhub.com', 'auth.clawhub.com'])
export function normalizeClawHubSiteOrigin(value?: string | null) {
if (!value) return null