sourcebot/packages/web/next.config.mjs
Michael Sukkarieh fdd71cfcfe
add better visualization for connection/repo errors and warnings (#201)
* replace upsert with seperate create many and raw update many calls

* add bulk repo status update and queue addition with priority

* add support for managed redis

* add note for changing raw sql on schema change

* add error package and use BackendException in connection manager

* handle connection failure display on web app

* add warning banner for not found orgs/repos/users

* add failure handling for gerrit

* add gitea notfound warning support

* add warning icon in connections list

* style nits

* add failed repo vis in connections list

* added retry failed repo index buttons

* move nav indicators to client with polling

* fix indicator flash issue and truncate large list results

* display error nav better

* truncate failed repo list in connection list item

* fix merge error

* fix merge bug

* add connection util file [wip]

* refactor notfound fetch logic and add missing error package to dockerfile

* move repeated logic to function and add zod schema for syncStatusMetadata
2025-02-19 18:10:22 -08:00

48 lines
1.5 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
// @see : https://posthog.com/docs/advanced/proxy/nextjs
async rewrites() {
return [
{
source: "/ingest/static/:path*",
destination: `${process.env.NEXT_PUBLIC_POSTHOG_ASSET_HOST}/static/:path*`,
},
{
source: "/ingest/:path*",
destination: `${process.env.NEXT_PUBLIC_POSTHOG_HOST}/:path*`,
},
{
source: "/ingest/decide",
destination: `${process.env.NEXT_PUBLIC_POSTHOG_HOST}/decide`,
},
];
},
// This is required to support PostHog trailing slash API requests
skipTrailingSlashRedirect: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
},
{
protocol: 'https',
hostname: 'gitlab.com',
},
]
}
// @nocheckin: This was interfering with the the `matcher` regex in middleware.ts,
// causing regular expressions parsing errors when making a request. It's unclear
// why exactly this was happening, but it's likely due to a bad replacement happening
// in the `sed` command.
// @note: this is evaluated at build time.
// ...(process.env.NEXT_PUBLIC_DOMAIN_SUB_PATH ? {
// basePath: process.env.NEXT_PUBLIC_DOMAIN_SUB_PATH,
// } : {})
};
export default nextConfig;