From 113da9d087da5345026be38991a65ca665ba9c99 Mon Sep 17 00:00:00 2001 From: aXenDeveloper Date: Mon, 21 Oct 2024 18:53:57 +0200 Subject: [PATCH 1/5] fix: Create/delete plugins while restarting server --- .../plugins/helpers/change-files.service.ts | 4 +++ .../helpers/create-packages-json.ts | 2 +- packages/frontend/package.json | 2 +- .../src/components/form/auto-form.tsx | 7 ++++- .../hooks/use-create-edit-plugin-admin.ts | 24 --------------- .../hooks/check-connection-mutation-api.ts | 13 -------- .../delete/hooks/use-delete-plugin-admin.ts | 30 +++++++++---------- .../upload/hooks/use-upload-plugin-admin.ts | 30 +++++++++---------- 8 files changed, 42 insertions(+), 70 deletions(-) delete mode 100644 packages/frontend/src/views/admin/views/core/plugins/hooks/check-connection-mutation-api.ts diff --git a/packages/backend/src/core/admin/plugins/helpers/change-files.service.ts b/packages/backend/src/core/admin/plugins/helpers/change-files.service.ts index 0a40ed006..b29a27cda 100644 --- a/packages/backend/src/core/admin/plugins/helpers/change-files.service.ts +++ b/packages/backend/src/core/admin/plugins/helpers/change-files.service.ts @@ -151,6 +151,10 @@ export class ChangeFilesAdminPluginsService { }), getEntryName: code => `typeof ${code}`, reconstructFileContent: (imports, entries, originalContent) => { + // TODO: Remove console.log + // eslint-disable-next-line no-console + console.log({ imports, entries, originalContent }); + let newContent = ''; imports.forEach((path, name) => { newContent += `import type ${name} from '${path}';\n`; diff --git a/packages/create-vitnode-app/helpers/create-packages-json.ts b/packages/create-vitnode-app/helpers/create-packages-json.ts index 320b07f89..2034e76cd 100644 --- a/packages/create-vitnode-app/helpers/create-packages-json.ts +++ b/packages/create-vitnode-app/helpers/create-packages-json.ts @@ -99,7 +99,7 @@ export const createPackagesJSON = ({ geist: '^1.3.1', 'lucide-react': '^0.451.0', next: '15.0.0-rc.1', - 'next-intl': '^3.21.0-canary.0', + 'next-intl': '3.21.0-canary.0', react: '19.0.0-rc-6cf85185-20241014', 'react-dom': '19.0.0-rc-6cf85185-20241014', 'react-hook-form': '^7.53.0', diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 15e227dc4..3c1ce91fc 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -90,7 +90,7 @@ "graphql-tag": "^2.12.6", "lucide-react": "^0.420.0", "next": "15.0.0-canary.179", - "next-intl": "^3.21.0-canary.0", + "next-intl": "3.21.0-canary.0", "postcss": "^8.4.42", "react": "^19.0.0-rc-d6cb4e77-20240911", "react-dom": "^19.0.0-rc-d6cb4e77-20240911", diff --git a/packages/frontend/src/components/form/auto-form.tsx b/packages/frontend/src/components/form/auto-form.tsx index 118c451c7..65f933a69 100644 --- a/packages/frontend/src/components/form/auto-form.tsx +++ b/packages/frontend/src/components/form/auto-form.tsx @@ -145,7 +145,12 @@ export function AutoForm< })} {children} -
+
*]:flex-1': setOpen, + })} + > {setOpen ? (