From d338973925dd871e6cce516f5a24ea3b63cdcf35 Mon Sep 17 00:00:00 2001 From: Juan Rivera <72885316+juan-rivera-2020@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:32:29 -0400 Subject: [PATCH] Added patch to resolve adminjs conflict (3). --- server/package.json | 2 +- server/patches/adminjs+7.8.13.patch | 47 +++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 server/patches/adminjs+7.8.13.patch diff --git a/server/package.json b/server/package.json index efa8993..80b8117 100644 --- a/server/package.json +++ b/server/package.json @@ -29,7 +29,7 @@ "@fastify/multipart": "^8.3.0", "@fastify/session": "^10.9.0", "@fastify/static": "^7.0.1", - "adminjs": "^7.8.4", + "adminjs": "^7.8.13", "bcrypt": "^5.1.1", "body-parser": "^1.20.2", "dotenv": "^16.4.5", diff --git a/server/patches/adminjs+7.8.13.patch b/server/patches/adminjs+7.8.13.patch new file mode 100644 index 0000000..14f6eeb --- /dev/null +++ b/server/patches/adminjs+7.8.13.patch @@ -0,0 +1,47 @@ +diff --git a/node_modules/adminjs/lib/locale/index.js b/node_modules/adminjs/lib/locale/index.js +index 4968859..3c24b28 100644 +--- a/node_modules/adminjs/lib/locale/index.js ++++ b/node_modules/adminjs/lib/locale/index.js +@@ -1,22 +1,23 @@ +-import deLocale from './de/translation.json' with { type: 'json' }; +-import enLocale from './en/translation.json' with { type: 'json' }; +-import esLocale from './es/translation.json' with { type: 'json' }; +-import itLocale from './it/translation.json' with { type: 'json' }; +-import jaLocale from './ja/translation.json' with { type: 'json' }; +-import plLocale from './pl/translation.json' with { type: 'json' }; +-import ptBrLocale from './pt-BR/translation.json' with { type: 'json' }; +-import uaLocale from './ua/translation.json' with { type: 'json' }; +-import zhCNLocale from './zh-CN/translation.json' with { type: 'json' }; ++const deLocale = await import('./de/translation.json', { assert: { type: 'json' } }); ++const enLocale = await import('./en/translation.json', { assert: { type: 'json' } }); ++const esLocale = await import('./es/translation.json', { assert: { type: 'json' } }); ++const itLocale = await import('./it/translation.json', { assert: { type: 'json' } }); ++const jaLocale = await import('./ja/translation.json', { assert: { type: 'json' } }); ++const plLocale = await import('./pl/translation.json', { assert: { type: 'json' } }); ++const ptBrLocale = await import('./pt-BR/translation.json', { assert: { type: 'json' } }); ++const uaLocale = await import('./ua/translation.json', { assert: { type: 'json' } }); ++const zhCNLocale = await import('./zh-CN/translation.json', { assert: { type: 'json' } }); ++ + export * from './config.js'; + export * from './default-config.js'; + export const locales = { +- de: deLocale, +- en: enLocale, +- es: esLocale, +- it: itLocale, +- ja: jaLocale, +- pl: plLocale, +- 'pt-BR': ptBrLocale, +- ua: uaLocale, +- 'zh-CN': zhCNLocale ++ de: (await deLocale).default, ++ en: (await enLocale).default, ++ es: (await esLocale).default, ++ it: (await itLocale).default, ++ ja: (await jaLocale).default, ++ pl: (await plLocale).default, ++ 'pt-BR': (await ptBrLocale).default, ++ ua: (await uaLocale).default, ++ 'zh-CN': (await zhCNLocale).default + }; +\ No newline at end of file