chore: remastered build system
@@ -1,5 +1,11 @@
|
||||
.idea
|
||||
dist
|
||||
node_modules
|
||||
|
||||
yarn-error.log
|
||||
src/**/*.js
|
||||
src/**/*.js.map
|
||||
typings
|
||||
dist
|
||||
lib
|
||||
coverage
|
||||
ts-out
|
||||
npm-debug.log
|
||||
debug.log
|
||||
@@ -0,0 +1,49 @@
|
||||
const test = process.env.NODE_ENV === "test";
|
||||
const prod = process.env.NODE_ENV === "production";
|
||||
const { warn } = console;
|
||||
|
||||
// Prevents resolution warnings from babel-plugin-module-resolver
|
||||
// See https://github.com/tleunen/babel-plugin-module-resolver/issues/315
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn = (...args) => {
|
||||
for (const arg of args) {
|
||||
if (arg.startsWith("Could not resolve") && /src/.test(arg)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
warn(...args);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
presets: [
|
||||
['@babel/preset-typescript', { isTSX: true, allExtensions: true }],
|
||||
"@babel/preset-react",
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
// "esmodules": true,
|
||||
browsers: ["last 2 chrome version", "last 2 firefox version"]
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
'babel-plugin-transform-typescript-metadata',
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
['@babel/plugin-proposal-decorators', { legacy: true }],
|
||||
['@babel/plugin-proposal-class-properties', { loose: true }],
|
||||
'react-require',
|
||||
"@babel/proposal-object-rest-spread",
|
||||
'reshadow/babel',
|
||||
!prod && [
|
||||
"babel-plugin-module-resolver",
|
||||
{
|
||||
alias: {
|
||||
"^@cloudbeaver([^/]*)(.*)$": "@cloudbeaver\\2\\1/src",
|
||||
},
|
||||
},
|
||||
],
|
||||
].filter(Boolean),
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
const { resolve, join } = require('path');
|
||||
var PeerDepsExternalsPlugin = require('peer-deps-externals-webpack-plugin');
|
||||
const ModuleDependencyWarning = require("webpack/lib/ModuleDependencyWarning");
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
|
||||
// Temporary solution to remove wrong warning messages (it's was fixed https://github.com/microsoft/TypeScript/pull/35200 in typescript 3.8)
|
||||
class IgnoreNotFoundExportPlugin {
|
||||
apply(compiler) {
|
||||
const messageRegExp = /export '.*'( \(reexported as '.*'\))? was not found in/
|
||||
function doneHook(stats) {
|
||||
stats.compilation.warnings = stats.compilation.warnings.filter(function (warn) {
|
||||
if (warn instanceof ModuleDependencyWarning && messageRegExp.test(warn.message)) {
|
||||
return false
|
||||
}
|
||||
return true;
|
||||
})
|
||||
}
|
||||
if (compiler.hooks) {
|
||||
compiler.hooks.done.tap("IgnoreNotFoundExportPlugin", doneHook)
|
||||
} else {
|
||||
compiler.plugin("done", doneHook)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = (env, argv) => {
|
||||
function generateStyleLoaders(options = { hasModule: false }) {
|
||||
const moduleScope = options.hasModule ? 'local' : 'global';
|
||||
const modules = {
|
||||
mode: moduleScope,
|
||||
localIdentName: '[local]___[hash:base64:5]',
|
||||
};
|
||||
|
||||
const postCssPlugins = [
|
||||
require('postcss-preset-env')({ stage: 0 }),
|
||||
// require('@csstools/postcss-sass')({
|
||||
// sassOptions: {
|
||||
// implementation: require('node-sass'),
|
||||
// includePaths: ['node_modules', resolve('../../node_modules')]
|
||||
// },
|
||||
// }),
|
||||
require('postcss-discard-comments'),
|
||||
require('reshadow/postcss')({ scopeBehaviour: moduleScope })
|
||||
];
|
||||
|
||||
return [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {
|
||||
hot: argv.mode !== 'production',
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
modules: modules,
|
||||
sourceMap: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
// syntax: 'postcss-scss',
|
||||
plugins: postCssPlugins,
|
||||
sourceMap: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
sassOptions: {
|
||||
implementation: require('node-sass'),
|
||||
includePaths: [resolve('node_modules'), join(__dirname, '../node_modules')]
|
||||
},
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
process.env.NODE_ENV = argv.mode || 'development'
|
||||
|
||||
var babelLoader = {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
configFile: join(__dirname, 'babel.config.js')
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
cache: true,
|
||||
mode: argv.mode || 'development',
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.js'],
|
||||
modules: [join(__dirname, '../node_modules')],
|
||||
alias: {
|
||||
// "@cloudbeaver": resolve('../../node_modules/@cloudbeaver/'),
|
||||
react: 'preact/compat',
|
||||
react$: 'preact/compat',
|
||||
'react-dom': 'preact/compat',
|
||||
'react-dom$': 'preact/compat',
|
||||
},
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(ts|js)x?$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
// 'reshadow/webpack/loader',
|
||||
babelLoader
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.(css|s[ac]ss)$/,
|
||||
oneOf: [
|
||||
{
|
||||
test: /\.module\.(css|s[ac]ss)$/,
|
||||
use: generateStyleLoaders({ hasModule: true }),
|
||||
},
|
||||
{
|
||||
include: /node_modules/,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {
|
||||
hot: argv.mode !== 'production',
|
||||
},
|
||||
},
|
||||
'css-loader',
|
||||
'sass-loader'
|
||||
]
|
||||
},
|
||||
{
|
||||
use: generateStyleLoaders({ hasModule: false }),
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
// externals: [
|
||||
// function (context, request, callback) {
|
||||
// if (/^@cloudbeaver\/.+$/.test(request)) {
|
||||
// return callback(null, request, 'amd');
|
||||
// }
|
||||
|
||||
// callback();
|
||||
// },
|
||||
// ],
|
||||
devtool: 'cheap-module-source-map',
|
||||
plugins: [
|
||||
new PeerDepsExternalsPlugin(),
|
||||
new IgnoreNotFoundExportPlugin(),
|
||||
new MiniCssExtractPlugin({
|
||||
// Options similar to the same options in webpackOptions.output
|
||||
// all options are optional
|
||||
filename: argv.mode !== 'production' ? '[name].css' : '[name].[hash].css',
|
||||
chunkFilename: argv.mode !== 'production' ? '[name].css' : '[name].[hash].css',
|
||||
ignoreOrder: false, // Enable to remove warnings about conflicting order
|
||||
}),
|
||||
]
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
const merge = require('webpack-merge');
|
||||
const { resolve, join } = require('path');
|
||||
const commonConfig = require('./webpack.config.js');
|
||||
|
||||
var main = resolve('src/index.ts');
|
||||
var outputDir = resolve('lib');
|
||||
var package = require(resolve("package.json"));
|
||||
module.exports = (env, argv) => merge(commonConfig(env, argv), {
|
||||
entry: main,
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
chunkFilename: '[name].bundle.js',
|
||||
library: package.name,
|
||||
libraryTarget: 'umd',
|
||||
path: outputDir,
|
||||
},
|
||||
optimization: {
|
||||
// splitChunks: {
|
||||
// chunks: 'all',
|
||||
// },
|
||||
// minimize: false,
|
||||
// namedModules: false,
|
||||
// concatenateModules: false,
|
||||
},
|
||||
plugins: [],
|
||||
});
|
||||
@@ -0,0 +1,57 @@
|
||||
const merge = require('webpack-merge');
|
||||
const webpack = require('webpack');
|
||||
const { resolve, join } = require('path');
|
||||
const fs = require('fs');
|
||||
const commonConfig = require('./webpack.config.js');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
|
||||
var main = resolve('src/index.ts');
|
||||
var outputDir = resolve('lib');
|
||||
var package = require(resolve("package.json"))
|
||||
var partsNameRegexp = /^@cloudbeaver\/.+$/
|
||||
|
||||
var deps = Object.keys(package.dependencies)
|
||||
.filter(dep => partsNameRegexp.test(dep))
|
||||
.map(dep => {
|
||||
const from = `./node_modules/${dep}/lib`
|
||||
if (!fs.existsSync(from)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return { from, to: `./${dep}`, force: true }
|
||||
})
|
||||
|
||||
module.exports = (env, argv) => merge(commonConfig(env, argv), {
|
||||
entry: main,
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
chunkFilename: '[name].bundle.js',
|
||||
library: package.name,
|
||||
libraryTarget: 'umd',
|
||||
path: outputDir,
|
||||
},
|
||||
devtool: 'cheap-module-eval-source-map',
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
},
|
||||
minimize: true,
|
||||
namedModules: true,
|
||||
concatenateModules: true,
|
||||
},
|
||||
plugins: [
|
||||
// new CopyWebpackPlugin({
|
||||
// patterns: [
|
||||
// { from: './public', to: '', force: true },
|
||||
// ...deps
|
||||
// ].filter(Boolean)
|
||||
// }),
|
||||
new webpack.DefinePlugin({
|
||||
version: JSON.stringify(package.buildVersion),
|
||||
}),
|
||||
new HtmlWebpackPlugin({ template: resolve('src/index.html.ejs'), }),
|
||||
// new webpack.HotModuleReplacementPlugin(), // enable HMR globally
|
||||
new webpack.NamedModulesPlugin(),
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1,52 @@
|
||||
const merge = require('webpack-merge');
|
||||
const webpack = require('webpack');
|
||||
const { resolve, join } = require('path');
|
||||
const fs = require('fs');
|
||||
const commonConfig = require('./webpack.config.js');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
|
||||
var packageJson = require(resolve("package.json"))
|
||||
var partsNameRegexp = /^@cloudbeaver\/.+$/
|
||||
|
||||
var deps = Object.keys(packageJson.dependencies)
|
||||
.filter(dep => partsNameRegexp.test(dep))
|
||||
.map(dep => {
|
||||
const from = `./node_modules/${dep}/lib`
|
||||
if (!fs.existsSync(from)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return { from, to: `./${dep}`, force: true }
|
||||
})
|
||||
|
||||
module.exports = (env, argv) => merge(commonConfig(env, argv), {
|
||||
entry: [
|
||||
'webpack-dev-server/client?http://localhost:3100',
|
||||
'./src/index.ts'
|
||||
],
|
||||
devServer: {
|
||||
hot: true,
|
||||
proxy: {
|
||||
'/dbeaver': {
|
||||
target: argv.server
|
||||
}
|
||||
}
|
||||
},
|
||||
devtool: 'cheap-module-eval-source-map',
|
||||
plugins: [
|
||||
// new CopyWebpackPlugin({
|
||||
// patterns: [
|
||||
// { from: './public', to: '', force: true },
|
||||
// ...deps
|
||||
// ].filter(Boolean)
|
||||
// }),
|
||||
new webpack.DefinePlugin({
|
||||
dbeaverPlugins: JSON.stringify(packageJson.dbeaverPlugins),
|
||||
version: JSON.stringify(packageJson.buildVersion),
|
||||
}),
|
||||
new HtmlWebpackPlugin({ template: resolve('src/index.html.ejs'), }),
|
||||
// new webpack.HotModuleReplacementPlugin(), // enable HMR globally
|
||||
new webpack.NamedModulesPlugin(),
|
||||
],
|
||||
});
|
||||
@@ -1,36 +1,27 @@
|
||||
{
|
||||
"name": "dbeaver-web",
|
||||
"name": "cloudbeaver-ce",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"license": "Apache-2.0",
|
||||
"author": "",
|
||||
"workspaces": {
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"nohoist": []
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"bootstrap": "lerna bootstrap",
|
||||
"build": "lerna run build --stream",
|
||||
"serve": "lerna run serve --stream",
|
||||
"serve-plugin": "lerna run serve-plugin --stream --parallel",
|
||||
"builder-help": "builder help",
|
||||
"clean-dist": "lerna run clean-dist --stream",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.8.4"
|
||||
"prebuild": "npm run clean-dist",
|
||||
"clean-dist": "rimraf lib/*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@graphql-codegen/add": "^1.8.1",
|
||||
"@graphql-codegen/cli": "^1.8.1",
|
||||
"@graphql-codegen/near-operation-file-preset": "^1.8.0",
|
||||
"@graphql-codegen/typescript": "^1.8.1",
|
||||
"@graphql-codegen/typescript-graphql-files-modules": "^1.8.0",
|
||||
"@graphql-codegen/typescript-graphql-request": "^1.8.1",
|
||||
"@graphql-codegen/typescript-operations": "^1.8.1",
|
||||
"@babel/cli": "^7.8.4",
|
||||
"@babel/core": "^7.8.6",
|
||||
"@babel/plugin-proposal-class-properties": "^7.4.0",
|
||||
"@babel/plugin-proposal-decorators": "^7.10.1",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.4.0",
|
||||
"@babel/plugin-transform-runtime": "^7.10.1",
|
||||
"@babel/preset-env": "^7.4.1",
|
||||
"@babel/preset-react": "^7.8.3",
|
||||
"@babel/preset-typescript": "^7.3.3",
|
||||
"@csstools/postcss-sass": "^4.0.0",
|
||||
"@types/react": "^16.9.36",
|
||||
"@types/react-dom": "^16.9.8",
|
||||
"@typescript-eslint/eslint-plugin": "^2.5.0",
|
||||
"@typescript-eslint/parser": "^2.8.0",
|
||||
"eslint": "^6.6.0",
|
||||
@@ -43,7 +34,37 @@
|
||||
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||
"eslint-plugin-react": "^7.16.0",
|
||||
"eslint-plugin-react-hooks": "^1.7.0",
|
||||
"lerna": "^3.19.0",
|
||||
"rimraf": "^3.0.0"
|
||||
}
|
||||
"babel-loader": "^8.0.6",
|
||||
"babel-plugin-module-resolver": "^4.0.0",
|
||||
"babel-plugin-react-require": "^3.1.3",
|
||||
"babel-plugin-transform-typescript-metadata": "^0.3.0",
|
||||
"babel-preset-latest": "^6.24.1",
|
||||
"copy-webpack-plugin": "^6.0.2",
|
||||
"css-loader": "^3.2.1",
|
||||
"declaration-bundler-webpack-plugin": "^1.0.3",
|
||||
"html-webpack-plugin": "^4.3.0",
|
||||
"lerna": "^3.20.2",
|
||||
"mini-css-extract-plugin": "^0.9.0",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"node-sass": "^4.14.1",
|
||||
"peer-deps-externals-webpack-plugin": "^1.0.4",
|
||||
"postcss-discard-comments": "^4.0.2",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-preset-env": "^6.7.0",
|
||||
"postcss-scss": "^2.1.1",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"sass-loader": "^8.0.0",
|
||||
"source-map-loader": "1.0.0",
|
||||
"style-loader": "^1.0.1",
|
||||
"ts-loader": "^7.0.5",
|
||||
"typescript": "^3.8.3",
|
||||
"webpack": "4.43.0",
|
||||
"webpack-cli": "3.3.11",
|
||||
"webpack-dev-server": "3.11.0",
|
||||
"webpack-merge": "4.2.2"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"name": "@dbeaver/plugin-template-name",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"license": "Apache-2.0",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.js",
|
||||
"scripts": {
|
||||
"build": "yarn run clean-dist && builder build-plugin",
|
||||
"serve-plugin": "builder serve-plugin",
|
||||
"clean-dist": "rimraf dist/*",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dbeaver/core": "^0.1.0",
|
||||
"@dbeaver/builder": "^0.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@dbeaver/core": "^0.1.0"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
import { manifest } from './manifest';
|
||||
|
||||
|
||||
// All Services and Components that is provided by this plugin should be exported here
|
||||
|
||||
export default manifest;
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* cloudbeaver - Cloud Database Manager
|
||||
* Copyright (C) 2020 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0.
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { IServiceInjector, PluginManifest } from '@dbeaver/core/di';
|
||||
|
||||
export const manifest: PluginManifest = {
|
||||
info: {
|
||||
name: '___template plugin_____',
|
||||
},
|
||||
|
||||
providers: [
|
||||
// services here
|
||||
],
|
||||
|
||||
initialize(services: IServiceInjector): void {
|
||||
// init phase here
|
||||
},
|
||||
};
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "@dbeaver/administration",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"scripts": {
|
||||
"build": "yarn run clean-dist && builder build-plugin",
|
||||
"serve-plugin": "builder serve-plugin",
|
||||
"clean-dist": "rimraf dist/*",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dbeaver/core": "^0.1.0",
|
||||
"@dbeaver/builder": "^0.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@dbeaver/core": "^0.1.0"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"declarationDir": "dist",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"@dbeaver/**"
|
||||
]
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"name": "@dbeaver/ag-grid-plugin",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"scripts": {
|
||||
"build": "yarn run clean-dist && builder build-plugin",
|
||||
"serve-plugin": "builder serve-plugin",
|
||||
"clean-dist": "rimraf dist/*",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ag-grid-community/all-modules": "^23.1.1",
|
||||
"@ag-grid-community/core": "^23.1.1",
|
||||
"ag-grid-community": "^23.1.1",
|
||||
"ag-grid-react": "^23.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dbeaver/core": "^0.1.0",
|
||||
"@dbeaver/builder": "^0.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@dbeaver/core": "^0.1.0",
|
||||
"react": "^16.3.0",
|
||||
"react-dom": "^16.3.0"
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"name": "@dbeaver/authentication",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"license": "Apache-2.0",
|
||||
"main": "./dist/index.js",
|
||||
"scripts": {
|
||||
"build": "yarn run clean-dist && builder build-plugin",
|
||||
"serve-plugin": "builder serve-plugin",
|
||||
"clean-dist": "rimraf dist/*",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dbeaver/administration": "^0.1.0",
|
||||
"@dbeaver/builder": "^0.1.0",
|
||||
"@dbeaver/core": "^0.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@dbeaver/administration": "^0.1.0",
|
||||
"@dbeaver/core": "^0.1.0"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"declarationDir": "dist",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"@dbeaver/**"
|
||||
]
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"name": "@dbeaver/basic-connection-plugin",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"license": "Apache-2.0",
|
||||
"main": "dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
"scripts": {
|
||||
"build": "yarn run clean-dist && builder build-plugin",
|
||||
"serve-plugin": "builder serve-plugin",
|
||||
"clean-dist": "rimraf dist/*",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dbeaver/core": "^0.1.0",
|
||||
"@dbeaver/builder": "^0.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@dbeaver/core": "^0.1.0"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"declarationDir": "dist",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"@dbeaver/**"
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/dist
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env*
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
@@ -1,200 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
/*
|
||||
* cloudbeaver - Cloud Database Manager
|
||||
* Copyright (C) 2020 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0.
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
const webpack = require('webpack');
|
||||
const buildConfig = require('../configs/webpack-build-config');
|
||||
const devConfig = require('../configs/webpack-serve-config');
|
||||
const baseRollupConfig = require('../configs/rollup.config.js');
|
||||
const rollup = require('rollup');
|
||||
const path = require('path');
|
||||
|
||||
const currentDir = process.cwd();
|
||||
|
||||
|
||||
function createWebpackArgv(argv) {
|
||||
|
||||
const fullPath = path.resolve(currentDir, argv.pluginsList || './plugins-list')
|
||||
let pluginsList = [];
|
||||
try {
|
||||
pluginsList = require(fullPath);
|
||||
} catch (e) {
|
||||
console.log('Plugins list is not found: ', fullPath);
|
||||
}
|
||||
|
||||
// add mandatory plugin
|
||||
pluginsList = pluginsList.filter(plugin => plugin !== '@dbeaver/core');
|
||||
pluginsList.unshift('@dbeaver/core')
|
||||
|
||||
const webpackArgv = {
|
||||
mode: argv.mode,
|
||||
pluginsList: pluginsList,
|
||||
|
||||
currentDir: currentDir,
|
||||
}
|
||||
return webpackArgv;
|
||||
|
||||
}
|
||||
|
||||
const packageJson = require(path.join(currentDir, 'package.json'));
|
||||
const packageName = packageJson.name;
|
||||
|
||||
|
||||
function createRollupConfig() {
|
||||
let modules = []
|
||||
try {
|
||||
// required if you build plugin with several modules, for example, see @dbeaver/core
|
||||
modules = require(path.join(currentDir, 'modules.js'));
|
||||
} catch {
|
||||
}
|
||||
|
||||
if (!modules.length) {
|
||||
return [baseRollupConfig];
|
||||
}
|
||||
|
||||
return modules.map(module => {
|
||||
|
||||
moduleDir = module ? `/${module}` : ''; // don't add slash for root module
|
||||
const moduleConfig = {...baseRollupConfig};
|
||||
moduleConfig.input = `src${moduleDir}/index.ts`;
|
||||
moduleConfig.output = {...baseRollupConfig.output};
|
||||
moduleConfig.output.dir = `dist${moduleDir}`;
|
||||
|
||||
moduleConfig.external = [
|
||||
...baseRollupConfig.external,
|
||||
...modules
|
||||
.filter(name => name !== module && name !== '')
|
||||
.map(name => {
|
||||
moduleDir = name ? `/${name}` : ''; // don't add slash for root module
|
||||
return `${packageName}${moduleDir}`;
|
||||
}),
|
||||
];
|
||||
return moduleConfig;
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
require('yargs')
|
||||
.options({
|
||||
'l': {
|
||||
alias: 'pluginsList',
|
||||
demandOption: false,
|
||||
default: '',
|
||||
describe: 'path to plugins list relative to product location',
|
||||
type: 'string'
|
||||
}
|
||||
})
|
||||
// build-plugin and serve-plugin use rollup
|
||||
.command(
|
||||
'build-plugin',
|
||||
'Build plugin',
|
||||
{},
|
||||
function (argv) {
|
||||
async function build() {
|
||||
const config = createRollupConfig()
|
||||
for (const moduleConfig of config) {
|
||||
const module = moduleConfig.output.dir.replace('dist' , '')
|
||||
const start = Date.now()
|
||||
console.log(`Building ${packageName}${module}`);
|
||||
try {
|
||||
const bundle = await rollup.rollup(moduleConfig);
|
||||
await bundle.write(moduleConfig.output);
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
process.exitCode = 1;
|
||||
} finally {
|
||||
const buildTime = Math.floor((Date.now() - start) / 1000);
|
||||
console.log(`Build finished ${packageName}${module}, ${buildTime} s`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
build()
|
||||
}
|
||||
)
|
||||
.command(
|
||||
'serve-plugin',
|
||||
'Build and watch plugin',
|
||||
function (argv) {
|
||||
const rollup = require('rollup');
|
||||
|
||||
const watchOptions = createRollupConfig();
|
||||
watchOptions.watch = {
|
||||
buildDelay: 500,
|
||||
};
|
||||
const watcher = rollup.watch(watchOptions);
|
||||
|
||||
watcher.on('event', event => {
|
||||
if (event.code === 'ERROR') {
|
||||
console.error(event.error);
|
||||
} else {
|
||||
console.log(event.code, event.input)
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
)
|
||||
// build-app and serve-app use webpack to build final application from plugins
|
||||
.command(
|
||||
'build-app',
|
||||
'Build application',
|
||||
{
|
||||
mode: {
|
||||
alias: 'm',
|
||||
default: 'production',
|
||||
},
|
||||
},
|
||||
function (argv) {
|
||||
const start = Date.now()
|
||||
const webpackArgv = createWebpackArgv(argv);
|
||||
// console.log(webpackArgv)
|
||||
const configObject = buildConfig({}, webpackArgv)
|
||||
const compiler = webpack(configObject);
|
||||
|
||||
compiler.run((err, stats) => {
|
||||
console.log(stats.compilation.errors)
|
||||
const buildTime = Math.floor((Date.now() - start) / 1000);
|
||||
console.log(`Build app finished in ${buildTime} s`);
|
||||
});
|
||||
}
|
||||
)
|
||||
.command(
|
||||
'serve-app',
|
||||
'Start webpack dev server for serving application',
|
||||
{
|
||||
server: {
|
||||
alias: 's',
|
||||
default: 'localhost:3100'
|
||||
},
|
||||
port: {
|
||||
alias: 'p',
|
||||
default: 3100
|
||||
},
|
||||
mode: {
|
||||
alias: 'm',
|
||||
default: 'development',
|
||||
},
|
||||
},
|
||||
function (argv) {
|
||||
const webpackArgv = createWebpackArgv(argv);
|
||||
console.log(webpackArgv.mode)
|
||||
webpackArgv.server = argv.server
|
||||
const configObject = devConfig({}, webpackArgv)
|
||||
const WebpackDevServer = require('webpack-dev-server');
|
||||
const server = new WebpackDevServer(webpack(configObject), configObject.devServer);
|
||||
const port = argv.port
|
||||
|
||||
server.listen(port, 'localhost', function (err) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
console.log('WebpackDevServer listening at localhost:', port);
|
||||
});
|
||||
}
|
||||
)
|
||||
.help().argv;
|
||||
@@ -1,10 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@babel/preset-react',
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
'react-require',
|
||||
'reshadow/babel',
|
||||
],
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
const postcss = require('postcss')
|
||||
|
||||
function isModuleFile(file) {
|
||||
return /\.module\.[a-z]{2,6}$/.test(file)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
name: 'reshadow-loader',
|
||||
alwaysProcess: true,
|
||||
// `test` option is dynamically set in ./loaders
|
||||
async process({ code, map }) {
|
||||
|
||||
const postcssOptions = {
|
||||
to: this.id,
|
||||
from: this.id,
|
||||
map: false,
|
||||
};
|
||||
|
||||
console.log(this.id)
|
||||
|
||||
const moduleScope = isModuleFile(this.id) ? 'local' : 'global';
|
||||
|
||||
const plugins = [
|
||||
require('reshadow/postcss')({ scopeBehaviour: moduleScope })
|
||||
]
|
||||
|
||||
const result = await postcss(plugins).process(code, postcssOptions)
|
||||
|
||||
for (const message of result.messages) {
|
||||
if (message.type === 'dependency') {
|
||||
this.dependencies.add(message.file)
|
||||
}
|
||||
}
|
||||
|
||||
for (const warning of result.warnings()) {
|
||||
if (!warning.message) {
|
||||
warning.message = warning.text
|
||||
}
|
||||
|
||||
this.warn(warning)
|
||||
}
|
||||
|
||||
return {
|
||||
code: result.css,
|
||||
map: map,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
const path = require('path');
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve');
|
||||
const { babel } = require('@rollup/plugin-babel');
|
||||
const commonjs = require('@rollup/plugin-commonjs');
|
||||
const postcssPlugin = require('rollup-plugin-postcss');
|
||||
const peerDepsExternal = require('rollup-plugin-peer-deps-external');
|
||||
const includePaths = require('rollup-plugin-includepaths');
|
||||
const typescriptPlugin = require('rollup-plugin-typescript2');
|
||||
const reshadowLoader = require('./reshadow-loader');
|
||||
|
||||
const includePathOptions = {
|
||||
include: {},
|
||||
paths: ['src'],
|
||||
external: [],
|
||||
extensions: ['.ts', '.tsx', '.js']
|
||||
};
|
||||
|
||||
function configBuilder() {
|
||||
|
||||
return {
|
||||
input: 'src/index.ts',
|
||||
output: {
|
||||
dir: 'dist',
|
||||
format: 'esm',
|
||||
sourcemap: true,
|
||||
},
|
||||
external: [
|
||||
// externals beyond peer dependencies - common dependencies of the whole application
|
||||
'mobx',
|
||||
// todo check that @dbeaver/core/blocks provide wrapper for go-split
|
||||
// todo add go-split to @dbeaver/core dependencies and remove it from here
|
||||
'go-split',
|
||||
'mobx-react',
|
||||
'react',
|
||||
'react-dom',
|
||||
// todo add reakit to @dbeaver/core dependencies and remove it from here
|
||||
// todo be sure that @dbeaver/core provides all necessary wrappers around reakit
|
||||
'reakit',
|
||||
// todo magic. It nested dependency of reakit and should not be mentioned here
|
||||
// todo but by unknown reasons without this build fails
|
||||
// todo should be removed when reakit will be incorporated into @dbeaver/core
|
||||
'body-scroll-lock',
|
||||
'reshadow',
|
||||
'rxjs',
|
||||
],
|
||||
onwarn(warning, warn) {
|
||||
// hides some warning drom ag-grid-plugin todo to investigate later
|
||||
if (warning.code === 'THIS_IS_UNDEFINED') return;
|
||||
warn(warning); // this requires Rollup 0.46
|
||||
},
|
||||
plugins: [
|
||||
includePaths(includePathOptions),
|
||||
nodeResolve({
|
||||
preferBuiltins: false, // fix crypto import in core/utils/uuid library. todo replace uuid library with simple uuid generation
|
||||
}),
|
||||
typescriptPlugin({
|
||||
tsconfig: 'tsconfig.json',
|
||||
useTsconfigDeclarationDir: true,
|
||||
}),
|
||||
babel({
|
||||
exclude: ['../../node_modules/**', 'node_modules/**'], // exclude package node_modules and lerna node_modules
|
||||
extensions: ['.js', '.ts', '.tsx'],
|
||||
babelHelpers: 'bundled',
|
||||
configFile: path.join(__dirname, 'babel-plugin.config.js'),
|
||||
}),
|
||||
commonjs({
|
||||
sourceMap: false,
|
||||
exclude: [
|
||||
/**
|
||||
* todo Now all plugins after build contain reshadow source code
|
||||
* todo Expected next line should remove reshadow code from build artifact but it doesnt work.
|
||||
* todo It was found that reshadow code disappear if to comment 'reshadow/babel' in babel-plugin.config.js
|
||||
* todo So it is reshadow/babel plugin inject code into the artifact. Further investigations required.
|
||||
*/
|
||||
'node_modules/@reshadow/**',
|
||||
'node_modules/react-dom',
|
||||
'node_modules/react-dom/server',
|
||||
'node_modules/react',
|
||||
],
|
||||
}),
|
||||
postcssPlugin({
|
||||
extract: false,
|
||||
// enable CSS modules for .module.css .module.scss files
|
||||
autoModules: true,
|
||||
// modules: {
|
||||
// generateScopedName: "[local]___[hash:base64:5]"
|
||||
// },
|
||||
inject: true,
|
||||
use: [
|
||||
[
|
||||
'reshadow-loader',
|
||||
{}
|
||||
],
|
||||
[
|
||||
'sass',
|
||||
{
|
||||
includePaths: ['node_modules', '../../node_modules'],
|
||||
}
|
||||
],
|
||||
],
|
||||
loaders: [reshadowLoader],
|
||||
plugins: [
|
||||
require('postcss-preset-env')({stage: 0}),
|
||||
require('postcss-discard-comments'),
|
||||
]
|
||||
}),
|
||||
peerDepsExternal(),
|
||||
],
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
module.exports = configBuilder();
|
||||
@@ -1,22 +0,0 @@
|
||||
// production config
|
||||
const merge = require('webpack-merge');
|
||||
const path = require('path');
|
||||
|
||||
const commonConfig = require('./webpack-common-config');
|
||||
|
||||
module.exports = (env, argv) => merge(commonConfig(env, argv), {
|
||||
mode: argv.mode,
|
||||
entry: './index.js',
|
||||
output: {
|
||||
filename: 'bundle.[hash].js',
|
||||
path: path.resolve(argv.currentDir, './dist'),
|
||||
publicPath: '',
|
||||
},
|
||||
devtool: argv.mode === 'production' ? false : 'source-map',
|
||||
plugins: [],
|
||||
optimization: {
|
||||
minimize: argv.mode === 'production',
|
||||
namedModules: argv.mode !== 'production',
|
||||
concatenateModules: argv.mode === 'production',
|
||||
},
|
||||
});
|
||||
@@ -1,212 +0,0 @@
|
||||
/*
|
||||
* cloudbeaver - Cloud Database Manager
|
||||
* Copyright (C) 2020 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0.
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
const webpack = require('webpack');
|
||||
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const MergeJsonWebpackPlugin = require("merge-jsons-webpack-plugin");
|
||||
const StringReplacePlugin = require("string-replace-webpack-plugin");
|
||||
const resolve = require('resolve');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
function replacementWithPluginImportCode(pluginsList) {
|
||||
|
||||
let code = '';
|
||||
const names = [];
|
||||
console.info('build with plugins:');
|
||||
console.info(pluginsList);
|
||||
|
||||
pluginsList.forEach(plugin => {
|
||||
const name = plugin
|
||||
.split('')
|
||||
.filter(char => /[a-zA-Z]/.test(char))
|
||||
.join('');
|
||||
names.push(name);
|
||||
|
||||
code += `import ${name} from '${plugin}';\n`;
|
||||
})
|
||||
code += `
|
||||
const PLUGINS = [
|
||||
${names.map(n => ` ${n},\n`).join('')}]`;
|
||||
return code;
|
||||
}
|
||||
|
||||
function dirExists(path) {
|
||||
try {
|
||||
const stats = fs.statSync(path)
|
||||
return stats && stats.isDirectory()
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function copyPublic(currentDir, pluginsList) {
|
||||
const pathsToCopy = [];
|
||||
pluginsList.forEach(plugin => {
|
||||
try {
|
||||
const pathToPlugin = resolve.sync(plugin);
|
||||
const dir = path.parse(pathToPlugin).dir;
|
||||
const pathToPublic = path.resolve(dir, '../public');
|
||||
if (dirExists(pathToPublic)) {
|
||||
pathsToCopy.push({
|
||||
from: pathToPublic,
|
||||
to: '',
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
const pathToAppPublic = path.resolve(currentDir, './public')
|
||||
if (dirExists(pathToAppPublic)) {
|
||||
pathsToCopy.push({from: path.resolve(currentDir, './public'), to: ''});
|
||||
}
|
||||
return pathsToCopy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for locales in plugins and combine them together
|
||||
*/
|
||||
function combineLocales(contextPath, pluginsList) {
|
||||
const locales = new Map(); // { locale: array of paths}
|
||||
pluginsList.forEach(plugin => {
|
||||
try {
|
||||
const pathToPlugin = resolve.sync(plugin);
|
||||
const dir = path.parse(pathToPlugin).dir;
|
||||
const pathToLocales = path.resolve(dir, '../locales');
|
||||
if (dirExists(pathToLocales)) {
|
||||
fs.readdirSync(pathToLocales).forEach(file => {
|
||||
const fileParse = path.parse(file)
|
||||
if (fileParse.ext !== '.json') {
|
||||
return;
|
||||
}
|
||||
const fullFileName = path.join(pathToLocales, file);
|
||||
let relativeName = path.relative(contextPath, fullFileName);
|
||||
|
||||
if (locales.has(fileParse.base)) {
|
||||
const pathList = locales.get(fileParse.base);
|
||||
pathList.push(relativeName)
|
||||
} else {
|
||||
locales.set(fileParse.base, [relativeName])
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
const mergeJsonWebpackPluginGroupBy = [];
|
||||
locales.forEach((pathsList, name) => {
|
||||
const pattern = pathsList.length > 1
|
||||
? `{${pathsList.join(',')}}`
|
||||
: pathsList[0];
|
||||
mergeJsonWebpackPluginGroupBy.push({
|
||||
pattern,
|
||||
fileName: `locales/${name}`,
|
||||
})
|
||||
})
|
||||
console.log('Locales');
|
||||
console.log(mergeJsonWebpackPluginGroupBy);
|
||||
return mergeJsonWebpackPluginGroupBy;
|
||||
}
|
||||
|
||||
const contextPath = path.resolve(__dirname, '../src');
|
||||
|
||||
module.exports = (env, argv) => {
|
||||
return {
|
||||
context: contextPath,
|
||||
resolve: {
|
||||
extensions: ['.js'],
|
||||
alias: {
|
||||
react: 'preact/compat',
|
||||
react$: 'preact/compat',
|
||||
'react-dom': 'preact/compat',
|
||||
'react-dom$': 'preact/compat',
|
||||
},
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
use: [
|
||||
{
|
||||
loader: StringReplacePlugin.replace({
|
||||
exclude: /node_modules/,
|
||||
/**
|
||||
* This replacement allows to put into the build the plugins that were mentioned in package.json
|
||||
*/
|
||||
replacements: [
|
||||
{
|
||||
pattern: /const PLUGINS = \[]/ig,
|
||||
replacement: function (match, p1, offset, string) {
|
||||
return replacementWithPluginImportCode(argv.pluginsList);
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
},
|
||||
'source-map-loader'
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new CopyWebpackPlugin(copyPublic(argv.currentDir, argv.pluginsList)),
|
||||
new HtmlWebpackPlugin({
|
||||
template: path.resolve(argv.currentDir, './index.html.ejs'),
|
||||
}),
|
||||
new MergeJsonWebpackPlugin({
|
||||
debug: true,
|
||||
output: {
|
||||
groupBy: combineLocales(contextPath, argv.pluginsList),
|
||||
},
|
||||
globOptions: {
|
||||
debug: false,
|
||||
cwd: contextPath,
|
||||
}
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
version: JSON.stringify(require(path.resolve(argv.currentDir, './package.json')).buildVersion),
|
||||
}),
|
||||
new CircularDependencyPlugin({
|
||||
// exclude detection of files based on a RegExp
|
||||
exclude: /node_modules/,
|
||||
// include specific files based on a RegExp
|
||||
include: /@dbeaver/,
|
||||
// add errors to webpack instead of warnings
|
||||
failOnError: false,
|
||||
// allow import cycles that include an asyncronous import,
|
||||
// e.g. via import(/* webpackMode: "weak" */ './file.js')
|
||||
allowAsyncCycles: false,
|
||||
// set the current working directory for displaying module paths
|
||||
cwd: process.cwd(),
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
// Options similar to the same options in webpackOptions.output
|
||||
// all options are optional
|
||||
filename: argv.mode !== 'production' ? '[name].css' : '[name].[hash].css',
|
||||
chunkFilename: argv.mode !== 'production' ? '[name].css' : '[name].[hash].css',
|
||||
ignoreOrder: false, // Enable to remove warnings about conflicting order
|
||||
}),
|
||||
// new webpack.optimize.LimitChunkCountPlugin({
|
||||
// maxChunks: 1,
|
||||
// }),
|
||||
],
|
||||
performance: {
|
||||
hints: false,
|
||||
},
|
||||
optimization: {
|
||||
minimize: false,
|
||||
namedModules: true,
|
||||
concatenateModules: false,
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -1,41 +0,0 @@
|
||||
// development config
|
||||
const merge = require('webpack-merge');
|
||||
const webpack = require('webpack');
|
||||
const commonConfig = require('./webpack-common-config');
|
||||
|
||||
module.exports = (env, argv) => merge(commonConfig(env, argv), {
|
||||
mode: argv.mode,
|
||||
entry: [
|
||||
// 'react-hot-loader/patch', // activate HMR for React
|
||||
'webpack-dev-server/client?http://localhost:3100',// bundle the client for webpack-dev-server and connect to the provided endpoint
|
||||
// 'webpack/hot/only-dev-server', // bundle the client for hot reloading, only- means to only hot reload for successful updates
|
||||
'./index.js' // the entry point of our app
|
||||
],
|
||||
devServer: {
|
||||
hot: false, // enable HMR on the server
|
||||
proxy: {
|
||||
'/dbeaver': {
|
||||
target: argv.server || 'localhost:8978'
|
||||
}
|
||||
}
|
||||
},
|
||||
devtool: 'cheap-module-eval-source-map',
|
||||
plugins: [
|
||||
new webpack.ProgressPlugin({
|
||||
entries: true,
|
||||
modules: true,
|
||||
modulesCount: 100,
|
||||
profile: true,
|
||||
// handler: (percentage, message, ...args) => {
|
||||
// // custom logic
|
||||
// }
|
||||
}),
|
||||
// new webpack.HotModuleReplacementPlugin(), // enable HMR globally
|
||||
new webpack.NamedModulesPlugin(), // prints more readable module names in the browser console on HMR updates
|
||||
],
|
||||
optimization: {
|
||||
minimize: argv.mode === 'production',
|
||||
namedModules: argv.mode !== 'production',
|
||||
concatenateModules: argv.mode === 'production',
|
||||
},
|
||||
});
|
||||
@@ -1,70 +0,0 @@
|
||||
{
|
||||
"name": "@dbeaver/builder",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"license": "Apache-2.0",
|
||||
"bin": "./bin/index.js",
|
||||
"scripts": {
|
||||
"lint": "eslint ./src/ --ext .ts,.tsx"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/cli": "^7.7.4",
|
||||
"@babel/core": "^7.7.4",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/plugin-transform-runtime": "^7.8.3",
|
||||
"@babel/preset-env": "^7.7.4",
|
||||
"@babel/preset-react": "^7.7.4",
|
||||
"@csstools/postcss-sass": "^4.0.0",
|
||||
"@dbeaver/core": "^0.1.0",
|
||||
"@material/button": "^4.0.0",
|
||||
"@material/elevation": "^4.0.0",
|
||||
"@material/ripple": "^4.0.0",
|
||||
"@material/theme": "^4.0.0",
|
||||
"@material/typography": "^4.0.0",
|
||||
"@rollup/plugin-babel": "^5.0.2",
|
||||
"@rollup/plugin-commonjs": "^12.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
||||
"@types/graphql": "^14.5.0",
|
||||
"@types/node": "^12.7.8",
|
||||
"@types/react": "^16.9.34",
|
||||
"@types/react-dom": "^16.9.6",
|
||||
"babel-loader": "^8.0.6",
|
||||
"babel-plugin-react-require": "^3.1.1",
|
||||
"circular-dependency-plugin": "^5.2.0",
|
||||
"copy-webpack-plugin": "^5.1.0",
|
||||
"extract-css-chunks-webpack-plugin": "^4.7.1",
|
||||
"go-split": "^1.3.2",
|
||||
"graphql": "^14.5.8",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"merge-jsons-webpack-plugin": "^1.0.21",
|
||||
"mini-css-extract-plugin": "^0.9.0",
|
||||
"mobx": "^5.15.4",
|
||||
"mobx-react": "^6.2.2",
|
||||
"node-sass": "^4.13.0",
|
||||
"postcss-discard-comments": "^4.0.2",
|
||||
"postcss-import": "^12.0.1",
|
||||
"preact": "^10.4.1",
|
||||
"preact-render-to-string": "^5.1.6",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-hot-loader": "^4.12.18",
|
||||
"reakit": "1.0.0-beta.11",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"reshadow": "0.0.1-alpha.77",
|
||||
"resolve": "^1.17.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"rollup": "^2.0.6",
|
||||
"rollup-plugin-includepaths": "^0.2.3",
|
||||
"rollup-plugin-peer-deps-external": "^2.2.2",
|
||||
"rollup-plugin-postcss": "^3.1.1",
|
||||
"rollup-plugin-typescript2": "^0.26.0",
|
||||
"rxjs": "^6.5.5",
|
||||
"source-map-loader": "^0.2.4",
|
||||
"string-replace-webpack-plugin": "^0.1.3",
|
||||
"typescript": "^3.9.3",
|
||||
"webpack": "^4.41.2",
|
||||
"webpack-cli": "^3.3.10",
|
||||
"webpack-dev-server": "^3.9.0",
|
||||
"webpack-merge": "^4.2.2",
|
||||
"yargs": "^15.3.1"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/* eslint-disable import-helpers/order-imports, import/order, import/no-duplicates */
|
||||
/* this eslint-disable required for webpack inject */
|
||||
import 'reflect-metadata';
|
||||
|
||||
import { bootstrap } from '@dbeaver/core';
|
||||
|
||||
const PLUGINS = []; // will be injected by webpack
|
||||
|
||||
bootstrap(PLUGINS);
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/dist
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.env*
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "@dbeaver/cloudbeaver",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
"build": "yarn run clean-dist && builder build-app",
|
||||
"serve": "builder serve-app",
|
||||
"build:analyze": "echo \"no analyze specified\" && exit 0",
|
||||
"clean-dist": "rimraf dist/*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dbeaver/administration": "^0.1.0",
|
||||
"@dbeaver/authentication": "^0.1.0",
|
||||
"@dbeaver/ag-grid-plugin": "^0.1.0",
|
||||
"@dbeaver/basic-connection-plugin": "^0.1.0",
|
||||
"@dbeaver/builder": "^0.1.0",
|
||||
"@dbeaver/core": "^0.1.0",
|
||||
"@dbeaver/custom-connection-plugin": "^0.1.0",
|
||||
"@dbeaver/data-viewer-plugin": "^0.1.0",
|
||||
"@dbeaver/ddl-viewer-plugin": "^0.1.0",
|
||||
"@dbeaver/object-viewer-plugin": "^0.1.0",
|
||||
"@dbeaver/sql-editor": "^0.1.0",
|
||||
"@dbeaver/data-export-plugin": "^0.1.0"
|
||||
},
|
||||
"buildVersion": "0.13.0"
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* You may omit "@dbeaver/core" here. It will be included by default
|
||||
*/
|
||||
|
||||
module.exports = [
|
||||
"@dbeaver/administration",
|
||||
"@dbeaver/authentication",
|
||||
"@dbeaver/ag-grid-plugin",
|
||||
"@dbeaver/basic-connection-plugin",
|
||||
"@dbeaver/custom-connection-plugin",
|
||||
"@dbeaver/data-viewer-plugin",
|
||||
"@dbeaver/object-viewer-plugin",
|
||||
"@dbeaver/sql-editor",
|
||||
"@dbeaver/ddl-viewer-plugin",
|
||||
"@dbeaver/data-export-plugin",
|
||||
];
|
||||
@@ -9,8 +9,7 @@
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
/dist
|
||||
/lib
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "@cloudbeaver/core-app",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"license": "Apache-2.0",
|
||||
"main": "lib/index.js",
|
||||
"module": "lib/index.js",
|
||||
"scripts": {
|
||||
"prebuild": "rimraf lib/*",
|
||||
"build": "webpack --config ../../configs/webpack.plugin.config",
|
||||
"postbuild": "tsc",
|
||||
"lint": "eslint ./src/ --ext .ts,.tsx",
|
||||
"lint-fix": "eslint ./src/ --ext .ts,.tsx --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"router5": "^8.x.x",
|
||||
"router5-plugin-browser": "^8.x.x"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@cloudbeaver/core-di": "^0.1.0",
|
||||
"@cloudbeaver/core-localization": "^0.1.0",
|
||||
"@cloudbeaver/core-blocks": "^0.1.0",
|
||||
"@cloudbeaver/core-sdk": "^0.1.0",
|
||||
"@cloudbeaver/core-theming": "^0.1.0",
|
||||
"@cloudbeaver/core-dialogs": "^0.1.0",
|
||||
"@cloudbeaver/core-settings": "^0.1.0",
|
||||
"@cloudbeaver/core-utils": "^0.1.0",
|
||||
"react": "^16.x.x",
|
||||
"react-dom": "^16.x.x",
|
||||
"reakit": "1.0.0-beta.11",
|
||||
"rxjs": "^6.x.x",
|
||||
"mobx": "^5.x.x",
|
||||
"mobx-react": "^6.x.x"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 913 B After Width: | Height: | Size: 913 B |
|
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 438 B |
|
Before Width: | Height: | Size: 778 B After Width: | Height: | Size: 778 B |
|
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 211 B |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 588 B |
|
Before Width: | Height: | Size: 748 B After Width: | Height: | Size: 748 B |
|
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 515 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 588 B |
|
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 582 B |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 635 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
|
||||
import { RouterService } from '../RouterService';
|
||||
import { ScreenService } from '../Screen/ScreenService';
|
||||
@@ -10,8 +10,8 @@ import styled, { css } from 'reshadow';
|
||||
|
||||
import {
|
||||
splitStyles, Split, ResizerControls, Pane,
|
||||
} from '@dbeaver/core/blocks';
|
||||
import { composes, useStyles } from '@dbeaver/core/theming';
|
||||
} from '@cloudbeaver/core-blocks';
|
||||
import { useStyles, composes } from '@cloudbeaver/core-theming';
|
||||
|
||||
import { NavigationTree } from '../NavigationTree';
|
||||
import { RightArea } from './RightArea';
|
||||
@@ -11,9 +11,9 @@ import styled, { css } from 'reshadow';
|
||||
|
||||
import {
|
||||
Pane, ResizerControls, Split, splitHorizontalStyles, splitStyles,
|
||||
} from '@dbeaver/core/blocks';
|
||||
import { useController } from '@dbeaver/core/di';
|
||||
import { composes, useStyles } from '@dbeaver/core/theming';
|
||||
} from '@cloudbeaver/core-blocks';
|
||||
import { useController } from '@cloudbeaver/core-di';
|
||||
import { useStyles, composes } from '@cloudbeaver/core-theming';
|
||||
|
||||
import { NavigationTabsBar } from '../shared/NavigationTabs/NavigationTabsBar';
|
||||
import { LogViewTab } from '../shared/ToolsPanel/LogViewTab/LogViewTab';
|
||||
@@ -37,7 +37,6 @@ const styles = composes(
|
||||
`
|
||||
);
|
||||
|
||||
|
||||
export const RightArea = observer(function RightArea() {
|
||||
const controller = useController(LogViewTabController);
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
import { observer } from 'mobx-react';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { useService } from '@dbeaver/core/di';
|
||||
import { DialogsPortal } from '@dbeaver/core/dialogs';
|
||||
import { useStyles, useTheme } from '@dbeaver/core/theming';
|
||||
import { useService } from '@cloudbeaver/core-di';
|
||||
import { DialogsPortal } from '@cloudbeaver/core-dialogs';
|
||||
import { useStyles, useTheme } from '@cloudbeaver/core-theming';
|
||||
|
||||
import { Notifications } from './Notifications/Notifications';
|
||||
import { ScreenService } from './Screen/ScreenService';
|
||||
@@ -9,7 +9,7 @@
|
||||
import { observer } from 'mobx-react';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { usePermission, EPermission } from '@dbeaver/core/root';
|
||||
import { usePermission, EPermission } from '@cloudbeaver/core-root';
|
||||
|
||||
import { ROOT_NODE_PATH } from '../shared/NodesManager/NavNodeManagerService';
|
||||
import { useChildren } from '../shared/useChildren';
|
||||
@@ -6,8 +6,8 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { ContextMenuService, IMenuPanel } from '@dbeaver/core/dialogs';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import { ContextMenuService, IMenuPanel } from '@cloudbeaver/core-dialogs';
|
||||
|
||||
import { NavNode } from '../shared/NodesManager/EntityTypes';
|
||||
import { NavNodeManagerService } from '../shared/NodesManager/NavNodeManagerService';
|
||||
@@ -11,8 +11,8 @@ import {
|
||||
} from 'react';
|
||||
import styled, { use } from 'reshadow';
|
||||
|
||||
import { Icon, StaticImage, Loader } from '@dbeaver/core/blocks';
|
||||
import { useStyles } from '@dbeaver/core/theming';
|
||||
import { Icon, StaticImage, Loader } from '@cloudbeaver/core-blocks';
|
||||
import { useStyles } from '@cloudbeaver/core-theming';
|
||||
|
||||
import { navigationNodeStyles } from './navigationNodeStyles';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import { css } from 'reshadow';
|
||||
|
||||
import { composes } from '@dbeaver/core/theming';
|
||||
import { composes } from '@cloudbeaver/core-theming';
|
||||
|
||||
export const navigationNodeStyles = composes(
|
||||
css`
|
||||
@@ -11,15 +11,14 @@ import { observer } from 'mobx-react';
|
||||
import { useMemo } from 'react';
|
||||
import styled, { use } from 'reshadow';
|
||||
|
||||
import { Icon } from '@dbeaver/core/blocks';
|
||||
import { useService } from '@dbeaver/core/di';
|
||||
import { MenuTrigger } from '@dbeaver/core/dialogs';
|
||||
import { Icon } from '@cloudbeaver/core-blocks';
|
||||
import { useService } from '@cloudbeaver/core-di';
|
||||
import { MenuTrigger } from '@cloudbeaver/core-dialogs';
|
||||
|
||||
import { NavNode } from '../../../shared/NodesManager/EntityTypes';
|
||||
import { NavigationTreeContextMenuService } from '../../NavigationTreeContextMenuService';
|
||||
import { treeNodeMenuStyles } from './treeNodeMenuStyles';
|
||||
|
||||
|
||||
type TreeNodeMenuProps = {
|
||||
node: NavNode;
|
||||
isSelected: boolean;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
|
||||
import { useService } from '@dbeaver/core/di';
|
||||
import { useService } from '@cloudbeaver/core-di';
|
||||
|
||||
import { EConnectionFeature } from '../../shared/ConnectionsManager/EConnectionFeature';
|
||||
import { useConnectionInfo } from '../../shared/ConnectionsManager/useConnectionInfo';
|
||||
@@ -20,7 +20,6 @@ import { useNode } from '../../shared/NodesManager/useNode';
|
||||
import { useChildren } from '../../shared/useChildren';
|
||||
import { NavigationTreeService } from '../NavigationTreeService';
|
||||
|
||||
|
||||
export function useNavigationTree(nodeId: string, parentId: string) {
|
||||
const navigationTreeService = useService(NavigationTreeService);
|
||||
const navNodeManagerService = useService(NavNodeManagerService);
|
||||
@@ -9,8 +9,8 @@
|
||||
import { observable } from 'mobx';
|
||||
import { Subject, Observable } from 'rxjs';
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { NotificationService } from '@dbeaver/core/eventsLog';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import { NotificationService } from '@cloudbeaver/core-events';
|
||||
|
||||
import { ConnectionsManagerService } from '../shared/ConnectionsManager/ConnectionsManagerService';
|
||||
import { EObjectFeature } from '../shared/NodesManager/EObjectFeature';
|
||||
@@ -10,9 +10,9 @@ import { observer } from 'mobx-react';
|
||||
import { Portal } from 'reakit';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { useService } from '@dbeaver/core/di';
|
||||
import { NotificationService } from '@dbeaver/core/eventsLog';
|
||||
import { useStyles } from '@dbeaver/core/theming';
|
||||
import { useService } from '@cloudbeaver/core-di';
|
||||
import { NotificationService } from '@cloudbeaver/core-events';
|
||||
import { useStyles } from '@cloudbeaver/core-theming';
|
||||
|
||||
import { NotificationsItem } from './NotificationsItem/NotificationsItem';
|
||||
|
||||
@@ -10,15 +10,14 @@ import { observer } from 'mobx-react';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import styled from 'reshadow';
|
||||
|
||||
import { useClipboard, Button, SanitizedHTML } from '@dbeaver/core/blocks';
|
||||
import { CommonDialogWrapper, DialogComponent, DialogComponentProps } from '@dbeaver/core/dialogs';
|
||||
import { useTranslate } from '@dbeaver/core/localization';
|
||||
import { useStyles } from '@dbeaver/core/theming';
|
||||
import { useClipboard, Button, SanitizedHTML } from '@cloudbeaver/core-blocks';
|
||||
import { CommonDialogWrapper, DialogComponent, DialogComponentProps } from '@cloudbeaver/core-dialogs';
|
||||
import { useTranslate } from '@cloudbeaver/core-localization';
|
||||
import { useStyles } from '@cloudbeaver/core-theming';
|
||||
|
||||
import { ErrorModel, IErrorInfo } from './ErrorModel';
|
||||
import { styles } from './styles';
|
||||
|
||||
|
||||
function DisplayErrorInfo({ error }: {error: IErrorInfo}) {
|
||||
return styled(useStyles(styles))(
|
||||
<>
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { GQLError, ServerInternalError } from '@dbeaver/core/sdk';
|
||||
import { GQLError, ServerInternalError } from '@cloudbeaver/core-sdk';
|
||||
|
||||
export interface IErrorInfo {
|
||||
message: string;
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
import { observable } from 'mobx';
|
||||
|
||||
import { IInitializableController, injectable } from '@dbeaver/core/di';
|
||||
import { CommonDialogService } from '@dbeaver/core/dialogs';
|
||||
import { ENotificationType, INotification } from '@dbeaver/core/eventsLog';
|
||||
import { IInitializableController, injectable } from '@cloudbeaver/core-di';
|
||||
import { CommonDialogService } from '@cloudbeaver/core-dialogs';
|
||||
import { ENotificationType, INotification } from '@cloudbeaver/core-events';
|
||||
|
||||
import { ErrorDetailsDialog } from './ErrorDetailsDialog/ErrorDetailsDialog';
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
import { observer } from 'mobx-react';
|
||||
|
||||
import { useController } from '@dbeaver/core/di';
|
||||
import { INotification } from '@dbeaver/core/eventsLog';
|
||||
import { useController } from '@cloudbeaver/core-di';
|
||||
import { INotification } from '@cloudbeaver/core-events';
|
||||
|
||||
import { NotificationItemController } from './NotificationItemController';
|
||||
import { Snackbar } from './Snackbar/Snackbar';
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
import { HTMLProps } from 'react';
|
||||
|
||||
import { CheckCircle, Frown } from '@dbeaver/core/blocks';
|
||||
import { ENotificationType } from '@dbeaver/core/eventsLog';
|
||||
import { CheckCircle, Frown } from '@cloudbeaver/core-blocks';
|
||||
import { ENotificationType } from '@cloudbeaver/core-events';
|
||||
|
||||
type IconProps = HTMLProps<HTMLDivElement> & {
|
||||
type: ENotificationType;
|
||||
@@ -9,10 +9,10 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import styled, { use } from 'reshadow';
|
||||
|
||||
import { Button, IconButton } from '@dbeaver/core/blocks';
|
||||
import { ENotificationType } from '@dbeaver/core/eventsLog';
|
||||
import { useTranslate } from '@dbeaver/core/localization';
|
||||
import { useStyles } from '@dbeaver/core/theming';
|
||||
import { Button, IconButton } from '@cloudbeaver/core-blocks';
|
||||
import { ENotificationType } from '@cloudbeaver/core-events';
|
||||
import { useTranslate } from '@cloudbeaver/core-localization';
|
||||
import { useStyles } from '@cloudbeaver/core-theming';
|
||||
|
||||
import { NotificationMark } from './NotificationMark';
|
||||
import { SNACKBAR_STYLES } from './styles';
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import { css } from 'reshadow';
|
||||
|
||||
import { composes } from '@dbeaver/core/theming';
|
||||
import { composes } from '@cloudbeaver/core-theming';
|
||||
|
||||
export const SNACKBAR_STYLES = composes(
|
||||
css`
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
import { observable } from 'mobx';
|
||||
import createRouter, {
|
||||
Router, SubscribeFn, SubscribeState, State
|
||||
Router, SubscribeFn, SubscribeState
|
||||
} from 'router5';
|
||||
import browserPlugin from 'router5-plugin-browser';
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
|
||||
@injectable()
|
||||
export class RouterService {
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import { SubscribeState } from 'router5';
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
|
||||
import { RouterService } from '../RouterService';
|
||||
import { IScreen, ScreenRoute } from './IScreen';
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
import { computed, observable } from 'mobx';
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { NotificationService } from '@dbeaver/core/eventsLog';
|
||||
import { IExtension } from '@dbeaver/core/extensions';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import { NotificationService } from '@cloudbeaver/core-events';
|
||||
import { IExtension } from '@cloudbeaver/core-extensions';
|
||||
|
||||
import { NavigationTreeService } from '../../NavigationTree/NavigationTreeService';
|
||||
import { ConnectionsManagerService, ObjectContainer } from '../../shared/ConnectionsManager/ConnectionsManagerService';
|
||||
@@ -9,8 +9,8 @@
|
||||
import { observer } from 'mobx-react';
|
||||
import styled, { css, use } from 'reshadow';
|
||||
|
||||
import { useController } from '@dbeaver/core/di';
|
||||
import { useStyles } from '@dbeaver/core/theming';
|
||||
import { useController } from '@cloudbeaver/core-di';
|
||||
import { useStyles } from '@cloudbeaver/core-theming';
|
||||
|
||||
import { TopMenuItem } from '../../shared/TopMenuItem';
|
||||
import { ConnectionSelectorController } from './ConnectionSelectorController';
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
import { computed } from 'mobx';
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { ComputedMenuItemModel, ComputedMenuPanelModel, IMenuItem } from '@dbeaver/core/dialogs';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import { ComputedMenuItemModel, ComputedMenuPanelModel, IMenuItem } from '@cloudbeaver/core-dialogs';
|
||||
|
||||
import { ConnectionsManagerService, Connection } from '../../../shared/ConnectionsManager/ConnectionsManagerService';
|
||||
import { EObjectFeature } from '../../../shared/NodesManager/EObjectFeature';
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
import { observer } from 'mobx-react';
|
||||
|
||||
import { AppLogo } from '@dbeaver/core/blocks';
|
||||
import { useService } from '@dbeaver/core/di';
|
||||
import { ServerService } from '@dbeaver/core/root';
|
||||
import { AppLogo } from '@cloudbeaver/core-blocks';
|
||||
import { useService } from '@cloudbeaver/core-di';
|
||||
import { ServerService } from '@cloudbeaver/core-root';
|
||||
|
||||
import { AppScreenService } from '../AppScreen/AppScreenService';
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import { observer } from 'mobx-react';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { useService } from '@dbeaver/core/di';
|
||||
import { useService } from '@cloudbeaver/core-di';
|
||||
|
||||
import { TopMenuItem } from '../shared/TopMenuItem';
|
||||
import { MainMenuService } from './MainMenuService';
|
||||
@@ -6,8 +6,8 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { IComputedMenuItemOptions, StaticMenu } from '@dbeaver/core/dialogs';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import { IComputedMenuItemOptions, StaticMenu } from '@cloudbeaver/core-dialogs';
|
||||
|
||||
export enum EMainMenu {
|
||||
'mainMenuConnectionsPanel' = 'mainMenuConnectionsPanel',
|
||||
@@ -9,10 +9,10 @@
|
||||
import { observer } from 'mobx-react';
|
||||
import styled from 'reshadow';
|
||||
|
||||
import { Icon } from '@dbeaver/core/blocks';
|
||||
import { useService } from '@dbeaver/core/di';
|
||||
import { MenuTrigger } from '@dbeaver/core/dialogs';
|
||||
import { useStyles } from '@dbeaver/core/theming';
|
||||
import { Icon } from '@cloudbeaver/core-blocks';
|
||||
import { useService } from '@cloudbeaver/core-di';
|
||||
import { MenuTrigger } from '@cloudbeaver/core-dialogs';
|
||||
import { useStyles } from '@cloudbeaver/core-theming';
|
||||
|
||||
import { topMenuStyles } from '../shared/topMenuStyles';
|
||||
import { SettingsMenuService } from './SettingsMenuService';
|
||||
@@ -6,11 +6,10 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { IComputedMenuItemOptions, StaticMenu } from '@dbeaver/core/dialogs';
|
||||
import { LocalizationService } from '@dbeaver/core/localization';
|
||||
import { ThemeService } from '@dbeaver/core/theming';
|
||||
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import { IComputedMenuItemOptions, StaticMenu } from '@cloudbeaver/core-dialogs';
|
||||
import { LocalizationService } from '@cloudbeaver/core-localization';
|
||||
import { ThemeService } from '@cloudbeaver/core-theming';
|
||||
|
||||
@injectable()
|
||||
export class SettingsMenuService {
|
||||
@@ -6,8 +6,8 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { Placeholder, TopAppBar } from '@dbeaver/core/blocks';
|
||||
import { useService } from '@dbeaver/core/di';
|
||||
import { Placeholder, TopAppBar } from '@cloudbeaver/core-blocks';
|
||||
import { useService } from '@cloudbeaver/core-di';
|
||||
|
||||
import { TopNavService } from './TopNavBarService';
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { PlaceholderContainer } from '@dbeaver/core/blocks';
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { PlaceholderContainer } from '@cloudbeaver/core-blocks';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
|
||||
import { ConnectionSelector } from './ConnectionSchemaManager/ConnectionSelector/ConnectionSelector';
|
||||
import { Fill } from './Fill';
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
import { observer } from 'mobx-react';
|
||||
import { ButtonHTMLAttributes } from 'react';
|
||||
import { Button } from 'reakit';
|
||||
import { Button } from 'reakit/Button';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { Icon, IconOrImage } from '@dbeaver/core/blocks';
|
||||
import { IMenuItem, MenuTrigger } from '@dbeaver/core/dialogs';
|
||||
import { useTranslate } from '@dbeaver/core/localization';
|
||||
import { composes, useStyles, Style } from '@dbeaver/core/theming';
|
||||
import { Icon, IconOrImage } from '@cloudbeaver/core-blocks';
|
||||
import { IMenuItem, MenuTrigger } from '@cloudbeaver/core-dialogs';
|
||||
import { useTranslate } from '@cloudbeaver/core-localization';
|
||||
import { composes, useStyles, Style } from '@cloudbeaver/core-theming';
|
||||
|
||||
import { topMenuStyles } from './topMenuStyles';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import { css } from 'reshadow';
|
||||
|
||||
import { composes } from '@dbeaver/core/theming';
|
||||
import { composes } from '@cloudbeaver/core-theming';
|
||||
|
||||
export const topMenuStyles = composes(
|
||||
css`
|
||||
@@ -6,21 +6,19 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import {
|
||||
ContextMenuService,
|
||||
IContextMenuItem,
|
||||
IMenuContext,
|
||||
} from '@dbeaver/core/dialogs';
|
||||
} from '@cloudbeaver/core-dialogs';
|
||||
|
||||
import { NavigationTreeContextMenuService } from '../../NavigationTree/NavigationTreeContextMenuService';
|
||||
import { EMainMenu, MainMenuService } from '../../TopNavBar/MainMenu/MainMenuService';
|
||||
import { NavNode } from '../NodesManager/EntityTypes';
|
||||
import { EObjectFeature } from '../NodesManager/EObjectFeature';
|
||||
import { NodeManagerUtils } from '../NodesManager/NodeManagerUtils';
|
||||
import { ConnectionsManagerService } from './ConnectionsManagerService';
|
||||
|
||||
|
||||
@injectable()
|
||||
export class ConnectionDialogsService {
|
||||
newConnectionMenuToken = 'connectionMenu';
|
||||
@@ -6,12 +6,12 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { computed, observable } from 'mobx';
|
||||
import { computed } from 'mobx';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
import { injectable } from '@dbeaver/core/di';
|
||||
import { NotificationService } from '@dbeaver/core/eventsLog';
|
||||
import { SessionService } from '@dbeaver/core/root';
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import { NotificationService } from '@cloudbeaver/core-events';
|
||||
import { SessionService } from '@cloudbeaver/core-root';
|
||||
import {
|
||||
ConnectionInfo,
|
||||
DataSourceInfo,
|
||||
@@ -19,8 +19,8 @@ import {
|
||||
GraphQLService,
|
||||
CachedResource,
|
||||
DatabaseObjectInfo,
|
||||
} from '@dbeaver/core/sdk';
|
||||
import { MetadataMap } from '@dbeaver/core/utils';
|
||||
} from '@cloudbeaver/core-sdk';
|
||||
import { MetadataMap } from '@cloudbeaver/core-utils';
|
||||
|
||||
import { NavNodeManagerService } from '../NodesManager/NavNodeManagerService';
|
||||
import { NodeManagerUtils } from '../NodesManager/NodeManagerUtils';
|
||||
@@ -302,7 +302,6 @@ export class ConnectionsManagerService {
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
if (load) {
|
||||
try {
|
||||
itemMetadata.loading = true;
|
||||