From 3ffbcf700051a254d58873712b65d10d798257ee Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Sun, 17 Nov 2024 10:22:32 +0530 Subject: [PATCH] fix: swagger tests --- packages/nocodb/rspack.dev.config.js | 3 +++ packages/nocodb/src/db/sql-mgr/SqlMgr.ts | 4 +++- packages/nocodb/src/services/sql-views.service.ts | 1 + packages/nocodb/tsconfig.json | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/rspack.dev.config.js b/packages/nocodb/rspack.dev.config.js index 1321345234..d2e4b180b6 100644 --- a/packages/nocodb/rspack.dev.config.js +++ b/packages/nocodb/rspack.dev.config.js @@ -88,6 +88,9 @@ const baseDevConfig = { new RunScriptWebpackPlugin({ name: 'main.js', }), + new rspack.CopyRspackPlugin({ + patterns: [{ from: 'src/public', to: 'public' }], + }), new ForkTsCheckerWebpackPlugin({ typescript: { configFile: join('tsconfig.json'), diff --git a/packages/nocodb/src/db/sql-mgr/SqlMgr.ts b/packages/nocodb/src/db/sql-mgr/SqlMgr.ts index 0a25235f98..9a804f5424 100644 --- a/packages/nocodb/src/db/sql-mgr/SqlMgr.ts +++ b/packages/nocodb/src/db/sql-mgr/SqlMgr.ts @@ -15,8 +15,10 @@ import type SqliteClient from '~/db/sql-client/lib/sqlite/SqliteClient'; import { T } from '~/utils'; import Result from '~/db/util/Result'; import Debug from '~/db/util/Debug'; -import KnexMigrator from '~/db/sql-migrator/lib/KnexMigrator'; import SqlClientFactory from '~/db/sql-client/lib/SqlClientFactory'; +// @ts-expect-error +import KnexMigrator from '~/db/sql-migrator/lib/KnexMigrator'; +// @ts-expect-error import NcConnectionMgr from '~/utils/common/NcConnectionMgr'; const randomID = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz_', 20); diff --git a/packages/nocodb/src/services/sql-views.service.ts b/packages/nocodb/src/services/sql-views.service.ts index a942701b72..3b0bc82aee 100644 --- a/packages/nocodb/src/services/sql-views.service.ts +++ b/packages/nocodb/src/services/sql-views.service.ts @@ -147,6 +147,7 @@ export class SqlViewsService { title: getTableNameAlias(body.view_name, base.prefix, source), type: ModelTypes.VIEW, order: +(tables?.pop()?.order ?? 0) + 1, + user_id: param.user.id, }); let colOrder = 1; diff --git a/packages/nocodb/tsconfig.json b/packages/nocodb/tsconfig.json index 3c4c58a783..0743289b59 100644 --- a/packages/nocodb/tsconfig.json +++ b/packages/nocodb/tsconfig.json @@ -41,5 +41,5 @@ ] }, "include": ["src/**/*"], - "exclude": ["src/ee", "src/ee-on-prem", "src/ee-cloud"] + "exclude": ["src/ee", "src/ee-on-prem", "src/ee-cloud", "**/*.spec.ts"] }