Browse Source

fix: swagger tests

nc-rspack-swc
DarkPhoenix2704 1 week ago
parent
commit
44fa21d80b
No known key found for this signature in database
GPG Key ID: 3F76B10622A07849
  1. 3
      packages/nocodb/rspack.dev.config.js
  2. 4
      packages/nocodb/src/db/sql-mgr/SqlMgr.ts
  3. 1
      packages/nocodb/src/services/sql-views.service.ts
  4. 2
      packages/nocodb/tsconfig.json

3
packages/nocodb/rspack.dev.config.js

@ -88,6 +88,9 @@ const baseDevConfig = {
new RunScriptWebpackPlugin({ new RunScriptWebpackPlugin({
name: 'main.js', name: 'main.js',
}), }),
new rspack.CopyRspackPlugin({
patterns: [{ from: 'src/public', to: 'public' }],
}),
new ForkTsCheckerWebpackPlugin({ new ForkTsCheckerWebpackPlugin({
typescript: { typescript: {
configFile: join('tsconfig.json'), configFile: join('tsconfig.json'),

4
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 { T } from '~/utils';
import Result from '~/db/util/Result'; import Result from '~/db/util/Result';
import Debug from '~/db/util/Debug'; import Debug from '~/db/util/Debug';
import KnexMigrator from '~/db/sql-migrator/lib/KnexMigrator';
import SqlClientFactory from '~/db/sql-client/lib/SqlClientFactory'; 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'; import NcConnectionMgr from '~/utils/common/NcConnectionMgr';
const randomID = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz_', 20); const randomID = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz_', 20);

1
packages/nocodb/src/services/sql-views.service.ts

@ -147,6 +147,7 @@ export class SqlViewsService {
title: getTableNameAlias(body.view_name, base.prefix, source), title: getTableNameAlias(body.view_name, base.prefix, source),
type: ModelTypes.VIEW, type: ModelTypes.VIEW,
order: +(tables?.pop()?.order ?? 0) + 1, order: +(tables?.pop()?.order ?? 0) + 1,
user_id: param.user.id,
}); });
let colOrder = 1; let colOrder = 1;

2
packages/nocodb/tsconfig.json

@ -41,5 +41,5 @@
] ]
}, },
"include": ["src/**/*"], "include": ["src/**/*"],
"exclude": ["src/ee", "src/ee-on-prem", "src/ee-cloud"] "exclude": ["src/ee", "src/ee-on-prem", "src/ee-cloud", "**/*.spec.ts"]
} }

Loading…
Cancel
Save