diff --git a/.all-contributorsrc b/.all-contributorsrc
index 47e8fa01..d6af0224 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -239,6 +239,24 @@
"contributions": [
"platform"
]
+ },
+ {
+ "login": "markusand",
+ "name": "Marc Vilella",
+ "avatar_url": "https://avatars.githubusercontent.com/u/12972543?v=4",
+ "profile": "https://github.com/markusand",
+ "contributions": [
+ "translation"
+ ]
+ },
+ {
+ "login": "Lawondyss",
+ "name": "Ladislav Vondráček",
+ "avatar_url": "https://avatars.githubusercontent.com/u/272130?v=4",
+ "profile": "https://github.com/Lawondyss",
+ "contributions": [
+ "translation"
+ ]
}
],
"contributorsPerLine": 7,
diff --git a/.eslintrc b/.eslintrc
index 5e65d39e..6a3861e1 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -18,7 +18,8 @@
},
"plugins": [
"vue",
- "@typescript-eslint"
+ "@typescript-eslint",
+ "simple-import-sort"
],
"rules": {
"space-infix-ops": "off",
@@ -91,6 +92,8 @@
}
}
],
- "@typescript-eslint/no-var-requires": "off"
+ "@typescript-eslint/no-var-requires": "off",
+ "simple-import-sort/imports": "error",
+ "simple-import-sort/exports": "error"
}
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index be5e2ce5..98615312 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,20 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+### [0.7.16-beta.0](https://github.com/antares-sql/antares/compare/v0.7.15...v0.7.16-beta.0) (2023-08-11)
+
+
+### Features
+
+* ability to change sql dump file name ([2e39d81](https://github.com/antares-sql/antares/commit/2e39d810b519401d0410cbb76520c07c595329fc))
+* ability to export a table dump from table context menu ([84b2255](https://github.com/antares-sql/antares/commit/84b2255bf405431070511890b2bca770fc4cc2bc))
+* support to links in changelog ([ad7e459](https://github.com/antares-sql/antares/commit/ad7e459c689d70ca664b9a3091d3dcab3f26ce4d))
+
+
+### Bug Fixes
+
+* **MySQL:** missing error details on mysql importer with some exceptione ([7b1cb4f](https://github.com/antares-sql/antares/commit/7b1cb4ff86dddb5fb4b4d960b47ea17f38a24aa6))
+
### [0.7.15](https://github.com/antares-sql/antares/compare/v0.7.14...v0.7.15) (2023-07-31)
diff --git a/README.md b/README.md
index f9a6fbf2..518b4380 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,8 @@
# Antares SQL Client
-![GitHub package.json version](https://img.shields.io/github/package-json/v/fabio286/antares) ![GitHub](https://img.shields.io/github/license/fabio286/antares) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ffabio286%2Fantares%2Fbadge&style=flat)](https://actions-badge.atrox.dev/fabio286/antares/goto) [![antares](https://snapcraft.io/antares/badge.svg)](https://snapcraft.io/antares) [![antares](https://snapcraft.io/antares/trending.svg?name=0)](https://snapcraft.io/antares) [![Twitter Follow](https://img.shields.io/twitter/follow/AntaresSQL?style=social)](https://twitter.com/AntaresSQL) [![Plant a Tree](https://raw.githubusercontent.com/Fabio286/treedom-badge/master/svg/plant-a-tree.svg)](https://www.treedom.net/en/user/fabio-di-stasio/event/antares-for-the-planet)
+![GitHub package.json version](https://img.shields.io/github/package-json/v/fabio286/antares) ![GitHub](https://img.shields.io/github/license/fabio286/antares) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ffabio286%2Fantares%2Fbadge&style=flat)](https://actions-badge.atrox.dev/fabio286/antares/goto) [![antares](https://snapcraft.io/antares/badge.svg)](https://snapcraft.io/antares) [![antares](https://snapcraft.io/antares/trending.svg?name=0)](https://snapcraft.io/antares)
+![Mastodon Follow](https://img.shields.io/mastodon/follow/%20110860460902482117?domain=https%3A%2F%2Ffosstodon.org&style=social) [![Twitter Follow](https://img.shields.io/twitter/follow/AntaresSQL?style=social)](https://twitter.com/AntaresSQL) [![Plant a Tree](https://raw.githubusercontent.com/Fabio286/treedom-badge/master/svg/plant-a-tree.svg)](https://www.treedom.net/en/user/fabio-di-stasio/event/antares-for-the-planet)
Antares is an SQL client based on [Electron.js](https://github.com/electron/electron) and [Vue.js](https://github.com/vuejs/vue) that aims to become a useful tool, especially for developers.
Our target is to support as many databases as possible, and all major operating systems, including the ARM versions.
@@ -17,7 +18,7 @@ However, there are all the features necessary to have a pleasant database manage
We are actively working on it, hoping to provide new cool features, improvements and fixes as soon as possible.
🔗 If you are curious to try Antares you can download and install the [latest release](https://github.com/Fabio286/antares/releases/latest).
-👁 To stay tuned for new releases [follow Antares SQL](https://twitter.com/AntaresSQL) on Twitter.
+👁 To stay tuned for new releases follow Antares SQL on [Mastodon](https://fosstodon.org/@AntaresSQL) or [Twitter](https://twitter.com/AntaresSQL).
🌟 Don't forget to **leave a star** if you appreciate this project.
🗳️ Polls:
@@ -152,6 +153,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Anton Mikhalev 🌍
René 💻 🌍
Woodenman 📦
+ Marc Vilella 🌍
+ Ladislav Vondráček 🌍
diff --git a/package-lock.json b/package-lock.json
index e26ff70c..ce35f80b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,21 +1,21 @@
{
"name": "antares",
- "version": "0.7.15",
+ "version": "0.7.16-beta.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "antares",
- "version": "0.7.15",
+ "version": "0.7.16-beta.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@electron/remote": "~2.0.1",
"@faker-js/faker": "~6.1.2",
- "@mdi/font": "~7.1.96",
+ "@mdi/font": "~7.2.96",
"@turf/helpers": "~6.5.0",
- "@vueuse/core": "~8.7.5",
- "ace-builds": "~1.14.0",
+ "@vueuse/core": "~10.4.1",
+ "ace-builds": "~1.24.1",
"better-sqlite3": "~8.0.0",
"electron-log": "~4.4.1",
"electron-store": "~8.1.0",
@@ -36,7 +36,7 @@
"pinia": "~2.0.28",
"source-map-support": "~0.5.20",
"spectre.css": "~0.5.9",
- "sql-formatter": "~12.2.0",
+ "sql-formatter": "~13.0.0",
"ssh2-promise": "~1.0.2",
"v-mask": "~2.3.0",
"vue": "~3.2.45",
@@ -69,6 +69,7 @@
"eslint-plugin-import": "~2.24.2",
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-promise": "~5.2.0",
+ "eslint-plugin-simple-import-sort": "~10.0.0",
"eslint-plugin-vue": "~8.0.3",
"file-loader": "~6.2.0",
"html-webpack-plugin": "~5.5.0",
@@ -89,6 +90,7 @@
"stylelint-scss": "~4.3.0",
"tree-kill": "~1.2.2",
"ts-loader": "~9.2.8",
+ "ts-node": "~10.9.1",
"typescript": "~4.6.3",
"unzip-crx-3": "~0.2.0",
"vue-eslint-parser": "~8.3.0",
@@ -1697,6 +1699,28 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
"node_modules/@csstools/selector-specificity": {
"version": "2.2.0",
"dev": true,
@@ -2078,8 +2102,9 @@
}
},
"node_modules/@mdi/font": {
- "version": "7.1.96",
- "license": "Apache-2.0"
+ "version": "7.2.96",
+ "resolved": "https://registry.npmjs.org/@mdi/font/-/font-7.2.96.tgz",
+ "integrity": "sha512-e//lmkmpFUMZKhmCY9zdjRe4zNXfbOIJnn6xveHbaV2kSw5aJ5dLXUxcRt1Gxfi7ZYpFLUWlkG2MGSFAiqAu7w=="
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
@@ -2148,6 +2173,30 @@
"node": ">=10"
}
},
+ "node_modules/@tsconfig/node10": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",
+ "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",
+ "dev": true
+ },
+ "node_modules/@tsconfig/node12": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
+ "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
+ "dev": true
+ },
+ "node_modules/@tsconfig/node14": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
+ "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
+ "dev": true
+ },
+ "node_modules/@tsconfig/node16": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
+ "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
+ "dev": true
+ },
"node_modules/@turf/helpers": {
"version": "6.5.0",
"license": "MIT",
@@ -2449,8 +2498,9 @@
"license": "MIT"
},
"node_modules/@types/web-bluetooth": {
- "version": "0.0.14",
- "license": "MIT"
+ "version": "0.0.17",
+ "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.17.tgz",
+ "integrity": "sha512-4p9vcSmxAayx72yn70joFoL44c9MO/0+iVEBIQXe3v2h2SiAsEIo/G5v6ObFWvNKRFjbrVadNf9LqEEZeQPzdA=="
},
"node_modules/@types/ws": {
"version": "8.5.4",
@@ -2825,56 +2875,24 @@
"license": "MIT"
},
"node_modules/@vueuse/core": {
- "version": "8.7.5",
- "license": "MIT",
+ "version": "10.4.1",
+ "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.4.1.tgz",
+ "integrity": "sha512-DkHIfMIoSIBjMgRRvdIvxsyboRZQmImofLyOHADqiVbQVilP8VVHDhBX2ZqoItOgu7dWa8oXiNnScOdPLhdEXg==",
"dependencies": {
- "@types/web-bluetooth": "^0.0.14",
- "@vueuse/metadata": "8.7.5",
- "@vueuse/shared": "8.7.5",
- "vue-demi": "*"
+ "@types/web-bluetooth": "^0.0.17",
+ "@vueuse/metadata": "10.4.1",
+ "@vueuse/shared": "10.4.1",
+ "vue-demi": ">=0.14.5"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
- },
- "peerDependencies": {
- "@vue/composition-api": "^1.1.0",
- "vue": "^2.6.0 || ^3.2.0"
- },
- "peerDependenciesMeta": {
- "@vue/composition-api": {
- "optional": true
- },
- "vue": {
- "optional": true
- }
- }
- },
- "node_modules/@vueuse/core/node_modules/@vueuse/shared": {
- "version": "8.7.5",
- "license": "MIT",
- "dependencies": {
- "vue-demi": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/antfu"
- },
- "peerDependencies": {
- "@vue/composition-api": "^1.1.0",
- "vue": "^2.6.0 || ^3.2.0"
- },
- "peerDependenciesMeta": {
- "@vue/composition-api": {
- "optional": true
- },
- "vue": {
- "optional": true
- }
}
},
"node_modules/@vueuse/core/node_modules/vue-demi": {
- "version": "0.14.5",
+ "version": "0.14.6",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz",
+ "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==",
"hasInstallScript": true,
- "license": "MIT",
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
@@ -2896,12 +2914,49 @@
}
},
"node_modules/@vueuse/metadata": {
- "version": "8.7.5",
- "license": "MIT",
+ "version": "10.4.1",
+ "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.4.1.tgz",
+ "integrity": "sha512-2Sc8X+iVzeuMGHr6O2j4gv/zxvQGGOYETYXEc41h0iZXIRnRbJZGmY/QP8dvzqUelf8vg0p/yEA5VpCEu+WpZg==",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
+ "node_modules/@vueuse/shared": {
+ "version": "10.4.1",
+ "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.4.1.tgz",
+ "integrity": "sha512-vz5hbAM4qA0lDKmcr2y3pPdU+2EVw/yzfRsBdu+6+USGa4PxqSQRYIUC9/NcT06y+ZgaTsyURw2I9qOFaaXHAg==",
+ "dependencies": {
+ "vue-demi": ">=0.14.5"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/@vueuse/shared/node_modules/vue-demi": {
+ "version": "0.14.6",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz",
+ "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==",
+ "hasInstallScript": true,
+ "bin": {
+ "vue-demi-fix": "bin/vue-demi-fix.js",
+ "vue-demi-switch": "bin/vue-demi-switch.js"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ },
+ "peerDependencies": {
+ "@vue/composition-api": "^1.0.0-rc.1",
+ "vue": "^3.0.0-0 || ^2.6.0"
+ },
+ "peerDependenciesMeta": {
+ "@vue/composition-api": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@webassemblyjs/ast": {
"version": "1.11.1",
"dev": true,
@@ -3094,8 +3149,9 @@
}
},
"node_modules/ace-builds": {
- "version": "1.14.0",
- "license": "BSD-3-Clause"
+ "version": "1.24.1",
+ "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.24.1.tgz",
+ "integrity": "sha512-TLcxMxiTRX5Eq9bBVSd/bTJlanCBULiv/IULLohJDDaCAfcpZKJBVSd4OWfN/j2c2jCLc+jhpNWGELiJZw3wPw=="
},
"node_modules/acorn": {
"version": "7.4.1",
@@ -3116,6 +3172,15 @@
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
+ "node_modules/acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
"node_modules/add-stream": {
"version": "1.0.0",
"dev": true,
@@ -3387,6 +3452,12 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/arg": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
+ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+ "dev": true
+ },
"node_modules/argparse": {
"version": "2.0.1",
"license": "Python-2.0"
@@ -4881,6 +4952,12 @@
"node": ">=10.0.0"
}
},
+ "node_modules/create-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
+ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
+ "dev": true
+ },
"node_modules/cross-env": {
"version": "7.0.3",
"dev": true,
@@ -5279,6 +5356,15 @@
"dev": true,
"license": "Apache-2.0"
},
+ "node_modules/diff": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.3.1"
+ }
+ },
"node_modules/dir-compare": {
"version": "2.4.0",
"dev": true,
@@ -6383,6 +6469,15 @@
"eslint": "^7.0.0"
}
},
+ "node_modules/eslint-plugin-simple-import-sort": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz",
+ "integrity": "sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==",
+ "dev": true,
+ "peerDependencies": {
+ "eslint": ">=5.0.0"
+ }
+ },
"node_modules/eslint-plugin-vue": {
"version": "8.0.3",
"dev": true,
@@ -7394,7 +7489,6 @@
},
"node_modules/get-stdin": {
"version": "8.0.0",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=10"
@@ -9170,6 +9264,12 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/make-error": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
+ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+ "dev": true
+ },
"node_modules/map-obj": {
"version": "4.3.0",
"dev": true,
@@ -12389,11 +12489,12 @@
"license": "BSD-3-Clause"
},
"node_modules/sql-formatter": {
- "version": "12.2.2",
- "resolved": "https://registry.npmjs.org/sql-formatter/-/sql-formatter-12.2.2.tgz",
- "integrity": "sha512-UBChSI2X6hd4GhmO+c7BmSFtc792FwogVaVqc9Y22/OqybvVfgl2OeAShc9fjivWVshXbm4UEK8WTM3tt+2Mvw==",
+ "version": "13.0.0",
+ "resolved": "https://registry.npmjs.org/sql-formatter/-/sql-formatter-13.0.0.tgz",
+ "integrity": "sha512-V21cVvge4rhn9Fa7K/fTKcmPM+x1yee6Vhq8ZwgaWh3VPBqApgsaoFB5kLAhiqRo5AmSaRyLU7LIdgnNwH01/w==",
"dependencies": {
"argparse": "^2.0.1",
+ "get-stdin": "=8.0.0",
"nearley": "^2.20.1"
},
"bin": {
@@ -13635,6 +13736,61 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/ts-node": {
+ "version": "10.9.1",
+ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz",
+ "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==",
+ "dev": true,
+ "dependencies": {
+ "@cspotcode/source-map-support": "^0.8.0",
+ "@tsconfig/node10": "^1.0.7",
+ "@tsconfig/node12": "^1.0.7",
+ "@tsconfig/node14": "^1.0.0",
+ "@tsconfig/node16": "^1.0.2",
+ "acorn": "^8.4.1",
+ "acorn-walk": "^8.1.1",
+ "arg": "^4.1.0",
+ "create-require": "^1.1.0",
+ "diff": "^4.0.1",
+ "make-error": "^1.1.1",
+ "v8-compile-cache-lib": "^3.0.1",
+ "yn": "3.1.1"
+ },
+ "bin": {
+ "ts-node": "dist/bin.js",
+ "ts-node-cwd": "dist/bin-cwd.js",
+ "ts-node-esm": "dist/bin-esm.js",
+ "ts-node-script": "dist/bin-script.js",
+ "ts-node-transpile-only": "dist/bin-transpile.js",
+ "ts-script": "dist/bin-script-deprecated.js"
+ },
+ "peerDependencies": {
+ "@swc/core": ">=1.2.50",
+ "@swc/wasm": ">=1.2.50",
+ "@types/node": "*",
+ "typescript": ">=2.7"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "@swc/wasm": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ts-node/node_modules/acorn": {
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
+ "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
+ "dev": true,
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
"node_modules/tsconfig-paths": {
"version": "3.14.2",
"dev": true,
@@ -14015,6 +14171,12 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/v8-compile-cache-lib": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
+ "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
+ "dev": true
+ },
"node_modules/validate-npm-package-license": {
"version": "3.0.4",
"dev": true,
@@ -14940,6 +15102,15 @@
"fd-slicer": "~1.1.0"
}
},
+ "node_modules/yn": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
+ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/yocto-queue": {
"version": "0.1.0",
"dev": true,
diff --git a/package.json b/package.json
index cdfbfc2a..ccb4cc58 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "antares",
"productName": "Antares",
- "version": "0.7.15",
+ "version": "0.7.16-beta.0",
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
"license": "MIT",
"repository": "https://github.com/antares-sql/antares.git",
@@ -19,6 +19,7 @@
"release:beta": "npm run release -- --prerelease beta",
"devtools:install": "node scripts/devtoolsInstaller",
"postinstall": "electron-builder install-app-deps",
+ "translation:check": "ts-node ./scripts/translationCheck.ts",
"test:e2e": "npm run compile && npm run test:e2e-dry",
"test:e2e-dry": "xvfb-maybe -- playwright test",
"lint": "eslint . --ext .js,.ts,.vue && stylelint \"./src/**/*.{css,scss,sass,vue}\"",
@@ -121,10 +122,10 @@
"dependencies": {
"@electron/remote": "~2.0.1",
"@faker-js/faker": "~6.1.2",
- "@mdi/font": "~7.1.96",
+ "@mdi/font": "~7.2.96",
"@turf/helpers": "~6.5.0",
- "@vueuse/core": "~8.7.5",
- "ace-builds": "~1.14.0",
+ "@vueuse/core": "~10.4.1",
+ "ace-builds": "~1.24.1",
"better-sqlite3": "~8.0.0",
"electron-log": "~4.4.1",
"electron-store": "~8.1.0",
@@ -145,7 +146,7 @@
"pinia": "~2.0.28",
"source-map-support": "~0.5.20",
"spectre.css": "~0.5.9",
- "sql-formatter": "~12.2.0",
+ "sql-formatter": "~13.0.0",
"ssh2-promise": "~1.0.2",
"v-mask": "~2.3.0",
"vue": "~3.2.45",
@@ -178,6 +179,7 @@
"eslint-plugin-import": "~2.24.2",
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-promise": "~5.2.0",
+ "eslint-plugin-simple-import-sort": "~10.0.0",
"eslint-plugin-vue": "~8.0.3",
"file-loader": "~6.2.0",
"html-webpack-plugin": "~5.5.0",
@@ -198,6 +200,7 @@
"stylelint-scss": "~4.3.0",
"tree-kill": "~1.2.2",
"ts-loader": "~9.2.8",
+ "ts-node": "~10.9.1",
"typescript": "~4.6.3",
"unzip-crx-3": "~0.2.0",
"vue-eslint-parser": "~8.3.0",
diff --git a/scripts/translationCheck.js b/scripts/translationCheck.js
deleted file mode 100644
index e69de29b..00000000
diff --git a/scripts/translationCheck.ts b/scripts/translationCheck.ts
new file mode 100644
index 00000000..f58008ce
--- /dev/null
+++ b/scripts/translationCheck.ts
@@ -0,0 +1,45 @@
+/* eslint-disable @typescript-eslint/ban-ts-comment */
+import { enUS } from '../src/renderer/i18n/en-US';
+import { localesNames } from '../src/renderer/i18n/supported-locales';
+const locale = process.argv[2];
+let fullCount = 0;
+let checkCount = 0;
+
+if (!locale) {
+ console.log('Please specify locale code as first argument.');
+ process.exit();
+}
+
+if (!Object.keys(localesNames).includes(locale)) {
+ console.log(`Translation ${locale} not fount in supported locales.`);
+ process.exit();
+}
+
+console.log('Checking missing translations for:', locale);
+
+const i18nFile = require(`../src/renderer/i18n/${locale}`)[locale.replace('-', '')];
+
+for (const group in enUS) {
+ // @ts-ignore
+ fullCount += Object.keys(enUS[group]).length;
+
+ if (!Object.keys(i18nFile).includes(group)) {
+ console.log(`Group "\u001b[31m${group}\u001b[0m" missing!`);
+ continue;
+ }
+
+ // @ts-ignore
+ for (const term in enUS[group]) {
+ if (!Object.keys(i18nFile[group]).includes(term))
+ console.log(`Translation "\u001b[33m${group}.${term}\u001b[0m" missing!`);
+ // @ts-ignore
+ else if (i18nFile[group][term] === enUS[group][term]) {
+ console.log(`Term "\u001b[36m${group}.${term}\u001b[0m" not translated!`);
+ checkCount++;
+ }
+ else
+ checkCount++;
+ }
+}
+
+console.log(checkCount, 'of', fullCount, 'strings are present in', locale, `(\u001b[32m${(checkCount*100/fullCount).toFixed(1)}%\u001b[0m)`);
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 40c6f48a..12a54435 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -31,10 +31,10 @@ parts:
fi
# Get the latest releases json
echo "Get GitHub releases..."
- wget --quiet https://api.github.com/repos/fabio286/antares/releases/latest -O releases.json
+ wget --quiet https://api.github.com/repos/fabio286/antares/releases -O releases.json
# Get the version from the tag_name and the download URL.
- VERSION=$(jq . releases.json | grep tag_name | cut -d'"' -f4 | sed s'/release-//')
- DEB_URL=$(cat releases.json | jq -r ".assets[] | select(.name | test(\"${FILTER}\")) | .browser_download_url")
+ VERSION=$(jq . releases.json | grep tag_name | head -1 | cut -d'"' -f4 | sed s'/release-//')
+ DEB_URL=$(cat releases.json | jq -r ".[0].assets[] | select(.name | test(\"${FILTER}\")) | .browser_download_url")
DEB=$(basename "${DEB_URL}")
echo "Downloading ${DEB_URL}..."
wget --quiet "${DEB_URL}" -O "${SNAPCRAFT_PART_INSTALL}/${DEB}"
@@ -79,7 +79,7 @@ parts:
- libdb5.3
- libdbus-1-3
- libexpat1
- - libffi7
+ - libffi8
- libgcc-s1
- libgcrypt20
- libglib2.0-0
@@ -87,9 +87,9 @@ parts:
- libgnutls30
- libgpg-error0
- libgssapi-krb5-2
- - libhogweed5
+ - libhogweed6
- libidn2-0
- - libjson-c4
+ - libjson-c5
- libk5crypto3
- libkeyutils1
- libkrb5-3
@@ -97,12 +97,12 @@ parts:
- liblz4-1
- liblzma5
- libmount1
- - libnettle7
+ - libnettle8
- libp11-kit0
- libpcre2-8-0
- libselinux1
- libsqlite3-0
- - libssl1.1
+ - libssl3
- libstdc++6
- libsystemd0
- libtasn1-6
diff --git a/src/common/customizations/firebird.ts b/src/common/customizations/firebird.ts
index 89bd6ba3..79312022 100644
--- a/src/common/customizations/firebird.ts
+++ b/src/common/customizations/firebird.ts
@@ -1,6 +1,6 @@
+import firebirdTypes from '../data-types/firebird';
import { Customizations } from '../interfaces/customizations';
import { defaults } from './defaults';
-import firebirdTypes from '../data-types/firebird';
export const customizations: Customizations = {
...defaults,
diff --git a/src/common/customizations/index.ts b/src/common/customizations/index.ts
index 6ccc8f1d..2dfa78de 100644
--- a/src/common/customizations/index.ts
+++ b/src/common/customizations/index.ts
@@ -1,7 +1,7 @@
+import * as firebird from 'common/customizations/firebird';
import * as mysql from 'common/customizations/mysql';
import * as postgresql from 'common/customizations/postgresql';
import * as sqlite from 'common/customizations/sqlite';
-import * as firebird from 'common/customizations/firebird';
import { Customizations } from 'common/interfaces/customizations';
export default {
diff --git a/src/common/customizations/mysql.ts b/src/common/customizations/mysql.ts
index e19fe352..7acca809 100644
--- a/src/common/customizations/mysql.ts
+++ b/src/common/customizations/mysql.ts
@@ -1,6 +1,6 @@
+import mysqlTypes from '../data-types/mysql';
import { Customizations } from '../interfaces/customizations';
import { defaults } from './defaults';
-import mysqlTypes from '../data-types/mysql';
export const customizations: Customizations = {
...defaults,
diff --git a/src/common/customizations/postgresql.ts b/src/common/customizations/postgresql.ts
index 2b7353de..61d040a6 100644
--- a/src/common/customizations/postgresql.ts
+++ b/src/common/customizations/postgresql.ts
@@ -1,6 +1,6 @@
+import postgresqlTypes from '../data-types/postgresql';
import { Customizations } from '../interfaces/customizations';
import { defaults } from './defaults';
-import postgresqlTypes from '../data-types/postgresql';
export const customizations: Customizations = {
...defaults,
diff --git a/src/common/customizations/sqlite.ts b/src/common/customizations/sqlite.ts
index 3bacd28f..d66a15ba 100644
--- a/src/common/customizations/sqlite.ts
+++ b/src/common/customizations/sqlite.ts
@@ -1,6 +1,6 @@
+import sqliteTypes from '../data-types/sqlite';
import { Customizations } from '../interfaces/customizations';
import { defaults } from './defaults';
-import sqliteTypes from '../data-types/sqlite';
export const customizations: Customizations = {
...defaults,
diff --git a/src/common/interfaces/antares.ts b/src/common/interfaces/antares.ts
index bf8fd167..6855cbf7 100644
--- a/src/common/interfaces/antares.ts
+++ b/src/common/interfaces/antares.ts
@@ -1,14 +1,15 @@
import * as mysql from 'mysql2/promise';
import * as pg from 'pg';
+import { FirebirdSQLClient } from 'src/main/libs/clients/FirebirdSQLClient';
import MysqlExporter from 'src/main/libs/exporters/sql/MysqlExporter';
import PostgreSQLExporter from 'src/main/libs/exporters/sql/PostgreSQLExporter';
import MySQLImporter from 'src/main/libs/importers/sql/MySQLlImporter';
import PostgreSQLImporter from 'src/main/libs/importers/sql/PostgreSQLImporter';
import SSHConfig from 'ssh2-promise/lib/sshConfig';
+
import { MySQLClient } from '../../main/libs/clients/MySQLClient';
import { PostgreSQLClient } from '../../main/libs/clients/PostgreSQLClient';
import { SQLiteClient } from '../../main/libs/clients/SQLiteClient';
-import { FirebirdSQLClient } from 'src/main/libs/clients/FirebirdSQLClient';
export type Client = MySQLClient | PostgreSQLClient | SQLiteClient | FirebirdSQLClient
export type ClientCode = 'mysql' | 'maria' | 'pg' | 'sqlite' | 'firebird'
diff --git a/src/common/libs/encrypter.ts b/src/common/libs/encrypter.ts
new file mode 100644
index 00000000..5ddafaa4
--- /dev/null
+++ b/src/common/libs/encrypter.ts
@@ -0,0 +1,28 @@
+import * as crypto from 'crypto';
+
+const algorithm = 'aes-256-gcm';
+
+function encrypt (text: string, password: string) {
+ const iv = crypto.randomBytes(16);
+ const key = crypto.scryptSync(password, 'antares', 32);
+ const cipher = crypto.createCipheriv(algorithm, key, iv);
+ const encrypted = Buffer.concat([cipher.update(text), cipher.final()]);
+ const authTag = cipher.getAuthTag();
+
+ return {
+ iv: iv.toString('hex'),
+ authTag: authTag.toString('hex'),
+ content: encrypted.toString('hex')
+ };
+}
+
+function decrypt (hash: { iv: string; content: string; authTag: string }, password: string) {
+ const key = crypto.scryptSync(password, 'antares', 32);
+ const decipher = crypto.createDecipheriv(algorithm, key, Buffer.from(hash.iv, 'hex'));
+ decipher.setAuthTag(Buffer.from(hash.authTag, 'hex'));
+ const decrpyted = decipher.update(hash.content, 'hex', 'utf8') + decipher.final('utf8');
+
+ return decrpyted;
+}
+
+export { decrypt, encrypt };
diff --git a/src/common/libs/sqlUtils.ts b/src/common/libs/sqlUtils.ts
index a80a77ab..d1f764f0 100644
--- a/src/common/libs/sqlUtils.ts
+++ b/src/common/libs/sqlUtils.ts
@@ -1,12 +1,13 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable no-useless-escape */
-import * as moment from 'moment';
import { lineString, point, polygon } from '@turf/helpers';
+import { BIT, BLOB, DATE, DATETIME, FLOAT, IS_MULTI_SPATIAL, NUMBER, SPATIAL, TEXT_SEARCH } from 'common/fieldTypes';
+import * as moment from 'moment';
+
import customizations from '../customizations';
import { ClientCode } from '../interfaces/antares';
-import { BLOB, BIT, DATE, DATETIME, FLOAT, SPATIAL, IS_MULTI_SPATIAL, NUMBER, TEXT_SEARCH } from 'common/fieldTypes';
-import hexToBinary, { HexChar } from './hexToBinary';
import { getArrayDepth } from './getArrayDepth';
+import hexToBinary, { HexChar } from './hexToBinary';
/**
* Escapes a string fo SQL use
diff --git a/src/common/shortcuts.ts b/src/common/shortcuts.ts
index 0f63517c..b3436e62 100644
--- a/src/common/shortcuts.ts
+++ b/src/common/shortcuts.ts
@@ -135,4 +135,4 @@ for (let i = 1; i <= 9; i++) {
});
}
-export { shortcuts, ShortcutRecord };
+export { ShortcutRecord, shortcuts };
diff --git a/src/main/ipc-handlers/application.ts b/src/main/ipc-handlers/application.ts
index 88d54d59..21b4facb 100644
--- a/src/main/ipc-handlers/application.ts
+++ b/src/main/ipc-handlers/application.ts
@@ -1,4 +1,5 @@
-import { app, ipcMain, dialog } from 'electron';
+import { app, dialog, ipcMain } from 'electron';
+
import { ShortcutRegister } from '../libs/ShortcutRegister';
export default () => {
diff --git a/src/main/ipc-handlers/connection.ts b/src/main/ipc-handlers/connection.ts
index 71732c65..47646802 100644
--- a/src/main/ipc-handlers/connection.ts
+++ b/src/main/ipc-handlers/connection.ts
@@ -1,9 +1,10 @@
import * as antares from 'common/interfaces/antares';
-import * as fs from 'fs';
import { ipcMain } from 'electron';
-import { ClientsFactory } from '../libs/ClientsFactory';
+import * as fs from 'fs';
import { SslOptions } from 'mysql2';
+import { ClientsFactory } from '../libs/ClientsFactory';
+
export default (connections: {[key: string]: antares.Client}) => {
ipcMain.handle('test-connection', async (event, conn: antares.ConnectionParams) => {
const params = {
diff --git a/src/main/ipc-handlers/index.ts b/src/main/ipc-handlers/index.ts
index b1130c00..36bb0bd1 100644
--- a/src/main/ipc-handlers/index.ts
+++ b/src/main/ipc-handlers/index.ts
@@ -1,17 +1,17 @@
import * as antares from 'common/interfaces/antares';
-import connection from './connection';
-import tables from './tables';
-import views from './views';
-import triggers from './triggers';
-import routines from './routines';
-import functions from './functions';
-import schedulers from './schedulers';
-import updates from './updates';
import application from './application';
+import connection from './connection';
import database from './database';
+import functions from './functions';
+import routines from './routines';
+import schedulers from './schedulers';
import schema from './schema';
+import tables from './tables';
+import triggers from './triggers';
+import updates from './updates';
import users from './users';
+import views from './views';
const connections: {[key: string]: antares.Client} = {};
diff --git a/src/main/ipc-handlers/schema.ts b/src/main/ipc-handlers/schema.ts
index 9dc7cd8a..f3594357 100644
--- a/src/main/ipc-handlers/schema.ts
+++ b/src/main/ipc-handlers/schema.ts
@@ -1,9 +1,9 @@
+import { ChildProcess, fork } from 'child_process';
import * as antares from 'common/interfaces/antares';
import * as workers from 'common/interfaces/workers';
+import { dialog, ipcMain } from 'electron';
import * as fs from 'fs';
import * as path from 'path';
-import { ChildProcess, fork } from 'child_process';
-import { ipcMain, dialog } from 'electron';
const isDevelopment = process.env.NODE_ENV !== 'production';
diff --git a/src/main/ipc-handlers/tables.ts b/src/main/ipc-handlers/tables.ts
index 5c55a68c..710ccc25 100644
--- a/src/main/ipc-handlers/tables.ts
+++ b/src/main/ipc-handlers/tables.ts
@@ -1,12 +1,12 @@
-import * as fs from 'fs';
+import { faker } from '@faker-js/faker';
+import customizations from 'common/customizations';
+import { ARRAY, BIT, BLOB, BOOLEAN, DATE, DATETIME, FLOAT, LONG_TEXT, NUMBER, TEXT, TEXT_SEARCH } from 'common/fieldTypes';
import * as antares from 'common/interfaces/antares';
import { InsertRowsParams } from 'common/interfaces/tableApis';
-import { ipcMain } from 'electron';
-import { faker } from '@faker-js/faker';
-import * as moment from 'moment';
import { sqlEscaper } from 'common/libs/sqlUtils';
-import { TEXT, LONG_TEXT, ARRAY, TEXT_SEARCH, NUMBER, FLOAT, BLOB, BIT, DATE, DATETIME, BOOLEAN } from 'common/fieldTypes';
-import customizations from 'common/customizations';
+import { ipcMain } from 'electron';
+import * as fs from 'fs';
+import * as moment from 'moment';
export default (connections: {[key: string]: antares.Client}) => {
ipcMain.handle('get-table-columns', async (event, params) => {
diff --git a/src/main/ipc-handlers/updates.ts b/src/main/ipc-handlers/updates.ts
index 0d453ba0..c5ef0d5c 100644
--- a/src/main/ipc-handlers/updates.ts
+++ b/src/main/ipc-handlers/updates.ts
@@ -1,6 +1,6 @@
import { ipcMain } from 'electron';
-import { autoUpdater } from 'electron-updater';
import * as Store from 'electron-store';
+import { autoUpdater } from 'electron-updater';
const persistentStore = new Store({
name: 'settings',
diff --git a/src/main/libs/ClientsFactory.ts b/src/main/libs/ClientsFactory.ts
index b421640b..b6fc9c8d 100644
--- a/src/main/libs/ClientsFactory.ts
+++ b/src/main/libs/ClientsFactory.ts
@@ -1,8 +1,9 @@
import * as antares from 'common/interfaces/antares';
+
+import { FirebirdSQLClient } from './clients/FirebirdSQLClient';
import { MySQLClient } from './clients/MySQLClient';
import { PostgreSQLClient } from './clients/PostgreSQLClient';
import { SQLiteClient } from './clients/SQLiteClient';
-import { FirebirdSQLClient } from './clients/FirebirdSQLClient';
export class ClientsFactory {
static getClient (args: antares.ClientParams) {
diff --git a/src/main/libs/ShortcutRegister.ts b/src/main/libs/ShortcutRegister.ts
index f0a2238e..ee758bae 100644
--- a/src/main/libs/ShortcutRegister.ts
+++ b/src/main/libs/ShortcutRegister.ts
@@ -1,6 +1,6 @@
+import { ShortcutRecord, shortcuts } from 'common/shortcuts';
import { BrowserWindow, globalShortcut, Menu, MenuItem, MenuItemConstructorOptions } from 'electron';
import * as Store from 'electron-store';
-import { ShortcutRecord, shortcuts } from 'common/shortcuts';
const shortcutsStore = new Store({ name: 'shortcuts' });
const isDevelopment = process.env.NODE_ENV !== 'production';
diff --git a/src/main/libs/clients/FirebirdSQLClient.ts b/src/main/libs/clients/FirebirdSQLClient.ts
index 5c07d0b2..7a98dc5a 100644
--- a/src/main/libs/clients/FirebirdSQLClient.ts
+++ b/src/main/libs/clients/FirebirdSQLClient.ts
@@ -1,9 +1,10 @@
-import * as path from 'path';
-import * as antares from 'common/interfaces/antares';
-import * as firebird from 'node-firebird';
-import { AntaresCore } from '../AntaresCore';
import dataTypes from 'common/data-types/firebird';
import { FLOAT, NUMBER } from 'common/fieldTypes';
+import * as antares from 'common/interfaces/antares';
+import * as firebird from 'node-firebird';
+import * as path from 'path';
+
+import { AntaresCore } from '../AntaresCore';
export class FirebirdSQLClient extends AntaresCore {
private _schema?: string;
diff --git a/src/main/libs/clients/MySQLClient.ts b/src/main/libs/clients/MySQLClient.ts
index c4594a60..03a690fb 100644
--- a/src/main/libs/clients/MySQLClient.ts
+++ b/src/main/libs/clients/MySQLClient.ts
@@ -1,7 +1,8 @@
+import dataTypes from 'common/data-types/mysql';
import * as antares from 'common/interfaces/antares';
import * as mysql from 'mysql2/promise';
+
import { AntaresCore } from '../AntaresCore';
-import dataTypes from 'common/data-types/mysql';
import SSH2Promise = require('ssh2-promise');
import SSHConfig from 'ssh2-promise/lib/sshConfig';
diff --git a/src/main/libs/clients/PostgreSQLClient.ts b/src/main/libs/clients/PostgreSQLClient.ts
index 3dbc4b10..3ca56863 100644
--- a/src/main/libs/clients/PostgreSQLClient.ts
+++ b/src/main/libs/clients/PostgreSQLClient.ts
@@ -1,11 +1,12 @@
+import dataTypes from 'common/data-types/postgresql';
import * as antares from 'common/interfaces/antares';
-import * as mysql from 'mysql2';
import * as pg from 'pg';
import * as pgAst from 'pgsql-ast-parser';
+
import { AntaresCore } from '../AntaresCore';
-import dataTypes from 'common/data-types/postgresql';
import SSH2Promise = require('ssh2-promise');
import SSHConfig from 'ssh2-promise/lib/sshConfig';
+import { ConnectionOptions } from 'tls';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function pgToString (value: any) {
@@ -98,7 +99,7 @@ export class PostgreSQLClient extends AntaresCore {
_varchar: 'CHARACTER VARYING'
}
- _params: pg.ClientConfig & {schema: string; ssl?: mysql.SslOptions; ssh?: SSHConfig; readonly: boolean};
+ _params: pg.ClientConfig & {schema: string; ssl?: ConnectionOptions; ssh?: SSHConfig; readonly: boolean};
constructor (args: antares.ClientParams) {
super(args);
@@ -156,7 +157,7 @@ export class PostgreSQLClient extends AntaresCore {
user: this._params.user,
database: 'postgres' as string,
password: this._params.password,
- ssl: null as mysql.SslOptions
+ ssl: null as ConnectionOptions
};
if (this._params.database?.length) dbConfig.database = this._params.database;
diff --git a/src/main/libs/clients/SQLiteClient.ts b/src/main/libs/clients/SQLiteClient.ts
index b4562558..7226891a 100644
--- a/src/main/libs/clients/SQLiteClient.ts
+++ b/src/main/libs/clients/SQLiteClient.ts
@@ -1,8 +1,9 @@
-import * as antares from 'common/interfaces/antares';
import * as sqlite from 'better-sqlite3';
-import { AntaresCore } from '../AntaresCore';
import dataTypes from 'common/data-types/sqlite';
-import { NUMBER, FLOAT, TIME, DATETIME } from 'common/fieldTypes';
+import { DATETIME, FLOAT, NUMBER, TIME } from 'common/fieldTypes';
+import * as antares from 'common/interfaces/antares';
+
+import { AntaresCore } from '../AntaresCore';
export class SQLiteClient extends AntaresCore {
private _schema?: string;
@@ -425,7 +426,7 @@ export class SQLiteClient extends AntaresCore {
return results.rows.map(row => {
return {
- sql: row.sql.match(/(?<=AS ).*?$/gs)[0],
+ sql: row.sql.match(/(?<=(AS|as)( |\n)).*?$/gs)[0],
name: view
};
})[0];
diff --git a/src/main/libs/exporters/BaseExporter.ts b/src/main/libs/exporters/BaseExporter.ts
index 98b19157..9d621ae2 100644
--- a/src/main/libs/exporters/BaseExporter.ts
+++ b/src/main/libs/exporters/BaseExporter.ts
@@ -1,8 +1,8 @@
import * as exporter from 'common/interfaces/exporter';
-import * as fs from 'fs';
-import { createGzip, Gzip } from 'zlib';
-import * as path from 'path';
import * as EventEmitter from 'events';
+import * as fs from 'fs';
+import * as path from 'path';
+import { createGzip, Gzip } from 'zlib';
export class BaseExporter extends EventEmitter {
protected _tables;
diff --git a/src/main/libs/exporters/sql/MysqlExporter.ts b/src/main/libs/exporters/sql/MysqlExporter.ts
index 8c37c4b8..49c91a34 100644
--- a/src/main/libs/exporters/sql/MysqlExporter.ts
+++ b/src/main/libs/exporters/sql/MysqlExporter.ts
@@ -1,8 +1,9 @@
import * as exporter from 'common/interfaces/exporter';
-import * as mysql from 'mysql2/promise';
-import { SqlExporter } from './SqlExporter';
-import { MySQLClient } from '../../clients/MySQLClient';
import { valueToSqlString } from 'common/libs/sqlUtils';
+import * as mysql from 'mysql2/promise';
+
+import { MySQLClient } from '../../clients/MySQLClient';
+import { SqlExporter } from './SqlExporter';
export default class MysqlExporter extends SqlExporter {
protected _client: MySQLClient;
diff --git a/src/main/libs/exporters/sql/PostgreSQLExporter.ts b/src/main/libs/exporters/sql/PostgreSQLExporter.ts
index cabf90f9..82fed408 100644
--- a/src/main/libs/exporters/sql/PostgreSQLExporter.ts
+++ b/src/main/libs/exporters/sql/PostgreSQLExporter.ts
@@ -1,11 +1,12 @@
import * as antares from 'common/interfaces/antares';
import * as exporter from 'common/interfaces/exporter';
-import { SqlExporter } from './SqlExporter';
+import { valueToSqlString } from 'common/libs/sqlUtils';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import * as QueryStream from 'pg-query-stream';
+
import { PostgreSQLClient } from '../../clients/PostgreSQLClient';
-import { valueToSqlString } from 'common/libs/sqlUtils';
+import { SqlExporter } from './SqlExporter';
export default class PostgreSQLExporter extends SqlExporter {
constructor (client: PostgreSQLClient, tables: exporter.TableParams[], options: exporter.ExportOptions) {
diff --git a/src/main/libs/exporters/sql/SqlExporter.ts b/src/main/libs/exporters/sql/SqlExporter.ts
index cd42f501..37b42415 100644
--- a/src/main/libs/exporters/sql/SqlExporter.ts
+++ b/src/main/libs/exporters/sql/SqlExporter.ts
@@ -1,4 +1,5 @@
import * as moment from 'moment';
+
import { MySQLClient } from '../../clients/MySQLClient';
import { PostgreSQLClient } from '../../clients/PostgreSQLClient';
import { BaseExporter } from '../BaseExporter';
diff --git a/src/main/libs/importers/BaseImporter.ts b/src/main/libs/importers/BaseImporter.ts
index 807aedea..effd1231 100644
--- a/src/main/libs/importers/BaseImporter.ts
+++ b/src/main/libs/importers/BaseImporter.ts
@@ -1,6 +1,6 @@
import * as importer from 'common/interfaces/importer';
-import * as fs from 'fs';
import * as EventEmitter from 'events';
+import * as fs from 'fs';
export class BaseImporter extends EventEmitter {
protected _options;
diff --git a/src/main/libs/importers/sql/MySQLlImporter.ts b/src/main/libs/importers/sql/MySQLlImporter.ts
index 9888e0d0..58233672 100644
--- a/src/main/libs/importers/sql/MySQLlImporter.ts
+++ b/src/main/libs/importers/sql/MySQLlImporter.ts
@@ -1,6 +1,7 @@
-import * as mysql from 'mysql2';
import * as importer from 'common/interfaces/importer';
import * as fs from 'fs/promises';
+import * as mysql from 'mysql2';
+
import MySQLParser from '../../parsers/MySQLParser';
import { BaseImporter } from '../BaseImporter';
diff --git a/src/main/libs/importers/sql/PostgreSQLImporter.ts b/src/main/libs/importers/sql/PostgreSQLImporter.ts
index e7d3168c..463c149d 100644
--- a/src/main/libs/importers/sql/PostgreSQLImporter.ts
+++ b/src/main/libs/importers/sql/PostgreSQLImporter.ts
@@ -1,6 +1,7 @@
-import * as pg from 'pg';
import * as importer from 'common/interfaces/importer';
import * as fs from 'fs/promises';
+import * as pg from 'pg';
+
import PostgreSQLParser from '../../parsers/PostgreSQLParser';
import { BaseImporter } from '../BaseImporter';
diff --git a/src/main/main.ts b/src/main/main.ts
index a23ce9aa..2bf1458e 100644
--- a/src/main/main.ts
+++ b/src/main/main.ts
@@ -1,8 +1,8 @@
-import { app, BrowserWindow, nativeImage, ipcMain } from 'electron';
-import * as path from 'path';
+import * as remoteMain from '@electron/remote/main';
+import { app, BrowserWindow, ipcMain, nativeImage } from 'electron';
import * as Store from 'electron-store';
import * as windowStateKeeper from 'electron-window-state';
-import * as remoteMain from '@electron/remote/main';
+import * as path from 'path';
import ipcHandlers from './ipc-handlers';
import { OsMenu, ShortcutRegister } from './libs/ShortcutRegister';
diff --git a/src/main/workers/exporter.ts b/src/main/workers/exporter.ts
index 7bb65220..93de4c92 100644
--- a/src/main/workers/exporter.ts
+++ b/src/main/workers/exporter.ts
@@ -1,5 +1,6 @@
import * as antares from 'common/interfaces/antares';
import * as fs from 'fs';
+
import { MySQLClient } from '../libs/clients/MySQLClient';
import { PostgreSQLClient } from '../libs/clients/PostgreSQLClient';
import { ClientsFactory } from '../libs/ClientsFactory';
diff --git a/src/main/workers/importer.ts b/src/main/workers/importer.ts
index 47500afe..84abed83 100644
--- a/src/main/workers/importer.ts
+++ b/src/main/workers/importer.ts
@@ -1,13 +1,14 @@
import * as antares from 'common/interfaces/antares';
-import * as pg from 'pg';
+import { ImportOptions } from 'common/interfaces/importer';
import * as mysql from 'mysql2';
+import * as pg from 'pg';
+import SSHConfig from 'ssh2-promise/lib/sshConfig';
+
import { MySQLClient } from '../libs/clients/MySQLClient';
import { PostgreSQLClient } from '../libs/clients/PostgreSQLClient';
import { ClientsFactory } from '../libs/ClientsFactory';
import MySQLImporter from '../libs/importers/sql/MySQLlImporter';
import PostgreSQLImporter from '../libs/importers/sql/PostgreSQLImporter';
-import SSHConfig from 'ssh2-promise/lib/sshConfig';
-import { ImportOptions } from 'common/interfaces/importer';
let importer: antares.Importer;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
diff --git a/src/renderer/App.vue b/src/renderer/App.vue
index 3a20a72d..be23a9bd 100644
--- a/src/renderer/App.vue
+++ b/src/renderer/App.vue
@@ -21,21 +21,32 @@
-
+
+
+
diff --git a/src/renderer/components/ModalSettingsDataExport.vue b/src/renderer/components/ModalSettingsDataExport.vue
new file mode 100644
index 00000000..f4d2342d
--- /dev/null
+++ b/src/renderer/components/ModalSettingsDataExport.vue
@@ -0,0 +1,332 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('connection.connectionName') }}
+
+
+
+
+ {{ t('connection.client') }}
+
+
+
+
+ {{ t('general.include') }}
+
+
+
+
+
+
+
+
+ {{ getConnectionName(item.uid) }}
+
+
+ {{ item.client }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/renderer/components/ModalSettingsDataImport.vue b/src/renderer/components/ModalSettingsDataImport.vue
new file mode 100644
index 00000000..be311eff
--- /dev/null
+++ b/src/renderer/components/ModalSettingsDataImport.vue
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+
+
+
+ {{ t('application.choseFile') }}
+
+
+
+
+
+ {{ t('application.password') }}
+
+
+
+
+
+
+
+
+
+
+ {{ t('application.encryptionPasswordError') }}
+
+
+
+
+
+
+
+ {{ t(`application.ignoreDuplicates`) }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/renderer/components/ModalSettingsShortcuts.vue b/src/renderer/components/ModalSettingsShortcuts.vue
index a28d338c..c12276d7 100644
--- a/src/renderer/components/ModalSettingsShortcuts.vue
+++ b/src/renderer/components/ModalSettingsShortcuts.vue
@@ -162,17 +162,19 @@