Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/devel' into CB-4028-refactor-sub…
Browse files Browse the repository at this point in the history
…ject-object-permissions-api
  • Loading branch information
alexander-skoblikov committed Oct 10, 2023
2 parents 0cc1418 + baef7fb commit 7a33865
Show file tree
Hide file tree
Showing 20 changed files with 205 additions and 67 deletions.
4 changes: 2 additions & 2 deletions server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Bundle-Release-Date: 20231009
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Require-Bundle: org.jkiss.dbeaver.data.gis;visibility:=reexport,
Require-Bundle: org.jkiss.dbeaver.data.gis;visibility:=reexport,
org.jkiss.dbeaver.model;visibility:=reexport,
org.jkiss.dbeaver.model.sm;visibility:=reexport,
org.jkiss.dbeaver.model.event;visibility:=reexport,
Expand All @@ -18,7 +18,7 @@ Require-Bundle: org.jkiss.dbeaver.data.gis;visibility:=reexport,
org.jkiss.bundle.graphql.java;visibility:=reexport,
org.jkiss.bundle.apache.dbcp,
com.google.gson;visibility:=reexport,
jakarta.servlet-api;visibility:=reexport
jakarta.servlet-api;bundle-version="[4.0.0,4.0.0]";visibility:=reexport
Export-Package: io.cloudbeaver,
io.cloudbeaver.auth,
io.cloudbeaver.auth.provider,
Expand Down

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions server/bundles/io.cloudbeaver.slf4j/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Vendor: DBeaver Corp
Bundle-Name: CloudBeaver SLF4j Binding
Bundle-SymbolicName: io.cloudbeaver.slf4j;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Release-Date: 20231009
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Fragment-Host: slf4j.api
Require-Bundle: ch.qos.logback.core,
ch.qos.logback.classic
Automatic-Module-Name: io.cloudbeaver.slf4j
Provide-Capability: osgi.serviceloader;osgi.serviceloader="org.slf4j.spi.SLF4JServiceProvider"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.cloudbeaver.slf4j.CloudBeaverLogServiceProvider
5 changes: 5 additions & 0 deletions server/bundles/io.cloudbeaver.slf4j/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source.. = src/
output.. = target/classes/
bin.includes = .,\
META-INF/,\
plugin.xml
5 changes: 5 additions & 0 deletions server/bundles/io.cloudbeaver.slf4j/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>

<plugin>
</plugin>
16 changes: 16 additions & 0 deletions server/bundles/io.cloudbeaver.slf4j/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.cloudbeaver</groupId>
<artifactId>bundles</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>io.cloudbeaver.slf4j</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2023 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.cloudbeaver.slf4j;

import ch.qos.logback.classic.spi.LogbackServiceProvider;

public class CloudBeaverLogServiceProvider extends LogbackServiceProvider {
public CloudBeaverLogServiceProvider() {
}
}
1 change: 1 addition & 0 deletions server/bundles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<modules>
<module>io.cloudbeaver.model</module>
<module>io.cloudbeaver.server</module>
<module>io.cloudbeaver.slf4j</module>

<module>io.cloudbeaver.service.admin</module>
<module>io.cloudbeaver.service.auth</module>
Expand Down
2 changes: 1 addition & 1 deletion server/features/io.cloudbeaver.ws.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@

<!-- Logging -->

<plugin id="io.cloudbeaver.slf4j" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="ch.qos.logback.core" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="ch.qos.logback.classic" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
<plugin id="ch.qos.logback.slf4j" download-size="0" install-size="0" version="0.0.0" unpack="false"/>


</feature>
2 changes: 1 addition & 1 deletion server/test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<extraRequirements>
<requirement>
<type>eclipse-plugin</type>
<id>ch.qos.logback.slf4j</id>
<id>ch.qos.logback.classic</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
Expand Down
1 change: 1 addition & 0 deletions webapp/packages/browserslist-config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = ['defaults', 'not IE 11'];
7 changes: 7 additions & 0 deletions webapp/packages/browserslist-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@cloudbeaver/browserslist-config",
"sideEffects": false,
"version": "0.1.0",
"license": "Apache-2.0",
"main": "index.js"
}
9 changes: 9 additions & 0 deletions webapp/packages/core-cli/bin/validate-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const currentPackage = JSON.parse(fs.readFileSync(currentPackagePath, 'utf8'));
// Keep track of the dependencies that were found in the source files
const dependencies = new Set();
const devDependencies = new Set();
let isSuccess = true;

const sourceFilesIterator = glob.globIterateSync('**/*.{ts,tsx,scss,css}', { cwd: currentPackageSrcPath });
const importRegex = /(import|export) ((type |)([\w,\s]*?)(\{[\w\s\n,]*?\}|) from |)['"]((@[\w-]*\/[\w-]*)|([^\\.].*?))(\/.*)*['"]/g;
Expand Down Expand Up @@ -84,6 +85,8 @@ for (const sideEffect of sideEffects) {
}
}

console.log('Analyzing dependencies...');

const newDependencies = [...dependencies].sort(sortDependencies);

logUnmetAndExtraDependencies('dependencies', newDependencies, currentPackage.dependencies);
Expand All @@ -108,6 +111,10 @@ currentPackage.devDependencies = [...devDependencies].sort(sortDependencies).red
currentPackage.devDependencies,
);

