Browse Source

feat: add type checker

DarkPhoenix2704 3 weeks ago
parent
commit
804f2a1b1f
No known key found for this signature in database
GPG Key ID: 3F76B10622A07849
  1. 2
      packages/nocodb/package.json
  2. 7
      packages/nocodb/rspack.dev.config.js

2
packages/nocodb/package.json

@ -39,7 +39,7 @@
"watch:run:pg": "cross-env NODE_ENV=development NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/dockerRunPG", "watch:run:pg": "cross-env NODE_ENV=development NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/dockerRunPG",
"watch:run:playwright": "rm -f ./test_*.db; cross-env DB_TYPE=sqlite DATABASE_URL=sqlite:./test_noco.db PLAYWRIGHT_TEST=true NODE_ENV=test NC_DISABLE_TELE=true NC_SNAPSHOT_WINDOW_SEC=3 rspack serve --config rspack.dev.config.js --entry src/run/testDocker", "watch:run:playwright": "rm -f ./test_*.db; cross-env DB_TYPE=sqlite DATABASE_URL=sqlite:./test_noco.db PLAYWRIGHT_TEST=true NODE_ENV=test NC_DISABLE_TELE=true NC_SNAPSHOT_WINDOW_SEC=3 rspack serve --config rspack.dev.config.js --entry src/run/testDocker",
"watch:run:playwright:mysql": "rm -f ./test_noco.db; cross-env DB_TYPE=mysql NC_DB=\"mysql2://localhost:3306?u=root&p=password&d=pw_ncdb\" PLAYWRIGHT_TEST=true NODE_ENV=test NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/testDocker", "watch:run:playwright:mysql": "rm -f ./test_noco.db; cross-env DB_TYPE=mysql NC_DB=\"mysql2://localhost:3306?u=root&p=password&d=pw_ncdb\" PLAYWRIGHT_TEST=true NODE_ENV=test NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/testDocker",
"watch:run:playwright:pg": "rm -f ./test_noco.db; cross-env DB_TYPE=pg NC_DB=\"pg://localhost:5432?u=postgres&p=password&d=pw_ncdb\" PLAYWRIGHT_TEST=true NODE_ENV=test NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/testDocke", "watch:run:playwright:pg": "rm -f ./test_noco.db; cross-env DB_TYPE=pg NC_DB=\"pg://localhost:5432?u=postgres&p=password&d=pw_ncdb\" PLAYWRIGHT_TEST=true NODE_ENV=test NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/testDocker",
"watch:run:playwright:quick": "rm -f ./test_noco.db; cp ../../tests/playwright/fixtures/noco_0_91_7.db ./test_noco.db; cross-env NODE_ENV=test DATABASE_URL=sqlite:./test_noco.db NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/docker", "watch:run:playwright:quick": "rm -f ./test_noco.db; cp ../../tests/playwright/fixtures/noco_0_91_7.db ./test_noco.db; cross-env NODE_ENV=test DATABASE_URL=sqlite:./test_noco.db NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/docker",
"watch:run:playwright:pg:cyquick": "rm -f ./test_noco.db; cp ../../tests/playwright/fixtures/noco_0_91_7.db ./test_noco.db; cross-env NODE_ENV=test NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/dockerRunPG_CyQuick.ts", "watch:run:playwright:pg:cyquick": "rm -f ./test_noco.db; cp ../../tests/playwright/fixtures/noco_0_91_7.db ./test_noco.db; cross-env NODE_ENV=test NC_DISABLE_TELE=true rspack serve --config rspack.dev.config.js --entry src/run/dockerRunPG_CyQuick.ts",
"test:unit": "cross-env NODE_ENV=test TS_NODE_PROJECT=./tests/unit/tsconfig.json mocha --require @swc-node/register tests/unit/index.test.ts --recursive --timeout 300000 --exit --delay", "test:unit": "cross-env NODE_ENV=test TS_NODE_PROJECT=./tests/unit/tsconfig.json mocha --require @swc-node/register tests/unit/index.test.ts --recursive --timeout 300000 --exit --delay",

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

@ -3,7 +3,7 @@ const { rspack } = require('@rspack/core');
const NodeExternals = require('webpack-node-externals'); const NodeExternals = require('webpack-node-externals');
const { RunScriptWebpackPlugin } = require('run-script-webpack-plugin'); const { RunScriptWebpackPlugin } = require('run-script-webpack-plugin');
const {resolveTsAliases} = require("./build-utils/resolveTsAliases"); const {resolveTsAliases} = require("./build-utils/resolveTsAliases");
// const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const baseDevConfig = { const baseDevConfig = {
mode: 'development', mode: 'development',
@ -88,6 +88,11 @@ const baseDevConfig = {
new RunScriptWebpackPlugin({ new RunScriptWebpackPlugin({
name: 'main.js', name: 'main.js',
}), }),
new ForkTsCheckerWebpackPlugin({
typescript: {
configFile: join('tsconfig.json'),
},
}),
], ],
output: { output: {
path: join(__dirname, 'dist'), path: join(__dirname, 'dist'),

Loading…
Cancel
Save