From 6eaafd6e2a653e016fd6f034889e21714b3f8601 Mon Sep 17 00:00:00 2001 From: Alexey Date: Thu, 21 Sep 2023 17:44:16 +0300 Subject: [PATCH 1/2] dev: update chrome vs-code configuration (#2011) --- .vscode/launch.json | 22 +++++++++++-------- .../core-cli/configs/webpack.config.js | 1 + .../configs/webpack.product.dev.config.js | 1 + 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 3986894f8b..d2bb0f29a8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,9 +4,10 @@ { "type": "chrome", "request": "launch", - "name": "Debug CE", + "name": "Chrome", "url": "http://127.0.0.1:3100", - "webRoot": "${workspaceFolder}/webapp/packages/product-default" + "webRoot": "${workspaceFolder}/..", + "sourceMaps": true }, { "type": "java", @@ -14,21 +15,21 @@ "cwd": "${workspaceFolder}/../opt/cbce", "request": "launch", "mainClass": "org.eclipse.equinox.launcher.Main", - "classPaths": [ - "${env:DBEAVER_DEVEL_ECLIPSE_PATH}/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar" - ], "windows": { "type": "java", "name": "CloudBeaver CE", "request": "launch", "mainClass": "org.eclipse.equinox.launcher.Main", + "classPaths": [ + "${workspaceFolder}/../eclipse/eclipse/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar" + ], "args": [ "-product", "io.cloudbeaver.product.ce.product", "-configuration", - "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", + "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", "-dev", - "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", + "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", "-os", "win32", "-ws", @@ -54,13 +55,16 @@ "name": "CloudBeaver CE", "request": "launch", "mainClass": "org.eclipse.equinox.launcher.Main", + "classPaths": [ + "${workspaceFolder}/../eclipse/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar" + ], "args": [ "-product", "io.cloudbeaver.product.ce.product", "-configuration", - "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", + "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/", "-dev", - "file:${env:DBEAVER_DEVEL_ECLIPSE_WORKSPACE_PATH}/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", + "file:${workspaceFolder}/../eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/CloudbeaverServer.product/dev.properties", "-os", "macosx", "-ws", diff --git a/webapp/packages/core-cli/configs/webpack.config.js b/webapp/packages/core-cli/configs/webpack.config.js index 2b28beea5f..d43cd1c56a 100644 --- a/webapp/packages/core-cli/configs/webpack.config.js +++ b/webapp/packages/core-cli/configs/webpack.config.js @@ -242,6 +242,7 @@ module.exports = (env, argv) => { plugins: [ new ForkTsCheckerWebpackPlugin({ typescript: { + configFile: resolve('tsconfig.json'), configOverwrite: { include: ['**/src/**/*.ts', '**/src/**/*.tsx'], }, diff --git a/webapp/packages/core-cli/configs/webpack.product.dev.config.js b/webapp/packages/core-cli/configs/webpack.product.dev.config.js index fe36dfde4b..32653b5b61 100644 --- a/webapp/packages/core-cli/configs/webpack.product.dev.config.js +++ b/webapp/packages/core-cli/configs/webpack.product.dev.config.js @@ -40,6 +40,7 @@ module.exports = (env, argv) => { return merge(commonConfig(env, argv), { mode: 'development', + context: resolve(__dirname, '../../../../../'), entry: { main, sso, From 63c7c6feb17d5465504d78edd3671dc4563f1231 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 22 Sep 2023 18:15:24 +0300 Subject: [PATCH 2/2] fix: ignore typescript error (#2014) --- webapp/packages/core-blocks/src/useS.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/packages/core-blocks/src/useS.ts b/webapp/packages/core-blocks/src/useS.ts index f9165d4528..3ee0b1f6ea 100644 --- a/webapp/packages/core-blocks/src/useS.ts +++ b/webapp/packages/core-blocks/src/useS.ts @@ -49,6 +49,7 @@ export function useS(...componentStyles: [...T]): Ex const themeService = useService(ThemeService); const [currentThemeId, setCurrentThemeId] = useState(() => themeService.currentThemeId); const lastThemeRef = useRef(currentThemeId); + //@ts-ignore const filteredStyles = themeService.mapStyles(componentStyles.flat(Infinity).filter(Boolean) as Style[], context); const trackTheme = filteredStyles.some(style => typeof style === 'function');