From db5520f2231fc46076c8cdaf3b0eb937ae2aa857 Mon Sep 17 00:00:00 2001 From: Derek <256792747+decofe@users.noreply.github.com> Date: Mon, 29 Jun 2026 07:13:41 +0000 Subject: [PATCH] Revert "Redirect docs domain to developers (#607)" This reverts commit bcbbcbbe6b16478f5cd0bfb276c4d832465fdb76. --- src/lib/docs-routing.test.ts | 31 ------------------------- vercel.json | 44 ------------------------------------ 2 files changed, 75 deletions(-) diff --git a/src/lib/docs-routing.test.ts b/src/lib/docs-routing.test.ts index 403c8d5a..53b2ea6a 100644 --- a/src/lib/docs-routing.test.ts +++ b/src/lib/docs-routing.test.ts @@ -14,43 +14,12 @@ const vercelConfig = JSON.parse( ) as { redirects: Redirect[] } const redirects = vercelConfig.redirects.filter((redirect) => !redirect.has) -const hostRedirects = vercelConfig.redirects.filter((redirect) => redirect.has) function findRedirect(source: string) { return redirects.find((redirect) => redirect.source === source) } -function findHostRedirect(source: string, host: string) { - return hostRedirects.find( - (redirect) => - redirect.source === source && - Array.isArray(redirect.has) && - redirect.has.some( - (condition) => - typeof condition === 'object' && - condition !== null && - 'type' in condition && - 'value' in condition && - condition.type === 'host' && - condition.value === host, - ), - ) -} - describe('docs routing redirects', () => { - it.each([ - ['/', 'https://tempo.xyz/developers'], - ['/developers', 'https://tempo.xyz/developers'], - ['/developers/:path*', 'https://tempo.xyz/developers/:path*'], - ['/:path*', 'https://tempo.xyz/developers/:path*'], - ])('redirects docs.tempo.xyz%s to %s', (source, destination) => { - expect(findHostRedirect(source, 'docs.tempo.xyz')).toMatchObject({ - source, - destination, - permanent: true, - }) - }) - it.each([ ['/tools', '/docs/tools'], ['/tools/:path*', '/docs/tools/:path*'], diff --git a/vercel.json b/vercel.json index 8b39c807..71ba6ddc 100644 --- a/vercel.json +++ b/vercel.json @@ -1,49 +1,5 @@ { "redirects": [ - { - "source": "/", - "has": [ - { - "type": "host", - "value": "docs.tempo.xyz" - } - ], - "destination": "https://tempo.xyz/developers", - "permanent": true - }, - { - "source": "/developers", - "has": [ - { - "type": "host", - "value": "docs.tempo.xyz" - } - ], - "destination": "https://tempo.xyz/developers", - "permanent": true - }, - { - "source": "/developers/:path*", - "has": [ - { - "type": "host", - "value": "docs.tempo.xyz" - } - ], - "destination": "https://tempo.xyz/developers/:path*", - "permanent": true - }, - { - "source": "/:path*", - "has": [ - { - "type": "host", - "value": "docs.tempo.xyz" - } - ], - "destination": "https://tempo.xyz/developers/:path*", - "permanent": true - }, { "source": "/", "has": [