From e0bbe32425d34b18c8e8572885267418849fb615 Mon Sep 17 00:00:00 2001 From: aXenDeveloper Date: Fri, 28 Jun 2024 11:51:59 +0200 Subject: [PATCH] chore: Improve paths in backend package --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- .github/release.yaml | 2 +- .github/workflows/build.yml | 7 ++----- .github/workflows/lint-pr.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- apps/frontend/.eslintignore | 13 ------------- apps/frontend/package.json | 2 +- packages/backend/scripts/copy-database-core.ts | 1 + packages/frontend/.eslintrc.json | 7 ++++++- .../frontend/src/editor/extensions/files/client.tsx | 1 + .../hooks/use-upload-files-handler-editor.ts.ts | 1 + .../footer/files/item/hooks/delete-mutation-api.ts | 1 + 13 files changed, 20 insertions(+), 27 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index df74cc284..6dd8bd2cb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,6 +1,6 @@ name: 🐞 Bug report description: Create a report to help us improve -labels: ["🐞 Bug"] +labels: ['🐞 Bug'] body: - type: checkboxes attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index e815c54a1..293e81fc7 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,6 +1,6 @@ name: 💡 Feature request description: Suggest an idea for this project -labels: ["💡 Feature"] +labels: ['💡 Feature'] body: - type: checkboxes attributes: diff --git a/.github/release.yaml b/.github/release.yaml index 0f450f9cf..02ffb6fd1 100644 --- a/.github/release.yaml +++ b/.github/release.yaml @@ -17,4 +17,4 @@ changelog: - 🐞 Bug - title: Other Changes labels: - - "*" + - '*' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 246689e77..31cde8141 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build on: pull_request: - branches: "*" + branches: '*' types: - opened - edited @@ -27,13 +27,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 - cache: "pnpm" + cache: 'pnpm' - name: Install dependencies run: pnpm install - - name: Run config init - run: pnpm config:init - - name: Build run: pnpm build diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index 1593a22f8..69b53b81c 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -1,8 +1,8 @@ -name: "Lint PR title" +name: 'Lint PR title' on: pull_request_target: - branches: "*" + branches: '*' types: - opened - edited diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 199a594d0..c4e87178e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,7 +2,7 @@ name: Lint on: pull_request: - branches: "*" + branches: '*' types: - opened - edited @@ -27,7 +27,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 - cache: "pnpm" + cache: 'pnpm' - name: Install dependencies run: pnpm install diff --git a/apps/frontend/.eslintignore b/apps/frontend/.eslintignore index 39aff39fb..fdbe80f22 100644 --- a/apps/frontend/.eslintignore +++ b/apps/frontend/.eslintignore @@ -1,18 +1,5 @@ /graphql/hooks.ts -# next-pwa -/public/precache.*.*.js -/public/sw.js -/public/workbox-*.js -/public/worker-*.js -/public/fallback-*.js -/public/precache.*.*.js.map -/public/sw.js.map -/public/workbox-*.js.map -/public/worker-*.js.map -/public/fallback-*.js -/worker - next.config.js tailwind.config.js postcss.config.js diff --git a/apps/frontend/package.json b/apps/frontend/package.json index 5b1238c04..28dc6f4b0 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -7,7 +7,7 @@ "config:init": "vitnode-frontend init", "dev": "pnpm config:init && next dev --turbo", "dev:turbo": "next dev --turbo", - "build": "pnpm config:init && next build", + "build": "next build", "analyze": "cross-env ANALYZE=true pnpm build", "start": "next start", "start:prod": "node server.js", diff --git a/packages/backend/scripts/copy-database-core.ts b/packages/backend/scripts/copy-database-core.ts index 6f80dc22a..8d689da00 100644 --- a/packages/backend/scripts/copy-database-core.ts +++ b/packages/backend/scripts/copy-database-core.ts @@ -10,6 +10,7 @@ export const copyDatabaseSchema = ({ const currentPathToSchema = path.join( __dirname, '..', + '..', 'src', 'templates', 'core', diff --git a/packages/frontend/.eslintrc.json b/packages/frontend/.eslintrc.json index d432d691f..e955f22a9 100644 --- a/packages/frontend/.eslintrc.json +++ b/packages/frontend/.eslintrc.json @@ -4,5 +4,10 @@ "env": { "node": true }, - "ignorePatterns": ["tailwind.config.ts", "src/graphql/code.ts"] + "ignorePatterns": [ + "tailwind.config.ts", + "src/graphql/code.ts", + "codegen.ts", + "scripts/**/*" + ] } diff --git a/packages/frontend/src/editor/extensions/files/client.tsx b/packages/frontend/src/editor/extensions/files/client.tsx index 0bec31387..111c087e1 100644 --- a/packages/frontend/src/editor/extensions/files/client.tsx +++ b/packages/frontend/src/editor/extensions/files/client.tsx @@ -6,6 +6,7 @@ import Image from 'next/image'; import { formatBytes } from 'vitnode-shared'; import { acceptMimeTypeImage, FilesHandlerAttributes } from './files'; + import { CONFIG } from '../../../helpers/config-with-env'; const FileFromNextWithNode = ({ diff --git a/packages/frontend/src/editor/extensions/files/hooks/use-upload-files-handler-editor.ts.ts b/packages/frontend/src/editor/extensions/files/hooks/use-upload-files-handler-editor.ts.ts index 3c12956dd..07cdad19d 100644 --- a/packages/frontend/src/editor/extensions/files/hooks/use-upload-files-handler-editor.ts.ts +++ b/packages/frontend/src/editor/extensions/files/hooks/use-upload-files-handler-editor.ts.ts @@ -13,6 +13,7 @@ import { } from '../files'; import { uploadMutationApi } from './upload-mutation-api'; import { getFilesFromContent } from './functions'; + import { TextLanguage } from '../../../../graphql/code'; export interface UploadFilesHandlerArgs { diff --git a/packages/frontend/src/editor/footer/files/item/hooks/delete-mutation-api.ts b/packages/frontend/src/editor/footer/files/item/hooks/delete-mutation-api.ts index 462fb5836..21df264c0 100644 --- a/packages/frontend/src/editor/footer/files/item/hooks/delete-mutation-api.ts +++ b/packages/frontend/src/editor/footer/files/item/hooks/delete-mutation-api.ts @@ -2,6 +2,7 @@ import { revalidatePath } from 'next/cache'; import { fetcher } from 'vitnode-frontend/graphql/fetcher'; + import { Core_Editor_Files__Delete, Core_Editor_Files__DeleteMutation,