mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 10:25:06 +03:00
feat(www): serve InstantDB migration app at /migrate/instantdb
This commit is contained in:
1 parent
09a245d72d
commit
2790183250
2 files changed
+27
No files matched your search
@@ -55,6 +55,14 @@ const rewrites = [
|
||||
source: '/evals/:path*',
|
||||
destination: 'https://supabase-evals.vercel.app/:path*',
|
||||
},
|
||||
{
|
||||
source: '/migrate/instantdb',
|
||||
destination: 'https://instantdb-to-supabase.vercel.app/migrate/instantdb',
|
||||
},
|
||||
{
|
||||
source: '/migrate/instantdb/:path*',
|
||||
destination: 'https://instantdb-to-supabase.vercel.app/migrate/instantdb/:path*',
|
||||
},
|
||||
|
||||
{
|
||||
source: '/new-docs',
|
||||
|
||||
@@ -62,6 +62,25 @@ describe('next.config.mjs', () => {
|
||||
).toBeLessThan(redirects.findIndex((redirect) => redirect.source === '/ui/:path*'))
|
||||
})
|
||||
|
||||
it('proxies the InstantDB migration app with its basePath prefix intact', async () => {
|
||||
const { default: config } = (await import('./next.config.mjs')) as { default: NextConfig }
|
||||
const rewrites = await config.rewrites?.()
|
||||
const afterFiles = (rewrites && 'afterFiles' in rewrites && rewrites.afterFiles) || []
|
||||
|
||||
expect(afterFiles).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
source: '/migrate/instantdb',
|
||||
destination: 'https://instantdb-to-supabase.vercel.app/migrate/instantdb',
|
||||
}),
|
||||
expect.objectContaining({
|
||||
source: '/migrate/instantdb/:path*',
|
||||
destination: 'https://instantdb-to-supabase.vercel.app/migrate/instantdb/:path*',
|
||||
}),
|
||||
])
|
||||
)
|
||||
})
|
||||
|
||||
it('routes unmatched markdown-negotiated paths to the md-404 handler via fallback rewrites', async () => {
|
||||
const { default: config } = (await import('./next.config.mjs')) as { default: NextConfig }
|
||||
const rewrites = await config.rewrites?.()
|
||||
|
||||
Reference in new issue
Block a user