if (isSuccess) {
console.log('All dependencies are valid');
}

// Write the updated `package.json`
fs.writeFileSync(currentPackagePath, JSON.stringify(currentPackage, null, 2) + '\n', 'utf8');

Expand Down Expand Up @@ -152,9 +159,11 @@ function logUnmetAndExtraDependencies(key, newDependencies, current) {

if (unmetDependencies.length > 0) {
console.warn(`Unmet ${key} found:`, unmetDependencies);
isSuccess = false;
}

if (extraDependencies.length > 0) {
console.warn(`Extra ${key} found:`, extraDependencies);
isSuccess = false;
}
}
36 changes: 18 additions & 18 deletions webapp/packages/core-cli/configs/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,24 @@ module.exports = api => {
setSpreadProperties: true,
},
presets: [
[
'@babel/preset-env',
{
modules: testMode ? undefined : false,
targets: {
node: 'current',
browsers: [
'defaults',
'not IE 11',
// "last 1 chrome version",
// "last 1 firefox version",
// "last 1 edge version",
// "last 1 safari version"
],
},
exclude: ['transform-async-to-generator', 'transform-regenerator'],
},
],
// [
// '@babel/preset-env',
// {
// modules: testMode ? undefined : false,
// targets: {
// node: 'current',
// browsers: [
// 'defaults',
// 'not IE 11',
// // "last 1 chrome version",
// // "last 1 firefox version",
// // "last 1 edge version",
// // "last 1 safari version"
// ],
// },
// exclude: ['transform-async-to-generator', 'transform-regenerator'],
// },
// ],
// ['@babel/preset-typescript', { isTSX: true, allExtensions: true, onlyRemoveTypeImports: true }],
[
'@babel/preset-react',
Expand Down
12 changes: 2 additions & 10 deletions webapp/packages/core-cli/configs/excludedFromVendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ module.exports = [
'd3',
'dagre',
'codemirror',
'@codemirror/*',
'@codemirror/commands',
'@codemirror/language',
'@codemirror/search',
'@codemirror/state',
'@codemirror/view',
'@codemirror/autocomplete',
'@codemirror/lang-*',
'@codemirror',
'@lezer',
'@lezer/*',
];
];
3 changes: 1 addition & 2 deletions webapp/packages/core-cli/configs/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ module.exports = (env, argv) => {
};

return {
// target: !devMode ? "web" : "browserslist",
optimization: {
runtimeChunk: 'single',
moduleIds: 'deterministic',
Expand All @@ -104,7 +103,7 @@ module.exports = (env, argv) => {
enforceSizeThreshold: 50000,
cacheGroups: {
locale: {
test: /[\\/]locales[\\/].*?\.ts/,
test: /[\\/]locales[\\/].*?\.js/,
filename: '[name].[contenthash].js',
name(module) {
return module.rawRequest.substr(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function useTableColumnDnD(model: IDatabaseDataModel, resultIndex: number
let side: TableColumnInsertPositionSide = null;

if (columnKey && dndBox.state.isOver && dndBox.state.context) {
const dndColumnKey = dndBox.state.context.get(DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY);
const dndColumnKey = dndBox.state.context.tryGet(DATA_CONTEXT_DV_DDM_RS_COLUMN_KEY);

if (resultSetViewAction && dndColumnKey && resultSetViewAction.columnIndex(columnKey) > resultSetViewAction.columnIndex(dndColumnKey)) {
side = 'right';
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/product-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
"description": "CloudBeaver Community",
"license": "Apache-2.0",
"main": "dist/index.js",
"browserslist": [
"extends @cloudbeaver/browserslist-config"
],
"scripts": {
"build": "rimraf --glob lib && lerna run gql:gen --stream --parallel && tsc -b",
"bundle": "yarn build && core-cli-build --mode=production --config ../core-cli/configs/webpack.product.config.js",
"dev": "yarn build && concurrently -P -k \"yarn tsc -b --watch --preserveWatchOutput\" \"lerna run gql:gen:dev --stream --parallel\" \"core-cli-build serve --mode=development --progress --config=../core-cli/configs/webpack.product.dev.config.js --port=3100 {@}\"",
"analyse": "core-cli-build --mode=production --config ../core-cli/configs/webpack.product.config.js --profile --json > ./lib/stats.json",
"analyse": "yarn build && rimraf --glob lib && mkdir lib && core-cli-build --mode=production --config ../core-cli/configs/webpack.product.config.js --profile --json > ./lib/stats.json",
"postanalyse": "core-cli-analyzer ./lib/stats.json",
"lint": "eslint ./src/ --ext .ts,.tsx",
"lint-fix": "eslint ./src/ --ext .ts,.tsx --fix",
Expand Down
4 changes: 4 additions & 0 deletions webapp/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
"disableReferencedProjectLoad": true,
"disableSolutionSearching": true,

// disable support of helpers
"noEmitHelpers": false,
"importHelpers": true,

"types": ["reflect-metadata", "node", "jest", "@cloudbeaver/core-cli/global.d.ts"],
"plugins": [
{
Expand Down

0 comments on commit 7a33865

Please sign in to comment.