From fe42cf64a39caa7eb40c3af663bddd214d01eb0f Mon Sep 17 00:00:00 2001 From: Limezy Date: Wed, 14 Feb 2024 18:13:22 +0700 Subject: [PATCH] Test removal babelrc --- sources/patches/diff.txt | 28 +++------------------------ sources/patches/main-02-visitor.patch | 9 --------- sources/patches/main-03-login.patch | 19 +++--------------- 3 files changed, 6 insertions(+), 50 deletions(-) diff --git a/sources/patches/diff.txt b/sources/patches/diff.txt index 294c600..f781b63 100644 --- a/sources/patches/diff.txt +++ b/sources/patches/diff.txt @@ -107,23 +107,10 @@ index 5d564453d..9e3c5b55b 100644 })} diff --git a/app/scenes/Login/index.tsx b/app/scenes/Login/index.tsx -index 9a9650b48..e642869b1 100644 +index 9a9650b48..5357d5cf5 100644 --- a/app/scenes/Login/index.tsx +++ b/app/scenes/Login/index.tsx -@@ -228,12 +228,6 @@ function Login({ children }: Props) { - ); - } - -- // If there is only one provider and it's OIDC, redirect immediately. -- if (config.providers.length === 1 && config.providers[0].id === "oidc") { -- window.location.href = getRedirectUrl(config.providers[0].authUrl); -- return null; -- } -- - return ( - - -@@ -264,7 +258,7 @@ function Login({ children }: Props) { +@@ -264,7 +264,7 @@ function Login({ children }: Props) { ) : ( <> @@ -132,7 +119,7 @@ index 9a9650b48..e642869b1 100644 authProviderName: config.name || env.APP_NAME, })} -@@ -282,7 +276,7 @@ function Login({ children }: Props) { +@@ -282,7 +282,7 @@ function Login({ children }: Props) { {hasMultipleProviders && ( <> @@ -176,15 +163,6 @@ index 000000000..ae7c40333 + "name": "visiteur", + "description": "Adds an req compatible authentication provider." +} -diff --git a/plugins/req/server/.babelrc b/plugins/req/server/.babelrc -new file mode 100644 -index 000000000..c87001bc4 ---- /dev/null -+++ b/plugins/req/server/.babelrc -@@ -0,0 +1,3 @@ -+{ -+ "extends": "../../../server/.babelrc" -+} diff --git a/plugins/req/server/auth/req.ts b/plugins/req/server/auth/req.ts new file mode 100644 index 000000000..bc03fc6d3 diff --git a/sources/patches/main-02-visitor.patch b/sources/patches/main-02-visitor.patch index 8be4dd3..0d7fcac 100644 --- a/sources/patches/main-02-visitor.patch +++ b/sources/patches/main-02-visitor.patch @@ -20,15 +20,6 @@ index 000000000..ae7c40333 + "name": "visiteur", + "description": "Adds an req compatible authentication provider." +} -diff --git a/plugins/req/server/.babelrc b/plugins/req/server/.babelrc -new file mode 100644 -index 000000000..c87001bc4 ---- /dev/null -+++ b/plugins/req/server/.babelrc -@@ -0,0 +1,3 @@ -+{ -+ "extends": "../../../server/.babelrc" -+} diff --git a/plugins/req/server/auth/req.ts b/plugins/req/server/auth/req.ts new file mode 100644 index 000000000..bc03fc6d3 diff --git a/sources/patches/main-03-login.patch b/sources/patches/main-03-login.patch index 19b2856..c73e7ce 100644 --- a/sources/patches/main-03-login.patch +++ b/sources/patches/main-03-login.patch @@ -36,23 +36,10 @@ index 5d564453d..9e3c5b55b 100644 })} diff --git a/app/scenes/Login/index.tsx b/app/scenes/Login/index.tsx -index 9a9650b48..e642869b1 100644 +index 9a9650b48..5357d5cf5 100644 --- a/app/scenes/Login/index.tsx +++ b/app/scenes/Login/index.tsx -@@ -228,12 +228,6 @@ function Login({ children }: Props) { - ); - } - -- // If there is only one provider and it's OIDC, redirect immediately. -- if (config.providers.length === 1 && config.providers[0].id === "oidc") { -- window.location.href = getRedirectUrl(config.providers[0].authUrl); -- return null; -- } -- - return ( - - -@@ -264,7 +258,7 @@ function Login({ children }: Props) { +@@ -264,7 +264,7 @@ function Login({ children }: Props) { ) : ( <> @@ -61,7 +48,7 @@ index 9a9650b48..e642869b1 100644 authProviderName: config.name || env.APP_NAME, })} -@@ -282,7 +276,7 @@ function Login({ children }: Props) { +@@ -282,7 +282,7 @@ function Login({ children }: Props) { {hasMultipleProviders && ( <>