mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
cleanup packages, turbo, fix middleware matcher
This commit is contained in:
@@ -26,8 +26,6 @@ const secureHeaders = [
|
||||
key: "X-XSS-Protection",
|
||||
value: "1; mode=block",
|
||||
},
|
||||
// img-src vercel.com needed for deploy button,
|
||||
// script-src va.vercel-scripts.com for analytics/vercel scripts
|
||||
{
|
||||
key: "Content-Security-Policy",
|
||||
value: `${DEFAULT_CSP} frame-ancestors 'none'`,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "next dev --turbopack",
|
||||
"dev": "next dev",
|
||||
"test": "concurrently --timings --kill-others-on-fail 'npm:test:unit' 'npm:test:integration'",
|
||||
"test:watch": "concurrently --kill-others 'npm:test:unit:watch' 'npm:test:integration:watch'",
|
||||
"test:unit": "vitest",
|
||||
@@ -45,7 +45,6 @@
|
||||
"clsx": "1.2.1",
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
"deepmerge": "^4.3.1",
|
||||
"jose": "^5.3.0",
|
||||
"lucide-react": "0.469.0",
|
||||
"moment": "^2.29.4",
|
||||
"next": "15.4.0-canary.86",
|
||||
@@ -56,7 +55,6 @@
|
||||
"react": "19.1.0",
|
||||
"react-dom": "19.1.0",
|
||||
"react-hook-form": "7.39.5",
|
||||
"swr": "^2.2.0",
|
||||
"tinycolor2": "1.4.2",
|
||||
"uuid": "^11.1.0"
|
||||
},
|
||||
|
@@ -1,5 +1,7 @@
|
||||
import { LANGS, LANGUAGE_COOKIE_NAME, LANGUAGE_HEADER_NAME } from "@/lib/i18n";
|
||||
import { getServiceUrlFromHeaders } from "@/lib/service-url";
|
||||
import { getHostedLoginTranslation } from "@/lib/zitadel";
|
||||
import { JsonObject } from "@zitadel/client";
|
||||
import deepmerge from "deepmerge";
|
||||
import { getRequestConfig } from "next-intl/server";
|
||||
import { cookies, headers } from "next/headers";
|
||||
@@ -14,14 +16,22 @@ export default getRequestConfig(async () => {
|
||||
const { serviceUrl } = getServiceUrlFromHeaders(_headers);
|
||||
|
||||
const i18nOrganization = _headers.get("x-zitadel-i18n-organization") || ""; // You may need to set this header in middleware
|
||||
console.log("i18nOrganization:", i18nOrganization);
|
||||
let translations: JsonObject | {} = {};
|
||||
try {
|
||||
const i18nJSON = await getHostedLoginTranslation({
|
||||
serviceUrl,
|
||||
locale,
|
||||
organization: i18nOrganization,
|
||||
});
|
||||
|
||||
// const translations = await getHostedLoginTranslation({
|
||||
// serviceUrl,
|
||||
// locale,
|
||||
// organization: i18nOrganization,
|
||||
// });
|
||||
|
||||
// console.log("Translations:", translations);
|
||||
if (i18nJSON) {
|
||||
translations = i18nJSON;
|
||||
}
|
||||
console.log("Translations:", translations);
|
||||
} catch (error) {
|
||||
console.warn("Error fetching custom translations:", error);
|
||||
}
|
||||
|
||||
const languageHeader = await (await headers()).get(LANGUAGE_HEADER_NAME);
|
||||
if (languageHeader) {
|
||||
|
@@ -10,8 +10,7 @@ export const config = {
|
||||
"/oidc/:path*",
|
||||
"/idps/callback/:path*",
|
||||
"/saml/:path*",
|
||||
// Add "/*" to match all routes for translation header injection
|
||||
"/*",
|
||||
"/:path*",
|
||||
],
|
||||
};
|
||||
|
||||
|
72
pnpm-lock.yaml
generated
72
pnpm-lock.yaml
generated
@@ -85,7 +85,7 @@ importers:
|
||||
version: 0.5.7(tailwindcss@3.4.14)
|
||||
'@vercel/analytics':
|
||||
specifier: ^1.2.2
|
||||
version: 1.3.1(next@15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react@19.1.0)
|
||||
version: 1.3.1(next@15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react@19.1.0)
|
||||
'@zitadel/client':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/zitadel-client
|
||||
@@ -101,9 +101,6 @@ importers:
|
||||
deepmerge:
|
||||
specifier: ^4.3.1
|
||||
version: 4.3.1
|
||||
jose:
|
||||
specifier: ^5.3.0
|
||||
version: 5.8.0
|
||||
lucide-react:
|
||||
specifier: 0.469.0
|
||||
version: 0.469.0(react@19.1.0)
|
||||
@@ -112,13 +109,13 @@ importers:
|
||||
version: 2.30.1
|
||||
next:
|
||||
specifier: 15.4.0-canary.86
|
||||
version: 15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0)
|
||||
version: 15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0)
|
||||
next-intl:
|
||||
specifier: ^3.25.1
|
||||
version: 3.26.5(next@15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react@19.1.0)
|
||||
version: 3.26.5(next@15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react@19.1.0)
|
||||
next-themes:
|
||||
specifier: ^0.2.1
|
||||
version: 0.2.1(next@15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
version: 0.2.1(next@15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
nice-grpc:
|
||||
specifier: 2.0.1
|
||||
version: 2.0.1
|
||||
@@ -134,9 +131,6 @@ importers:
|
||||
react-hook-form:
|
||||
specifier: 7.39.5
|
||||
version: 7.39.5(react@19.1.0)
|
||||
swr:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.5(react@19.1.0)
|
||||
tinycolor2:
|
||||
specifier: 1.4.2
|
||||
version: 1.4.2
|
||||
@@ -4258,11 +4252,6 @@ packages:
|
||||
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
swr@2.2.5:
|
||||
resolution: {integrity: sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==}
|
||||
peerDependencies:
|
||||
react: ^16.11.0 || ^17.0.0 || ^18.0.0
|
||||
|
||||
symbol-tree@3.2.4:
|
||||
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
|
||||
|
||||
@@ -4547,11 +4536,6 @@ packages:
|
||||
peerDependencies:
|
||||
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0
|
||||
|
||||
use-sync-external-store@1.2.2:
|
||||
resolution: {integrity: sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==}
|
||||
peerDependencies:
|
||||
react: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||
|
||||
util-deprecate@1.0.2:
|
||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||
|
||||
@@ -6005,11 +5989,11 @@ snapshots:
|
||||
|
||||
'@ungap/structured-clone@1.2.0': {}
|
||||
|
||||
'@vercel/analytics@1.3.1(next@15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react@19.1.0)':
|
||||
'@vercel/analytics@1.3.1(next@15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react@19.1.0)':
|
||||
dependencies:
|
||||
server-only: 0.0.1
|
||||
optionalDependencies:
|
||||
next: 15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0)
|
||||
next: 15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0)
|
||||
react: 19.1.0
|
||||
|
||||
'@vercel/git-hooks@1.0.0': {}
|
||||
@@ -6077,7 +6061,7 @@ snapshots:
|
||||
|
||||
agent-base@6.0.2:
|
||||
dependencies:
|
||||
debug: 4.4.0(supports-color@5.5.0)
|
||||
debug: 4.4.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -6608,6 +6592,10 @@ snapshots:
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
|
||||
debug@4.4.0:
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
|
||||
debug@4.4.0(supports-color@5.5.0):
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
@@ -7290,7 +7278,7 @@ snapshots:
|
||||
|
||||
follow-redirects@1.15.9(debug@4.4.0):
|
||||
optionalDependencies:
|
||||
debug: 4.4.0(supports-color@5.5.0)
|
||||
debug: 4.4.0
|
||||
|
||||
for-each@0.3.3:
|
||||
dependencies:
|
||||
@@ -7550,7 +7538,7 @@ snapshots:
|
||||
http-proxy-agent@7.0.2:
|
||||
dependencies:
|
||||
agent-base: 7.1.3
|
||||
debug: 4.4.0(supports-color@5.5.0)
|
||||
debug: 4.4.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -7563,14 +7551,14 @@ snapshots:
|
||||
https-proxy-agent@5.0.1:
|
||||
dependencies:
|
||||
agent-base: 6.0.2
|
||||
debug: 4.4.0(supports-color@5.5.0)
|
||||
debug: 4.4.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
https-proxy-agent@7.0.6:
|
||||
dependencies:
|
||||
agent-base: 7.1.3
|
||||
debug: 4.4.0(supports-color@5.5.0)
|
||||
debug: 4.4.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -7919,7 +7907,7 @@ snapshots:
|
||||
dependencies:
|
||||
chalk: 5.4.1
|
||||
commander: 13.1.0
|
||||
debug: 4.4.0(supports-color@5.5.0)
|
||||
debug: 4.4.0
|
||||
execa: 8.0.1
|
||||
lilconfig: 3.1.3
|
||||
listr2: 8.3.2
|
||||
@@ -8103,21 +8091,21 @@ snapshots:
|
||||
|
||||
negotiator@1.0.0: {}
|
||||
|
||||
next-intl@3.26.5(next@15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react@19.1.0):
|
||||
next-intl@3.26.5(next@15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react@19.1.0):
|
||||
dependencies:
|
||||
'@formatjs/intl-localematcher': 0.5.8
|
||||
negotiator: 1.0.0
|
||||
next: 15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0)
|
||||
next: 15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0)
|
||||
react: 19.1.0
|
||||
use-intl: 3.26.5(react@19.1.0)
|
||||
|
||||
next-themes@0.2.1(next@15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
||||
next-themes@0.2.1(next@15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
||||
dependencies:
|
||||
next: 15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0)
|
||||
next: 15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0)
|
||||
react: 19.1.0
|
||||
react-dom: 19.1.0(react@19.1.0)
|
||||
|
||||
next@15.4.0-canary.86(@babel/core@7.26.10)(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0):
|
||||
next@15.4.0-canary.86(@playwright/test@1.52.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.87.0):
|
||||
dependencies:
|
||||
'@next/env': 15.4.0-canary.86
|
||||
'@swc/helpers': 0.5.15
|
||||
@@ -8125,7 +8113,7 @@ snapshots:
|
||||
postcss: 8.4.31
|
||||
react: 19.1.0
|
||||
react-dom: 19.1.0(react@19.1.0)
|
||||
styled-jsx: 5.1.6(@babel/core@7.26.10)(react@19.1.0)
|
||||
styled-jsx: 5.1.6(react@19.1.0)
|
||||
optionalDependencies:
|
||||
'@next/swc-darwin-arm64': 15.4.0-canary.86
|
||||
'@next/swc-darwin-x64': 15.4.0-canary.86
|
||||
@@ -8849,7 +8837,7 @@ snapshots:
|
||||
arg: 5.0.2
|
||||
bluebird: 3.7.2
|
||||
check-more-types: 2.24.0
|
||||
debug: 4.4.0(supports-color@5.5.0)
|
||||
debug: 4.4.0
|
||||
execa: 5.1.1
|
||||
lazy-ass: 1.6.0
|
||||
ps-tree: 1.2.0
|
||||
@@ -8955,12 +8943,10 @@ snapshots:
|
||||
|
||||
strip-json-comments@3.1.1: {}
|
||||
|
||||
styled-jsx@5.1.6(@babel/core@7.26.10)(react@19.1.0):
|
||||
styled-jsx@5.1.6(react@19.1.0):
|
||||
dependencies:
|
||||
client-only: 0.0.1
|
||||
react: 19.1.0
|
||||
optionalDependencies:
|
||||
'@babel/core': 7.26.10
|
||||
|
||||
sucrase@3.35.0:
|
||||
dependencies:
|
||||
@@ -8986,12 +8972,6 @@ snapshots:
|
||||
|
||||
supports-preserve-symlinks-flag@1.0.0: {}
|
||||
|
||||
swr@2.2.5(react@19.1.0):
|
||||
dependencies:
|
||||
client-only: 0.0.1
|
||||
react: 19.1.0
|
||||
use-sync-external-store: 1.2.2(react@19.1.0)
|
||||
|
||||
symbol-tree@3.2.4: {}
|
||||
|
||||
tabbable@6.2.0: {}
|
||||
@@ -9280,10 +9260,6 @@ snapshots:
|
||||
intl-messageformat: 10.7.7
|
||||
react: 19.1.0
|
||||
|
||||
use-sync-external-store@1.2.2(react@19.1.0):
|
||||
dependencies:
|
||||
react: 19.1.0
|
||||
|
||||
util-deprecate@1.0.2: {}
|
||||
|
||||
uuid@11.1.0: {}
|
||||
|
Reference in New Issue
Block a user