feat: extract Directus sync/branding and optimize Gitea CI with Next.js lint support
Some checks failed
Code Quality / lint-and-build (push) Has been cancelled
Release Packages / release (push) Has been cancelled

This commit is contained in:
2026-02-03 01:28:36 +01:00
parent c9db75c945
commit cc3ec8f0c2
9 changed files with 223 additions and 56 deletions

View File

@@ -1,38 +1,41 @@
import createNextIntlPlugin from 'next-intl/plugin';
import { withSentryConfig } from '@sentry/nextjs';
import createNextIntlPlugin from "next-intl/plugin";
import { withSentryConfig } from "@sentry/nextjs";
const withNextIntl = createNextIntlPlugin();
/** @type {import('next').NextConfig} */
export const baseNextConfig = {
output: 'standalone',
output: "standalone",
images: {
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
contentDispositionType: "attachment",
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
async rewrites() {
const umamiUrl = (process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL || 'https://analytics.infra.mintel.me').replace('/script.js', '');
const umamiUrl = (
process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL ||
"https://analytics.infra.mintel.me"
).replace("/script.js", "");
const glitchtipUrl = process.env.SENTRY_DSN
? new URL(process.env.SENTRY_DSN).origin
: 'https://errors.infra.mintel.me';
: "https://errors.infra.mintel.me";
return [
{
source: '/stats/:path*',
source: "/stats/:path*",
destination: `${umamiUrl}/:path*`,
},
{
source: '/errors/:path*',
source: "/errors/:path*",
destination: `${glitchtipUrl}/:path*`,
},
];
},
};
export default (config) => {
const withMintelConfig = (config) => {
const nextIntlConfig = withNextIntl({ ...baseNextConfig, ...config });
return withSentryConfig(
nextIntlConfig,
{
@@ -41,6 +44,8 @@ export default (config) => {
},
{
authToken: undefined,
}
},
);
};
export default withMintelConfig;