This commit is contained in:
Jan Prochazka
2021-04-15 17:22:53 +02:00
parent 419ab985c1
commit 4dfaf1346e
13 changed files with 70 additions and 114 deletions

View File

@@ -71,7 +71,7 @@
"build": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn dist", "build": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn dist",
"build:local": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn predist", "build:local": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn predist",
"postinstall": "electron-builder install-app-deps", "postinstall": "electron-builder install-app-deps",
"predist": "copyfiles ../packages/api/dist/* packages && copyfiles \"../packages/web/public/*\" packages && copyfiles \"../packages/web/public/**/*\" packages" "predist": "copyfiles ../packages/api/dist/* packages && copyfiles \"../packages/web/public/*\" packages && copyfiles \"../packages/web/public/**/*\" packages && copyup \"../plugins/dist/**\" packages"
}, },
"main": "src/electron.js", "main": "src/electron.js",
"devDependencies": { "devDependencies": {

View File

@@ -20,13 +20,13 @@
"build:filterparser": "yarn workspace dbgate-filterparser build", "build:filterparser": "yarn workspace dbgate-filterparser build",
"build:tools": "yarn workspace dbgate-tools build", "build:tools": "yarn workspace dbgate-tools build",
"build:lib": "yarn build:tools && yarn build:sqltree && yarn build:filterparser && yarn build:datalib", "build:lib": "yarn build:tools && yarn build:sqltree && yarn build:filterparser && yarn build:datalib",
"build:app": "cd app && yarn install && yarn build", "build:app": "yarn plugins:copydist && cd app && yarn install && yarn build",
"build:api": "yarn workspace dbgate-api build", "build:api": "yarn workspace dbgate-api build",
"build:web:docker": "yarn workspace dbgate-web build", "build:web:docker": "yarn workspace dbgate-web build",
"build:plugins:frontend": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn build:frontend", "build:plugins:frontend": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn build:frontend",
"build:plugins:frontend:watch": "workspaces-run --parallel --only=\"dbgate-plugin-*\" -- yarn build:frontend:watch", "build:plugins:frontend:watch": "workspaces-run --parallel --only=\"dbgate-plugin-*\" -- yarn build:frontend:watch",
"plugins:copydist": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn copydist", "plugins:copydist": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn copydist",
"build:app:local": "cd app && yarn build:local", "build:app:local": "yarn plugins:copydist && cd app && yarn build:local",
"start:app:local": "cd app && yarn start:local", "start:app:local": "cd app && yarn start:local",
"setCurrentVersion": "node setCurrentVersion", "setCurrentVersion": "node setCurrentVersion",
"generatePadFile": "node generatePadFile", "generatePadFile": "node generatePadFile",

View File

@@ -99,6 +99,7 @@ module.exports = {
const res = []; const res = [];
for (const packageName of _.union(files1, files2)) { for (const packageName of _.union(files1, files2)) {
if (!/^dbgate-plugin-.*$/.test(packageName)) continue;
const isPackaged = files1.includes(packageName); const isPackaged = files1.includes(packageName);
const manifest = await fs const manifest = await fs
.readFile(path.join(isPackaged ? packagedPluginsDir() : pluginsdir(), packageName, 'package.json'), { .readFile(path.join(isPackaged ? packagedPluginsDir() : pluginsdir(), packageName, 'package.json'), {

View File

@@ -44,7 +44,7 @@ function packagedPluginsDir() {
if (_isRunOnSource()) { if (_isRunOnSource()) {
return path.resolve(__dirname, '../../../../plugins'); return path.resolve(__dirname, '../../../../plugins');
} }
return path.resolve(__dirname, '../plugins'); return path.resolve(__dirname, '../../plugins/dist');
} }
module.exports = { module.exports = {

View File

@@ -1,87 +0,0 @@
// import React from 'react';
// import styled from 'styled-components';
// import useTheme from '../theme/useTheme';
// import { useSetOpenedTabs } from '../utility/globalState';
// import { extractPluginIcon, extractPluginAuthor } from '../plugins/manifestExtractors';
// import useOpenNewTab from '../utility/useOpenNewTab';
// const Wrapper = styled.div`
// margin: 1px 3px 10px 5px;
// display: flex;
// align-items: center;
// &:hover {
// background-color: ${props => props.theme.left_background_blue[1]};
// }
// `;
// const Texts = styled.div`
// margin-left: 10px;
// `;
// const Name = styled.div`
// font-weight: bold;
// `;
// const Line = styled.div`
// display: flex;
// `;
// const Icon = styled.img`
// width: 50px;
// height: 50px;
// `;
// const Description = styled.div`
// font-style: italic;
// `;
// const Author = styled.div`
// font-weight: bold;
// `;
// const Version = styled.div`
// margin-left: 5px;
// `;
// function openPlugin(openNewTab, packageManifest) {
// openNewTab({
// title: packageManifest.name,
// icon: 'icon plugin',
// tabComponent: 'PluginTab',
// props: {
// packageName: packageManifest.name,
// },
// });
// }
// function PluginsListItem({ packageManifest }) {
// const openNewTab = useOpenNewTab();
// const theme = useTheme();
// return (
// <Wrapper onClick={() => openPlugin(openNewTab, packageManifest)} theme={theme}>
// <Icon src={extractPluginIcon(packageManifest)} />
// <Texts>
// <Line>
// <Name>{packageManifest.name}</Name>
// <Version>{packageManifest.version}</Version>
// </Line>
// <Line>
// <Description>{packageManifest.description}</Description>
// </Line>
// <Line>
// <Author>{extractPluginAuthor(packageManifest)}</Author>
// </Line>
// </Texts>
// </Wrapper>
// );
// }
// export default function PluginsList({ plugins }) {
// return (
// <>
// {plugins.map(packageManifest => (
// <PluginsListItem packageManifest={packageManifest} key={packageManifest.name} />
// ))}
// </>
// );
// }

View File

@@ -11,6 +11,10 @@ export function extractPluginIcon(packageManifest) {
if (match) { if (match) {
return `https://raw.githubusercontent.com/${match[1]}/${match[2]}/master/icon.svg`; return `https://raw.githubusercontent.com/${match[1]}/${match[2]}/master/icon.svg`;
} }
if (tested == 'https://dbgate.org') {
return `https://github.com/dbgate/dbgate/raw/master/plugins/${packageManifest.name}/icon.svg`;
}
} }
return 'unknown.svg'; return 'unknown.svg';
} }

View File

@@ -2,13 +2,12 @@
"name": "dbgate-plugin-csv", "name": "dbgate-plugin-csv",
"main": "dist/backend.js", "main": "dist/backend.js",
"version": "1.0.9", "version": "1.0.9",
"homepage": "https://github.com/dbgate/dbgate-plugin-csv", "homepage": "https://dbgate.org",
"description": "CSV import/export plugin for DbGate", "description": "CSV import/export plugin for DbGate",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/dbgate/dbgate-plugin-csv.git" "url": "https://github.com/dbgate/dbgate"
}, },
"funding": "https://www.paypal.com/paypalme/JanProchazkaCz/30eur",
"author": "Jan Prochazka", "author": "Jan Prochazka",
"license": "GPL", "license": "GPL",
"keywords": [ "keywords": [
@@ -19,7 +18,8 @@
"dbgateplugin" "dbgateplugin"
], ],
"files": [ "files": [
"dist" "dist",
"icon.svg"
], ],
"scripts": { "scripts": {
"build:frontend": "webpack --config webpack-frontend.config", "build:frontend": "webpack --config webpack-frontend.config",

View File

@@ -2,13 +2,12 @@
"name": "dbgate-plugin-excel", "name": "dbgate-plugin-excel",
"main": "dist/backend.js", "main": "dist/backend.js",
"version": "1.0.8", "version": "1.0.8",
"homepage": "https://github.com/dbgate/dbgate-plugin-excel",
"description": "MS Excel import/export plugin for DbGate", "description": "MS Excel import/export plugin for DbGate",
"homepage": "https://dbgate.org",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/dbgate/dbgate-plugin-excel.git" "url": "https://github.com/dbgate/dbgate"
}, },
"funding": "https://www.paypal.com/paypalme/JanProchazkaCz/30eur",
"author": "Jan Prochazka", "author": "Jan Prochazka",
"license": "GPL", "license": "GPL",
"keywords": [ "keywords": [
@@ -19,7 +18,8 @@
"dbgateplugin" "dbgateplugin"
], ],
"files": [ "files": [
"dist" "dist",
"icon.svg"
], ],
"scripts": { "scripts": {
"build:frontend": "webpack --config webpack-frontend.config", "build:frontend": "webpack --config webpack-frontend.config",

View File

@@ -4,9 +4,12 @@
"version": "1.0.1", "version": "1.0.1",
"license": "MIT", "license": "MIT",
"author": "Jan Prochazka", "author": "Jan Prochazka",
"homepage": "https://github.com/dbgate/dbgate-plugin-mongo", "homepage": "https://dbgate.org",
"description": "MongoDB connect plugin for DbGate", "description": "MongoDB connect plugin for DbGate",
"funding": "https://www.paypal.com/paypalme/JanProchazkaCz/30eur", "repository": {
"type": "git",
"url": "https://github.com/dbgate/dbgate"
},
"keywords": [ "keywords": [
"dbgate", "dbgate",
"dbgateplugin", "dbgateplugin",
@@ -14,7 +17,8 @@
"mongodb" "mongodb"
], ],
"files": [ "files": [
"dist" "dist",
"icon.svg"
], ],
"scripts": { "scripts": {
"build:frontend": "webpack --config webpack-frontend.config", "build:frontend": "webpack --config webpack-frontend.config",
@@ -34,5 +38,8 @@
"mongodb": "^3.6.5", "mongodb": "^3.6.5",
"webpack": "^4.42.0", "webpack": "^4.42.0",
"webpack-cli": "^3.3.11" "webpack-cli": "^3.3.11"
},
"dependencies": {
"mongodb-client-encryption": "^1.2.3"
} }
} }

View File

@@ -2,13 +2,12 @@
"name": "dbgate-plugin-mssql", "name": "dbgate-plugin-mssql",
"main": "dist/backend.js", "main": "dist/backend.js",
"version": "1.2.2", "version": "1.2.2",
"homepage": "https://github.com/dbgate/dbgate-plugin-mssql", "homepage": "https://dbgate.org",
"description": "MS SQL connect plugin for DbGate", "description": "MS SQL connect plugin for DbGate",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/dbgate/dbgate-plugin-mssql.git" "url": "https://github.com/dbgate/dbgate"
}, },
"funding": "https://www.paypal.com/paypalme/JanProchazkaCz/30eur",
"author": "Jan Prochazka", "author": "Jan Prochazka",
"license": "GPL", "license": "GPL",
"keywords": [ "keywords": [
@@ -18,7 +17,8 @@
"dbgateplugin" "dbgateplugin"
], ],
"files": [ "files": [
"dist" "dist",
"icon.svg"
], ],
"scripts": { "scripts": {
"build:frontend": "webpack --config webpack-frontend.config", "build:frontend": "webpack --config webpack-frontend.config",

View File

@@ -2,13 +2,12 @@
"name": "dbgate-plugin-mysql", "name": "dbgate-plugin-mysql",
"main": "dist/backend.js", "main": "dist/backend.js",
"version": "1.2.2", "version": "1.2.2",
"homepage": "https://github.com/dbgate/dbgate-plugin-mysql", "homepage": "https://dbgate.org",
"description": "MySQL connect plugin for DbGate", "description": "MySQL connect plugin for DbGate",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/dbgate/dbgate-plugin-mysql.git" "url": "https://github.com/dbgate/dbgate"
}, },
"funding": "https://www.paypal.com/paypalme/JanProchazkaCz/30eur",
"author": "Jan Prochazka", "author": "Jan Prochazka",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [
@@ -18,7 +17,8 @@
"mysql" "mysql"
], ],
"files": [ "files": [
"dist" "dist",
"icon.svg"
], ],
"scripts": { "scripts": {
"build:frontend": "webpack --config webpack-frontend.config", "build:frontend": "webpack --config webpack-frontend.config",

View File

@@ -4,12 +4,11 @@
"version": "1.2.2", "version": "1.2.2",
"license": "MIT", "license": "MIT",
"description": "PostgreSQL connector plugin for DbGate", "description": "PostgreSQL connector plugin for DbGate",
"homepage": "https://github.com/dbgate/dbgate-plugin-postgres", "homepage": "https://dbgate.org",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/dbgate/dbgate-plugin-postgres.git" "url": "https://github.com/dbgate/dbgate"
}, },
"funding": "https://www.paypal.com/paypalme/JanProchazkaCz/30eur",
"author": "Jan Prochazka", "author": "Jan Prochazka",
"keywords": [ "keywords": [
"dbgate", "dbgate",
@@ -17,7 +16,8 @@
"postgresql" "postgresql"
], ],
"files": [ "files": [
"dist" "dist",
"icon.svg"
], ],
"scripts": { "scripts": {
"build:frontend": "webpack --config webpack-frontend.config", "build:frontend": "webpack --config webpack-frontend.config",

View File

@@ -5908,6 +5908,16 @@ moment@^2.24.0:
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==
mongodb-client-encryption@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/mongodb-client-encryption/-/mongodb-client-encryption-1.2.3.tgz#0078f2cf385762e052b0c12d9be256eb1ef9a347"
integrity sha512-w+mvB2wLwWjnGvPYUmVDfec7OmkXfPTJh/BRAt23A1Q0g+duOFlZD+qRB0fQYwhGblkno5NBMR7HXSSRx5+AwQ==
dependencies:
bindings "^1.5.0"
bl "^2.2.1"
nan "^2.14.2"
prebuild-install "6.0.1"
mongodb@^3.6.5: mongodb@^3.6.5:
version "3.6.6" version "3.6.6"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.6.6.tgz#92e3658f45424c34add3003e3046c1535c534449" resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.6.6.tgz#92e3658f45424c34add3003e3046c1535c534449"
@@ -6923,6 +6933,27 @@ postgres-interval@^1.1.0:
dependencies: dependencies:
xtend "^4.0.0" xtend "^4.0.0"
prebuild-install@6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.0.1.tgz#5902172f7a40eb67305b96c2a695db32636ee26d"
integrity sha512-7GOJrLuow8yeiyv75rmvZyeMGzl8mdEX5gY69d6a6bHWmiPevwqFw+tQavhK0EYMaSg3/KD24cWqeQv1EWsqDQ==
dependencies:
detect-libc "^1.0.3"
expand-template "^2.0.3"
github-from-package "0.0.0"
minimist "^1.2.3"
mkdirp-classic "^0.5.3"
napi-build-utils "^1.0.1"
node-abi "^2.7.0"
noop-logger "^0.1.1"
npmlog "^4.0.1"
pump "^3.0.0"
rc "^1.2.7"
simple-get "^3.0.3"
tar-fs "^2.0.0"
tunnel-agent "^0.6.0"
which-pm-runs "^1.0.0"
prebuild-install@^6.0.0: prebuild-install@^6.0.0:
version "6.0.0" version "6.0.0"
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.0.0.tgz#669022bcde57c710a869e39c5ca6bf9cd207f316" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.0.0.tgz#669022bcde57c710a869e39c5ca6bf9cd207f316"