From df6a4b8b61181bae40298a7031bb66af6373ebb7 Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Mon, 14 Oct 2024 11:01:10 +0200 Subject: SONAR-23205 Migrate build system to vite --- .../auth/saml/SamlAuthStatusPageGenerator.java | 2 +- .../src/main/resources/samlAuthResult.html | 24 +- server/sonar-web/babel.config.js | 23 + server/sonar-web/config/esbuild-config.js | 77 - server/sonar-web/config/esbuild-html-plugin.js | 60 - server/sonar-web/config/indexHtmlTemplate.js | 58 - server/sonar-web/config/paths.js | 26 - server/sonar-web/config/process-shim.js | 22 - server/sonar-web/config/utils.js | 8 +- .../config/vite-dev-server-html-plugin.mjs | 33 + server/sonar-web/index.html | 43 + server/sonar-web/package.json | 26 +- server/sonar-web/scripts/build.js | 57 - server/sonar-web/scripts/start.js | 135 -- server/sonar-web/src/main/js/app/index.ts | 8 +- server/sonar-web/src/main/js/app/theme-old.js | 274 ++++ server/sonar-web/src/main/js/app/theme.js | 274 ---- server/sonar-web/src/main/js/app/theme.ts | 277 ++++ .../js/apps/create/project/__tests__/Manual-it.tsx | 2 +- .../main/js/apps/issues/__tests__/IssuesApp-it.tsx | 2 +- .../issues/__tests__/IssuesSourceViewer-it.tsx | 2 +- .../__tests__/ProjectQualityGateApp-it.tsx | 7 +- .../__tests__/projectQualityProfilesApp-it.tsx | 2 +- .../components/__tests__/TutorialsApp-test.tsx | 2 +- server/sonar-web/vite.config.mjs | 168 ++ server/sonar-web/yarn.lock | 1628 +++++++++++++++++--- .../SamlValidationRedirectionFilter.java | 2 +- .../org/sonar/server/platform/web/CspFilter.java | 3 +- .../sonar/server/platform/web/WebPagesCache.java | 2 +- .../sonar/server/platform/web/CspFilterTest.java | 2 +- .../server/platform/web/WebPagesCacheTest.java | 2 +- 31 files changed, 2249 insertions(+), 1002 deletions(-) create mode 100644 server/sonar-web/babel.config.js delete mode 100644 server/sonar-web/config/esbuild-config.js delete mode 100644 server/sonar-web/config/esbuild-html-plugin.js delete mode 100644 server/sonar-web/config/indexHtmlTemplate.js delete mode 100644 server/sonar-web/config/paths.js delete mode 100644 server/sonar-web/config/process-shim.js create mode 100644 server/sonar-web/config/vite-dev-server-html-plugin.mjs create mode 100644 server/sonar-web/index.html delete mode 100644 server/sonar-web/scripts/build.js delete mode 100644 server/sonar-web/scripts/start.js create mode 100644 server/sonar-web/src/main/js/app/theme-old.js delete mode 100644 server/sonar-web/src/main/js/app/theme.js create mode 100644 server/sonar-web/src/main/js/app/theme.ts create mode 100644 server/sonar-web/vite.config.mjs (limited to 'server') diff --git a/server/sonar-auth-saml/src/main/java/org/sonar/auth/saml/SamlAuthStatusPageGenerator.java b/server/sonar-auth-saml/src/main/java/org/sonar/auth/saml/SamlAuthStatusPageGenerator.java index 672f384f746..62f9071a84f 100644 --- a/server/sonar-auth-saml/src/main/java/org/sonar/auth/saml/SamlAuthStatusPageGenerator.java +++ b/server/sonar-auth-saml/src/main/java/org/sonar/auth/saml/SamlAuthStatusPageGenerator.java @@ -30,7 +30,7 @@ import org.sonar.api.server.http.HttpRequest; public final class SamlAuthStatusPageGenerator { - private static final String WEB_CONTEXT = "%WEB_CONTEXT%"; + private static final String WEB_CONTEXT = "WEB_CONTEXT"; private static final String SAML_AUTHENTICATION_STATUS = "%SAML_AUTHENTICATION_STATUS%"; private static final String HTML_TEMPLATE_NAME = "samlAuthResult.html"; diff --git a/server/sonar-auth-saml/src/main/resources/samlAuthResult.html b/server/sonar-auth-saml/src/main/resources/samlAuthResult.html index bff1c9ef20d..945a8a68c83 100644 --- a/server/sonar-auth-saml/src/main/resources/samlAuthResult.html +++ b/server/sonar-auth-saml/src/main/resources/samlAuthResult.html @@ -3,40 +3,40 @@ - - - - - + + + + + - + - + SAML Authentication Test